49 #ifndef Intrepid2_DerivedBasisFamily_h 50 #define Intrepid2_DerivedBasisFamily_h 56 #include "Intrepid2_DerivedBasis_HDIV_QUAD.hpp" 81 template<
class LineBasisHGRAD,
class LineBasisHVOL,
class TriangleBasisFamily = EmptyBasisFamily,
class TetrahedronBasisFamily = EmptyBasisFamily>
85 using ExecutionSpace =
typename LineBasisHGRAD::ExecutionSpace;
86 using OutputValueType =
typename LineBasisHGRAD::OutputValueType;
87 using PointValueType =
typename LineBasisHGRAD::PointValueType;
89 using Basis =
typename LineBasisHGRAD::BasisBase;
90 using BasisPtr = Teuchos::RCP<Basis>;
94 using HGRAD_LINE = LineBasisHGRAD;
95 using HVOL_LINE = LineBasisHVOL;
110 using HGRAD_TRI =
typename TriangleBasisFamily::HGRAD;
111 using HCURL_TRI =
typename TriangleBasisFamily::HCURL;
112 using HDIV_TRI =
typename TriangleBasisFamily::HDIV;
113 using HVOL_TRI =
typename TriangleBasisFamily::HVOL;
116 using HGRAD_TET =
typename TetrahedronBasisFamily::HGRAD;
117 using HCURL_TET =
typename TetrahedronBasisFamily::HCURL;
118 using HDIV_TET =
typename TetrahedronBasisFamily::HDIV;
119 using HVOL_TET =
typename TetrahedronBasisFamily::HVOL;
127 template<
class BasisFamily>
128 static typename BasisFamily::BasisPtr
getLineBasis(Intrepid2::EFunctionSpace fs,
int polyOrder,
const EPointType pointType=POINTTYPE_DEFAULT)
133 case FUNCTION_SPACE_HVOL:
return rcp(
new typename BasisFamily::HVOL_LINE (polyOrder,pointType));
134 case FUNCTION_SPACE_HGRAD:
return rcp(
new typename BasisFamily::HGRAD_LINE(polyOrder,pointType));
136 INTREPID2_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
"Unsupported function space");
145 template<
class BasisFamily>
151 case FUNCTION_SPACE_HVOL:
return rcp(
new typename BasisFamily::HVOL_QUAD (polyOrder,pointType));
152 case FUNCTION_SPACE_HCURL:
return rcp(
new typename BasisFamily::HCURL_QUAD(polyOrder,pointType));
153 case FUNCTION_SPACE_HDIV:
return rcp(
new typename BasisFamily::HDIV_QUAD (polyOrder,pointType));
154 case FUNCTION_SPACE_HGRAD:
return rcp(
new typename BasisFamily::HGRAD_QUAD(polyOrder,pointType));
156 INTREPID2_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
"Unsupported function space");
166 template<
class BasisFamily>
167 static typename BasisFamily::BasisPtr
getQuadrilateralBasis(Intrepid2::EFunctionSpace fs,
int polyOrder_x,
int polyOrder_y,
const EPointType pointType=POINTTYPE_DEFAULT)
172 case FUNCTION_SPACE_HVOL:
return rcp(
new typename BasisFamily::HVOL_QUAD (polyOrder_x,polyOrder_y,pointType));
173 case FUNCTION_SPACE_HCURL:
return rcp(
new typename BasisFamily::HCURL_QUAD(polyOrder_x,polyOrder_y,pointType));
174 case FUNCTION_SPACE_HDIV:
return rcp(
new typename BasisFamily::HDIV_QUAD (polyOrder_x,polyOrder_y,pointType));
175 case FUNCTION_SPACE_HGRAD:
return rcp(
new typename BasisFamily::HGRAD_QUAD(polyOrder_x,polyOrder_y,pointType));
177 INTREPID2_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
"Unsupported function space");
186 template<
class BasisFamily>
192 case FUNCTION_SPACE_HVOL:
return rcp(
new typename BasisFamily::HVOL_HEX (polyOrder,pointType));
193 case FUNCTION_SPACE_HCURL:
return rcp(
new typename BasisFamily::HCURL_HEX(polyOrder,pointType));
194 case FUNCTION_SPACE_HDIV:
return rcp(
new typename BasisFamily::HDIV_HEX (polyOrder,pointType));
195 case FUNCTION_SPACE_HGRAD:
return rcp(
new typename BasisFamily::HGRAD_HEX(polyOrder,pointType));
197 INTREPID2_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
"Unsupported function space");
208 template<
class BasisFamily>
209 static typename BasisFamily::BasisPtr
getHexahedronBasis(Intrepid2::EFunctionSpace fs,
int polyOrder_x,
int polyOrder_y,
int polyOrder_z,
const EPointType pointType=POINTTYPE_DEFAULT)
214 case FUNCTION_SPACE_HVOL:
return rcp(
new typename BasisFamily::HVOL_HEX (polyOrder_x,polyOrder_y,polyOrder_z,pointType));
215 case FUNCTION_SPACE_HCURL:
return rcp(
new typename BasisFamily::HCURL_HEX(polyOrder_x,polyOrder_y,polyOrder_z,pointType));
216 case FUNCTION_SPACE_HDIV:
return rcp(
new typename BasisFamily::HDIV_HEX (polyOrder_x,polyOrder_y,polyOrder_z,pointType));
217 case FUNCTION_SPACE_HGRAD:
return rcp(
new typename BasisFamily::HGRAD_HEX(polyOrder_x,polyOrder_y,polyOrder_z,pointType));
219 INTREPID2_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
"Unsupported function space");
228 template<
class BasisFamily>
235 case FUNCTION_SPACE_HVOL:
return rcp(
new typename BasisFamily::HVOL_TET (polyOrder,pointType));
236 case FUNCTION_SPACE_HCURL:
return rcp(
new typename BasisFamily::HCURL_TET(polyOrder,pointType));
237 case FUNCTION_SPACE_HDIV:
return rcp(
new typename BasisFamily::HDIV_TET (polyOrder,pointType));
238 case FUNCTION_SPACE_HGRAD:
return rcp(
new typename BasisFamily::HGRAD_TET(polyOrder,pointType));
240 INTREPID2_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
"Unsupported function space");
249 template<
class BasisFamily>
250 static typename BasisFamily::BasisPtr
getTriangleBasis(Intrepid2::EFunctionSpace fs,
int polyOrder,
const EPointType pointType=POINTTYPE_DEFAULT)
256 case FUNCTION_SPACE_HVOL:
return rcp(
new typename BasisFamily::HVOL_TRI (polyOrder,pointType));
257 case FUNCTION_SPACE_HCURL:
return rcp(
new typename BasisFamily::HCURL_TRI(polyOrder,pointType));
258 case FUNCTION_SPACE_HDIV:
return rcp(
new typename BasisFamily::HDIV_TRI (polyOrder,pointType));
259 case FUNCTION_SPACE_HGRAD:
return rcp(
new typename BasisFamily::HGRAD_TRI(polyOrder,pointType));
261 INTREPID2_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
"Unsupported function space");
274 template<
class BasisFamily>
275 static typename BasisFamily::BasisPtr
getBasis(
const shards::CellTopology &cellTopo, Intrepid2::EFunctionSpace fs,
int polyOrder,
const EPointType pointType = POINTTYPE_DEFAULT)
278 switch (cellTopo.getBaseKey())
280 case shards::Line<>::key:
return getLineBasis<BasisFamily>(fs,polyOrder, pointType);
281 case shards::Quadrilateral<>::key:
return getQuadrilateralBasis<BasisFamily>(fs,polyOrder,pointType);
282 case shards::Triangle<>::key:
return getTriangleBasis<BasisFamily>(fs,polyOrder,pointType);
283 case shards::Hexahedron<>::key:
return getHexahedronBasis<BasisFamily>(fs,polyOrder,pointType);
284 case shards::Tetrahedron<>::key:
return getTetrahedronBasis<BasisFamily>(fs,polyOrder,pointType);
286 INTREPID2_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
"Unsupported cell topology");
EmptyBasisFamily allows us to set a default void family for a given topology.
Implementation of H(div) basis on the hexahedron that is templated on H(vol) and H(grad) on the line...
Implementation of H(vol) basis on the quadrilateral that is templated on H(vol) on the line...
Implementation of H(curl) basis on the quadrilateral that is templated on H(vol) and H(grad) on the l...
static BasisFamily::BasisPtr getLineBasis(Intrepid2::EFunctionSpace fs, int polyOrder, const EPointType pointType=POINTTYPE_DEFAULT)
Factory method for line bases in the given family.
static BasisFamily::BasisPtr getTetrahedronBasis(Intrepid2::EFunctionSpace fs, int polyOrder, const EPointType pointType=POINTTYPE_DEFAULT)
Factory method for isotropic tetrahedron bases in the given family.
static BasisFamily::BasisPtr getBasis(const shards::CellTopology &cellTopo, Intrepid2::EFunctionSpace fs, int polyOrder, const EPointType pointType=POINTTYPE_DEFAULT)
Factory method for isotropic bases in the given family on the specified cell topology.
static BasisFamily::BasisPtr getHexahedronBasis(Intrepid2::EFunctionSpace fs, int polyOrder, const EPointType pointType=POINTTYPE_DEFAULT)
Factory method for isotropic bases on the hexahedron in the given family.
Implementation of H(curl) basis on the hexahedron that is templated on H(vol) and H(grad) on the line...
Implementation of H(grad) basis on the quadrilateral that is templated on H(grad) on the line...
Implementation of H(vol) basis on the hexahedron that is templated on H(vol) on the line...
static BasisFamily::BasisPtr getQuadrilateralBasis(Intrepid2::EFunctionSpace fs, int polyOrder, const EPointType pointType=POINTTYPE_DEFAULT)
Factory method for isotropic quadrilateral bases in the given family.
static BasisFamily::BasisPtr getTriangleBasis(Intrepid2::EFunctionSpace fs, int polyOrder, const EPointType pointType=POINTTYPE_DEFAULT)
Factory method for isotropic triangle bases in the given family.
Implementation of H(vol) basis on the quadrilateral that is templated on H(vol) on the line...
Device DeviceType
(Kokkos) Device type on which Basis is templated. Does not necessarily return true for Kokkos::is_dev...
A family of basis functions, constructed from H(vol) and H(grad) bases on the line.
EPointType
Enumeration of types of point distributions in Intrepid.
Implementation of H(grad) basis on the hexahedron that is templated on H(grad) on the line...
Implementation of H(vol) basis on the quadrilateral that is templated on H(vol) on the line...
Header file for the abstract base class Intrepid2::Basis.