50 #ifndef __INTREPID2_BASIS_HPP__
51 #define __INTREPID2_BASIS_HPP__
53 #include "Intrepid2_ConfigDefs.hpp"
60 #include "Shards_CellTopology.hpp"
61 #include <Teuchos_RCPDecl.hpp>
62 #include <Kokkos_Core.hpp>
68 template<
typename DeviceType = void,
69 typename OutputType = double,
70 typename PointType =
double>
75 template <
typename DeviceType =
void,
typename OutputType =
double,
typename Po
intType =
double>
76 using BasisPtr = Teuchos::RCP<Basis<DeviceType,OutputType,PointType> >;
80 template <
typename OutputType =
double,
typename Po
intType =
double>
81 using HostBasisPtr = BasisPtr<typename Kokkos::HostSpace::device_type, OutputType, PointType>;
119 template<
typename Device,
120 typename outputValueType,
121 typename pointValueType>
190 typedef typename ScalarTraits<pointValueType>::scalar_type
scalarType;
263 template<
typename OrdinalTypeView3D,
264 typename OrdinalTypeView2D,
265 typename OrdinalTypeView1D>
267 OrdinalTypeView2D &ordinalToTag,
268 const OrdinalTypeView1D tags,
269 const ordinal_type basisCard,
270 const ordinal_type tagSize,
271 const ordinal_type posScDim,
272 const ordinal_type posScOrd,
273 const ordinal_type posDfOrd ) {
275 ordinalToTag = OrdinalTypeView2D(
"ordinalToTag", basisCard, tagSize);
278 Kokkos::deep_copy( ordinalToTag, -1 );
281 for (ordinal_type i=0;i<basisCard;++i)
282 for (ordinal_type j=0;j<tagSize;++j)
283 ordinalToTag(i, j) = tags(i*tagSize + j);
287 for (ordinal_type i=0;i<basisCard;++i)
288 if (maxScDim < tags(i*tagSize + posScDim))
289 maxScDim = tags(i*tagSize + posScDim);
293 for (ordinal_type i=0;i<basisCard;++i)
294 if (maxScOrd < tags(i*tagSize + posScOrd))
295 maxScOrd = tags(i*tagSize + posScOrd);
299 for (ordinal_type i=0;i<basisCard;++i)
300 if (maxDfOrd < tags(i*tagSize + posDfOrd))
301 maxDfOrd = tags(i*tagSize + posDfOrd);
305 tagToOrdinal = OrdinalTypeView3D(
"tagToOrdinal", maxScDim, maxScOrd, maxDfOrd);
308 Kokkos::deep_copy( tagToOrdinal, -1 );
311 for (ordinal_type i=0;i<basisCard;++i)
312 tagToOrdinal(tags(i*tagSize), tags(i*tagSize+1), tags(i*tagSize+2)) = i;
354 virtual~
Basis() =
default;
367 using OutputViewType = Kokkos::DynRankView<OutputValueType,Kokkos::LayoutStride,DeviceType>;
371 using PointViewType = Kokkos::DynRankView<PointValueType,Kokkos::LayoutStride,DeviceType>;
375 using ScalarViewType = Kokkos::DynRankView<scalarType,Kokkos::LayoutStride,DeviceType>;
381 Kokkos::DynRankView<OutputValueType,DeviceType>
allocateOutputView(
const int numPoints,
const EOperator operatorType = OPERATOR_VALUE)
const;
390 const bool operatorIsDk = (operatorType >= OPERATOR_D1) && (operatorType <= OPERATOR_D10);
391 const bool operatorSupported = (operatorType == OPERATOR_VALUE) || (operatorType == OPERATOR_GRAD) || (operatorType == OPERATOR_CURL) || (operatorType == OPERATOR_DIV) || operatorIsDk;
392 INTREPID2_TEST_FOR_EXCEPTION(!operatorSupported, std::invalid_argument,
"operator is not supported by allocateBasisValues");
401 bool useVectorData = (rank(dataView) == 3);
439 const EOperator = OPERATOR_VALUE )
const {
440 INTREPID2_TEST_FOR_EXCEPTION(
true, std::logic_error,
441 ">>> ERROR (Basis::getValues): this method (FEM) is not supported or should be overridden accordingly by derived classes.");
448 const EOperator operatorType = OPERATOR_VALUE
468 const EOperator operatorType = OPERATOR_VALUE )
const {
474 if (outputValues.numTensorDataFamilies() > 0)
476 INTREPID2_TEST_FOR_EXCEPTION(outputValues.
tensorData(0).numTensorComponents() != 1, std::invalid_argument,
"default implementation of getValues() only supports outputValues with trivial tensor-product structure");
477 outputData = outputValues.
tensorData().getTensorComponent(0);
481 INTREPID2_TEST_FOR_EXCEPTION(outputValues.
vectorData().numComponents() != 1, std::invalid_argument,
"default implementation of getValues() only supports outputValues with trivial tensor-product structure");
482 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");
483 outputData = outputValues.
vectorData().getComponent(0).getTensorComponent(0);
513 const EOperator = OPERATOR_VALUE )
const {
514 INTREPID2_TEST_FOR_EXCEPTION(
true, std::logic_error,
515 ">>> ERROR (Basis::getValues): this method (FVM) is not supported or should be overridden accordingly by derived classes.");
525 INTREPID2_TEST_FOR_EXCEPTION(
true, std::logic_error,
526 ">>> ERROR (Basis::getDofCoords): this method is not supported or should be overridden accordingly by derived classes.");
540 INTREPID2_TEST_FOR_EXCEPTION(
true, std::logic_error,
541 ">>> ERROR (Basis::getDofCoeffs): this method is not supported or should be overridden accordingly by derived classes.");
553 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
554 ">>> ERROR (Basis::getFieldOrdinalsForDegree): this method is not supported for non-hierarchical bases.");
556 int requestedDegreeLength = degrees.extent_int(0);
557 INTREPID2_TEST_FOR_EXCEPTION(degreeEntryLength != requestedDegreeLength, std::invalid_argument,
"length of degrees does not match the entries in fieldOrdinalPolynomialDegree_");
558 std::vector<int> fieldOrdinalsVector;
562 for (
int d=0; d<degreeEntryLength; d++)
566 if (matches) fieldOrdinalsVector.push_back(basisOrdinal);
569 for (
unsigned i=0; i<fieldOrdinalsVector.size(); i++)
571 fieldOrdinals(i) = fieldOrdinalsVector[i];
573 return fieldOrdinals;
585 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
586 ">>> ERROR (Basis::getFieldOrdinalsForDegree): this method is not supported for non-hierarchical bases.");
588 int requestedDegreeLength = degrees.extent_int(0);
589 INTREPID2_TEST_FOR_EXCEPTION(degreeEntryLength != requestedDegreeLength, std::invalid_argument,
"length of degrees does not match the entries in fieldOrdinalPolynomialDegree_");
590 std::vector<int> fieldOrdinalsVector;
594 for (
int d=0; d<degreeEntryLength; d++)
598 if (matches) fieldOrdinalsVector.push_back(basisOrdinal);
601 for (
unsigned i=0; i<fieldOrdinalsVector.size(); i++)
603 fieldOrdinals(i) = fieldOrdinalsVector[i];
605 return fieldOrdinals;
621 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
622 ">>> ERROR (Basis::getFieldOrdinalsForDegree): this method is not supported for non-hierarchical bases.");
624 for (
unsigned d=0; d<degrees.size(); d++)
626 degreesView(d) = degrees[d];
629 std::vector<int> fieldOrdinalsVector(fieldOrdinalsView.extent_int(0));
630 for (
int i=0; i<fieldOrdinalsView.extent_int(0); i++)
632 fieldOrdinalsVector[i] = fieldOrdinalsView(i);
634 return fieldOrdinalsVector;
649 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
650 ">>> ERROR (Basis::getFieldOrdinalsForDegree): this method is not supported for non-hierarchical bases.");
652 for (
unsigned d=0; d<degrees.size(); d++)
654 degreesView(d) = degrees[d];
657 std::vector<int> fieldOrdinalsVector(fieldOrdinalsView.extent_int(0));
658 for (
int i=0; i<fieldOrdinalsView.extent_int(0); i++)
660 fieldOrdinalsVector[i] = fieldOrdinalsView(i);
662 return fieldOrdinalsVector;
673 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
674 ">>> ERROR (Basis::getPolynomialDegreeOfField): this method is not supported for non-hierarchical bases.");
675 INTREPID2_TEST_FOR_EXCEPTION(fieldOrdinal < 0, std::invalid_argument,
"field ordinal must be non-negative");
676 INTREPID2_TEST_FOR_EXCEPTION(fieldOrdinal >=
fieldOrdinalPolynomialDegree_.extent_int(0), std::invalid_argument,
"field ordinal out of bounds");
680 for (
int d=0; d<polyDegreeLength; d++)
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");
702 for (
int d=0; d<polyDegreeLength; d++)
718 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
719 ">>> ERROR (Basis::getPolynomialDegreeOfFieldAsVector): this method is not supported for non-hierarchical bases.");
721 std::vector<int> polynomialDegree(polynomialDegreeView.extent_int(0));
723 for (
unsigned d=0; d<polynomialDegree.size(); d++)
725 polynomialDegree[d] = polynomialDegreeView(d);
727 return polynomialDegree;
739 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
740 ">>> ERROR (Basis::getPolynomialDegreeOfFieldAsVector): this method is not supported for non-hierarchical bases.");
742 std::vector<int> polynomialDegree(polynomialDegreeView.extent_int(0));
744 for (
unsigned d=0; d<polynomialDegree.size(); d++)
746 polynomialDegree[d] = polynomialDegreeView(d);
748 return polynomialDegree;
755 INTREPID2_TEST_FOR_EXCEPTION(
basisType_ != BASIS_FEM_HIERARCHICAL, std::logic_error,
756 ">>> ERROR (Basis::getPolynomialDegreeLength): this method is not supported for non-hierarchical bases.");
767 return "Intrepid2_Basis";
845 const ordinal_type subcOrd )
const {
846 if ( subcDim >= 0 && subcDim < static_cast<ordinal_type>(
tagToOrdinal_.extent(0)) &&
847 subcOrd >= 0 && subcOrd < static_cast<ordinal_type>(
tagToOrdinal_.extent(1)) )
850 if (firstDofOrdinal == -1)
return static_cast<ordinal_type
>(0);
852 return static_cast<ordinal_type
>(this->
getDofTag(firstDofOrdinal)[3]);
857 return static_cast<ordinal_type
>(0);
871 const ordinal_type subcOrd,
872 const ordinal_type subcDofOrd )
const {
874 #ifdef HAVE_INTREPID2_DEBUG
875 INTREPID2_TEST_FOR_EXCEPTION( subcDim < 0 || subcDim >= static_cast<ordinal_type>(
tagToOrdinal_.extent(0)), std::out_of_range,
876 ">>> ERROR (Basis::getDofOrdinal): subcDim is out of range");
877 INTREPID2_TEST_FOR_EXCEPTION( subcOrd < 0 || subcOrd >= static_cast<ordinal_type>(
tagToOrdinal_.extent(1)), std::out_of_range,
878 ">>> ERROR (Basis::getDofOrdinal): subcOrd is out of range");
879 INTREPID2_TEST_FOR_EXCEPTION( subcDofOrd < 0 || subcDofOrd >= static_cast<ordinal_type>(
tagToOrdinal_.extent(2)), std::out_of_range,
880 ">>> ERROR (Basis::getDofOrdinal): subcDofOrd is out of range");
882 ordinal_type r_val = -1;
883 if ( subcDim < static_cast<ordinal_type>(
tagToOrdinal_.extent(0)) &&
884 subcOrd < static_cast<ordinal_type>(
tagToOrdinal_.extent(1)) &&
885 subcDofOrd < static_cast<ordinal_type>(
tagToOrdinal_.extent(2)) )
887 #ifdef HAVE_INTREPID2_DEBUG
888 INTREPID2_TEST_FOR_EXCEPTION( r_val == -1, std::runtime_error,
889 ">>> ERROR (Basis::getDofOrdinal): Invalid DoF tag is found.");
920 #ifdef HAVE_INTREPID2_DEBUG
921 INTREPID2_TEST_FOR_EXCEPTION( dofOrd < 0 || dofOrd >= static_cast<ordinal_type>(
ordinalToTag_.extent(0)), std::out_of_range,
922 ">>> ERROR (Basis::getDofTag): dofOrd is out of range");
924 return Kokkos::subview(
ordinalToTag_, dofOrd, Kokkos::ALL());
955 virtual BasisPtr<DeviceType, OutputValueType, PointValueType>
957 INTREPID2_TEST_FOR_EXCEPTION(
true, std::logic_error,
958 ">>> ERROR (Basis::getSubCellRefBasis): this method is not supported or should be overridden accordingly by derived classes.");
974 virtual HostBasisPtr<OutputValueType, PointValueType>
976 INTREPID2_TEST_FOR_EXCEPTION(
true, std::logic_error,
977 ">>> ERROR (Basis::getHostBasis): this method is not supported or should be overridden accordingly by derived classes.");
1004 KOKKOS_INLINE_FUNCTION
1005 ordinal_type getFieldRank(
const EFunctionSpace spaceType);
1042 KOKKOS_INLINE_FUNCTION
1043 ordinal_type getOperatorRank(
const EFunctionSpace spaceType,
1044 const EOperator operatorType,
1045 const ordinal_type spaceDim);
1052 KOKKOS_INLINE_FUNCTION
1053 ordinal_type getOperatorOrder(
const EOperator operatorType);
1055 template<EOperator operatorType>
1056 KOKKOS_INLINE_FUNCTION
1057 constexpr ordinal_type getOperatorOrder();
1082 template<ordinal_type spaceDim>
1083 KOKKOS_INLINE_FUNCTION
1084 ordinal_type getDkEnumeration(
const ordinal_type xMult,
1085 const ordinal_type yMult = -1,
1086 const ordinal_type zMult = -1);
1099 template<ordinal_type spaceDim>
1100 KOKKOS_INLINE_FUNCTION
1101 ordinal_type getPnEnumeration(
const ordinal_type p,
1102 const ordinal_type q = 0,
1103 const ordinal_type r = 0);
1125 template<
typename value_type>
1126 KOKKOS_INLINE_FUNCTION
1127 void getJacobyRecurrenceCoeffs (
1131 const ordinal_type alpha,
1132 const ordinal_type beta ,
1133 const ordinal_type n);
1172 KOKKOS_INLINE_FUNCTION
1173 ordinal_type getDkCardinality(
const EOperator operatorType,
1174 const ordinal_type spaceDim);
1176 template<EOperator operatorType, ordinal_type spaceDim>
1177 KOKKOS_INLINE_FUNCTION
1178 constexpr ordinal_type getDkCardinality();
1191 template<ordinal_type spaceDim>
1192 KOKKOS_INLINE_FUNCTION
1193 ordinal_type getPnCardinality (ordinal_type n);
1195 template<ordinal_type spaceDim, ordinal_type n>
1196 KOKKOS_INLINE_FUNCTION
1197 constexpr ordinal_type getPnCardinality ();
1216 template<
typename outputValueViewType,
1217 typename inputPointViewType>
1218 void getValues_HGRAD_Args(
const outputValueViewType outputValues,
1219 const inputPointViewType inputPoints,
1220 const EOperator operatorType,
1221 const shards::CellTopology cellTopo,
1222 const ordinal_type basisCard );
1234 template<
typename outputValueViewType,
1235 typename inputPointViewType>
1236 void getValues_HCURL_Args(
const outputValueViewType outputValues,
1237 const inputPointViewType inputPoints,
1238 const EOperator operatorType,
1239 const shards::CellTopology cellTopo,
1240 const ordinal_type basisCard );
1252 template<
typename outputValueViewType,
1253 typename inputPointViewType>
1254 void getValues_HDIV_Args(
const outputValueViewType outputValues,
1255 const inputPointViewType inputPoints,
1256 const EOperator operatorType,
1257 const shards::CellTopology cellTopo,
1258 const ordinal_type basisCard );
1270 template<
typename outputValueViewType,
1271 typename inputPointViewType>
1272 void getValues_HVOL_Args(
const outputValueViewType outputValues,
1273 const inputPointViewType inputPoints,
1274 const EOperator operatorType,
1275 const shards::CellTopology cellTopo,
1276 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.
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.
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.
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.
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.
const VectorDataType & vectorData() const
VectorData accessor.
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.
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.
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.
TensorDataType & tensorData()
TensorData accessor for single-family scalar data.
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.
shards::CellTopology basisCellTopology_
Base topology of the cells for which the basis is defined. See the Shards package for definition of b...
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.