Intrepid2
Intrepid2_HCURL_TRI_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_HCURL_TRI_IN_FEM_DEF_HPP__
50 #define __INTREPID2_HCURL_TRI_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_HCURL_TRI_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 = 2;
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 == CardinalityHCurlTri(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_TRI_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(k,j);
107  }
108  break;
109  }
110  case OPERATOR_CURL: {
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_TRI_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  output.access(i,j) += - coeffs(k,i)*phis(k,j,1) // - dy of x component
123  + coeffs(k+cardPn,i)*phis(k,j,0); // dx of y component
124  }
125  break;
126  }
127  default: {
128  INTREPID2_TEST_FOR_ABORT( true,
129  ">>> ERROR (Basis_HCURL_TRI_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_HCURL_TRI_In_FEM::
140  getValues( const typename DT::execution_space& space,
141  Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValues,
142  const Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPoints,
143  const Kokkos::DynRankView<vinvValueType, vinvProperties...> coeffs,
144  const EOperator operatorType) {
145  typedef Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValueViewType;
146  typedef Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPointViewType;
147  typedef Kokkos::DynRankView<vinvValueType, vinvProperties...> vinvViewType;
148  typedef typename ExecSpace<typename inputPointViewType::execution_space,typename DT::execution_space>::ExecSpaceType ExecSpaceType;
149 
150  // loopSize corresponds to cardinality
151  const auto loopSizeTmp1 = (inputPoints.extent(0)/numPtsPerEval);
152  const auto loopSizeTmp2 = (inputPoints.extent(0)%numPtsPerEval != 0);
153  const auto loopSize = loopSizeTmp1 + loopSizeTmp2;
154  Kokkos::RangePolicy<ExecSpaceType,Kokkos::Schedule<Kokkos::Static> > policy(space, 0, loopSize);
155 
156  typedef typename inputPointViewType::value_type inputPointType;
157 
158  const ordinal_type cardinality = outputValues.extent(0);
159  const ordinal_type spaceDim = 2;
160 
161  auto vcprop = Kokkos::common_view_alloc_prop(inputPoints);
162  typedef typename Kokkos::DynRankView< inputPointType, typename inputPointViewType::memory_space> workViewType;
163 
164  switch (operatorType) {
165  case OPERATOR_VALUE: {
166  workViewType work(Kokkos::view_alloc(space, "Basis_HCURL_TRI_In_FEM::getValues::work", vcprop), cardinality, inputPoints.extent(0));
167  typedef Functor<outputValueViewType,inputPointViewType,vinvViewType, workViewType,
168  OPERATOR_VALUE,numPtsPerEval> FunctorType;
169  Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints, coeffs, work) );
170  break;
171  }
172  case OPERATOR_CURL: {
173  workViewType work(Kokkos::view_alloc(space, "Basis_HCURL_TRI_In_FEM::getValues::work", vcprop), cardinality*(2*spaceDim+1), inputPoints.extent(0));
174  typedef Functor<outputValueViewType,inputPointViewType,vinvViewType, workViewType,
175  OPERATOR_CURL,numPtsPerEval> FunctorType;
176  Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints, coeffs, work) );
177  break;
178  }
179  default: {
180  INTREPID2_TEST_FOR_EXCEPTION( true , std::invalid_argument,
181  ">>> ERROR (Basis_HCURL_TRI_In_FEM): Operator type not implemented" );
182  }
183  }
184  }
185  }
186 
187  // -------------------------------------------------------------------------------------
188  template<typename DT, typename OT, typename PT>
190  Basis_HCURL_TRI_In_FEM( const ordinal_type order,
191  const EPointType pointType ) {
192 
193  constexpr ordinal_type spaceDim = 2;
194  this->basisCardinality_ = CardinalityHCurlTri(order);
195  this->basisDegree_ = order; // small n
196  this->basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Triangle<3> >() );
197  this->basisType_ = BASIS_FEM_LAGRANGIAN;
198  this->basisCoordinates_ = COORDINATES_CARTESIAN;
199  this->functionSpace_ = FUNCTION_SPACE_HCURL;
200  pointType_ = (pointType == POINTTYPE_DEFAULT) ? POINTTYPE_EQUISPACED : pointType;
201 
202  const ordinal_type card = this->basisCardinality_;
203 
204  const ordinal_type cardPn = Intrepid2::getPnCardinality<spaceDim>(order); // dim of (P_{n}) -- smaller space
205  const ordinal_type cardPnm1 = Intrepid2::getPnCardinality<spaceDim>(order-1); // dim of (P_{n-1}) -- smaller space
206  const ordinal_type cardPnm2 = Intrepid2::getPnCardinality<spaceDim>(order-2); // dim of (P_{n-2}) -- smaller space
207  const ordinal_type cardVecPn = spaceDim*cardPn; // dim of (P_{n})^2 -- larger space
208  const ordinal_type cardVecPnm1 = spaceDim*cardPnm1; // dim of (P_{n-1})^2 -- smaller space
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 = CardinalityHCurlTri(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("Hcurl::Tri::In::dofCoords", card, spaceDim);
222 
223  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
224  coeffs("Hcurl::Tri::In::coeffs", cardVecPn, card);
225 
226  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
227  dofCoeffs("Hcurl::Tri::In::dofCoeffs", card, spaceDim);
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("Hcurl::Tri::In::V1", cardVecPn, card);
236 
237  // basis for the space is
238  // { (phi_i,0) }_{i=0}^{cardPnm1-1} ,
239  // { (0,phi_i) }_{i=0}^{cardPnm1-1} ,
240  // { (x,y) \times phi_i}_{i=cardPnm2}^{cardPnm1-1}
241  // { (x,y) \times phi = (y phi , -x \phi)
242  // columns of V1 are expansion of this basis in terms of the basis
243  // for P_{n}^2
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 d=0;d<spaceDim;d++)
248  V1(d*cardPn+i,d*cardPnm1+i) = 1.0;
249 
250 
251  // now I need to integrate { (x,y) \times phi } against the big basis
252  // first, get a cubature rule.
254  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> cubPoints("Hcurl::Tri::In::cubPoints", myCub.getNumPoints() , spaceDim );
255  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> cubWeights("Hcurl::Tri::In::cubWeights", myCub.getNumPoints() );
256  myCub.getCubature( cubPoints , cubWeights );
257 
258  // tabulate the scalar orthonormal basis at cubature points
259  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> phisAtCubPoints("Hcurl::Tri::In::phisAtCubPoints", cardPn , myCub.getNumPoints() );
260  Impl::Basis_HGRAD_TRI_Cn_FEM_ORTH::getValues<Kokkos::HostSpace::execution_space,Parameters::MaxNumPtsPerBasisEval>(typename Kokkos::HostSpace::execution_space{},
261  phisAtCubPoints,
262  cubPoints,
263  order,
264  OPERATOR_VALUE);
265 
266  // now do the integration
267  for (ordinal_type i=0;i<order;i++) {
268  for (ordinal_type j=0;j<cardPn;j++) { // int (x,y) phi_i \cdot (phi_j,phi_{j+cardPn})
269  for (ordinal_type k=0;k<myCub.getNumPoints();k++) {
270  V1(j,cardVecPnm1+i) -=
271  cubWeights(k) * cubPoints(k,1)
272  * phisAtCubPoints(cardPnm2+i,k)
273  * phisAtCubPoints(j,k);
274  V1(j+cardPn,cardVecPnm1+i) +=
275  cubWeights(k) * cubPoints(k,0)
276  * phisAtCubPoints(cardPnm2+i,k)
277  * phisAtCubPoints(j,k);
278  }
279  }
280  }
281 
282  // next, apply the RT nodes (rows) to the basis for (P_n)^2 (columns)
283  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
284  V2("Hcurl::Tri::In::V2", card ,cardVecPn);
285 
286  const ordinal_type numEdges = this->basisCellTopology_.getEdgeCount();
287 
288  shards::CellTopology edgeTop(shards::getCellTopologyData<shards::Line<2> >() );
289 
290  const int numPtsPerEdge = PointTools::getLatticeSize( edgeTop ,
291  order+1 ,
292  1 );
293 
294  // first numEdges * degree nodes are tangents at each edge
295  // get the points on the line
296  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> linePts("Hcurl::Tri::In::linePts", numPtsPerEdge , 1 );
297 
298  // construct lattice
299  const ordinal_type offset = 1;
300  PointTools::getLattice( linePts,
301  edgeTop,
302  order+1, offset,
303  pointType_ );
304 
305  // holds the image of the line points
306  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> edgePts("Hcurl::Tri::In::edgePts", numPtsPerEdge , spaceDim );
307  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> phisAtEdgePoints("Hcurl::Tri::In::phisAtEdgePoints", cardPn , numPtsPerEdge );
308  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace> edgeTan("Hcurl::Tri::In::edgeTan", spaceDim );
309 
310  // these are tangents scaled by the appropriate edge lengths.
311  for (ordinal_type edge=0;edge<numEdges;edge++) { // loop over edges
313  edge ,
314  this->basisCellTopology_ );
315 
317  linePts ,
318  1 ,
319  edge ,
320  this->basisCellTopology_ );
321 
322  Impl::Basis_HGRAD_TRI_Cn_FEM_ORTH::getValues<Kokkos::HostSpace::execution_space,Parameters::MaxNumPtsPerBasisEval>(typename Kokkos::HostSpace::execution_space{},
323  phisAtEdgePoints,
324  edgePts,
325  order,
326  OPERATOR_VALUE);
327 
328  // loop over points (rows of V2)
329  for (ordinal_type j=0;j<numPtsPerEdge;j++) {
330 
331  const ordinal_type i_card = numPtsPerEdge*edge+j;
332 
333  // loop over orthonormal basis functions (columns of V2)
334  for (ordinal_type k=0;k<cardPn;k++) {
335  V2(i_card,k) = edgeTan(0) * phisAtEdgePoints(k,j);
336  V2(i_card,k+cardPn) = edgeTan(1) * phisAtEdgePoints(k,j);
337  }
338 
339 
340  //save dof coordinates
341  for(ordinal_type k=0; k<spaceDim; ++k) {
342  dofCoords(i_card,k) = edgePts(j,k);
343  dofCoeffs(i_card,k) = edgeTan(k);
344  }
345 
346  tags[i_card][0] = 1; // edge dof
347  tags[i_card][1] = edge; // edge id
348  tags[i_card][2] = j; // local dof id
349  tags[i_card][3] = numPtsPerEdge; // total edge dof
350 
351  }
352 
353 
354  }
355 
356  // remaining nodes are x- and y- components at internal points (this code is same as HDIV).
357  //These are evaluated at the interior of a lattice of degree + 1, For then
358  // the degree == 1 space corresponds classicaly to RT0 and so gets
359  // no internal nodes, and degree == 2 corresponds to RT1 and needs
360  // one internal node per vector component.
361  const ordinal_type numPtsPerCell = PointTools::getLatticeSize( this->basisCellTopology_ ,
362  order + 1 ,
363  1 );
364 
365  if (numPtsPerCell > 0) {
366  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
367  internalPoints( "Hcurl::Tri::In::internalPoints", numPtsPerCell , spaceDim );
368  PointTools::getLattice( internalPoints ,
369  this->basisCellTopology_ ,
370  order + 1 ,
371  1 ,
372  pointType_ );
373 
374  Kokkos::DynRankView<scalarType,typename DT::execution_space::array_layout,Kokkos::HostSpace>
375  phisAtInternalPoints("Hcurl::Tri::In::phisAtInternalPoints", cardPn , numPtsPerCell );
376  Impl::Basis_HGRAD_TRI_Cn_FEM_ORTH::getValues<Kokkos::HostSpace::execution_space,Parameters::MaxNumPtsPerBasisEval>(typename Kokkos::HostSpace::execution_space{},
377  phisAtInternalPoints,
378  internalPoints,
379  order,
380  OPERATOR_VALUE);
381 
382  // copy values into right positions of V2
383  for (ordinal_type j=0;j<numPtsPerCell;j++) {
384 
385  const ordinal_type i_card = numEdges*order+spaceDim*j;
386 
387  for (ordinal_type k=0;k<cardPn;k++) {
388  // x component
389  V2(i_card,k) = phisAtInternalPoints(k,j);
390  // y component
391  V2(i_card+1,cardPn+k) = phisAtInternalPoints(k,j);
392  }
393 
394  //save dof coordinates
395  for(ordinal_type d=0; d<spaceDim; ++d) {
396  for(ordinal_type dim=0; dim<spaceDim; ++dim) {
397  dofCoords(i_card+d,dim) = internalPoints(j,dim);
398  dofCoeffs(i_card+d,dim) = (d==dim);
399  }
400 
401  tags[i_card+d][0] = spaceDim; // elem dof
402  tags[i_card+d][1] = 0; // elem id
403  tags[i_card+d][2] = spaceDim*j+d; // local dof id
404  tags[i_card+d][3] = spaceDim*numPtsPerCell; // total vert dof
405  }
406  }
407  }
408 
409  // form Vandermonde matrix. Actually, this is the transpose of the VDM,
410  // so we transpose on copy below.
411  Kokkos::DynRankView<scalarType,Kokkos::LayoutLeft,Kokkos::HostSpace>
412  vmat("Hcurl::Tri::In::vmat", card, card),
413  work("Hcurl::Tri::In::work", lwork),
414  ipiv("Hcurl::Tri::In::ipiv", card);
415 
416  //vmat' = V2*V1;
417  for(ordinal_type i=0; i< card; ++i) {
418  for(ordinal_type j=0; j< card; ++j) {
419  scalarType s=0;
420  for(ordinal_type k=0; k< cardVecPn; ++k)
421  s += V2(i,k)*V1(k,j);
422  vmat(i,j) = s;
423  }
424  }
425 
426  ordinal_type info = 0;
427  Teuchos::LAPACK<ordinal_type,scalarType> lapack;
428 
429  lapack.GETRF(card, card,
430  vmat.data(), vmat.stride_1(),
431  (ordinal_type*)ipiv.data(),
432  &info);
433 
434  INTREPID2_TEST_FOR_EXCEPTION( info != 0,
435  std::runtime_error ,
436  ">>> ERROR: (Intrepid2::Basis_HCURL_TRI_In_FEM) lapack.GETRF returns nonzero info." );
437 
438  lapack.GETRI(card,
439  vmat.data(), vmat.stride_1(),
440  (ordinal_type*)ipiv.data(),
441  work.data(), lwork,
442  &info);
443 
444  INTREPID2_TEST_FOR_EXCEPTION( info != 0,
445  std::runtime_error ,
446  ">>> ERROR: (Intrepid2::Basis_HCURL_TRI_In_FEM) lapack.GETRI returns nonzero info." );
447 
448  for (ordinal_type i=0;i<cardVecPn;++i)
449  for (ordinal_type j=0;j<card;++j){
450  scalarType s=0;
451  for(ordinal_type k=0; k< card; ++k)
452  s += V1(i,k)*vmat(k,j);
453  coeffs(i,j) = s;
454  }
455 
456  this->coeffs_ = Kokkos::create_mirror_view(typename DT::memory_space(), coeffs);
457  Kokkos::deep_copy(this->coeffs_ , coeffs);
458 
459  this->dofCoords_ = Kokkos::create_mirror_view(typename DT::memory_space(), dofCoords);
460  Kokkos::deep_copy(this->dofCoords_, dofCoords);
461 
462  this->dofCoeffs_ = Kokkos::create_mirror_view(typename DT::memory_space(), dofCoeffs);
463  Kokkos::deep_copy(this->dofCoeffs_, dofCoeffs);
464 
465 
466  // set tags
467  {
468  // Basis-dependent initializations
469  const ordinal_type posScDim = 0; // position in the tag, counting from 0, of the subcell dim
470  const ordinal_type posScOrd = 1; // position in the tag, counting from 0, of the subcell ordinal
471  const ordinal_type posDfOrd = 2; // position in the tag, counting from 0, of DoF ordinal relative to the subcell
472 
473  OrdinalTypeArray1DHost tagView(&tags[0][0], card*tagSize);
474 
475  // Basis-independent function sets tag and enum data in tagToOrdinal_ and ordinalToTag_ arrays:
476  // tags are constructed on host
477  this->setOrdinalTagData(this->tagToOrdinal_,
478  this->ordinalToTag_,
479  tagView,
480  this->basisCardinality_,
481  tagSize,
482  posScDim,
483  posScOrd,
484  posDfOrd);
485  }
486  }
487 } // namespace Intrepid2
488 #endif
Header file for the Intrepid2::Basis_HGRAD_TRI_Cn_FEM_ORTH class.
virtual void getCubature(PointViewType cubPoints, weightViewType cubWeights) const override
Returns cubature points and weights (return arrays must be pre-sized/pre-allocated).
Kokkos::View< ordinal_type *, typename ExecutionSpace::array_layout, Kokkos::HostSpace > OrdinalTypeArray1DHost
View type for 1d host array.
Basis_HCURL_TRI_In_FEM(const ordinal_type order, const EPointType pointType=POINTTYPE_EQUISPACED)
Constructor.
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 getReferenceEdgeTangent(RefEdgeTangentViewType refEdgeTangent, const ordinal_type edgeOrd, const shards::CellTopology parentCell)
Computes constant tangent vectors to edges of 2D or 3D reference cells.
Header file for the Intrepid2::CubatureDirectTrisymPos 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.
ScalarTraits< pointValueType >::scalar_type scalarType
Scalar type for point values.
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...