|
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::MaxVectorComponents > |
| 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_. | |
| 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. | |
| VectorData (const std::vector< std::vector< TensorData< Scalar, DeviceType > > > &vectorComponents) | |
| Standard constructor for the arbitrary case, accepting a variable-length std::vector argument. | |
| 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. | |
| VectorData (std::vector< TensorData< Scalar, DeviceType > > vectorComponents, bool axialComponents) | |
| Simplified constructor for gradients of HGRAD, and values of HDIV and HCURL vector bases. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| VectorData () | |
| default constructor; results in an invalid container. | |
| 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. | |
| KOKKOS_INLINE_FUNCTION int | numDimsForComponent (int &componentOrdinal) const |
| Returns the number of dimensions corresponding to the specified component. | |
| KOKKOS_INLINE_FUNCTION int | numFields () const |
| Returns the total number of fields; corresponds to the first dimension of this container. | |
| KOKKOS_INLINE_FUNCTION int | familyFieldOrdinalOffset (const int &familyOrdinal) const |
| Returns the field ordinal offset for the specified family. | |
| KOKKOS_INLINE_FUNCTION int | numPoints () const |
| Returns the number of points; corresponds to the second dimension of this container. | |
| KOKKOS_INLINE_FUNCTION int | spaceDim () const |
| Returns the spatial dimension; corresponds to the third dimension of this container. | |
| 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). | |
| 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. | |
| KOKKOS_INLINE_FUNCTION const TensorData< Scalar, DeviceType > & | getComponent (const int &familyOrdinal, const int &componentOrdinal) const |
| General component accessor. | |
| KOKKOS_INLINE_FUNCTION int | extent_int (const int &r) const |
| Returns the extent in the specified dimension as an int. | |
| KOKKOS_INLINE_FUNCTION unsigned | rank () const |
| Returns the rank of this container, which is 3. | |
| KOKKOS_INLINE_FUNCTION int | numComponents () const |
| returns the number of components | |
| KOKKOS_INLINE_FUNCTION int | numFamilies () const |
| returns the number of families | |
| KOKKOS_INLINE_FUNCTION int | familyForFieldOrdinal (const int &fieldOrdinal) const |
| Returns the family ordinal corresponding to the indicated field ordinal. | |
| KOKKOS_INLINE_FUNCTION int | numFieldsInFamily (const unsigned &familyOrdinal) const |
| returns the number of fields in the specified family | |
| 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). | |
Public Attributes | |
| FamilyVectorArray | vectorComponents_ |
| bool | axialComponents_ |
| int | totalDimension_ |
| Kokkos::Array< int, Parameters::MaxVectorComponents > | dimToComponent_ |
| Kokkos::Array< int, Parameters::MaxVectorComponents > | dimToComponentDim_ |
| Kokkos::Array< int, Parameters::MaxVectorComponents > | 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 31 of file Intrepid2_VectorData.hpp.
| using Intrepid2::VectorData< Scalar, DeviceType >::FamilyVectorArray = Kokkos::Array< VectorArray, Parameters::MaxTensorComponents> |
Definition at line 35 of file Intrepid2_VectorData.hpp.
| using Intrepid2::VectorData< Scalar, DeviceType >::VectorArray = Kokkos::Array< TensorData<Scalar,DeviceType>, Parameters::MaxVectorComponents > |
Definition at line 34 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 150 of file Intrepid2_VectorData.hpp.
References initialize(), Intrepid2::Parameters::MaxTensorComponents, Intrepid2::Parameters::MaxVectorComponents, numComponents(), and numFamilies().
Referenced by VectorData(), VectorData(), and VectorData().
|
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 173 of file Intrepid2_VectorData.hpp.
References initialize(), Intrepid2::Parameters::MaxTensorComponents, and Intrepid2::Parameters::MaxVectorComponents.
|
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 203 of file Intrepid2_VectorData.hpp.
References axialComponents(), initialize(), and 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 233 of file Intrepid2_VectorData.hpp.
References axialComponents(), and 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 258 of file Intrepid2_VectorData.hpp.
References initialize(), and VectorData().
|
inline |
copy-like constructor for differing execution spaces. This does a deep copy of underlying views.
Definition at line 278 of file Intrepid2_VectorData.hpp.
References initialize(), isValid(), numComponents(), numFamilies(), and VectorData().
|
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 297 of file Intrepid2_VectorData.hpp.
References VectorData().
|
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 303 of file Intrepid2_VectorData.hpp.
References VectorData().
|
inline |
default constructor; results in an invalid container.
Definition at line 309 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 316 of file Intrepid2_VectorData.hpp.
Referenced by VectorData(), and VectorData().
|
inline |
Returns the extent in the specified dimension as an int.
Definition at line 449 of file Intrepid2_VectorData.hpp.
References INTREPID2_TEST_FOR_EXCEPTION_DEVICE_SAFE, numFields(), and numPoints().
Referenced by initialize().
|
inline |
Returns the field ordinal offset for the specified family.
Definition at line 337 of file Intrepid2_VectorData.hpp.
|
inline |
Returns the family ordinal corresponding to the indicated field ordinal.
Definition at line 482 of file Intrepid2_VectorData.hpp.
References 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 413 of file Intrepid2_VectorData.hpp.
References INTREPID2_TEST_FOR_EXCEPTION_DEVICE_SAFE.
Referenced by Intrepid2::Basis< DeviceType, outputValueType, pointValueType >::getValues(), and Intrepid2::Basis_TensorBasis< BasisBase >::getValues().
|
inline |
General component accessor.
| [in] | familyOrdinal | - the family ordinal for the requested component. |
| [in] | componentOrdinal | - the vector component ordinal. |
Definition at line 437 of file Intrepid2_VectorData.hpp.
References INTREPID2_TEST_FOR_EXCEPTION_DEVICE_SAFE.
|
inline |
Initialize members based on constructor parameters; all constructors should call this after populating numFamilies_, numComponents_, and vectorComponents_.
Definition at line 54 of file Intrepid2_VectorData.hpp.
References extent_int(), isValid(), numDimsForComponent(), numFieldsInFamily(), and numPoints().
Referenced by VectorData(), VectorData(), VectorData(), VectorData(), and 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 512 of file Intrepid2_VectorData.hpp.
Referenced by Intrepid2::Basis_DirectSumBasis< typename HGRAD_LINE::BasisBase >::allocateBasisValues(), Intrepid2::Basis< DeviceType, outputValueType, pointValueType >::getValues(), initialize(), and VectorData().
|
inline |
returns the number of components
Definition at line 470 of file Intrepid2_VectorData.hpp.
Referenced by Intrepid2::Basis< DeviceType, outputValueType, pointValueType >::getValues(), VectorData(), VectorData(), and VectorData().
|
inline |
Returns the number of dimensions corresponding to the specified component.
Definition at line 323 of file Intrepid2_VectorData.hpp.
Referenced by initialize().
|
inline |
returns the number of families
Definition at line 476 of file Intrepid2_VectorData.hpp.
Referenced by Intrepid2::Basis_DirectSumBasis< typename HGRAD_LINE::BasisBase >::allocateBasisValues(), VectorData(), and VectorData().
|
inline |
Returns the total number of fields; corresponds to the first dimension of this container.
Definition at line 330 of file Intrepid2_VectorData.hpp.
Referenced by extent_int(), and numFieldsInFamily().
|
inline |
returns the number of fields in the specified family
Definition at line 499 of file Intrepid2_VectorData.hpp.
References INTREPID2_TEST_FOR_EXCEPTION_DEVICE_SAFE, and numFields().
Referenced by familyForFieldOrdinal(), and initialize().
|
inline |
Returns the number of points; corresponds to the second dimension of this container.
Definition at line 344 of file Intrepid2_VectorData.hpp.
Referenced by extent_int(), and initialize().
|
inline |
Accessor for the container, which has shape (F,P,D).
Definition at line 358 of file Intrepid2_VectorData.hpp.
References INTREPID2_TEST_FOR_EXCEPTION_DEVICE_SAFE.
|
inline |
Returns the rank of this container, which is 3.
Definition at line 463 of file Intrepid2_VectorData.hpp.
|
inline |
Returns the spatial dimension; corresponds to the third dimension of this container.
Definition at line 351 of file Intrepid2_VectorData.hpp.
| bool Intrepid2::VectorData< Scalar, DeviceType >::axialComponents_ |
Definition at line 38 of file Intrepid2_VectorData.hpp.
| Kokkos::Array<int, Parameters::MaxVectorComponents> Intrepid2::VectorData< Scalar, DeviceType >::dimToComponent_ |
Definition at line 41 of file Intrepid2_VectorData.hpp.
| Kokkos::Array<int, Parameters::MaxVectorComponents> Intrepid2::VectorData< Scalar, DeviceType >::dimToComponentDim_ |
Definition at line 42 of file Intrepid2_VectorData.hpp.
| Kokkos::Array<int,Parameters::MaxTensorComponents> Intrepid2::VectorData< Scalar, DeviceType >::familyFieldUpperBound_ |
Definition at line 45 of file Intrepid2_VectorData.hpp.
| unsigned Intrepid2::VectorData< Scalar, DeviceType >::numComponents_ |
Definition at line 48 of file Intrepid2_VectorData.hpp.
| Kokkos::Array<int, Parameters::MaxVectorComponents> Intrepid2::VectorData< Scalar, DeviceType >::numDimsForComponent_ |
Definition at line 43 of file Intrepid2_VectorData.hpp.
| unsigned Intrepid2::VectorData< Scalar, DeviceType >::numFamilies_ |
Definition at line 47 of file Intrepid2_VectorData.hpp.
| unsigned Intrepid2::VectorData< Scalar, DeviceType >::numPoints_ |
Definition at line 49 of file Intrepid2_VectorData.hpp.
| int Intrepid2::VectorData< Scalar, DeviceType >::totalDimension_ |
Definition at line 40 of file Intrepid2_VectorData.hpp.
| FamilyVectorArray Intrepid2::VectorData< Scalar, DeviceType >::vectorComponents_ |
Definition at line 37 of file Intrepid2_VectorData.hpp.