16 #ifndef __INTREPID2_PROJECTIONTOOLSDEFHDIV_HPP__
17 #define __INTREPID2_PROJECTIONTOOLSDEFHDIV_HPP__
26 namespace FunctorsProjectionTools {
28 template<
typename ViewType1,
typename ViewType2,
typename ViewType3>
30 ViewType1 basisNormalAtBasisEPoints_;
31 ViewType1 wBasisNormalAtBasisEPoints_;
32 const ViewType1 basisAtBasisEPoints_;
33 const ViewType2 basisEWeights_;
34 const ViewType1 refSideNormal_;
35 const ViewType3 tagToOrdinal_;
36 ordinal_type sideDim_;
38 ordinal_type offsetBasis_;
41 ViewType1 basisAtBasisEPoints, ViewType2 basisEWeights, ViewType1 refSideNormal, ViewType3 tagToOrdinal,
42 ordinal_type sideDim, ordinal_type iside, ordinal_type offsetBasis) :
43 basisNormalAtBasisEPoints_(basisNormalAtBasisEPoints), wBasisNormalAtBasisEPoints_(wBasisNormalAtBasisEPoints), basisAtBasisEPoints_(basisAtBasisEPoints),
44 basisEWeights_(basisEWeights), refSideNormal_(refSideNormal), tagToOrdinal_(tagToOrdinal),
45 sideDim_(sideDim), iside_(iside), offsetBasis_(offsetBasis) {}
48 KOKKOS_INLINE_FUNCTION
49 operator()(
const ordinal_type j,
const ordinal_type iq)
const {
50 ordinal_type jdof = tagToOrdinal_(sideDim_, iside_, j);
51 for(ordinal_type d=0; d <ordinal_type(refSideNormal_.extent(0)); ++d)
52 basisNormalAtBasisEPoints_(0,j,iq) += refSideNormal_(d)*basisAtBasisEPoints_(jdof,offsetBasis_+iq,d);
53 wBasisNormalAtBasisEPoints_(0,j,iq) = basisNormalAtBasisEPoints_(0,j,iq)*basisEWeights_(iq);
57 template<
typename ViewType1,
typename ViewType2,
typename ViewType3,
typename ViewType4>
59 const ViewType2 targetEWeights_;
60 const ViewType1 basisAtTargetEPoints_;
61 const ViewType1 wBasisDofAtTargetEPoints_;
62 const ViewType3 tagToOrdinal_;
63 const ViewType4 targetAtEPoints_;
64 const ViewType1 targetAtTargetEPoints_;
65 const ViewType1 refSideNormal_;
66 ordinal_type sideCardinality_;
67 ordinal_type offsetTarget_;
68 ordinal_type sideDim_;
73 const ViewType1 basisAtTargetEPoints,
const ViewType1 wBasisDofAtTargetEvalPoint,
const ViewType3 tagToOrdinal,
74 const ViewType4 targetAtEPoints,
const ViewType1 targetAtTargetEPoints,
75 const ViewType1 refSideNormal, ordinal_type sideCardinality,
76 ordinal_type offsetTarget, ordinal_type sideDim,
77 ordinal_type dim, ordinal_type iside) :
78 targetEWeights_(targetEWeights),
79 basisAtTargetEPoints_(basisAtTargetEPoints), wBasisDofAtTargetEPoints_(wBasisDofAtTargetEvalPoint),
80 tagToOrdinal_(tagToOrdinal), targetAtEPoints_(targetAtEPoints),
81 targetAtTargetEPoints_(targetAtTargetEPoints),
82 refSideNormal_(refSideNormal), sideCardinality_(sideCardinality),
83 offsetTarget_(offsetTarget), sideDim_(sideDim), dim_(dim), iside_(iside)
87 KOKKOS_INLINE_FUNCTION
88 operator()(
const ordinal_type ic)
const {
90 typename ViewType1::value_type tmp =0;
91 for(ordinal_type j=0; j <sideCardinality_; ++j) {
92 ordinal_type jdof = tagToOrdinal_(sideDim_, iside_, j);
93 for(ordinal_type iq=0; iq <ordinal_type(targetEWeights_.extent(0)); ++iq) {
95 for(ordinal_type d=0; d <dim_; ++d)
96 tmp += refSideNormal_(d)*basisAtTargetEPoints_(jdof,offsetTarget_+iq,d);
97 wBasisDofAtTargetEPoints_(ic,j,iq) = tmp * targetEWeights_(iq);
101 for(ordinal_type d=0; d <dim_; ++d)
102 for(ordinal_type iq=0; iq <ordinal_type(targetEWeights_.extent(0)); ++iq)
103 targetAtTargetEPoints_(ic,iq) += refSideNormal_(d)*targetAtEPoints_(ic,offsetTarget_+iq,d);
108 template<
typename ViewType1,
typename ViewType2,
typename ViewType3,
111 const ViewType1 basisCoeffs_;
112 const ViewType1 negPartialProjAtBasisEPoints_;
113 const ViewType1 nonWeightedBasisAtBasisEPoints_;
114 const ViewType1 basisAtBasisEPoints_;
115 const ViewType2 basisEWeights_;
116 const ViewType1 wBasisAtBasisEPoints_;
117 const ViewType2 targetEWeights_;
118 const ViewType1 basisAtTargetEPoints_;
119 const ViewType1 wBasisAtTargetEPoints_;
120 const ViewType3 computedDofs_;
121 const ViewType4 cellDof_;
122 ordinal_type numCellDofs_;
123 ordinal_type offsetBasis_;
124 ordinal_type offsetTarget_;
125 ordinal_type numSideDofs_;
127 ComputeBasisCoeffsOnCells_HDiv(
const ViewType1 basisCoeffs, ViewType1 negPartialProjAtBasisEPoints,
const ViewType1 nonWeightedBasisAtBasisEPoints,
128 const ViewType1 basisAtBasisEPoints,
const ViewType2 basisEWeights,
const ViewType1 wBasisAtBasisEPoints,
const ViewType2 targetEWeights,
129 const ViewType1 basisAtTargetEPoints,
const ViewType1 wBasisAtTargetEPoints,
const ViewType3 computedDofs,
const ViewType4 cellDof,
130 ordinal_type numCellDofs, ordinal_type offsetBasis, ordinal_type offsetTarget, ordinal_type numSideDofs) :
131 basisCoeffs_(basisCoeffs), negPartialProjAtBasisEPoints_(negPartialProjAtBasisEPoints), nonWeightedBasisAtBasisEPoints_(nonWeightedBasisAtBasisEPoints),
132 basisAtBasisEPoints_(basisAtBasisEPoints), basisEWeights_(basisEWeights), wBasisAtBasisEPoints_(wBasisAtBasisEPoints), targetEWeights_(targetEWeights),
133 basisAtTargetEPoints_(basisAtTargetEPoints), wBasisAtTargetEPoints_(wBasisAtTargetEPoints),
134 computedDofs_(computedDofs), cellDof_(cellDof),numCellDofs_(numCellDofs), offsetBasis_(offsetBasis),
135 offsetTarget_(offsetTarget), numSideDofs_(numSideDofs) {}
138 KOKKOS_INLINE_FUNCTION
139 operator()(
const ordinal_type ic)
const {
141 for(ordinal_type j=0; j <numCellDofs_; ++j) {
142 ordinal_type idof = cellDof_(j);
143 for(ordinal_type iq=0; iq <ordinal_type(basisEWeights_.extent(0)); ++iq) {
144 nonWeightedBasisAtBasisEPoints_(0,j,iq) = basisAtBasisEPoints_(idof,offsetBasis_+iq);
145 wBasisAtBasisEPoints_(ic,j,iq) = nonWeightedBasisAtBasisEPoints_(0,j,iq) * basisEWeights_(iq);
147 for(ordinal_type iq=0; iq <ordinal_type(targetEWeights_.extent(0)); ++iq) {
148 wBasisAtTargetEPoints_(ic,j,iq) = basisAtTargetEPoints_(idof,offsetTarget_+iq)* targetEWeights_(iq);
151 for(ordinal_type j=0; j < numSideDofs_; ++j) {
152 ordinal_type jdof = computedDofs_(j);
153 for(ordinal_type iq=0; iq <ordinal_type(basisEWeights_.extent(0)); ++iq)
154 negPartialProjAtBasisEPoints_(ic,iq) -= basisCoeffs_(ic,jdof)*basisAtBasisEPoints_(jdof,offsetBasis_+iq);
160 template<
typename ViewType1,
typename ViewType2,
typename ViewType3,
161 typename ViewType4,
typename ViewType5>
163 const ViewType1 basisCoeffs_;
164 const ViewType1 negPartialProjAtBasisEPoints_;
165 const ViewType1 nonWeightedBasisAtBasisEPoints_;
166 const ViewType1 basisAtBasisEPoints_;
167 const ViewType1 hcurlBasisCurlAtBasisEPoints_;
168 const ViewType2 basisEWeights_;
169 const ViewType1 wHCurlBasisAtBasisEPoints_;
170 const ViewType2 targetEWeights_;
171 const ViewType1 hcurlBasisCurlAtTargetEPoints_;
172 const ViewType1 wHCurlBasisAtTargetEPoints_;
173 const ViewType3 tagToOrdinal_;
174 const ViewType4 computedDofs_;
175 const ViewType5 hCurlDof_;
176 ordinal_type numCellDofs_;
177 ordinal_type offsetBasis_;
178 ordinal_type numSideDofs_;
182 const ViewType1 basisAtBasisEPoints,
const ViewType1 hcurlBasisCurlAtBasisEPoints,
const ViewType2 basisEWeights,
const ViewType1 wHCurlBasisAtBasisEPoints,
const ViewType2 targetEWeights,
183 const ViewType1 hcurlBasisCurlAtTargetEPoints,
const ViewType1 wHCurlBasisAtTargetEPoints,
const ViewType3 tagToOrdinal,
const ViewType4 computedDofs,
const ViewType5 hCurlDof,
184 ordinal_type numCellDofs, ordinal_type offsetBasis, ordinal_type numSideDofs, ordinal_type dim) :
185 basisCoeffs_(basisCoeffs), negPartialProjAtBasisEPoints_(negPartialProjAtBasisEPoints), nonWeightedBasisAtBasisEPoints_(nonWeightedBasisAtBasisEPoints),
186 basisAtBasisEPoints_(basisAtBasisEPoints), hcurlBasisCurlAtBasisEPoints_(hcurlBasisCurlAtBasisEPoints), basisEWeights_(basisEWeights), wHCurlBasisAtBasisEPoints_(wHCurlBasisAtBasisEPoints), targetEWeights_(targetEWeights),
187 hcurlBasisCurlAtTargetEPoints_(hcurlBasisCurlAtTargetEPoints), wHCurlBasisAtTargetEPoints_(wHCurlBasisAtTargetEPoints),
188 tagToOrdinal_(tagToOrdinal), computedDofs_(computedDofs), hCurlDof_(hCurlDof),numCellDofs_(numCellDofs), offsetBasis_(offsetBasis),
189 numSideDofs_(numSideDofs), dim_(dim) {}
192 KOKKOS_INLINE_FUNCTION
193 operator()(
const ordinal_type ic)
const {
195 ordinal_type numBasisEPoints = basisEWeights_.extent(0);
197 for(ordinal_type i=0; i<numSideDofs_; ++i) {
198 ordinal_type idof = computedDofs_(i);
199 for(ordinal_type iq=0; iq<numBasisEPoints; ++iq){
200 for(ordinal_type d=0; d <dim_; ++d)
201 negPartialProjAtBasisEPoints_(ic,iq,d) -= basisCoeffs_(ic,idof)*basisAtBasisEPoints_(idof,offsetBasis_+iq,d);
205 for(ordinal_type i=0; i<numCellDofs_; ++i) {
206 ordinal_type idof = tagToOrdinal_(dim_, 0, i);
207 for(ordinal_type iq=0; iq<numBasisEPoints; ++iq) {
208 for(ordinal_type d=0; d<dim_; ++d)
209 nonWeightedBasisAtBasisEPoints_(0,i,iq,d) = basisAtBasisEPoints_(idof,offsetBasis_+iq,d);
213 for(ordinal_type i=0; i<static_cast<ordinal_type>(hCurlDof_.extent(0)); ++i) {
214 ordinal_type idof = hCurlDof_(i);
215 for(ordinal_type d=0; d<dim_; ++d) {
216 for(ordinal_type iq=0; iq<numBasisEPoints; ++iq) {
217 wHCurlBasisAtBasisEPoints_(ic,i,iq,d) = hcurlBasisCurlAtBasisEPoints_(idof,iq,d)*basisEWeights_(iq);
219 for(ordinal_type iq=0; iq<static_cast<ordinal_type>(targetEWeights_.extent(0)); ++iq) {
220 wHCurlBasisAtTargetEPoints_(ic,i,iq,d) = hcurlBasisCurlAtTargetEPoints_(idof,iq,d)*targetEWeights_(iq);
229 template<
typename DeviceType>
230 template<
typename basisCoeffsValueType,
class ...basisCoeffsProperties,
231 typename funValsValueType,
class ...funValsProperties,
233 typename ortValueType,
class ...ortProperties>
236 const Kokkos::DynRankView<funValsValueType,funValsProperties...> targetAtEPoints,
237 const Kokkos::DynRankView<funValsValueType,funValsProperties...> targetDivAtDivEPoints,
238 const Kokkos::DynRankView<ortValueType, ortProperties...> orts,
239 const BasisType* cellBasis,
241 typedef typename BasisType::scalarType scalarType;
242 typedef Kokkos::DynRankView<scalarType,DeviceType> ScalarViewType;
243 typedef Kokkos::pair<ordinal_type,ordinal_type> range_type;
244 const auto cellTopo = cellBasis->getBaseCellTopology();
245 ordinal_type dim = cellTopo.getDimension();
246 ordinal_type basisCardinality = cellBasis->getCardinality();
247 ordinal_type numCells = targetAtEPoints.extent(0);
248 const ordinal_type sideDim = dim-1;
250 const std::string& name = cellBasis->getName();
252 ordinal_type numSides = cellBasis->getBaseCellTopology().getSideCount();
254 ordinal_type numSideDofs(0);
255 for(ordinal_type is=0; is<numSides; ++is)
256 numSideDofs += cellBasis->getDofCount(sideDim,is);
258 Kokkos::View<ordinal_type*, DeviceType> computedDofs(
"computedDofs",numSideDofs);
260 const Kokkos::RangePolicy<ExecSpaceType> policy(0, numCells);
265 auto tagToOrdinal = Kokkos::create_mirror_view_and_copy(MemSpaceType(), cellBasis->getAllDofOrdinal());
275 ScalarViewType basisAtBasisEPoints(
"basisAtBasisEPoints",basisCardinality, numTotalBasisEPoints, dim);
276 ScalarViewType basisAtTargetEPoints(
"basisAtTargetEPoints",basisCardinality, numTotalTargetEPoints, dim);
277 cellBasis->getValues(basisAtTargetEPoints, targetEPoints);
278 cellBasis->getValues(basisAtBasisEPoints, basisEPoints);
280 ScalarViewType basisDivAtBasisDivEPoints;
281 ScalarViewType basisDivAtTargetDivEPoints;
282 if(numTotalTargetDivEPoints>0) {
283 basisDivAtBasisDivEPoints = ScalarViewType (
"basisDivAtBasisDivEPoints",basisCardinality, numTotalBasisDivEPoints);
284 basisDivAtTargetDivEPoints = ScalarViewType(
"basisDivAtTargetDivEPoints",basisCardinality, numTotalTargetDivEPoints);
285 cellBasis->getValues(basisDivAtBasisDivEPoints, basisDivEPoints, OPERATOR_DIV);
286 cellBasis->getValues(basisDivAtTargetDivEPoints, targetDivEPoints, OPERATOR_DIV);
289 ScalarViewType refBasisCoeffs(
"refBasisCoeffs", basisCoeffs.extent(0), basisCoeffs.extent(1));
291 ordinal_type computedDofsCount = 0;
292 for(ordinal_type is=0; is<numSides; ++is) {
294 ordinal_type sideCardinality = cellBasis->getDofCount(sideDim,is);
296 ordinal_type numTargetEPoints = range_size(targetEPointsRange(sideDim,is));
297 ordinal_type numBasisEPoints = range_size(basisEPointsRange(sideDim,is));
299 auto sideDofs = Kokkos::subview(tagToOrdinal, sideDim, is, range_type(0,sideCardinality));
300 auto computedSideDofs = Kokkos::subview(computedDofs, range_type(computedDofsCount,computedDofsCount+sideCardinality));
301 deep_copy(computedSideDofs, sideDofs);
302 computedDofsCount += sideCardinality;
304 ScalarViewType refSideNormal(
"refSideNormal", dim);
307 ScalarViewType basisNormalAtBasisEPoints(
"normalBasisAtBasisEPoints",1,sideCardinality, numBasisEPoints);
308 ScalarViewType wBasisNormalAtBasisEPoints(
"wBasisNormalAtBasisEPoints",1,sideCardinality, numBasisEPoints);
309 ScalarViewType wBasisNormalAtTargetEPoints(
"wBasisNormalAtTargetEPoints",numCells,sideCardinality, numTargetEPoints);
310 ScalarViewType targetNormalAtTargetEPoints(
"targetNormalAtTargetEPoints",numCells, numTargetEPoints);
312 ordinal_type offsetBasis = basisEPointsRange(sideDim,is).first;
313 ordinal_type offsetTarget = targetEPointsRange(sideDim,is).first;
314 auto targetEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getTargetEvalWeights(sideDim,is));
315 auto basisEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getBasisEvalWeights(sideDim,is));
318 Kokkos::parallel_for(Kokkos::MDRangePolicy<ExecSpaceType, Kokkos::Rank<2> >({0,0}, {sideCardinality,numBasisEPoints}),
319 functorTypeWBasisEdge(basisNormalAtBasisEPoints,wBasisNormalAtBasisEPoints,basisAtBasisEPoints,basisEWeights,refSideNormal,tagToOrdinal,sideDim,is,offsetBasis));
322 Kokkos::parallel_for(policy, functorTypeSide(targetEWeights,
323 basisAtTargetEPoints, wBasisNormalAtTargetEPoints, tagToOrdinal,
324 targetAtEPoints, targetNormalAtTargetEPoints,
325 refSideNormal, sideCardinality,
326 offsetTarget, sideDim,
329 ScalarViewType sideMassMat_(
"sideMassMat_", 1, sideCardinality+1, sideCardinality+1),
330 sideRhsMat_(
"rhsMat_", numCells, sideCardinality+1);
332 ScalarViewType targetEWeights_(
"targetEWeights", numCells, 1, targetEWeights.extent(0));
335 range_type range_H(0, sideCardinality);
336 range_type range_B(sideCardinality, sideCardinality+1);
337 ScalarViewType ones(
"ones",1,1,numBasisEPoints);
338 Kokkos::deep_copy(ones,1);
346 typedef Kokkos::DynRankView<scalarType, Kokkos::LayoutRight, DeviceType> WorkArrayViewType;
347 ScalarViewType t_(
"t",numCells, sideCardinality+1);
348 WorkArrayViewType w_(
"w",numCells, sideCardinality+1);
350 auto sideDof = Kokkos::subview(tagToOrdinal, sideDim, is, Kokkos::ALL());
353 sideSystem.
solve(refBasisCoeffs, sideMassMat_, sideRhsMat_, t_, w_, sideDof, sideCardinality, 1);
358 ordinal_type numCellDofs = cellBasis->getDofCount(dim,0);
361 if(cellTopo.getKey() == shards::getCellTopologyData<shards::Hexahedron<8> >()->key)
363 else if(cellTopo.getKey() == shards::getCellTopologyData<shards::Tetrahedron<4> >()->key)
365 else if(cellTopo.getKey() == shards::getCellTopologyData<shards::Wedge<6> >()->key)
370 else if(cellTopo.getKey() == shards::getCellTopologyData<shards::Quadrilateral<4> >()->key)
372 else if(cellTopo.getKey() == shards::getCellTopologyData<shards::Triangle<3> >()->key)
375 std::stringstream ss;
376 ss <<
">>> ERROR (Intrepid2::ProjectionTools::getHDivBasisCoeffs): "
377 <<
"Method not implemented for basis " << name;
378 INTREPID2_TEST_FOR_EXCEPTION(
true, std::runtime_error, ss.str().c_str() );
380 if(hcurlBasis == NULL)
return;
386 ordinal_type numTargetDivEPoints = range_size(targetDivEPointsRange(dim,0));
387 ordinal_type numBasisDivEPoints = range_size(basisDivEPointsRange(dim,0));
389 auto targetDivEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getTargetDerivEvalWeights(dim,0));
392 ordinal_type offsetBasisDiv = basisDivEPointsRange(dim,0).first;
393 ordinal_type offsetTargetDiv = targetDivEPointsRange(dim,0).first;
395 ScalarViewType weightedBasisDivAtBasisEPoints(
"weightedBasisDivAtBasisEPoints",numCells,numCellDofs, numBasisDivEPoints);
396 ScalarViewType weightedBasisDivAtTargetEPoints(
"weightedBasisDivAtTargetEPoints",numCells, numCellDofs, numTargetDivEPoints);
397 ScalarViewType basisDivAtBasisEPoints(
"basisDivAtBasisEPoints",1,numCellDofs, numBasisDivEPoints);
398 ScalarViewType targetSideDivAtBasisEPoints(
"targetSideDivAtBasisEPoints",numCells, numBasisDivEPoints);
400 auto cellDofs = Kokkos::subview(tagToOrdinal, dim, 0, Kokkos::ALL());
402 Kokkos::parallel_for(policy, functorType( refBasisCoeffs, targetSideDivAtBasisEPoints, basisDivAtBasisEPoints,
403 basisDivAtBasisDivEPoints, divEWeights, weightedBasisDivAtBasisEPoints, targetDivEWeights, basisDivAtTargetDivEPoints, weightedBasisDivAtTargetEPoints,
404 computedDofs, cellDofs, numCellDofs, offsetBasisDiv, offsetTargetDiv, numSideDofs));
407 ordinal_type hcurlBasisCardinality = hcurlBasis->
getCardinality();
408 ordinal_type numCurlInteriorDOFs = hcurlBasis->
getDofCount(dim,0);
410 range_type range_H(0, numCellDofs);
411 range_type range_B(numCellDofs, numCellDofs+numCurlInteriorDOFs);
414 ScalarViewType massMat_(
"massMat_",1,numCellDofs+numCurlInteriorDOFs,numCellDofs+numCurlInteriorDOFs),
415 rhsMatTrans(
"rhsMatTrans",numCells,numCellDofs+numCurlInteriorDOFs);
417 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()) );
421 if(numCurlInteriorDOFs>0){
422 ordinal_type numTargetEPoints = range_size(targetEPointsRange(dim,0));
423 ordinal_type numBasisEPoints = range_size(basisEPointsRange(dim,0));
425 auto targetEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getTargetEvalWeights(dim,0));
426 auto basisEWeights = Kokkos::create_mirror_view_and_copy(MemSpaceType(),projStruct->
getBasisEvalWeights(dim,0));
428 ordinal_type offsetBasis = basisEPointsRange(dim,0).first;
430 ScalarViewType negPartialProjAtBasisEPoints(
"targetSideAtBasisEPoints",numCells, numBasisEPoints, dim);
431 ScalarViewType nonWeightedBasisAtBasisEPoints(
"basisAtBasisEPoints",1,numCellDofs, numBasisEPoints, dim);
432 ScalarViewType hcurlBasisCurlAtBasisEPoints(
"hcurlBasisCurlAtBasisEPoints",hcurlBasisCardinality, numBasisEPoints,dim);
433 ScalarViewType hcurlBasisCurlAtTargetEPoints(
"hcurlBasisCurlAtTargetEPoints", hcurlBasisCardinality,numTargetEPoints, dim);
434 ScalarViewType wHcurlBasisCurlAtBasisEPoints(
"wHcurlBasisHcurlAtBasisEPoints", numCells, numCurlInteriorDOFs, numBasisEPoints,dim);
435 ScalarViewType wHcurlBasisCurlAtTargetEPoints(
"wHcurlBasisHcurlAtTargetEPoints",numCells, numCurlInteriorDOFs, numTargetEPoints,dim);
437 hcurlBasis->
getValues(hcurlBasisCurlAtBasisEPoints, Kokkos::subview(basisEPoints, basisEPointsRange(dim,0), Kokkos::ALL()), OPERATOR_CURL);
438 hcurlBasis->
getValues(hcurlBasisCurlAtTargetEPoints, Kokkos::subview(targetEPoints,targetEPointsRange(dim,0),Kokkos::ALL()), OPERATOR_CURL);
440 auto hCurlTagToOrdinal = Kokkos::create_mirror_view_and_copy(MemSpaceType(), hcurlBasis->
getAllDofOrdinal());
441 auto cellHCurlDof = Kokkos::subview(hCurlTagToOrdinal, dim, 0, range_type(0, numCurlInteriorDOFs));
444 decltype(tagToOrdinal), decltype(computedDofs), decltype(cellDofs)>;
445 Kokkos::parallel_for(policy, functorTypeHCurlCells(refBasisCoeffs, negPartialProjAtBasisEPoints, nonWeightedBasisAtBasisEPoints,
446 basisAtBasisEPoints, hcurlBasisCurlAtBasisEPoints, basisEWeights, wHcurlBasisCurlAtBasisEPoints, targetEWeights,
447 hcurlBasisCurlAtTargetEPoints, wHcurlBasisCurlAtTargetEPoints, tagToOrdinal, computedDofs, cellHCurlDof,
448 numCellDofs, offsetBasis, numSideDofs, dim));
450 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()) );
451 FunctionSpaceTools<DeviceType >::integrate(Kokkos::subview(rhsMatTrans, Kokkos::ALL(), range_B), Kokkos::subview(targetAtEPoints, Kokkos::ALL(), targetEPointsRange(dim,0), Kokkos::ALL()), wHcurlBasisCurlAtTargetEPoints);
456 typedef Kokkos::DynRankView<scalarType, Kokkos::LayoutRight, DeviceType> WorkArrayViewType;
457 ScalarViewType t_(
"t",numCells, numCellDofs+numCurlInteriorDOFs);
458 WorkArrayViewType w_(
"w",numCells, numCellDofs+numCurlInteriorDOFs);
461 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.
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.
virtual KOKKOS_INLINE_FUNCTION void getValues(OutputViewType, const PointViewType, const EOperator, const typename Kokkos::TeamPolicy< ExecutionSpace >::member_type &teamMember, const typename ExecutionSpace::scratch_memory_space &scratchStorage, const ordinal_type subcellDim=-1, const ordinal_type subcellOrdinal=-1) const
Team-level evaluation of basis functions on a reference 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...