49 #ifndef __INTREPID2_CUBATURE_HPP__
50 #define __INTREPID2_CUBATURE_HPP__
52 #include "Intrepid2_ConfigDefs.hpp"
121 template<
typename DeviceType = void,
122 typename pointValueType = double,
123 typename weightValueType =
double>
126 using ExecSpaceType =
typename DeviceType::execution_space;
127 using PointViewType = Kokkos::DynRankView<pointValueType,Kokkos::LayoutStride,DeviceType>;
128 using weightViewType = Kokkos::DynRankView<weightValueType,Kokkos::LayoutStride,DeviceType>;
130 using PointViewTypeAllocatable = Kokkos::DynRankView<pointValueType,DeviceType>;
131 using WeightViewTypeAllocatable = Kokkos::DynRankView<weightValueType,DeviceType>;
143 Kokkos::Array< PointViewTypeAllocatable, 1> cubaturePointComponents;
144 cubaturePointComponents[0] = allPointData;
156 WeightViewTypeAllocatable allWeightData(
"cubature weights",this->
getNumPoints());
157 Kokkos::Array< WeightDataType, 1> cubatureWeightComponents;
158 cubatureWeightComponents[0] = WeightDataType(allWeightData);
171 weightViewType )
const {
172 INTREPID2_TEST_FOR_EXCEPTION(
true, std::logic_error,
173 ">>> ERROR (Cubature::getCubature): this method should be overridden by derived classes.");
187 PointViewType )
const {
188 INTREPID2_TEST_FOR_EXCEPTION(
true, std::logic_error,
189 ">>> ERROR (Cubature::getCubature): this method should be overridden by derived classes.");
203 INTREPID2_TEST_FOR_EXCEPTION(1 != tensorCubPoints.
numTensorComponents(), std::logic_error,
"default implementation of getCubature only supports trivial tensor structure -- numTensorComponents() must be 1");
204 INTREPID2_TEST_FOR_EXCEPTION(1 != tensorCubWeights.
numTensorComponents(), std::logic_error,
"default implementation of getCubature only supports trivial tensor structure -- numTensorComponents() must be 1");
216 INTREPID2_TEST_FOR_WARNING(
true,
217 ">>> ERROR (Cubature::getNumPoints): this method should be overridden by derived classes.");
227 INTREPID2_TEST_FOR_WARNING(
true,
228 ">>> ERROR (Cubature::getDimension): this method should be overridden by derived classes.");
237 INTREPID2_TEST_FOR_WARNING(
true,
238 ">>> ERROR (Cubature::getDimension): this method should be overridden by derived classes.");
Defines the base class for cubature (integration) rules in Intrepid.
View-like interface to tensor points; point components are stored separately; the appropriate coordin...
virtual void getCubature(const TensorPointDataType &tensorCubPoints, const TensorWeightDataType &tensorCubWeights) const
Returns tensor cubature points and weights. For non-tensor cubatures, the tensor structures are trivi...
virtual void getCubature(PointViewType, weightViewType) const
Returns cubature points and weights (return arrays must be pre-sized/pre-allocated).
virtual void getCubature(PointViewType, weightViewType, PointViewType) const
Returns cubature points and weights on physical cells (return arrays must be pre-sized/pre-allocated)...
View-like interface to tensor points; point components are stored separately; the appropriate coordin...
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...
Wrapper around a Kokkos::View that allows data that is constant or repeating in various logical dimen...
KOKKOS_INLINE_FUNCTION const Data< Scalar, DeviceType > & getTensorComponent(const ordinal_type &r) const
Returns the requested tensor component.
Header function for Intrepid2::Util class and other utility functions.
virtual TensorWeightDataType allocateCubatureWeights() const
Returns a weight container appropriate for passing to getCubature().
virtual ordinal_type getDimension() const
Returns dimension of the integration domain.
virtual const char * getName() const
Returns cubature name.
KOKKOS_INLINE_FUNCTION ordinal_type numTensorComponents() const
Returns the number of tensorial components.
Contains definitions of custom data types in Intrepid2.
virtual TensorPointDataType allocateCubaturePoints() const
Returns a points container appropriate for passing to getCubature().
virtual ordinal_type getNumPoints() const
Returns the number of cubature points.
View-like interface to tensor data; tensor components are stored separately and multiplied together a...
View-like interface to tensor data; tensor components are stored separately and multiplied together a...
virtual ordinal_type getAccuracy() const
Returns dimension of the integration domain.
KOKKOS_INLINE_FUNCTION ordinal_type numTensorComponents() const
Return the number of tensorial components.
KOKKOS_INLINE_FUNCTION ScalarView< PointScalar, DeviceType > getTensorComponent(const ordinal_type &r) const
Returns the requested tensor component.