49 #ifndef __INTREPID2_CUBATURE_TENSOR_PYR_HPP__
50 #define __INTREPID2_CUBATURE_TENSOR_PYR_HPP__
59 template<
typename ExecSpaceType = void,
60 typename pointValueType = double,
61 typename weightValueType =
double>
63 :
public CubatureTensor<ExecSpaceType,pointValueType,weightValueType> {
66 template<
typename cubPointViewType,
67 typename cubWeightViewType>
69 cubPointViewType _cubPoints;
70 cubWeightViewType _cubWeights;
72 KOKKOS_INLINE_FUNCTION
73 Functor( cubPointViewType cubPoints_,
74 cubWeightViewType cubWeights_)
75 : _cubPoints(cubPoints_), _cubWeights(cubWeights_) {}
77 KOKKOS_INLINE_FUNCTION
78 void operator()(
const ordinal_type i)
const {
79 const auto tmp = 0.5*(1.0 - _cubPoints(i,2));
80 _cubPoints(i,0) *= tmp;
81 _cubPoints(i,1) *= tmp;
82 _cubPoints(i,2) = 1.0 - tmp;
84 _cubWeights(i) /= 8.0;
89 template<
typename cubPointValueType,
class ...cubPointProperties,
90 typename cubWeightValueType,
class ...cubWeightProperties>
92 getCubatureImpl( Kokkos::DynRankView<cubPointValueType, cubPointProperties...> cubPoints,
93 Kokkos::DynRankView<cubWeightValueType,cubWeightProperties...> cubWeights )
const;
95 typedef typename Cubature<ExecSpaceType,pointValueType,weightValueType>::PointViewType PointViewType;
96 typedef typename Cubature<ExecSpaceType,pointValueType,weightValueType>::weightViewType weightViewType;
103 weightViewType cubWeights )
const {
104 getCubatureImpl( cubPoints,
109 :
CubatureTensor<ExecSpaceType,pointValueType,weightValueType>() {}
111 CubatureTensorPyr(
const CubatureTensorPyr &b)
112 : CubatureTensor<ExecSpaceType,pointValueType,weightValueType>(b) {}
114 template<
typename CubatureLineType>
115 CubatureTensorPyr(
const CubatureLineType line )
116 : CubatureTensor<ExecSpaceType,pointValueType,weightValueType>(line, line, line) {}
118 template<
typename CubatureLineType0,
119 typename CubatureLineType1,
120 typename CubatureLineType2>
121 CubatureTensorPyr(
const CubatureLineType0 line0,
122 const CubatureLineType1 line1,
123 const CubatureLineType2 line2 )
124 : CubatureTensor<ExecSpaceType,pointValueType,weightValueType>(line0, line1, line2) {}
Defines tensor-product cubature (integration) rules in Intrepid.
Defines tensor-product cubature (integration) rules in Intrepid.
virtual void getCubature(PointViewType cubPoints, weightViewType cubWeights) const
Returns cubature points and weights (return arrays must be pre-sized/pre-allocated).
Definition file for the Intrepid2::CubatureTensorPyr class.
Header file for the Intrepid2::CubatureTensor class.