50 #ifndef Intrepid2_TransformedVectorData_h 51 #define Intrepid2_TransformedVectorData_h 55 #include "Intrepid2_ScalarView.hpp" 63 template<
class Scalar,
typename DeviceType>
83 INTREPID2_TEST_FOR_EXCEPTION_DEVICE_SAFE(transform_.
isDiagonal() && (transform_.
getVariationTypes()[1] !=
CONSTANT), std::invalid_argument,
"When transform is diagonal, we assume in various places that there is no pointwise variation; the transform_ Data should have CONSTANT as its variation type in dimension 1.");
96 template<typename OtherDeviceType, class = typename std::enable_if<!std::is_same<DeviceType, OtherDeviceType>::value>::type>
99 transform_(transformedVectorData.
transform()),
100 vectorData_(transformedVectorData.
vectorData())
154 KOKKOS_INLINE_FUNCTION Scalar
operator()(
const int &cellOrdinal,
const int &fieldOrdinal,
const int &pointOrdinal,
const int &dim)
const 159 return vectorData_(fieldOrdinal,pointOrdinal,dim);
163 return transform_(cellOrdinal,pointOrdinal,dim,dim) * vectorData_(fieldOrdinal,pointOrdinal,dim);
168 for (
int d2=0; d2<transform_.
extent_int(2); d2++)
170 value += transform_(cellOrdinal,pointOrdinal,dim,d2) * vectorData_(fieldOrdinal,pointOrdinal,d2);
177 KOKKOS_INLINE_FUNCTION Scalar
transformWeight(
const int &cellOrdinal,
const int &pointOrdinal,
const int &dim1,
const int &dim2)
const 182 return (dim1 == dim2) ? 1.0 : 0.0;
186 return transform_(cellOrdinal,pointOrdinal,dim1,dim2);
203 KOKKOS_INLINE_FUNCTION
204 constexpr
unsigned rank()
const 210 KOKKOS_INLINE_FUNCTION
217 else if (r > 3)
return 1;
219 INTREPID2_TEST_FOR_EXCEPTION_DEVICE_SAFE(
true, std::invalid_argument,
"Unsupported rank");
KOKKOS_INLINE_FUNCTION bool isDiagonal() const
returns true for containers that have two dimensions marked as BLOCK_PLUS_DIAGONAL for which the non-...
KOKKOS_INLINE_FUNCTION int spaceDim() const
Returns the spatial dimension; corresponds to the third dimension of this container.
KOKKOS_INLINE_FUNCTION int numPoints() const
Returns the number of points; corresponds to the second dimension of this container.
KOKKOS_INLINE_FUNCTION constexpr bool isValid() const
returns true for containers that have data; false for those that don't (namely, those that have been ...
KOKKOS_INLINE_FUNCTION int extent_int(const int &r) const
Returns the logical extent in the specified dimension.
Reference-space field values for a basis, designed to support typical vector-valued bases...
KOKKOS_INLINE_FUNCTION int numFields() const
Returns the total number of fields; corresponds to the first dimension of this container.
KOKKOS_INLINE_FUNCTION int getDataExtent(const ordinal_type &d) const
returns the true extent of the data corresponding to the logical dimension provided; if the data does...
DataVariationType
Enumeration to indicate how data varies in a particular dimension of an Intrepid2::Data object...
Reference-space field values for a basis, designed to support typical vector-valued bases...
KOKKOS_INLINE_FUNCTION const Kokkos::Array< DataVariationType, 7 > & getVariationTypes() const
Returns an array with the variation types in each logical dimension.