Intrepid2
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
Intrepid2::BasisValues< Scalar, DeviceType > Class Template Reference

The data containers in Intrepid2 that support sum factorization and other reduced-data optimizations distinguish between scalar-valued data that is a simple product of elements in tensor components, and vector-valued data that is made up of a series of such products. More...

#include <Intrepid2_BasisValues.hpp>

Public Types

using value_type = Scalar
 

Public Member Functions

 BasisValues (TensorDataType tensorData)
 Constructor for scalar-valued BasisValues with a single family of values.
 
 BasisValues (std::vector< TensorDataType > tensorDataFamilies)
 Constructor for scalar-valued BasisValues, with potentially multiple families of values. (Used, e.g., for op = DIV and functionSpace = HDIV.)
 
 BasisValues (VectorDataType vectorData)
 Constructor for vector-valued BasisValues.
 
 BasisValues ()
 Default constructor.
 
template<typename OtherDeviceType , class = typename std::enable_if<!std::is_same<DeviceType, OtherDeviceType>::value>::type>
 BasisValues (const BasisValues< Scalar, OtherDeviceType > &basisValues)
 copy-like constructor for differing execution spaces. This does a deep copy of underlying views.
 
BasisValues< Scalar, DeviceType > basisValuesForFields (const int &fieldStartOrdinal, const int &numFields)
 field start and length must align with families in vectorData_ or tensorDataFamilies_ (whichever is valid).
 
KOKKOS_INLINE_FUNCTION int familyFieldOrdinalOffset (const int &familyOrdinal) const
 Returns the field ordinal offset for the specified family.
 
TensorDataTypetensorData ()
 TensorData accessor for single-family scalar data.
 
const TensorDataTypetensorData (const int &familyOrdinal) const
 TensorData accessor for multi-family scalar data.
 
KOKKOS_INLINE_FUNCTION int numFamilies () const
 For valid vectorData, returns the number of families in vectorData; otherwise, returns number of TensorData families.
 
KOKKOS_INLINE_FUNCTION int numTensorDataFamilies () const
 
KOKKOS_INLINE_FUNCTION int numFieldsInFamily (int familyOrdinal) const
 
const Kokkos::Array< TensorDataType, Parameters::MaxTensorComponents > & tensorDataFamilies () const
 TensorDataFamilies accessor.
 
const VectorDataTypevectorData () const
 VectorData accessor.
 
KOKKOS_INLINE_FUNCTION Scalar operator() (const int &fieldOrdinal, const int &pointOrdinal) const
 operator() for (F,P) scalar data; throws an exception if this is not a scalar-valued container
 
KOKKOS_INLINE_FUNCTION Scalar operator() (const int &fieldOrdinal, const int &pointOrdinal, const int &dim) const
 operator() for (F,P,D) vector data; throws an exception if this is not a vector-valued container
 
KOKKOS_INLINE_FUNCTION Scalar operator() (const int &cellOrdinal, const int &fieldOrdinal, const int &pointOrdinal, const int &dim) const
 operator() for (C,F,P,D) data, which arises in CVFEM; at present unimplemented, and only declared here to allow a generic setJacobian() method in CellTools to compile.
 
KOKKOS_INLINE_FUNCTION int extent_int (const int &i) const
 
KOKKOS_INLINE_FUNCTION size_t extent (const int &i) const
 
KOKKOS_INLINE_FUNCTION size_t rank () const
 
void setOrdinalFilter (Kokkos::View< ordinal_type *, DeviceType > ordinalFilter)
 
Kokkos::View< ordinal_type *, DeviceType > ordinalFilter () const
 

Private Types

using TensorDataType = TensorData< Scalar, DeviceType >
 
using VectorDataType = VectorData< Scalar, DeviceType >
 

Private Attributes

Kokkos::Array< TensorDataType, Parameters::MaxTensorComponentstensorDataFamilies_
 
VectorDataType vectorData_
 
int numTensorDataFamilies_ = -1
 
Kokkos::View< ordinal_type *, DeviceType > ordinalFilter_
 

Detailed Description

template<class Scalar, typename DeviceType>
class Intrepid2::BasisValues< Scalar, DeviceType >

The data containers in Intrepid2 that support sum factorization and other reduced-data optimizations distinguish between scalar-valued data that is a simple product of elements in tensor components, and vector-valued data that is made up of a series of such products.

BasisValues contains both a VectorData and a TensorData object; only one of them will be valid in any BasisValues object. This allows us to maintain a common getValues() interface in the Basis class, rather than distinguishing at the interface level between operations that result in vector values and those that result in scalars.

Definition at line 35 of file Intrepid2_BasisValues.hpp.

Member Typedef Documentation

◆ TensorDataType

template<class Scalar , typename DeviceType >
using Intrepid2::BasisValues< Scalar, DeviceType >::TensorDataType = TensorData<Scalar,DeviceType>
private

Definition at line 40 of file Intrepid2_BasisValues.hpp.

◆ value_type

template<class Scalar , typename DeviceType >
using Intrepid2::BasisValues< Scalar, DeviceType >::value_type = Scalar

Definition at line 38 of file Intrepid2_BasisValues.hpp.

◆ VectorDataType

template<class Scalar , typename DeviceType >
using Intrepid2::BasisValues< Scalar, DeviceType >::VectorDataType = VectorData<Scalar,DeviceType>
private

Definition at line 41 of file Intrepid2_BasisValues.hpp.

Constructor & Destructor Documentation

◆ BasisValues() [1/5]

template<class Scalar , typename DeviceType >
Intrepid2::BasisValues< Scalar, DeviceType >::BasisValues ( TensorDataType  tensorData)
inline

Constructor for scalar-valued BasisValues with a single family of values.

Definition at line 51 of file Intrepid2_BasisValues.hpp.

References Intrepid2::BasisValues< Scalar, DeviceType >::tensorData().

◆ BasisValues() [2/5]

template<class Scalar , typename DeviceType >
Intrepid2::BasisValues< Scalar, DeviceType >::BasisValues ( std::vector< TensorDataType tensorDataFamilies)
inline

Constructor for scalar-valued BasisValues, with potentially multiple families of values. (Used, e.g., for op = DIV and functionSpace = HDIV.)

Definition at line 58 of file Intrepid2_BasisValues.hpp.

References Intrepid2::BasisValues< Scalar, DeviceType >::tensorDataFamilies().

◆ BasisValues() [3/5]

template<class Scalar , typename DeviceType >
Intrepid2::BasisValues< Scalar, DeviceType >::BasisValues ( VectorDataType  vectorData)
inline

Constructor for vector-valued BasisValues.

Definition at line 69 of file Intrepid2_BasisValues.hpp.

◆ BasisValues() [4/5]

template<class Scalar , typename DeviceType >
Intrepid2::BasisValues< Scalar, DeviceType >::BasisValues ( )
inline

Default constructor.

Definition at line 75 of file Intrepid2_BasisValues.hpp.

◆ BasisValues() [5/5]

template<class Scalar , typename DeviceType >
template<typename OtherDeviceType , class = typename std::enable_if<!std::is_same<DeviceType, OtherDeviceType>::value>::type>
Intrepid2::BasisValues< Scalar, DeviceType >::BasisValues ( const BasisValues< Scalar, OtherDeviceType > &  basisValues)
inline

copy-like constructor for differing execution spaces. This does a deep copy of underlying views.

Definition at line 83 of file Intrepid2_BasisValues.hpp.

References Intrepid2::BasisValues< Scalar, DeviceType >::tensorDataFamilies().

Member Function Documentation

◆ basisValuesForFields()

template<class Scalar , typename DeviceType >
BasisValues< Scalar, DeviceType > Intrepid2::BasisValues< Scalar, DeviceType >::basisValuesForFields ( const int &  fieldStartOrdinal,
const int &  numFields 
)
inline

◆ extent()

template<class Scalar , typename DeviceType >
KOKKOS_INLINE_FUNCTION size_t Intrepid2::BasisValues< Scalar, DeviceType >::extent ( const int &  i) const
inline

Definition at line 311 of file Intrepid2_BasisValues.hpp.

◆ extent_int()

template<class Scalar , typename DeviceType >
KOKKOS_INLINE_FUNCTION int Intrepid2::BasisValues< Scalar, DeviceType >::extent_int ( const int &  i) const
inline

Definition at line 273 of file Intrepid2_BasisValues.hpp.

◆ familyFieldOrdinalOffset()

template<class Scalar , typename DeviceType >
KOKKOS_INLINE_FUNCTION int Intrepid2::BasisValues< Scalar, DeviceType >::familyFieldOrdinalOffset ( const int &  familyOrdinal) const
inline

Returns the field ordinal offset for the specified family.

Definition at line 143 of file Intrepid2_BasisValues.hpp.

References Intrepid2::VectorData< Scalar, DeviceType >::familyFieldOrdinalOffset(), and Intrepid2::VectorData< Scalar, DeviceType >::isValid().

◆ numFamilies()

template<class Scalar , typename DeviceType >
KOKKOS_INLINE_FUNCTION int Intrepid2::BasisValues< Scalar, DeviceType >::numFamilies ( ) const
inline

◆ numFieldsInFamily()

template<class Scalar , typename DeviceType >
KOKKOS_INLINE_FUNCTION int Intrepid2::BasisValues< Scalar, DeviceType >::numFieldsInFamily ( int  familyOrdinal) const
inline

Definition at line 196 of file Intrepid2_BasisValues.hpp.

◆ numTensorDataFamilies()

template<class Scalar , typename DeviceType >
KOKKOS_INLINE_FUNCTION int Intrepid2::BasisValues< Scalar, DeviceType >::numTensorDataFamilies ( ) const
inline

Definition at line 190 of file Intrepid2_BasisValues.hpp.

◆ operator()() [1/3]

template<class Scalar , typename DeviceType >
KOKKOS_INLINE_FUNCTION Scalar Intrepid2::BasisValues< Scalar, DeviceType >::operator() ( const int &  cellOrdinal,
const int &  fieldOrdinal,
const int &  pointOrdinal,
const int &  dim 
) const
inline

operator() for (C,F,P,D) data, which arises in CVFEM; at present unimplemented, and only declared here to allow a generic setJacobian() method in CellTools to compile.

Definition at line 266 of file Intrepid2_BasisValues.hpp.

References INTREPID2_TEST_FOR_EXCEPTION_DEVICE_SAFE.

◆ operator()() [2/3]

template<class Scalar , typename DeviceType >
KOKKOS_INLINE_FUNCTION Scalar Intrepid2::BasisValues< Scalar, DeviceType >::operator() ( const int &  fieldOrdinal,
const int &  pointOrdinal 
) const
inline

operator() for (F,P) scalar data; throws an exception if this is not a scalar-valued container

Definition at line 222 of file Intrepid2_BasisValues.hpp.

References INTREPID2_TEST_FOR_EXCEPTION_DEVICE_SAFE.

◆ operator()() [3/3]

template<class Scalar , typename DeviceType >
KOKKOS_INLINE_FUNCTION Scalar Intrepid2::BasisValues< Scalar, DeviceType >::operator() ( const int &  fieldOrdinal,
const int &  pointOrdinal,
const int &  dim 
) const
inline

operator() for (F,P,D) vector data; throws an exception if this is not a vector-valued container

Definition at line 255 of file Intrepid2_BasisValues.hpp.

References INTREPID2_TEST_FOR_EXCEPTION_DEVICE_SAFE, and Intrepid2::VectorData< Scalar, DeviceType >::isValid().

◆ ordinalFilter()

template<class Scalar , typename DeviceType >
Kokkos::View< ordinal_type *, DeviceType > Intrepid2::BasisValues< Scalar, DeviceType >::ordinalFilter ( ) const
inline

Definition at line 338 of file Intrepid2_BasisValues.hpp.

◆ rank()

template<class Scalar , typename DeviceType >
KOKKOS_INLINE_FUNCTION size_t Intrepid2::BasisValues< Scalar, DeviceType >::rank ( ) const
inline

Definition at line 317 of file Intrepid2_BasisValues.hpp.

◆ setOrdinalFilter()

template<class Scalar , typename DeviceType >
void Intrepid2::BasisValues< Scalar, DeviceType >::setOrdinalFilter ( Kokkos::View< ordinal_type *, DeviceType >  ordinalFilter)
inline

Definition at line 333 of file Intrepid2_BasisValues.hpp.

◆ tensorData() [1/2]

template<class Scalar , typename DeviceType >
TensorDataType & Intrepid2::BasisValues< Scalar, DeviceType >::tensorData ( )
inline

◆ tensorData() [2/2]

template<class Scalar , typename DeviceType >
const TensorDataType & Intrepid2::BasisValues< Scalar, DeviceType >::tensorData ( const int &  familyOrdinal) const
inline

TensorData accessor for multi-family scalar data.

Definition at line 168 of file Intrepid2_BasisValues.hpp.

References INTREPID2_TEST_FOR_EXCEPTION_DEVICE_SAFE.

◆ tensorDataFamilies()

template<class Scalar , typename DeviceType >
const Kokkos::Array< TensorDataType, Parameters::MaxTensorComponents > & Intrepid2::BasisValues< Scalar, DeviceType >::tensorDataFamilies ( ) const
inline

◆ vectorData()

template<class Scalar , typename DeviceType >
const VectorDataType & Intrepid2::BasisValues< Scalar, DeviceType >::vectorData ( ) const
inline

Member Data Documentation

◆ numTensorDataFamilies_

template<class Scalar , typename DeviceType >
int Intrepid2::BasisValues< Scalar, DeviceType >::numTensorDataFamilies_ = -1
private

Definition at line 46 of file Intrepid2_BasisValues.hpp.

◆ ordinalFilter_

template<class Scalar , typename DeviceType >
Kokkos::View<ordinal_type*,DeviceType> Intrepid2::BasisValues< Scalar, DeviceType >::ordinalFilter_
private

Definition at line 48 of file Intrepid2_BasisValues.hpp.

◆ tensorDataFamilies_

template<class Scalar , typename DeviceType >
Kokkos::Array<TensorDataType,Parameters::MaxTensorComponents> Intrepid2::BasisValues< Scalar, DeviceType >::tensorDataFamilies_
private

Definition at line 43 of file Intrepid2_BasisValues.hpp.

◆ vectorData_

template<class Scalar , typename DeviceType >
VectorDataType Intrepid2::BasisValues< Scalar, DeviceType >::vectorData_
private

Definition at line 44 of file Intrepid2_BasisValues.hpp.


The documentation for this class was generated from the following file: