49 #ifndef __INTREPID2_PROJECTIONTOOLSDEFL2_HPP__ 50 #define __INTREPID2_PROJECTIONTOOLSDEFL2_HPP__ 58 namespace Experimental {
61 template<
typename ViewType1,
typename ViewType2,
typename ViewType3,
62 typename ViewType4,
typename ViewType5>
64 ViewType1 basisCoeffs_;
65 const ViewType2 tagToOrdinal_;
66 const ViewType3 targetEPointsRange_;
67 const ViewType4 targetAtTargetEPoints_;
68 const ViewType5 basisAtTargetEPoints_;
69 ordinal_type numVertices_;
73 ViewType4 targetAtTargetEPoints, ViewType5 basisAtTargetEPoints, ordinal_type numVertices) :
74 basisCoeffs_(basisCoeffs), tagToOrdinal_(tagToOrdinal), targetEPointsRange_(targetEPointsRange),
75 targetAtTargetEPoints_(targetAtTargetEPoints), basisAtTargetEPoints_(basisAtTargetEPoints), numVertices_(numVertices) {}
78 KOKKOS_INLINE_FUNCTION
79 operator()(
const ordinal_type ic)
const {
80 for(ordinal_type iv=0; iv<numVertices_; ++iv) {
81 ordinal_type idof = tagToOrdinal_(0, iv, 0);
82 ordinal_type pt = targetEPointsRange_(0,iv).first;
84 basisCoeffs_(ic,idof) = targetAtTargetEPoints_(ic,pt)/basisAtTargetEPoints_(ic,idof,pt,0);
90 template<
typename ViewType1,
typename ViewType2,
typename ViewType3,
91 typename ViewType4,
typename ViewType5,
typename ViewType6>
93 const ViewType1 basisCoeffs_;
94 const ViewType2 negPartialProj_;
95 const ViewType2 basisDofDofAtBasisEPoints_;
96 const ViewType2 basisAtBasisEPoints_;
97 const ViewType3 basisEWeights_;
98 const ViewType2 wBasisDofAtBasisEPoints_;
99 const ViewType3 targetEWeights_;
100 const ViewType2 basisAtTargetEPoints_;
101 const ViewType2 wBasisDofAtTargetEPoints_;
102 const ViewType4 computedDofs_;
103 const ViewType5 tagToOrdinal_;
104 const ViewType6 targetAtTargetEPoints_;
105 const ViewType2 targetTanAtTargetEPoints_;
106 const ViewType2 refEdgesVec_;
107 ordinal_type fieldDim_;
108 ordinal_type edgeCardinality_;
109 ordinal_type offsetBasis_;
110 ordinal_type offsetTarget_;
111 ordinal_type numVertexDofs_;
112 ordinal_type edgeDim_;
116 const ViewType2 basisAtBasisEPoints,
const ViewType3 basisEWeights,
const ViewType2 wBasisDofAtBasisEPoints,
const ViewType3 targetEWeights,
117 const ViewType2 basisAtTargetEPoints,
const ViewType2 wBasisDofAtTargetEPoints,
const ViewType4 computedDofs,
const ViewType5 tagToOrdinal,
118 const ViewType6 targetAtTargetEPoints,
const ViewType2 targetTanAtTargetEPoints,
const ViewType2 refEdgesVec,
119 ordinal_type fieldDim, ordinal_type edgeCardinality, ordinal_type offsetBasis,
120 ordinal_type offsetTarget, ordinal_type numVertexDofs, ordinal_type edgeDim, ordinal_type iedge) :
121 basisCoeffs_(basisCoeffs), negPartialProj_(negPartialProj), basisDofDofAtBasisEPoints_(basisDofDofAtBasisEPoints),
122 basisAtBasisEPoints_(basisAtBasisEPoints), basisEWeights_(basisEWeights), wBasisDofAtBasisEPoints_(wBasisDofAtBasisEPoints), targetEWeights_(targetEWeights),
123 basisAtTargetEPoints_(basisAtTargetEPoints), wBasisDofAtTargetEPoints_(wBasisDofAtTargetEPoints),
124 computedDofs_(computedDofs), tagToOrdinal_(tagToOrdinal), targetAtTargetEPoints_(targetAtTargetEPoints),
125 targetTanAtTargetEPoints_(targetTanAtTargetEPoints), refEdgesVec_(refEdgesVec),
126 fieldDim_(fieldDim), edgeCardinality_(edgeCardinality), offsetBasis_(offsetBasis),
127 offsetTarget_(offsetTarget), numVertexDofs_(numVertexDofs), edgeDim_(edgeDim), iedge_(iedge)
131 KOKKOS_INLINE_FUNCTION
132 operator()(
const ordinal_type ic)
const {
133 for(ordinal_type j=0; j <edgeCardinality_; ++j) {
134 ordinal_type jdof =tagToOrdinal_(edgeDim_, iedge_, j);
135 for(ordinal_type iq=0; iq <ordinal_type(basisEWeights_.extent(0)); ++iq) {
136 for(ordinal_type d=0; d <fieldDim_; ++d)
137 basisDofDofAtBasisEPoints_(ic,j,iq) += basisAtBasisEPoints_(ic,jdof,offsetBasis_+iq,d)*refEdgesVec_(iedge_,d);
138 wBasisDofAtBasisEPoints_(ic,j,iq) = basisDofDofAtBasisEPoints_(ic,j,iq)*basisEWeights_(iq);
140 for(ordinal_type iq=0; iq <ordinal_type(targetEWeights_.extent(0)); ++iq) {
141 for(ordinal_type d=0; d <fieldDim_; ++d)
142 wBasisDofAtTargetEPoints_(ic,j,iq) += basisAtTargetEPoints_(ic,jdof,offsetTarget_+iq,d)*refEdgesVec_(iedge_,d)*targetEWeights_(iq);
146 for(ordinal_type iq=0; iq <ordinal_type(targetEWeights_.extent(0)); ++iq)
147 for(ordinal_type d=0; d <fieldDim_; ++d)
148 targetTanAtTargetEPoints_(ic,iq) += targetAtTargetEPoints_(ic,offsetTarget_+iq,d)*refEdgesVec_(iedge_,d);
150 for(ordinal_type j=0; j <numVertexDofs_; ++j) {
151 ordinal_type jdof = computedDofs_(j);
152 for(ordinal_type iq=0; iq <ordinal_type(basisEWeights_.extent(0)); ++iq)
153 for(ordinal_type d=0; d <fieldDim_; ++d)
154 negPartialProj_(ic,iq) -= basisCoeffs_(ic,jdof)*basisAtBasisEPoints_(ic,jdof,offsetBasis_+iq,d)*refEdgesVec_(iedge_,d);
159 template<
typename ViewType1,
typename ViewType2,
typename ViewType3,
160 typename ViewType4,
typename ViewType5,
typename ViewType6,
typename ViewType7,
typename ViewType8>
162 const ViewType1 basisCoeffs_;
163 const ViewType2 negPartialProj_;
164 const ViewType2 faceBasisDofAtBasisEPoints_;
165 const ViewType2 basisAtBasisEPoints_;
166 const ViewType3 basisEWeights_;
167 const ViewType2 wBasisDofAtBasisEPoints_;
168 const ViewType3 targetEWeights_;
169 const ViewType2 basisAtTargetEPoints_;
170 const ViewType2 wBasisDofAtTargetEPoints_;
171 const ViewType4 computedDofs_;
172 const ViewType5 tagToOrdinal_;
173 const ViewType6 orts_;
174 const ViewType7 targetAtTargetEPoints_;
175 const ViewType2 targetDofAtTargetEPoints_;
176 const ViewType2 faceCoeff_;
177 const ViewType8 faceParametrization_;
178 ordinal_type fieldDim_;
179 ordinal_type faceCardinality_;
180 ordinal_type offsetBasis_;
181 ordinal_type offsetTarget_;
182 ordinal_type numVertexEdgeDofs_;
183 ordinal_type numFaces_;
184 ordinal_type faceDim_;
185 ordinal_type faceDofDim_;
189 bool isHCurlBasis_, isHDivBasis_;
192 const ViewType2 basisAtBasisEPoints,
const ViewType3 basisEWeights,
const ViewType2 wBasisDofAtBasisEPoints,
const ViewType3 targetEWeights,
193 const ViewType2 basisAtTargetEPoints,
const ViewType2 wBasisDofAtTargetEPoints,
const ViewType4 computedDofs,
const ViewType5 tagToOrdinal,
194 const ViewType6 orts,
const ViewType7 targetAtTargetEPoints,
const ViewType2 targetDofAtTargetEPoints,
const ViewType2 faceCoeff,
195 const ViewType8 faceParametrization, ordinal_type fieldDim, ordinal_type faceCardinality, ordinal_type offsetBasis,
196 ordinal_type offsetTarget, ordinal_type numVertexEdgeDofs, ordinal_type numFaces, ordinal_type faceDim, ordinal_type faceDofDim,
197 ordinal_type dim, ordinal_type iface,
unsigned topoKey,
bool isHCurlBasis,
bool isHDivBasis) :
198 basisCoeffs_(basisCoeffs), negPartialProj_(negPartialProj), faceBasisDofAtBasisEPoints_(faceBasisDofAtBasisEPoints),
199 basisAtBasisEPoints_(basisAtBasisEPoints), basisEWeights_(basisEWeights), wBasisDofAtBasisEPoints_(wBasisDofAtBasisEPoints), targetEWeights_(targetEWeights),
200 basisAtTargetEPoints_(basisAtTargetEPoints), wBasisDofAtTargetEPoints_(wBasisDofAtTargetEPoints),
201 computedDofs_(computedDofs), tagToOrdinal_(tagToOrdinal), orts_(orts), targetAtTargetEPoints_(targetAtTargetEPoints),
202 targetDofAtTargetEPoints_(targetDofAtTargetEPoints), faceCoeff_(faceCoeff),
203 faceParametrization_(faceParametrization),
204 fieldDim_(fieldDim), faceCardinality_(faceCardinality), offsetBasis_(offsetBasis),
205 offsetTarget_(offsetTarget), numVertexEdgeDofs_(numVertexEdgeDofs), numFaces_(numFaces),
206 faceDim_(faceDim), faceDofDim_(faceDofDim), dim_(dim), iface_(iface), topoKey_(topoKey),
207 isHCurlBasis_(isHCurlBasis), isHDivBasis_(isHDivBasis)
211 KOKKOS_INLINE_FUNCTION
212 operator()(
const ordinal_type ic)
const {
214 ordinal_type fOrt[6];
215 orts_(ic).getFaceOrientation(fOrt, numFaces_);
216 ordinal_type ort = fOrt[iface_];
219 typename ViewType3::value_type data[3*3];
220 auto tangentsAndNormal = ViewType3(data, dim_, dim_);
222 if(isHCurlBasis_ || isHDivBasis_)
226 for(ordinal_type d=0; d <dim_; ++d)
227 for(ordinal_type itan=0; itan <faceDim_; ++itan) {
228 faceCoeff_(ic,d,itan) = tangentsAndNormal(itan,d);
230 }
else if (isHDivBasis_) {
231 for(ordinal_type d=0; d <dim_; ++d)
232 faceCoeff_(ic,d,0) = tangentsAndNormal(dim_-1,d);
234 faceCoeff_(ic,0,0) = 1;
235 for(ordinal_type j=0; j <faceCardinality_; ++j) {
236 ordinal_type jdof = tagToOrdinal_(faceDim_, iface_, j);
237 for(ordinal_type itan=0; itan <faceDofDim_; ++itan) {
238 for(ordinal_type iq=0; iq <ordinal_type(basisEWeights_.extent(0)); ++iq) {
239 for(ordinal_type d=0; d <fieldDim_; ++d)
240 faceBasisDofAtBasisEPoints_(ic,j,iq,itan) += faceCoeff_(ic,d, itan)*basisAtBasisEPoints_(ic,jdof,offsetBasis_+iq,d);
241 wBasisDofAtBasisEPoints_(ic,j,iq,itan) = faceBasisDofAtBasisEPoints_(ic,j,iq,itan) * basisEWeights_(iq);
243 for(ordinal_type iq=0; iq <ordinal_type(targetEWeights_.extent(0)); ++iq) {
244 typename ViewType2::value_type sum=0;
245 for(ordinal_type d=0; d <fieldDim_; ++d)
246 sum += faceCoeff_(ic, d, itan)*basisAtTargetEPoints_(ic,jdof,offsetTarget_+iq,d);
247 wBasisDofAtTargetEPoints_(ic,j,iq,itan) = sum * targetEWeights_(iq);
252 for(ordinal_type d=0; d <fieldDim_; ++d)
253 for(ordinal_type itan=0; itan <faceDofDim_; ++itan) {
254 for(ordinal_type iq=0; iq <ordinal_type(targetEWeights_.extent(0)); ++iq)
255 targetDofAtTargetEPoints_(ic,iq,itan) += faceCoeff_(ic, d, itan)*targetAtTargetEPoints_(ic,offsetTarget_+iq,d);
258 for(ordinal_type j=0; j <numVertexEdgeDofs_; ++j) {
259 ordinal_type jdof = computedDofs_(j);
260 for(ordinal_type iq=0; iq <ordinal_type(basisEWeights_.extent(0)); ++iq)
261 for(ordinal_type d=0; d <fieldDim_; ++d)
262 for(ordinal_type itan=0; itan <faceDofDim_; ++itan)
263 negPartialProj_(ic,iq,itan) -= basisCoeffs_(ic,jdof)*faceCoeff_(ic, d, itan)*basisAtBasisEPoints_(ic,jdof,offsetBasis_+iq,d);
269 template<
typename ViewType1,
typename ViewType2,
typename ViewType3,
270 typename ViewType4,
typename ViewType5>
272 const ViewType1 basisCoeffs_;
273 const ViewType2 negPartialProj_;
274 const ViewType2 internalBasisAtBasisEPoints_;
275 const ViewType2 basisAtBasisEPoints_;
276 const ViewType3 basisEWeights_;
277 const ViewType2 wBasisAtBasisEPoints_;
278 const ViewType3 targetEWeights_;
279 const ViewType2 basisAtTargetEPoints_;
280 const ViewType2 wBasisDofAtTargetEPoints_;
281 const ViewType4 computedDofs_;
282 const ViewType5 elemDof_;
283 ordinal_type fieldDim_;
284 ordinal_type numElemDofs_;
285 ordinal_type offsetBasis_;
286 ordinal_type offsetTarget_;
287 ordinal_type numVertexEdgeFaceDofs_;
290 const ViewType2 basisAtBasisEPoints,
const ViewType3 basisEWeights,
const ViewType2 wBasisAtBasisEPoints,
const ViewType3 targetEWeights,
291 const ViewType2 basisAtTargetEPoints,
const ViewType2 wBasisDofAtTargetEPoints,
const ViewType4 computedDofs,
const ViewType5 elemDof,
292 ordinal_type fieldDim, ordinal_type numElemDofs, ordinal_type offsetBasis, ordinal_type offsetTarget, ordinal_type numVertexEdgeFaceDofs) :
293 basisCoeffs_(basisCoeffs), negPartialProj_(negPartialProj), internalBasisAtBasisEPoints_(internalBasisAtBasisEPoints),
294 basisAtBasisEPoints_(basisAtBasisEPoints), basisEWeights_(basisEWeights), wBasisAtBasisEPoints_(wBasisAtBasisEPoints), targetEWeights_(targetEWeights),
295 basisAtTargetEPoints_(basisAtTargetEPoints), wBasisDofAtTargetEPoints_(wBasisDofAtTargetEPoints),
296 computedDofs_(computedDofs), elemDof_(elemDof), fieldDim_(fieldDim), numElemDofs_(numElemDofs), offsetBasis_(offsetBasis),
297 offsetTarget_(offsetTarget), numVertexEdgeFaceDofs_(numVertexEdgeFaceDofs) {}
300 KOKKOS_INLINE_FUNCTION
301 operator()(
const ordinal_type ic)
const {
303 for(ordinal_type j=0; j <numElemDofs_; ++j) {
304 ordinal_type idof = elemDof_(j);
305 for(ordinal_type d=0; d <fieldDim_; ++d) {
306 for(ordinal_type iq=0; iq <ordinal_type(basisEWeights_.extent(0)); ++iq) {
307 internalBasisAtBasisEPoints_(ic,j,iq,d) = basisAtBasisEPoints_(ic,idof,offsetBasis_+iq,d);
308 wBasisAtBasisEPoints_(ic,j,iq,d) = internalBasisAtBasisEPoints_(ic,j,iq,d) * basisEWeights_(iq);
310 for(ordinal_type iq=0; iq <ordinal_type(targetEWeights_.extent(0)); ++iq) {
311 wBasisDofAtTargetEPoints_(ic,j,iq,d) = basisAtTargetEPoints_(ic,idof,offsetTarget_+iq,d)* targetEWeights_(iq);
315 for(ordinal_type j=0; j < numVertexEdgeFaceDofs_; ++j) {
316 ordinal_type jdof = computedDofs_(j);
317 for(ordinal_type iq=0; iq <ordinal_type(basisEWeights_.extent(0)); ++iq)
318 for(ordinal_type d=0; d <fieldDim_; ++d) {
319 negPartialProj_(ic,iq,d) -= basisCoeffs_(ic,jdof)*basisAtBasisEPoints_(ic,jdof,offsetBasis_+iq,d);
326 template<
typename DeviceType>
327 template<
typename BasisType,
328 typename ortValueType,
class ...ortProperties>
331 const Kokkos::DynRankView<ortValueType, ortProperties...> orts,
332 const BasisType* cellBasis,
334 const EvalPointsType ePointType) {
335 typedef typename BasisType::scalarType scalarType;
336 typedef Kokkos::DynRankView<scalarType,ortProperties...> ScalarViewType;
337 const auto cellTopo = cellBasis->getBaseCellTopology();
339 ordinal_type dim = cellTopo.getDimension();
340 ordinal_type numCells = ePoints.extent(0);
341 const ordinal_type edgeDim = 1;
342 const ordinal_type faceDim = 2;
344 ordinal_type numVertices = (cellBasis->getDofCount(0, 0) > 0) ? cellTopo.getVertexCount() : 0;
345 ordinal_type numEdges = (cellBasis->getDofCount(edgeDim, 0) > 0) ? cellTopo.getEdgeCount() : 0;
346 ordinal_type numFaces = (cellBasis->getDofCount(faceDim, 0) > 0) ? cellTopo.getFaceCount() : 0;
347 ordinal_type numVols = (cellBasis->getDofCount(dim, 0) > 0);
351 typename RefSubcellParametrization<DeviceType>::ConstViewType subcellParamEdge, subcellParamFace;
359 ScalarViewType workView(
"workView", numCells, projStruct->
getMaxNumEvalPoints(ePointType), dim-1);
362 for(ordinal_type iv=0; iv<numVertices; ++iv) {
363 auto vertexEPoints = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getEvalPoints(0,iv,ePointType));
365 ePointsRange(0, iv), Kokkos::ALL()), vertexEPoints);
369 for(ordinal_type ie=0; ie<numEdges; ++ie) {
370 auto edgePointsRange = ePointsRange(edgeDim, ie);
371 auto edgeEPoints = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getEvalPoints(edgeDim,ie,ePointType));
373 const auto topoKey = refTopologyKey(edgeDim,ie);
376 Kokkos::RangePolicy<ExecSpaceType, int> (0, numCells),
377 KOKKOS_LAMBDA (
const size_t ic) {
379 ordinal_type eOrt[12];
380 orts(ic).getEdgeOrientation(eOrt, numEdges);
381 ordinal_type ort = eOrt[ie];
384 edgeEPoints, subcellParamEdge, topoKey, ie, ort);
388 for(ordinal_type iface=0; iface<numFaces; ++iface) {
389 auto facePointsRange = ePointsRange(faceDim, iface);
390 auto faceEPoints = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getEvalPoints(faceDim,iface,ePointType));
392 const auto topoKey = refTopologyKey(faceDim,iface);
395 Kokkos::RangePolicy<ExecSpaceType, int> (0, numCells),
396 KOKKOS_LAMBDA (
const size_t ic) {
397 ordinal_type fOrt[6];
398 orts(ic).getFaceOrientation(fOrt, numFaces);
399 ordinal_type ort = fOrt[iface];
402 faceEPoints, subcellParamFace, topoKey, iface, ort);
408 auto pointsRange = ePointsRange(dim, 0);
409 auto cellEPoints = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getEvalPoints(dim,0,ePointType));
414 template<
typename DeviceType>
415 template<
typename basisCoeffsValueType,
class ...basisCoeffsProperties,
416 typename funValsValueType,
class ...funValsProperties,
418 typename ortValueType,
class ...ortProperties>
421 const Kokkos::DynRankView<funValsValueType,funValsProperties...> targetAtTargetEPoints,
422 const typename BasisType::ScalarViewType targetEPoints,
423 const Kokkos::DynRankView<ortValueType, ortProperties...> orts,
424 const BasisType* cellBasis,
427 typedef typename BasisType::scalarType scalarType;
428 typedef Kokkos::DynRankView<scalarType,DeviceType> ScalarViewType;
429 typedef Kokkos::pair<ordinal_type,ordinal_type> range_type;
430 const auto cellTopo = cellBasis->getBaseCellTopology();
431 ordinal_type dim = cellTopo.getDimension();
432 ordinal_type numTotalTargetEPoints(targetAtTargetEPoints.extent(1));
433 ordinal_type basisCardinality = cellBasis->getCardinality();
434 ordinal_type numCells = targetAtTargetEPoints.extent(0);
435 const ordinal_type edgeDim = 1;
436 const ordinal_type faceDim = 2;
437 const ordinal_type fieldDim = (targetAtTargetEPoints.rank()==2) ? 1 : targetAtTargetEPoints.extent(2);
439 ordinal_type numVertices = (cellBasis->getDofCount(0, 0) > 0) ? cellTopo.getVertexCount() : 0;
440 ordinal_type numEdges = (cellBasis->getDofCount(1, 0) > 0) ? cellTopo.getEdgeCount() : 0;
441 ordinal_type numFaces = (cellBasis->getDofCount(2, 0) > 0) ? cellTopo.getFaceCount() : 0;
443 ScalarViewType refEdgesVec(
"refEdgesVec", numEdges, dim);
444 ScalarViewType refFacesTangents(
"refFaceTangents", numFaces, dim, 2);
445 ScalarViewType refFacesNormal(
"refFaceNormal", numFaces, dim);
447 ordinal_type numVertexDofs = numVertices;
449 ordinal_type numEdgeDofs(0);
450 for(ordinal_type ie=0; ie<numEdges; ++ie)
451 numEdgeDofs += cellBasis->getDofCount(edgeDim,ie);
453 ordinal_type numFaceDofs(0);
454 for(ordinal_type iface=0; iface<numFaces; ++iface)
455 numFaceDofs += cellBasis->getDofCount(faceDim,iface);
457 Kokkos::View<ordinal_type*, DeviceType> computedDofs(
"computedDofs", numVertexDofs+numEdgeDofs+numFaceDofs);
464 ScalarViewType basisEPoints(
"basisEPoints",numCells,numTotalBasisEPoints, dim);
465 getL2EvaluationPoints(basisEPoints, orts, cellBasis, projStruct, EvalPointsType::BASIS);
467 auto tagToOrdinal = Kokkos::create_mirror_view_and_copy(MemSpaceType(), cellBasis->getAllDofOrdinal());
469 ScalarViewType basisAtBasisEPoints(
"basisAtBasisEPoints",numCells,basisCardinality, numTotalBasisEPoints, fieldDim);
470 ScalarViewType basisAtTargetEPoints(
"basisAtTargetEPoints",numCells,basisCardinality, numTotalTargetEPoints, fieldDim);
473 ScalarViewType nonOrientedBasisAtBasisEPoints(
"nonOrientedBasisAtBasisEPoints",numCells,basisCardinality, numTotalBasisEPoints);
474 ScalarViewType nonOrientedBasisAtTargetEPoints(
"nonOrientedBasisAtTargetEPoints",numCells,basisCardinality, numTotalTargetEPoints);
475 for(ordinal_type ic=0; ic<numCells; ++ic) {
476 cellBasis->getValues(Kokkos::subview(nonOrientedBasisAtTargetEPoints,ic,Kokkos::ALL(),Kokkos::ALL()), Kokkos::subview(targetEPoints, ic, Kokkos::ALL(), Kokkos::ALL()));
477 cellBasis->getValues(Kokkos::subview(nonOrientedBasisAtBasisEPoints,ic,Kokkos::ALL(),Kokkos::ALL()), Kokkos::subview(basisEPoints, ic, Kokkos::ALL(), Kokkos::ALL()));
480 Kokkos::ALL(),0), nonOrientedBasisAtBasisEPoints, orts, cellBasis);
482 Kokkos::ALL(), Kokkos::ALL(),0), nonOrientedBasisAtTargetEPoints, orts, cellBasis);
485 ScalarViewType nonOrientedBasisAtBasisEPoints(
"nonOrientedBasisAtBasisEPoints",numCells,basisCardinality, numTotalBasisEPoints,fieldDim);
486 ScalarViewType nonOrientedBasisAtTargetEPoints(
"nonOrientedBasisAtTargetEPoints",numCells,basisCardinality, numTotalTargetEPoints,fieldDim);
487 for(ordinal_type ic=0; ic<numCells; ++ic) {
488 cellBasis->getValues(Kokkos::subview(nonOrientedBasisAtTargetEPoints,ic,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL()), Kokkos::subview(targetEPoints, ic, Kokkos::ALL(), Kokkos::ALL()));
489 cellBasis->getValues(Kokkos::subview(nonOrientedBasisAtBasisEPoints,ic,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL()), Kokkos::subview(basisEPoints, ic, Kokkos::ALL(), Kokkos::ALL()));
497 auto hostComputedDofs = Kokkos::create_mirror_view(computedDofs);
498 ordinal_type computedDofsCount = 0;
499 for(ordinal_type iv=0; iv<numVertices; ++iv)
500 hostComputedDofs(computedDofsCount++) = cellBasis->getDofOrdinal(0, iv, 0);
502 for(ordinal_type ie=0; ie<numEdges; ++ie) {
503 ordinal_type edgeCardinality = cellBasis->getDofCount(edgeDim,ie);
504 for(ordinal_type i=0; i<edgeCardinality; ++i)
505 hostComputedDofs(computedDofsCount++) = cellBasis->getDofOrdinal(edgeDim, ie, i);
508 for(ordinal_type iface=0; iface<numFaces; ++iface) {
509 ordinal_type faceCardinality = cellBasis->getDofCount(faceDim,iface);
510 for(ordinal_type i=0; i<faceCardinality; ++i)
511 hostComputedDofs(computedDofsCount++) = cellBasis->getDofOrdinal(faceDim, iface, i);
513 Kokkos::deep_copy(computedDofs,hostComputedDofs);
516 bool isHGradBasis = (cellBasis->getFunctionSpace() == FUNCTION_SPACE_HGRAD);
517 bool isHCurlBasis = (cellBasis->getFunctionSpace() == FUNCTION_SPACE_HCURL);
518 bool isHDivBasis = (cellBasis->getFunctionSpace() == FUNCTION_SPACE_HDIV);
519 ordinal_type faceDofDim = isHCurlBasis ? 2 : 1;
520 ScalarViewType edgeCoeff(
"edgeCoeff", fieldDim);
523 const Kokkos::RangePolicy<ExecSpaceType> policy(0, numCells);
527 auto targetEPointsRange = Kokkos::create_mirror_view_and_copy(MemSpaceType(), projStruct->
getTargetPointsRange());
529 decltype(targetAtTargetEPoints), decltype(basisAtTargetEPoints)> functorType;
530 Kokkos::parallel_for(policy, functorType(basisCoeffs, tagToOrdinal, targetEPointsRange,
531 targetAtTargetEPoints, basisAtTargetEPoints, numVertices));
535 for(ordinal_type ie=0; ie<numEdges; ++ie) {
536 auto edgeVec = Kokkos::subview(refEdgesVec, ie, Kokkos::ALL());
549 }
else if(isHDivBasis) {
552 deep_copy(edgeVec, 1.0);
555 ordinal_type edgeCardinality = cellBasis->getDofCount(edgeDim,ie);
556 ordinal_type numBasisEPoints = range_size(basisEPointsRange(edgeDim, ie));
557 ordinal_type numTargetEPoints = range_size(targetEPointsRange(edgeDim, ie));
559 ScalarViewType basisDofAtBasisEPoints(
"BasisDofAtBasisEPoints",numCells,edgeCardinality, numBasisEPoints);
560 ScalarViewType tragetDofAtTargetEPoints(
"TargetDofAtTargetEPoints",numCells, numTargetEPoints);
561 ScalarViewType weightedBasisAtBasisEPoints(
"weightedTanBasisAtBasisEPoints",numCells,edgeCardinality, numBasisEPoints);
562 ScalarViewType weightedBasisAtTargetEPoints(
"weightedTanBasisAtTargetEPoints",numCells,edgeCardinality, numTargetEPoints);
563 ScalarViewType negPartialProj(
"negPartialProj", numCells, numBasisEPoints);
565 auto targetEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getTargetEvalWeights(edgeDim,ie));
566 auto basisEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getBasisEvalWeights(edgeDim,ie));
569 ordinal_type offsetBasis = basisEPointsRange(edgeDim, ie).first;
570 ordinal_type offsetTarget = targetEPointsRange(edgeDim, ie).first;
574 decltype(computedDofs), decltype(tagToOrdinal), decltype(targetAtTargetEPoints)> functorTypeEdge;
576 Kokkos::parallel_for(policy, functorTypeEdge(basisCoeffs, negPartialProj, basisDofAtBasisEPoints,
577 basisAtBasisEPoints, basisEWeights, weightedBasisAtBasisEPoints, targetEWeights,
578 basisAtTargetEPoints, weightedBasisAtTargetEPoints, computedDofs, tagToOrdinal,
579 targetAtTargetEPoints,tragetDofAtTargetEPoints, refEdgesVec, fieldDim,
580 edgeCardinality, offsetBasis, offsetTarget, numVertexDofs, edgeDim, ie));
583 ScalarViewType edgeMassMat_(
"edgeMassMat_", numCells, edgeCardinality, edgeCardinality),
584 edgeRhsMat_(
"rhsMat_", numCells, edgeCardinality);
591 typedef Kokkos::DynRankView<scalarType, Kokkos::LayoutRight, DeviceType> WorkArrayViewType;
592 ScalarViewType t_(
"t",numCells, edgeCardinality);
593 WorkArrayViewType w_(
"w",numCells, edgeCardinality);
595 auto edgeDof = Kokkos::subview(tagToOrdinal, edgeDim, ie, Kokkos::ALL());
598 edgeSystem.
solve(basisCoeffs, edgeMassMat_, edgeRhsMat_, t_, w_, edgeDof, edgeCardinality);
601 typename RefSubcellParametrization<DeviceType>::ConstViewType subcellParamFace;
605 ScalarViewType faceCoeff(
"faceCoeff", numCells, fieldDim, faceDofDim);
606 for(ordinal_type iface=0; iface<numFaces; ++iface) {
607 const auto topoKey = refTopologyKey(faceDim,iface);
608 ordinal_type faceCardinality = cellBasis->getDofCount(faceDim,iface);
610 ordinal_type numTargetEPoints = range_size(targetEPointsRange(faceDim, iface));
611 ordinal_type numBasisEPoints = range_size(basisEPointsRange(faceDim, iface));
613 ScalarViewType faceBasisDofAtBasisEPoints(
"normaBasisAtBasisEPoints",numCells,faceCardinality, numBasisEPoints,faceDofDim);
614 ScalarViewType wBasisDofAtBasisEPoints(
"weightedNormalBasisAtBasisEPoints",numCells,faceCardinality, numBasisEPoints,faceDofDim);
616 ScalarViewType faceBasisAtTargetEPoints(
"normalBasisAtTargetEPoints",numCells,faceCardinality, numTargetEPoints,faceDofDim);
617 ScalarViewType wBasisDofAtTargetEPoints(
"weightedNormalBasisAtTargetEPoints",numCells,faceCardinality, numTargetEPoints,faceDofDim);
619 ScalarViewType targetDofAtTargetEPoints(
"targetDofAtTargetEPoints",numCells, numTargetEPoints,faceDofDim);
620 ScalarViewType negPartialProj(
"mNormalComputedProjection", numCells,numBasisEPoints,faceDofDim);
622 ordinal_type offsetBasis = basisEPointsRange(faceDim, iface).first;
623 ordinal_type offsetTarget = targetEPointsRange(faceDim, iface).first;
624 auto targetEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getTargetEvalWeights(faceDim,iface));
625 auto basisEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getBasisEvalWeights(faceDim,iface));
629 decltype(computedDofs), decltype(tagToOrdinal), decltype(orts), decltype(targetAtTargetEPoints), decltype(subcellParamFace)> functorTypeFace;
631 Kokkos::parallel_for(policy, functorTypeFace(basisCoeffs, negPartialProj,faceBasisDofAtBasisEPoints,
632 basisAtBasisEPoints, basisEWeights, wBasisDofAtBasisEPoints, targetEWeights,
633 basisAtTargetEPoints, wBasisDofAtTargetEPoints, computedDofs, tagToOrdinal,
634 orts, targetAtTargetEPoints,targetDofAtTargetEPoints, faceCoeff,
635 subcellParamFace, fieldDim, faceCardinality, offsetBasis,
636 offsetTarget, numVertexDofs+numEdgeDofs, numFaces, faceDim,faceDofDim,
637 dim, iface, topoKey, isHCurlBasis, isHDivBasis));
639 typedef Kokkos::DynRankView<scalarType, Kokkos::LayoutRight, DeviceType> WorkArrayViewType;
640 ScalarViewType faceMassMat_(
"faceMassMat_", numCells, faceCardinality, faceCardinality),
641 faceRhsMat_(
"rhsMat_", numCells, faceCardinality);
647 ScalarViewType t_(
"t",numCells, faceCardinality);
648 WorkArrayViewType w_(
"w",numCells,faceCardinality);
650 auto faceDof = Kokkos::subview(tagToOrdinal, faceDim, iface, Kokkos::ALL());
653 faceSystem.
solve(basisCoeffs, faceMassMat_, faceRhsMat_, t_, w_, faceDof, faceCardinality);
656 ordinal_type numElemDofs = cellBasis->getDofCount(dim,0);
661 auto cellDofs = Kokkos::subview(tagToOrdinal, dim, 0, Kokkos::ALL());
663 range_type cellPointsRange = targetEPointsRange(dim, 0);
665 ordinal_type numTargetEPoints = range_size(targetEPointsRange(dim,0));
666 ordinal_type numBasisEPoints = range_size(basisEPointsRange(dim,0));
668 ScalarViewType internalBasisAtBasisEPoints(
"internalBasisAtBasisEPoints",numCells,numElemDofs, numBasisEPoints, fieldDim);
669 ScalarViewType negPartialProj(
"negPartialProj", numCells, numBasisEPoints, fieldDim);
671 auto targetEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getTargetEvalWeights(dim,0));
672 auto basisEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getBasisEvalWeights(dim,0));
673 ordinal_type offsetBasis = basisEPointsRange(dim, 0).first;
674 ordinal_type offsetTarget = targetEPointsRange(dim, 0).first;
677 ScalarViewType wBasisAtBasisEPoints(
"weightedBasisAtBasisEPoints",numCells,numElemDofs, numBasisEPoints,fieldDim);
678 ScalarViewType wBasisDofAtTargetEPoints(
"weightedBasisAtTargetEPoints",numCells,numElemDofs, numTargetEPoints,fieldDim);
681 Kokkos::parallel_for(policy, functorType( basisCoeffs, negPartialProj, internalBasisAtBasisEPoints,
682 basisAtBasisEPoints, basisEWeights, wBasisAtBasisEPoints, targetEWeights, basisAtTargetEPoints, wBasisDofAtTargetEPoints,
683 computedDofs, cellDofs, fieldDim, numElemDofs, offsetBasis, offsetTarget, numVertexDofs+numEdgeDofs+numFaceDofs));
685 typedef Kokkos::DynRankView<scalarType, Kokkos::LayoutRight, DeviceType> WorkArrayViewType;
686 ScalarViewType cellMassMat_(
"cellMassMat_", numCells, numElemDofs, numElemDofs),
687 cellRhsMat_(
"rhsMat_", numCells, numElemDofs);
692 Kokkos::subview(wBasisDofAtTargetEPoints,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL(),0));
697 ScalarViewType t_(
"t",numCells, numElemDofs);
698 WorkArrayViewType w_(
"w",numCells,numElemDofs);
700 cellSystem.
solve(basisCoeffs, cellMassMat_, cellRhsMat_, t_, w_, cellDofs, numElemDofs);
704 template<
typename ViewType1,
typename ViewType2>
706 const ViewType1 basisAtBasisEPoints_;
707 const ViewType2 basisEWeights_;
708 const ViewType1 wBasisAtBasisEPoints_;
709 const ViewType2 targetEWeights_;
710 const ViewType1 basisAtTargetEPoints_;
711 const ViewType1 wBasisDofAtTargetEPoints_;
712 ordinal_type fieldDim_;
713 ordinal_type numElemDofs_;
715 MultiplyBasisByWeights(
const ViewType1 basisAtBasisEPoints,
const ViewType2 basisEWeights,
const ViewType1 wBasisAtBasisEPoints,
const ViewType2 targetEWeights,
716 const ViewType1 basisAtTargetEPoints,
const ViewType1 wBasisDofAtTargetEPoints,
717 ordinal_type fieldDim, ordinal_type numElemDofs) :
718 basisAtBasisEPoints_(basisAtBasisEPoints), basisEWeights_(basisEWeights), wBasisAtBasisEPoints_(wBasisAtBasisEPoints), targetEWeights_(targetEWeights),
719 basisAtTargetEPoints_(basisAtTargetEPoints), wBasisDofAtTargetEPoints_(wBasisDofAtTargetEPoints),
720 fieldDim_(fieldDim), numElemDofs_(numElemDofs) {}
723 KOKKOS_INLINE_FUNCTION
724 operator()(
const ordinal_type ic)
const {
726 for(ordinal_type j=0; j <numElemDofs_; ++j) {
727 for(ordinal_type d=0; d <fieldDim_; ++d) {
728 for(ordinal_type iq=0; iq <ordinal_type(basisEWeights_.extent(0)); ++iq) {
729 wBasisAtBasisEPoints_(ic,j,iq,d) = basisAtBasisEPoints_(ic,j,iq,d) * basisEWeights_(iq);
731 for(ordinal_type iq=0; iq <ordinal_type(targetEWeights_.extent(0)); ++iq) {
732 wBasisDofAtTargetEPoints_(ic,j,iq,d) = basisAtTargetEPoints_(ic,j,iq,d)* targetEWeights_(iq);
739 template<
typename DeviceType>
740 template<
typename BasisType>
743 const BasisType* cellBasis,
745 const EvalPointsType ePointType) {
747 ordinal_type dim = cellBasis->getBaseCellTopology().getDimension();
748 auto cellEPoints = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getEvalPoints(dim,0,ePointType));
752 template<
typename DeviceType>
753 template<
typename basisCoeffsValueType,
class ...basisCoeffsProperties,
754 typename funValsValueType,
class ...funValsProperties,
756 typename ortValueType,
class ...ortProperties>
759 const Kokkos::DynRankView<funValsValueType,funValsProperties...> targetAtTargetEPoints,
760 const Kokkos::DynRankView<ortValueType, ortProperties...> orts,
761 const BasisType* cellBasis,
764 typedef typename BasisType::scalarType scalarType;
765 typedef Kokkos::DynRankView<scalarType,DeviceType> ScalarViewType;
766 const auto cellTopo = cellBasis->getBaseCellTopology();
768 ordinal_type dim = cellTopo.getDimension();
770 auto basisEPoints = Kokkos::create_mirror_view_and_copy(MemSpaceType(),
772 auto targetEPoints = Kokkos::create_mirror_view_and_copy(MemSpaceType(),
776 ordinal_type numTotalTargetEPoints(targetAtTargetEPoints.extent(1));
777 ordinal_type basisCardinality = cellBasis->getCardinality();
778 ordinal_type numCells = targetAtTargetEPoints.extent(0);
779 const ordinal_type fieldDim = (targetAtTargetEPoints.rank()==2) ? 1 : targetAtTargetEPoints.extent(2);
782 ScalarViewType basisAtBasisEPoints(
"basisAtBasisEPoints",numCells,basisCardinality, numTotalBasisEPoints, fieldDim);
783 ScalarViewType basisAtTargetEPoints(
"basisAtTargetEPoints",numCells,basisCardinality, numTotalTargetEPoints, fieldDim);
786 ScalarViewType nonOrientedBasisAtBasisEPoints(
"nonOrientedBasisAtBasisEPoints",numCells,basisCardinality, numTotalBasisEPoints);
787 ScalarViewType nonOrientedBasisAtTargetEPoints(
"nonOrientedBasisAtTargetEPoints",numCells,basisCardinality, numTotalTargetEPoints);
788 cellBasis->getValues(Kokkos::subview(nonOrientedBasisAtTargetEPoints,0,Kokkos::ALL(),Kokkos::ALL()), targetEPoints);
789 cellBasis->getValues(Kokkos::subview(nonOrientedBasisAtBasisEPoints,0,Kokkos::ALL(),Kokkos::ALL()), basisEPoints);
794 Kokkos::ALL(),0), nonOrientedBasisAtBasisEPoints, orts, cellBasis);
796 Kokkos::ALL(), Kokkos::ALL(),0), nonOrientedBasisAtTargetEPoints, orts, cellBasis);
799 ScalarViewType nonOrientedBasisAtBasisEPoints(
"nonOrientedBasisAtBasisEPoints",numCells,basisCardinality, numTotalBasisEPoints,fieldDim);
800 ScalarViewType nonOrientedBasisAtTargetEPoints(
"nonOrientedBasisAtTargetEPoints",numCells,basisCardinality, numTotalTargetEPoints,fieldDim);
801 cellBasis->getValues(Kokkos::subview(nonOrientedBasisAtTargetEPoints,0,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL()), targetEPoints);
802 cellBasis->getValues(Kokkos::subview(nonOrientedBasisAtBasisEPoints,0,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL()), basisEPoints);
804 RealSpaceTools<DeviceType>::clone(nonOrientedBasisAtTargetEPoints, Kokkos::subview(nonOrientedBasisAtTargetEPoints,0,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL()));
811 const Kokkos::RangePolicy<ExecSpaceType> policy(0, numCells);
812 ordinal_type numElemDofs = cellBasis->getCardinality();
814 auto targetEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getTargetEvalWeights(dim,0));
815 auto basisEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getBasisEvalWeights(dim,0));
817 ScalarViewType wBasisAtBasisEPoints(
"weightedBasisAtBasisEPoints",numCells,numElemDofs, numTotalBasisEPoints,fieldDim);
818 ScalarViewType wBasisDofAtTargetEPoints(
"weightedBasisAtTargetEPoints",numCells,numElemDofs, numTotalTargetEPoints,fieldDim);
821 Kokkos::parallel_for(
"Multiply basis by weights", policy, functorType(basisAtBasisEPoints, basisEWeights,
822 wBasisAtBasisEPoints, targetEWeights, basisAtTargetEPoints, wBasisDofAtTargetEPoints, fieldDim, numElemDofs));
824 typedef Kokkos::DynRankView<scalarType, Kokkos::LayoutRight, DeviceType> WorkArrayViewType;
825 ScalarViewType cellMassMat_(
"cellMassMat_", numCells, numElemDofs, numElemDofs),
826 cellRhsMat_(
"rhsMat_", numCells, numElemDofs);
831 Kokkos::subview(wBasisDofAtTargetEPoints,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL(),0));
835 Kokkos::DynRankView<ordinal_type,Kokkos::HostSpace> hCellDofs(
"cellDoFs", numElemDofs);
836 for(ordinal_type i=0; i<numElemDofs; ++i) hCellDofs(i) = i;
837 auto cellDofs = Kokkos::create_mirror_view_and_copy(MemSpaceType(),hCellDofs);
839 ScalarViewType t_(
"t",numCells, numElemDofs);
840 WorkArrayViewType w_(
"w",numCells,numElemDofs);
842 cellSystem.
solve(basisCoeffs, cellMassMat_, cellRhsMat_, t_, w_, cellDofs, numElemDofs);
845 template<
typename DeviceType>
846 template<
typename basisViewType,
typename targetViewType,
typename BasisType>
849 const targetViewType targetAtTargetEPoints,
850 const BasisType* cellBasis,
853 typedef typename BasisType::scalarType scalarType;
854 typedef Kokkos::DynRankView<scalarType,DeviceType> ScalarViewType;
855 const auto cellTopo = cellBasis->getBaseCellTopology();
857 ordinal_type dim = cellTopo.getDimension();
859 auto basisEPoints = Kokkos::create_mirror_view_and_copy(MemSpaceType(),
861 auto targetEPoints = Kokkos::create_mirror_view_and_copy(MemSpaceType(),
864 ordinal_type numTotalTargetEPoints(targetAtTargetEPoints.extent(1));
865 ordinal_type basisCardinality = cellBasis->getCardinality();
866 ordinal_type numCells = targetAtTargetEPoints.extent(0);
867 const ordinal_type fieldDim = (targetAtTargetEPoints.rank()==2) ? 1 : targetAtTargetEPoints.extent(2);
870 ScalarViewType basisAtBasisEPoints(
"basisAtBasisEPoints",1,basisCardinality, numTotalBasisEPoints, fieldDim);
871 ScalarViewType basisAtTargetEPoints(
"basisAtTargetEPoints",numCells,basisCardinality, numTotalTargetEPoints, fieldDim);
874 cellBasis->getValues(Kokkos::subview(basisAtTargetEPoints,0,Kokkos::ALL(),Kokkos::ALL(),0), targetEPoints);
875 cellBasis->getValues(Kokkos::subview(basisAtBasisEPoints,0,Kokkos::ALL(),Kokkos::ALL(),0), basisEPoints);
880 cellBasis->getValues(Kokkos::subview(basisAtTargetEPoints,0,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL()), targetEPoints);
881 cellBasis->getValues(Kokkos::subview(basisAtBasisEPoints,0,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL()), basisEPoints);
887 const Kokkos::RangePolicy<ExecSpaceType> policy(0, numCells);
888 ordinal_type numElemDofs = cellBasis->getCardinality();
890 auto targetEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getTargetEvalWeights(dim,0));
891 auto basisEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getBasisEvalWeights(dim,0));
893 ScalarViewType wBasisAtBasisEPoints(
"weightedBasisAtBasisEPoints",1,numElemDofs, numTotalBasisEPoints,fieldDim);
894 ScalarViewType wBasisDofAtTargetEPoints(
"weightedBasisAtTargetEPoints",numCells,numElemDofs, numTotalTargetEPoints,fieldDim);
895 Kokkos::DynRankView<ordinal_type, DeviceType> cellDofs(
"cellDoFs", numElemDofs);
897 Kokkos::parallel_for(Kokkos::RangePolicy<ExecSpaceType>(0,numElemDofs),
898 KOKKOS_LAMBDA (
const int &j) {
899 for(ordinal_type d=0; d <fieldDim; ++d) {
900 for(ordinal_type iq=0; iq < numTotalBasisEPoints; ++iq)
901 wBasisAtBasisEPoints(0,j,iq,d) = basisAtBasisEPoints(0,j,iq,d) * basisEWeights(iq);
902 for(ordinal_type iq=0; iq <numTotalTargetEPoints; ++iq) {
903 wBasisDofAtTargetEPoints(0,j,iq,d) = basisAtTargetEPoints(0,j,iq,d)* targetEWeights(iq);
910 typedef Kokkos::DynRankView<scalarType, Kokkos::LayoutRight, DeviceType> WorkArrayViewType;
911 ScalarViewType cellMassMat_(
"cellMassMat_", 1, numElemDofs, numElemDofs),
912 cellRhsMat_(
"rhsMat_", numCells, numElemDofs);
917 Kokkos::subview(wBasisDofAtTargetEPoints,Kokkos::ALL(),Kokkos::ALL(),Kokkos::ALL(),0));
921 ScalarViewType t_(
"t",1, numElemDofs);
922 WorkArrayViewType w_(
"w",numCells,numElemDofs);
924 cellSystem.
solve(basisCoeffs, cellMassMat_, cellRhsMat_, t_, w_, cellDofs, numElemDofs);
Header file for the abstract base class Intrepid2::DefaultCubatureFactory.
static ConstViewType get(const ordinal_type subcellDim, const unsigned parentCellKey)
Returns a Kokkos view with the coefficients of the parametrization maps for the edges or faces of a r...
const range_tag getBasisPointsRange() const
Returns the range tag of the basis evaluation points subcells.
view_type getBasisEvalWeights(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the basis evaluation weights on a subcell.
ordinal_type getMaxNumEvalPoints(const EvalPointsType type) const
Returns the maximum number of evaluation points across all the subcells.
const range_tag getPointsRange(const EvalPointsType type) const
Returns the range tag of the basis/target evaluation points in subcells.
ordinal_type getNumBasisEvalPoints()
Returns number of basis evaluation points.
const range_tag getTargetPointsRange() const
Returns the range of the target function evaluation points on subcells.
An helper class to compute the evaluation points and weights needed for performing projections...
const key_tag getTopologyKey() const
Returns the key tag for subcells.
view_type getEvalPoints(const ordinal_type subCellDim, const ordinal_type subCellId, EvalPointsType type) const
Returns the basis/target evaluation points on a subcell.
view_type getTargetEvalWeights(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the function evaluation weights on a subcell.