49 #ifndef __INTREPID2_CUBATURE_DIRECT_HPP__
50 #define __INTREPID2_CUBATURE_DIRECT_HPP__
52 #include "Intrepid2_ConfigDefs.hpp"
73 template<
typename ExecSpaceType = void,
74 typename pointValueType = double,
75 typename weightValueType =
double>
77 :
public Cubature<ExecSpaceType,pointValueType,weightValueType> {
109 Kokkos::DynRankView<pointValueType,ExecSpaceType>
points_;
113 Kokkos::DynRankView<weightValueType,ExecSpaceType>
weights_;
135 template<
typename cubPointValueType,
class ...cubPointProperties,
136 typename cubWeightValueType,
class ...cubWeightProperties>
139 Kokkos::DynRankView<cubWeightValueType,cubWeightProperties...> cubWeights,
141 #ifdef HAVE_INTREPID2_DEBUG
143 INTREPID2_TEST_FOR_EXCEPTION( cubPoints.rank() != 2, std::invalid_argument,
144 ">>> ERROR (CubatureDirect): cubPoints must be rank 2." );
146 INTREPID2_TEST_FOR_EXCEPTION( cubWeights.rank() != 1, std::invalid_argument,
147 ">>> ERROR (CubatureDirect): cubPoints must be rank 1." );
149 INTREPID2_TEST_FOR_EXCEPTION( static_cast<ordinal_type>(cubPoints.extent(0)) < this->
getNumPoints() ||
150 static_cast<ordinal_type>(cubPoints.extent(1)) < this->
getDimension(), std::out_of_range,
151 ">>> ERROR (CubatureDirect): Insufficient space allocated for cubature points.");
153 INTREPID2_TEST_FOR_EXCEPTION( static_cast<ordinal_type>(cubWeights.extent(0)) < this->
getNumPoints(), std::out_of_range,
154 ">>> ERROR (CubatureDirect): Insufficient space allocated for cubature weights.");
157 typedef Kokkos::pair<ordinal_type,ordinal_type> range_type;
162 const auto src = Kokkos::subdynrankview(cubData.
points_, pointRange, dimRange);
163 auto dst = Kokkos::subdynrankview(cubPoints, pointRange, dimRange);
165 Kokkos::deep_copy( dst, src );
168 const auto src = Kokkos::subdynrankview(cubData.
weights_, pointRange);
169 auto dst = Kokkos::subdynrankview(cubWeights, pointRange);
171 Kokkos::deep_copy(dst ,src);
180 typedef typename Cubature<ExecSpaceType,pointValueType,weightValueType>::pointViewType pointViewType;
181 typedef typename Cubature<ExecSpaceType,pointValueType,weightValueType>::weightViewType weightViewType;
188 weightViewType cubWeights )
const {
213 return "CubatureDirect";
230 CubatureDirect(
const CubatureDirect &b)
235 CubatureDirect(
const ordinal_type degree,
236 const ordinal_type dimension)