52#ifndef Intrepid2_TransformedBasisValues_h
53#define Intrepid2_TransformedBasisValues_h
57#include "Intrepid2_ScalarView.hpp"
66 template<
class Scalar,
typename DeviceType>
70 ordinal_type numCells_;
85 basisValues_(basisValues)
98 basisValues_(basisValues)
102 template<typename OtherDeviceType, class = typename std::enable_if<!std::is_same<DeviceType, OtherDeviceType>::value>::type>
105 numCells_(transformedVectorData.
numCells()),
106 transform_(transformedVectorData.
transform()),
107 basisValues_(transformedVectorData.basisValues())
150 template<
class ViewType>
161 transform_ = weightData;
166 if (transform_.
rank() == 4)
174 result.storeInPlaceProduct(weightData,transform_);
189 return basisValues_.extent_int(0);
195 return basisValues_.extent_int(1);
201 return basisValues_.extent_int(2);
205 KOKKOS_INLINE_FUNCTION Scalar
operator()(
const int &cellOrdinal,
const int &fieldOrdinal,
const int &pointOrdinal)
const
210 return basisValues_(fieldOrdinal,pointOrdinal);
214 return transform_(cellOrdinal,pointOrdinal) * basisValues_(fieldOrdinal,pointOrdinal);
219 KOKKOS_INLINE_FUNCTION Scalar
operator()(
const int &cellOrdinal,
const int &fieldOrdinal,
const int &pointOrdinal,
const int &dim)
const
224 return basisValues_(fieldOrdinal,pointOrdinal,dim);
228 return transform_(cellOrdinal,pointOrdinal,dim,dim) * basisValues_(fieldOrdinal,pointOrdinal,dim);
233 for (
int d2=0; d2<transform_.
extent_int(2); d2++)
235 value += transform_(cellOrdinal,pointOrdinal,dim,d2) * basisValues_(fieldOrdinal,pointOrdinal,d2);
242 KOKKOS_INLINE_FUNCTION Scalar
transformWeight(
const int &cellOrdinal,
const int &pointOrdinal)
const
251 return transform_(cellOrdinal,pointOrdinal);
256 KOKKOS_INLINE_FUNCTION Scalar
transformWeight(
const int &cellOrdinal,
const int &pointOrdinal,
const int &dim1,
const int &dim2)
const
261 return (dim1 == dim2) ? 1.0 : 0.0;
265 return transform_(cellOrdinal,pointOrdinal,dim1,dim2);
282 KOKKOS_INLINE_FUNCTION
285 return basisValues_.rank() + 1;
289 KOKKOS_INLINE_FUNCTION
296 else if (r > 3)
return 1;
Header file for the data-wrapper class Intrepid2::BasisValues.
Header function for Intrepid2::Util class and other utility functions.
enable_if_t< has_rank_method< Functor >::value, unsigned > KOKKOS_INLINE_FUNCTION getFunctorRank(const Functor &functor)
#define INTREPID2_TEST_FOR_EXCEPTION_DEVICE_SAFE(test, x, msg)
The data containers in Intrepid2 that support sum factorization and other reduced-data optimizations ...
const VectorDataType & vectorData() const
VectorData accessor.
Wrapper around a Kokkos::View that allows data that is constant or repeating in various logical dimen...
KOKKOS_INLINE_FUNCTION int extent_int(const int &r) const
Returns the logical extent in the specified dimension.
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 bool isDiagonal() const
returns true for containers that have two dimensions marked as BLOCK_PLUS_DIAGONAL for which the non-...
static Data< DataScalar, DeviceType > allocateInPlaceCombinationResult(const Data< DataScalar, DeviceType > &A, const Data< DataScalar, DeviceType > &B)
KOKKOS_INLINE_FUNCTION const Kokkos::Array< DataVariationType, 7 > & getVariationTypes() const
Returns an array with the variation types in each logical dimension.
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...
KOKKOS_INLINE_FUNCTION unsigned rank() const
Returns the logical rank of the Data container.
Reference-space field values for a basis, designed to support typical vector-valued bases.