Intrepid2
|
View-like interface to tensor points; point components are stored separately; the appropriate coordinate is determined from the composite point index and requested dimension at access time. More...
#include <Intrepid2_TensorPoints.hpp>
Public Types | |
using | value_type = PointScalar |
Public Member Functions | |
template<size_t numTensorComponents> | |
TensorPoints (Kokkos::Array< ScalarView< PointScalar, DeviceType >, numTensorComponents > pointTensorComponents) | |
Constructor with fixed-length Kokkos::Array argument. More... | |
TensorPoints (TensorPoints otherPointsContainer, std::vector< int > whichDims) | |
Constructor that takes a subset of the tensorial components of another points container. More... | |
TensorPoints (std::vector< ScalarView< PointScalar, DeviceType >> pointTensorComponents) | |
Constructor with variable-length std::vector argument. More... | |
TensorPoints (ScalarView< PointScalar, DeviceType > points) | |
Constructor for point set with trivial tensor structure. More... | |
template<class OtherPointsContainer > | |
void | copyPointsContainer (ScalarView< PointScalar, DeviceType > toPoints, OtherPointsContainer fromPoints) |
Copy from one points container, which may be an arbitrary functor, to a DynRankView. 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> | |
TensorPoints (const TensorPoints< PointScalar, OtherDeviceType > &tensorPoints) | |
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> | |
TensorPoints (const TensorPoints< PointScalar, OtherDeviceType > &tensorPoints) | |
copy-like constructor for differing memory spaces. This does a deep_copy of the underlying view. | |
TensorPoints () | |
Default constructor. TensorPoints::isValid() will return false. | |
ordinal_type | componentPointCount (const ordinal_type &tensorComponentOrdinal) const |
Returns the number of points in the indicated component. | |
template<typename iType0 , typename iType1 > | |
KOKKOS_INLINE_FUNCTION std::enable_if < (std::is_integral< iType0 > ::value &&std::is_integral < iType1 >::value), reference_type >::type | operator() (const iType0 &tensorPointIndex, const iType1 &dim) const |
Accessor that accepts a composite point index. More... | |
template<typename iType0 , typename iType1 , size_t numTensorComponents> | |
KOKKOS_INLINE_FUNCTION std::enable_if < (std::is_integral< iType0 > ::value &&std::is_integral < iType1 >::value), reference_type >::type | operator() (const Kokkos::Array< iType0, numTensorComponents > &pointOrdinalComponents, const iType1 &dim) const |
Accessor that accepts a a fixed-length array with entries corresponding to component indices. More... | |
template<typename iType > | |
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. More... | |
template<typename iType > | |
KOKKOS_INLINE_FUNCTION constexpr std::enable_if < std::is_integral< iType > ::value, size_t >::type | extent (const iType &r) const |
Returns the logical extent in the requested dimension. More... | |
ScalarView< PointScalar, DeviceType > | allocateAndFillExpandedRawPointView () const |
This method is for compatibility with existing methods that take raw point views. Note that in general it is probably better for performance to make the existing methods accept a TensorPoints object, since that can dramatically reduce memory footprint, and avoids an allocation here. | |
KOKKOS_INLINE_FUNCTION ScalarView< PointScalar, DeviceType > | getTensorComponent (const ordinal_type &r) const |
Returns the requested tensor component. More... | |
KOKKOS_INLINE_FUNCTION 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). | |
KOKKOS_INLINE_FUNCTION ordinal_type | numTensorComponents () const |
Returns the number of tensorial components. | |
KOKKOS_INLINE_FUNCTION constexpr ordinal_type | rank () const |
Return the rank of the container, which is 2. | |
Protected Types | |
using | reference_type = typename ScalarView< PointScalar, DeviceType >::reference_type |
Protected Member Functions | |
void | TEST_VALID_POINT_COMPONENTS () |
void | initialize () |
Initialize members based on constructor parameters. | |
Protected Attributes | |
Kokkos::Array< ScalarView < PointScalar, DeviceType > , Parameters::MaxTensorComponents > | pointTensorComponents_ |
ordinal_type | numTensorComponents_ |
ordinal_type | totalPointCount_ |
ordinal_type | totalDimension_ |
Kokkos::View< ordinal_type *, DeviceType > | dimToComponent_ |
Kokkos::View< ordinal_type *, DeviceType > | dimToComponentDim_ |
Kokkos::Array< ordinal_type, Parameters::MaxTensorComponents > | pointModulus_ |
Kokkos::Array< ordinal_type, Parameters::MaxTensorComponents > | pointDivisor_ |
bool | isValid_ |
View-like interface to tensor points; point components are stored separately; the appropriate coordinate is determined from the composite point index and requested dimension at access time.
Definition at line 26 of file Intrepid2_TensorPoints.hpp.
|
inline |
Constructor with fixed-length Kokkos::Array argument.
[in] | pointTensorComponents | - the components representing the points. |
TensorPoints has shape (P,D), where P is the product of the first dimensions of the component points, and D is the sum of the second dimensions.
Definition at line 107 of file Intrepid2_TensorPoints.hpp.
References Intrepid2::TensorPoints< PointScalar, DeviceType >::initialize(), and Intrepid2::TensorPoints< PointScalar, DeviceType >::numTensorComponents().
|
inline |
Constructor that takes a subset of the tensorial components of another points container.
[in] | otherPointsContainer | - the original points container |
[in] | whichDims | - the tensorial component indices to take from the other container. |
Definition at line 127 of file Intrepid2_TensorPoints.hpp.
References Intrepid2::TensorPoints< PointScalar, DeviceType >::getTensorComponent(), and Intrepid2::TensorPoints< PointScalar, DeviceType >::initialize().
|
inline |
Constructor with variable-length std::vector argument.
[in] | pointTensorComponents | - the components representing the points. |
TensorPoints has shape (P,D), where P is the product of the first dimensions of the component points, and D is the sum of the second dimensions.
Definition at line 147 of file Intrepid2_TensorPoints.hpp.
References Intrepid2::TensorPoints< PointScalar, DeviceType >::initialize().
|
inline |
Constructor for point set with trivial tensor structure.
[in] | points | - the points, with shape (P,D). |
TensorPoints has the same shape (P,D) as the input points.
Definition at line 166 of file Intrepid2_TensorPoints.hpp.
References Intrepid2::TensorPoints< PointScalar, DeviceType >::initialize().
|
inline |
Copy from one points container, which may be an arbitrary functor, to a DynRankView.
[in] | toPoints | - the container to copy to. |
[in] | fromPoints | - the container to copy from. |
Definition at line 181 of file Intrepid2_TensorPoints.hpp.
Referenced by Intrepid2::TensorPoints< PointScalar, DeviceType >::TensorPoints().
|
inline |
Returns the logical extent in the requested dimension.
[in] | r | - the dimension |
Definition at line 319 of file Intrepid2_TensorPoints.hpp.
|
inline |
Returns the logical extent in the requested dimension.
[in] | r | - the dimension |
Definition at line 296 of file Intrepid2_TensorPoints.hpp.
Referenced by Intrepid2::TensorPoints< PointScalar, DeviceType >::allocateAndFillExpandedRawPointView(), Intrepid2::Basis< DeviceType, OutputScalar, PointScalar >::allocateBasisValues(), Intrepid2::Basis_TensorBasis< BasisBaseClass >::allocateBasisValues(), Intrepid2::CellGeometry< PointScalar, spaceDim, DeviceType >::allocateJacobianData(), Intrepid2::CellGeometry< PointScalar, spaceDim, DeviceType >::getJacobianRefData(), and Intrepid2::CellGeometry< PointScalar, spaceDim, DeviceType >::setJacobian().
|
inline |
Returns the requested tensor component.
[in] | r | - the tensor ordinal of the component |
Definition at line 348 of file Intrepid2_TensorPoints.hpp.
Referenced by Intrepid2::Basis_TensorBasis< BasisBaseClass >::allocateBasisValues(), Intrepid2::CellGeometry< PointScalar, spaceDim, DeviceType >::allocateJacobianData(), Intrepid2::CubatureTensor< DeviceType, pointValueType, weightValueType >::getCubature(), Intrepid2::CubatureTensorPyr< DeviceType, pointValueType, weightValueType >::getCubature(), Intrepid2::Cubature< DeviceType, pointValueType, weightValueType >::getCubature(), Intrepid2::CellGeometry< PointScalar, spaceDim, DeviceType >::getJacobianRefData(), Intrepid2::Basis_TensorBasis< BasisBaseClass >::getValues(), and Intrepid2::TensorPoints< PointScalar, DeviceType >::TensorPoints().
|
inline |
Accessor that accepts a composite point index.
[in] | tensorPointIndex | - the composite point index. |
[in] | dim | - the coordinate dimension. From tensorPointIndex, we can determine a point index for each component. From dim, we can determine which component contains the coordinate of interest, and the coordinate dimension in that component. |
Definition at line 262 of file Intrepid2_TensorPoints.hpp.
|
inline |
Accessor that accepts a a fixed-length array with entries corresponding to component indices.
[in] | pointOrdinalComponents | - the component point indices. |
[in] | dim | - the coordinate dimension. From dim, we can determine which component contains the coordinate of interest, and the coordinate dimension in that component. We use the indicated point index for that component specified in pointOrdinalComponents to return the appropriate coordinate. |
Definition at line 281 of file Intrepid2_TensorPoints.hpp.