|
Intrepid2
|
Reference-space field values for a basis, designed to support typical vector-valued bases. More...
#include <Intrepid2_VectorData.hpp>
Public Types | |
| using | VectorArray = Kokkos::Array< TensorData< Scalar, DeviceType >, Parameters::MaxTensorComponents > |
| using | FamilyVectorArray = Kokkos::Array< VectorArray, Parameters::MaxTensorComponents > |
Public Member Functions | |
| void | initialize () |
| Initialize members based on constructor parameters; all constructors should call this after populating numFamilies_, numComponents_, and vectorComponents_. More... | |
| template<size_t numFamilies, size_t numComponents> | |
| VectorData (Kokkos::Array< Kokkos::Array< TensorData< Scalar, DeviceType >, numComponents >, numFamilies > vectorComponents) | |
| Standard constructor for the arbitrary case, accepting a fixed-length array argument. More... | |
| VectorData (const std::vector< std::vector< TensorData< Scalar, DeviceType > > > &vectorComponents) | |
| Standard constructor for the arbitrary case, accepting a variable-length std::vector argument. More... | |
| template<size_t numComponents> | |
| VectorData (Kokkos::Array< TensorData< Scalar, DeviceType >, numComponents > vectorComponents, bool axialComponents) | |
| Simplified constructor for gradients of HGRAD, and values of HDIV and HCURL vector bases. More... | |
| VectorData (std::vector< TensorData< Scalar, DeviceType > > vectorComponents, bool axialComponents) | |
| Simplified constructor for gradients of HGRAD, and values of HDIV and HCURL vector bases. More... | |
| template<typename OtherDeviceType , class = typename std::enable_if< std::is_same<typename DeviceType::memory_space, typename OtherDeviceType::memory_space>::value>::type, class = typename std::enable_if<!std::is_same<DeviceType,OtherDeviceType>::value>::type> | |
| VectorData (const VectorData< Scalar, OtherDeviceType > &vectorData) | |
| copy-like constructor for differing device type, but same memory space. This does a shallow copy of the underlying view. More... | |
| template<typename OtherDeviceType , class = typename std::enable_if<!std::is_same<typename DeviceType::memory_space, typename OtherDeviceType::memory_space>::value>::type> | |
| VectorData (const VectorData< Scalar, OtherDeviceType > &vectorData) | |
| copy-like constructor for differing execution spaces. This does a deep copy of underlying views. More... | |
| VectorData (TensorData< Scalar, DeviceType > data) | |
| Simple 1-argument constructor for the case of trivial tensor product structure. The argument should have shape (F,P,D) where D has extent equal to the spatial dimension. More... | |
| VectorData (Data< Scalar, DeviceType > data) | |
| Simple 1-argument constructor for the case of trivial tensor product structure. The argument should have shape (F,P,D) where D has extent equal to the spatial dimension. More... | |
| VectorData () | |
| default constructor; results in an invalid container. More... | |
| KOKKOS_INLINE_FUNCTION bool | axialComponents () const |
| Returns true only if the families are so structured that the first family has nonzeros only in the x component, the second only in the y component, etc. More... | |
| KOKKOS_INLINE_FUNCTION int | numDimsForComponent (int &componentOrdinal) const |
| Returns the number of dimensions corresponding to the specified component. More... | |
| KOKKOS_INLINE_FUNCTION int | numFields () const |
| Returns the total number of fields; corresponds to the first dimension of this container. More... | |
| KOKKOS_INLINE_FUNCTION int | familyFieldOrdinalOffset (const int &familyOrdinal) const |
| Returns the field ordinal offset for the specified family. More... | |
| KOKKOS_INLINE_FUNCTION int | numPoints () const |
| Returns the number of points; corresponds to the second dimension of this container. More... | |
| KOKKOS_INLINE_FUNCTION int | spaceDim () const |
| Returns the spatial dimension; corresponds to the third dimension of this container. More... | |
| KOKKOS_INLINE_FUNCTION Scalar | operator() (const int &fieldOrdinal, const int &pointOrdinal, const int &dim) const |
| Accessor for the container, which has shape (F,P,D). More... | |
| KOKKOS_INLINE_FUNCTION const TensorData< Scalar, DeviceType > & | getComponent (const int &componentOrdinal) const |
| Single-argument component accessor for the axial-component or the single-family case; in this case, one argument suffices to uniquely identify the component. More... | |
| KOKKOS_INLINE_FUNCTION const TensorData< Scalar, DeviceType > & | getComponent (const int &familyOrdinal, const int &componentOrdinal) const |
| General component accessor. More... | |
| KOKKOS_INLINE_FUNCTION int | extent_int (const int &r) const |
| Returns the extent in the specified dimension as an int. More... | |
| KOKKOS_INLINE_FUNCTION unsigned | rank () const |
| Returns the rank of this container, which is 3. More... | |
| KOKKOS_INLINE_FUNCTION int | numComponents () const |
| returns the number of components More... | |
| KOKKOS_INLINE_FUNCTION int | numFamilies () const |
| returns the number of families More... | |
| KOKKOS_INLINE_FUNCTION int | familyForFieldOrdinal (const int &fieldOrdinal) const |
| Returns the family ordinal corresponding to the indicated field ordinal. More... | |
| KOKKOS_INLINE_FUNCTION int | numFieldsInFamily (const unsigned &familyOrdinal) const |
| returns the number of fields in the specified family More... | |
| KOKKOS_INLINE_FUNCTION constexpr bool | isValid () const |
| returns true for containers that have data; false for those that don't (e.g., those that have been constructed by the default constructor). More... | |
Public Attributes | |
| FamilyVectorArray | vectorComponents_ |
| bool | axialComponents_ |
| int | totalDimension_ |
| Kokkos::Array< int, Parameters::MaxTensorComponents > | dimToComponent_ |
| Kokkos::Array< int, Parameters::MaxTensorComponents > | dimToComponentDim_ |
| Kokkos::Array< int, Parameters::MaxTensorComponents > | numDimsForComponent_ |
| Kokkos::Array< int, Parameters::MaxTensorComponents > | familyFieldUpperBound_ |
| unsigned | numFamilies_ |
| unsigned | numComponents_ |
| unsigned | numPoints_ |
Reference-space field values for a basis, designed to support typical vector-valued bases.
VectorData is designed with typical HDIV/HCURL bases in mind; these often involve reference-space basis functions each of which is zero in every dimension but one. Moreover, on tensor product topologies each nonzero scalar function can be expressed as a product of functions defined on the topological components. Also supported: gradients of typical H^1 bases, which have a full vector, each component of which is a product of basis functions defined on lower-dimensional topologies.
Typically, HDIV and HCURL bases have multiple families corresponding to the nonzero structure of the vector components. VectorData therefore supports multiple families. (Gradients of H^1 are expressed as a single family.)
Definition at line 65 of file Intrepid2_VectorData.hpp.
| using Intrepid2::VectorData< Scalar, DeviceType >::FamilyVectorArray = Kokkos::Array< VectorArray, Parameters::MaxTensorComponents> |
Definition at line 69 of file Intrepid2_VectorData.hpp.
| using Intrepid2::VectorData< Scalar, DeviceType >::VectorArray = Kokkos::Array< TensorData<Scalar,DeviceType>, Parameters::MaxTensorComponents> |
Definition at line 68 of file Intrepid2_VectorData.hpp.
|
inline |
Standard constructor for the arbitrary case, accepting a fixed-length array argument.
| [in] | vectorComponents | - an array of arrays, where the outer dimension corresponds to the family, and the inner to the number of components in each vector. |
Outer dimension: number of families; inner dimension: number of components in each vector. Use empty/invalid TensorData objects to indicate zeroes. Each family, and each vector component dimension, must have at least one valid entry, and the number of points in each valid entry must agree with each other. The field count within components of a family must also agree; across families these may differ. Vector components are allowed to span multiple spatial dimensions, but when they do, any valid TensorData object in that vector position must agree in the dimension across families.
Definition at line 179 of file Intrepid2_VectorData.hpp.
References Intrepid2::VectorData< Scalar, DeviceType >::initialize(), Intrepid2::Parameters::MaxTensorComponents, Intrepid2::VectorData< Scalar, DeviceType >::numComponents(), and Intrepid2::VectorData< Scalar, DeviceType >::numFamilies().
|
inline |
Standard constructor for the arbitrary case, accepting a variable-length std::vector argument.
| [in] | vectorComponents | - an array of arrays, where the outer dimension corresponds to the family, and the inner to the number of components in each vector. |
Outer dimension: number of families; inner dimension: number of components in each vector. Use empty/invalid TensorData objects to indicate zeroes. Each family, and each vector component dimension, must have at least one valid entry, and the number of points in each valid entry must agree with each other. The field count within components of a family must also agree; across families these may differ. Vector components are allowed to span multiple spatial dimensions, but when they do, any valid TensorData object in that vector position must agree in the dimension across families.
Definition at line 202 of file Intrepid2_VectorData.hpp.
|
inline |
Simplified constructor for gradients of HGRAD, and values of HDIV and HCURL vector bases.
| [in] | vectorComponents | - an array of components; see below for interpretation |
| [in] | axialComponents | - use false for a "full" vector, such as the gradient of a scalar HGRAD basis; use true for all-but-one zero entries in each vector, as for the values in a typical HDIV or HCURL basis |
For the gradient use case, VectorData will have a single family. For the HDIV and HCURL use cases, will have the same number of families as there are components in the vectorComponents argument; each family will consist of vectors that have one entry filled, the others zeroes; this is what we mean by "axial components."
Definition at line 232 of file Intrepid2_VectorData.hpp.
References Intrepid2::VectorData< Scalar, DeviceType >::axialComponents(), Intrepid2::VectorData< Scalar, DeviceType >::initialize(), and Intrepid2::VectorData< Scalar, DeviceType >::numComponents().
|
inline |
Simplified constructor for gradients of HGRAD, and values of HDIV and HCURL vector bases.
| [in] | vectorComponents | - an array of components; see below for interpretation |
| [in] | axialComponents | - use false for a "full" vector, such as the gradient of a scalar HGRAD basis; use true for all-but-one zero entries in each vector, as for the values in a typical HDIV or HCURL basis |
For the gradient use case, VectorData will have a single family. For the HDIV and HCURL use cases, will have the same number of families as there are components in the vectorComponents argument; each family will consist of vectors that have one entry filled, the others zeroes; this is what we mean by "axial components."
Definition at line 262 of file Intrepid2_VectorData.hpp.
References Intrepid2::VectorData< Scalar, DeviceType >::axialComponents(), and Intrepid2::VectorData< Scalar, DeviceType >::initialize().
|
inline |
copy-like constructor for differing device type, but same memory space. This does a shallow copy of the underlying view.
Definition at line 287 of file Intrepid2_VectorData.hpp.
References Intrepid2::VectorData< Scalar, DeviceType >::getComponent(), and Intrepid2::VectorData< Scalar, DeviceType >::initialize().
|
inline |
copy-like constructor for differing execution spaces. This does a deep copy of underlying views.
Definition at line 307 of file Intrepid2_VectorData.hpp.
References Intrepid2::VectorData< Scalar, DeviceType >::getComponent(), Intrepid2::VectorData< Scalar, DeviceType >::initialize(), and Intrepid2::VectorData< Scalar, DeviceType >::isValid().
|
inline |
Simple 1-argument constructor for the case of trivial tensor product structure. The argument should have shape (F,P,D) where D has extent equal to the spatial dimension.
Definition at line 326 of file Intrepid2_VectorData.hpp.
|
inline |
Simple 1-argument constructor for the case of trivial tensor product structure. The argument should have shape (F,P,D) where D has extent equal to the spatial dimension.
Definition at line 332 of file Intrepid2_VectorData.hpp.
|
inline |
default constructor; results in an invalid container.
Definition at line 338 of file Intrepid2_VectorData.hpp.
|
inline |
Returns true only if the families are so structured that the first family has nonzeros only in the x component, the second only in the y component, etc.
Definition at line 345 of file Intrepid2_VectorData.hpp.
Referenced by Intrepid2::VectorData< Scalar, DeviceType >::VectorData().
|
inline |
Returns the extent in the specified dimension as an int.
Definition at line 478 of file Intrepid2_VectorData.hpp.
References Intrepid2::VectorData< Scalar, DeviceType >::numFields(), and Intrepid2::VectorData< Scalar, DeviceType >::numPoints().
|
inline |
Returns the field ordinal offset for the specified family.
Definition at line 366 of file Intrepid2_VectorData.hpp.
|
inline |
Returns the family ordinal corresponding to the indicated field ordinal.
Definition at line 511 of file Intrepid2_VectorData.hpp.
References Intrepid2::VectorData< Scalar, DeviceType >::numFieldsInFamily().
|
inline |
Single-argument component accessor for the axial-component or the single-family case; in this case, one argument suffices to uniquely identify the component.
| [in] | componentOrdinal | - the vector component ordinal. |
Definition at line 442 of file Intrepid2_VectorData.hpp.
Referenced by Intrepid2::VectorData< Scalar, DeviceType >::VectorData().
|
inline |
General component accessor.
| [in] | familyOrdinal | - the family ordinal for the requested component. |
| [in] | componentOrdinal | - the vector component ordinal. |
Definition at line 466 of file Intrepid2_VectorData.hpp.
|
inline |
Initialize members based on constructor parameters; all constructors should call this after populating numFamilies_, numComponents_, and vectorComponents_.
Definition at line 89 of file Intrepid2_VectorData.hpp.
References Intrepid2::VectorData< Scalar, DeviceType >::isValid(), Intrepid2::VectorData< Scalar, DeviceType >::numFieldsInFamily(), and Intrepid2::VectorData< Scalar, DeviceType >::numPoints().
Referenced by Intrepid2::VectorData< Scalar, DeviceType >::VectorData().
|
inlineconstexpr |
returns true for containers that have data; false for those that don't (e.g., those that have been constructed by the default constructor).
Definition at line 541 of file Intrepid2_VectorData.hpp.
Referenced by Intrepid2::VectorData< Scalar, DeviceType >::initialize(), Intrepid2::BasisValues< Scalar, ExecSpaceType >::numFamilies(), and Intrepid2::VectorData< Scalar, DeviceType >::VectorData().
|
inline |
returns the number of components
Definition at line 499 of file Intrepid2_VectorData.hpp.
Referenced by Intrepid2::VectorData< Scalar, DeviceType >::VectorData().
|
inline |
Returns the number of dimensions corresponding to the specified component.
Definition at line 352 of file Intrepid2_VectorData.hpp.
|
inline |
returns the number of families
Definition at line 505 of file Intrepid2_VectorData.hpp.
Referenced by Intrepid2::BasisValues< Scalar, ExecSpaceType >::numFamilies(), and Intrepid2::VectorData< Scalar, DeviceType >::VectorData().
|
inline |
Returns the total number of fields; corresponds to the first dimension of this container.
Definition at line 359 of file Intrepid2_VectorData.hpp.
Referenced by Intrepid2::VectorData< Scalar, DeviceType >::extent_int(), and Intrepid2::TransformedVectorData< Scalar, DeviceType >::numFields().
|
inline |
returns the number of fields in the specified family
Definition at line 528 of file Intrepid2_VectorData.hpp.
Referenced by Intrepid2::VectorData< Scalar, DeviceType >::familyForFieldOrdinal(), and Intrepid2::VectorData< Scalar, DeviceType >::initialize().
|
inline |
Returns the number of points; corresponds to the second dimension of this container.
Definition at line 373 of file Intrepid2_VectorData.hpp.
Referenced by Intrepid2::VectorData< Scalar, DeviceType >::extent_int(), Intrepid2::VectorData< Scalar, DeviceType >::initialize(), and Intrepid2::TransformedVectorData< Scalar, DeviceType >::numPoints().
|
inline |
Accessor for the container, which has shape (F,P,D).
Definition at line 387 of file Intrepid2_VectorData.hpp.
|
inline |
Returns the rank of this container, which is 3.
Definition at line 492 of file Intrepid2_VectorData.hpp.
|
inline |
Returns the spatial dimension; corresponds to the third dimension of this container.
Definition at line 380 of file Intrepid2_VectorData.hpp.
Referenced by Intrepid2::TransformedVectorData< Scalar, DeviceType >::spaceDim().
| bool Intrepid2::VectorData< Scalar, DeviceType >::axialComponents_ |
Definition at line 72 of file Intrepid2_VectorData.hpp.
| Kokkos::Array<int,Parameters::MaxTensorComponents> Intrepid2::VectorData< Scalar, DeviceType >::dimToComponent_ |
Definition at line 75 of file Intrepid2_VectorData.hpp.
| Kokkos::Array<int,Parameters::MaxTensorComponents> Intrepid2::VectorData< Scalar, DeviceType >::dimToComponentDim_ |
Definition at line 76 of file Intrepid2_VectorData.hpp.
| Kokkos::Array<int,Parameters::MaxTensorComponents> Intrepid2::VectorData< Scalar, DeviceType >::familyFieldUpperBound_ |
Definition at line 80 of file Intrepid2_VectorData.hpp.
| unsigned Intrepid2::VectorData< Scalar, DeviceType >::numComponents_ |
Definition at line 83 of file Intrepid2_VectorData.hpp.
| Kokkos::Array<int,Parameters::MaxTensorComponents> Intrepid2::VectorData< Scalar, DeviceType >::numDimsForComponent_ |
Definition at line 78 of file Intrepid2_VectorData.hpp.
| unsigned Intrepid2::VectorData< Scalar, DeviceType >::numFamilies_ |
Definition at line 82 of file Intrepid2_VectorData.hpp.
| unsigned Intrepid2::VectorData< Scalar, DeviceType >::numPoints_ |
Definition at line 84 of file Intrepid2_VectorData.hpp.
| int Intrepid2::VectorData< Scalar, DeviceType >::totalDimension_ |
Definition at line 74 of file Intrepid2_VectorData.hpp.
| FamilyVectorArray Intrepid2::VectorData< Scalar, DeviceType >::vectorComponents_ |
Definition at line 71 of file Intrepid2_VectorData.hpp.