16 #ifndef __INTREPID2_CUBATURE_HPP__
17 #define __INTREPID2_CUBATURE_HPP__
19 #include "Intrepid2_ConfigDefs.hpp"
88 template<
typename DeviceType = void,
89 typename pointValueType = double,
90 typename weightValueType =
double>
93 using ExecSpaceType =
typename DeviceType::execution_space;
94 using PointViewType = Kokkos::DynRankView<pointValueType,Kokkos::LayoutStride,DeviceType>;
95 using weightViewType = Kokkos::DynRankView<weightValueType,Kokkos::LayoutStride,DeviceType>;
97 using PointViewTypeAllocatable = Kokkos::DynRankView<pointValueType,DeviceType>;
98 using WeightViewTypeAllocatable = Kokkos::DynRankView<weightValueType,DeviceType>;
110 Kokkos::Array< PointViewTypeAllocatable, 1> cubaturePointComponents;
111 cubaturePointComponents[0] = allPointData;
123 WeightViewTypeAllocatable allWeightData(
"cubature weights",this->
getNumPoints());
124 Kokkos::Array< WeightDataType, 1> cubatureWeightComponents;
125 cubatureWeightComponents[0] = WeightDataType(allWeightData);
138 weightViewType )
const {
139 INTREPID2_TEST_FOR_EXCEPTION(
true, std::logic_error,
140 ">>> ERROR (Cubature::getCubature): this method should be overridden by derived classes.");
154 PointViewType )
const {
155 INTREPID2_TEST_FOR_EXCEPTION(
true, std::logic_error,
156 ">>> ERROR (Cubature::getCubature): this method should be overridden by derived classes.");
170 INTREPID2_TEST_FOR_EXCEPTION(1 != tensorCubPoints.
numTensorComponents(), std::logic_error,
"default implementation of getCubature only supports trivial tensor structure -- numTensorComponents() must be 1");
171 INTREPID2_TEST_FOR_EXCEPTION(1 != tensorCubWeights.
numTensorComponents(), std::logic_error,
"default implementation of getCubature only supports trivial tensor structure -- numTensorComponents() must be 1");
183 INTREPID2_TEST_FOR_WARNING(
true,
184 ">>> ERROR (Cubature::getNumPoints): this method should be overridden by derived classes.");
194 INTREPID2_TEST_FOR_WARNING(
true,
195 ">>> ERROR (Cubature::getDimension): this method should be overridden by derived classes.");
204 INTREPID2_TEST_FOR_WARNING(
true,
205 ">>> 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.