49 #ifndef __INTREPID2_PROJECTIONTOOLSDEFHDIV_HPP__
50 #define __INTREPID2_PROJECTIONTOOLSDEFHDIV_HPP__
59 namespace FunctorsProjectionTools {
61 template<
typename ViewType1,
typename ViewType2,
typename ViewType3>
63 ViewType1 basisNormalAtBasisEPoints_;
64 ViewType1 wBasisNormalAtBasisEPoints_;
65 const ViewType1 basisAtBasisEPoints_;
66 const ViewType2 basisEWeights_;
67 const ViewType1 refSideNormal_;
68 const ViewType3 tagToOrdinal_;
69 ordinal_type sideDim_;
71 ordinal_type offsetBasis_;
74 ViewType1 basisAtBasisEPoints, ViewType2 basisEWeights, ViewType1 refSideNormal, ViewType3 tagToOrdinal,
75 ordinal_type sideDim, ordinal_type iside, ordinal_type offsetBasis) :
76 basisNormalAtBasisEPoints_(basisNormalAtBasisEPoints), wBasisNormalAtBasisEPoints_(wBasisNormalAtBasisEPoints), basisAtBasisEPoints_(basisAtBasisEPoints),
77 basisEWeights_(basisEWeights), refSideNormal_(refSideNormal), tagToOrdinal_(tagToOrdinal),
78 sideDim_(sideDim), iside_(iside), offsetBasis_(offsetBasis) {}
81 KOKKOS_INLINE_FUNCTION
82 operator()(
const ordinal_type j,
const ordinal_type iq)
const {
83 ordinal_type jdof = tagToOrdinal_(sideDim_, iside_, j);
84 for(ordinal_type d=0; d <ordinal_type(refSideNormal_.extent(0)); ++d)
85 basisNormalAtBasisEPoints_(0,j,iq) += refSideNormal_(d)*basisAtBasisEPoints_(jdof,offsetBasis_+iq,d);
86 wBasisNormalAtBasisEPoints_(0,j,iq) = basisNormalAtBasisEPoints_(0,j,iq)*basisEWeights_(iq);
90 template<
typename ViewType1,
typename ViewType2,
typename ViewType3,
typename ViewType4>
92 const ViewType2 targetEWeights_;
93 const ViewType1 basisAtTargetEPoints_;
94 const ViewType1 wBasisDofAtTargetEPoints_;
95 const ViewType3 tagToOrdinal_;
96 const ViewType4 targetAtEPoints_;
97 const ViewType1 targetAtTargetEPoints_;
98 const ViewType1 refSideNormal_;
99 ordinal_type sideCardinality_;
100 ordinal_type offsetTarget_;
101 ordinal_type sideDim_;
106 const ViewType1 basisAtTargetEPoints,
const ViewType1 wBasisDofAtTargetEvalPoint,
const ViewType3 tagToOrdinal,
107 const ViewType4 targetAtEPoints,
const ViewType1 targetAtTargetEPoints,
108 const ViewType1 refSideNormal, ordinal_type sideCardinality,
109 ordinal_type offsetTarget, ordinal_type sideDim,
110 ordinal_type dim, ordinal_type iside) :
111 targetEWeights_(targetEWeights),
112 basisAtTargetEPoints_(basisAtTargetEPoints), wBasisDofAtTargetEPoints_(wBasisDofAtTargetEvalPoint),
113 tagToOrdinal_(tagToOrdinal), targetAtEPoints_(targetAtEPoints),
114 targetAtTargetEPoints_(targetAtTargetEPoints),
115 refSideNormal_(refSideNormal), sideCardinality_(sideCardinality),
116 offsetTarget_(offsetTarget), sideDim_(sideDim), dim_(dim), iside_(iside)
120 KOKKOS_INLINE_FUNCTION
121 operator()(
const ordinal_type ic)
const {
123 typename ViewType1::value_type tmp =0;
124 for(ordinal_type j=0; j <sideCardinality_; ++j) {
125 ordinal_type jdof = tagToOrdinal_(sideDim_, iside_, j);
126 for(ordinal_type iq=0; iq <ordinal_type(targetEWeights_.extent(0)); ++iq) {
128 for(ordinal_type d=0; d <dim_; ++d)
129 tmp += refSideNormal_(d)*basisAtTargetEPoints_(jdof,offsetTarget_+iq,d);
130 wBasisDofAtTargetEPoints_(ic,j,iq) = tmp * targetEWeights_(iq);
134 for(ordinal_type d=0; d <dim_; ++d)
135 for(ordinal_type iq=0; iq <ordinal_type(targetEWeights_.extent(0)); ++iq)
136 targetAtTargetEPoints_(ic,iq) += refSideNormal_(d)*targetAtEPoints_(ic,offsetTarget_+iq,d);
141 template<
typename ViewType1,
typename ViewType2,
typename ViewType3,
144 const ViewType1 basisCoeffs_;
145 const ViewType1 negPartialProjAtBasisEPoints_;
146 const ViewType1 nonWeightedBasisAtBasisEPoints_;
147 const ViewType1 basisAtBasisEPoints_;
148 const ViewType2 basisEWeights_;
149 const ViewType1 wBasisAtBasisEPoints_;
150 const ViewType2 targetEWeights_;
151 const ViewType1 basisAtTargetEPoints_;
152 const ViewType1 wBasisAtTargetEPoints_;
153 const ViewType3 computedDofs_;
154 const ViewType4 cellDof_;
155 ordinal_type numCellDofs_;
156 ordinal_type offsetBasis_;
157 ordinal_type offsetTarget_;
158 ordinal_type numSideDofs_;
160 ComputeBasisCoeffsOnCells_HDiv(
const ViewType1 basisCoeffs, ViewType1 negPartialProjAtBasisEPoints,
const ViewType1 nonWeightedBasisAtBasisEPoints,
161 const ViewType1 basisAtBasisEPoints,
const ViewType2 basisEWeights,
const ViewType1 wBasisAtBasisEPoints,
const ViewType2 targetEWeights,
162 const ViewType1 basisAtTargetEPoints,
const ViewType1 wBasisAtTargetEPoints,
const ViewType3 computedDofs,
const ViewType4 cellDof,
163 ordinal_type numCellDofs, ordinal_type offsetBasis, ordinal_type offsetTarget, ordinal_type numSideDofs) :
164 basisCoeffs_(basisCoeffs), negPartialProjAtBasisEPoints_(negPartialProjAtBasisEPoints), nonWeightedBasisAtBasisEPoints_(nonWeightedBasisAtBasisEPoints),
165 basisAtBasisEPoints_(basisAtBasisEPoints), basisEWeights_(basisEWeights), wBasisAtBasisEPoints_(wBasisAtBasisEPoints), targetEWeights_(targetEWeights),
166 basisAtTargetEPoints_(basisAtTargetEPoints), wBasisAtTargetEPoints_(wBasisAtTargetEPoints),
167 computedDofs_(computedDofs), cellDof_(cellDof),numCellDofs_(numCellDofs), offsetBasis_(offsetBasis),
168 offsetTarget_(offsetTarget), numSideDofs_(numSideDofs) {}
171 KOKKOS_INLINE_FUNCTION
172 operator()(
const ordinal_type ic)
const {
174 for(ordinal_type j=0; j <numCellDofs_; ++j) {
175 ordinal_type idof = cellDof_(j);
176 for(ordinal_type iq=0; iq <ordinal_type(basisEWeights_.extent(0)); ++iq) {
177 nonWeightedBasisAtBasisEPoints_(0,j,iq) = basisAtBasisEPoints_(idof,offsetBasis_+iq);
178 wBasisAtBasisEPoints_(ic,j,iq) = nonWeightedBasisAtBasisEPoints_(0,j,iq) * basisEWeights_(iq);
180 for(ordinal_type iq=0; iq <ordinal_type(targetEWeights_.extent(0)); ++iq) {
181 wBasisAtTargetEPoints_(ic,j,iq) = basisAtTargetEPoints_(idof,offsetTarget_+iq)* targetEWeights_(iq);
184 for(ordinal_type j=0; j < numSideDofs_; ++j) {
185 ordinal_type jdof = computedDofs_(j);
186 for(ordinal_type iq=0; iq <ordinal_type(basisEWeights_.extent(0)); ++iq)
187 negPartialProjAtBasisEPoints_(ic,iq) -= basisCoeffs_(ic,jdof)*basisAtBasisEPoints_(jdof,offsetBasis_+iq);
193 template<
typename ViewType1,
typename ViewType2,
typename ViewType3,
194 typename ViewType4,
typename ViewType5>
196 const ViewType1 basisCoeffs_;
197 const ViewType1 negPartialProjAtBasisEPoints_;
198 const ViewType1 nonWeightedBasisAtBasisEPoints_;
199 const ViewType1 basisAtBasisEPoints_;
200 const ViewType1 hcurlBasisCurlAtBasisEPoints_;
201 const ViewType2 basisEWeights_;
202 const ViewType1 wHCurlBasisAtBasisEPoints_;
203 const ViewType2 targetEWeights_;
204 const ViewType1 hcurlBasisCurlAtTargetEPoints_;
205 const ViewType1 wHCurlBasisAtTargetEPoints_;
206 const ViewType3 tagToOrdinal_;
207 const ViewType4 computedDofs_;
208 const ViewType5 hCurlDof_;
209 ordinal_type numCellDofs_;
210 ordinal_type offsetBasis_;
211 ordinal_type numSideDofs_;
215 const ViewType1 basisAtBasisEPoints,
const ViewType1 hcurlBasisCurlAtBasisEPoints,
const ViewType2 basisEWeights,
const ViewType1 wHCurlBasisAtBasisEPoints,
const ViewType2 targetEWeights,
216 const ViewType1 hcurlBasisCurlAtTargetEPoints,
const ViewType1 wHCurlBasisAtTargetEPoints,
const ViewType3 tagToOrdinal,
const ViewType4 computedDofs,
const ViewType5 hCurlDof,
217 ordinal_type numCellDofs, ordinal_type offsetBasis, ordinal_type numSideDofs, ordinal_type dim) :
218 basisCoeffs_(basisCoeffs), negPartialProjAtBasisEPoints_(negPartialProjAtBasisEPoints), nonWeightedBasisAtBasisEPoints_(nonWeightedBasisAtBasisEPoints),
219 basisAtBasisEPoints_(basisAtBasisEPoints), hcurlBasisCurlAtBasisEPoints_(hcurlBasisCurlAtBasisEPoints), basisEWeights_(basisEWeights), wHCurlBasisAtBasisEPoints_(wHCurlBasisAtBasisEPoints), targetEWeights_(targetEWeights),
220 hcurlBasisCurlAtTargetEPoints_(hcurlBasisCurlAtTargetEPoints), wHCurlBasisAtTargetEPoints_(wHCurlBasisAtTargetEPoints),
221 tagToOrdinal_(tagToOrdinal), computedDofs_(computedDofs), hCurlDof_(hCurlDof),numCellDofs_(numCellDofs), offsetBasis_(offsetBasis),
222 numSideDofs_(numSideDofs), dim_(dim) {}
225 KOKKOS_INLINE_FUNCTION
226 operator()(
const ordinal_type ic)
const {
228 ordinal_type numBasisEPoints = basisEWeights_.extent(0);
230 for(ordinal_type i=0; i<numSideDofs_; ++i) {
231 ordinal_type idof = computedDofs_(i);
232 for(ordinal_type iq=0; iq<numBasisEPoints; ++iq){
233 for(ordinal_type d=0; d <dim_; ++d)
234 negPartialProjAtBasisEPoints_(ic,iq,d) -= basisCoeffs_(ic,idof)*basisAtBasisEPoints_(idof,offsetBasis_+iq,d);
238 for(ordinal_type i=0; i<numCellDofs_; ++i) {
239 ordinal_type idof = tagToOrdinal_(dim_, 0, i);
240 for(ordinal_type iq=0; iq<numBasisEPoints; ++iq) {
241 for(ordinal_type d=0; d<dim_; ++d)
242 nonWeightedBasisAtBasisEPoints_(0,i,iq,d) = basisAtBasisEPoints_(idof,offsetBasis_+iq,d);
246 for(ordinal_type i=0; i<static_cast<ordinal_type>(hCurlDof_.extent(0)); ++i) {
247 ordinal_type idof = hCurlDof_(i);
248 for(ordinal_type d=0; d<dim_; ++d) {
249 for(ordinal_type iq=0; iq<numBasisEPoints; ++iq) {
250 wHCurlBasisAtBasisEPoints_(ic,i,iq,d) = hcurlBasisCurlAtBasisEPoints_(idof,iq,d)*basisEWeights_(iq);
252 for(ordinal_type iq=0; iq<static_cast<ordinal_type>(targetEWeights_.extent(0)); ++iq) {
253 wHCurlBasisAtTargetEPoints_(ic,i,iq,d) = hcurlBasisCurlAtTargetEPoints_(idof,iq,d)*targetEWeights_(iq);
262 template<
typename DeviceType>
263 template<
typename basisCoeffsValueType,
class ...basisCoeffsProperties,
264 typename funValsValueType,
class ...funValsProperties,
266 typename ortValueType,
class ...ortProperties>
269 const Kokkos::DynRankView<funValsValueType,funValsProperties...> targetAtEPoints,
270 const Kokkos::DynRankView<funValsValueType,funValsProperties...> targetDivAtDivEPoints,
271 const Kokkos::DynRankView<ortValueType, ortProperties...> orts,
272 const BasisType* cellBasis,
274 typedef typename BasisType::scalarType scalarType;
275 typedef Kokkos::DynRankView<scalarType,DeviceType> ScalarViewType;
276 typedef Kokkos::pair<ordinal_type,ordinal_type> range_type;
277 const auto cellTopo = cellBasis->getBaseCellTopology();
278 ordinal_type dim = cellTopo.getDimension();
279 ordinal_type basisCardinality = cellBasis->getCardinality();
280 ordinal_type numCells = targetAtEPoints.extent(0);
281 const ordinal_type sideDim = dim-1;
283 const std::string& name = cellBasis->getName();
285 ordinal_type numSides = cellBasis->getBaseCellTopology().getSideCount();
287 ordinal_type numSideDofs(0);
288 for(ordinal_type is=0; is<numSides; ++is)
289 numSideDofs += cellBasis->getDofCount(sideDim,is);
291 Kokkos::View<ordinal_type*, DeviceType> computedDofs(
"computedDofs",numSideDofs);
293 const Kokkos::RangePolicy<ExecSpaceType> policy(0, numCells);
298 auto tagToOrdinal = Kokkos::create_mirror_view_and_copy(MemSpaceType(), cellBasis->getAllDofOrdinal());
308 ScalarViewType basisAtBasisEPoints(
"basisAtBasisEPoints",basisCardinality, numTotalBasisEPoints, dim);
309 ScalarViewType basisAtTargetEPoints(
"basisAtTargetEPoints",basisCardinality, numTotalTargetEPoints, dim);
310 cellBasis->getValues(basisAtTargetEPoints, targetEPoints);
311 cellBasis->getValues(basisAtBasisEPoints, basisEPoints);
313 ScalarViewType basisDivAtBasisDivEPoints;
314 ScalarViewType basisDivAtTargetDivEPoints;
315 if(numTotalTargetDivEPoints>0) {
316 basisDivAtBasisDivEPoints = ScalarViewType (
"basisDivAtBasisDivEPoints",basisCardinality, numTotalBasisDivEPoints);
317 basisDivAtTargetDivEPoints = ScalarViewType(
"basisDivAtTargetDivEPoints",basisCardinality, numTotalTargetDivEPoints);
318 cellBasis->getValues(basisDivAtBasisDivEPoints, basisDivEPoints, OPERATOR_DIV);
319 cellBasis->getValues(basisDivAtTargetDivEPoints, targetDivEPoints, OPERATOR_DIV);
322 ScalarViewType refBasisCoeffs(
"refBasisCoeffs", basisCoeffs.extent(0), basisCoeffs.extent(1));
324 ordinal_type computedDofsCount = 0;
325 for(ordinal_type is=0; is<numSides; ++is) {
327 ordinal_type sideCardinality = cellBasis->getDofCount(sideDim,is);
329 ordinal_type numTargetEPoints = range_size(targetEPointsRange(sideDim,is));
330 ordinal_type numBasisEPoints = range_size(basisEPointsRange(sideDim,is));
332 auto sideDofs = Kokkos::subview(tagToOrdinal, sideDim, is, range_type(0,sideCardinality));
333 auto computedSideDofs = Kokkos::subview(computedDofs, range_type(computedDofsCount,computedDofsCount+sideCardinality));
334 deep_copy(computedSideDofs, sideDofs);
335 computedDofsCount += sideCardinality;
337 ScalarViewType refSideNormal(
"refSideNormal", dim);
340 ScalarViewType basisNormalAtBasisEPoints(
"normalBasisAtBasisEPoints",1,sideCardinality, numBasisEPoints);
341 ScalarViewType wBasisNormalAtBasisEPoints(
"wBasisNormalAtBasisEPoints",1,sideCardinality, numBasisEPoints);
342 ScalarViewType wBasisNormalAtTargetEPoints(
"wBasisNormalAtTargetEPoints",numCells,sideCardinality, numTargetEPoints);
343 ScalarViewType targetNormalAtTargetEPoints(
"targetNormalAtTargetEPoints",numCells, numTargetEPoints);
345 ordinal_type offsetBasis = basisEPointsRange(sideDim,is).first;
346 ordinal_type offsetTarget = targetEPointsRange(sideDim,is).first;
347 auto targetEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getTargetEvalWeights(sideDim,is));
348 auto basisEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getBasisEvalWeights(sideDim,is));
351 Kokkos::parallel_for(Kokkos::MDRangePolicy<ExecSpaceType, Kokkos::Rank<2> >({0,0}, {sideCardinality,numBasisEPoints}),
352 functorTypeWBasisEdge(basisNormalAtBasisEPoints,wBasisNormalAtBasisEPoints,basisAtBasisEPoints,basisEWeights,refSideNormal,tagToOrdinal,sideDim,is,offsetBasis));
355 Kokkos::parallel_for(policy, functorTypeSide(targetEWeights,
356 basisAtTargetEPoints, wBasisNormalAtTargetEPoints, tagToOrdinal,
357 targetAtEPoints, targetNormalAtTargetEPoints,
358 refSideNormal, sideCardinality,
359 offsetTarget, sideDim,
362 ScalarViewType sideMassMat_(
"sideMassMat_", 1, sideCardinality+1, sideCardinality+1),
363 sideRhsMat_(
"rhsMat_", numCells, sideCardinality+1);
365 ScalarViewType targetEWeights_(
"targetEWeights", numCells, 1, targetEWeights.extent(0));
368 range_type range_H(0, sideCardinality);
369 range_type range_B(sideCardinality, sideCardinality+1);
370 ScalarViewType ones(
"ones",1,1,numBasisEPoints);
371 Kokkos::deep_copy(ones,1);
379 typedef Kokkos::DynRankView<scalarType, Kokkos::LayoutRight, DeviceType> WorkArrayViewType;
380 ScalarViewType t_(
"t",numCells, sideCardinality+1);
381 WorkArrayViewType w_(
"w",numCells, sideCardinality+1);
383 auto sideDof = Kokkos::subview(tagToOrdinal, sideDim, is, Kokkos::ALL());
386 sideSystem.
solve(refBasisCoeffs, sideMassMat_, sideRhsMat_, t_, w_, sideDof, sideCardinality, 1);
391 ordinal_type numCellDofs = cellBasis->getDofCount(dim,0);
394 if(cellTopo.getKey() == shards::getCellTopologyData<shards::Hexahedron<8> >()->key)
396 else if(cellTopo.getKey() == shards::getCellTopologyData<shards::Tetrahedron<4> >()->key)
398 else if(cellTopo.getKey() == shards::getCellTopologyData<shards::Wedge<6> >()->key)
403 else if(cellTopo.getKey() == shards::getCellTopologyData<shards::Quadrilateral<4> >()->key)
405 else if(cellTopo.getKey() == shards::getCellTopologyData<shards::Triangle<3> >()->key)
408 std::stringstream ss;
409 ss <<
">>> ERROR (Intrepid2::ProjectionTools::getHDivBasisCoeffs): "
410 <<
"Method not implemented for basis " << name;
411 INTREPID2_TEST_FOR_EXCEPTION(
true, std::runtime_error, ss.str().c_str() );
413 if(hcurlBasis == NULL)
return;
419 ordinal_type numTargetDivEPoints = range_size(targetDivEPointsRange(dim,0));
420 ordinal_type numBasisDivEPoints = range_size(basisDivEPointsRange(dim,0));
422 auto targetDivEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getTargetDerivEvalWeights(dim,0));
425 ordinal_type offsetBasisDiv = basisDivEPointsRange(dim,0).first;
426 ordinal_type offsetTargetDiv = targetDivEPointsRange(dim,0).first;
428 ScalarViewType weightedBasisDivAtBasisEPoints(
"weightedBasisDivAtBasisEPoints",numCells,numCellDofs, numBasisDivEPoints);
429 ScalarViewType weightedBasisDivAtTargetEPoints(
"weightedBasisDivAtTargetEPoints",numCells, numCellDofs, numTargetDivEPoints);
430 ScalarViewType basisDivAtBasisEPoints(
"basisDivAtBasisEPoints",1,numCellDofs, numBasisDivEPoints);
431 ScalarViewType targetSideDivAtBasisEPoints(
"targetSideDivAtBasisEPoints",numCells, numBasisDivEPoints);
433 auto cellDofs = Kokkos::subview(tagToOrdinal, dim, 0, Kokkos::ALL());
435 Kokkos::parallel_for(policy, functorType( refBasisCoeffs, targetSideDivAtBasisEPoints, basisDivAtBasisEPoints,
436 basisDivAtBasisDivEPoints, divEWeights, weightedBasisDivAtBasisEPoints, targetDivEWeights, basisDivAtTargetDivEPoints, weightedBasisDivAtTargetEPoints,
437 computedDofs, cellDofs, numCellDofs, offsetBasisDiv, offsetTargetDiv, numSideDofs));
440 ordinal_type hcurlBasisCardinality = hcurlBasis->
getCardinality();
441 ordinal_type numCurlInteriorDOFs = hcurlBasis->
getDofCount(dim,0);
443 range_type range_H(0, numCellDofs);
444 range_type range_B(numCellDofs, numCellDofs+numCurlInteriorDOFs);
447 ScalarViewType massMat_(
"massMat_",1,numCellDofs+numCurlInteriorDOFs,numCellDofs+numCurlInteriorDOFs),
448 rhsMatTrans(
"rhsMatTrans",numCells,numCellDofs+numCurlInteriorDOFs);
450 FunctionSpaceTools<DeviceType >::integrate(Kokkos::subview(massMat_, Kokkos::ALL(), range_H,range_H), basisDivAtBasisEPoints, Kokkos::subview(weightedBasisDivAtBasisEPoints, std::make_pair(0,1), Kokkos::ALL(), Kokkos::ALL()) );
454 if(numCurlInteriorDOFs>0){
455 ordinal_type numTargetEPoints = range_size(targetEPointsRange(dim,0));
456 ordinal_type numBasisEPoints = range_size(basisEPointsRange(dim,0));
458 auto targetEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getTargetEvalWeights(dim,0));
459 auto basisEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getBasisEvalWeights(dim,0));
461 ordinal_type offsetBasis = basisEPointsRange(dim,0).first;
463 ScalarViewType negPartialProjAtBasisEPoints(
"targetSideAtBasisEPoints",numCells, numBasisEPoints, dim);
464 ScalarViewType nonWeightedBasisAtBasisEPoints(
"basisAtBasisEPoints",1,numCellDofs, numBasisEPoints, dim);
465 ScalarViewType hcurlBasisCurlAtBasisEPoints(
"hcurlBasisCurlAtBasisEPoints",hcurlBasisCardinality, numBasisEPoints,dim);
466 ScalarViewType hcurlBasisCurlAtTargetEPoints(
"hcurlBasisCurlAtTargetEPoints", hcurlBasisCardinality,numTargetEPoints, dim);
467 ScalarViewType wHcurlBasisCurlAtBasisEPoints(
"wHcurlBasisHcurlAtBasisEPoints", numCells, numCurlInteriorDOFs, numBasisEPoints,dim);
468 ScalarViewType wHcurlBasisCurlAtTargetEPoints(
"wHcurlBasisHcurlAtTargetEPoints",numCells, numCurlInteriorDOFs, numTargetEPoints,dim);
470 hcurlBasis->
getValues(hcurlBasisCurlAtBasisEPoints, Kokkos::subview(basisEPoints, basisEPointsRange(dim,0), Kokkos::ALL()), OPERATOR_CURL);
471 hcurlBasis->
getValues(hcurlBasisCurlAtTargetEPoints, Kokkos::subview(targetEPoints,targetEPointsRange(dim,0),Kokkos::ALL()), OPERATOR_CURL);
473 auto hCurlTagToOrdinal = Kokkos::create_mirror_view_and_copy(MemSpaceType(), hcurlBasis->
getAllDofOrdinal());
474 auto cellHCurlDof = Kokkos::subview(hCurlTagToOrdinal, dim, 0, range_type(0, numCurlInteriorDOFs));
477 decltype(tagToOrdinal), decltype(computedDofs), decltype(cellDofs)>;
478 Kokkos::parallel_for(policy, functorTypeHCurlCells(refBasisCoeffs, negPartialProjAtBasisEPoints, nonWeightedBasisAtBasisEPoints,
479 basisAtBasisEPoints, hcurlBasisCurlAtBasisEPoints, basisEWeights, wHcurlBasisCurlAtBasisEPoints, targetEWeights,
480 hcurlBasisCurlAtTargetEPoints, wHcurlBasisCurlAtTargetEPoints, tagToOrdinal, computedDofs, cellHCurlDof,
481 numCellDofs, offsetBasis, numSideDofs, dim));
483 FunctionSpaceTools<DeviceType >::integrate(Kokkos::subview(massMat_, Kokkos::ALL(), range_H,range_B), nonWeightedBasisAtBasisEPoints, Kokkos::subview(wHcurlBasisCurlAtBasisEPoints, std::make_pair(0,1), Kokkos::ALL(), Kokkos::ALL(), Kokkos::ALL()) );
484 FunctionSpaceTools<DeviceType >::integrate(Kokkos::subview(rhsMatTrans, Kokkos::ALL(), range_B), Kokkos::subview(targetAtEPoints, Kokkos::ALL(), targetEPointsRange(dim,0), Kokkos::ALL()), wHcurlBasisCurlAtTargetEPoints);
489 typedef Kokkos::DynRankView<scalarType, Kokkos::LayoutRight, DeviceType> WorkArrayViewType;
490 ScalarViewType t_(
"t",numCells, numCellDofs+numCurlInteriorDOFs);
491 WorkArrayViewType w_(
"w",numCells, numCellDofs+numCurlInteriorDOFs);
494 cellSystem.
solve(refBasisCoeffs, massMat_, rhsMatTrans, t_, w_, cellDofs, numCellDofs, numCurlInteriorDOFs);
Header file for the abstract base class Intrepid2::DefaultCubatureFactory.
ordinal_type getCardinality() const
Returns cardinality of the basis.
virtual void getValues(const ExecutionSpace &, OutputViewType, const PointViewType, const EOperator=OPERATOR_VALUE) const
Evaluation of a FEM basis on a reference cell.
ordinal_type getNumBasisDerivEvalPoints()
Returns number of evaluation points for basis derivatives.
const range_tag getBasisPointsRange() const
Returns the range tag of the basis evaluation points subcells.
Implementation of the default H(curl)-compatible Nedelec (first kind) basis of arbitrary degree on Te...
const range_tag getTargetDerivPointsRange() const
Returns the range tag of the target function derivative evaluation points on subcells.
host_view_type getTargetDerivEvalWeights(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the function derivatives evaluation weights on a subcell.
An abstract base class that defines interface for concrete basis implementations for Finite Element (...
ordinal_type getNumBasisEvalPoints()
Returns number of basis evaluation points.
Implementation of the default H(curl)-compatible FEM basis on Hexahedron cell.
const OrdinalTypeArray3DHost getAllDofOrdinal() const
DoF tag to ordinal data structure.
view_type getAllDerivEvalPoints(EvalPointsType type=TARGET) const
Returns all the evaluation points for basis/target derivatives in the cell.
view_type getAllEvalPoints(EvalPointsType type=TARGET) const
Returns the basis/target evaluation points in the cell.
host_view_type getBasisEvalWeights(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the basis evaluation weights on a subcell.
ordinal_type getNumTargetEvalPoints()
Returns number of points where to evaluate the target function.
const range_tag getBasisDerivPointsRange() const
Returns the range tag of the derivative evaluation points on subcell.
const range_tag getTargetPointsRange() const
Returns the range of the target function evaluation points on subcells.
host_view_type getBasisDerivEvalWeights(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the basis derivatives evaluation weights on a subcell.
Implementation of the default H(grad)-compatible Lagrange basis of arbitrary degree on Triangle cell...
ordinal_type getNumTargetDerivEvalPoints()
Returns number of points where to evaluate the derivatives of the target function.
host_view_type getTargetEvalWeights(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the function evaluation weights on a subcell.
ordinal_type getDofCount(const ordinal_type subcDim, const ordinal_type subcOrd) const
DoF count for specified subcell.
Implementation of the default H(grad)-compatible FEM basis of degree n on Quadrilateral cell Implemen...
An helper class to compute the evaluation points and weights needed for performing projections...