49 #ifndef __INTREPID2_CUBATURE_TENSOR_HPP__
50 #define __INTREPID2_CUBATURE_TENSOR_HPP__
52 #include "Intrepid2_ConfigDefs.hpp"
61 template<
typename DeviceType = void,
62 typename pointValueType = double,
63 typename weightValueType =
double>
65 :
public Cubature<DeviceType,pointValueType,weightValueType> {
80 template<
typename cubPointValueType,
class ...cubPointProperties,
81 typename cubWeightValueType,
class ...cubWeightProperties>
83 getCubatureImpl( Kokkos::DynRankView<cubPointValueType, cubPointProperties...> cubPoints,
84 Kokkos::DynRankView<cubWeightValueType,cubWeightProperties...> cubWeights )
const;
86 using PointViewType =
typename Cubature<DeviceType,pointValueType,weightValueType>::PointViewType;
87 using weightViewType =
typename Cubature<DeviceType,pointValueType,weightValueType>::weightViewType;
90 using PointViewTypeAllocatable =
typename Cubature<DeviceType,pointValueType,weightValueType>::PointViewTypeAllocatable;
91 using WeightViewTypeAllocatable =
typename Cubature<DeviceType,pointValueType,weightValueType>::WeightViewTypeAllocatable;
100 weightViewType cubWeights )
const override {
111 std::vector< PointViewTypeAllocatable > cubaturePointComponents(
numCubatures_);
129 std::vector< WeightDataType > cubatureWeightComponents(
numCubatures_);
132 cubatureWeightComponents[i] = WeightDataType(WeightViewTypeAllocatable(
"cubature weights", cubatures_[i].
getNumPoints()));
158 ordinal_type numCubPoints = 1;
177 return "CubatureTensor";
183 ordinal_type r_val = 0;
206 CubatureTensor(
const CubatureTensor &b)
210 cubatures_[i] = b.cubatures_[i];
218 template<
typename CubatureType0,
219 typename CubatureType1>
221 const CubatureType1 cubature1 )
224 cubatures_[0] = cubature0;
225 cubatures_[1] = cubature1;
234 template<
typename CubatureType0,
235 typename CubatureType1,
236 typename CubatureType2>
238 const CubatureType1 cubature1,
239 const CubatureType2 cubature2 )
242 cubatures_[0] = cubature0;
243 cubatures_[1] = cubature1;
244 cubatures_[2] = cubature2;
252 template<
typename DirectCubature>
254 const DirectCubature cubatureExtension )
258 cubatures_[i] = cubatureTensor.cubatures_[i];
Defines the base class for cubature (integration) rules in Intrepid.
virtual ordinal_type getAccuracy() const override
Returns dimension of the integration domain.
View-like interface to tensor points; point components are stored separately; the appropriate coordin...
typename Cubature< DeviceType, pointValueType, weightValueType >::PointViewTypeAllocatable PointViewTypeAllocatable
KK: following should be updated with nate's tensor work.
ordinal_type getNumCubatures() const
Return the number of cubatures.
KOKKOS_INLINE_FUNCTION enable_if_t< rank==1, const Kokkos::View< typename RankExpander< DataScalar, rank >::value_type, DeviceType > & > getUnderlyingView() const
Returns the underlying view. Throws an exception if the underlying view is not rank 1...
Defines tensor-product cubature (integration) rules in Intrepid.
virtual ordinal_type getDimension() const override
Returns dimension of integration domain.
CubatureTensor(const CubatureTensor cubatureTensor, const DirectCubature cubatureExtension)
Constructor for extending an existing CubatureTensor object with an additional direct cubature rule...
Wrapper around a Kokkos::View that allows data that is constant or repeating in various logical dimen...
ordinal_type numCubatures_
Array of cubature rules.
void getAccuracy(ordinal_type *accuracy) const
Returns max. degree of polynomials that are integrated exactly.
KOKKOS_INLINE_FUNCTION const Data< Scalar, DeviceType > & getTensorComponent(const ordinal_type &r) const
Returns the requested tensor component.
virtual ordinal_type getNumPoints() const override
Returns the number of cubature points.
virtual void getCubature(const TensorPointDataType &tensorCubPoints, const TensorWeightDataType &tensorCubWeights) const override
Returns tensor cubature points and weights. For non-tensor cubatures, the tensor structures are trivi...
void getCubatureImpl(Kokkos::DynRankView< cubPointValueType, cubPointProperties...> cubPoints, Kokkos::DynRankView< cubWeightValueType, cubWeightProperties...> cubWeights) const
CubatureTensor(const CubatureType0 cubature0, const CubatureType1 cubature1)
Constructor.
Header file for the Intrepid2::Cubature class.
virtual TensorWeightDataType allocateCubatureWeights() const override
Returns a weight container appropriate for passing to getCubature().
virtual void getCubature(PointViewType cubPoints, weightViewType cubWeights) const override
Returns cubature points and weights (return arrays must be pre-sized/pre-allocated).
ordinal_type dimension_
Dimension of integration domain.
virtual const char * getName() const override
Returns cubature name.
Definition file for the Intrepid2::CubatureTensor class.
Defines direct cubature (integration) rules in Intrepid.
View-like interface to tensor data; tensor components are stored separately and multiplied together a...
virtual TensorPointDataType allocateCubaturePoints() const override
Returns a points container appropriate for passing to getCubature().
KOKKOS_INLINE_FUNCTION ScalarView< PointScalar, DeviceType > getTensorComponent(const ordinal_type &r) const
Returns the requested tensor component.
Header file for the Intrepid2::CubatureDirect class.
static constexpr ordinal_type MaxTensorComponents
Maximum number of tensor/Cartesian products that can be taken: this allows hypercube basis in 7D to b...
CubatureTensor(const CubatureType0 cubature0, const CubatureType1 cubature1, const CubatureType2 cubature2)
Constructor.