|
Intrepid2
|
Definition file for Intrepid2 utilities. More...
#include "Intrepid2_Utils.hpp"Go to the source code of this file.
Functions | |
| KOKKOS_INLINE_FUNCTION ordinal_type | Intrepid2::getFieldRank (const EFunctionSpace spaceType) |
| Returns the rank of fields in a function space of the specified type. More... | |
| KOKKOS_INLINE_FUNCTION ordinal_type | Intrepid2::getOperatorRank (const EFunctionSpace spaceType, const EOperator operatorType, const ordinal_type spaceDim) |
| Returns rank of an operator. More... | |
| KOKKOS_INLINE_FUNCTION ordinal_type | Intrepid2::getOperatorOrder (const EOperator operatorType) |
| Returns order of an operator. More... | |
| KOKKOS_INLINE_FUNCTION ordinal_type | Intrepid2::getDkEnumeration (const ordinal_type xMult, const ordinal_type yMult, const ordinal_type zMult) |
| KOKKOS_INLINE_FUNCTION ordinal_type | Intrepid2::getDkCardinality (const EOperator operatorType, const ordinal_type spaceDim) |
| Returns cardinality of Dk, i.e., the number of all derivatives of order k. More... | |
Definition file for Intrepid2 utilities.
Definition in file Intrepid2_UtilsDef.hpp.
| KOKKOS_INLINE_FUNCTION ordinal_type Intrepid2::getDkCardinality | ( | const EOperator | operatorType, |
| const ordinal_type | spaceDim | ||
| ) |
Returns cardinality of Dk, i.e., the number of all derivatives of order k.
The set of all partial derivatives of order k is isomorphic to the set of all multisets of cardinality k with elements taken from the sets {x}, {x,y}, and {x,y,z} in 1D, 2D, and 3D respectively. For example, the partial derivative
maps to the multiset
with multiplicities
. The number of all such multisets is given by the binomial coefficient
Therefore:
| operatorType | [in] - k-th derivative operator Dk |
| spaceDim | [in] - space dimension |
Definition at line 410 of file Intrepid2_BasisDef.hpp.
References Intrepid2::getDkCardinality().
Referenced by Intrepid2::getDkCardinality().
| KOKKOS_INLINE_FUNCTION ordinal_type Intrepid2::getDkEnumeration | ( | const ordinal_type | xMult, |
| const ordinal_type | yMult, | ||
| const ordinal_type | zMult | ||
| ) |
Definition at line 230 of file Intrepid2_UtilsDef.hpp.
| KOKKOS_INLINE_FUNCTION ordinal_type Intrepid2::getFieldRank | ( | const EFunctionSpace | spaceType | ) |
Returns the rank of fields in a function space of the specified type.
Field rank is defined as the number of indices needed to specify function value and equals 0, 1,or 2 for scalars, vectors and tensors, respectively. The scalar field spaces in Intrepid are FUNCTION_SPACE_HGRAD and FUNCTION_SPACE_HVOL. The vector field spaces are FUNCTION_SPACE_HCURL, FUNCTION_SPACE_HDIV and FUNCTION_SPACE_VECTOR_HGRAD. FUNCTION_SPACE_TENSOR_HGRAD contains rank-2 tensors.
| spaceType | [in] - function space type |
Definition at line 67 of file Intrepid2_BasisDef.hpp.
References Intrepid2::getFieldRank().
Referenced by Intrepid2::getFieldRank(), and Intrepid2::getOperatorRank().
| KOKKOS_INLINE_FUNCTION ordinal_type Intrepid2::getOperatorOrder | ( | const EOperator | operatorType | ) |
Returns order of an operator.
| operatorType | [in] - type of the operator whose order we want to know |
Definition at line 194 of file Intrepid2_BasisDef.hpp.
References Intrepid2::getOperatorOrder().
Referenced by Intrepid2::getOperatorOrder().
| KOKKOS_INLINE_FUNCTION ordinal_type Intrepid2::getOperatorRank | ( | const EFunctionSpace | spaceType, |
| const EOperator | operatorType, | ||
| const ordinal_type | spaceDim | ||
| ) |
Returns rank of an operator.
When an operator acts on a field of a certain rank, the result can be a field with the same or a different rank. Operator rank is defined the difference between the ranks of the output field and the input field:
Rank(OPERATOR) = Rank(OPERATOR(FIELD)) - Rank(FIELD)
Therefore, operator rank allows us to figure out the rank of the result:
Rank(OPERATOR(FIELD)) = Rank(FIELD) + Rank(OPERATOR)
and provides means to size properly arrays for output results. The following table summarizes operator ranks (~ denotes undefined, below slash means 3D). By default, in 1D any operator other than VALUE has rank 1, i.e., GRAD, CURL and DIV reduce to d/dx and Dk are the higher-order derivatives d^k/dx^k. Only scalar functions are allowed in 1D.
|========|======|============================|=========|==========|==========|==========| | field | rank | FUNCTION_SPACE_[type] | VALUE | GRAD, Dk | CURL | DIV | |--------|------|----------------------------|---------|----------|----------|----------| | scalar | 0 | HGRAD, HVOL | 0 | 1 | 3-dim/~ | ~ | | vector | 1 | HCURL, HDIV, VECTOR_HGRAD | 0 | 1 | dim - 3 | -1 | | tensor | 2 | TENSOR_HGRAD | 0 | 1 | dim - 3 | -1 | |--------|------|----------------------------|---------|----------|----------|----------| | 1D | 0 | HGRAD, HVOL only | 0 | 1 | 1 | 1 | |=======================================================================================|
| spaceType | [in] - function space type |
| operatorType | [in] - the operator acting on the specified function space |
| spaceDim | [in] - spatial dimension |
Definition at line 96 of file Intrepid2_BasisDef.hpp.
References Intrepid2::getFieldRank(), and Intrepid2::getOperatorRank().
Referenced by Intrepid2::getOperatorRank().