49 #ifndef __INTREPID2_CELLTOOLS_HPP__ 50 #define __INTREPID2_CELLTOOLS_HPP__ 52 #include "Intrepid2_ConfigDefs.hpp" 54 #include "Shards_CellTopology.hpp" 55 #include "Shards_BasicTopologies.hpp" 57 #include "Teuchos_RCP.hpp" 106 template<
typename DeviceType>
108 using ExecSpaceType =
typename DeviceType::execution_space;
109 using MemSpaceType =
typename DeviceType::memory_space;
127 template<
typename outputValueType,
128 typename pointValueType>
129 static Teuchos::RCP<Basis<DeviceType,outputValueType,pointValueType> >
131 Teuchos::RCP<Basis<DeviceType,outputValueType,pointValueType> > r_val;
133 switch (cellTopo.getKey()) {
152 case shards::Quadrilateral<8>::key:
153 case shards::Line<3>::key:
154 case shards::Beam<2>::key:
155 case shards::Beam<3>::key:
156 case shards::ShellLine<2>::key:
157 case shards::ShellLine<3>::key:
158 case shards::ShellTriangle<3>::key:
159 case shards::ShellTriangle<6>::key:
160 case shards::ShellQuadrilateral<4>::key:
161 case shards::ShellQuadrilateral<8>::key:
162 case shards::ShellQuadrilateral<9>::key:
164 INTREPID2_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
165 ">>> ERROR (Intrepid2::CellTools::createHGradBasis): Cell topology not supported.");
222 template<
typename jacobianValueType,
class ...jacobianProperties,
223 typename pointValueType,
class ...pointProperties,
224 typename WorksetType,
225 typename HGradBasisType>
227 setJacobian( Kokkos::DynRankView<jacobianValueType,jacobianProperties...> jacobian,
228 const Kokkos::DynRankView<pointValueType,pointProperties...> points,
229 const WorksetType worksetCell,
230 const Teuchos::RCP<HGradBasisType> basis,
231 const int startCell=0,
const int endCell=-1);
267 template<
typename jacobianValueType,
class ...jacobianProperties,
268 typename BasisGradientsType,
269 typename WorksetType>
271 setJacobian( Kokkos::DynRankView<jacobianValueType,jacobianProperties...> jacobian,
272 const WorksetType worksetCell,
273 const BasisGradientsType gradients,
274 const int startCell=0,
const int endCell=-1);
310 template<
typename jacobianValueType,
class ...jacobianProperties,
311 typename pointValueType,
class ...pointProperties,
312 typename worksetCellValueType,
class ...worksetCellProperties>
314 setJacobian( Kokkos::DynRankView<jacobianValueType,jacobianProperties...> jacobian,
315 const Kokkos::DynRankView<pointValueType,pointProperties...> points,
316 const Kokkos::DynRankView<worksetCellValueType,worksetCellProperties...> worksetCell,
317 const shards::CellTopology cellTopo ) {
318 auto basis = createHGradBasis<pointValueType,pointValueType>(cellTopo);
335 template<
typename jacobianInvValueType,
class ...jacobianInvProperties,
336 typename jacobianValueType,
class ...jacobianProperties>
338 setJacobianInv( Kokkos::DynRankView<jacobianInvValueType,jacobianInvProperties...> jacobianInv,
339 const Kokkos::DynRankView<jacobianValueType,jacobianProperties...> jacobian );
351 template<
typename jacobianDetValueType,
class ...jacobianDetProperties,
352 typename jacobianValueType,
class ...jacobianProperties>
354 setJacobianDet( Kokkos::DynRankView<jacobianDetValueType,jacobianDetProperties...> jacobianDet,
355 const Kokkos::DynRankView<jacobianValueType,jacobianProperties...> jacobian );
362 template<
class Po
intScalar>
370 template<
class Po
intScalar>
378 template<
class Po
intScalar>
387 template<
class Po
intScalar>
407 template<
typename cellCenterValueType,
class ...cellCenterProperties>
410 const shards::CellTopology cell );
420 template<
typename cellVertexValueType,
class ...cellVertexProperties>
422 getReferenceVertex( Kokkos::DynRankView<cellVertexValueType,cellVertexProperties...> cellVertex,
423 const shards::CellTopology cell,
424 const ordinal_type vertexOrd );
441 template<
typename subcellVertexValueType,
class ...subcellVertexProperties>
444 const ordinal_type subcellDim,
445 const ordinal_type subcellOrd,
446 const shards::CellTopology parentCell );
465 template<
typename cellNodeValueType,
class ...cellNodeProperties>
467 getReferenceNode( Kokkos::DynRankView<cellNodeValueType,cellNodeProperties...> cellNode,
468 const shards::CellTopology cell,
469 const ordinal_type nodeOrd );
486 template<
typename subcellNodeValueType,
class ...subcellNodeProperties>
489 const ordinal_type subcellDim,
490 const ordinal_type subcellOrd,
491 const shards::CellTopology parentCell );
518 template<
typename refEdgeTangentValueType,
class ...refEdgeTangentProperties>
520 getReferenceEdgeTangent( Kokkos::DynRankView<refEdgeTangentValueType,refEdgeTangentProperties...> refEdgeTangent,
521 const ordinal_type edgeOrd,
522 const shards::CellTopology parentCell );
560 template<
typename refFaceTanValueType,
class ...refFaceTanProperties>
563 Kokkos::DynRankView<refFaceTanValueType,refFaceTanProperties...> refFaceTanV,
564 const ordinal_type faceOrd,
565 const shards::CellTopology parentCell );
629 template<
typename refSideNormalValueType,
class ...refSideNormalProperties>
631 getReferenceSideNormal( Kokkos::DynRankView<refSideNormalValueType,refSideNormalProperties...> refSideNormal,
632 const ordinal_type sideOrd,
633 const shards::CellTopology parentCell );
673 template<
typename refFaceNormalValueType,
class ...refFaceNormalProperties>
675 getReferenceFaceNormal( Kokkos::DynRankView<refFaceNormalValueType,refFaceNormalProperties...> refFaceNormal,
676 const ordinal_type faceOrd,
677 const shards::CellTopology parentCell );
708 template<
typename edgeTangentValueType,
class ...edgeTangentProperties,
709 typename worksetJacobianValueType,
class ...worksetJacobianProperties>
712 const Kokkos::DynRankView<worksetJacobianValueType,worksetJacobianProperties...> worksetJacobians,
713 const ordinal_type worksetEdgeOrd,
714 const shards::CellTopology parentCell );
755 template<
typename faceTanValueType,
class ...faceTanProperties,
756 typename worksetJacobianValueType,
class ...worksetJacobianProperties>
759 Kokkos::DynRankView<faceTanValueType,faceTanProperties...> faceTanV,
760 const Kokkos::DynRankView<worksetJacobianValueType,worksetJacobianProperties...> worksetJacobians,
761 const ordinal_type worksetFaceOrd,
762 const shards::CellTopology parentCell );
824 template<
typename sideNormalValueType,
class ...sideNormalProperties,
825 typename worksetJacobianValueType,
class ...worksetJacobianProperties>
828 const Kokkos::DynRankView<worksetJacobianValueType,worksetJacobianProperties...> worksetJacobians,
829 const ordinal_type worksetSideOrd,
830 const shards::CellTopology parentCell );
870 template<
typename faceNormalValueType,
class ...faceNormalProperties,
871 typename worksetJacobianValueType,
class ...worksetJacobianProperties>
874 const Kokkos::DynRankView<worksetJacobianValueType,worksetJacobianProperties...> worksetJacobians,
875 const ordinal_type worksetFaceOrd,
876 const shards::CellTopology parentCell );
920 template<
typename physPointValueType,
class ...physPointProperties,
921 typename refPointValueType,
class ...refPointProperties,
922 typename WorksetType,
923 typename HGradBasisPtrType>
925 mapToPhysicalFrame( Kokkos::DynRankView<physPointValueType,physPointProperties...> physPoints,
926 const Kokkos::DynRankView<refPointValueType,refPointProperties...> refPoints,
927 const WorksetType worksetCell,
928 const HGradBasisPtrType basis );
970 template<
typename physPointValueType,
class ...physPointProperties,
971 typename refPointValueType,
class ...refPointProperties,
972 typename worksetCellValueType,
class ...worksetCellProperties>
975 const Kokkos::DynRankView<refPointValueType,refPointProperties...> refPoints,
976 const Kokkos::DynRankView<worksetCellValueType,worksetCellProperties...> worksetCell,
977 const shards::CellTopology cellTopo ) {
978 auto basis = createHGradBasis<refPointValueType,refPointValueType>(cellTopo);
1036 template<
typename refSubcellPointValueType,
class ...refSubcellPointProperties,
1037 typename paramPointValueType,
class ...paramPointProperties>
1039 mapToReferenceSubcell( Kokkos::DynRankView<refSubcellPointValueType,refSubcellPointProperties...> refSubcellPoints,
1040 const Kokkos::DynRankView<paramPointValueType,paramPointProperties...> paramPoints,
1041 const ordinal_type subcellDim,
1042 const ordinal_type subcellOrd,
1043 const shards::CellTopology parentCell );
1096 template<
typename refPointValueType,
class ...refPointProperties,
1097 typename physPointValueType,
class ...physPointProperties,
1098 typename worksetCellValueType,
class ...worksetCellProperties>
1100 mapToReferenceFrame( Kokkos::DynRankView<refPointValueType,refPointProperties...> refPoints,
1101 const Kokkos::DynRankView<physPointValueType,physPointProperties...> physPoints,
1102 const Kokkos::DynRankView<worksetCellValueType,worksetCellProperties...> worksetCell,
1103 const shards::CellTopology cellTopo );
1131 template<
typename refPointValueType,
class ...refPointProperties,
1132 typename initGuessValueType,
class ...initGuessProperties,
1133 typename physPointValueType,
class ...physPointProperties,
1134 typename worksetCellValueType,
class ...worksetCellProperties,
1135 typename HGradBasisPtrType>
1138 const Kokkos::DynRankView<initGuessValueType,initGuessProperties...> initGuess,
1139 const Kokkos::DynRankView<physPointValueType,physPointProperties...> physPoints,
1140 const Kokkos::DynRankView<worksetCellValueType,worksetCellProperties...> worksetCell,
1141 const HGradBasisPtrType basis );
1174 template<
typename refPointValueType,
class ...refPointProperties,
1175 typename initGuessValueType,
class ...initGuessProperties,
1176 typename physPointValueType,
class ...physPointProperties,
1177 typename worksetCellValueType,
class ...worksetCellProperties>
1180 const Kokkos::DynRankView<initGuessValueType,initGuessProperties...> initGuess,
1181 const Kokkos::DynRankView<physPointValueType,physPointProperties...> physPoints,
1182 const Kokkos::DynRankView<worksetCellValueType,worksetCellProperties...> worksetCell,
1183 const shards::CellTopology cellTopo ) {
1184 auto basis = createHGradBasis<refPointValueType,refPointValueType>(cellTopo);
1272 template<
typename subcvCoordValueType,
class ...subcvCoordProperties,
1273 typename cellCoordValueType,
class ...cellCoordProperties>
1275 getSubcvCoords( Kokkos::DynRankView<subcvCoordValueType,subcvCoordProperties...> subcvCoords,
1276 const Kokkos::DynRankView<cellCoordValueType,cellCoordProperties...> cellCoords,
1277 const shards::CellTopology primaryCell );
1294 template<
typename pointValueType,
class ...pointProperties>
1297 const shards::CellTopology cellTopo,
1298 const double thres = threshold() );
1333 template<
typename inCellValueType,
class ...inCellProperties,
1334 typename pointValueType,
class ...pointProperties>
1336 const Kokkos::DynRankView<pointValueType,pointProperties...> points,
1337 const shards::CellTopology cellTopo,
1338 const double thres = threshold() );
1361 template<
typename inCellValueType,
class ...inCellProperties,
1362 typename pointValueType,
class ...pointProperties,
1363 typename cellWorksetValueType,
class ...cellWorksetProperties>
1365 const Kokkos::DynRankView<pointValueType,pointProperties...> points,
1366 const Kokkos::DynRankView<cellWorksetValueType,cellWorksetProperties...> cellWorkset,
1367 const shards::CellTopology cellTopo,
1368 const double thres = threshold() );
1413 template<
typename jacobianViewType,
1414 typename PointViewType,
1415 typename worksetCellViewType>
1417 CellTools_setJacobianArgs(
const jacobianViewType jacobian,
1418 const PointViewType points,
1419 const worksetCellViewType worksetCell,
1420 const shards::CellTopology cellTopo );
1426 template<
typename jacobianInvViewType,
1427 typename jacobianViewType>
1429 CellTools_setJacobianInvArgs(
const jacobianInvViewType jacobianInv,
1430 const jacobianViewType jacobian );
1437 template<
typename jacobianDetViewType,
1438 typename jacobianViewType>
1440 CellTools_setJacobianDetArgs(
const jacobianDetViewType jacobianDet,
1441 const jacobianViewType jacobian );
1450 template<
typename physPointViewType,
1451 typename refPointViewType,
1452 typename worksetCellViewType>
1454 CellTools_mapToPhysicalFrameArgs(
const physPointViewType physPoints,
1455 const refPointViewType refPoints,
1456 const worksetCellViewType worksetCell,
1457 const shards::CellTopology cellTopo );
1466 template<
typename refPointViewType,
1467 typename physPointViewType,
1468 typename worksetCellViewType>
1470 CellTools_mapToReferenceFrameArgs(
const refPointViewType refPoints,
1471 const physPointViewType physPoints,
1472 const worksetCellViewType worksetCell,
1473 const shards::CellTopology cellTopo );
1484 template<
typename refPointViewType,
1485 typename initGuessViewType,
1486 typename physPointViewType,
1487 typename worksetCellViewType>
1489 CellTools_mapToReferenceFrameInitGuess(
const refPointViewType refPoints,
1490 const initGuessViewType initGuess,
1491 const physPointViewType physPoints,
1492 const worksetCellViewType worksetCell,
1493 const shards::CellTopology cellTopo );
Implementation of the default H(grad)-compatible FEM basis of degree 2 on Wedge cell.
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.
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 2 on Hexahedron cell...
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...
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.
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...
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.
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.