/** Get the local coordinates for this field. This is independent of element
  * locations.
  *
  * \param[in,out] coords   Coordinates associated with this field type.
  */
void Intrepid2FieldPattern::getInterpolatoryCoordinates(const Intrepid2::FieldContainer<double> & cellVertices,
                                                       Intrepid2::FieldContainer<double> & coords) const
{
   TEUCHOS_ASSERT(cellVertices.rank()==3);

   int numCells = cellVertices.dimension(0);

   // grab the local coordinates
   Intrepid2::FieldContainer<double> localCoords;
   getInterpolatoryCoordinates(localCoords);

   // resize the coordinates field container
   coords.resize(numCells,localCoords.dimension(0),getDimension());

   if(numCells>0) {
      // map to phsyical coordinates
      Intrepid2::CellTools<double> cellTools;
      cellTools.mapToPhysicalFrame(coords,localCoords,cellVertices,intrepidBasis_->getBaseCellTopology());
   }
}
  /** Get the local coordinates for this field. This is independent of element
   * locations.
   *
   * \param[in,out] coords   Coordinates associated with this field type.
   */
  void 
  Intrepid2FieldPattern::
  getInterpolatoryCoordinates(const Kokkos::DynRankView<double,PHX::Device> & cellVertices,
                              Kokkos::DynRankView<double,PHX::Device> & coords) const
  {
    TEUCHOS_ASSERT(cellVertices.rank()==3);

    int numCells = cellVertices.dimension(0);

    // grab the local coordinates
    Kokkos::DynRankView<double,PHX::Device> localCoords;
    getInterpolatoryCoordinates(localCoords);

    // resize the coordinates field container
    coords = Kokkos::DynRankView<double,PHX::Device>("coords",numCells,localCoords.dimension(0),getDimension());

    if(numCells>0) {
      Intrepid2::CellTools<PHX::Device> cellTools;
      cellTools.mapToPhysicalFrame(coords,localCoords,cellVertices,intrepidBasis_->getBaseCellTopology());
    }
  }