Intrepid2
Intrepid2_HDIV_TET_In_FEMDef.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Intrepid2 Package
4//
5// Copyright 2007 NTESS and the Intrepid2 contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
15
16#ifndef __INTREPID2_HDIV_TET_IN_FEM_DEF_HPP__
17#define __INTREPID2_HDIV_TET_IN_FEM_DEF_HPP__
18
21
22namespace Intrepid2 {
23
24// -------------------------------------------------------------------------------------
25
26namespace Impl {
27
28template<EOperator OpType>
29template<typename OutputViewType,
30typename InputViewType,
31typename WorkViewType,
32typename VinvViewType>
33KOKKOS_INLINE_FUNCTION
34void
36getValues( OutputViewType output,
37 const InputViewType input,
38 WorkViewType work,
39 const VinvViewType coeffs ) {
40
41 constexpr ordinal_type spaceDim = 3;
42 const ordinal_type
43 cardPn = coeffs.extent(0)/spaceDim,
44 card = coeffs.extent(1),
45 npts = input.extent(0);
46
47 // compute order
48 ordinal_type order = 0;
49 for (ordinal_type p=0;p<=Parameters::MaxOrder;++p) {
50 if (card == CardinalityHDivTet(p)) {
51 order = p;
52 break;
53 }
54 }
55
56 typedef typename Kokkos::DynRankView<typename InputViewType::value_type, typename WorkViewType::memory_space> ViewType;
57 auto ptr = work.data();
58
59 switch (OpType) {
60 case OPERATOR_VALUE: {
61 const ViewType phis = createMatchingUnmanagedView<ViewType>(input, ptr, card, npts);
62 ViewType dummyView;
63
64 Impl::Basis_HGRAD_TET_Cn_FEM_ORTH::
65 Serial<OpType>::getValues(phis, input, dummyView, order);
66
67 for (ordinal_type i=0;i<card;++i)
68 for (ordinal_type j=0;j<npts;++j)
69 for (ordinal_type d=0;d<spaceDim;++d) {
70 output.access(i,j,d) = 0.0;
71 for (ordinal_type k=0;k<cardPn;++k)
72 output.access(i,j,d) += coeffs(k+d*cardPn,i) * phis.access(k,j);
73 }
74 break;
75 }
76 case OPERATOR_DIV: {
77 const ViewType phis = createMatchingUnmanagedView<ViewType>(input, ptr, card, npts, spaceDim);
78 ptr += card*npts*spaceDim*get_dimension_scalar(input);
79 const ViewType workView = createMatchingUnmanagedView<ViewType>(input, ptr, card, npts, spaceDim+1);
80
81 Impl::Basis_HGRAD_TET_Cn_FEM_ORTH::
82 Serial<OPERATOR_GRAD>::getValues(phis, input, workView, order);
83
84 for (ordinal_type i=0;i<card;++i)
85 for (ordinal_type j=0;j<npts;++j) {
86 output.access(i,j) = 0.0;
87 for (ordinal_type k=0; k<cardPn; ++k)
88 for (ordinal_type d=0; d<spaceDim; ++d)
89 output.access(i,j) += coeffs(k+d*cardPn,i)*phis.access(k,j,d);
90 }
91 break;
92 }
93 default: {
94 INTREPID2_TEST_FOR_ABORT( true,
95 ">>> ERROR (Basis_HDIV_TET_In_FEM): Operator type not implemented");
96 }
97 }
98}
99
100template<typename DT, ordinal_type numPtsPerEval,
101typename outputValueValueType, class ...outputValueProperties,
102typename inputPointValueType, class ...inputPointProperties,
103typename vinvValueType, class ...vinvProperties>
104void
105Basis_HDIV_TET_In_FEM::
106getValues( Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValues,
107 const Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPoints,
108 const Kokkos::DynRankView<vinvValueType, vinvProperties...> coeffs,
109 const EOperator operatorType) {
110 typedef Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValueViewType;
111 typedef Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPointViewType;
112 typedef Kokkos::DynRankView<vinvValueType, vinvProperties...> vinvViewType;
113 typedef typename ExecSpace<typename inputPointViewType::execution_space,typename DT::execution_space>::ExecSpaceType ExecSpaceType;
114
115 // loopSize corresponds to cardinality
116 const auto loopSizeTmp1 = (inputPoints.extent(0)/numPtsPerEval);
117 const auto loopSizeTmp2 = (inputPoints.extent(0)%numPtsPerEval != 0);
118 const auto loopSize = loopSizeTmp1 + loopSizeTmp2;
119 Kokkos::RangePolicy<ExecSpaceType,Kokkos::Schedule<Kokkos::Static> > policy(0, loopSize);
120
121 const ordinal_type cardinality = outputValues.extent(0);
122 const ordinal_type spaceDim = 3;
123
124 switch (operatorType) {
125 case OPERATOR_VALUE: {
126 auto work = createMatchingDynRankView(inputPoints, "Basis_HDIV_TET_In_FEM::getValues::work", cardinality, inputPoints.extent(0));
127 typedef Functor<outputValueViewType,inputPointViewType,vinvViewType, decltype(work),
128 OPERATOR_VALUE,numPtsPerEval> FunctorType;
129 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints, coeffs, work) );
130 break;
131 }
132 case OPERATOR_DIV: {
133 auto work = createMatchingDynRankView(inputPoints, "Basis_HDIV_TET_In_FEM::getValues::work", cardinality*(2*spaceDim+1), inputPoints.extent(0));
134 typedef Functor<outputValueViewType,inputPointViewType,vinvViewType, decltype(work),
135 OPERATOR_DIV,numPtsPerEval> FunctorType;
136 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints, coeffs, work) );
137 break;
138 }
139 default: {
140 INTREPID2_TEST_FOR_EXCEPTION( true , std::invalid_argument,
141 ">>> ERROR (Basis_HDIV_TET_In_FEM): Operator type not implemented" );
142 }
143 }
144}
145}
146
147// -------------------------------------------------------------------------------------
148template<typename DT, typename OT, typename PT>
150Basis_HDIV_TET_In_FEM( const ordinal_type order,
151 const EPointType pointType ) {
152
153 constexpr ordinal_type spaceDim = 3;
154 this->basisCardinality_ = CardinalityHDivTet(order);
155 this->basisDegree_ = order; // small n
156 this->basisCellTopologyKey_ = shards::Tetrahedron<4>::key;
157 this->basisType_ = BASIS_FEM_LAGRANGIAN;
158 this->basisCoordinates_ = COORDINATES_CARTESIAN;
159 this->functionSpace_ = FUNCTION_SPACE_HDIV;
160 pointType_ = pointType;
161
162 const ordinal_type card = this->basisCardinality_;
163
164 const ordinal_type cardPn = Intrepid2::getPnCardinality<spaceDim>(order); // dim of (P_{n}) -- smaller space
165 const ordinal_type cardPnm1 = Intrepid2::getPnCardinality<spaceDim>(order-1); // dim of (P_{n-1}) -- smaller space
166 const ordinal_type cardPnm2 = Intrepid2::getPnCardinality<spaceDim>(order-2); // dim of (P_{n-2}) -- smaller space
167 const ordinal_type cardVecPn = spaceDim*cardPn; // dim of (P_{n})^3 -- larger space
168 const ordinal_type cardVecPnm1 = spaceDim*cardPnm1; // dim of (P_{n-1})^3 -- smaller space
169 const ordinal_type dim_PkH = cardPnm1 - cardPnm2;
170
171 // Note: the only reason why equispaced can't support higher order than Parameters::MaxOrder appears to be the fact that the tags below get stored into a fixed-length array.
172 // TODO: relax the maximum order requirement by setting up tags in a different container, perhaps directly into an OrdinalTypeArray1DHost (tagView, below). (As of this writing (1/25/22), looks like other nodal bases do this in a similar way -- those should be fixed at the same time; maybe search for Parameters::MaxOrder.)
173 INTREPID2_TEST_FOR_EXCEPTION( order > Parameters::MaxOrder, std::invalid_argument, "polynomial order exceeds the max supported by this class");
174
175 // Basis-dependent initializations
176 constexpr ordinal_type tagSize = 4; // size of DoF tag, i.e., number of fields in the tag
177 constexpr ordinal_type maxCard = CardinalityHDivTet(Parameters::MaxOrder);
178 ordinal_type tags[maxCard][tagSize];
179
180 // points are computed in the host and will be copied
181 Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
182 dofCoords("Hdiv::Tet::In::dofCoords", card, spaceDim);
183
184 Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
185 dofCoeffs("Hdiv::Tet::In::dofCoeffs", card, spaceDim);
186
187 Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
188 coeffs("Hdiv::Tet::In::coeffs", cardVecPn, card);
189
190 // first, need to project the basis for RT space onto the
191 // orthogonal basis of degree n
192 // get coefficients of PkHx
193
194 const ordinal_type lwork = card*card;
195 Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
196 V1("Hdiv::Tet::In::V1", cardVecPn, card);
197
198 // basis for the space is
199 // { (phi_i,0,0) }_{i=0}^{cardPnm1-1} ,
200 // { (0,phi_i,0) }_{i=0}^{cardPnm1-1} ,
201 // { (0,0,phi_i) }_{i=0}^{cardPnm1-1} ,
202 // { (x,y) . phi_i}_{i=cardPnm2}^{cardPnm1-1}
203 // columns of V1 are expansion of this basis in terms of the orthogonal basis
204 // for P_{n}^3
205
206 // these two loops get the first two sets of basis functions
207 for (ordinal_type i=0;i<cardPnm1;i++) {
208 for (ordinal_type k=0; k<3;k++) {
209 V1(k*cardPn+i,k*cardPnm1+i) = 1.0;
210 }
211 }
212
213 // now I need to integrate { (x,y,z) phi } against the big basis
214 // first, get a cubature rule.
216 Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> cubPoints("Hdiv::Tet::In::cubPoints", myCub.getNumPoints() , spaceDim );
217 Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> cubWeights("Hdiv::Tet::In::cubWeights", myCub.getNumPoints() );
218 myCub.getCubature( cubPoints , cubWeights );
219
220 // tabulate the scalar orthonormal basis at cubature points
221 Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> phisAtCubPoints("Hdiv::Tet::In::phisAtCubPoints", cardPn , myCub.getNumPoints() );
222 Impl::Basis_HGRAD_TET_Cn_FEM_ORTH::getValues<Kokkos::HostSpace::execution_space,Parameters::MaxNumPtsPerBasisEval>(typename Kokkos::HostSpace::execution_space{},
223 phisAtCubPoints,
224 cubPoints,
225 order,
226 OPERATOR_VALUE);
227
228 // now do the integration
229 for (ordinal_type i=0;i<dim_PkH;i++) {
230 for (ordinal_type j=0;j<cardPn;j++) { // int (x,y,z) phi_i \cdot (phi_j,0,0)
231 V1(j,cardVecPnm1+i) = 0.0;
232 for (ordinal_type d=0; d< spaceDim; ++d)
233 for (ordinal_type k=0;k<myCub.getNumPoints();k++) {
234 V1(j+d*cardPn,cardVecPnm1+i) +=
235 cubWeights(k) * cubPoints(k,d)
236 * phisAtCubPoints(cardPnm2+i,k)
237 * phisAtCubPoints(j,k);
238 }
239 }
240 }
241
242 // next, apply the RT nodes (rows) to the basis for (P_n)^3 (columns)
243 Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
244 V2("Hdiv::Tet::In::V2", card ,cardVecPn);
245
246 const shards::CellTopology cellTopo(shards::getCellTopologyData<shards::Tetrahedron<4>>());
247 const ordinal_type numFaces = cellTopo.getFaceCount();
248
249 shards::CellTopology faceTopo(shards::getCellTopologyData<shards::Triangle<3> >() );
250
251 const int numPtsPerFace = PointTools::getLatticeSize( faceTopo ,
252 order+2 ,
253 1 );
254
255 // get the points on the tetrahedron face
256 Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> triPts("Hdiv::Tet::In::triPts", numPtsPerFace , 2 );
257
258 // construct lattice
259 const ordinal_type offset = 1;
261 faceTopo,
262 order+2,
263 offset,
264 pointType );
265
266 // holds the image of the tet points
267 Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> facePts("Hdiv::Tet::In::facePts", numPtsPerFace , spaceDim );
268 Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> phisAtFacePoints("Hdiv::Tet::In::phisAtFacePoints", cardPn , numPtsPerFace );
269 Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> faceNormal("Hcurl::Tet::In::faceNormal", spaceDim );
270
271 // loop over faces
272 for (ordinal_type face=0;face<numFaces;face++) { // loop over faces
273
274 // these are normal scaled by the appropriate face areas.
276 face ,
277 cellTopo );
278
280 triPts ,
281 2 ,
282 face ,
283 cellTopo );
284
285 // get phi values at face points
286 Impl::Basis_HGRAD_TET_Cn_FEM_ORTH::getValues<Kokkos::HostSpace::execution_space,Parameters::MaxNumPtsPerBasisEval>(typename Kokkos::HostSpace::execution_space{},
287 phisAtFacePoints,
288 facePts,
289 order,
290 OPERATOR_VALUE);
291
292 // loop over points (rows of V2)
293 for (ordinal_type j=0;j<numPtsPerFace;j++) {
294
295 const ordinal_type i_card = numPtsPerFace*face+j;
296
297 // loop over orthonormal basis functions (columns of V2)
298 for (ordinal_type k=0;k<cardPn;k++) {
299 // loop over space dimension
300 for (ordinal_type l=0; l<spaceDim; l++)
301 V2(i_card,k+l*cardPn) = faceNormal(l) * phisAtFacePoints(k,j);
302 }
303
304 //save dof coordinates and coefficients
305 for(ordinal_type l=0; l<spaceDim; ++l) {
306 dofCoords(i_card,l) = facePts(j,l);
307 dofCoeffs(i_card,l) = faceNormal(l);
308 }
309
310 tags[i_card][0] = 2; // face dof
311 tags[i_card][1] = face; // face id
312 tags[i_card][2] = j; // local dof id
313 tags[i_card][3] = numPtsPerFace; // total vert dof
314
315 }
316 }
317
318 // remaining nodes point values of each vector component on interior
319 // points of a lattice of degree+2
320 // This way, RT0 --> degree = 1 and internal lattice has no points
321 // RT1 --> degree = 2, and internal lattice has one point (inside of quartic)
322 const ordinal_type numPtsPerCell = PointTools::getLatticeSize( cellTopo ,
323 order + 2 ,
324 1 );
325
326 if (numPtsPerCell > 0) {
327 Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
328 internalPoints( "Hdiv::Tet::In::internalPoints", numPtsPerCell , spaceDim );
329 PointTools::getLattice( internalPoints ,
330 cellTopo ,
331 order + 2 ,
332 1 ,
333 pointType );
334
335 Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
336 phisAtInternalPoints("Hdiv::Tet::In::phisAtInternalPoints", cardPn , numPtsPerCell );
337 Impl::Basis_HGRAD_TET_Cn_FEM_ORTH::getValues<Kokkos::HostSpace::execution_space,Parameters::MaxNumPtsPerBasisEval>(typename Kokkos::HostSpace::execution_space{},
338 phisAtInternalPoints,
339 internalPoints,
340 order,
341 OPERATOR_VALUE );
342
343 // copy values into right positions of V2
344 for (ordinal_type j=0;j<numPtsPerCell;j++) {
345
346 const ordinal_type i_card = numFaces*numPtsPerFace+spaceDim*j;
347
348 for (ordinal_type k=0;k<cardPn;k++) {
349 for (ordinal_type l=0;l<spaceDim;l++) {
350 V2(i_card+l,l*cardPn+k) = phisAtInternalPoints(k,j);
351 }
352 }
353
354 //save dof coordinates and coefficients
355 for(ordinal_type d=0; d<spaceDim; ++d) {
356 for(ordinal_type l=0; l<spaceDim; ++l) {
357 dofCoords(i_card+d,l) = internalPoints(j,l);
358 dofCoeffs(i_card+d,l) = (l==d);
359 }
360
361 tags[i_card+d][0] = spaceDim; // elem dof
362 tags[i_card+d][1] = 0; // elem id
363 tags[i_card+d][2] = spaceDim*j+d; // local dof id
364 tags[i_card+d][3] = spaceDim*numPtsPerCell; // total vert dof
365 }
366 }
367 }
368
369 // form Vandermonde matrix. Actually, this is the transpose of the VDM,
370 // so we transpose on copy below.
371 Kokkos::DynRankView<scalarType,Kokkos::LayoutLeft,Kokkos::HostSpace>
372 vmat("Hdiv::Tet::In::vmat", card, card),
373 work("Hdiv::Tet::In::work", lwork),
374 ipiv("Hdiv::Tet::In::ipiv", card);
375
376 //vmat' = V2*V1;
377 for(ordinal_type i=0; i< card; ++i) {
378 for(ordinal_type j=0; j< card; ++j) {
379 scalarType s=0;
380 for(ordinal_type k=0; k< cardVecPn; ++k)
381 s += V2(i,k)*V1(k,j);
382 vmat(i,j) = s;
383 }
384 }
385
386 ordinal_type info = 0;
387 Teuchos::LAPACK<ordinal_type,scalarType> lapack;
388
389 lapack.GETRF(card, card,
390 vmat.data(), vmat.stride(1),
391 (ordinal_type*)ipiv.data(),
392 &info);
393
394 INTREPID2_TEST_FOR_EXCEPTION( info != 0,
395 std::runtime_error ,
396 ">>> ERROR: (Intrepid2::Basis_HDIV_TET_In_FEM) lapack.GETRF returns nonzero info." );
397
398 lapack.GETRI(card,
399 vmat.data(), vmat.stride(1),
400 (ordinal_type*)ipiv.data(),
401 work.data(), lwork,
402 &info);
403
404 INTREPID2_TEST_FOR_EXCEPTION( info != 0,
405 std::runtime_error ,
406 ">>> ERROR: (Intrepid2::Basis_HDIV_TET_In_FEM) lapack.GETRI returns nonzero info." );
407
408 for (ordinal_type i=0;i<cardVecPn;++i)
409 for (ordinal_type j=0;j<card;++j){
410 scalarType s=0;
411 for(ordinal_type k=0; k< card; ++k)
412 s += V1(i,k)*vmat(k,j);
413 coeffs(i,j) = s;
414 }
415
416 this->coeffs_ = Kokkos::create_mirror_view(typename DT::memory_space(), coeffs);
417 Kokkos::deep_copy(this->coeffs_ , coeffs);
418
419 this->dofCoords_ = Kokkos::create_mirror_view(typename DT::memory_space(), dofCoords);
420 Kokkos::deep_copy(this->dofCoords_, dofCoords);
421
422 this->dofCoeffs_ = Kokkos::create_mirror_view(typename DT::memory_space(), dofCoeffs);
423 Kokkos::deep_copy(this->dofCoeffs_, dofCoeffs);
424
425
426 // set tags
427 {
428 // Basis-dependent initializations
429 const ordinal_type posScDim = 0; // position in the tag, counting from 0, of the subcell dim
430 const ordinal_type posScOrd = 1; // position in the tag, counting from 0, of the subcell ordinal
431 const ordinal_type posDfOrd = 2; // position in the tag, counting from 0, of DoF ordinal relative to the subcell
432
433 OrdinalTypeArray1DHost tagView(&tags[0][0], card*tagSize);
434
435 // Basis-independent function sets tag and enum data in tagToOrdinal_ and ordinalToTag_ arrays:
436 // tags are constructed on host
438 this->ordinalToTag_,
439 tagView,
440 this->basisCardinality_,
441 tagSize,
442 posScDim,
443 posScOrd,
444 posDfOrd);
445 }
446}
447
448template<typename DT, typename OT, typename PT>
449void
450Basis_HDIV_TET_In_FEM<DT,OT,PT>::getScratchSpaceSize(
451 ordinal_type& perTeamSpaceSize,
452 ordinal_type& perThreadSpaceSize,
453 const PointViewType inputPoints,
454 const EOperator operatorType) const {
455 perTeamSpaceSize = 0;
456 ordinal_type scalarWorkViewExtent = (operatorType == OPERATOR_VALUE) ? this->basisCardinality_ : 7*this->basisCardinality_;
457 perThreadSpaceSize = scalarWorkViewExtent*get_dimension_scalar(inputPoints)*sizeof(typename BasisBase::scalarType);
458}
459
460template<typename DT, typename OT, typename PT>
461KOKKOS_INLINE_FUNCTION
462void
463Basis_HDIV_TET_In_FEM<DT,OT,PT>::getValues(
464 OutputViewType outputValues,
465 const PointViewType inputPoints,
466 const EOperator operatorType,
467 const typename Kokkos::TeamPolicy<typename DT::execution_space>::member_type& team_member,
468 const typename DT::execution_space::scratch_memory_space & scratchStorage,
469 const ordinal_type subcellDim,
470 const ordinal_type subcellOrdinal) const {
471
472 INTREPID2_TEST_FOR_ABORT( !((subcellDim == -1) && (subcellOrdinal == -1)),
473 ">>> ERROR: (Intrepid2::Basis_HDIV_TET_In_FEM::getValues), The capability of selecting subsets of basis functions has not been implemented yet.");
474
475 const int numPoints = inputPoints.extent(0);
476 using ScalarType = typename ScalarTraits<typename PointViewType::value_type>::scalar_type;
477 using WorkViewType = Kokkos::DynRankView< ScalarType,typename DT::execution_space::scratch_memory_space,Kokkos::MemoryTraits<Kokkos::Unmanaged> >;
478 ordinal_type scalarSizePerPoint = (operatorType == OPERATOR_VALUE) ? this->basisCardinality_ : 7*this->basisCardinality_;
479 ordinal_type sizePerPoint = scalarSizePerPoint*get_dimension_scalar(inputPoints);
480 WorkViewType workView(scratchStorage, sizePerPoint*team_member.team_size());
481 using range_type = Kokkos::pair<ordinal_type,ordinal_type>;
482
483 switch(operatorType) {
484 case OPERATOR_VALUE:
485 Kokkos::parallel_for (Kokkos::TeamThreadRange (team_member, numPoints), [=, &coeffs_ = this->coeffs_] (ordinal_type& pt) {
486 auto output = Kokkos::subview( outputValues, Kokkos::ALL(), range_type (pt,pt+1), Kokkos::ALL() );
487 const auto input = Kokkos::subview( inputPoints, range_type(pt, pt+1), Kokkos::ALL() );
488 WorkViewType work(workView.data() + sizePerPoint*team_member.team_rank(), sizePerPoint);
489 Impl::Basis_HDIV_TET_In_FEM::Serial<OPERATOR_VALUE>::getValues( output, input, work, coeffs_ );
490 });
491 break;
492 case OPERATOR_DIV:
493 Kokkos::parallel_for (Kokkos::TeamThreadRange (team_member, numPoints), [=, &coeffs_ = this->coeffs_] (ordinal_type& pt) {
494 auto output = Kokkos::subview( outputValues, Kokkos::ALL(), range_type(pt,pt+1), Kokkos::ALL() );
495 const auto input = Kokkos::subview( inputPoints, range_type(pt,pt+1), Kokkos::ALL() );
496 WorkViewType work(workView.data() + sizePerPoint*team_member.team_rank(), sizePerPoint);
497 Impl::Basis_HDIV_TET_In_FEM::Serial<OPERATOR_DIV>::getValues( output, input, work, coeffs_ );
498 });
499 break;
500 default: {
501 INTREPID2_TEST_FOR_ABORT( true,
502 ">>> ERROR (Basis_HDIV_TET_In_FEM): getValues not implemented for this operator");
503 }
504 }
505}
506} // namespace Intrepid2
507#endif
KOKKOS_INLINE_FUNCTION ordinal_type getPnCardinality(ordinal_type n)
Returns cardinality of Polynomials of order n (P^n).
Header file for the Intrepid2::CubatureDirectTetDefault class.
Header file for the Intrepid2::Basis_HGRAD_TET_Cn_FEM_ORTH class.
KOKKOS_INLINE_FUNCTION std::enable_if< std::is_pointer_v< CtorProp > &&!std::is_convertible_v< CtorProp, constchar * >, OutViewType >::type createMatchingUnmanagedView(const InViewType &view, const CtorProp &data, const Dims... dims)
Creates an unmanaged view that matches the value_type of the provided view The type of the output vie...
DeduceDynRankView< InViewType >::type createMatchingDynRankView(const InViewType &view, const CtorProp &prop, const Dims... dims)
Creates and returns a view that matches the value_type of the provided view The output view type is d...
Basis_HDIV_TET_In_FEM(const ordinal_type order, const EPointType pointType=POINTTYPE_EQUISPACED)
Constructor.
EPointType pointType_
type of lattice used for creating the DoF coordinates
Kokkos::DynRankView< scalarType, DeviceType > coeffs_
expansion coefficients of the nodal basis in terms of the orthgonal one
void setOrdinalTagData(OrdinalTypeView3D &tagToOrdinal, OrdinalTypeView2D &ordinalToTag, const OrdinalTypeView1D tags, const ordinal_type basisCard, const ordinal_type tagSize, const ordinal_type posScDim, const ordinal_type posScOrd, const ordinal_type posDfOrd)
Kokkos::DynRankView< scalarType, DeviceType > dofCoords_
Kokkos::DynRankView< scalarType, DeviceType > dofCoeffs_
static void mapToReferenceSubcell(refSubcellViewType refSubcellPoints, const paramPointViewType paramPoints, const ordinal_type subcellDim, const ordinal_type subcellOrd, const shards::CellTopology parentCell)
Computes parameterization maps of 1- and 2-subcells of reference cells.
static void getReferenceSideNormal(RefSideNormalViewType refSideNormal, const ordinal_type sideOrd, const shards::CellTopology parentCell)
Computes constant normal vectors to sides of 2D or 3D reference cells.
virtual ordinal_type getNumPoints() const override
Returns the number of cubature points.
Defines direct integration rules on a tetrahedron.
static constexpr ordinal_type MaxOrder
The maximum reconstruction order.
static ordinal_type getLatticeSize(const shards::CellTopology cellType, const ordinal_type order, const ordinal_type offset=0)
Computes the number of points in a lattice of a given order on a simplex (currently disabled for othe...
static void getLattice(Kokkos::DynRankView< pointValueType, pointProperties... > points, const shards::CellTopology cellType, const ordinal_type order, const ordinal_type offset=0, const EPointType pointType=POINTTYPE_EQUISPACED)
Computes a lattice of points of a given order on a reference simplex, quadrilateral or hexahedron (cu...