16 #ifndef __INTREPID2_BASIS_HPP__
17 #define __INTREPID2_BASIS_HPP__
19 #include "Intrepid2_ConfigDefs.hpp"
26 #include "Shards_CellTopology.hpp"
28 #include <Teuchos_RCPDecl.hpp>
29 #include <Kokkos_Core.hpp>
35 template<
typename DeviceType = void,
36 typename OutputType = double,
37 typename PointType =
double>
42 template <
typename DeviceType =
void,
typename OutputType =
double,
typename Po
intType =
double>
43 using BasisPtr = Teuchos::RCP<Basis<DeviceType,OutputType,PointType> >;
47 template <
typename OutputType =
double,
typename Po
intType =
double>
48 using HostBasisPtr = BasisPtr<typename Kokkos::HostSpace::device_type, OutputType, PointType>;
86 template<
typename Device,
87 typename outputValueType,
88 typename pointValueType>
157 typedef typename ScalarTraits<pointValueType>::scalar_type
scalarType;
230 template<
typename OrdinalTypeView3D,
231 typename OrdinalTypeView2D,
232 typename OrdinalTypeView1D>
234 OrdinalTypeView2D &ordinalToTag,
235 const OrdinalTypeView1D tags,
236 const ordinal_type basisCard,
237 const ordinal_type tagSize,
238 const ordinal_type posScDim,
239 const ordinal_type posScOrd,
240 const ordinal_type posDfOrd ) {
242 ordinalToTag = OrdinalTypeView2D(
"ordinalToTag", basisCard, tagSize);
245 Kokkos::deep_copy( ordinalToTag, -1 );
248 for (ordinal_type i=0;i<basisCard;++i)
249 for (ordinal_type j=0;j<tagSize;++j)
250 ordinalToTag(i, j) = tags(i*tagSize + j);
254 for (ordinal_type i=0;i<basisCard;++i)
255 if (maxScDim < tags(i*tagSize + posScDim))
256 maxScDim = tags(i*tagSize + posScDim);
260 for (ordinal_type i=0;i<basisCard;++i)
261 if (maxScOrd < tags(i*tagSize + posScOrd))
262 maxScOrd = tags(i*tagSize + posScOrd);
266 for (ordinal_type i=0;i<basisCard;++i)
267 if (maxDfOrd < tags(i*tagSize + posDfOrd))
268 maxDfOrd = tags(i*tagSize + posDfOrd);
272 tagToOrdinal = OrdinalTypeView3D(
"tagToOrdinal", maxScDim, maxScOrd, maxDfOrd);
275 Kokkos::deep_copy( tagToOrdinal, -1 );
278 for (ordinal_type i=0;i<basisCard;++i)
279 tagToOrdinal(tags(i*tagSize), tags(i*tagSize+1), tags(i*tagSize+2)) = i;
321 virtual~
Basis() =
default;
334 using OutputViewType = Kokkos::DynRankView<OutputValueType,Kokkos::LayoutStride,DeviceType>;
338 using PointViewType = Kokkos::DynRankView<PointValueType,Kokkos::LayoutStride,DeviceType>;
342 using ScalarViewType = Kokkos::DynRankView<scalarType,Kokkos::LayoutStride,DeviceType>;
348 Kokkos::DynRankView<OutputValueType,DeviceType>
allocateOutputView(
const int numPoints,
const EOperator operatorType = OPERATOR_VALUE)
const;
357 const bool operatorIsDk = (operatorType >= OPERATOR_D1) && (operatorType <= OPERATOR_D10);
358 const bool operatorSupported = (operatorType == OPERATOR_VALUE) || (operatorType == OPERATOR_GRAD) || (operatorType == OPERATOR_CURL) || (operatorType == OPERATOR_DIV) || operatorIsDk;
359 INTREPID2_TEST_FOR_EXCEPTION(!operatorSupported, std::invalid_argument,
"operator is not supported by allocateBasisValues");
368 bool useVectorData = (rank(dataView) == 3);
396 ordinal_type& perThreadSpaceSize,
398 const EOperator operatorType = OPERATOR_VALUE)
const {
400 ">>> ERROR (Basis::getValuesScratchSpace): this method is not supported or should be overridden accordingly by derived classes.");
424 KOKKOS_INLINE_FUNCTION
429 const typename Kokkos::TeamPolicy<ExecutionSpace>::member_type& teamMember,
430 const typename ExecutionSpace::scratch_memory_space &scratchStorage,
431 const ordinal_type subcellDim=-1,
432 const ordinal_type subcellOrdinal=-1)
const {
434 ">>> ERROR (Basis::getValues): this method is not supported or should be overridden accordingly by derived classes.");
461 const EOperator = OPERATOR_VALUE )
const {
462 INTREPID2_TEST_FOR_EXCEPTION(
true, std::logic_error,
463 ">>> ERROR (Basis::getValues): this method (FEM) is not supported or should be overridden accordingly by derived classes.");
470 const EOperator operatorType = OPERATOR_VALUE
490 const EOperator operatorType = OPERATOR_VALUE )
const {
496 if (outputValues.numTensorDataFamilies() > 0)
498 INTREPID2_TEST_FOR_EXCEPTION(outputValues.
tensorData(0).numTensorComponents() != 1, std::invalid_argument,
"default implementation of getValues() only supports outputValues with trivial tensor-product structure");
499 outputData = outputValues.
tensorData().getTensorComponent(0);
503 INTREPID2_TEST_FOR_EXCEPTION(outputValues.
vectorData().numComponents() != 1, std::invalid_argument,
"default implementation of getValues() only supports outputValues with trivial tensor-product structure");
504 INTREPID2_TEST_FOR_EXCEPTION(outputValues.
vectorData().getComponent(0).numTensorComponents() != 1, std::invalid_argument,
"default implementation of getValues() only supports outputValues with trivial tensor-product structure");
505 outputData = outputValues.
vectorData().getComponent(0).getTensorComponent(0);
535 const EOperator = OPERATOR_VALUE )
const {
536 INTREPID2_TEST_FOR_EXCEPTION(
true, std::logic_error,
537 ">>> ERROR (Basis::getValues): this method (FVM) is not supported or should be overridden accordingly by derived classes.");
547 INTREPID2_TEST_FOR_EXCEPTION(
true, std::logic_error,
548 ">>> ERROR (Basis::getDofCoords): this method is not supported or should be overridden accordingly by derived classes.");
562 INTREPID2_TEST_FOR_EXCEPTION(
true, std::logic_error,
563 ">>> ERROR (Basis::getDofCoeffs): this method is not supported or should be overridden accordingly by derived classes.");
575 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
576 ">>> ERROR (Basis::getFieldOrdinalsForDegree): this method is not supported for non-hierarchical bases.");
578 int requestedDegreeLength = degrees.extent_int(0);
579 INTREPID2_TEST_FOR_EXCEPTION(degreeEntryLength != requestedDegreeLength, std::invalid_argument,
"length of degrees does not match the entries in fieldOrdinalPolynomialDegree_");
580 std::vector<int> fieldOrdinalsVector;
584 for (
int d=0; d<degreeEntryLength; d++)
588 if (matches) fieldOrdinalsVector.push_back(basisOrdinal);
591 for (
unsigned i=0; i<fieldOrdinalsVector.size(); i++)
593 fieldOrdinals(i) = fieldOrdinalsVector[i];
595 return fieldOrdinals;
607 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
608 ">>> ERROR (Basis::getFieldOrdinalsForDegree): this method is not supported for non-hierarchical bases.");
610 int requestedDegreeLength = degrees.extent_int(0);
611 INTREPID2_TEST_FOR_EXCEPTION(degreeEntryLength != requestedDegreeLength, std::invalid_argument,
"length of degrees does not match the entries in fieldOrdinalPolynomialDegree_");
612 std::vector<int> fieldOrdinalsVector;
616 for (
int d=0; d<degreeEntryLength; d++)
620 if (matches) fieldOrdinalsVector.push_back(basisOrdinal);
623 for (
unsigned i=0; i<fieldOrdinalsVector.size(); i++)
625 fieldOrdinals(i) = fieldOrdinalsVector[i];
627 return fieldOrdinals;
643 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
644 ">>> ERROR (Basis::getFieldOrdinalsForDegree): this method is not supported for non-hierarchical bases.");
646 for (
unsigned d=0; d<degrees.size(); d++)
648 degreesView(d) = degrees[d];
651 std::vector<int> fieldOrdinalsVector(fieldOrdinalsView.extent_int(0));
652 for (
int i=0; i<fieldOrdinalsView.extent_int(0); i++)
654 fieldOrdinalsVector[i] = fieldOrdinalsView(i);
656 return fieldOrdinalsVector;
671 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
672 ">>> ERROR (Basis::getFieldOrdinalsForDegree): this method is not supported for non-hierarchical bases.");
674 for (
unsigned d=0; d<degrees.size(); d++)
676 degreesView(d) = degrees[d];
679 std::vector<int> fieldOrdinalsVector(fieldOrdinalsView.extent_int(0));
680 for (
int i=0; i<fieldOrdinalsView.extent_int(0); i++)
682 fieldOrdinalsVector[i] = fieldOrdinalsView(i);
684 return fieldOrdinalsVector;
695 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
696 ">>> ERROR (Basis::getPolynomialDegreeOfField): this method is not supported for non-hierarchical bases.");
697 INTREPID2_TEST_FOR_EXCEPTION(fieldOrdinal < 0, std::invalid_argument,
"field ordinal must be non-negative");
698 INTREPID2_TEST_FOR_EXCEPTION(fieldOrdinal >=
fieldOrdinalPolynomialDegree_.extent_int(0), std::invalid_argument,
"field ordinal out of bounds");
702 for (
int d=0; d<polyDegreeLength; d++)
717 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
718 ">>> ERROR (Basis::getPolynomialDegreeOfField): this method is not supported for non-hierarchical bases.");
719 INTREPID2_TEST_FOR_EXCEPTION(fieldOrdinal < 0, std::invalid_argument,
"field ordinal must be non-negative");
724 for (
int d=0; d<polyDegreeLength; d++)
740 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
741 ">>> ERROR (Basis::getPolynomialDegreeOfFieldAsVector): this method is not supported for non-hierarchical bases.");
743 std::vector<int> polynomialDegree(polynomialDegreeView.extent_int(0));
745 for (
unsigned d=0; d<polynomialDegree.size(); d++)
747 polynomialDegree[d] = polynomialDegreeView(d);
749 return polynomialDegree;
761 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
762 ">>> ERROR (Basis::getPolynomialDegreeOfFieldAsVector): this method is not supported for non-hierarchical bases.");
764 std::vector<int> polynomialDegree(polynomialDegreeView.extent_int(0));
766 for (
unsigned d=0; d<polynomialDegree.size(); d++)
768 polynomialDegree[d] = polynomialDegreeView(d);
770 return polynomialDegree;
777 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
778 ">>> ERROR (Basis::getPolynomialDegreeLength): this method is not supported for non-hierarchical bases.");
789 return "Intrepid2_Basis";
867 const ordinal_type subcOrd )
const {
868 if ( subcDim >= 0 && subcDim < static_cast<ordinal_type>(
tagToOrdinal_.extent(0)) &&
869 subcOrd >= 0 && subcOrd < static_cast<ordinal_type>(
tagToOrdinal_.extent(1)) )
872 if (firstDofOrdinal == -1)
return static_cast<ordinal_type
>(0);
874 return static_cast<ordinal_type
>(this->
getDofTag(firstDofOrdinal)[3]);
879 return static_cast<ordinal_type
>(0);
893 const ordinal_type subcOrd,
894 const ordinal_type subcDofOrd )
const {
896 #ifdef HAVE_INTREPID2_DEBUG
897 INTREPID2_TEST_FOR_EXCEPTION( subcDim < 0 || subcDim >= static_cast<ordinal_type>(
tagToOrdinal_.extent(0)), std::out_of_range,
898 ">>> ERROR (Basis::getDofOrdinal): subcDim is out of range");
899 INTREPID2_TEST_FOR_EXCEPTION( subcOrd < 0 || subcOrd >= static_cast<ordinal_type>(
tagToOrdinal_.extent(1)), std::out_of_range,
900 ">>> ERROR (Basis::getDofOrdinal): subcOrd is out of range");
901 INTREPID2_TEST_FOR_EXCEPTION( subcDofOrd < 0 || subcDofOrd >= static_cast<ordinal_type>(
tagToOrdinal_.extent(2)), std::out_of_range,
902 ">>> ERROR (Basis::getDofOrdinal): subcDofOrd is out of range");
904 ordinal_type r_val = -1;
905 if ( subcDim < static_cast<ordinal_type>(
tagToOrdinal_.extent(0)) &&
906 subcOrd < static_cast<ordinal_type>(
tagToOrdinal_.extent(1)) &&
907 subcDofOrd < static_cast<ordinal_type>(
tagToOrdinal_.extent(2)) )
909 #ifdef HAVE_INTREPID2_DEBUG
910 INTREPID2_TEST_FOR_EXCEPTION( r_val == -1, std::runtime_error,
911 ">>> ERROR (Basis::getDofOrdinal): Invalid DoF tag is found.");
942 #ifdef HAVE_INTREPID2_DEBUG
943 INTREPID2_TEST_FOR_EXCEPTION( dofOrd < 0 || dofOrd >= static_cast<ordinal_type>(
ordinalToTag_.extent(0)), std::out_of_range,
944 ">>> ERROR (Basis::getDofTag): dofOrd is out of range");
946 return Kokkos::subview(
ordinalToTag_, dofOrd, Kokkos::ALL());
977 virtual BasisPtr<DeviceType, OutputValueType, PointValueType>
979 INTREPID2_TEST_FOR_EXCEPTION(
true, std::logic_error,
980 ">>> ERROR (Basis::getSubCellRefBasis): this method is not supported or should be overridden accordingly by derived classes.");
996 virtual HostBasisPtr<OutputValueType, PointValueType>
998 INTREPID2_TEST_FOR_EXCEPTION(
true, std::logic_error,
999 ">>> ERROR (Basis::getHostBasis): this method is not supported or should be overridden accordingly by derived classes.");
1026 KOKKOS_INLINE_FUNCTION
1027 ordinal_type getFieldRank(
const EFunctionSpace spaceType);
1064 KOKKOS_INLINE_FUNCTION
1065 ordinal_type getOperatorRank(
const EFunctionSpace spaceType,
1066 const EOperator operatorType,
1067 const ordinal_type spaceDim);
1074 KOKKOS_INLINE_FUNCTION
1075 ordinal_type getOperatorOrder(
const EOperator operatorType);
1077 template<EOperator operatorType>
1078 KOKKOS_INLINE_FUNCTION
1079 constexpr ordinal_type getOperatorOrder();
1104 template<ordinal_type spaceDim>
1105 KOKKOS_INLINE_FUNCTION
1106 ordinal_type getDkEnumeration(
const ordinal_type xMult,
1107 const ordinal_type yMult = -1,
1108 const ordinal_type zMult = -1);
1121 template<ordinal_type spaceDim>
1122 KOKKOS_INLINE_FUNCTION
1123 ordinal_type getPnEnumeration(
const ordinal_type p,
1124 const ordinal_type q = 0,
1125 const ordinal_type r = 0);
1147 template<
typename value_type>
1148 KOKKOS_INLINE_FUNCTION
1149 void getJacobyRecurrenceCoeffs (
1153 const ordinal_type alpha,
1154 const ordinal_type beta ,
1155 const ordinal_type n);
1194 KOKKOS_INLINE_FUNCTION
1195 ordinal_type getDkCardinality(
const EOperator operatorType,
1196 const ordinal_type spaceDim);
1198 template<EOperator operatorType, ordinal_type spaceDim>
1199 KOKKOS_INLINE_FUNCTION
1200 constexpr ordinal_type getDkCardinality();
1213 template<ordinal_type spaceDim>
1214 KOKKOS_INLINE_FUNCTION
1215 ordinal_type getPnCardinality (ordinal_type n);
1217 template<ordinal_type spaceDim, ordinal_type n>
1218 KOKKOS_INLINE_FUNCTION
1219 constexpr ordinal_type getPnCardinality ();
1238 template<
typename outputValueViewType,
1239 typename inputPointViewType>
1240 void getValues_HGRAD_Args(
const outputValueViewType outputValues,
1241 const inputPointViewType inputPoints,
1242 const EOperator operatorType,
1243 const shards::CellTopology cellTopo,
1244 const ordinal_type basisCard );
1256 template<
typename outputValueViewType,
1257 typename inputPointViewType>
1258 void getValues_HCURL_Args(
const outputValueViewType outputValues,
1259 const inputPointViewType inputPoints,
1260 const EOperator operatorType,
1261 const shards::CellTopology cellTopo,
1262 const ordinal_type basisCard );
1274 template<
typename outputValueViewType,
1275 typename inputPointViewType>
1276 void getValues_HDIV_Args(
const outputValueViewType outputValues,
1277 const inputPointViewType inputPoints,
1278 const EOperator operatorType,
1279 const shards::CellTopology cellTopo,
1280 const ordinal_type basisCard );
1292 template<
typename outputValueViewType,
1293 typename inputPointViewType>
1294 void getValues_HVOL_Args(
const outputValueViewType outputValues,
1295 const inputPointViewType inputPoints,
1296 const EOperator operatorType,
1297 const shards::CellTopology cellTopo,
1298 const ordinal_type basisCard );
ordinal_type getDomainDimension() const
Returns the spatial dimension of the domain of the basis; this is equal to getBaseCellTopology().getDimension() + getNumTensorialExtrusions().
Kokkos::View< ordinal_type *, typename ExecutionSpace::array_layout, Kokkos::HostSpace > OrdinalTypeArray1DHost
View type for 1d host array.
std::vector< int > getFieldOrdinalsForH1Degree(std::vector< int > °rees) const
For hierarchical bases, returns the field ordinals that have at most the specified H^1 degree in each...
const OrdinalTypeArrayStride1DHost getDofTag(const ordinal_type dofOrd) const
DoF ordinal to DoF tag lookup.
std::vector< int > getFieldOrdinalsForDegree(std::vector< int > °rees) const
For hierarchical bases, returns the field ordinals that have at most the specified degree in each dim...
ordinal_type getCardinality() const
Returns cardinality of the basis.
virtual void getValues(const ExecutionSpace &, OutputViewType, const PointViewType, const EOperator=OPERATOR_VALUE) const
Evaluation of a FEM basis on a reference cell.
unsigned basisCellTopologyKey_
Identifier of the base topology of the cells for which the basis is defined. See the Shards package f...
ScalarTraits< pointValueType >::scalar_type scalarType
Scalar type for point values.
EBasis basisType_
Type of the basis.
View-like interface to tensor points; point components are stored separately; the appropriate coordin...
std::vector< int > getH1PolynomialDegreeOfFieldAsVector(int fieldOrdinal) const
For hierarchical bases, returns the polynomial degree (which may have multiple values in higher spati...
OrdinalTypeArray1DHost getFieldOrdinalsForH1Degree(OrdinalTypeArray1DHost °rees) const
For hierarchical bases, returns the field ordinals that have at most the specified H^1 degree in each...
ECoordinates getCoordinateSystem() const
Returns the type of coordinate system for which the basis is defined.
#define INTREPID2_TEST_FOR_EXCEPTION_DEVICE_SAFE(test, x, msg)
OrdinalTypeArray1DHost getFieldOrdinalsForDegree(OrdinalTypeArray1DHost °rees) const
For hierarchical bases, returns the field ordinals that have at most the specified degree in each dim...
Kokkos::View< ordinal_type *, DeviceType > OrdinalTypeArray1D
View type for 1d device array.
outputValueType OutputValueType
Output value type for basis; default is double.
Kokkos::DynRankView< OutputValueType, DeviceType > allocateOutputView(const int numPoints, const EOperator operatorType=OPERATOR_VALUE) const
Allocate a View container suitable for passing to the getValues() variant that accepts Kokkos DynRank...
virtual void getValues(BasisValues< OutputValueType, DeviceType > outputValues, const TensorPoints< PointValueType, DeviceType > inputPoints, const EOperator operatorType=OPERATOR_VALUE) const
Evaluation of a FEM basis on a reference cell, using point and output value containers that allow pre...
An abstract base class that defines interface for concrete basis implementations for Finite Element (...
View-like interface to tensor points; point components are stored separately; the appropriate coordin...
shards::CellTopology getBaseCellTopology() const
Returns the base cell topology for which the basis is defined. See Shards documentation https://trili...
ordinal_type getDofOrdinal(const ordinal_type subcDim, const ordinal_type subcOrd, const ordinal_type subcDofOrd) const
DoF tag to ordinal lookup.
Device DeviceType
(Kokkos) Device type on which Basis is templated. Does not necessarily return true for Kokkos::is_dev...
Kokkos::DynRankView< scalarType, Kokkos::LayoutStride, DeviceType > ScalarViewType
View type for scalars.
const VectorDataType & vectorData() const
VectorData accessor.
KOKKOS_INLINE_FUNCTION enable_if_t< rank==1, const Kokkos::View< typename RankExpander< DataScalar, rank >::value_type, DeviceType > & > getUnderlyingView() const
Returns the underlying view. Throws an exception if the underlying view is not rank 1...
virtual BasisPtr< DeviceType, OutputValueType, PointValueType > getSubCellRefBasis(const ordinal_type subCellDim, const ordinal_type subCellOrd) const
returns the basis associated to a subCell.
EFunctionSpace functionSpace_
The function space in which the basis is defined.
const OrdinalTypeArray2DHost getAllDofTags() const
Retrieves all DoF tags.
ordinal_type basisDegree_
Degree of the largest complete polynomial space that can be represented by the basis.
virtual KOKKOS_INLINE_FUNCTION void getValues(OutputViewType, const PointViewType, const EOperator, const typename Kokkos::TeamPolicy< ExecutionSpace >::member_type &teamMember, const typename ExecutionSpace::scratch_memory_space &scratchStorage, const ordinal_type subcellDim=-1, const ordinal_type subcellOrdinal=-1) const
Team-level evaluation of basis functions on a reference cell.
Header function for Intrepid2::Util class and other utility functions.
ScalarView< PointScalar, DeviceType > allocateAndFillExpandedRawPointView() const
This method is for compatibility with existing methods that take raw point views. Note that in genera...
Kokkos::View< ordinal_type *, Kokkos::LayoutStride, DeviceType > OrdinalTypeArrayStride1D
View type for 1d device array.
TensorDataType & tensorData()
TensorData accessor for single-family scalar data.
const OrdinalTypeArray3DHost getAllDofOrdinal() const
DoF tag to ordinal data structure.
virtual bool requireOrientation() const
True if orientation is required.
Kokkos::View< ordinal_type **, DeviceType > OrdinalTypeArray2D
View type for 2d device array.
Header file for the classes: Intrepid2::RefSubcellParametrization, Intrepid2::RefCellNodes, Intrepid2::RefCellCenter.
virtual HostBasisPtr< OutputValueType, PointValueType > getHostBasis() const
Creates and returns a Basis object whose DeviceType template argument is Kokkos::HostSpace::device_ty...
std::vector< int > getPolynomialDegreeOfFieldAsVector(int fieldOrdinal) const
For hierarchical bases, returns the polynomial degree (which may have multiple values in higher spati...
Kokkos::View< ordinal_type **, typename ExecutionSpace::array_layout, Kokkos::HostSpace > OrdinalTypeArray2DHost
View type for 2d host array.
virtual void getScratchSpaceSize(ordinal_type &perTeamSpaceSize, ordinal_type &perThreadSpaceSize, const PointViewType inputPoints, const EOperator operatorType=OPERATOR_VALUE) const
Return the size of the scratch space, in bytes, needed for using the team-level implementation of get...
The data containers in Intrepid2 that support sum factorization and other reduced-data optimizations ...
Kokkos::DynRankView< OutputValueType, Kokkos::LayoutStride, DeviceType > OutputViewType
View type for basis value output.
Kokkos::View< ECoordinates, DeviceType > ECoordinatesViewType
View for coordinate system type.
virtual void getValues(OutputViewType outputValues, const PointViewType inputPoints, const EOperator operatorType=OPERATOR_VALUE) const
EBasis getBasisType() const
Returns the basis type.
Contains definitions of custom data types in Intrepid2.
ordinal_type basisCardinality_
Cardinality of the basis, i.e., the number of basis functions/degrees-of-freedom. ...
virtual void getDofCoords(ScalarViewType) const
Returns spatial locations (coordinates) of degrees of freedom on the reference cell.
Kokkos::View< ordinal_type *, Kokkos::LayoutStride, Kokkos::HostSpace > OrdinalTypeArrayStride1DHost
View type for 1d host array.
EFunctionSpace getFunctionSpace() const
Returns the function space for the basis.
virtual int getNumTensorialExtrusions() const
returns the number of tensorial extrusions relative to the cell topology returned by getBaseCellTopol...
virtual void getValues(OutputViewType, const PointViewType, const PointViewType, const EOperator=OPERATOR_VALUE) const
Evaluation of an FVD basis evaluation on a physical cell.
OrdinalTypeArray3DHost tagToOrdinal_
DoF tag to ordinal lookup table.
Kokkos::View< ordinal_type ***, typename ExecutionSpace::array_layout, Kokkos::HostSpace > OrdinalTypeArray3DHost
View type for 3d host array.
Kokkos::View< ordinal_type ***, DeviceType > OrdinalTypeArray3D
View type for 3d device array.
OutputValueType getDummyOutputValue()
Dummy array to receive input arguments.
OrdinalTypeArray2DHost ordinalToTag_
"true" if tagToOrdinal_ and ordinalToTag_ have been initialized
ordinal_type getDegree() const
Returns the degree of the basis.
pointValueType PointValueType
Point value type for basis; default is double.
ECoordinates basisCoordinates_
The coordinate system for which the basis is defined.
Kokkos::DynRankView< scalarType, DeviceType > dofCoeffs_
Coefficients for computing degrees of freedom for Lagrangian basis If P is an element of the space sp...
PointValueType getDummyPointValue()
Dummy array to receive input arguments.
View-like interface to tensor data; tensor components are stored separately and multiplied together a...
virtual BasisValues< OutputValueType, DeviceType > allocateBasisValues(TensorPoints< PointValueType, DeviceType > points, const EOperator operatorType=OPERATOR_VALUE) const
Allocate BasisValues container suitable for passing to the getValues() variant that takes a TensorPoi...
Implementation file for the abstract base class Intrepid2::Basis.
Kokkos::View< EBasis, DeviceType > EBasisViewType
View for basis type.
ordinal_type getDofCount(const ordinal_type subcDim, const ordinal_type subcOrd) const
DoF count for specified subcell.
OrdinalTypeArray2DHost fieldOrdinalH1PolynomialDegree_
H^1 polynomial degree for each degree of freedom. Only defined for hierarchical bases right now...
OrdinalTypeArray2DHost fieldOrdinalPolynomialDegree_
Polynomial degree for each degree of freedom. Only defined for hierarchical bases right now...
void setOrdinalTagData(OrdinalTypeView3D &tagToOrdinal, OrdinalTypeView2D &ordinalToTag, const OrdinalTypeView1D tags, const ordinal_type basisCard, const ordinal_type tagSize, const ordinal_type posScDim, const ordinal_type posScOrd, const ordinal_type posDfOrd)
Fills ordinalToTag_ and tagToOrdinal_ by basis-specific tag data.
Kokkos::DynRankView< scalarType, DeviceType > dofCoords_
Coordinates of degrees-of-freedom for basis functions defined in physical space.
Kokkos::DynRankView< PointValueType, Kokkos::LayoutStride, DeviceType > PointViewType
View type for input points.
OrdinalTypeArray1DHost getPolynomialDegreeOfField(int fieldOrdinal) const
For hierarchical bases, returns the polynomial degree (which may have multiple values in higher spati...
virtual void getDofCoeffs(ScalarViewType) const
Coefficients for computing degrees of freedom for Lagrangian basis If P is an element of the space sp...
Header file for the data-wrapper class Intrepid2::BasisValues.
int getPolynomialDegreeLength() const
For hierarchical bases, returns the number of entries required to specify the polynomial degree of a ...
OrdinalTypeArray1DHost getH1PolynomialDegreeOfField(int fieldOrdinal) const
For hierarchical bases, returns the polynomial degree (which may have multiple values in higher spati...
Reference-space field values for a basis, designed to support typical vector-valued bases...
virtual const char * getName() const
Returns basis name.
Kokkos::View< ordinal_type, DeviceType > OrdinalViewType
View type for ordinal.
KOKKOS_INLINE_FUNCTION std::enable_if< std::is_integral< iType >::value, int >::type extent_int(const iType &r) const
Returns the logical extent in the requested dimension.
typename DeviceType::execution_space ExecutionSpace
(Kokkos) Execution space for basis.