16 #ifndef __INTREPID2_CELLTOOLS_HPP__
17 #define __INTREPID2_CELLTOOLS_HPP__
19 #include "Intrepid2_ConfigDefs.hpp"
21 #include "Shards_CellTopology.hpp"
22 #include "Shards_BasicTopologies.hpp"
24 #include "Teuchos_RCP.hpp"
76 template<
typename DeviceType>
78 using ExecSpaceType =
typename DeviceType::execution_space;
79 using MemSpaceType =
typename DeviceType::memory_space;
97 template<
typename outputValueType,
98 typename pointValueType>
99 static Teuchos::RCP<Basis<DeviceType,outputValueType,pointValueType> >
101 Teuchos::RCP<Basis<DeviceType,outputValueType,pointValueType> > r_val;
103 switch (cellTopo.getKey()) {
124 case shards::Beam<2>::key:
125 case shards::Beam<3>::key:
126 case shards::ShellLine<2>::key:
127 case shards::ShellLine<3>::key:
128 case shards::ShellTriangle<3>::key:
129 case shards::ShellTriangle<6>::key:
130 case shards::ShellQuadrilateral<4>::key:
131 case shards::ShellQuadrilateral<8>::key:
132 case shards::ShellQuadrilateral<9>::key:
134 INTREPID2_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
135 ">>> ERROR (Intrepid2::CellTools::createHGradBasis): Cell topology not supported.");
192 template<
typename JacobianViewType,
193 typename PointViewType,
194 typename WorksetType,
195 typename HGradBasisType>
198 const PointViewType points,
199 const WorksetType worksetCell,
200 const Teuchos::RCP<HGradBasisType> basis,
201 const int startCell=0,
const int endCell=-1);
237 template<
typename JacobianViewType,
238 typename BasisGradientsType,
239 typename WorksetType>
242 const WorksetType worksetCell,
243 const BasisGradientsType gradients,
244 const int startCell=0,
const int endCell=-1);
280 template<
typename JacobianViewType,
281 typename PointViewType,
282 typename WorksetCellViewType>
285 const PointViewType points,
286 const WorksetCellViewType worksetCell,
287 const shards::CellTopology cellTopo ) {
288 using nonConstPointValueType =
typename PointViewType::non_const_value_type;
289 auto basis = createHGradBasis<nonConstPointValueType,nonConstPointValueType>(cellTopo);
306 template<
typename JacobianInvViewType,
307 typename JacobianViewType>
310 const JacobianViewType jacobian );
322 template<
typename JacobianDetViewType,
323 typename JacobianViewType>
326 const JacobianViewType jacobian );
333 template<
class Po
intScalar>
341 template<
class Po
intScalar>
349 template<
class Po
intScalar>
358 template<
class Po
intScalar>
367 template<
class Po
intScalar>
377 template<
class Po
intScalar>
398 template<
typename cellCenterValueType,
class ...cellCenterProperties>
401 const shards::CellTopology cell );
411 template<
typename cellVertexValueType,
class ...cellVertexProperties>
413 getReferenceVertex( Kokkos::DynRankView<cellVertexValueType,cellVertexProperties...> cellVertex,
414 const shards::CellTopology cell,
415 const ordinal_type vertexOrd );
432 template<
typename subcellVertexValueType,
class ...subcellVertexProperties>
435 const ordinal_type subcellDim,
436 const ordinal_type subcellOrd,
437 const shards::CellTopology parentCell );
456 template<
typename cellNodeValueType,
class ...cellNodeProperties>
458 getReferenceNode( Kokkos::DynRankView<cellNodeValueType,cellNodeProperties...> cellNode,
459 const shards::CellTopology cell,
460 const ordinal_type nodeOrd );
477 template<
typename SubcellNodeViewType>
480 const ordinal_type subcellDim,
481 const ordinal_type subcellOrd,
482 const shards::CellTopology parentCell );
509 template<
typename RefEdgeTangentViewType>
512 const ordinal_type edgeOrd,
513 const shards::CellTopology parentCell );
551 template<
typename RefFaceTanViewType>
554 RefFaceTanViewType refFaceTanV,
555 const ordinal_type faceOrd,
556 const shards::CellTopology parentCell );
620 template<
typename RefS
ideNormalViewType>
623 const ordinal_type sideOrd,
624 const shards::CellTopology parentCell );
664 template<
typename RefFaceNormalViewType>
667 const ordinal_type faceOrd,
668 const shards::CellTopology parentCell );
699 template<
typename edgeTangentValueType,
class ...edgeTangentProperties,
700 typename worksetJacobianValueType,
class ...worksetJacobianProperties>
703 const Kokkos::DynRankView<worksetJacobianValueType,worksetJacobianProperties...> worksetJacobians,
704 const ordinal_type worksetEdgeOrd,
705 const shards::CellTopology parentCell );
719 template<
typename edgeTangentValueType,
class ...edgeTangentProperties,
720 typename worksetJacobianValueType,
class ...worksetJacobianProperties,
721 typename edgeOrdValueType,
class ...edgeOrdProperties>
724 const Kokkos::DynRankView<worksetJacobianValueType,worksetJacobianProperties...> worksetJacobians,
725 const Kokkos::DynRankView<edgeOrdValueType,edgeOrdProperties...> worksetEdgeOrds,
726 const shards::CellTopology parentCell );
767 template<
typename faceTanValueType,
class ...faceTanProperties,
768 typename worksetJacobianValueType,
class ...worksetJacobianProperties>
771 Kokkos::DynRankView<faceTanValueType,faceTanProperties...> faceTanV,
772 const Kokkos::DynRankView<worksetJacobianValueType,worksetJacobianProperties...> worksetJacobians,
773 const ordinal_type worksetFaceOrd,
774 const shards::CellTopology parentCell );
789 template<
typename faceTanValueType,
class ...faceTanProperties,
790 typename worksetJacobianValueType,
class ...worksetJacobianProperties,
791 typename faceOrdValueType,
class ...faceOrdProperties>
794 Kokkos::DynRankView<faceTanValueType,faceTanProperties...> faceTanV,
795 const Kokkos::DynRankView<worksetJacobianValueType,worksetJacobianProperties...> worksetJacobians,
796 const Kokkos::DynRankView<faceOrdValueType,faceOrdProperties...> worksetFaceOrds,
797 const shards::CellTopology parentCell );
861 template<
typename sideNormalValueType,
class ...sideNormalProperties,
862 typename worksetJacobianValueType,
class ...worksetJacobianProperties>
865 const Kokkos::DynRankView<worksetJacobianValueType,worksetJacobianProperties...> worksetJacobians,
866 const ordinal_type worksetSideOrd,
867 const shards::CellTopology parentCell );
880 template<
typename sideNormalValueType,
class ...sideNormalProperties,
881 typename worksetJacobianValueType,
class ...worksetJacobianProperties,
882 typename edgeOrdValueType,
class ...edgeOrdProperties>
885 const Kokkos::DynRankView<worksetJacobianValueType,worksetJacobianProperties...> worksetJacobians,
886 const Kokkos::DynRankView<edgeOrdValueType,edgeOrdProperties...> worksetSideOrds,
887 const shards::CellTopology parentCell );
927 template<
typename faceNormalValueType,
class ...faceNormalProperties,
928 typename worksetJacobianValueType,
class ...worksetJacobianProperties>
931 const Kokkos::DynRankView<worksetJacobianValueType,worksetJacobianProperties...> worksetJacobians,
932 const ordinal_type worksetFaceOrd,
933 const shards::CellTopology parentCell );
947 template<
typename faceNormalValueType,
class ...faceNormalProperties,
948 typename worksetJacobianValueType,
class ...worksetJacobianProperties,
949 typename faceOrdValueType,
class ...faceOrdProperties>
952 const Kokkos::DynRankView<worksetJacobianValueType,worksetJacobianProperties...> worksetJacobians,
953 const Kokkos::DynRankView<faceOrdValueType,faceOrdProperties...> worksetFaceOrds,
954 const shards::CellTopology parentCell );
998 template<
typename PhysPointValueType,
999 typename RefPointValueType,
1000 typename WorksetType,
1001 typename HGradBasisPtrType>
1004 const RefPointValueType refPoints,
1005 const WorksetType worksetCell,
1006 const HGradBasisPtrType basis );
1048 template<
typename PhysPointViewType,
1049 typename RefPointViewType,
1050 typename WorksetCellViewType>
1053 const RefPointViewType refPoints,
1054 const WorksetCellViewType worksetCell,
1055 const shards::CellTopology cellTopo ) {
1056 using nonConstRefPointValueType =
typename RefPointViewType::non_const_value_type;
1057 auto basis = createHGradBasis<nonConstRefPointValueType,nonConstRefPointValueType>(cellTopo);
1115 template<
typename refSubcellViewType,
1116 typename paramPointViewType>
1119 const paramPointViewType paramPoints,
1120 const ordinal_type subcellDim,
1121 const ordinal_type subcellOrd,
1122 const shards::CellTopology parentCell );
1131 template<
typename refSubcellViewType,
typename paramPo
intViewType>
1134 const paramPointViewType paramPoints,
1135 const typename RefSubcellParametrization<DeviceType>::ConstViewType subcellParametrization,
1136 const ordinal_type subcellOrd);
1143 template<
typename refSubcellViewType,
typename paramPo
intViewType,
typename ordViewType>
1146 const paramPointViewType paramPoints,
1147 const typename RefSubcellParametrization<DeviceType>::ConstViewType subcellParametrization,
1148 const ordViewType subcellOrd);
1201 template<
typename refPointValueType,
class ...refPointProperties,
1202 typename physPointValueType,
class ...physPointProperties,
1203 typename worksetCellValueType,
class ...worksetCellProperties>
1205 mapToReferenceFrame( Kokkos::DynRankView<refPointValueType,refPointProperties...> refPoints,
1206 const Kokkos::DynRankView<physPointValueType,physPointProperties...> physPoints,
1207 const Kokkos::DynRankView<worksetCellValueType,worksetCellProperties...> worksetCell,
1208 const shards::CellTopology cellTopo );
1236 template<
typename refPointValueType,
class ...refPointProperties,
1237 typename initGuessValueType,
class ...initGuessProperties,
1238 typename physPointValueType,
class ...physPointProperties,
1239 typename worksetCellValueType,
class ...worksetCellProperties,
1240 typename HGradBasisPtrType>
1243 const Kokkos::DynRankView<initGuessValueType,initGuessProperties...> initGuess,
1244 const Kokkos::DynRankView<physPointValueType,physPointProperties...> physPoints,
1245 const Kokkos::DynRankView<worksetCellValueType,worksetCellProperties...> worksetCell,
1246 const HGradBasisPtrType basis );
1279 template<
typename refPointValueType,
class ...refPointProperties,
1280 typename initGuessValueType,
class ...initGuessProperties,
1281 typename physPointValueType,
class ...physPointProperties,
1282 typename worksetCellValueType,
class ...worksetCellProperties>
1285 const Kokkos::DynRankView<initGuessValueType,initGuessProperties...> initGuess,
1286 const Kokkos::DynRankView<physPointValueType,physPointProperties...> physPoints,
1287 const Kokkos::DynRankView<worksetCellValueType,worksetCellProperties...> worksetCell,
1288 const shards::CellTopology cellTopo ) {
1289 auto basis = createHGradBasis<refPointValueType,refPointValueType>(cellTopo);
1377 template<
typename subcvCoordValueType,
class ...subcvCoordProperties,
1378 typename cellCoordValueType,
class ...cellCoordProperties>
1380 getSubcvCoords( Kokkos::DynRankView<subcvCoordValueType,subcvCoordProperties...> subcvCoords,
1381 const Kokkos::DynRankView<cellCoordValueType,cellCoordProperties...> cellCoords,
1382 const shards::CellTopology primaryCell );
1399 template<
typename Po
intViewType>
1402 const shards::CellTopology cellTopo,
1403 const typename ScalarTraits<typename PointViewType::value_type>::scalar_type thres =
1404 threshold<
typename ScalarTraits<typename PointViewType::value_type>::scalar_type>() );
1417 template<
unsigned cellTopologyKey,
1418 typename OutputViewType,
1419 typename InputViewType>
1421 const InputViewType points,
1435 template<
typename InCellViewType,
1436 typename PointViewType>
1438 const PointViewType points,
1439 const shards::CellTopology cellTopo,
1440 const typename ScalarTraits<typename PointViewType::value_type>::scalar_type thres =
1441 threshold<
typename ScalarTraits<typename PointViewType::value_type>::scalar_type>() );
1454 template<
typename inCellValueType,
class ...inCellProperties,
1455 typename pointValueType,
class ...pointProperties,
1456 typename cellWorksetValueType,
class ...cellWorksetProperties>
1458 const Kokkos::DynRankView<pointValueType,pointProperties...> points,
1459 const Kokkos::DynRankView<cellWorksetValueType,cellWorksetProperties...> cellWorkset,
1460 const shards::CellTopology cellTopo,
1461 const typename ScalarTraits<pointValueType>::scalar_type thres =
1462 threshold<
typename ScalarTraits<pointValueType>::scalar_type>() );
1507 template<
typename jacobianViewType,
1508 typename PointViewType,
1509 typename worksetCellViewType>
1511 CellTools_setJacobianArgs(
const jacobianViewType jacobian,
1512 const PointViewType points,
1513 const worksetCellViewType worksetCell,
1514 const shards::CellTopology cellTopo );
1520 template<
typename jacobianInvViewType,
1521 typename jacobianViewType>
1523 CellTools_setJacobianInvArgs(
const jacobianInvViewType jacobianInv,
1524 const jacobianViewType jacobian );
1531 template<
typename jacobianDetViewType,
1532 typename jacobianViewType>
1534 CellTools_setJacobianDetArgs(
const jacobianDetViewType jacobianDet,
1535 const jacobianViewType jacobian );
1544 template<
typename physPointViewType,
1545 typename refPointViewType,
1546 typename worksetCellViewType>
1548 CellTools_mapToPhysicalFrameArgs(
const physPointViewType physPoints,
1549 const refPointViewType refPoints,
1550 const worksetCellViewType worksetCell,
1551 const shards::CellTopology cellTopo );
1560 template<
typename refPointViewType,
1561 typename physPointViewType,
1562 typename worksetCellViewType>
1564 CellTools_mapToReferenceFrameArgs(
const refPointViewType refPoints,
1565 const physPointViewType physPoints,
1566 const worksetCellViewType worksetCell,
1567 const shards::CellTopology cellTopo );
1578 template<
typename refPointViewType,
1579 typename initGuessViewType,
1580 typename physPointViewType,
1581 typename worksetCellViewType>
1583 CellTools_mapToReferenceFrameInitGuess(
const refPointViewType refPoints,
1584 const initGuessViewType initGuess,
1585 const physPointViewType physPoints,
1586 const worksetCellViewType worksetCell,
1587 const shards::CellTopology cellTopo );
Implementation of the default H(grad)-compatible FEM basis of degree 1 on Quadrilateral cell...
Header file for the Intrepid2::Basis_HGRAD_TRI_C1_FEM class.
Implementation of the default H(grad)-compatible FEM basis of degree 1 on Wedge cell.
Implementation of an H(grad)-compatible FEM basis of degree 2 on a Pyramid cell.
Header file for the Intrepid2::Basis_HGRAD_PYR_I2_FEM class.
Header file for the Intrepid2::Basis_HGRAD_QUAD_C1_FEM class.
Header file for the Intrepid2::Basis_HGRAD_QUAD_C2_FEM class.
Implementation of the default H(grad)-compatible FEM basis of degree 1 on Triangle cell...
Implementation of the default H(grad)-compatible FEM basis of degree 1 on Pyramid cell...
Implementation of the default H(grad)-compatible FEM basis of degree 2 on Hexahedron cell...
Header file for the Intrepid2::Basis_HGRAD_HEX_C2_FEM class.
Defines the Data class, a wrapper around a Kokkos::View that allows data that is constant or repeatin...
Header file for the Intrepid2::Basis_HGRAD_PYR_C1_FEM class.
Header file for the Intrepid2::Basis_HGRAD_LINE_C2_FEM class.
Implementation of the default H(grad)-compatible FEM basis of degree 2 on Triangle cell...
Header file for the Intrepid2::Basis_HGRAD_TRI_C2_FEM class.
Header file for the Intrepid2::Basis_HGRAD_WEDGE_C2_FEM class.
Wrapper around a Kokkos::View that allows data that is constant or repeating in various logical dimen...
Implementation of the default H(grad)-compatible FEM basis of degree 2 on Line cell.
Header function for Intrepid2::Util class and other utility functions.
Header file for the Intrepid2::Basis_HGRAD_WEDGE_C1_FEM class.
Header file for the Intrepid2::Basis_HGRAD_TET_C2_FEM class.
Implementation of the default H(grad)-compatible FEM basis of degree 2 on Wedge cell.
Header file for the classes: Intrepid2::RefSubcellParametrization, Intrepid2::RefCellNodes, Intrepid2::RefCellCenter.
Header file for the Intrepid2::Basis_HGRAD_HEX_C1_FEM class.
static bool isSupported(const unsigned cellTopoKey)
Checks if a cell topology has a reference parametrization.
Header file for the Intrepid2::Basis_HGRAD_TET_C1_FEM class.
Contains definitions of custom data types in Intrepid2.
Implementation of the default H(grad)-compatible FEM basis of degree 2 on Quadrilateral cell...
Header file for the Intrepid2::Basis_HGRAD_LINE_C1_FEM class.
Implementation of the default H(grad)-compatible FEM basis of degree 2 on Tetrahedron cell...
Implementation of the default H(grad)-compatible FEM basis of degree 2 on Tetrahedron cell...
Header file for the Intrepid2::Basis_HGRAD_TET_COMP12_FEM class.
Implementation of the default H(grad)-compatible FEM basis of degree 1 on Line cell.
Implementation of the default H(grad)-compatible FEM basis of degree 1 on Tetrahedron cell...
Implementation of the default H(grad)-compatible FEM basis of degree 1 on Hexahedron cell...
Header file for the abstract base class Intrepid2::Basis.