47 #ifndef __INTREPID2_PROJECTIONSTRUCT_HPP__
48 #define __INTREPID2_PROJECTIONSTRUCT_HPP__
50 #include "Intrepid2_ConfigDefs.hpp"
57 namespace Experimental {
79 template<
typename SpT,
typename ValueType>
83 typedef Kokkos::pair<ordinal_type,ordinal_type> range_type;
84 typedef typename Kokkos::Impl::is_space<SpT>::host_mirror_space::execution_space host_space_type;
85 typedef Kokkos::DynRankView<ValueType,host_space_type> view_type;
86 typedef std::array<std::array<range_type, 12>,4> range_tag;
87 typedef std::array<std::array<view_type, 12>,4> view_tag;
88 typedef std::array<std::array<unsigned, 12>,4> key_tag;
93 return numBasisEvalPoints;
99 return numBasisDerivEvalPoints;
105 return numTargetEvalPoints;
111 return numTargetDerivEvalPoints;
121 return basisCubPoints[subCellDim][subCellId].extent(0);
131 return basisDerivCubPoints[subCellDim][subCellId].extent(0);
141 return targetCubPoints[subCellDim][subCellId].extent(0);
151 return targetDerivCubPoints[subCellDim][subCellId].extent(0);
167 return basisCubPoints[subCellDim][subCellId];
183 return basisDerivCubPoints[subCellDim][subCellId];
199 return targetCubPoints[subCellDim][subCellId];
215 return targetDerivCubPoints[subCellDim][subCellId];
230 return basisCubWeights[subCellDim][subCellId];
245 return basisDerivCubWeights[subCellDim][subCellId];
260 return targetCubWeights[subCellDim][subCellId];
275 return targetDerivCubWeights[subCellDim][subCellId];
285 return basisPointsRange[subCellDim][subCellId];
295 return basisDerivPointsRange[subCellDim][subCellId];
305 return targetPointsRange[subCellDim][subCellId];
315 return targetDerivPointsRange[subCellDim][subCellId];
324 unsigned getTopologyKey(
const ordinal_type subCellDim,
const ordinal_type subCellId) {
325 return subCellTopologyKey[subCellDim][subCellId];
332 template<
typename BasisPtrType>
334 const ordinal_type targetCubDegree);
341 template<
typename BasisPtrType>
343 const ordinal_type targetCubDegree,
344 const ordinal_type targetGradCubDegre);
351 template<
typename BasisPtrType>
353 const ordinal_type targetCubDegree,
354 const ordinal_type targetCurlCubDegre);
361 template<
typename BasisPtrType>
363 const ordinal_type targetCubDegree,
364 const ordinal_type targetDivCubDegre);
370 template<
typename BasisPtrType>
372 const ordinal_type targetCubDegree);
374 key_tag subCellTopologyKey;
375 range_tag basisPointsRange;
376 range_tag basisDerivPointsRange;
377 range_tag targetPointsRange;
378 range_tag targetDerivPointsRange;
379 view_tag basisCubPoints;
380 view_tag basisCubWeights;
381 view_tag basisDerivCubPoints;
382 view_tag basisDerivCubWeights;
383 view_tag targetCubPoints;
384 view_tag targetCubWeights;
385 view_tag targetDerivCubPoints;
386 view_tag targetDerivCubWeights;
387 ordinal_type numBasisEvalPoints;
388 ordinal_type numBasisDerivEvalPoints;
389 ordinal_type numTargetEvalPoints;
390 ordinal_type numTargetDerivEvalPoints;
range_type getTargetDerivPointsRange(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the range of the target function derivative evaluation points corresponding to a subcell...
unsigned getTopologyKey(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the key of a subcell topology.
void createL2ProjectionStruct(const BasisPtrType cellBasis, const ordinal_type targetCubDegree)
Initialize the ProjectionStruct for L2 projections.
void createHDivProjectionStruct(const BasisPtrType cellBasis, const ordinal_type targetCubDegree, const ordinal_type targetDivCubDegre)
Initialize the ProjectionStruct for HDIV projections.
ordinal_type getNumTargetEvalPoints(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns number of points where to evaluate the target function on a subcell.
ordinal_type getNumBasisEvalPoints(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns number of basis evaluation points on a subcell.
range_type getTargetPointsRange(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the range of the target function evaluation points corresponding to a subcell.
view_type getTargetDerivEvalPoints(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the points where to evaluate the derivatives of the target function on a subcell.
view_type getTargetEvalWeights(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the function evaluation weights on a subcell.
view_type getTargetDerivEvalWeights(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the function derivatives evaluation weights on a subcell.
view_type getBasisEvalPoints(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the basis evaluation points on a subcell.
ordinal_type getNumTargetDerivEvalPoints()
Returns number of points where to evaluate the derivatives of the target function.
Contains definitions of custom data types in Intrepid2.
ordinal_type getNumBasisDerivEvalPoints()
Returns number of evaluation points for basis derivatives.
void createHVolProjectionStruct(const BasisPtrType cellBasis, const ordinal_type targetCubDegree)
Initialize the ProjectionStruct for HVOL (local-L2) projection.
void createHCurlProjectionStruct(const BasisPtrType cellBasis, const ordinal_type targetCubDegree, const ordinal_type targetCurlCubDegre)
Initialize the ProjectionStruct for HCURL projections.
void createHGradProjectionStruct(const BasisPtrType cellBasis, const ordinal_type targetCubDegree, const ordinal_type targetGradCubDegre)
Initialize the ProjectionStruct for HGRAD projections.
ordinal_type getNumTargetDerivEvalPoints(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns number of points where to evaluate the derivatives of the target function on a subcell...
view_type getBasisDerivEvalPoints(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the evaluation points for basis derivatives on a subcell.
ordinal_type getNumBasisEvalPoints()
Returns number of basis evaluation points.
view_type getBasisDerivEvalWeights(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the basis derivatives evaluation weights on a subcell.
view_type getTargetEvalPoints(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the points where to evaluate the target function on a subcell.
An helper class to compute the evaluation points and weights needed for performing projections...
ordinal_type getNumTargetEvalPoints()
Returns number of points where to evaluate the target function.
view_type getBasisEvalWeights(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the basis evaluation weights on a subcell.
range_type getBasisPointsRange(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the range of the basis evaluation points corresponding to a subcell.
ordinal_type getNumBasisDerivEvalPoints(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns number of evaluation points for basis derivatives on a subcell.
Header file for the Intrepid2::Experimental::ProjectionStruct containing definitions.
range_type getBasisDerivPointsRange(const ordinal_type subCellDim, const ordinal_type subCellId)
Returns the range of the basis derivative evaluation points corresponding to a subcell.