80 cubPointViewType _cubPoints;
81 cubWeightViewType _cubWeights;
82 const subcvCoordViewType _subcvCoords;
83 const subcvWeightViewType _subcvWeights;
84 const jacDetViewType _jacDets;
86 KOKKOS_INLINE_FUNCTION
87 Functor( cubPointViewType cubPoints_,
88 cubWeightViewType cubWeights_,
89 subcvCoordViewType subcvCoords_,
90 subcvWeightViewType subcvWeights_,
91 jacDetViewType jacDets_ )
92 : _cubPoints(cubPoints_), _cubWeights(cubWeights_),
93 _subcvCoords(subcvCoords_), _subcvWeights(subcvWeights_), _jacDets(jacDets_) {}
95 KOKKOS_INLINE_FUNCTION
96 void operator()(
const ordinal_type cell)
const {
97 const ordinal_type numNodesPerCell = _subcvCoords.extent(1);
98 const ordinal_type numNodesPerSubcv = _subcvCoords.extent(2);
99 const ordinal_type spaceDim = _subcvCoords.extent(3);
100 const ordinal_type numSubcvPoints = _subcvWeights.extent(0);
103 for (ordinal_type node=0;node<numNodesPerCell;++node) {
104 typename cubPointViewType::value_type val[3] = {};
105 for (ordinal_type subcv=0;subcv<numNodesPerSubcv;++subcv) {
106 for (ordinal_type i=0;i<spaceDim;++i)
107 val[i] += _subcvCoords(cell, node, subcv, i);
109 for (ordinal_type i=0;i<spaceDim;++i)
110 _cubPoints(cell, node, i) = (val[i]/numNodesPerSubcv);
114 for (ordinal_type node=0;node<numNodesPerCell;++node) {
115 typename cubWeightViewType::value_type val = 0;
116 for (ordinal_type pt=0;pt<numSubcvPoints;++pt)
117 val += _subcvWeights(pt)*_jacDets(cell, node, pt);
118 _cubWeights(cell, node) = val;