Intrepid2
Intrepid2_HDIV_TET_In_FEMDef.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ************************************************************************
3 //
4 // Intrepid2 Package
5 // Copyright (2007) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or
38 // Mauro Perego (mperego@sandia.gov)
39 //
40 // ************************************************************************
41 // @HEADER
42 
49 #ifndef __INTREPID2_HDIV_TET_IN_FEM_DEF_HPP__
50 #define __INTREPID2_HDIV_TET_IN_FEM_DEF_HPP__
51 
54 
55 namespace Intrepid2 {
56 
57 // -------------------------------------------------------------------------------------
58 
59 namespace Impl {
60 
61 template<EOperator opType>
62 template<typename OutputViewType,
63 typename inputViewType,
64 typename workViewType,
65 typename vinvViewType>
66 KOKKOS_INLINE_FUNCTION
67 void
68 Basis_HDIV_TET_In_FEM::Serial<opType>::
69 getValues( OutputViewType output,
70  const inputViewType input,
71  workViewType work,
72  const vinvViewType coeffs ) {
73 
74  constexpr ordinal_type spaceDim = 3;
75  const ordinal_type
76  cardPn = coeffs.extent(0)/spaceDim,
77  card = coeffs.extent(1),
78  npts = input.extent(0);
79 
80  // compute order
81  ordinal_type order = 0;
82  for (ordinal_type p=0;p<=Parameters::MaxOrder;++p) {
83  if (card == CardinalityHDivTet(p)) {
84  order = p;
85  break;
86  }
87  }
88 
89  typedef typename Kokkos::DynRankView<typename workViewType::value_type, typename workViewType::memory_space> viewType;
90  auto vcprop = Kokkos::common_view_alloc_prop(work);
91  auto ptr = work.data();
92 
93  switch (opType) {
94  case OPERATOR_VALUE: {
95  const viewType phis(Kokkos::view_wrap(ptr, vcprop), card, npts);
96  workViewType dummyView;
97 
98  Impl::Basis_HGRAD_TET_Cn_FEM_ORTH::
99  Serial<opType>::getValues(phis, input, dummyView, order);
100 
101  for (ordinal_type i=0;i<card;++i)
102  for (ordinal_type j=0;j<npts;++j)
103  for (ordinal_type d=0;d<spaceDim;++d) {
104  output.access(i,j,d) = 0.0;
105  for (ordinal_type k=0;k<cardPn;++k)
106  output.access(i,j,d) += coeffs(k+d*cardPn,i) * phis.access(k,j);
107  }
108  break;
109  }
110  case OPERATOR_DIV: {
111  const viewType phis(Kokkos::view_wrap(ptr, vcprop), card, npts, spaceDim);
112  ptr += card*npts*spaceDim*get_dimension_scalar(work);
113  const viewType workView(Kokkos::view_wrap(ptr, vcprop), card, npts, spaceDim+1);
114 
115  Impl::Basis_HGRAD_TET_Cn_FEM_ORTH::
116  Serial<OPERATOR_GRAD>::getValues(phis, input, workView, order);
117 
118  for (ordinal_type i=0;i<card;++i)
119  for (ordinal_type j=0;j<npts;++j) {
120  output.access(i,j) = 0.0;
121  for (ordinal_type k=0; k<cardPn; ++k)
122  for (ordinal_type d=0; d<spaceDim; ++d)
123  output.access(i,j) += coeffs(k+d*cardPn,i)*phis.access(k,j,d);
124  }
125  break;
126  }
127  default: {
128  INTREPID2_TEST_FOR_ABORT( true,
129  ">>> ERROR (Basis_HDIV_TET_In_FEM): Operator type not implemented");
130  }
131  }
132 }
133 
134 template<typename DT, ordinal_type numPtsPerEval,
135 typename outputValueValueType, class ...outputValueProperties,
136 typename inputPointValueType, class ...inputPointProperties,
137 typename vinvValueType, class ...vinvProperties>
138 void
139 Basis_HDIV_TET_In_FEM::
140 getValues( /* */ Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValues,
141  const Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPoints,
142  const Kokkos::DynRankView<vinvValueType, vinvProperties...> coeffs,
143  const EOperator operatorType) {
144  typedef Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValueViewType;
145  typedef Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPointViewType;
146  typedef Kokkos::DynRankView<vinvValueType, vinvProperties...> vinvViewType;
147  typedef typename ExecSpace<typename inputPointViewType::execution_space,typename DT::execution_space>::ExecSpaceType ExecSpaceType;
148 
149  // loopSize corresponds to cardinality
150  const auto loopSizeTmp1 = (inputPoints.extent(0)/numPtsPerEval);
151  const auto loopSizeTmp2 = (inputPoints.extent(0)%numPtsPerEval != 0);
152  const auto loopSize = loopSizeTmp1 + loopSizeTmp2;
153  Kokkos::RangePolicy<ExecSpaceType,Kokkos::Schedule<Kokkos::Static> > policy(0, loopSize);
154 
155  typedef typename inputPointViewType::value_type inputPointType;
156 
157  const ordinal_type cardinality = outputValues.extent(0);
158  const ordinal_type spaceDim = 3;
159 
160  auto vcprop = Kokkos::common_view_alloc_prop(inputPoints);
161  typedef typename Kokkos::DynRankView< inputPointType, typename inputPointViewType::memory_space> workViewType;
162 
163  switch (operatorType) {
164  case OPERATOR_VALUE: {
165  workViewType work(Kokkos::view_alloc("Basis_HDIV_TET_In_FEM::getValues::work", vcprop), cardinality, inputPoints.extent(0));
166  typedef Functor<outputValueViewType,inputPointViewType,vinvViewType, workViewType,
167  OPERATOR_VALUE,numPtsPerEval> FunctorType;
168  Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints, coeffs, work) );
169  break;
170  }
171  case OPERATOR_DIV: {
172  workViewType work(Kokkos::view_alloc("Basis_HDIV_TET_In_FEM::getValues::work", vcprop), cardinality*(2*spaceDim+1), inputPoints.extent(0));
173  typedef Functor<outputValueViewType,inputPointViewType,vinvViewType, workViewType,
174  OPERATOR_DIV,numPtsPerEval> FunctorType;
175  Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints, coeffs, work) );
176  break;
177  }
178  default: {
179  INTREPID2_TEST_FOR_EXCEPTION( true , std::invalid_argument,
180  ">>> ERROR (Basis_HDIV_TET_In_FEM): Operator type not implemented" );
181  }
182  }
183 }
184 }
185 
186 // -------------------------------------------------------------------------------------
187 template<typename DT, typename OT, typename PT>
189 Basis_HDIV_TET_In_FEM( const ordinal_type order,
190  const EPointType pointType ) {
191 
192  constexpr ordinal_type spaceDim = 3;
193  this->basisCardinality_ = CardinalityHDivTet(order);
194  this->basisDegree_ = order; // small n
195  this->basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Tetrahedron<4> >() );
196  this->basisType_ = BASIS_FEM_LAGRANGIAN;
197  this->basisCoordinates_ = COORDINATES_CARTESIAN;
198  this->functionSpace_ = FUNCTION_SPACE_HDIV;
199  pointType_ = pointType;
200 
201  const ordinal_type card = this->basisCardinality_;
202 
203  const ordinal_type cardPn = Intrepid2::getPnCardinality<spaceDim>(order); // dim of (P_{n}) -- smaller space
204  const ordinal_type cardPnm1 = Intrepid2::getPnCardinality<spaceDim>(order-1); // dim of (P_{n-1}) -- smaller space
205  const ordinal_type cardPnm2 = Intrepid2::getPnCardinality<spaceDim>(order-2); // dim of (P_{n-2}) -- smaller space
206  const ordinal_type cardVecPn = spaceDim*cardPn; // dim of (P_{n})^3 -- larger space
207  const ordinal_type cardVecPnm1 = spaceDim*cardPnm1; // dim of (P_{n-1})^3 -- smaller space
208  const ordinal_type dim_PkH = cardPnm1 - cardPnm2;
209 
210  // 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.
211  // 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.)
212  INTREPID2_TEST_FOR_EXCEPTION( order > Parameters::MaxOrder, std::invalid_argument, "polynomial order exceeds the max supported by this class");
213 
214  // Basis-dependent initializations
215  constexpr ordinal_type tagSize = 4; // size of DoF tag, i.e., number of fields in the tag
216  constexpr ordinal_type maxCard = CardinalityHDivTet(Parameters::MaxOrder);
217  ordinal_type tags[maxCard][tagSize];
218 
219  // points are computed in the host and will be copied
220  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
221  dofCoords("Hdiv::Tet::In::dofCoords", card, spaceDim);
222 
223  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
224  dofCoeffs("Hdiv::Tet::In::dofCoeffs", card, spaceDim);
225 
226  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
227  coeffs("Hdiv::Tet::In::coeffs", cardVecPn, card);
228 
229  // first, need to project the basis for RT space onto the
230  // orthogonal basis of degree n
231  // get coefficients of PkHx
232 
233  const ordinal_type lwork = card*card;
234  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
235  V1("Hdiv::Tet::In::V1", cardVecPn, card);
236 
237  // basis for the space is
238  // { (phi_i,0,0) }_{i=0}^{cardPnm1-1} ,
239  // { (0,phi_i,0) }_{i=0}^{cardPnm1-1} ,
240  // { (0,0,phi_i) }_{i=0}^{cardPnm1-1} ,
241  // { (x,y) . phi_i}_{i=cardPnm2}^{cardPnm1-1}
242  // columns of V1 are expansion of this basis in terms of the orthogonal basis
243  // for P_{n}^3
244 
245  // these two loops get the first two sets of basis functions
246  for (ordinal_type i=0;i<cardPnm1;i++) {
247  for (ordinal_type k=0; k<3;k++) {
248  V1(k*cardPn+i,k*cardPnm1+i) = 1.0;
249  }
250  }
251 
252  // now I need to integrate { (x,y,z) phi } against the big basis
253  // first, get a cubature rule.
255  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> cubPoints("Hdiv::Tet::In::cubPoints", myCub.getNumPoints() , spaceDim );
256  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> cubWeights("Hdiv::Tet::In::cubWeights", myCub.getNumPoints() );
257  myCub.getCubature( cubPoints , cubWeights );
258 
259  // tabulate the scalar orthonormal basis at cubature points
260  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> phisAtCubPoints("Hdiv::Tet::In::phisAtCubPoints", cardPn , myCub.getNumPoints() );
261  Impl::Basis_HGRAD_TET_Cn_FEM_ORTH::getValues<Kokkos::HostSpace::execution_space,Parameters::MaxNumPtsPerBasisEval>(typename Kokkos::HostSpace::execution_space{},
262  phisAtCubPoints,
263  cubPoints,
264  order,
265  OPERATOR_VALUE);
266 
267  // now do the integration
268  for (ordinal_type i=0;i<dim_PkH;i++) {
269  for (ordinal_type j=0;j<cardPn;j++) { // int (x,y,z) phi_i \cdot (phi_j,0,0)
270  V1(j,cardVecPnm1+i) = 0.0;
271  for (ordinal_type d=0; d< spaceDim; ++d)
272  for (ordinal_type k=0;k<myCub.getNumPoints();k++) {
273  V1(j+d*cardPn,cardVecPnm1+i) +=
274  cubWeights(k) * cubPoints(k,d)
275  * phisAtCubPoints(cardPnm2+i,k)
276  * phisAtCubPoints(j,k);
277  }
278  }
279  }
280 
281  // next, apply the RT nodes (rows) to the basis for (P_n)^3 (columns)
282  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
283  V2("Hdiv::Tet::In::V2", card ,cardVecPn);
284 
285  const ordinal_type numFaces = this->basisCellTopology_.getFaceCount();
286 
287  shards::CellTopology faceTop(shards::getCellTopologyData<shards::Triangle<3> >() );
288 
289  const int numPtsPerFace = PointTools::getLatticeSize( faceTop ,
290  order+2 ,
291  1 );
292 
293  // get the points on the tetrahedron face
294  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> triPts("Hdiv::Tet::In::triPts", numPtsPerFace , 2 );
295 
296  // construct lattice
297  const ordinal_type offset = 1;
298  PointTools::getLattice( triPts,
299  faceTop,
300  order+2,
301  offset,
302  pointType );
303 
304  // holds the image of the tet points
305  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> facePts("Hdiv::Tet::In::facePts", numPtsPerFace , spaceDim );
306  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> phisAtFacePoints("Hdiv::Tet::In::phisAtFacePoints", cardPn , numPtsPerFace );
307  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> faceNormal("Hcurl::Tet::In::faceNormal", spaceDim );
308 
309  // loop over faces
310  for (ordinal_type face=0;face<numFaces;face++) { // loop over faces
311 
312  // these are normal scaled by the appropriate face areas.
314  face ,
315  this->basisCellTopology_ );
316 
318  triPts ,
319  2 ,
320  face ,
321  this->basisCellTopology_ );
322 
323  // get phi values at face points
324  Impl::Basis_HGRAD_TET_Cn_FEM_ORTH::getValues<Kokkos::HostSpace::execution_space,Parameters::MaxNumPtsPerBasisEval>(typename Kokkos::HostSpace::execution_space{},
325  phisAtFacePoints,
326  facePts,
327  order,
328  OPERATOR_VALUE);
329 
330  // loop over points (rows of V2)
331  for (ordinal_type j=0;j<numPtsPerFace;j++) {
332 
333  const ordinal_type i_card = numPtsPerFace*face+j;
334 
335  // loop over orthonormal basis functions (columns of V2)
336  for (ordinal_type k=0;k<cardPn;k++) {
337  // loop over space dimension
338  for (ordinal_type l=0; l<spaceDim; l++)
339  V2(i_card,k+l*cardPn) = faceNormal(l) * phisAtFacePoints(k,j);
340  }
341 
342  //save dof coordinates and coefficients
343  for(ordinal_type l=0; l<spaceDim; ++l) {
344  dofCoords(i_card,l) = facePts(j,l);
345  dofCoeffs(i_card,l) = faceNormal(l);
346  }
347 
348  tags[i_card][0] = 2; // face dof
349  tags[i_card][1] = face; // face id
350  tags[i_card][2] = j; // local dof id
351  tags[i_card][3] = numPtsPerFace; // total vert dof
352 
353  }
354  }
355 
356  // remaining nodes point values of each vector component on interior
357  // points of a lattice of degree+2
358  // This way, RT0 --> degree = 1 and internal lattice has no points
359  // RT1 --> degree = 2, and internal lattice has one point (inside of quartic)
360  const ordinal_type numPtsPerCell = PointTools::getLatticeSize( this->basisCellTopology_ ,
361  order + 2 ,
362  1 );
363 
364  if (numPtsPerCell > 0) {
365  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
366  internalPoints( "Hdiv::Tet::In::internalPoints", numPtsPerCell , spaceDim );
367  PointTools::getLattice( internalPoints ,
368  this->basisCellTopology_ ,
369  order + 2 ,
370  1 ,
371  pointType );
372 
373  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
374  phisAtInternalPoints("Hdiv::Tet::In::phisAtInternalPoints", cardPn , numPtsPerCell );
375  Impl::Basis_HGRAD_TET_Cn_FEM_ORTH::getValues<Kokkos::HostSpace::execution_space,Parameters::MaxNumPtsPerBasisEval>(typename Kokkos::HostSpace::execution_space{},
376  phisAtInternalPoints,
377  internalPoints,
378  order,
379  OPERATOR_VALUE );
380 
381  // copy values into right positions of V2
382  for (ordinal_type j=0;j<numPtsPerCell;j++) {
383 
384  const ordinal_type i_card = numFaces*numPtsPerFace+spaceDim*j;
385 
386  for (ordinal_type k=0;k<cardPn;k++) {
387  for (ordinal_type l=0;l<spaceDim;l++) {
388  V2(i_card+l,l*cardPn+k) = phisAtInternalPoints(k,j);
389  }
390  }
391 
392  //save dof coordinates and coefficients
393  for(ordinal_type d=0; d<spaceDim; ++d) {
394  for(ordinal_type l=0; l<spaceDim; ++l) {
395  dofCoords(i_card+d,l) = internalPoints(j,l);
396  dofCoeffs(i_card+d,l) = (l==d);
397  }
398 
399  tags[i_card+d][0] = spaceDim; // elem dof
400  tags[i_card+d][1] = 0; // elem id
401  tags[i_card+d][2] = spaceDim*j+d; // local dof id
402  tags[i_card+d][3] = spaceDim*numPtsPerCell; // total vert dof
403  }
404  }
405  }
406 
407  // form Vandermonde matrix. Actually, this is the transpose of the VDM,
408  // so we transpose on copy below.
409  Kokkos::DynRankView<scalarType,Kokkos::LayoutLeft,Kokkos::HostSpace>
410  vmat("Hdiv::Tet::In::vmat", card, card),
411  work("Hdiv::Tet::In::work", lwork),
412  ipiv("Hdiv::Tet::In::ipiv", card);
413 
414  //vmat' = V2*V1;
415  for(ordinal_type i=0; i< card; ++i) {
416  for(ordinal_type j=0; j< card; ++j) {
417  scalarType s=0;
418  for(ordinal_type k=0; k< cardVecPn; ++k)
419  s += V2(i,k)*V1(k,j);
420  vmat(i,j) = s;
421  }
422  }
423 
424  ordinal_type info = 0;
425  Teuchos::LAPACK<ordinal_type,scalarType> lapack;
426 
427  lapack.GETRF(card, card,
428  vmat.data(), vmat.stride_1(),
429  (ordinal_type*)ipiv.data(),
430  &info);
431 
432  INTREPID2_TEST_FOR_EXCEPTION( info != 0,
433  std::runtime_error ,
434  ">>> ERROR: (Intrepid2::Basis_HDIV_TET_In_FEM) lapack.GETRF returns nonzero info." );
435 
436  lapack.GETRI(card,
437  vmat.data(), vmat.stride_1(),
438  (ordinal_type*)ipiv.data(),
439  work.data(), lwork,
440  &info);
441 
442  INTREPID2_TEST_FOR_EXCEPTION( info != 0,
443  std::runtime_error ,
444  ">>> ERROR: (Intrepid2::Basis_HDIV_TET_In_FEM) lapack.GETRI returns nonzero info." );
445 
446  for (ordinal_type i=0;i<cardVecPn;++i)
447  for (ordinal_type j=0;j<card;++j){
448  scalarType s=0;
449  for(ordinal_type k=0; k< card; ++k)
450  s += V1(i,k)*vmat(k,j);
451  coeffs(i,j) = s;
452  }
453 
454  this->coeffs_ = Kokkos::create_mirror_view(typename DT::memory_space(), coeffs);
455  Kokkos::deep_copy(this->coeffs_ , coeffs);
456 
457  this->dofCoords_ = Kokkos::create_mirror_view(typename DT::memory_space(), dofCoords);
458  Kokkos::deep_copy(this->dofCoords_, dofCoords);
459 
460  this->dofCoeffs_ = Kokkos::create_mirror_view(typename DT::memory_space(), dofCoeffs);
461  Kokkos::deep_copy(this->dofCoeffs_, dofCoeffs);
462 
463 
464  // set tags
465  {
466  // Basis-dependent initializations
467  const ordinal_type posScDim = 0; // position in the tag, counting from 0, of the subcell dim
468  const ordinal_type posScOrd = 1; // position in the tag, counting from 0, of the subcell ordinal
469  const ordinal_type posDfOrd = 2; // position in the tag, counting from 0, of DoF ordinal relative to the subcell
470 
471  OrdinalTypeArray1DHost tagView(&tags[0][0], card*tagSize);
472 
473  // Basis-independent function sets tag and enum data in tagToOrdinal_ and ordinalToTag_ arrays:
474  // tags are constructed on host
475  this->setOrdinalTagData(this->tagToOrdinal_,
476  this->ordinalToTag_,
477  tagView,
478  this->basisCardinality_,
479  tagSize,
480  posScDim,
481  posScOrd,
482  posDfOrd);
483  }
484 }
485 } // namespace Intrepid2
486 #endif
virtual void getCubature(PointViewType cubPoints, weightViewType cubWeights) const override
Returns cubature points and weights (return arrays must be pre-sized/pre-allocated).
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...
virtual ordinal_type getNumPoints() const override
Returns the number of cubature points.
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.
Header file for the Intrepid2::CubatureDirectTetDefault class.
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.
Defines direct integration rules on a tetrahedron.
Basis_HDIV_TET_In_FEM(const ordinal_type order, const EPointType pointType=POINTTYPE_EQUISPACED)
Constructor.
Header file for the Intrepid2::Basis_HGRAD_TET_Cn_FEM_ORTH class.
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...