Nektar++
Loading...
Searching...
No Matches
Classes | Enumerations | Functions | Variables
Nektar::MultiRegions::detail Namespace Reference

Classes

class  AdvectionBlockOpImpl
 Device StdMat advection block operator: dense standard-region derivative matrices through the vendor BLAS, followed by a pointwise derivative-factor and velocity kernel. More...
 
class  AdvectionDealiasBlockOpImpl
 
class  AdvectionDealiasOpImpl
 
class  AdvectionOpImpl
 Execution-space implementation of AdvectionOp; registers it with the operator factory and implements its homogeneous-term hooks. More...
 
class  AdvectionZOpImpl
 The advection along the homogeneous direction, w du/dz. More...
 
class  AdvectionZOpImpl< ExecSpace, TData, APPEND, std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Device > > >
 Device backend for the homogeneous part of the advection term. More...
 
class  AdvectionZOpImpl< ExecSpace, TData, APPEND, std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Serial >||std::is_same_v< ExecSpace, NektarSpaces::AVX > > >
 Host FFTW backend for the homogeneous part of the advection term. More...
 
class  AssmbScatrNoSignOpImpl
 Specialised assemble–scatter with no sign change: the assembly map's orientation factors are replaced by their absolute values, so contributions are summed without sign reconciliation. More...
 
class  AssmbScatrOpImpl
 Backend implementation of AssmbScatrOp: in-place assemble–scatter of a coefficient field for one execution space. More...
 
class  AssmbScatrZeroDirOpImpl
 Specialised assemble–scatter with zero Dirichlet action: global Dirichlet DOFs are zeroed rather than assembled. More...
 
class  AvgAssmbScatrOpImpl
 Implementation of AvgAssmbScatrOp for one execution space. More...
 
struct  BasisDataSize1D
 Size of the 1D basis matrix held in shared memory. More...
 
struct  BasisDataSize2D
 Sizes of the two 2D basis matrices held in shared memory. More...
 
struct  BasisDataSize3D
 Sizes of the three 3D basis matrices held in shared memory. More...
 
class  BndCondPhysOpImpl
 
class  BwdTransBlockOpImpl
 Device StdMat block implementation of the backward transform: the whole block's transform as a single strided batched dense matrix product on the back-end BLAS. More...
 
class  BwdTransOpImpl
 Whole-field implementation of BwdTransOp, registered with the operator factory once per execution space. More...
 
struct  CGBndCondCoeffMaps
 
struct  CGBndCondRegions
 
class  CGBndCondSurfaceIntegral
 Adds the surface integral of boundary fields, per component and homogeneous plane, to a reduction in the memory space of ExecSpace, from the inner products of the fields with the basis of their boundary expansion lists. More...
 
class  CurlCurlBlockOpImpl
 Device StdMat curl-curl block operator: dense standard-region derivative matrices through the vendor BLAS, followed by pointwise curl kernels, applied twice. More...
 
class  CurlCurlOpImpl
 Whole-field implementation of CurlCurlOp for one execution space; adds the z parts of both curls on a multi-plane 3DH1 expansion. More...
 
class  DerivZOpImpl
 The homogeneous z-derivative, specialised per execution space in DerivZOpSerialAVX.hpp and DerivZOpDevice.hpp. More...
 
class  DerivZOpImpl< ExecSpace, TData, LAYOUT, DERIVORDER, APPEND, std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Device > > >
 Device backend for the homogeneous z-derivative. More...
 
class  DerivZOpImpl< ExecSpace, TData, LAYOUT, DERIVORDER, APPEND, std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Serial >||std::is_same_v< ExecSpace, NektarSpaces::AVX > > >
 Host FFTW backend for the homogeneous z-derivative. More...
 
class  DirBndCondOpImpl
 
class  DivergenceBlockOpImpl
 Device StdMat implementation of DivergenceBlockOp: one strided-batched BLAS GEMM forming every reference-direction derivative of every component of the block, followed by one derivative-factor contraction per component accumulating into a single output component. More...
 
class  DivergenceOpImpl
 Whole-field implementation of DivergenceOp for one execution space, adding \(\partial w/\partial z\) on a multi-plane 3DH1 expansion (see the file notes). More...
 
class  ExpressionBlockOpImpl
 Device block-level Expression evaluator: runs a runtime-compiled kernel that evaluates every component's expression at every stored point of the block. More...
 
struct  ExpressionKernelArgs
 The arguments an expression kernel is launched with, in the order its parameter list declares them (see GetExpressionKernelParameters()). More...
 
struct  ExpressionKernels
 The name the generated source is compiled under. It only names the source in the runtime compiler's diagnostics. More...
 
struct  ExpressionKernelVariant
 One variant of the expression kernel: the template arguments instantiating it, and the suffix naming it where a back-end needs a kernel function of its own per variant. More...
 
class  ExpressionOpImpl
 Concrete whole-field Expression operator for one execution space. More...
 
class  FwdTransBCBlockOpImpl
 
class  FwdTransBCOpImpl
 
class  HelmholtzBlockOpImpl
 Device StdMat block implementation of the weak Helmholtz operator: the five-stage matrix-matrix decomposition issued through strided-batched GEMMs on the block's device stream. More...
 
class  HelmholtzOpImpl
 Whole-field implementation of HelmholtzOp for one execution space, owning the weak z-Laplacian (see the file notes). More...
 
class  IProductWRTBaseBlockOpImpl
 Device StdMat inner product with the basis: the whole block's inner product as one strided-batched dense matrix product on the back-end BLAS, preceded by a Jacobian kernel when the quadrature metric is in use. More...
 
class  IProductWRTBaseOpImpl
 Execution-space registration shell of IProductWRTBaseOp; adds no behaviour of its own. More...
 
class  IProductWRTDerivBaseBlockOpImpl
 Device StdMat inner product with the gradient of the basis: a geometric kernel followed by one strided-batched dense matrix multiplication per reference direction. More...
 
class  IProductWRTDerivBaseOpImpl
 Whole-field implementation of IProductWRTDerivBaseOp for one execution space, subtracting the inner product with the basis of \(\partial f_z/\partial z\) on a multi-plane 3DH1 Coeff field (see the file notes). More...
 
class  IProductWRTPhysNormalDerivTraceBlockOpImpl
 Device block implementation of the normal-derivative trace lift, one element per warp lane (MultiRegions::SumFac) or one or several per thread block (MultiRegions::SumFacTOP). More...
 
class  IProductWRTPhysNormalDerivTraceOpImpl
 Execution-space instantiation of the whole-field normal-derivative trace lift; adds the per-direction staging copy to IProductWRTPhysNormalDerivTraceOp and nothing else. More...
 
class  IProductWRTPhysTraceBlockOpImpl
 Device block implementation of the trace lifting term, one element per warp lane (MultiRegions::SumFac) or one element, or a group of them, per thread block (MultiRegions::SumFacTOP). More...
 
class  IProductWRTPhysTraceOpImpl
 Execution-space instantiation of the whole-field trace inner product; adds no behaviour of its own to IProductWRTPhysTraceOp. More...
 
struct  IsNonTemplatedPhysSizeParameter1D
 Trait: T is the runtime 1D physical-space size parameter. More...
 
struct  IsNonTemplatedPhysSizeParameter1D< NonTemplatedPhysSizeParameter1D >
 
struct  IsNonTemplatedPhysSizeParameter2D
 Trait: T is the runtime 2D physical-space size parameter. More...
 
struct  IsNonTemplatedPhysSizeParameter2D< NonTemplatedPhysSizeParameter2D >
 
struct  IsNonTemplatedPhysSizeParameter3D
 Trait: T is the runtime 3D physical-space size parameter. More...
 
struct  IsNonTemplatedPhysSizeParameter3D< NonTemplatedPhysSizeParameter3D >
 
struct  IsNonTemplatedSizeParameter1D
 Trait: T is the runtime 1D modal/quadrature size parameter. More...
 
struct  IsNonTemplatedSizeParameter1D< NonTemplatedSizeParameter1D >
 
struct  IsNonTemplatedSizeParameter2D
 Trait: T is the runtime 2D modal/quadrature size parameter. More...
 
struct  IsNonTemplatedSizeParameter2D< NonTemplatedSizeParameter2D >
 
struct  IsNonTemplatedSizeParameter3D
 Trait: T is the runtime 3D modal/quadrature size parameter. More...
 
struct  IsNonTemplatedSizeParameter3D< NonTemplatedSizeParameter3D >
 
struct  IsNonTemplatedTraceSizeParameter1D
 Trait: T is the runtime 1D trace size parameter. More...
 
struct  IsNonTemplatedTraceSizeParameter1D< NonTemplatedTraceSizeParameter1D >
 
struct  IsNonTemplatedTraceSizeParameter2D
 Trait: T is the runtime 2D trace size parameter. More...
 
struct  IsNonTemplatedTraceSizeParameter2D< NonTemplatedTraceSizeParameter2D >
 
struct  IsNonTemplatedTraceSizeParameter3D
 Trait: T is the runtime 3D trace size parameter. More...
 
struct  IsNonTemplatedTraceSizeParameter3D< NonTemplatedTraceSizeParameter3D >
 
struct  IsPhysSizeParameter1D
 T is a 1D physical-space size parameter (either form). More...
 
struct  IsPhysSizeParameter2D
 T is a 2D physical-space size parameter (either form). More...
 
struct  IsPhysSizeParameter3D
 T is a 3D physical-space size parameter (either form). More...
 
struct  IsSizeParameter1D
 T is a 1D modal/quadrature size parameter (either form). More...
 
struct  IsSizeParameter2D
 T is a 2D modal/quadrature size parameter (either form). More...
 
struct  IsSizeParameter3D
 T is a 3D modal/quadrature size parameter (either form). More...
 
struct  IsTemplatedPhysSizeParameter1D
 Trait: T is a compile-time 1D physical-space size parameter. More...
 
struct  IsTemplatedPhysSizeParameter1D< TemplatedPhysSizeParameter1D< tncoord, tnq0 > >
 
struct  IsTemplatedPhysSizeParameter2D
 Trait: T is a compile-time 2D physical-space size parameter. More...
 
struct  IsTemplatedPhysSizeParameter2D< TemplatedPhysSizeParameter2D< tncoord, tnq0, tnq1 > >
 
struct  IsTemplatedPhysSizeParameter3D
 Trait: T is a compile-time 3D physical-space size parameter. More...
 
struct  IsTemplatedPhysSizeParameter3D< TemplatedPhysSizeParameter3D< tnq0, tnq1, tnq2 > >
 
struct  IsTemplatedSizeParameter1D
 Trait: T is a compile-time 1D modal/quadrature size parameter. More...
 
struct  IsTemplatedSizeParameter1D< TemplatedSizeParameter1D< tnm0, tnq0 > >
 
struct  IsTemplatedSizeParameter2D
 Trait: T is a compile-time 2D modal/quadrature size parameter. More...
 
struct  IsTemplatedSizeParameter2D< TemplatedSizeParameter2D< tnm0, tnm1, tnmTot, tnq0, tnq1 > >
 
struct  IsTemplatedSizeParameter3D
 Trait: T is a compile-time 3D modal/quadrature size parameter. More...
 
struct  IsTemplatedSizeParameter3D< TemplatedSizeParameter3D< tnm0, tnm1, tnm2, tnmTot, tnq0, tnq1, tnq2 > >
 
struct  IsTemplatedTraceSizeParameter1D
 Trait: T is a compile-time 1D trace size parameter. More...
 
struct  IsTemplatedTraceSizeParameter1D< TemplatedTraceSizeParameter1D< tnm0, tnq0 > >
 
struct  IsTemplatedTraceSizeParameter2D
 Trait: T is a compile-time 2D trace size parameter. More...
 
struct  IsTemplatedTraceSizeParameter2D< TemplatedTraceSizeParameter2D< tnm0, tnm1, tnq00, tnq10 > >
 
struct  IsTemplatedTraceSizeParameter3D
 Trait: T is a compile-time 3D trace size parameter. More...
 
struct  IsTemplatedTraceSizeParameter3D< TemplatedTraceSizeParameter3D< tnm0, tnm1, tnm2, tnq00, tnq01, tnq10, tnq11, tnq20, tnq21 > >
 
struct  IsTraceSizeParameter1D
 T is a 1D trace size parameter (either form). More...
 
struct  IsTraceSizeParameter2D
 T is a 2D trace size parameter (either form). More...
 
struct  IsTraceSizeParameter3D
 T is a 3D trace size parameter (either form). More...
 
class  LaplacianBlockOpImpl
 Device StdMat block implementation of the weak Laplacian operator: the three-stage matrix-matrix decomposition issued through strided-batched GEMMs on the block's device stream. More...
 
class  LaplacianOpImpl
 Whole-field implementation of LaplacianOp for one execution space, adding the z term on a multi-plane 3DH1 expansion (see the file notes). More...
 
class  LinAdvDiffReactionBlockOpImpl
 Device StdMat block implementation of the linearised advection-diffusion-reaction operator: dense standard-region matrices through the vendor BLAS, around a pointwise metric kernel. More...
 
class  LinAdvDiffReactionOpImpl
 Execution-space implementation of LinAdvDiffReactionOp; registers it with the operator factory and implements its homogeneous-term hooks. More...
 
class  MassBlockOpImpl
 Device StdMat mass operator: the whole block's operation as one or two strided-batched dense matrix products on the back-end BLAS, with the Jacobian applied by a device kernel between or after them. More...
 
class  MassOpImpl
 Execution-space registration shell of MassOp; adds no behaviour of its own. More...
 
class  MultiplyByElmtInvMassBlockOpImpl
 Device Generic inverse mass operator: the whole block's operation as one strided-batched dense matrix product on the back-end BLAS, with the Jacobian divided out by a device kernel on a regular block. More...
 
class  MultiplyByElmtInvMassOpImpl
 Execution-space registration shell of MultiplyByElmtInvMassOp; adds no behaviour of its own. More...
 
class  NeuBndCondOpImpl
 
struct  NonTemplatedPhysSizeParameter1D
 Runtime physical-space sizes of a 1D element: coordinate dimension and quadrature-point count (see the file notes on the size-parameter scheme). More...
 
struct  NonTemplatedPhysSizeParameter2D
 Runtime physical-space sizes of a 2D element: coordinate dimension and per-direction quadrature-point counts. More...
 
struct  NonTemplatedPhysSizeParameter3D
 Runtime physical-space sizes of a 3D element: per-direction quadrature-point counts. No coordinate dimension is carried, since a 3D element's coordinate dimension is always three. More...
 
struct  NonTemplatedSizeParameter1D
 Runtime modal and quadrature sizes of a 1D element: mode count and quadrature-point count. More...
 
struct  NonTemplatedSizeParameter2D
 Runtime modal and quadrature sizes of a 2D element. More...
 
struct  NonTemplatedSizeParameter3D
 Runtime modal and quadrature sizes of a 3D element. More...
 
struct  NonTemplatedTraceSizeParameter1D
 Runtime trace sizes of a 1D element: mode count and quadrature-point count of the segment, whose traces are its two end vertices. More...
 
struct  NonTemplatedTraceSizeParameter2D
 Runtime trace sizes of a 2D element: the element's per-direction mode counts and the quadrature-point count of the edges the shape counts in each direction (LibUtilities::ShapeTypeNumTraceInDir): nq00 for direction 0, nq10 for direction 1. More...
 
struct  NonTemplatedTraceSizeParameter3D
 Runtime trace sizes of a 3D element: the element's per-direction mode counts and the two in-face quadrature-point counts of the faces the shape counts in each direction (LibUtilities::ShapeTypeNumTraceInDir): nq00/nq01 for direction 0, nq10/nq11 for direction 1 and nq20/nq21 for direction 2. More...
 
class  PhysDerivBlockOpImpl
 Device StdMat block implementation of the physical derivative: the whole block's standard derivatives as dense matrix products on the back-end BLAS, followed by the geometric chain rule. More...
 
class  PhysDerivOpImpl
 Whole-field implementation of PhysDerivOp for one execution space, owning the homogeneous z-derivative (see the file notes). More...
 
class  PhysGalerkinProject1DScaledBlockOpImpl
 
class  PhysGalerkinProject1DScaledOpImpl
 
class  PhysInterp1DScaledBlockOpImpl
 Device StdMat block implementation of the scaled interpolation: the whole block's interpolation as a single strided-batched dense matrix product on the back-end BLAS. More...
 
class  PhysInterp1DScaledOpImpl
 Whole-field implementation of PhysInterp1DScaledOp, registered with the operator factory once per execution space. More...
 
class  PhysLiftProjectBlockOpImpl
 Device StdMat block implementation of the lift-and-project operator. More...
 
class  PhysLiftProjectOpImpl
 The whole-field lift-and-project operator registered with the operator factory, one per execution space; the work is in PhysLiftProjectOp and its block operators. More...
 
class  PhysTraceExtractBlockOpImpl
 Device block implementation of the trace extraction, one element per warp lane (MultiRegions::SumFac) or one element, or a group of them, per thread block (MultiRegions::SumFacTOP). More...
 
class  PhysTraceExtractBndCond
 Extracts a volume field onto the points of a boundary region of a continuous field. More...
 
class  PhysTraceExtractOpImpl
 Execution-space instantiation of the whole-field trace extraction; adds no behaviour of its own to PhysTraceExtractOp. More...
 
class  RobBndCondOpImpl
 
struct  TemplatedPhysSizeParameter1D
 Compile-time counterpart of NonTemplatedPhysSizeParameter1D, instantiated by the generated ShapeBlock switch code for sizes within the switch range. More...
 
struct  TemplatedPhysSizeParameter2D
 Compile-time counterpart of NonTemplatedPhysSizeParameter2D, instantiated by the generated ShapeBlock switch code for sizes within the switch range. More...
 
struct  TemplatedPhysSizeParameter3D
 Compile-time counterpart of NonTemplatedPhysSizeParameter3D, instantiated by the generated ShapeBlock switch code for sizes within the switch range. More...
 
struct  TemplatedSizeParameter1D
 Compile-time counterpart of NonTemplatedSizeParameter1D, instantiated by the generated ShapeBlock switch code for sizes within the switch range. More...
 
struct  TemplatedSizeParameter2D
 Compile-time counterpart of NonTemplatedSizeParameter2D, instantiated by the generated ShapeBlock switch code for sizes within the switch range. More...
 
struct  TemplatedSizeParameter3D
 Compile-time counterpart of NonTemplatedSizeParameter3D, instantiated by the generated ShapeBlock switch code for sizes within the switch range. More...
 
struct  TemplatedTraceSizeParameter1D
 Compile-time counterpart of NonTemplatedTraceSizeParameter1D, instantiated by the generated trace switch code for sizes within the switch range. More...
 
struct  TemplatedTraceSizeParameter2D
 Compile-time counterpart of NonTemplatedTraceSizeParameter2D, instantiated by the generated trace switch code for sizes within the switch range. More...
 
struct  TemplatedTraceSizeParameter3D
 Compile-time counterpart of NonTemplatedTraceSizeParameter3D, instantiated by the generated trace switch code for sizes within the switch range. More...
 
struct  TraceTables
 The trace tables of one element block. More...
 

Enumerations

enum class  CGBndCondCoeffMapSet { Full , UniqueAndGroups }
 
enum class  DerivZLayout { ScalarToVectorZ , VectorZToScalar , Identity , CurlZ }
 Which way round a homogeneous z-derivative maps its components. More...
 
enum  ExpressionKernelIndex {
  eAppendScalar = 0 , eAssignScalar , eAppendInterleaved , eAssignInterleaved ,
  eNumExpressionKernels
}
 The variants of the expression kernel that are compiled, in the order Apply() selects them: appending to or assigning the output, reading storage interleaved at width one or at the device warp size. More...
 
enum class  PhysLiftProjectForm { Pointwise , StdInvMass , ElmtInvMass }
 How a block applies \(B M^{-1} B^{\mathsf T}\). More...
 
enum class  PhysLiftProjectKernel { Fused , LiftBasisTranspose , ScaleBwdTrans }
 Which of the Device fused kernels of the StdInvMass form a shared-memory size is for. More...
 

Functions

template<typename ExecSpace , typename TData , std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::AVX >, bool > Enable = true>
static NEK_FORCE_INLINE void AssembleScatrKernel (const unsigned nvals, const unsigned *nassemble, const unsigned *index, const unsigned *offset, const int8_t *sign, TData *inoutptr, const unsigned int streamID)
 Assemble and scatter the device-interior global DOFs; AVX variant reading SIMD-interleaved map data.
 
template<typename ExecSpace , typename TData , std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Serial >||std::is_same_v< ExecSpace, NektarSpaces::AVX >, bool > Enable = true>
static NEK_FORCE_INLINE void AssembleScatrBndKernel (const unsigned nvals, const unsigned *nassemble, const unsigned *nbndvals, const unsigned *index, const unsigned *offset, const int8_t *sign, TData *inoutptr, TData *bndptr, const unsigned int streamID)
 Partially assemble the parallel-boundary global DOFs and pack the partial sums into the communication send buffer (Serial and AVX).
 
template<typename ExecSpace , typename TData , std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Serial >||std::is_same_v< ExecSpace, NektarSpaces::AVX >, bool > Enable = true>
static NEK_FORCE_INLINE void AssembleFromBndKernel (const unsigned nvals, const unsigned *nassemble, const unsigned *nbndvals, const unsigned *index, const unsigned *offset, const int8_t *sign, const unsigned *norder, const TData *bndptr, TData *inoutptr, const unsigned int streamID)
 Complete the assembly of the parallel-boundary global DOFs from the received partial sums and scatter the result (Serial and AVX).
 
template<typename ExecSpace , typename TData >
void InverseMultiplicityKernel (const size_t nsize, TData *ptr, const unsigned int streamID)
 Replace every multiplicity in ptr by its reciprocal, and by zero where it is zero.
 
template<typename ExecSpace , typename TData >
void CGBndCondGatherKernel (const size_t nsize, const size_t *idxPtr, const TData *srcPtr, TData *dstPtr, const unsigned int streamID)
 
template<typename ExecSpace , typename TData >
void CGBndCondGatherScatterKernel (const size_t nsize, const size_t *srcIdxPtr, const size_t *dstIdxPtr, const TData *srcPtr, TData *dstPtr, const unsigned int streamID)
 
template<typename ExecSpace , typename TData , std::enable_if_t<!std::is_same_v< ExecSpace, NektarSpaces::Device >, bool > Enable = true>
void CGBndCondUnpackAbsMaxKernel (const size_t nsize, const size_t *idxPtr, const TData *srcPtr, TData *dstPtr, const unsigned int streamID)
 
template<typename ExecSpace , typename TData , typename IsMatchFn , typename OnMatchedRegionFn >
CGBndCondRegions< TData > BuildCGBndCondRegions (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const SpatialDomains::BoundaryRegionCollection &bregions, const SpatialDomains::BoundaryConditionCollection &bconditions, const std::string &wspLabel, std::vector< LibUtilities::Field< TData, FieldState::Phys > > &wspPhys, std::vector< LibUtilities::Field< TData, FieldState::Coeff > > &wspCoeffs, std::vector< std::shared_ptr< ExpressionOp< TData > > > &expressionOps, bool &hasTimeDependentBndCoeffs, IsMatchFn &&isMatch, OnMatchedRegionFn &&onMatchedRegion)
 
template<typename ExecSpace , typename TData , typename PerComponentFn >
CGBndCondCoeffMaps< TData > BuildCGBndCondCoeffMaps (const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components, const SpatialDomains::BoundaryRegionCollection &bregions, const std::vector< std::vector< bool > > &isTypeByRegion, const std::vector< size_t > &numBcExpCoeffs, size_t numBndCoeffCompSize, const CGBndCondCoeffMapSet mapSet, PerComponentFn &&perComponent)
 
template<typename ExecSpace , typename TData >
void DirBndCondKernel (const size_t nsize, const size_t *mapPtr, const TData *inptr, TData *outptr, const unsigned int streamID)
 
template<typename ExecSpace , typename TData >
void DirBndCondKernel (const size_t nsize, const TData *signPtr, const size_t *mapPtr, const TData *inptr, TData *outptr, const unsigned int streamID)
 
template<typename ExecSpace , typename TData >
void ParallelDirBndSignKernel (const size_t nsize, const int *signPtr, TData *outptr, const unsigned int streamID)
 
template<typename ExecSpace , typename TData >
void LocalDirBndCondKernel (const size_t nsize, const size_t *id0Ptr, const size_t *id1Ptr, const TData *signPtr, const TData *inptr, TData *outptr, const unsigned int streamID)
 
template<typename ExecSpace , bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void FwdTransBCSegKernel (const unsigned int nm0, const unsigned int nq0, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *w0, const unsigned int offset_seg, const simd_type *invintmass, const simd_type *jac, const simd_type *in, simd_type *out, simd_type *wsp1, simd_type *wsp2)
 
template<typename ExecSpace , bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void FwdTransBCQuadKernel (const unsigned int nm0, const unsigned int nm1, const unsigned int nq0, const unsigned int nq1, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *basis1, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const unsigned int offset_seg, const simd_type *invintmass0, const simd_type *invintmass1, const simd_type *tJac, const unsigned int *tMap, const int *tSign, const unsigned int nmTotInt, const unsigned int *iMap, const simd_type *invintmass, const simd_type *jac, const simd_type *in, simd_type *out, simd_type *wsp1, simd_type *wsp2, simd_type *wsp3, simd_type *wsp4)
 
template<typename ExecSpace , bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void FwdTransBCTriKernel (const unsigned int nm0, const unsigned int nm1, const unsigned int nq0, const unsigned int nq1, const bool isModified, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *basis1, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *interp1to0, const unsigned int offset_seg, const simd_type *invintmass0, const simd_type *tJac, const unsigned int *tMap, const int *tSign, const unsigned int nmTotInt, const unsigned int *iMap, const simd_type *invintmass, const simd_type *jac, const simd_type *in, simd_type *out, simd_type *wsp1, simd_type *wsp2, simd_type *wsp3, simd_type *wsp4)
 
template<typename ExecSpace , LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void FwdTransBC1DKernel (const unsigned int nm0, const unsigned int nq0, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *w0, const unsigned int offset_seg, const simd_type *invintmass, const simd_type *jac, const simd_type *in, simd_type *out, simd_type *wsp1, simd_type *wsp2)
 
template<typename ExecSpace , LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void FwdTransBC2DKernel (const unsigned int nm0, const unsigned int nm1, const unsigned int nq0, const unsigned int nq1, const bool isModified, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *basis1, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *interp1to0, const unsigned int offset_seg, const simd_type *invintmass0, const simd_type *invintmass1, const simd_type *tJac, const unsigned int *tMap, const int *tSign, const unsigned int nmTotInt, const unsigned int *iMap, const simd_type *invintmass, const simd_type *jac, const simd_type *in, simd_type *out, simd_type *wsp1, simd_type *wsp2, simd_type *wsp3, simd_type *wsp4)
 
template<typename ExecSpace , typename TData >
void NeuBndCondKernel (const size_t bndExpSize, const size_t *mapPtr, const TData *inptr, TData *outptr, const unsigned int streamID)
 
template<typename ExecSpace , typename TData >
void NeuBndCondKernel (const size_t bndExpSize, const TData *signPtr, const size_t *mapPtr, const TData *inptr, TData *outptr, const unsigned int streamID)
 
template<typename ExecSpace , typename TData >
void NeuBndCondGroupKernel (const size_t nGroups, const size_t *groupOffsetPtr, const size_t *groupTargetPtr, const TData *inptr, TData *outptr, const unsigned int streamID)
 
template<typename ExecSpace , typename TData >
void NeuBndCondGroupKernel (const size_t nGroups, const size_t *groupOffsetPtr, const size_t *groupTargetPtr, const TData *signPtr, const TData *inptr, TData *outptr, const unsigned int streamID)
 
template<typename ExecSpace , typename TData , std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Serial >||std::is_same_v< ExecSpace, NektarSpaces::AVX >, bool > Enable = true>
static NEK_FORCE_INLINE void RobBndCond1DKernel (const size_t nsize, const size_t *offsetPtr, const TData *matPtr, const size_t *mapPtr, const TData *incoeffPtr, TData *coeffPtr, const unsigned int streamID)
 
template<typename ExecSpace , typename TData , std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Serial >||std::is_same_v< ExecSpace, NektarSpaces::AVX >, bool > Enable = true>
static NEK_FORCE_INLINE void RobBndCond2DKernel (const unsigned int nmaxcoeff, const size_t nsize, const unsigned int *ncoeffPtr, const size_t *offsetPtr, const size_t *matOffsetPtr, const size_t *mapOffsetPtr, const TData *matPtr, const size_t *mapPtr, const int *signPtr, const TData *incoeffPtr, TData *coeffPtr, const unsigned int streamID)
 
template<typename ExecSpace , bool APPEND, bool DEFORMED, typename TData , typename TScalar >
static NEK_FORCE_INLINE void MultiplyByDerivFactorAndAdvecVelKernel (const unsigned int nqTot, const unsigned int ncoord, const unsigned int dimension, const size_t nelmt, const size_t inoffset, const TData *dfptr, const TData *advVel, const size_t advelsize, const TData *inptr, TData *outptr, const TScalar scale)
 From reference-space derivatives, form the Cartesian gradient and contract it with the advection velocity: out = scale * sum_k V_k sum_d df(k,d) du/dxi_d, evaluated per quadrature point with one element per SIMD lane.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Advection1DKernel (const unsigned int nq0, const unsigned int ncoord, const simd_type *df_ptr, const simd_type *advVel0_ptr, const simd_type *advVel1_ptr, const simd_type *advVel2_ptr, simd_type *deriv0, simd_type *out, const typename simd_type::scalarType scale)
 1D advection finish: out = scale * du/dxi * sum_k df(k) V_k per quadrature point.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Advection2DKernel (const unsigned int nq0, const unsigned int nq1, const unsigned int ncoord, const simd_type *f0, const simd_type *f1, const simd_type *df_ptr, const simd_type *advVel0_ptr, const simd_type *advVel1_ptr, const simd_type *advVel2_ptr, simd_type *deriv0, simd_type *deriv1, simd_type *out, const typename simd_type::scalarType scale)
 2D advection finish: chain-rule the tensor-direction derivatives into Cartesian ones and contract with the velocity, out = scale * sum_k V_k sum_d df(k,d) du/dxi_d per point.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Advection3DKernel (const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, const simd_type *f0, const simd_type *f1, const simd_type *f1m, const simd_type *f2, const simd_type *df_ptr, const simd_type *advVel0_ptr, const simd_type *advVel1_ptr, const simd_type *advVel2_ptr, simd_type *deriv0, simd_type *deriv1, simd_type *deriv2, simd_type *out, const typename simd_type::scalarType scale)
 3D advection finish: chain-rule the tensor-direction derivatives into Cartesian ones and contract with the velocity, out = scale * sum_k V_k sum_d df(k,d) du/dxi_d per point.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, typename TPhysSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void AdvectionKernelLauncher (const TPhysSizeParameter1D sizeParam1D, const typename simd_type::scalarType *D0, const simd_type *df_ptr, const simd_type *advVel0_ptr, const simd_type *advVel1_ptr, const simd_type *advVel2_ptr, simd_type *deriv0, const simd_type *in, simd_type *out, const typename simd_type::scalarType scale)
 Advect one element group of a 1D block: tensor-product differentiation followed by Advection1DKernel.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, typename TPhysSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void AdvectionKernelLauncher (const TPhysSizeParameter2D sizeParam2D, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const simd_type *f0, const simd_type *f1, const simd_type *df_ptr, const simd_type *advVel0_ptr, const simd_type *advVel1_ptr, const simd_type *advVel2_ptr, simd_type *deriv0, simd_type *deriv1, const simd_type *in, simd_type *out, const typename simd_type::scalarType scale)
 Advect one element group of a 2D block: tensor-product differentiation followed by Advection2DKernel.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, typename TPhysSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void AdvectionKernelLauncher (const TPhysSizeParameter3D sizeParam3D, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const typename simd_type::scalarType *D2, const simd_type *f0, const simd_type *f1, const simd_type *f1m, const simd_type *f2, const simd_type *df_ptr, const simd_type *advVel0_ptr, const simd_type *advVel1_ptr, const simd_type *advVel2_ptr, simd_type *deriv0, simd_type *deriv1, simd_type *deriv2, const simd_type *in, simd_type *out, const typename simd_type::scalarType scale)
 Advect one element group of a 3D block: tensor-product differentiation followed by Advection3DKernel.
 
template<typename simd_type >
static NEK_FORCE_INLINE void AdvectionDealiasCombineKernel (const unsigned int nqTot, const unsigned int ncoord, const simd_type *advVelPtr, const unsigned int advVelOffset, const simd_type *gradPtr, const unsigned int gradOffset, simd_type *out, const typename simd_type::scalarType scale)
 
static NEK_FORCE_INLINE void BwdTrans1DWorkspace (LibUtilities::ShapeType SHAPE_TYPE, const unsigned int nm0, const unsigned int nq0)
 1D workspace query: the segment kernel needs no workspace, so this is a no-op kept for uniformity with the 2D and 3D forms.
 
static NEK_FORCE_INLINE void BwdTrans2DWorkspace (LibUtilities::ShapeType SHAPE_TYPE, const unsigned int nm0, const unsigned int nm1, const unsigned int nq0, const unsigned int nq1, unsigned int &wsp0Size)
 Grow wsp0Size to the workspace the 2D kernels need for the given shape and sizes.
 
static NEK_FORCE_INLINE void BwdTrans3DWorkspace (LibUtilities::ShapeType SHAPE_TYPE, const unsigned int nm0, const unsigned int nm1, const unsigned int nm2, const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, unsigned int &wsp0Size, unsigned int &wsp1Size)
 Grow wsp0Size and wsp1Size to the workspaces the 3D kernels need for the given shape and sizes.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, typename TSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void BwdTransKernelLauncher (const TSizeParameter1D sizeParam1D, const bool isModified, const typename simd_type::scalarType *basis0, const simd_type *NtoM, const simd_type *in, simd_type *out)
 1D dispatch: forward one element group's transform to the segment kernel.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, typename TSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void BwdTransKernelLauncher (const TSizeParameter2D sizeParam2D, const bool isModified, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *basis1, const simd_type *NtoM, simd_type *wsp0, const simd_type *in, simd_type *out)
 2D dispatch: select the quadrilateral or (nodal) triangular kernel for one element group at compile time.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, typename TSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void BwdTransKernelLauncher (const TSizeParameter3D sizeParam3D, const bool isModified, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *basis1, const typename simd_type::scalarType *basis2, const simd_type *NtoM, simd_type *wsp0, simd_type *wsp1, const simd_type *in, simd_type *out)
 3D dispatch: select the hexahedral, (nodal) tetrahedral, (nodal) prismatic or pyramidal kernel for one element group at compile time.
 
template<typename ExecSpace , bool DEFORMED, typename TData >
static NEK_FORCE_INLINE void Curl2DScalarStdMatKernel (const unsigned int nqTot, const TData *df_ptr, const TData *deriv, TData *omega)
 Scalar curl of a two-dimensional vector field, omega = d(u1)/dx0 - d(u0)/dx1, per quadrature point with one element per SIMD lane.
 
template<typename ExecSpace , bool DEFORMED, typename TData >
static NEK_FORCE_INLINE void Curl2DVectorStdMatKernel (const unsigned int nqTot, const TData *df_ptr, const TData *deriv, TData *out0, TData *out1)
 Vector curl of a two-dimensional scalar field, out = ( d(omega)/dx1, -d(omega)/dx0 ), per quadrature point with one element per SIMD lane.
 
template<typename ExecSpace , bool DEFORMED, typename TData >
static NEK_FORCE_INLINE void Curl3DStdMatKernel (const unsigned int nqTot, const TData *df_ptr, const TData *deriv, TData *out0, TData *out1, TData *out2)
 Curl of a three-dimensional vector field, per quadrature point with one element per SIMD lane; used for both passes of the curl-curl operator, omega = curl u and out = curl omega.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Curl2DScalarSumFacKernel (const unsigned nq0, const unsigned nq1, const unsigned int ncoord, const simd_type *f0, const simd_type *f1, const simd_type *df_ptr, const simd_type *tderiv0_0, const simd_type *tderiv1_0, const simd_type *tderiv0_1, const simd_type *tderiv1_1, simd_type *out)
 Scalar curl of a two-dimensional vector field, omega = d(u1)/dx0 - d(u0)/dx1, from the tensor-direction derivatives of both components, per quadrature point with one element per SIMD lane.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Curl2DVectorSumFacKernel (const unsigned nq0, const unsigned nq1, const unsigned int ncoord, const simd_type *f0, const simd_type *f1, const simd_type *df_ptr, const simd_type *tderiv0, const simd_type *tderiv1, simd_type *out0, simd_type *out1)
 Vector curl of a two-dimensional scalar field, out = ( d(omega)/dx1, -d(omega)/dx0 ), from the tensor-direction derivatives of omega, per quadrature point with one element per SIMD lane.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Curl3DSumFacKernel (const unsigned nq0, const unsigned nq1, const unsigned nq2, const simd_type *f0, const simd_type *f1, const simd_type *f1m, const simd_type *f2, const simd_type *df_ptr, const simd_type *tderiv0_0, const simd_type *tderiv1_0, const simd_type *tderiv2_0, const simd_type *tderiv0_1, const simd_type *tderiv1_1, const simd_type *tderiv2_1, const simd_type *tderiv0_2, const simd_type *tderiv1_2, const simd_type *tderiv2_2, simd_type *out0, simd_type *out1, simd_type *out2)
 Curl of a three-dimensional vector field from the tensor-direction derivatives of its three components, per quadrature point with one element per SIMD lane; used for both passes of the curl-curl operator, omega = curl u and out = curl omega.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void CurlCurlKernelLauncher (const TPhysSizeParameter1D sizeParam1D, const typename simd_type::scalarType *D0, const simd_type *df_ptr, simd_type *wsp, const simd_type *in0, simd_type *out0)
 1D entry point: the curl-curl is undefined on a segment, so the group's single component is differentiated once – PhysDerivTensor1DKernel followed by PhysDerivDir1DKernel with the direction-0 derivative factor – and the derivative written to the output.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void CurlCurlKernelLauncher (const TPhysSizeParameter2D sizeParam2D, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const simd_type *f0, const simd_type *f1, const simd_type *df_ptr, simd_type *wsp, const simd_type *in0, const simd_type *in1, simd_type *out0, simd_type *out1)
 2D entry point: evaluate curl(curl u) for one element group.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Curl3DH1KernelLauncher (const TPhysSizeParameter2D sizeParam2D, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const simd_type *f0, const simd_type *f1, const simd_type *df_ptr, simd_type *wsp, const simd_type *in0, const simd_type *in1, const simd_type *in2, simd_type *out0, simd_type *out1, simd_type *out2)
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void CurlCurlKernelLauncher (const TPhysSizeParameter3D sizeParam3D, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const typename simd_type::scalarType *D2, const simd_type *f0, const simd_type *f1, const simd_type *f1m, const simd_type *f2, const simd_type *df_ptr, simd_type *wsp, const simd_type *in0, const simd_type *in1, const simd_type *in2, simd_type *out0, simd_type *out1, simd_type *out2)
 3D entry point: evaluate curl(curl u) for one element group.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void DivergenceKernelLauncher (const TPhysSizeParameter1D sizeParam1D, const typename simd_type::scalarType *D0, const simd_type *df_ptr, simd_type *wsp0, const simd_type *in0, simd_type *out)
 Differentiate one element group of a 1D block: out = du/dx, with u the single component at in0.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void DivergenceKernelLauncher (const TPhysSizeParameter2D sizeParam2D, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const simd_type *f0, const simd_type *f1, const simd_type *df_ptr, simd_type *wsp0, simd_type *wsp1, const simd_type *in0, const simd_type *in1, simd_type *out)
 Differentiate one element group of a 2D block: out = du/dx + dv/dy, with u and v the components at in0 and in1.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void DivergenceKernelLauncher (const TPhysSizeParameter3D sizeParam3D, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const typename simd_type::scalarType *D2, const simd_type *f0, const simd_type *f1, const simd_type *f1m, const simd_type *f2, const simd_type *df_ptr, simd_type *wsp0, simd_type *wsp1, simd_type *wsp2, const simd_type *in0, const simd_type *in1, const simd_type *in2, simd_type *out)
 Differentiate one element group of a 3D block: out = du/dx + dv/dy + dw/dz, with u, v and w the components at in0, in1 and in2.
 
template<typename TSizeParameter >
static NEK_FORCE_INLINE auto TransposeSizeParameter (const TSizeParameter sizeParam)
 Exchange the mode and quadrature roles of a size parameter.
 
std::array< ExpressionKernelVariant, eNumExpressionKernels > GetExpressionKernelVariants (void)
 The kernel variants, in ExpressionKernelIndex order.
 
int findMatching (const std::string &s, int start, int direction)
 Find the bracket matching the one at start by scanning in the given direction.
 
std::string convertPow (std::string expr)
 Rewrite every caret power x^y in expr into a pow(x, y) call, since ^ is exclusive-or rather than exponentiation in the generated kernel source.
 
std::string GetExpressionKernelConstants (const std::vector< LibUtilities::EquationSharedPtr > &exprs)
 Emit the constants and the parameters of the expressions as macro variables, so that they are substituted when the kernel is compiled. A name defined by several expressions is emitted once.
 
std::string GetExpressionKernelParameters (const std::vector< std::string > &vnames, const std::vector< bool > &cmask)
 Emit the parameter list of an expression kernel, without the enclosing brackets: the fields of ExpressionKernelArgs in order, the EVAR pointers named <name>ptr and the outputs out<nc>.
 
std::string GetExpressionKernelArguments (const std::vector< std::string > &vnames, const std::vector< bool > &cmask)
 Emit the argument list matching GetExpressionKernelParameters(), without the enclosing brackets, so that a kernel can forward its parameters on.
 
bool IsDeviceExpression (const std::set< std::string > &variables, const std::set< std::string > &functions, const unsigned int coordDim)
 Whether the expression kernel can be compiled for an expression using variables and calling functions (see ExpressionBlockOp::GetExpressionVariables() and ExpressionBlockOp::GetExpressionFunctions()).
 
std::string GetExpressionKernelBody (const std::vector< LibUtilities::EquationSharedPtr > &exprs, const std::vector< bool > &cmask, const std::vector< std::string > &vnames, const unsigned int coordDim, const std::string &threadIndex, const std::string &mathPrefix)
 Emit the body of an expression kernel, without the enclosing braces.
 
void InitExpressionKernelCompiler (void)
 Initialise the device context the runtime compiler needs: a cudaFree(0)/hipFree(0) on the native builds, nothing on SYCL.
 
template<typename TData >
std::array< std::string, eNumExpressionKernels > GetExpressionKernelNameExpressions (void)
 The name expressions the kernel variants are registered and looked up under, in ExpressionKernelIndex order.
 
template<typename TData >
std::string GetExpressionKernelSource (const std::vector< LibUtilities::EquationSharedPtr > &exprs, const std::vector< bool > &cmask, const unsigned int coordDim)
 Generate the CUDA/HIP source of the expression kernel.
 
void ReleaseExpressionKernels (ExpressionKernels &kernels)
 Unload the module holding the compiled kernels, if any.
 
template<typename TData >
void BuildExpressionKernels (ExpressionKernels &kernels, const std::string &kernel_src)
 Compile the generated source and retrieve the kernels from it, releasing the kernels compiled for any previous expression.
 
template<typename TData , typename TStream >
void EnqueueExpressionKernel (const ExpressionKernels &kernels, const ExpressionKernelIndex index, const ExpressionKernelArgs< TData > &kernelArgs, const unsigned int gridSize, const unsigned int blockSize, TStream stream)
 Launch a variant of the compiled kernels on a native stream.
 
template<typename TData >
void CompileExpressionKernels (ExpressionKernels &kernels, const std::string &kernel_src, const unsigned int streamID)
 Compile the generated source; see BuildExpressionKernels().
 
template<typename TData >
void LaunchExpressionKernel (const ExpressionKernels &kernels, const ExpressionKernelIndex index, const ExpressionKernelArgs< TData > &kernelArgs, const unsigned int gridSize, const unsigned int blockSize, const unsigned int streamID)
 Launch a variant of the compiled kernels on the block's stream.
 
template<typename ExecSpace , bool DEFORMED, bool VARCOEFF, typename TData , typename TScalar >
static NEK_FORCE_INLINE void ApplyMetricKernel (const unsigned int nqTot, const unsigned int ncoord, const unsigned int dimension, const size_t nelmt, const size_t insize, const size_t outsize, const TScalar *diffCoeff, const TData *varDiffCoeff, const size_t varDiffCoeffSize, const TData *jacptr, const TData *dfptr, const TData *inptr, TData *outptr, TData *bwdptr, const TScalar scale)
 Apply the Jacobian, the derivative factors and the diffusion tensor to one group's reference derivatives, and scale its physical values by lambda * J.
 
template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJSegKernel (const unsigned int ncoord, const unsigned int nq0, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const simd_type *df_ptr, simd_type *deriv0, simd_type *phys, typename simd_type::scalarType lambda=0.0)
 Segment kernel contracting reference derivative with diffusion tensor and metric terms, with optional lambda-weighted mass contribution.
 
template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJTriKernel (const unsigned int ncoord, const unsigned int nq0, const unsigned int nq1, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const simd_type *df_ptr, const simd_type *hfac0, const simd_type *hfac1, simd_type *deriv0, simd_type *deriv1, simd_type *phys, typename simd_type::scalarType lambda=0.0)
 Triangle kernel contracting reference derivatives with diffusion tensor and metric terms, with optional lambda-weighted mass contribution.
 
template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJQuadKernel (const unsigned int ncoord, const unsigned int nq0, const unsigned int nq1, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const simd_type *df_ptr, simd_type *deriv0, simd_type *deriv1, simd_type *phys, typename simd_type::scalarType lambda=0.0)
 Quad kernel contracting reference derivatives with diffusion tensor and metric terms, with optional lambda-weighted mass contribution.
 
template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJHexKernel (const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const simd_type *df_ptr, simd_type *deriv0, simd_type *deriv1, simd_type *deriv2, simd_type *phys, typename simd_type::scalarType lambda=0.0)
 Hex kernel contracting reference derivatives with diffusion tensor and metric terms, with optional lambda-weighted mass contribution.
 
template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJTetKernel (const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const simd_type *df_ptr, const simd_type *hfac0, const simd_type *hfac1, const simd_type *hfac2, const simd_type *hfac3, simd_type *deriv0, simd_type *deriv1, simd_type *deriv2, simd_type *phys, typename simd_type::scalarType lambda=0.0)
 Tet kernel contracting reference derivatives with diffusion tensor and metric terms, with optional lambda-weighted mass contribution.
 
template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJPrismKernel (const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const simd_type *df_ptr, const simd_type *hfac0, const simd_type *hfac3, simd_type *deriv0, simd_type *deriv1, simd_type *deriv2, simd_type *phys, typename simd_type::scalarType lambda=0.0)
 Prism kernel contracting reference derivatives with diffusion tensor and metric terms, with optional lambda-weighted mass contribution.
 
template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJPyrKernel (const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const simd_type *df_ptr, const simd_type *hfac0, const simd_type *hfac1, const simd_type *hfac3, simd_type *deriv0, simd_type *deriv1, simd_type *deriv2, simd_type *phys, typename simd_type::scalarType lambda=0.0)
 Pyramid kernel contracting reference derivatives with diffusion tensor and metric terms, with optional lambda-weighted mass contribution.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJ1DKernel (const unsigned int ncoord, const unsigned int nq0, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const simd_type *df_ptr, simd_type *deriv0, simd_type *phys=nullptr, typename simd_type::scalarType lambda=0.0)
 1D launcher dispatching to DiffusionCoeffwithWJSegKernel.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJ2DKernel (const unsigned int ncoord, const unsigned int nq0, const unsigned int nq1, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const simd_type *df_ptr, const simd_type *h0, const simd_type *h1, simd_type *deriv0, simd_type *deriv1, simd_type *phys=nullptr, typename simd_type::scalarType lambda=0.0)
 2D launcher dispatching to shape-specific metric kernels.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJ3DKernel (const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const simd_type *df_ptr, const simd_type *h0, const simd_type *h1, const simd_type *h2, const simd_type *h3, simd_type *deriv0, simd_type *deriv1, simd_type *deriv2, simd_type *phys=nullptr, typename simd_type::scalarType lambda=0.0)
 3D launcher dispatching to shape-specific metric kernels.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void HelmholtzKernelLauncher (const TSizeParameter1D sizeParam1D, const bool isModified, const unsigned int ncoord, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *w0, const simd_type *NtoM, const simd_type *NtoMTrans, const simd_type *jac, const simd_type *df, simd_type *deriv0, simd_type *bwd, const simd_type *in, simd_type *out, const typename simd_type::scalarType lambda)
 1D launcher stringing together the five sum-factorised stages for one element group.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void HelmholtzKernelLauncher (const TSizeParameter2D sizeParam2D, const bool isModified, const unsigned int ncoord, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *basis1, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const simd_type *f0, const simd_type *f1, const simd_type *NtoM, const simd_type *NtoMTrans, const simd_type *jac, const simd_type *df, simd_type *wsp0, simd_type *deriv0, simd_type *deriv1, simd_type *bwd, const simd_type *in, simd_type *out, const typename simd_type::scalarType lambda)
 2D launcher stringing together the five sum-factorised stages for one element group.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void HelmholtzKernelLauncher (const TSizeParameter3D sizeParam3D, const bool isModified, const unsigned int ncoord, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *basis1, const typename simd_type::scalarType *basis2, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const typename simd_type::scalarType *D2, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const simd_type *f0, const simd_type *f1, const simd_type *f1m, const simd_type *f2, const simd_type *NtoM, const simd_type *NtoMTrans, const simd_type *jac, const simd_type *df, simd_type *wsp0, simd_type *wsp1, simd_type *wsp2, simd_type *deriv0, simd_type *deriv1, simd_type *deriv2, simd_type *bwd, const simd_type *in, simd_type *out, const typename simd_type::scalarType lambda)
 3D launcher stringing together the five sum-factorised stages for one element group.
 
static NEK_FORCE_INLINE void IProduct1DWorkspace (LibUtilities::ShapeType SHAPE_TYPE, const unsigned int nm0, const unsigned int nq0)
 1D workspace query: the segment kernel contracts its only direction straight into the output and needs no workspace, so this is a no-op kept for uniformity with the 2D and 3D forms.
 
static NEK_FORCE_INLINE void IProduct2DWorkspace (LibUtilities::ShapeType SHAPE_TYPE, const unsigned int nm0, const unsigned int nm1, const unsigned int nq0, const unsigned int nq1, unsigned int &wsp0Size)
 Grow wsp0Size to the workspace the 2D launcher needs for the given shape and sizes.
 
static NEK_FORCE_INLINE void IProduct3DWorkspace (LibUtilities::ShapeType SHAPE_TYPE, const unsigned int nm0, const unsigned int nm1, const unsigned int nm2, const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, unsigned int &wsp0Size, unsigned int &wsp1Size, unsigned int &wsp2Size)
 Grow wsp0Size, wsp1Size and wsp2Size to the workspaces the 3D launcher needs for the given shape and sizes.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, bool DEFORMED, typename TSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void IProductWRTBaseKernelLauncher (const TSizeParameter1D sizeParam1D, const bool isModified, const simd_type *in, const typename simd_type::scalarType *B0, const typename simd_type::scalarType *w0, const simd_type *NtoMTrans, const simd_type *jac, simd_type *out, typename simd_type::scalarType scale=1.0)
 1D launcher: forward one element group's inner product to the segment kernel, quadrature metric included.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, typename TSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void IProductWRTBaseKernelLauncher (const TSizeParameter1D sizeParam1D, const bool isModified, const simd_type *in, const typename simd_type::scalarType *B0, const simd_type *NtoMTrans, simd_type *out, typename simd_type::scalarType scale=1.0)
 1D launcher without the quadrature metric: applies the basis transpose alone to one element group; selected by the absence of the weight and Jacobian arguments.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, bool DEFORMED, typename TSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void IProductWRTBaseKernelLauncher (const TSizeParameter2D sizeParam2D, const bool isModified, const simd_type *in, const typename simd_type::scalarType *B0, const typename simd_type::scalarType *B1, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const simd_type *NtoMTrans, const simd_type *jac, simd_type *wsp0, simd_type *out, typename simd_type::scalarType scale=1.0)
 2D launcher: select the quadrilateral or (nodal) triangular kernel for one element group at compile time, quadrature metric included.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, typename TSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void IProductWRTBaseKernelLauncher (const TSizeParameter2D sizeParam2D, const bool isModified, const simd_type *in, const typename simd_type::scalarType *B0, const typename simd_type::scalarType *B1, const simd_type *NtoMTrans, simd_type *wsp0, simd_type *out, typename simd_type::scalarType scale=1.0)
 2D launcher without the quadrature metric: applies the basis transpose alone, otherwise identical to the metric overload, including the NodalTri behaviour of APPEND noted there.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, bool DEFORMED, typename TSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void IProductWRTBaseKernelLauncher (const TSizeParameter3D sizeParam3D, const bool isModified, const simd_type *in, const typename simd_type::scalarType *B0, const typename simd_type::scalarType *B1, const typename simd_type::scalarType *B2, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const simd_type *NtoMTrans, const simd_type *jac, simd_type *wsp0, simd_type *wsp1, simd_type *wsp2, simd_type *out, typename simd_type::scalarType scale=1.0)
 3D launcher: select the hexahedral, (nodal) tetrahedral, (nodal) prismatic or pyramidal kernel for one element group at compile time, quadrature metric included.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, typename TSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void IProductWRTBaseKernelLauncher (const TSizeParameter3D sizeParam3D, const bool isModified, const simd_type *in, const typename simd_type::scalarType *B0, const typename simd_type::scalarType *B1, const typename simd_type::scalarType *B2, const simd_type *NtoMTrans, simd_type *wsp0, simd_type *wsp1, simd_type *wsp2, simd_type *out, typename simd_type::scalarType scale=1.0)
 3D launcher without the quadrature metric: applies the basis transpose alone, otherwise identical to the metric overload, including the nodal-shape behaviour of APPEND noted there.
 
template<typename ExecSpace , bool DEFORMED, typename TData >
static NEK_FORCE_INLINE void JacobianDerivFactorKernel (const unsigned int nqTot, const unsigned int ncoord, const unsigned int dimension, const size_t nelmt, const size_t inoffset, const size_t outsize, const TData *jacptr, const TData *dfptr, const TData *inptr, TData *outptr, const TData scale)
 Multiply the input vector by the derivative factors and the Jacobian, without the quadrature weights (Coeff output path).
 
template<typename ExecSpace , bool DEFORMED, typename TData >
static NEK_FORCE_INLINE void JacobianDerivFactorWeightsKernel (const unsigned int nqTot, const unsigned int ncoord, const unsigned int dimension, const size_t nelmt, const size_t inoffset, const size_t outsize, const TData *jacptr, const TData *dfptr, const TData *weights, const TData *inptr, TData *outptr, const TData scale)
 Multiply the input vector by the derivative factors, the Jacobian and the quadrature weights (Phys output path).
 
template<bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void StdAlignDerivBase1D (const unsigned int nq0, const unsigned int indim, const simd_type *df_ptr, simd_type *df_tmp, const size_t inoffset, const simd_type *in, simd_type *out, const simd_type *jac_ptr, const typename simd_type::scalarType *w)
 Contract the input vector with the derivative factors of a segment and apply the quadrature metric.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void StdAlignDerivBase2D (const unsigned int nq0, const unsigned int nq1, const unsigned int indim, const simd_type *df_ptr, simd_type *df_tmp, const size_t inoffset, const simd_type *inptr, simd_type *out[2], const simd_type *Fac0, const simd_type *Fac1, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1)
 Contract the input vector with the derivative factors of a quadrilateral or triangle and apply the quadrature metric.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void StdAlignDerivBase3D (const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, const simd_type *df_ptr, simd_type *df_tmp, const size_t inoffset, const simd_type *Fac0, const simd_type *Fac1, const simd_type *Fac1m, const simd_type *Fac2, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const simd_type *inptr, simd_type *out[3])
 Contract the input vector with the derivative factors of a three-dimensional element and apply the quadrature metric.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void IProductWRTDerivBaseKernelLauncher (const TSizeParameter1D sizeParam1D, const unsigned int indim, const simd_type *df_ptr, simd_type *df_tmp, const size_t inoffset, const simd_type *in, const simd_type *jac, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *D0, simd_type *tmp0, simd_type *out)
 Segment launcher: form the weighted direction field of one element group and apply the transposed derivative.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void IProductWRTDerivBaseKernelLauncher (const TSizeParameter2D sizeParam2D, const unsigned int indim, const simd_type *df_ptr, simd_type *df_tmp, const size_t inoffset, const simd_type *in, const simd_type *f0, const simd_type *f1, const simd_type *jac, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, simd_type *tmp0, simd_type *tmp1, simd_type *out)
 Quadrilateral or triangle launcher: form the two weighted direction fields of one element group and apply the transposed derivatives.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void IProductWRTDerivBaseKernelLauncher (const TSizeParameter3D sizeParam3D, const unsigned int indim, const simd_type *df_ptr, simd_type *df_tmp, const size_t inoffset, const simd_type *in, const simd_type *f0, const simd_type *f1, const simd_type *f1m, const simd_type *f2, const simd_type *jac, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const typename simd_type::scalarType *D2, simd_type *tmp0, simd_type *tmp1, simd_type *tmp2, simd_type *out)
 Three-dimensional launcher: form the three weighted direction fields of one element group and apply the transposed derivatives.
 
constexpr bool IsCollapsedDir (LibUtilities::ShapeType shape, unsigned dir)
 Directions in which a shape is collapsed: those whose chain rule from the element local coordinate to the collapsed one carries a \(2/(1 - \eta)\) factor. Direction 0 is never collapsed.
 
constexpr bool CompNeedsCollapsedFac (LibUtilities::ShapeType shape, unsigned d, unsigned dir)
 Whether component d of the trace normal derivative factors, which multiplies \(\partial/\partial\eta_d\), needs the \(2/(1 - \eta)\) factor of collapsed direction dir.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter1D , std::enable_if_t< std::is_same_v< Implementation, SumFac > &&IsTraceSizeParameter1D_v< TTraceSizeParameter1D >, bool > Enable = true>
constexpr size_t IProductWRTPhysNormalDerivTraceWorkSpaceSize (const size_t nelmt, const TTraceSizeParameter1D sizeParam1D)
 Workspace of a whole block, per component: none, a segment's traces being points.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter2D , std::enable_if_t< std::is_same_v< Implementation, SumFac > &&IsTraceSizeParameter2D_v< TTraceSizeParameter2D >, bool > Enable = true>
constexpr size_t IProductWRTPhysNormalDerivTraceWorkSpaceSize (const size_t nelmt, const TTraceSizeParameter2D sizeParam2D)
 Workspace of a whole block, per component: an edge pair's trace-mode buffer followed by a volume-sized buffer for the collapsed factor scaling, one of each per element.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter3D , std::enable_if_t< std::is_same_v< Implementation, SumFac > &&IsTraceSizeParameter3D_v< TTraceSizeParameter3D >, bool > Enable = true>
constexpr size_t IProductWRTPhysNormalDerivTraceWorkSpaceSize (const size_t nelmt, const TTraceSizeParameter3D sizeParam3D)
 Workspace of a whole block, per component: the face mode blocks of a face pair, the contraction scratch and a volume-sized buffer for the collapsed factor scaling, one of each per element.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter1D , std::enable_if_t< std::is_same_v< Implementation, SumFac > &&IsTraceSizeParameter1D_v< TTraceSizeParameter1D >, bool > Enable = true>
constexpr unsigned int IProductWRTPhysNormalDerivTraceSharedMemorySize (const TTraceSizeParameter1D sizeParam1D, const unsigned int elmtsPerBlock, const bool useSharedMemoryWsp)
 Dynamic shared memory one block needs, in elements: none, a segment having no collapsed direction and no workspace.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter2D , std::enable_if_t< std::is_same_v< Implementation, SumFac > &&IsTraceSizeParameter2D_v< TTraceSizeParameter2D >, bool > Enable = true>
constexpr unsigned int IProductWRTPhysNormalDerivTraceSharedMemorySize (const TTraceSizeParameter2D sizeParam2D, const unsigned int elmtsPerBlock, const bool useSharedMemoryWsp)
 Dynamic shared memory one block needs, in elements: the \(2/(1 - \eta_1)\) table of a collapsed shape, staged once per block, then, with useSharedMemoryWsp, the workspace of the block's elmtsPerBlock elements.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter3D , std::enable_if_t< std::is_same_v< Implementation, SumFac > &&IsTraceSizeParameter3D_v< TTraceSizeParameter3D >, bool > Enable = true>
constexpr unsigned int IProductWRTPhysNormalDerivTraceSharedMemorySize (const TTraceSizeParameter3D sizeParam3D, const unsigned int elmtsPerBlock, const bool useSharedMemoryWsp)
 Dynamic shared memory one block needs, in elements: the \(2/(1 - \eta)\) tables of the shape's collapsed directions, staged once per block, then, with useSharedMemoryWsp, the workspace of the block's elmtsPerBlock elements.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , bool DEFORMED, typename TTraceSizeParameter1D , typename TData , typename TthreadBlock , typename TUseSharedWsp , std::enable_if_t< std::is_same_v< Implementation, SumFac >, bool > Enable = true>
NEK_DEVICE_KERNEL void __LAUNCH_BOUNDS__ ((GetMaxThreadPerBlock< Implementation, TTraceSizeParameter1D >())) IProductWRTPhysNormalDerivTraceKernelLauncher(const TTraceSizeParameter1D sizeParam1D
 The one-dimensional lift: \(\langle \partial_n \phi, g \rangle\) over a segment's two vertices, one lane per element.
 
 while (e< nelmt)
 
template<typename TData >
NEK_DEVICE_INLINE void ScaleAddCollapsedFacKernel (const unsigned int ilane, const unsigned int nm0, const unsigned int nm1, const unsigned int nm2, const bool useD1, const bool useD2, const TData *NEK_RESTRICT twoOver1, const TData *NEK_RESTRICT twoOver2, const TData *NEK_RESTRICT volwsp, TData *NEK_RESTRICT out)
 Scale a volume workspace by the collapsed factors a trace group still needs and accumulate it into the output. The factors are table data shared by the block and indexed directly; the volume arrays are warp interleaved. In two dimensions nm2 is one and twoOver2 is unread.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , bool DEFORMED, typename TTraceSizeParameter2D , typename TData , typename TthreadBlock , typename TUseSharedWsp , std::enable_if_t< std::is_same_v< Implementation, SumFac >, bool > Enable = true>
NEK_DEVICE_KERNEL void __LAUNCH_BOUNDS__ ((GetMaxThreadPerBlock< Implementation, TTraceSizeParameter2D >())) IProductWRTPhysNormalDerivTraceKernelLauncher(const TTraceSizeParameter2D sizeParam2D
 All edges of one two-dimensional element: the two terms of the operator, one per element direction, accumulated in turn; one lane per element.
 
 FETCH_SHARED_MEMORY (shmemptr)
 
if constexpr (SHAPE_TYPE==LibUtilities::Tri||SHAPE_TYPE==LibUtilities::NodalTri)
 
 DispatchWorkSpace (useSharedMemoryWsp, [&](const auto isShared) { TData *wspbase=isShared ?(TData *) shmemptr+tableSize :wsp;while(e< nelmt) { const size_t ilane=e % warpsize;const size_t iwarp=e/warpsize;const TData *inptr=in+numDataIn *(nelmt *c+warpsize *iwarp);TData *outptr=out+numDataOut *(nelmt *c+warpsize *iwarp);const size_t wspOffset=isShared ? 0 :nelmt *c+warpsize *iwarp;TData *wspptr=wspbase+(edgeSize+numDataOut) *wspOffset;TData *volptr=wspptr+edgeSize *warpsize;const unsigned int off1=warpsize *2 *tnq00;const unsigned int joff1=(DEFORMED) ? off1 :warpsize *2;for(unsigned int d=0;d< 2;++d) { const bool useD1=CompNeedsCollapsedFac(SHAPE_TYPE, d, 1);const TData *jacptr=jac+d *jacCompStride+numDataJac *warpsize *iwarp;if(!(append||d > 0)) { for(unsigned int p=0;p< numDataOut;++p) { outptr[warpsize *p+ilane]=0.0;} } { TData *dst=useD1 ? volptr :outptr;if(useD1) { for(unsigned int p=0;p< numDataOut;++p) { dst[warpsize *p+ilane]=0.0;} } const TData *nb=(0==d) ? dnbasis0 :nbasis0;const TData *tb=(traceDir0==d) ? dtbasis0 :tbasis0;const bool coll=(traceDir0==d) ? false :isColl0;const bool endp=(0==d) ? false :endPtsColl0;if(endp) { IPWRTPhysTraceEdgeN0Kernel< true, DEFORMED >(ilane, 0, 2, 2, nm0, nm1, nb, tnq00, tb, tw0, jacptr, wspptr, inptr, dst, coll);} else { IPWRTPhysTraceEdgeN0Kernel< false, DEFORMED >(ilane, 0, 2, 2, nm0, nm1, nb, tnq00, tb, tw0, jacptr, wspptr, inptr, dst, coll);} if(useD1) { ScaleAddCollapsedFacKernel(ilane, nm0, nm1, 1u, true, false, s_twoOver1, s_twoOver1, volptr, outptr);} } { const TData *nb=(1==d) ? dnbasis1 :nbasis1;const TData *tb=(traceDir1==d) ? dtbasis1 :tbasis1;const bool coll=(traceDir1==d) ? false :isColl1;const bool endp=(1==d) ? false :endPtsColl1;if(endp) { IPWRTPhysTraceEdgeN1Kernel< true, DEFORMED >(ilane, 0, nedgeN1, nedgeN1, nm0, nm1, nb, tnq10, tb, tw1, jacptr+joff1, wspptr, inptr+off1, outptr, coll);} else { IPWRTPhysTraceEdgeN1Kernel< false, DEFORMED >(ilane, 0, nedgeN1, nedgeN1, nm0, nm1, nb, tnq10, tb, tw1, jacptr+joff1, wspptr, inptr+off1, outptr, coll);} } } e+=getGlobalRange< 0 >(threadBlock);} })
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , bool DEFORMED, typename TTraceSizeParameter3D , typename TData , typename TthreadBlock , typename TUseSharedWsp , std::enable_if_t< std::is_same_v< Implementation, SumFac >, bool > Enable = true>
NEK_DEVICE_KERNEL void __LAUNCH_BOUNDS__ ((GetMaxThreadPerBlock< Implementation, TTraceSizeParameter3D >())) IProductWRTPhysNormalDerivTraceKernelLauncher(const TTraceSizeParameter3D sizeParam3D
 All faces of one three-dimensional element: the three terms of the operator, one per element direction, accumulated in turn; one lane per element.
 
 DispatchWorkSpace (useSharedMemoryWsp, [&](const auto isShared) { TData *wspbase=isShared ?(TData *) shmemptr+tableSize :wsp;while(e< nelmt) { const size_t ilane=e % warpsize;const size_t iwarp=e/warpsize;const TData *inptr=in+numDataIn *(nelmt *c+warpsize *iwarp);TData *outptr=out+numDataOut *(nelmt *c+warpsize *iwarp);const size_t wspOffset=isShared ? 0 :nelmt *c+warpsize *iwarp;TData *wspptr=wspbase+(wsp0Size+wsp1Size+numDataOut) *wspOffset;TData *wsp1ptr=wspptr+wsp0Size *warpsize;TData *volptr=wsp1ptr+wsp1Size *warpsize;const unsigned int in1=2 *tnq00 *tnq01;const unsigned int jac1=DEFORMED ? in1 :2;const unsigned int in2=in1+nfaceN1 *tnq10 *tnq11;const unsigned int jac2=jac1+(DEFORMED ? nfaceN1 *tnq10 *tnq11 :nfaceN1);for(unsigned int d=0;d< 3;++d) { const bool c1=CompNeedsCollapsedFac(SHAPE_TYPE, d, 1);const bool c2=CompNeedsCollapsedFac(SHAPE_TYPE, d, 2);const TData *jacptr=jac+d *jacCompStride+numDataJac *warpsize *iwarp;if(!(append||d > 0)) { for(unsigned int p=0;p< numDataOut;++p) { outptr[warpsize *p+ilane]=0.0;} } const TData *nbd0=(0==d) ? dnbasis0 :nbasis0;const TData *nbd1=(1==d) ? dnbasis1 :nbasis1;const TData *nbd2=(2==d) ? dnbasis2 :nbasis2;const TData *tbd0=(traceDir00==d) ? dtbasis00 :tbasis00;const TData *tbd1=(traceDir01==d) ? dtbasis01 :tbasis01;const TData *tbd2=(traceDir10==d) ? dtbasis10 :tbasis10;const TData *tbd3=(traceDir11==d) ? dtbasis11 :tbasis11;const TData *tbd4=(traceDir20==d) ? dtbasis20 :tbasis20;const TData *tbd5=(traceDir21==d) ? dtbasis21 :tbasis21;const bool cd0=(traceDir00==d) ? false :isColl00;const bool cd1=(traceDir01==d) ? false :isColl01;const bool cd2=(traceDir10==d) ? false :isColl10;const bool cd3=(traceDir11==d) ? false :isColl11;const bool cd4=(traceDir20==d) ? false :isColl20;const bool cd5=(traceDir21==d) ? false :isColl21;const bool epd0=(0==d) ? false :endPtsColl0;const bool epd1=(1==d) ? false :endPtsColl1;const bool epd2=(2==d) ? false :endPtsColl2;{ const bool scale=c1||c2;TData *dst=scale ? volptr :outptr;if(scale) { for(unsigned int p=0;p< numDataOut;++p) { dst[warpsize *p+ilane]=0.0;} } if(epd0) { IPWRTPhysTraceFaceN0Kernel< true, DEFORMED >(ilane, 0, 2, 2, nm0, nm1, nm2, nbd0, tnq00, tnq01, tbd0, tbd1, tw00, tw01, jacptr, wspptr, wsp1ptr, inptr, dst, cd0, cd1);} else { IPWRTPhysTraceFaceN0Kernel< false, DEFORMED >(ilane, 0, 2, 2, nm0, nm1, nm2, nbd0, tnq00, tnq01, tbd0, tbd1, tw00, tw01, jacptr, wspptr, wsp1ptr, inptr, dst, cd0, cd1);} if(scale) { ScaleAddCollapsedFacKernel(ilane, nm0, nm1, nm2, c1, c2, s_twoOver1, s_twoOver2, volptr, outptr);} } { const bool scale=c2;TData *dst=scale ? volptr :outptr;if(scale) { for(unsigned int p=0;p< numDataOut;++p) { dst[warpsize *p+ilane]=0.0;} } if(epd1) { IPWRTPhysTraceFaceN1Kernel< true, DEFORMED >(ilane, 0, nfaceN1, nfaceN1, nm0, nm1, nm2, nbd1, tnq10, tnq11, tbd2, tbd3, tw10, tw11, jacptr+jac1 *warpsize, wspptr, wsp1ptr, inptr+in1 *warpsize, dst, cd2, cd3);} else { IPWRTPhysTraceFaceN1Kernel< false, DEFORMED >(ilane, 0, nfaceN1, nfaceN1, nm0, nm1, nm2, nbd1, tnq10, tnq11, tbd2, tbd3, tw10, tw11, jacptr+jac1 *warpsize, wspptr, wsp1ptr, inptr+in1 *warpsize, dst, cd2, cd3);} if(scale) { ScaleAddCollapsedFacKernel(ilane, nm0, nm1, nm2, false, c2, s_twoOver1, s_twoOver2, volptr, outptr);} } { const bool scale=c1;TData *dst=scale ? volptr :outptr;if(scale) { for(unsigned int p=0;p< numDataOut;++p) { dst[warpsize *p+ilane]=0.0;} } if(epd2) { IPWRTPhysTraceFaceN2Kernel< true, DEFORMED >(ilane, 0, nfaceN2, nfaceN2, nm0, nm1, nm2, nbd2, tnq20, tnq21, tbd4, tbd5, tw20, tw21, jacptr+jac2 *warpsize, wspptr, wsp1ptr, inptr+in2 *warpsize, dst, cd4, cd5);} else { IPWRTPhysTraceFaceN2Kernel< false, DEFORMED >(ilane, 0, nfaceN2, nfaceN2, nm0, nm1, nm2, nbd2, tnq20, tnq21, tbd4, tbd5, tw20, tw21, jacptr+jac2 *warpsize, wspptr, wsp1ptr, inptr+in2 *warpsize, dst, cd4, cd5);} if(scale) { ScaleAddCollapsedFacKernel(ilane, nm0, nm1, nm2, c1, false, s_twoOver1, s_twoOver2, volptr, outptr);} } } e+=getGlobalRange< 0 >(threadBlock);} })
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter1D , std::enable_if_t< std::is_same_v< Implementation, SumFacTOP > &&IsTraceSizeParameter1D_v< TTraceSizeParameter1D >, bool > Enable = true>
NEK_HOSTDEVICE_INLINE constexpr size_t IProductWRTPhysNormalDerivTraceWorkSpaceSize (const size_t nelmt, const TTraceSizeParameter1D sizeParam1D)
 Workspace of nelmt elements, per component: none, a segment's traces being points.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter2D , std::enable_if_t< std::is_same_v< Implementation, SumFacTOP > &&IsTraceSizeParameter2D_v< TTraceSizeParameter2D >, bool > Enable = true>
NEK_HOSTDEVICE_INLINE constexpr size_t IProductWRTPhysNormalDerivTraceWorkSpaceSize (const size_t nelmt, const TTraceSizeParameter2D sizeParam2D)
 Workspace of nelmt elements, per component: an edge pair's trace-mode buffer, the element's volume and, for a collapsed shape, the volume buffer of the collapsed factor scaling, per element.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter3D , std::enable_if_t< std::is_same_v< Implementation, SumFacTOP > &&IsTraceSizeParameter3D_v< TTraceSizeParameter3D >, bool > Enable = true>
NEK_HOSTDEVICE_INLINE constexpr size_t IProductWRTPhysNormalDerivTraceWorkSpaceSize (const size_t nelmt, const TTraceSizeParameter3D sizeParam3D)
 Workspace of nelmt elements, per component: one face's mode block, the face contraction scratch, the element's volume and, for a collapsed shape, the volume buffer of the collapsed factor scaling, per element.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , bool DEFORMED, typename TTraceSizeParameter1D , typename TElmtsPerBlock , typename TData , typename TthreadBlock , typename TUseSharedWsp , std::enable_if_t< std::is_same_v< Implementation, SumFacTOP >, bool > Enable = true>
NEK_DEVICE_KERNEL void __LAUNCH_BOUNDS__ ((GetMaxThreadPerBlock< Implementation, TTraceSizeParameter1D >())) IProductWRTPhysNormalDerivTraceKernelLauncher(const TTraceSizeParameter1D sizeParam1D
 The one-dimensional lift: \(\langle \partial_n \phi, g \rangle\) over a segment's two vertices, one or several elements per thread block.
 
 for (size_t e0=static_cast< size_t >(getBlockIdx< 0 >(threadBlock)) *elmtsPerBlock;e0< nelmt;e0+=static_cast< size_t >(getBlockRange< 0 >(threadBlock)) *elmtsPerBlock)
 
template<typename TthreadBlock , typename TData >
static NEK_DEVICE_INLINE void ScaleAddCollapsedFacTOPKernel (const unsigned int nm0, const unsigned int nm1, const unsigned int nm2, const bool useD1, const bool useD2, const TData *NEK_RESTRICT twoOver1, const TData *NEK_RESTRICT twoOver2, const TData *NEK_RESTRICT volwsp, TData *NEK_RESTRICT out, const TthreadBlock &threadBlock)
 Scale a volume buffer by the collapsed factors a trace group still needs and accumulate it into the element's volume, threads striding the points. In two dimensions nm2 is one and twoOver2 is unread.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , bool DEFORMED, typename TTraceSizeParameter2D , typename TElmtsPerBlock , typename TData , typename TthreadBlock , typename TUseSharedWsp , std::enable_if_t< std::is_same_v< Implementation, SumFacTOP >, bool > Enable = true>
NEK_DEVICE_KERNEL void __LAUNCH_BOUNDS__ ((GetMaxThreadPerBlock< Implementation, TTraceSizeParameter2D >())) IProductWRTPhysNormalDerivTraceKernelLauncher(const TTraceSizeParameter2D sizeParam2D
 All edges of one two-dimensional element: the two terms of the operator, one per element direction, accumulated in turn; one or several elements per thread block.
 
if constexpr (COLLAPSED)
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , bool DEFORMED, typename TTraceSizeParameter3D , typename TElmtsPerBlock , typename TData , typename TthreadBlock , typename TUseSharedWsp , std::enable_if_t< std::is_same_v< Implementation, SumFacTOP >, bool > Enable = true>
NEK_DEVICE_KERNEL void __LAUNCH_BOUNDS__ ((GetMaxThreadPerBlock< Implementation, TTraceSizeParameter3D >())) IProductWRTPhysNormalDerivTraceKernelLauncher(const TTraceSizeParameter3D sizeParam3D
 All faces of one three-dimensional element: the three terms of the operator, one per element direction, accumulated in turn; one or several elements per thread block.
 
if constexpr (COLLAPSED1)
 
if constexpr (COLLAPSED2)
 
if constexpr (COLLAPSED1||COLLAPSED2)
 
template<typename simd_type >
static NEK_FORCE_INLINE void IProductWRTPhysNormalDerivTrace1DKernel (const unsigned nm0, const simd_type *dnbasis0, const simd_type *jac, const simd_type *in, simd_type *out, const bool append)
 The one-dimensional lift: \(\langle \partial_n \phi, g \rangle\) over a segment's two vertices.
 
template<typename simd_type >
static NEK_FORCE_INLINE void ScaleAddCollapsedFacKernel (const unsigned nm0, const unsigned nm1, const unsigned nm2, const bool useD1, const bool useD2, const simd_type *twoOver1, const simd_type *twoOver2, const simd_type *volwsp, simd_type *out)
 Scale a volume workspace by the collapsed factors a trace group still needs, then accumulate it into the output.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, unsigned EDGE_NORMAL_DIR, typename simd_type >
static NEK_FORCE_INLINE void IPWRTPhysNormalDerivTraceEdgeGroupKernel (const bool useD1, const unsigned nm0, const unsigned nm1, const unsigned tnq00, const unsigned tnq10, const simd_type *nbasis, const simd_type *tbasis, const simd_type *tw, const simd_type *twoOver1, const simd_type *jac, const simd_type *in, simd_type *wsp, simd_type *volwsp, simd_type *out, const bool isCollocated, const bool endPtsCollocated)
 One edge group of a term of the two-dimensional operator, accumulated into out.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void IPWRTPhysNormalDerivTracePerDir2DKernel (const unsigned derivDir, const unsigned nm0, const unsigned nm1, const unsigned tnq00, const unsigned tnq10, const simd_type *nbasis0, const simd_type *nbasis1, const simd_type *dnbasis0, const simd_type *dnbasis1, const simd_type *tbasis0, const simd_type *tbasis1, const simd_type *dtbasis0, const simd_type *dtbasis1, const simd_type *tw0, const simd_type *tw1, const simd_type *twoOver1, const simd_type *jac, const simd_type *in, simd_type *wsp, simd_type *volwsp, simd_type *out, const unsigned traceDir0, const unsigned traceDir1, const bool append, const bool isCollocated0, const bool isCollocated1, const bool endPtsCollocated0, const bool endPtsCollocated1)
 Term derivDir of the two-dimensional operator: the trace inner product taken with the direction derivDir table replaced by its derivative.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, unsigned FACE_NORMAL_DIR, typename simd_type >
static NEK_FORCE_INLINE void IPWRTPhysNormalDerivTraceFaceGroupKernel (const bool useD1, const bool useD2, const unsigned nm0, const unsigned nm1, const unsigned nm2, const unsigned tnq00, const unsigned tnq01, const unsigned tnq10, const unsigned tnq11, const unsigned tnq20, const unsigned tnq21, const simd_type *nbasis, const simd_type *tbasisA, const simd_type *tbasisB, const simd_type *twA, const simd_type *twB, const simd_type *twoOver1, const simd_type *twoOver2, const simd_type *jac, const simd_type *in, simd_type *wsp0, simd_type *wsp1, simd_type *volwsp, simd_type *out, const bool isCollocatedA, const bool isCollocatedB, const bool endPtsCollocated)
 One face group of a term of the three-dimensional operator, accumulated into out.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void IPWRTPhysNormalDerivTracePerDir3DKernel (const unsigned derivDir, const unsigned nm0, const unsigned nm1, const unsigned nm2, const unsigned tnq00, const unsigned tnq01, const unsigned tnq10, const unsigned tnq11, const unsigned tnq20, const unsigned tnq21, const simd_type *nbasis0, const simd_type *nbasis1, const simd_type *nbasis2, const simd_type *dnbasis0, const simd_type *dnbasis1, const simd_type *dnbasis2, const simd_type *tbasis00, const simd_type *tbasis01, const simd_type *tbasis10, const simd_type *tbasis11, const simd_type *tbasis20, const simd_type *tbasis21, const simd_type *dtbasis00, const simd_type *dtbasis01, const simd_type *dtbasis10, const simd_type *dtbasis11, const simd_type *dtbasis20, const simd_type *dtbasis21, const simd_type *tw00, const simd_type *tw01, const simd_type *tw10, const simd_type *tw11, const simd_type *tw20, const simd_type *tw21, const simd_type *twoOver1, const simd_type *twoOver2, const simd_type *jac, const simd_type *in, simd_type *wsp0, simd_type *wsp1, simd_type *volwsp, simd_type *out, const unsigned traceDir00, const unsigned traceDir01, const unsigned traceDir10, const unsigned traceDir11, const unsigned traceDir20, const unsigned traceDir21, const bool append, const bool isCollocated00, const bool isCollocated01, const bool isCollocated10, const bool isCollocated11, const bool isCollocated20, const bool isCollocated21, const bool endPtsCollocated0, const bool endPtsCollocated1, const bool endPtsCollocated2)
 Term derivDir of the three-dimensional operator: the trace inner product taken with the direction derivDir table replaced by its derivative.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TTraceSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void IProductWRTPhysNormalDerivTraceKernelLauncher (const TTraceSizeParameter1D sizeParam1D, const simd_type *nbasis0, const simd_type *dnbasis0, const simd_type *twoOver0, const simd_type *jac, const size_t jacCompStride, simd_type *volwsp, const simd_type *in, simd_type *out, const bool append, const bool endPtsCollocated0)
 Launcher for one element group of segments.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TTraceSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void IProductWRTPhysNormalDerivTraceKernelLauncher (const TTraceSizeParameter2D sizeParam2D, const simd_type *nbasis0, const simd_type *nbasis1, const simd_type *dnbasis0, const simd_type *dnbasis1, const simd_type *tbasis0, const simd_type *tbasis1, const simd_type *dtbasis0, const simd_type *dtbasis1, const simd_type *tw0, const simd_type *tw1, const simd_type *twoOver0, const simd_type *twoOver1, const simd_type *jac, const size_t jacCompStride, simd_type *wsp, simd_type *volwsp, const simd_type *in, simd_type *out, const unsigned traceDir0, const unsigned traceDir1, const bool append, const bool isCollocated0, const bool isCollocated1, const bool endPtsCollocated0, const bool endPtsCollocated1)
 All edges of one two-dimensional element group: the two terms of the operator, one per element direction, accumulated in turn.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TTraceSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void IProductWRTPhysNormalDerivTraceKernelLauncher (const TTraceSizeParameter3D sizeParam3D, const simd_type *nbasis0, const simd_type *nbasis1, const simd_type *nbasis2, const simd_type *dnbasis0, const simd_type *dnbasis1, const simd_type *dnbasis2, const simd_type *tbasis00, const simd_type *tbasis01, const simd_type *tbasis10, const simd_type *tbasis11, const simd_type *tbasis20, const simd_type *tbasis21, const simd_type *dtbasis00, const simd_type *dtbasis01, const simd_type *dtbasis10, const simd_type *dtbasis11, const simd_type *dtbasis20, const simd_type *dtbasis21, const simd_type *tw00, const simd_type *tw01, const simd_type *tw10, const simd_type *tw11, const simd_type *tw20, const simd_type *tw21, const simd_type *twoOver0, const simd_type *twoOver1, const simd_type *twoOver2, const simd_type *jac, const size_t jacCompStride, simd_type *wsp0, simd_type *wsp1, simd_type *volwsp, const simd_type *in, simd_type *out, const unsigned traceDir00, const unsigned traceDir01, const unsigned traceDir10, const unsigned traceDir11, const unsigned traceDir20, const unsigned traceDir21, const bool append, const bool isCollocated00, const bool isCollocated01, const bool isCollocated10, const bool isCollocated11, const bool isCollocated20, const bool isCollocated21, const bool endPtsCollocated0, const bool endPtsCollocated1, const bool endPtsCollocated2)
 All faces of one three-dimensional element group: the three terms of the operator, one per element direction, accumulated in turn.
 
template<bool END_PTS_COLLOCATED, bool APPEND, typename simd_type >
static NEK_FORCE_INLINE void IProductWRTPhysTrace1DKernel (const unsigned nm0, const simd_type *basisn0, const simd_type *in, simd_type *out)
 One group of segments: lift the two endpoint values onto the volume grid.
 
template<bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void IPWRTPhysEdgeKernel (const unsigned edg, const unsigned nedge, const unsigned nm, const unsigned tnq, const simd_type *tbasis, const simd_type *tw, const simd_type *tjac, const simd_type *in, simd_type *out, const bool isCollocated)
 Leaf kernel, stage one in two dimensions: integrate an edge, or a pair of edges, against the hat functions of the in-edge direction.
 
template<bool END_PTS_COLLOCATED0, typename simd_type >
static NEK_FORCE_INLINE void AddEdgeN0ToVolKernel (const unsigned edg, const unsigned nedge, const unsigned tstride, const unsigned nm0, const unsigned nm1, const simd_type *nbasis, const simd_type *in, simd_type *out)
 Leaf kernel, stage two in two dimensions: lift the results of a direction-0 normal edge into the volume field.
 
template<bool END_PTS_COLLOCATED0, typename simd_type >
static NEK_FORCE_INLINE void AddEdgeN1ToVolKernel (const unsigned edg, const unsigned nedge, const unsigned tstride, const unsigned nm0, const unsigned nm1, const simd_type *nbasis, const simd_type *in, simd_type *out)
 Leaf kernel, stage two in two dimensions: lift the results of a direction-1 normal edge into the volume field.
 
template<bool END_PTS_COLLOCATED0, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void IPWRTPhysTraceEdgeN0Kernel (const unsigned edg, const unsigned nedge, const unsigned tstride, const unsigned nm0, const unsigned nm1, const simd_type *nbasis, const unsigned tnq, const simd_type *tbasis, const simd_type *tw, const simd_type *tjac, simd_type *wsp, const simd_type *in, simd_type *out, const bool isCollocated)
 Glue for a direction-0 normal edge: integrate, then lift.
 
template<bool END_PTS_COLLOCATED0, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void IPWRTPhysTraceEdgeN1Kernel (const unsigned edg, const unsigned nedge, const unsigned tstride, const unsigned nm0, const unsigned nm1, const simd_type *nbasis, const unsigned tnq, const simd_type *tbasis, const simd_type *tw, const simd_type *tjac, simd_type *wsp, const simd_type *in, simd_type *out, const bool isCollocated)
 Glue for a direction-1 normal edge: integrate, then lift.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool APPEND, typename simd_type >
static NEK_FORCE_INLINE void IProductWRTPhysTraceEdgeKernel (const unsigned edge, const unsigned nm0, const unsigned nm1, const simd_type *nbasis0, const simd_type *nbasis1, const unsigned tnq00, const unsigned tnq10, const simd_type *tbasis0, const simd_type *tbasis1, const simd_type *tw00, const simd_type *tw10, const simd_type *tjac, simd_type *wsp, const simd_type *in, simd_type *out, const bool isCollocated0, const bool isCollocated1, const bool endPtsCollocated0, const bool endPtsCollocated1)
 One named edge of one two-dimensional element group: turn the edge id into a direction and a position, then integrate and lift.
 
template<bool END_PTS_COLLOCATED0, typename simd_type >
static NEK_FORCE_INLINE void AddFaceN0ToVolKernel (const unsigned fac, const unsigned nface, const unsigned tstride, const unsigned nm0, const unsigned nm1, const unsigned nm2, const simd_type *nbasis, const simd_type *in, simd_type *out)
 Leaf kernel, stage two in three dimensions: lift the results of a direction-0 normal face into the volume field.
 
template<bool END_PTS_COLLOCATED1, typename simd_type >
static NEK_FORCE_INLINE void AddFaceN1ToVolKernel (const unsigned fac, const unsigned nface, const unsigned tstride, const unsigned nm0, const unsigned nm1, const unsigned nm2, const simd_type *nbasis, const simd_type *in, simd_type *out)
 Leaf kernel, stage two in three dimensions: lift the results of a direction-1 normal face into the volume field.
 
template<bool END_PTS_COLLOCATED2, typename simd_type >
static NEK_FORCE_INLINE void AddFaceN2ToVolKernel (const unsigned fac, const unsigned nface, const unsigned tstride, const unsigned nm0, const unsigned nm1, const unsigned nm2, const simd_type *nbasis, const simd_type *in, simd_type *out)
 Leaf kernel, stage two in three dimensions: lift the results of a direction-2 normal face into the volume field.
 
template<bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void IPWRTPhysFaceKernel (const unsigned fac, const unsigned nface, const unsigned nm0, const unsigned nm1, const unsigned tnq0, const unsigned tnq1, const simd_type *tbasis0, const simd_type *tbasis1, const simd_type *tw0, const simd_type *tw1, const simd_type *tjac, simd_type *wsp, const simd_type *in, simd_type *out, const bool isCollocated0, const bool isCollocated1)
 Leaf kernel, stage one in three dimensions: integrate a face, or a pair of faces, against the hat functions of the two in-face directions.
 
template<bool END_PTS_COLLOCATED0, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void IPWRTPhysTraceFaceN0Kernel (const unsigned fac, const unsigned nface, const unsigned tstride, const unsigned nm0, const unsigned nm1, const unsigned nm2, const simd_type *nbasis, const unsigned tnq0, const unsigned tnq1, const simd_type *tbasis0, const simd_type *tbasis1, const simd_type *tw0, const simd_type *tw1, const simd_type *tjac, simd_type *wsp, simd_type *wsp1, const simd_type *in, simd_type *out, const bool isCollocated0=false, const bool isCollocated1=false)
 Glue for a direction-0 normal face: integrate, then lift.
 
template<bool END_PTS_COLLOCATED1, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void IPWRTPhysTraceFaceN1Kernel (const unsigned fac, const unsigned nface, const unsigned tstride, const unsigned nm0, const unsigned nm1, const unsigned nm2, const simd_type *nbasis, const unsigned tnq0, const unsigned tnq1, const simd_type *tbasis0, const simd_type *tbasis1, const simd_type *tw0, const simd_type *tw1, const simd_type *tjac, simd_type *wsp, simd_type *wsp1, const simd_type *in, simd_type *out, const bool isCollocated0=false, const bool isCollocated1=false)
 Glue for a direction-1 normal face: integrate, then lift.
 
template<bool END_PTS_COLLOCATED2, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void IPWRTPhysTraceFaceN2Kernel (const unsigned fac, const unsigned nface, const unsigned tstride, const unsigned nm0, const unsigned nm1, const unsigned nm2, const simd_type *nbasis, const unsigned tnq0, const unsigned tnq1, const simd_type *tbasis0, const simd_type *tbasis1, const simd_type *tw0, const simd_type *tw1, const simd_type *tjac, simd_type *wsp, simd_type *wsp1, const simd_type *in, simd_type *out, const bool isCollocated0=false, const bool isCollocated1=false)
 Glue for a direction-2 normal face: integrate, then lift.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool APPEND, typename simd_type >
static NEK_FORCE_INLINE void IProductWRTPhysTraceFaceKernel (const unsigned face, const unsigned nm0, const unsigned nm1, const unsigned nm2, const simd_type *nbasis0, const simd_type *nbasis1, const simd_type *nbasis2, const unsigned tnq00, const unsigned tnq01, const unsigned tnq10, const unsigned tnq11, const unsigned tnq20, const unsigned tnq21, const simd_type *tbasis00, const simd_type *tbasis01, const simd_type *tbasis10, const simd_type *tbasis11, const simd_type *tbasis20, const simd_type *tbasis21, const simd_type *tw00, const simd_type *tw01, const simd_type *tw10, const simd_type *tw11, const simd_type *tw20, const simd_type *tw21, const simd_type *tjac, simd_type *wsp, simd_type *wsp1, const simd_type *in, simd_type *out, const bool isCollocated00, const bool isCollocated01, const bool isCollocated10, const bool isCollocated11, const bool isCollocated20, const bool isCollocated21, const bool endPtsCollocated0, const bool endPtsCollocated1, const bool endPtsCollocated2)
 One named face of one three-dimensional element group: turn the face id into a direction and a position, then integrate and lift.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool APPEND, typename TTraceSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void IProductWRTPhysTraceKernelLauncher (const TTraceSizeParameter1D sizeParam1D, const simd_type *nbasis0, const simd_type *tjac, const simd_type *in, simd_type *out, const bool endPtsCollocated0)
 Launcher for one element group of segments.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool APPEND, typename TTraceSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void IProductWRTPhysTraceKernelLauncher (const TTraceSizeParameter2D sizeParam2D, const simd_type *nbasis0, const simd_type *nbasis1, const simd_type *tbasis0, const simd_type *tbasis1, const simd_type *tw00, const simd_type *tw10, const simd_type *tjac, simd_type *wsp, const simd_type *in, simd_type *out, const bool isCollocated0, const bool isCollocated1, const bool endPtsCollocated0, const bool endPtsCollocated1)
 All edges of one two-dimensional element group: optionally zero the volume field, then walk the packed traces.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool APPEND, typename TTraceSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void IProductWRTPhysTraceKernelLauncher (const TTraceSizeParameter3D sizeParam3D, const simd_type *nbasis0, const simd_type *nbasis1, const simd_type *nbasis2, const simd_type *tbasis00, const simd_type *tbasis01, const simd_type *tbasis10, const simd_type *tbasis11, const simd_type *tbasis20, const simd_type *tbasis21, const simd_type *tw00, const simd_type *tw01, const simd_type *tw10, const simd_type *tw11, const simd_type *tw20, const simd_type *tw21, const simd_type *tjac, simd_type *wsp, simd_type *wsp1, const simd_type *in, simd_type *out, const bool isCollocated00, const bool isCollocated01, const bool isCollocated10, const bool isCollocated11, const bool isCollocated20, const bool isCollocated21, const bool endPtsCollocated0, const bool endPtsCollocated1, const bool endPtsCollocated2)
 All faces of one three-dimensional element group: optionally zero the volume field, then walk the packed traces a pair at a time.
 
template<typename ExecSpace , bool DEFORMED, bool VARCOEFF, typename TData , typename TScalar >
static NEK_FORCE_INLINE void ApplyMetricKernel (const unsigned int nqTot, const unsigned int ncoord, const unsigned int dimension, const size_t nelmt, const size_t insize, const size_t outsize, const TScalar *diffCoeff, const TData *varDiffCoeff, const size_t varDiffCoeffSize, const TData *jacptr, const TData *dfptr, const TData *inptr, TData *outptr)
 Apply \(J\,G = J\,M^T D M\) to the reference derivatives of an element group.
 
template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJSegKernel (const unsigned int ncoord, const unsigned int nq0, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const simd_type *df_ptr, simd_type *deriv0)
 Segment kernel contracting reference derivative with diffusion tensor and metric terms.
 
template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJTriKernel (const unsigned int ncoord, const unsigned int nq0, const unsigned int nq1, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const simd_type *df_ptr, const simd_type *hfac0, const simd_type *hfac1, simd_type *deriv0, simd_type *deriv1)
 Triangle kernel contracting reference derivatives with diffusion tensor and metric terms.
 
template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJQuadKernel (const unsigned int ncoord, const unsigned int nq0, const unsigned int nq1, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const simd_type *df_ptr, simd_type *deriv0, simd_type *deriv1)
 Quad kernel contracting reference derivatives with diffusion tensor and metric terms.
 
template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJHexKernel (const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const simd_type *df_ptr, simd_type *deriv0, simd_type *deriv1, simd_type *deriv2)
 Hex kernel contracting reference derivatives with diffusion tensor and metric terms.
 
template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJTetKernel (const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const simd_type *df_ptr, const simd_type *hfac0, const simd_type *hfac1, const simd_type *hfac2, const simd_type *hfac3, simd_type *deriv0, simd_type *deriv1, simd_type *deriv2)
 Tet kernel contracting reference derivatives with diffusion tensor and metric terms.
 
template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJPrismKernel (const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const simd_type *df_ptr, const simd_type *hfac0, const simd_type *hfac3, simd_type *deriv0, simd_type *deriv1, simd_type *deriv2)
 Prism kernel contracting reference derivatives with diffusion tensor and metric terms.
 
template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJPyrKernel (const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const simd_type *df_ptr, const simd_type *hfac0, const simd_type *hfac1, const simd_type *hfac3, simd_type *deriv0, simd_type *deriv1, simd_type *deriv2)
 Pyramid kernel contracting reference derivatives with diffusion tensor and metric terms.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJ1DKernel (const unsigned int ncoord, const unsigned int nq0, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const simd_type *df_ptr, simd_type *deriv0)
 1D launcher dispatching to DiffusionCoeffwithWJSegKernel.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJ2DKernel (const unsigned int ncoord, const unsigned int nq0, const unsigned int nq1, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const simd_type *df_ptr, const simd_type *h0, const simd_type *h1, simd_type *deriv0, simd_type *deriv1)
 2D launcher dispatching to shape-specific metric kernels.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void DiffusionCoeffwithWJ3DKernel (const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const simd_type *jac_ptr, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const simd_type *df_ptr, const simd_type *h0, const simd_type *h1, const simd_type *h2, const simd_type *h3, simd_type *deriv0, simd_type *deriv1, simd_type *deriv2)
 3D launcher dispatching to shape-specific metric kernels.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void LaplacianKernelLauncher (const TSizeParameter1D sizeParam1D, const bool isModified, const unsigned int ncoord, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *w0, const simd_type *NtoM, const simd_type *NtoMTrans, const simd_type *jac, const simd_type *df, simd_type *deriv0, simd_type *bwd, const simd_type *in, simd_type *out)
 1D launcher stringing together the five sum-factorised stages for one element group.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void LaplacianKernelLauncher (const TSizeParameter2D sizeParam2D, const bool isModified, const unsigned int ncoord, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *basis1, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const simd_type *f0, const simd_type *f1, const simd_type *NtoM, const simd_type *NtoMTrans, const simd_type *jac, const simd_type *df, simd_type *wsp0, simd_type *deriv0, simd_type *deriv1, simd_type *bwd, const simd_type *in, simd_type *out)
 2D launcher stringing together the five sum-factorised stages for one element group.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void LaplacianKernelLauncher (const TSizeParameter3D sizeParam3D, const bool isModified, const unsigned int ncoord, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *basis1, const typename simd_type::scalarType *basis2, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const typename simd_type::scalarType *D2, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const simd_type *f0, const simd_type *f1, const simd_type *f1m, const simd_type *f2, const simd_type *NtoM, const simd_type *NtoMTrans, const simd_type *jac, const simd_type *df, simd_type *wsp0, simd_type *wsp1, simd_type *wsp2, simd_type *deriv0, simd_type *deriv1, simd_type *deriv2, simd_type *bwd, const simd_type *in, simd_type *out)
 3D launcher stringing together the five sum-factorised stages for one element group.
 
template<typename ExecSpace , bool DEFORMED, bool VARCOEFF, typename TData , typename TScalar >
static NEK_FORCE_INLINE void ApplyMetricKernel (const unsigned int nqTot, const unsigned int ncoord, const unsigned int dimension, const size_t nelmt, const size_t insize, const size_t outsize, const size_t advelsize, const TScalar *diffCoeff, const TData *varDiffCoeff, const size_t varDiffCoeffSize, const TData *jacptr, const TData *dfptr, const TData *advVel, const TData *inptr, TData *outptr, TData *bwdptr, const TScalar scale)
 Apply the geometry and the three operator coefficients at every quadrature point of an interleaved group of elements.
 
template<bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void AddAdvection1DKernel (const unsigned int ncoord, const unsigned int nq0, const simd_type *advVel0_ptr, const simd_type *advVel1_ptr, const simd_type *advVel2_ptr, const simd_type *df_ptr, simd_type *deriv0, simd_type *out, const typename simd_type::scalarType scale)
 Segment advection kernel: add the advection term to the scaled physical values of one element group.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void AddAdvection2DKernel (const unsigned int ncoord, const unsigned int nq0, const unsigned int nq1, const simd_type *hfac0, const simd_type *hfac1, const simd_type *advVel0_ptr, const simd_type *advVel1_ptr, const simd_type *advVel2_ptr, const simd_type *df_ptr, simd_type *deriv0, simd_type *deriv1, simd_type *out, const typename simd_type::scalarType scale)
 Two-dimensional advection kernel: add the advection term to the scaled physical values of one element group.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void AddAdvection3DKernel (const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, const simd_type *hfac0, const simd_type *hfac1, const simd_type *hfac2, const simd_type *hfac3, const simd_type *advVel0_ptr, const simd_type *advVel1_ptr, const simd_type *advVel2_ptr, const simd_type *df_ptr, simd_type *deriv0, simd_type *deriv1, simd_type *deriv2, simd_type *out, const typename simd_type::scalarType scale)
 Three-dimensional advection kernel: add the advection term to the scaled physical values of one element group.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void LinAdvDiffReactionKernelLauncher (const TSizeParameter1D sizeParam1D, const bool isModified, const unsigned int ncoord, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *w0, const simd_type *NtoM, const simd_type *NtoMTrans, const simd_type *jac, const simd_type *df, const simd_type *advVel0_ptr, const simd_type *advVel1_ptr, const simd_type *advVel2_ptr, simd_type *deriv0, simd_type *bwd, const simd_type *in, simd_type *out, const typename simd_type::scalarType lambda)
 Apply the whole operator to one element group of a 1D block.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void LinAdvDiffReactionKernelLauncher (const TSizeParameter2D sizeParam2D, const bool isModified, const unsigned int ncoord, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *basis1, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const simd_type *f0, const simd_type *f1, const simd_type *NtoM, const simd_type *NtoMTrans, const simd_type *jac, const simd_type *df, const simd_type *advVel0_ptr, const simd_type *advVel1_ptr, const simd_type *advVel2_ptr, simd_type *wsp0, simd_type *deriv0, simd_type *deriv1, simd_type *bwd, const simd_type *in, simd_type *out, const typename simd_type::scalarType lambda)
 Apply the whole operator to one element group of a 2D block (quadrilaterals and modal or nodal triangles).
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void LinAdvDiffReactionKernelLauncher (const TSizeParameter3D sizeParam3D, const bool isModified, const unsigned int ncoord, const bool useDiffCoeff, const typename simd_type::scalarType *diffCoeff, const simd_type *varDiffCoeff, const size_t varDiffCoeffSize, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *basis1, const typename simd_type::scalarType *basis2, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const typename simd_type::scalarType *D2, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const simd_type *f0, const simd_type *f1, const simd_type *f1m, const simd_type *f2, const simd_type *NtoM, const simd_type *NtoMTrans, const simd_type *jac, const simd_type *df, const simd_type *advVel0_ptr, const simd_type *advVel1_ptr, const simd_type *advVel2_ptr, simd_type *wsp0, simd_type *wsp1, simd_type *wsp2, simd_type *deriv0, simd_type *deriv1, simd_type *deriv2, simd_type *bwd, const simd_type *in, simd_type *out, const typename simd_type::scalarType lambda)
 Apply the whole operator to one element group of a 3D block (hexahedra, modal or nodal tetrahedra and prisms, and pyramids).
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, bool DEFORMED, typename TSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void MassKernelLauncher (const TSizeParameter1D sizeParam1D, const bool isModified, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *w0, const simd_type *NtoM, const simd_type *NtoMTrans, const simd_type *jac, simd_type *bwd, const simd_type *in, simd_type *out, typename simd_type::scalarType scale=1.0)
 1D launcher: backward transform then inner product with the basis for one element group of segments.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, bool DEFORMED, typename TSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void MassKernelLauncher (const TSizeParameter2D sizeParam2D, const bool isModified, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *basis1, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const simd_type *NtoM, const simd_type *NtoMTrans, const simd_type *jac, simd_type *wsp0, simd_type *bwd, const simd_type *in, simd_type *out, typename simd_type::scalarType scale=1.0)
 2D launcher: backward transform then inner product with the basis for one element group of quadrilaterals or (nodal) triangles.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, bool DEFORMED, typename TSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void MassKernelLauncher (const TSizeParameter3D sizeParam3D, const bool isModified, const typename simd_type::scalarType *basis0, const typename simd_type::scalarType *basis1, const typename simd_type::scalarType *basis2, const typename simd_type::scalarType *w0, const typename simd_type::scalarType *w1, const typename simd_type::scalarType *w2, const simd_type *NtoM, const simd_type *NtoMTrans, const simd_type *jac, simd_type *wsp0, simd_type *wsp1, simd_type *wsp2, simd_type *bwd, const simd_type *in, simd_type *out, typename simd_type::scalarType scale=1.0)
 3D launcher: backward transform then inner product with the basis for one element group of hexahedra, (nodal) tetrahedra, (nodal) prisms or pyramids.
 
template<typename simd_type , typename TData >
static NEK_FORCE_INLINE void StdInvMassDiagonalScaleKernel (const unsigned int nmTot, const TData *diag, const simd_type scale, const simd_type *in, simd_type *out)
 The standard inverse mass of one element group where it is diagonal (StdRegions::StdExpansion::StdInvMassIsDiagonal()), scaled: out[m] = scale * diag[m] * in[m], with diag the nmTot values of the warehouse's StdRegions::eInvMassStdMatDiagonal. On an affine element the inverse mass is the standard one over the Jacobian, which scale may carry, one value per lane. Where it is not diagonal the callers take the libxsmm product instead.
 
template<typename ExecSpace , bool DEFORMED, typename TData >
static NEK_FORCE_INLINE void MultiplyByDerivFactorKernel (const unsigned int nqTot, const unsigned int ncoord, const unsigned int dimension, const size_t nelmt, const size_t inoffset, const size_t outoffset, const TData *dfptr, const TData *inptr, TData *outptr)
 Contract the standard-region derivatives of a lane group into all ncoord Cartesian derivatives.
 
template<typename ExecSpace , bool APPEND, bool DEFORMED, typename TData >
static NEK_FORCE_INLINE void MultiplyByDerivDirFactorKernel (const unsigned dir, const unsigned nqTot, const unsigned ncoord, const unsigned dimension, const size_t nelmt, const size_t inoffset, const TData *dfptr, const TData *inptr, TData *outptr)
 Contract the standard-region derivatives of a lane group into the single Cartesian derivative dir, overwriting or accumulating.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void PhysDeriv1DKernel (const unsigned int nq0, const unsigned int ncoord, const simd_type *df_ptr, simd_type *out[3])
 One dimension: scale a segment's standard derivative by the derivative factors, in place, for every Cartesian component.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, unsigned int DIR, typename simd_type >
static NEK_FORCE_INLINE void PhysDerivDir1DKernel (const unsigned int nq0, const unsigned int ncoord, const simd_type *df_ptr, const simd_type *in, simd_type *out)
 One dimension, single component: scale a segment's standard derivative by the derivative factor of direction DIR.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void PhysDeriv2DKernel (const unsigned int nq0, const unsigned int nq1, const unsigned int ncoord, const simd_type *f0, const simd_type *f1, const simd_type *df_ptr, simd_type *out[3])
 Two dimensions: correct the collapsed derivatives of a triangle and contract with the derivative factors, in place, for every Cartesian component.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, unsigned int DIR, typename simd_type >
static NEK_FORCE_INLINE void PhysDerivDir2DKernel (const unsigned nq0, const unsigned nq1, const unsigned int ncoord, const simd_type *f0, const simd_type *f1, const simd_type *df_ptr, const simd_type *tderiv0, const simd_type *tderiv1, simd_type *out)
 Two dimensions, single component: as PhysDeriv2DKernel, but reading the collapsed derivatives from separate arrays and producing only the Cartesian component DIR.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void PhysDeriv3DKernel (const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, const simd_type *f0, const simd_type *f1, const simd_type *f1m, const simd_type *f2, const simd_type *df_ptr, simd_type *out_d0, simd_type *out_d1, simd_type *out_d2)
 Three dimensions: correct the collapsed derivatives of a non-hexahedral shape and contract with the derivative factors, in place, for all three Cartesian components.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, unsigned int DIR, typename simd_type >
static NEK_FORCE_INLINE void PhysDerivDir3DKernel (const unsigned nq0, const unsigned nq1, const unsigned nq2, const simd_type *f0, const simd_type *f1, const simd_type *f1m, const simd_type *f2, const simd_type *df_ptr, const simd_type *tderiv0, const simd_type *tderiv1, const simd_type *tderiv2, simd_type *out)
 Three dimensions, single component: as PhysDeriv3DKernel, but reading the collapsed derivatives from separate arrays and producing only the Cartesian component DIR.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void PhysDerivKernelLauncher (const TPhysSizeParameter1D sizeParam1D, const typename simd_type::scalarType *D0, const simd_type *df_ptr, const simd_type *in, simd_type *out[3])
 Differentiate one element group of a 1D block: the standard derivative into out[0], then all ncoord Cartesian derivatives in place.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void PhysDerivKernelLauncher (const TPhysSizeParameter2D sizeParam2D, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const simd_type *f0, const simd_type *f1, const simd_type *df_ptr, const simd_type *in, simd_type *out[3])
 Differentiate one element group of a 2D block: the two collapsed derivatives into out[0] and out[1], then all ncoord Cartesian derivatives in place.
 
template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void PhysDerivKernelLauncher (const TPhysSizeParameter3D sizeParam3D, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const typename simd_type::scalarType *D2, const simd_type *f0, const simd_type *f1, const simd_type *f1m, const simd_type *f2, const simd_type *df_ptr, const simd_type *in, simd_type *out[3])
 Differentiate one element group of a 3D block: the three collapsed derivatives into out[0 .. 2], then the three Cartesian derivatives in place.
 
PhysLiftProjectForm PhysLiftProjectFormOf (const LocalRegions::ExpansionSharedPtr &exp)
 The form the block whose representative expansion is exp takes. The square test is on the total counts: equal per-direction counts do not make B square on a collapsed-coordinate shape, whose mode count is a fraction of the tensor product.
 
bool PhysLiftProjectDenseTail (const LocalRegions::ExpansionSharedPtr &exp)
 Whether the Device SumFacTOP implementation applies the block whose representative expansion is exp through the dense projector: the StdInvMass form of a tetrahedron, prism or pyramid of at most physLiftProjectDenseTailMaxPoints points whose traces have the volume's points in one in-trace direction at least. On an affine element \(B M^{-1} B^{\mathsf T} = J^{-1} P\) with \(P = B M_{\mathrm{std}}^{-1} B^{\mathsf T}\), one nqTot x nqTot matrix per block, so the trace is lifted directly onto every point with the division by the Jacobian, and one batched product applies P to every element, in place of the basis transpose, the inverse mass and the backward transform.
 
template<bool DEFORMED, typename simd_type , typename TData >
static NEK_FORCE_INLINE void PhysLiftProjectPointScaleKernel (const unsigned int nqTot, const TData scale, const simd_type *weights, const simd_type *jac, simd_type *pointScale)
 The Pointwise form's factor of one element group, pointScale[q] = scale / (w_q J), zero on the padding elements, whose Jacobian is zero. weights holds the quadrature weights at every point (WeightsKey), jac the group's Jacobian, one per element or, when DEFORMED, one per point.
 
template<bool APPEND, typename simd_type >
static NEK_FORCE_INLINE void PhysLiftProjectPointwiseKernel (const unsigned int nqTot, const simd_type *pointScale, const simd_type *vol, simd_type *out)
 The Pointwise form of one element group: out (+)= pointScale * vol.
 
template<typename simd_type >
static NEK_FORCE_INLINE void PhysLiftProjectCoefScaleKernel (const unsigned int nmTot, const simd_type coefScale, simd_type *inout)
 inout[m] *= coefScale over the nmTot coefficients of one element group: the scale over the Jacobian after the dense standard inverse mass.
 
template<typename TData >
static void ContractTraceNormalKernel (const size_t npts, const unsigned ndim, const unsigned nvar, const TData *tensor, const TData *normals, TData *out, const unsigned int streamID)
 The outward normal component of a vector-valued field on the element-local traces of one block: out[f] = sum_d n[d] * tensor[f * ndim + d] at every point, one launch with each thread forming every component of one point. The three arrays share one layout, component-major with npts between components and the elements interleaved at the same width within a component, so consecutive threads read consecutive addresses of each (coalesced) at any interleave width.
 
template<bool APPEND, bool END_PTS_COLLOCATED, typename simd_type >
static NEK_FORCE_INLINE void PhysTraceExtractSegKernel (const unsigned int nm0, const unsigned int nq0, const typename simd_type::scalarType *basis0, const simd_type *in, simd_type *out, const bool isCollocated=false)
 One-dimensional extraction: sample a segment's volume field at its two endpoint traces.
 
template<bool END_PTS_COLLOCATED0, typename simd_type >
static NEK_FORCE_INLINE void PhysExtractEdgeN0EndPtsKernel (const unsigned edg, const unsigned nedg, const unsigned tstride, const unsigned nq0, const unsigned nq1, const typename simd_type::scalarType *ntbasis0, const simd_type *in, simd_type *out)
 Stage one in two dimensions: reduce the volume block to the boundary lines of one or both direction-0 normal edges.
 
template<bool END_PTS_COLLOCATED1, typename simd_type >
static NEK_FORCE_INLINE void PhysExtractEdgeN1EndPtsKernel (const unsigned edg, const unsigned nedg, const unsigned tstride, const unsigned nq0, const unsigned nq1, const typename simd_type::scalarType *ntbasis1, const simd_type *in, simd_type *out)
 Stage one in two dimensions: the direction-1 twin of PhysExtractEdgeN0EndPtsKernel.
 
template<bool END_PTS_COLLOCATED0, typename simd_type >
static NEK_FORCE_INLINE void PhysExtractEdgeN0Kernel (const unsigned edg, const unsigned nedg, const unsigned tstride, const unsigned nq0, const unsigned nq1, const typename simd_type::scalarType *ntbasis0, const unsigned nq00, const typename simd_type::scalarType *tbasis00, simd_type *wsp, const simd_type *in, simd_type *out, const bool isCollocated00=false)
 Glue for the direction-0 normal edges: extract, then interpolate.
 
template<bool END_PTS_COLLOCATED1, typename simd_type >
static NEK_FORCE_INLINE void PhysExtractEdgeN1Kernel (const unsigned edg, const unsigned nedg, const unsigned tstride, const unsigned nq0, const unsigned nq1, const typename simd_type::scalarType *ntbasis1, const unsigned nq10, const typename simd_type::scalarType *tbasis10, simd_type *wsp, const simd_type *in, simd_type *out, const bool isCollocated10=false)
 Glue for the direction-1 normal edges: the direction-1 twin of PhysExtractEdgeN0Kernel.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename simd_type >
static NEK_FORCE_INLINE void PhysTraceExtractEdgeKernel (const unsigned edge, const unsigned nm0, const unsigned nm1, const unsigned nq00, const unsigned nq10, const typename simd_type::scalarType *ntbasis0, const typename simd_type::scalarType *ntbasis1, const typename simd_type::scalarType *tbasis00, const typename simd_type::scalarType *tbasis10, simd_type *wsp, const simd_type *in, simd_type *out, const bool isCollocated00, const bool isCollocated10, const bool endPtsCollocated0, const bool endPtsCollocated1)
 Two-dimensional entry point for a single named edge: turn the edge id into a normal direction and a position, then call the glue.
 
template<bool END_PTS_COLLOCATED0, typename simd_type >
static NEK_FORCE_INLINE void PhysExtractEndFacesN0Kernel (const unsigned fac, const unsigned nface, const unsigned tstride, const unsigned nq0, const unsigned nq1, const unsigned nq2, const typename simd_type::scalarType *ntbasis0, const simd_type *in, simd_type *out)
 Stage one in three dimensions: reduce the volume block to the boundary planes of one or both direction-0 normal faces.
 
template<bool END_PTS_COLLOCATED1, typename simd_type >
static NEK_FORCE_INLINE void PhysExtractEndFacesN1Kernel (const unsigned fac, const unsigned nface, const unsigned tstride, const unsigned nq0, const unsigned nq1, const unsigned nq2, const typename simd_type::scalarType *ntbasis1, const simd_type *in, simd_type *out)
 Stage one in three dimensions: the direction-1 twin of PhysExtractEndFacesN0Kernel.
 
template<bool END_PTS_COLLOCATED2, typename simd_type >
static NEK_FORCE_INLINE void PhysExtractEndFacesN2Kernel (const unsigned fac, const unsigned nface, const unsigned tstride, const unsigned nq0, const unsigned nq1, const unsigned nq2, const typename simd_type::scalarType *ntbasis2, const simd_type *in, simd_type *out)
 Stage one in three dimensions: the direction-2 twin of PhysExtractEndFacesN0Kernel.
 
template<bool END_PTS_COLLOCATED0, typename simd_type >
static NEK_FORCE_INLINE void PhysExtractFaceN0Kernel (const unsigned fac, const unsigned nfac, const unsigned tstride, const unsigned nq0, const unsigned nq1, const unsigned nq2, const typename simd_type::scalarType *ntbasis0, const unsigned nq00, const unsigned nq01, const typename simd_type::scalarType *tbasis00, const typename simd_type::scalarType *tbasis01, simd_type *wsp1, simd_type *wsp2, const simd_type *in, simd_type *out, const bool isCollocated00, const bool isCollocated01)
 Glue for the direction-0 normal faces: extract, then interpolate.
 
template<bool END_PTS_COLLOCATED1, typename simd_type >
static NEK_FORCE_INLINE void PhysExtractFaceN1Kernel (const unsigned fac, const unsigned nfac, const unsigned tstride, const unsigned nq0, const unsigned nq1, const unsigned nq2, const typename simd_type::scalarType *ntbasis1, const unsigned nq10, const unsigned nq11, const typename simd_type::scalarType *tbasis10, const typename simd_type::scalarType *tbasis11, simd_type *wsp1, simd_type *wsp2, const simd_type *in, simd_type *out, const bool isCollocated10, const bool isCollocated11)
 Glue for the direction-1 normal faces: the direction-1 twin of PhysExtractFaceN0Kernel.
 
template<bool END_PTS_COLLOCATED2, typename simd_type >
static NEK_FORCE_INLINE void PhysExtractFaceN2Kernel (const unsigned fac, const unsigned nfac, const unsigned tstride, const unsigned nq0, const unsigned nq1, const unsigned nq2, const typename simd_type::scalarType *ntbasis2, const unsigned nq20, const unsigned nq21, const typename simd_type::scalarType *tbasis20, const typename simd_type::scalarType *tbasis21, simd_type *wsp1, simd_type *wsp2, const simd_type *in, simd_type *out, const bool isCollocated20, const bool isCollocated21)
 Glue for the direction-2 normal faces: the direction-2 twin of PhysExtractFaceN0Kernel.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename simd_type >
static NEK_FORCE_INLINE void PhysTraceFaceExtractKernel (const unsigned face, const unsigned nm0, const unsigned nm1, const unsigned nm2, const unsigned nq00, const unsigned nq01, const unsigned nq10, const unsigned nq11, const unsigned nq20, const unsigned nq21, const typename simd_type::scalarType *ntbasis0, const typename simd_type::scalarType *ntbasis1, const typename simd_type::scalarType *ntbasis2, const typename simd_type::scalarType *tbasis00, const typename simd_type::scalarType *tbasis01, const typename simd_type::scalarType *tbasis10, const typename simd_type::scalarType *tbasis11, const typename simd_type::scalarType *tbasis20, const typename simd_type::scalarType *tbasis21, simd_type *sum_irq, simd_type *sum_jir, const simd_type *in, simd_type *out, const bool isCollocated00=false, const bool isCollocated01=false, const bool isCollocated10=false, const bool isCollocated11=false, const bool isCollocated20=false, const bool isCollocated21=false, const bool endPtsCollocated0=false, const bool endPtsCollocated1=false, const bool endPtsCollocated2=false)
 Three-dimensional entry point for a single named face: turn the face id into a normal direction and a position, then call the glue.
 
std::array< size_t, 2 > PhysTraceExtractWorkspaceSizes (const std::vector< unsigned int > &nm, const std::vector< unsigned int > &nq)
 The sizes, in entries of the vector type, of the two workspaces the extraction of one element group needs, for the largest intermediate any shape of the dimension can need. In two dimensions the first holds the values of an edge pair the normal-direction stage extracts, and the second is unused. In three the first holds the face blocks of a face pair, and the second the scratch of the general face interpolation: the first in-trace direction already interpolated while the second is still on the volume points. A segment needs neither.
 
template<LibUtilities::ShapeType SHAPE_TYPE, unsigned int DIR, bool CONTRACT, unsigned int NDIM, unsigned int NVAR, typename simd_type >
static NEK_FORCE_INLINE void PhysTraceExtractDirLinesKernel (const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, const typename simd_type::scalarType *ntbasis, const bool endPts, const unsigned int *traceOffset, const simd_type *const in[NVAR], const simd_type *tensor, const unsigned int varStride, const simd_type(*traceNormals)[NDIM], simd_type *const out[NVAR])
 The traces of normal direction DIR of NVAR fields at once, line by line along the normal direction: each line's values are loaded once and interpolated to every trace of the direction (h_p(-1), h_p(+1)), or read off the end points when the rule contains them. With CONTRACT the line values are the directional components of a tensor, contracted with each trace's normal (traceNormals, one per trace) before the interpolation, which forms the outward normal component of the tensor on the traces in the same pass.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename TTraceSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void PhysTraceExtractKernelLauncher (const TTraceSizeParameter1D sizeParam1D, const typename simd_type::scalarType *ntbasis0, const simd_type *in, simd_type *out, const bool endPtsCollocated0)
 One-dimensional bulk entry point: both endpoint values of every element.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename TTraceSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void PhysTraceExtractKernelLauncher (const TTraceSizeParameter2D sizeParam2D, const typename simd_type::scalarType *ntbasis0, const typename simd_type::scalarType *ntbasis1, const typename simd_type::scalarType *tbasis00, const typename simd_type::scalarType *tbasis10, simd_type *wsp, const simd_type *in, simd_type *out, const bool isCollocated00, const bool isCollocated10, const bool endPtsCollocated0, const bool endPtsCollocated1)
 Two-dimensional bulk entry point: extract every edge of the element in packed order.
 
template<LibUtilities::ShapeType SHAPE_TYPE, typename TTraceSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void PhysTraceExtractKernelLauncher (const TTraceSizeParameter3D sizeParam3D, const typename simd_type::scalarType *ntbasis0, const typename simd_type::scalarType *ntbasis1, const typename simd_type::scalarType *ntbasis2, const typename simd_type::scalarType *tbasis00, const typename simd_type::scalarType *tbasis01, const typename simd_type::scalarType *tbasis10, const typename simd_type::scalarType *tbasis11, const typename simd_type::scalarType *tbasis20, const typename simd_type::scalarType *tbasis21, simd_type *sum_irq, simd_type *sum_jir, const simd_type *in, simd_type *out, const bool isCollocated00, const bool isCollocated01, const bool isCollocated10, const bool isCollocated11, const bool isCollocated20, const bool isCollocated21, const bool endPtsCollocated0, const bool endPtsCollocated1, const bool endPtsCollocated2)
 Three-dimensional bulk entry point: extract every face of the element in packed order.
 
template<bool ASSIGN, typename vec_t >
static NEK_FORCE_INLINE void ContractTraceNormalChunk (const unsigned int nq, const vec_t *normal, const vec_t *trace, vec_t *out)
 Accumulate one direction's share of the outward normal component on one chunk of element-local traces: out = normal * trace, or out += normal * trace with a fused multiply-add after the first direction, at the nq trace points of a SIMD group of elements.
 
template<typename TData , typename TScalar >
static NEK_HOSTDEVICE_INLINE void PhysInterpEdgeKernel (const unsigned nedg, const unsigned nqfrom, const unsigned nqto, const TScalar *tbasis, const TData *in, TData *out, const bool isCollocated=false)
 Stage two in two dimensions: interpolate the extracted edge values from the volume points of the in-edge direction onto that edge's trace quadrature points.
 
template<typename TData , typename TScalar >
static NEK_HOSTDEVICE_INLINE void PhysInterpFaceKernel (const unsigned nfac, const unsigned nqfrom0, const unsigned nqfrom1, const unsigned nqto0, const unsigned nqto1, const TScalar *tbasis0, const TScalar *tbasis1, TData *wsp, const TData *in, TData *out, const bool isCollocated0, const bool isCollocated1)
 Stage two in three dimensions: interpolate the extracted face planes from the volume points of the two tangential directions onto the face's trace quadrature points.
 
template<typename TTable , typename MemSpace >
TraceTables< TTable > FetchTraceTables (const LocalRegions::ExpansionSharedPtr &exp, const LibUtilities::NekDataWarehouseSharedPtr &warehouse)
 Fetch the trace tables of the block whose representative expansion is exp from warehouse.
 

Variables

template<typename T >
constexpr bool IsPhysSizeParameter1D_v = IsPhysSizeParameter1D<T>::value
 
template<typename T >
constexpr bool IsPhysSizeParameter2D_v = IsPhysSizeParameter2D<T>::value
 
template<typename T >
constexpr bool IsPhysSizeParameter3D_v = IsPhysSizeParameter3D<T>::value
 
template<typename T >
constexpr bool IsSizeParameter1D_v = IsSizeParameter1D<T>::value
 
template<typename T >
constexpr bool IsSizeParameter2D_v = IsSizeParameter2D<T>::value
 
template<typename T >
constexpr bool IsSizeParameter3D_v = IsSizeParameter3D<T>::value
 
template<typename T >
constexpr bool IsTraceSizeParameter1D_v
 
template<typename T >
constexpr bool IsTraceSizeParameter2D_v
 
template<typename T >
constexpr bool IsTraceSizeParameter3D_v
 
const std::string expressionKernelName = "expression_kernel"
 The name the generated kernel function is compiled under.
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT nbasis0
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT dnbasis0
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t nelmt
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int elmtsPerBlock
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int numDataIn
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int numDataOut
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int numDataJac
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t jacCompStride
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT twoOver0
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT jac
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp useSharedMemoryWsp
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT wsp
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT in
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT out
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const bool append
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const bool const bool endPtsCollocated0
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const bool const bool unsigned char * shmemptr
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const bool const bool unsigned char const TthreadBlock & threadBlock
 
const unsigned int nm0 = sizeParam1D.nm0()
 
constexpr unsigned int warpsize = NektarSpaces::Device::warpSize
 
size_t e = getGlobalIdx<0>(threadBlock)
 
const unsigned int c = getBlockIdx<1>(threadBlock)
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT nbasis1
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT dnbasis1
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT tbasis0
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT tbasis1
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT dtbasis0
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT dtbasis1
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT tw0
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT tw1
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT twoOver1
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int traceDir0
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int traceDir1
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const bool const bool isColl0
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const bool const bool const bool isColl1
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const bool const bool const bool const bool endPtsColl0
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const bool const bool const bool const bool const bool endPtsColl1
 
const unsigned int nm1 = sizeParam2D.nm1()
 
const unsigned int tnq00 = sizeParam2D.nq00()
 
const unsigned int tnq10 = sizeParam2D.nq10()
 
constexpr unsigned int nedgeN1
 
const size_t edgeSize
 
TData * s_twoOver1 = nullptr
 
unsigned int tableSize = 0
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT nbasis2
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT dnbasis2
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT tbasis00
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT tbasis01
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT tbasis10
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT tbasis11
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT tbasis20
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT tbasis21
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT dtbasis00
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT dtbasis01
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT dtbasis10
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT dtbasis11
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT dtbasis20
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT dtbasis21
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT tw00
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT tw01
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT tw10
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT tw11
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT tw20
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT tw21
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT twoOver2
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int traceDir00
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int traceDir01
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int traceDir10
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int traceDir11
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int traceDir20
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int traceDir21
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool isColl00
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool const bool isColl01
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool const bool const bool isColl10
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool const bool const bool const bool isColl11
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool const bool const bool const bool const bool isColl20
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool const bool const bool const bool const bool const bool isColl21
 
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool const bool const bool const bool const bool const bool const bool const bool const bool endPtsColl2
 
const unsigned int nm2 = sizeParam3D.nm2()
 
const unsigned int tnq01 = sizeParam3D.nq01()
 
const unsigned int tnq11 = sizeParam3D.nq11()
 
const unsigned int tnq20 = sizeParam3D.nq20()
 
const unsigned int tnq21 = sizeParam3D.nq21()
 
constexpr unsigned int nfaceN1
 
constexpr unsigned int nfaceN2
 
const unsigned int wsp0Size
 
const unsigned int wsp1Size
 
TData * s_twoOver2 = nullptr
 
const unsigned int nmTot = nm0 * nm1
 
constexpr bool COLLAPSED = IsCollapsedDir(SHAPE_TYPE, 1)
 
const unsigned int off1 = 2 * tnq00
 
const unsigned int joff1 = (DEFORMED) ? off1 : 2
 
const unsigned int wspIdx
 
const size_t elmtWspSize
 
TData * s_wsp = s_twoOver1 + (COLLAPSED ? nm1 : 0u) + elmtWspSize * wspIdx
 
TData * s_out
 
TData * s_vol = s_out + nmTot
 
constexpr bool COLLAPSED1 = IsCollapsedDir(SHAPE_TYPE, 1)
 
constexpr bool COLLAPSED2 = IsCollapsedDir(SHAPE_TYPE, 2)
 
const unsigned int fsz0 = tnq00 * tnq01
 
const unsigned int fsz1 = tnq10 * tnq11
 
const unsigned int fsz2 = tnq20 * tnq21
 
const unsigned int in1 = 2 * fsz0
 
const unsigned int jac1 = DEFORMED ? in1 : 2
 
const unsigned int in2 = in1 + nfaceN1 * fsz1
 
const unsigned int jac2 = jac1 + (DEFORMED ? nfaceN1 * fsz1 : nfaceN1)
 
TData * s_wsp0 = s_twoOver2 + (COLLAPSED2 ? nm2 : 0u) + elmtWspSize * wspIdx
 
TData * s_wsp1 = s_wsp0 + IProductWRTPhysTraceFaceModeBlockSize(sizeParam3D)
 
static constexpr unsigned int physLiftProjectDenseTailMaxPoints = 125u
 The most points per element the Device SumFacTOP implementation applies the StdInvMass form of a collapsed shape through the dense projector at (PhysLiftProjectDenseTail()): 125, order 4 on the default rules (5^3 points), the highest order it was measured at, where it is still 1.6 to 1.8 times faster than the sum-factorised kernel on GH200 and MI210. It is not tied to the block size: order 5 has 6^3 = 216 points, so any cap from 125 to 215 admits the same elements. The projector's cost per element grows as nqTot^2, against about nqTot^(4/3) for sum-factorisation, so the crossover lies above order 4; the cap moves there once it is measured.
 

Enumeration Type Documentation

◆ CGBndCondCoeffMapSet

Enumerator
Full 
UniqueAndGroups 

Definition at line 227 of file CGBndCondMapBuilder.hpp.

◆ DerivZLayout

Which way round a homogeneous z-derivative maps its components.

Two of these are the same mapping read in opposite directions, the third leaves the components alone and the fourth crosses two of them over, so one parameter covers all four.

Enumerator
ScalarToVectorZ 

Component n of a scalar field to slot 3n + 2 of a vector, as PhysDeriv needs for the z entry of its gradient.

VectorZToScalar 

Component 3n + 2 of a vector, the z direction of variable n, to component n of a scalar, as IProductWRTDerivBase and Divergence need.

Identity 

Component n to component n, both sides scalar, as Laplacian and Helmholtz need for the weak z-Laplacian.

CurlZ 

The z part of a curl, \((-\partial_z f_y, \partial_z f_x, 0)\): component 1 to component 0 with a sign change and component 0 to component 1, both sides the same three-component vector, as CurlCurl needs for each of its two curls.

Definition at line 47 of file DerivZOpImpl.hpp.

48{
49 /// Component n of a scalar field to slot 3n + 2 of a vector, as PhysDeriv
50 /// needs for the z entry of its gradient.
52 /// Component 3n + 2 of a vector, the z direction of variable n, to
53 /// component n of a scalar, as IProductWRTDerivBase and Divergence need.
55 /// Component n to component n, both sides scalar, as Laplacian and
56 /// Helmholtz need for the weak z-Laplacian.
58 /// The z part of a curl, \f$(-\partial_z f_y, \partial_z f_x, 0)\f$:
59 /// component 1 to component 0 with a sign change and component 0 to
60 /// component 1, both sides the same three-component vector, as CurlCurl
61 /// needs for each of its two curls.
62 CurlZ,
63};
@ CurlZ
The z part of a curl, : component 1 to component 0 with a sign change and component 0 to component 1,...
@ VectorZToScalar
Component 3n + 2 of a vector, the z direction of variable n, to component n of a scalar,...
@ ScalarToVectorZ
Component n of a scalar field to slot 3n + 2 of a vector, as PhysDeriv needs for the z entry of its g...
@ Identity
Component n to component n, both sides scalar, as Laplacian and Helmholtz need for the weak z-Laplaci...

◆ ExpressionKernelIndex

The variants of the expression kernel that are compiled, in the order Apply() selects them: appending to or assigning the output, reading storage interleaved at width one or at the device warp size.

Enumerator
eAppendScalar 
eAssignScalar 
eAppendInterleaved 
eAssignInterleaved 
eNumExpressionKernels 

Definition at line 70 of file ExpressionBlockOpDeviceGenericHelper.hpp.

◆ PhysLiftProjectForm

How a block applies \(B M^{-1} B^{\mathsf T}\).

Enumerator
Pointwise 

As many modes as quadrature points: B is square, so \(B M^{-1} B^{\mathsf T} = (W J)^{-1}\), a pointwise scale by the quadrature weight and the Jacobian, affine or deformed.

StdInvMass 

Affine elements: the basis transpose, the standard inverse mass over the element's Jacobian and the backward transform.

ElmtInvMass 

Deformed elements: IProductWRTPhysTrace, IProductWRTBase, MultiplyByElmtInvMass with each element's own inverse mass, and BwdTrans, in sequence.

Definition at line 77 of file PhysLiftProjectBlockOp.hpp.

78{
79 /// As many modes as quadrature points: B is square, so
80 /// \f$B M^{-1} B^{\mathsf T} = (W J)^{-1}\f$, a pointwise scale by the
81 /// quadrature weight and the Jacobian, affine or deformed.
83 /// Affine elements: the basis transpose, the standard inverse mass over
84 /// the element's Jacobian and the backward transform.
86 /// Deformed elements: IProductWRTPhysTrace, IProductWRTBase,
87 /// MultiplyByElmtInvMass with each element's own inverse mass, and
88 /// BwdTrans, in sequence.
90};
@ StdInvMass
Affine elements: the basis transpose, the standard inverse mass over the element's Jacobian and the b...
@ Pointwise
As many modes as quadrature points: B is square, so , a pointwise scale by the quadrature weight and ...
@ ElmtInvMass
Deformed elements: IProductWRTPhysTrace, IProductWRTBase, MultiplyByElmtInvMass with each element's o...

◆ PhysLiftProjectKernel

Which of the Device fused kernels of the StdInvMass form a shared-memory size is for.

Enumerator
Fused 

The lift and the form with a diagonal standard inverse mass in one launch (PhysLiftProjectKernelLauncher()).

LiftBasisTranspose 

The lift and the basis transpose, before the dense product (PhysLiftProjectLiftBasisTransposeKernelLauncher()).

ScaleBwdTrans 

The scale and the backward transform, after it (PhysLiftProjectScaleBwdTransKernelLauncher()).

Definition at line 94 of file PhysLiftProjectBlockOp.hpp.

95{
96 /// The lift and the form with a diagonal standard inverse mass in one
97 /// launch (PhysLiftProjectKernelLauncher()).
98 Fused,
99 /// The lift and the basis transpose, before the dense product
100 /// (PhysLiftProjectLiftBasisTransposeKernelLauncher()).
102 /// The scale and the backward transform, after it
103 /// (PhysLiftProjectScaleBwdTransKernelLauncher()).
105};
@ ScaleBwdTrans
The scale and the backward transform, after it (PhysLiftProjectScaleBwdTransKernelLauncher()).
@ Fused
The lift and the form with a diagonal standard inverse mass in one launch (PhysLiftProjectKernelLaunc...
@ LiftBasisTranspose
The lift and the basis transpose, before the dense product (PhysLiftProjectLiftBasisTransposeKernelLa...

Function Documentation

◆ __LAUNCH_BOUNDS__() [1/6]

template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , bool DEFORMED, typename TTraceSizeParameter1D , typename TData , typename TthreadBlock , typename TUseSharedWsp , std::enable_if_t< std::is_same_v< Implementation, SumFac >, bool > Enable = true>
NEK_DEVICE_KERNEL void Nektar::MultiRegions::detail::__LAUNCH_BOUNDS__ ( (GetMaxThreadPerBlock< Implementation, TTraceSizeParameter1D >())  ) const

The one-dimensional lift: \(\langle \partial_n \phi, g \rangle\) over a segment's two vertices, one lane per element.

A segment's traces are points, so there is no trace quadrature to sum over, no tangential table and no trace Jacobian. What is left is the point evaluation

\[ out_p \mathrel{+}= \sum_{v=0,1} \partial h_p(\xi_v)\, F_v\, g_v , \]

with \(F_v\) the normal derivative factor at that vertex, which the data warehouse supplies as the single component of the factor array. A segment carries one factor per vertex whether or not it is deformed.

Template Parameters
SHAPE_TYPESeg; unread.
ImplementationSumFac.
DEFORMEDUnread: a segment carries one factor per vertex whatever its geometry.
TUseSharedWspType of useSharedMemoryWsp: bool, or a std::bool_constant SelectSharedWorkSpace() fixed.

◆ __LAUNCH_BOUNDS__() [2/6]

template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , bool DEFORMED, typename TTraceSizeParameter1D , typename TElmtsPerBlock , typename TData , typename TthreadBlock , typename TUseSharedWsp , std::enable_if_t< std::is_same_v< Implementation, SumFacTOP >, bool > Enable = true>
NEK_DEVICE_KERNEL void Nektar::MultiRegions::detail::__LAUNCH_BOUNDS__ ( (GetMaxThreadPerBlock< Implementation, TTraceSizeParameter1D >())  ) const

The one-dimensional lift: \(\langle \partial_n \phi, g \rangle\) over a segment's two vertices, one or several elements per thread block.

The TOP counterpart of the one-dimensional SumFac launcher: an element's threads share the volume points of the point evaluation

\[ out_p \mathrel{+}= \sum_{v=0,1} \partial h_p(\xi_v)\, F_v\, g_v . \]

Template Parameters
SHAPE_TYPESeg; unread.
ImplementationSumFacTOP.
DEFORMEDUnread: a segment carries one factor per vertex whatever its geometry.
TElmtsPerBlockSingleElmtPerBlock or MultipleElmtPerBlock.
TUseSharedWspType of useSharedMemoryWsp: bool, or a std::bool_constant SelectSharedWorkSpace() fixed.

References c, nm0, and threadBlock.

◆ __LAUNCH_BOUNDS__() [3/6]

template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , bool DEFORMED, typename TTraceSizeParameter2D , typename TData , typename TthreadBlock , typename TUseSharedWsp , std::enable_if_t< std::is_same_v< Implementation, SumFac >, bool > Enable = true>
NEK_DEVICE_KERNEL void Nektar::MultiRegions::detail::__LAUNCH_BOUNDS__ ( (GetMaxThreadPerBlock< Implementation, TTraceSizeParameter2D >())  ) const

All edges of one two-dimensional element: the two terms of the operator, one per element direction, accumulated in turn; one lane per element.

Which table carries the derivative is decided per term from the trace direction. A collapsed shape carries \(2/(1 - \eta_1)\) on its \(\eta_0\) term; that factor is singular at the collapsed apex, a quadrature point of the trace but never of the element, so the affected edge group goes into the volume workspace and is scaled there. The group normal to the collapsed direction sits at \(\eta_1 = -1\) where the factor is one, and is accumulated straight into the output.

Parameters
sizeParam2DVolume quadrature points per direction, nm0() and nm1(), and the trace quadrature points per direction, nq00() and nq10().
nbasis0,nbasis1eInterp tables \(h_p(\pm 1)\) per direction.
dnbasis0,dnbasis1Derivatives of nbasis0, nbasis1.
nelmtElements in the block, including padding.
elmtsPerBlockElements per thread block, one per lane; unused.
numDataInEntries per element of in.
numDataOutEntries per element of out (nm0 * nm1).
numDataJacEntries per element, per term, of jac: one slot per edge when regular, one per trace point when deformed.
jacCompStrideOffset, in entries, between the two terms' factor arrays.
tbasis0,tbasis1eInterp tables to the trace points.
dtbasis0,dtbasis1Derivatives of tbasis0, tbasis1.
tw0,tw1Trace quadrature weights per direction.
twoOver0,twoOver1\(2/(1 - \eta)\) at the element points per direction; direction 0 is never collapsed and its slot is null and unread.
jacFactor array of the block, term 0; term 1 sits jacCompStride further on.
useSharedMemoryWspStage the workspace in shmemptr, after the factor table, rather than in wsp.
wspStatic workspace of the block, holding the edge scratch and the volume buffer for every element; unused if useSharedMemoryWsp.
inPacked trace values of the block.
outVolume-shaped result of the block.
traceDir0,traceDir1Element direction each trace slot runs along.
appendAccumulate onto out instead of zeroing it first.
isColl0,isColl1Trace points of the direction-0 and direction-1 edges coincide with the volume points.
endPtsColl0,endPtsColl1Volume rule of direction 0 and direction 1 contains the domain endpoints.
shmemptrDynamic shared memory for the factor tables and, with useSharedMemoryWsp, the workspace.
threadBlockThread-block handle supplied by the launch macro.

◆ __LAUNCH_BOUNDS__() [4/6]

template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , bool DEFORMED, typename TTraceSizeParameter2D , typename TElmtsPerBlock , typename TData , typename TthreadBlock , typename TUseSharedWsp , std::enable_if_t< std::is_same_v< Implementation, SumFacTOP >, bool > Enable = true>
NEK_DEVICE_KERNEL void Nektar::MultiRegions::detail::__LAUNCH_BOUNDS__ ( (GetMaxThreadPerBlock< Implementation, TTraceSizeParameter2D >())  ) const

All edges of one two-dimensional element: the two terms of the operator, one per element direction, accumulated in turn; one or several elements per thread block.

The TOP counterpart of the two-dimensional SumFac launcher, with the same choice of derivative table per term and the same treatment of the collapsed factor: the \(\eta_0\) term's direction-0 edge group of a collapsed shape goes through the volume buffer and is scaled there. The element's volume is accumulated in the workspace and written out once.

The parameters are those of the SumFac launcher, elmtsPerBlock a SingleElmtPerBlock or MultipleElmtPerBlock; the intermediates live in the element's share of shmemptr after the factor table, and useSharedMemoryWsp and wsp go unread.

References FETCH_SHARED_MEMORY(), nm0, nm1, and shmemptr.

◆ __LAUNCH_BOUNDS__() [5/6]

template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , bool DEFORMED, typename TTraceSizeParameter3D , typename TData , typename TthreadBlock , typename TUseSharedWsp , std::enable_if_t< std::is_same_v< Implementation, SumFac >, bool > Enable = true>
NEK_DEVICE_KERNEL void Nektar::MultiRegions::detail::__LAUNCH_BOUNDS__ ( (GetMaxThreadPerBlock< Implementation, TTraceSizeParameter3D >())  ) const

All faces of one three-dimensional element: the three terms of the operator, one per element direction, accumulated in turn; one lane per element.

A face group normal to a collapsed direction sits at \(\eta = -1\), where that direction's factor is one, so group k drops the direction k factor; the groups that keep one go through the volume workspace and are scaled on the element's own points, away from the singular apex.

Parameters
sizeParam3DVolume quadrature points per direction and the trace quadrature points per face.
nbasis0,nbasis1,nbasis2eInterp tables \(h_p(\pm 1)\) per direction.
dnbasis0,dnbasis1,dnbasis2Derivatives of nbasis0, nbasis1, nbasis2.
nelmtElements in the block, including padding.
elmtsPerBlockElements per thread block, one per lane; unused.
numDataInEntries per element of in.
numDataOutEntries per element of out (nm0 * nm1 * nm2).
numDataJacEntries per element, per term, of jac: one slot per face when regular, one per trace point when deformed.
jacCompStrideOffset, in entries, between successive terms' factor arrays.
tbasis00,tbasis01,tbasis10,tbasis11,tbasis20,tbasis21eInterp tables to the trace points, per normal direction and tangential direction.
dtbasis00,dtbasis01,dtbasis10,dtbasis11,dtbasis20,dtbasis21Derivatives of tbasis00, tbasis01, tbasis10, tbasis11, tbasis20, tbasis21.
tw00,tw01,tw10,tw11,tw20,tw21Trace quadrature weights in the same order as tbasis00 to tbasis21.
twoOver0,twoOver1,twoOver2\(2/(1 - \eta)\) at the element points per direction; direction 0 is never collapsed and its slot is null and unread, as is any direction the shape does not collapse.
jacFactor array of the block, term 0; term d sits d * jacCompStride further on.
useSharedMemoryWspStage the workspace in shmemptr, after the factor tables, rather than in wsp.
wspStatic workspace of the block, holding the face mode block, the contraction scratch and the volume buffer for every element; unused if useSharedMemoryWsp.
inPacked trace values of the block.
outVolume-shaped result of the block.
traceDir00,traceDir01,traceDir10,traceDir11,traceDir20,traceDir21Element direction each trace slot runs along.
appendAccumulate onto out instead of zeroing it first.
isColl00,isColl01,isColl10,isColl11,isColl20,isColl21Trace points of each face's tangential directions coincide with the volume points.
endPtsColl0,endPtsColl1,endPtsColl2Volume rule of each direction contains the domain endpoints.
shmemptrDynamic shared memory for the factor tables and, with useSharedMemoryWsp, the workspace.
threadBlockThread-block handle supplied by the launch macro.

◆ __LAUNCH_BOUNDS__() [6/6]

template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , bool DEFORMED, typename TTraceSizeParameter3D , typename TElmtsPerBlock , typename TData , typename TthreadBlock , typename TUseSharedWsp , std::enable_if_t< std::is_same_v< Implementation, SumFacTOP >, bool > Enable = true>
NEK_DEVICE_KERNEL void Nektar::MultiRegions::detail::__LAUNCH_BOUNDS__ ( (GetMaxThreadPerBlock< Implementation, TTraceSizeParameter3D >())  ) const

All faces of one three-dimensional element: the three terms of the operator, one per element direction, accumulated in turn; one or several elements per thread block.

The TOP counterpart of the three-dimensional SumFac launcher, with the same choice of derivative table per term and the same treatment of the collapsed factors: group k drops the direction k factor, and the groups that keep one go through the volume buffer and are scaled there. Each group's faces go through the face cores one at a time, in and the factors offset to the face and the face's position within its direction passed as the window, so that the trace-mode buffer and the contraction scratch hold one face. The element's volume is accumulated in the workspace and written out once.

The parameters are those of the SumFac launcher, elmtsPerBlock a SingleElmtPerBlock or MultipleElmtPerBlock; the intermediates live in the element's share of shmemptr after the factor tables, and useSharedMemoryWsp and wsp go unread.

References FETCH_SHARED_MEMORY(), nfaceN1, nfaceN2, nm0, nm1, nm2, nmTot, Nektar::LibUtilities::ShapeTypeNumTraceInDir, shmemptr, tnq00, tnq01, tnq10, tnq11, tnq20, and tnq21.

◆ AddAdvection1DKernel()

template<bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::AddAdvection1DKernel ( const unsigned int  ncoord,
const unsigned int  nq0,
const simd_type *  advVel0_ptr,
const simd_type *  advVel1_ptr,
const simd_type *  advVel2_ptr,
const simd_type *  df_ptr,
simd_type *  deriv0,
simd_type *  out,
const typename simd_type::scalarType  scale 
)
static

Segment advection kernel: add the advection term to the scaled physical values of one element group.

A segment has a single reference direction, so the Cartesian derivative in coordinate direction \(k\) is \((\partial\xi_0/\partial x_k)\,\partial u/\partial\xi_0\), and no collapsed-coordinate factors are involved.

Template Parameters
DEFORMEDGeometry is deformed, so the derivative factors vary from point to point.
simd_typeSIMD vector type of the interleaved group.
Parameters
ncoordCoordinate dimension: how many velocity components and derivative factors are used.
nq0Quadrature points of the element.
advVel0_ptrVelocity component 0 at the quadrature points.
advVel1_ptrVelocity component 1; read only when ncoord > 1.
advVel2_ptrVelocity component 2; read only when ncoord > 2.
df_ptrDerivative factors \(\partial\xi_0/\partial x_k\). When the geometry is regular the kernel reads ncoord values for the whole element, df_ptr[k]; when it is deformed, df_ptr[i * ncoord + k] at point i.
deriv0Reference derivatives \(\partial u/\partial\xi_0\); unchanged.
[in,out]outIn: \(u\) at the quadrature points; out: \(\mathbf{V}\cdot\nabla u + \mathrm{scale}\,u\).
scaleReaction coefficient \(\lambda\).

Definition at line 129 of file LinAdvDiffReactionBlockOpSerialAVXSumFacKernels.hpp.

134{
135 simd_type vx, vy, vz, df0, df1, df2, d0;
136
137 // Precompute constant derivative factors.
138 if constexpr (!DEFORMED)
139 {
140 df0 = df_ptr[0];
141 if (ncoord > 1)
142 {
143 df1 = df_ptr[1];
144 }
145 if (ncoord > 2)
146 {
147 df2 = df_ptr[2];
148 }
149 }
150
151 // Apply metrics on all quad points.
152 for (unsigned int i = 0; i < nq0; ++i)
153 {
154 // Set deformed derivative factors.
155 if constexpr (DEFORMED)
156 {
157 df0 = df_ptr[i * ncoord];
158 if (ncoord > 1)
159 {
160 df1 = df_ptr[i * ncoord + 1];
161 }
162 if (ncoord > 2)
163 {
164 df2 = df_ptr[i * ncoord + 2];
165 }
166 }
167
168 // Get advection velocity.
169 vx = advVel0_ptr[i];
170 if (ncoord > 1)
171 {
172 vy = advVel1_ptr[i];
173 }
174 if (ncoord > 2)
175 {
176 vz = advVel2_ptr[i];
177 }
178
179 // Get derivatives.
180 d0 = deriv0[i];
181
182 // x-advection * scale.
183 simd_type adv = df0 * d0;
184 adv *= vx;
185
186 if (ncoord > 1)
187 {
188 simd_type tmp = df1 * d0;
189 adv.fma(vy, tmp);
190 }
191 if (ncoord > 2)
192 {
193 simd_type tmp = df2 * d0;
194 adv.fma(vz, tmp);
195 }
196
197 adv.fma(out[i], simd_type(scale));
198 out[i] = adv;
199 }
200}
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT out

References out.

◆ AddAdvection2DKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::AddAdvection2DKernel ( const unsigned int  ncoord,
const unsigned int  nq0,
const unsigned int  nq1,
const simd_type *  hfac0,
const simd_type *  hfac1,
const simd_type *  advVel0_ptr,
const simd_type *  advVel1_ptr,
const simd_type *  advVel2_ptr,
const simd_type *  df_ptr,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  out,
const typename simd_type::scalarType  scale 
)
static

Two-dimensional advection kernel: add the advection term to the scaled physical values of one element group.

For triangles the incoming derivatives are those of the collapsed coordinate system, so the kernel first applies the standard correction with the two factor tables – the direction-0 derivative is scaled by \(2/(1-\eta_1)\) and folded into the direction-1 derivative with weight \((1+\eta_0)/2\) – before the derivative factors take it to Cartesian space. Quadrilaterals skip that step. The derivative-factor block holds 2 * ncoord values per point (or per element, when the geometry is regular), ordered so that the entry for coordinate \(k\) and reference direction \(d\) is at 2 * k + d.

Template Parameters
SHAPE_TYPEQuad, Tri or NodalTri.
DEFORMEDGeometry is deformed.
simd_typeSIMD vector type of the interleaved group.
Parameters
ncoordCoordinate dimension (2, or 3 for a surface element embedded in three dimensions).
nq0,nq1Quadrature points per direction.
hfac0Collapsed-coordinate factor \((1+\eta_0)/2\), one value per direction-0 point; triangles only.
hfac1Collapsed-coordinate factor \(2/(1-\eta_1)\), one value per direction-1 point; triangles only.
advVel0_ptr,advVel1_ptrVelocity components 0 and 1.
advVel2_ptrVelocity component 2; read only when ncoord == 3.
df_ptrDerivative factors, laid out as described above.
deriv0,deriv1Reference derivatives; unchanged.
[in,out]outIn: \(u\) at the quadrature points; out: \(\mathbf{V}\cdot\nabla u + \mathrm{scale}\,u\).
scaleReaction coefficient \(\lambda\).

Definition at line 239 of file LinAdvDiffReactionBlockOpSerialAVXSumFacKernels.hpp.

246{
247 const auto ndf = 2 * ncoord;
248 simd_type vx, vy, vz, df0, df1, df2, df3, df4, df5, d0, d1, h0, h1;
249
250 // Precompute constant derivative factors.
251 if constexpr (!DEFORMED)
252 {
253 df0 = df_ptr[0];
254 df1 = df_ptr[1];
255 df2 = df_ptr[2];
256 df3 = df_ptr[3];
257 if (ncoord == 3)
258 {
259 df4 = df_ptr[4];
260 df5 = df_ptr[5];
261 }
262 }
263
264 // Apply metrics on all quad points.
265 for (unsigned int q = 0; q < nq1; ++q)
266 {
267 if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
268 SHAPE_TYPE == LibUtilities::NodalTri)
269 {
270 h1 = hfac1[q];
271 }
272 for (unsigned int p = 0; p < nq0; ++p)
273 {
274 unsigned int cnt = q * nq0 + p;
275
276 // Set deformed derivative factors.
277 if constexpr (DEFORMED)
278 {
279 df0 = df_ptr[cnt * ndf];
280 df1 = df_ptr[cnt * ndf + 1];
281 df2 = df_ptr[cnt * ndf + 2];
282 df3 = df_ptr[cnt * ndf + 3];
283 if (ncoord == 3)
284 {
285 df4 = df_ptr[cnt * ndf + 4];
286 df5 = df_ptr[cnt * ndf + 5];
287 }
288 }
289
290 // Get advection velocity.
291 vx = advVel0_ptr[cnt];
292 vy = advVel1_ptr[cnt];
293 if (ncoord == 3)
294 {
295 vz = advVel2_ptr[cnt];
296 }
297
298 // Get derivatives.
299 d0 = deriv0[cnt];
300 d1 = deriv1[cnt];
301
302 if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
303 SHAPE_TYPE == LibUtilities::NodalTri)
304 {
305 h0 = hfac0[p];
306 d0 *= h1;
307 d1.fma(d0, h0);
308 }
309
310 // x-advection * scale.
311 simd_type adv = df0 * d0;
312 adv.fma(df1, d1);
313 adv *= vx;
314
315 simd_type dy = df2 * d0;
316 dy.fma(df3, d1);
317
318 adv.fma(vy, dy);
319
320 if (ncoord == 3)
321 {
322 simd_type dz = df4 * d0;
323 dz.fma(df5, d1);
324
325 adv.fma(vz, dz);
326 }
327
328 adv.fma(out[cnt], simd_type(scale));
329 out[cnt] = adv;
330 }
331 }
332}
std::vector< double > p(NPUPPER)

References Nektar::LibUtilities::NodalTri, out, and Nektar::LibUtilities::Tri.

◆ AddAdvection3DKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::AddAdvection3DKernel ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
const simd_type *  hfac0,
const simd_type *  hfac1,
const simd_type *  hfac2,
const simd_type *  hfac3,
const simd_type *  advVel0_ptr,
const simd_type *  advVel1_ptr,
const simd_type *  advVel2_ptr,
const simd_type *  df_ptr,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  deriv2,
simd_type *  out,
const typename simd_type::scalarType  scale 
)
static

Three-dimensional advection kernel: add the advection term to the scaled physical values of one element group.

As in two dimensions, the collapsed-coordinate correction comes first, and which of the four factor tables enter depends on the shape: the hexahedron needs none; the prism uses hfac0 and hfac3; the pyramid adds hfac1; the tetrahedron uses all four. The derivative factors then take the corrected derivatives to Cartesian space. There is no coordinate-dimension argument – a three-dimensional element has coordinate dimension three, so the derivative-factor block is always nine values per point (or per element, when the geometry is regular), with the entry for coordinate \(k\) and reference direction \(d\) at 3 * k + d.

Template Parameters
SHAPE_TYPEHex, Tet, NodalTet, Prism, NodalPrism, Pyr or NodalPyr.
DEFORMEDGeometry is deformed.
simd_typeSIMD vector type of the interleaved group.
Parameters
nq0,nq1,nq2Quadrature points per direction.
hfac0\((1+\eta_0)/2\), per direction-0 point.
hfac1\((1+\eta_1)/2\), per direction-1 point.
hfac2\(2/(1-\eta_1)\), per direction-1 point.
hfac3\(2/(1-\eta_2)\), per direction-2 point.
advVel0_ptr,advVel1_ptr,advVel2_ptrVelocity components.
df_ptrDerivative factors, laid out as described above.
deriv0,deriv1,deriv2Reference derivatives; unchanged.
[in,out]outIn: \(u\) at the quadrature points; out: \(\mathbf{V}\cdot\nabla u + \mathrm{scale}\,u\).
scaleReaction coefficient \(\lambda\).

Definition at line 366 of file LinAdvDiffReactionBlockOpSerialAVXSumFacKernels.hpp.

376{
377 constexpr auto ndf = 9;
378 simd_type vx, vy, vz;
379 simd_type df0, df1, df2, df3, df4, df5, df6, df7, df8;
380 simd_type d0, d1, d2, h0, h1, h2, h3;
381
382 // Precompute constant derivative factors.
383 if constexpr (!DEFORMED)
384 {
385 df0 = df_ptr[0];
386 df1 = df_ptr[1];
387 df2 = df_ptr[2];
388 df3 = df_ptr[3];
389 df4 = df_ptr[4];
390 df5 = df_ptr[5];
391 df6 = df_ptr[6];
392 df7 = df_ptr[7];
393 df8 = df_ptr[8];
394 }
395
396 // Apply metrics on all quad points.
397 for (unsigned int r = 0; r < nq2; ++r)
398 {
399 if constexpr (SHAPE_TYPE != LibUtilities::Hex)
400 {
401 h3 = hfac3[r];
402 }
403
404 for (unsigned int q = 0; q < nq1; ++q)
405 {
406 if constexpr (SHAPE_TYPE == LibUtilities::Pyr ||
407 SHAPE_TYPE == LibUtilities::NodalPyr)
408 {
409 h1 = hfac1[q];
410 }
411 else if constexpr ((SHAPE_TYPE == LibUtilities::Tet) ||
412 (SHAPE_TYPE == LibUtilities::NodalTet))
413 {
414 h1 = hfac1[q];
415 h2 = hfac2[q];
416 }
417
418 for (unsigned int p = 0; p < nq0; ++p)
419 {
420 unsigned int cnt = r * nq0 * nq1 + q * nq0 + p;
421
422 // Set deformed derivative factors.
423 if constexpr (DEFORMED)
424 {
425 df0 = df_ptr[cnt * ndf];
426 df1 = df_ptr[cnt * ndf + 1];
427 df2 = df_ptr[cnt * ndf + 2];
428 df3 = df_ptr[cnt * ndf + 3];
429 df4 = df_ptr[cnt * ndf + 4];
430 df5 = df_ptr[cnt * ndf + 5];
431 df6 = df_ptr[cnt * ndf + 6];
432 df7 = df_ptr[cnt * ndf + 7];
433 df8 = df_ptr[cnt * ndf + 8];
434 }
435
436 // Get advection velocity.
437 vx = advVel0_ptr[cnt];
438 vy = advVel1_ptr[cnt];
439 vz = advVel2_ptr[cnt];
440
441 // Get derivatives.
442 d0 = deriv0[cnt];
443 d1 = deriv1[cnt];
444 d2 = deriv2[cnt];
445
446 // Chain-rule local to cartesian.
447 if constexpr ((SHAPE_TYPE == LibUtilities::Prism) ||
448 (SHAPE_TYPE == LibUtilities::NodalPrism))
449 {
450 h0 = hfac0[p];
451 d0 *= h3;
452 d2.fma(h0, d0);
453 }
454 else if constexpr (SHAPE_TYPE == LibUtilities::Pyr ||
455 SHAPE_TYPE == LibUtilities::NodalPyr)
456 {
457 h0 = hfac0[p];
458 d0 *= h3;
459 d1 *= h3;
460 d2.fma(h0, d0);
461 d2.fma(h1, d1);
462 }
463 else if constexpr ((SHAPE_TYPE == LibUtilities::Tet) ||
464 (SHAPE_TYPE == LibUtilities::NodalTet))
465 {
466 h0 = hfac0[p];
467 d0 *= h3;
468 d0 *= h2;
469 d1 *= h3;
470 d2.fma(h0, d0);
471 d2.fma(h1, d1);
472 d1.fma(h0, d0);
473 }
474
475 // Advection.
476 // u.dx
477 simd_type adv = df0 * d0;
478 adv.fma(df1, d1);
479 adv.fma(df2, d2);
480 adv *= vx;
481
482 // v.dy
483 simd_type dy = df3 * d0;
484 dy.fma(df4, d1);
485 dy.fma(df5, d2);
486 adv.fma(vy, dy);
487
488 // w.dz
489 simd_type dz = df6 * d0;
490 dz.fma(df7, d1);
491 dz.fma(df8, d2);
492 adv.fma(vz, dz);
493
494 adv.fma(out[cnt], simd_type(scale));
495 out[cnt] = adv;
496 }
497 }
498 }
499}

References Nektar::LibUtilities::Hex, Nektar::LibUtilities::NodalPrism, Nektar::LibUtilities::NodalPyr, Nektar::LibUtilities::NodalTet, out, Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, and Nektar::LibUtilities::Tet.

◆ AddEdgeN0ToVolKernel()

template<bool END_PTS_COLLOCATED0, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::AddEdgeN0ToVolKernel ( const unsigned  edg,
const unsigned  nedge,
const unsigned  tstride,
const unsigned  nm0,
const unsigned  nm1,
const simd_type *  nbasis,
const simd_type *  in,
simd_type *  out 
)
static

Leaf kernel, stage two in two dimensions: lift the results of a direction-0 normal edge into the volume field.

Applies \(\Lambda_{iq} \mathrel{+}= h_i(\pm 1)\, F_q\), the volume field being indexed nm0 * q + i. Under END_PTS_COLLOCATED0 the interpolation is a delta and the edge lands entirely in the boundary plane i = e * (nm0 - 1), the loop variable e being the position of the edge within its direction (0 lower, 1 upper) rather than its index within this call, which is why the caller passes absolute positions.

Template Parameters
END_PTS_COLLOCATED0Direction-0 volume rule contains the domain endpoints.
simd_typeSIMD vector type carrying one element per lane.
Parameters
edgPosition of the first edge within direction 0.
nedgeOne past the position of the last edge.
tstrideRow stride of nbasis, that is the number of traces direction 0 has.
nm0Volume quadrature points in direction 0.
nm1Volume quadrature points in direction 1.
nbasiseInterp table \(h_i(\pm 1)\) of direction 0.
inTrace-mode workspace written by IPWRTPhysEdgeKernel.
outVolume field of this element group, accumulated onto.

Definition at line 383 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

388{
389 if constexpr (END_PTS_COLLOCATED0)
390 {
391 for (unsigned e = edg, cnt = 0; e < nedge; ++e)
392 {
393 unsigned offset = e * (nm0 - 1);
394 for (unsigned q = 0; q < nm1; ++q, ++cnt)
395 {
396 out[nm0 * q + offset] += in[cnt];
397 }
398 }
399 }
400 else
401 {
402 for (unsigned e = edg, cnt = 0; e < nedge; ++e)
403 {
404 for (unsigned q = 0; q < nm1; ++q, ++cnt)
405 {
406 for (unsigned i = 0; i < nm0; ++i)
407 {
408 out[nm0 * q + i].fma(in[cnt], nbasis[i * tstride + e]);
409 }
410 }
411 }
412 }
413}
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT in

References e, in, nm0, nm1, and out.

◆ AddEdgeN1ToVolKernel()

template<bool END_PTS_COLLOCATED0, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::AddEdgeN1ToVolKernel ( const unsigned  edg,
const unsigned  nedge,
const unsigned  tstride,
const unsigned  nm0,
const unsigned  nm1,
const simd_type *  nbasis,
const simd_type *  in,
simd_type *  out 
)
static

Leaf kernel, stage two in two dimensions: lift the results of a direction-1 normal edge into the volume field.

The direction-1 twin of AddEdgeN0ToVolKernel: here the edge carries nm0 entries and the lift runs along direction 1, so under the endpoint fast path the whole edge lands in the row q = e * (nm1 - 1) and the general arm accumulates \(\Lambda_{iq} \mathrel{+}= h_q(\pm 1)\, F_i\).

Note
The template parameter is spelled END_PTS_COLLOCATED0 although it is the direction-1 flag that the callers pass; only the name is inherited from the direction-0 kernel.
Template Parameters
END_PTS_COLLOCATED0Direction-1 volume rule contains the domain endpoints, despite the name.
simd_typeSIMD vector type carrying one element per lane.
Parameters
edgPosition of the first edge within direction 1.
nedgeOne past the position of the last edge.
tstrideRow stride of nbasis, that is the number of traces direction 1 has.
nm0Volume quadrature points in direction 0.
nm1Volume quadrature points in direction 1.
nbasiseInterp table \(h_q(\pm 1)\) of direction 1.
inTrace-mode workspace written by IPWRTPhysEdgeKernel.
outVolume field of this element group, accumulated onto.

Definition at line 446 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

451{
452 if constexpr (END_PTS_COLLOCATED0)
453 {
454 for (unsigned e = edg, cnt = 0; e < nedge; ++e)
455 {
456 unsigned offset = e * nm0 * (nm1 - 1);
457 for (unsigned q = 0; q < nm0; ++q, ++cnt)
458 {
459 out[offset + q] += in[cnt];
460 }
461 }
462 }
463 else // project to interior
464 {
465 for (unsigned e = edg, cnt = 0; e < nedge; ++e)
466 {
467 for (unsigned q = 0; q < nm1; ++q)
468 {
469 simd_type val = nbasis[q * tstride + e];
470 for (unsigned i = 0; i < nm0; ++i)
471 {
472 out[nm0 * q + i].fma(in[cnt + i], val);
473 }
474 }
475 cnt += nm0;
476 }
477 }
478}

References e, in, nm0, nm1, and out.

◆ AddFaceN0ToVolKernel()

template<bool END_PTS_COLLOCATED0, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::AddFaceN0ToVolKernel ( const unsigned  fac,
const unsigned  nface,
const unsigned  tstride,
const unsigned  nm0,
const unsigned  nm1,
const unsigned  nm2,
const simd_type *  nbasis,
const simd_type *  in,
simd_type *  out 
)
static

Leaf kernel, stage two in three dimensions: lift the results of a direction-0 normal face into the volume field.

Applies \(\Lambda_{pqr} \mathrel{+}= h_p(\pm 1)\, F_{qr}\), the volume field being indexed r * nm0 * nm1 + q * nm0 + p. Under END_PTS_COLLOCATED0 the interpolation is a delta and the face lands entirely in the plane p = f * (nm0 - 1), f being the position of the face within its direction rather than its index within this call.

Template Parameters
END_PTS_COLLOCATED0Direction-0 volume rule contains the domain endpoints.
simd_typeSIMD vector type carrying one element per lane.
Parameters
facPosition of the first face within direction 0.
nfaceOne past the position of the last face.
tstrideRow stride of nbasis, that is the number of traces direction 0 has.
nm0,nm1,nm2Volume quadrature points per direction.
nbasiseInterp table \(h_p(\pm 1)\) of direction 0.
inTrace-mode workspace written by IPWRTPhysFaceKernel, nm1 * nm2 entries per face.
outVolume field of this element group, accumulated onto.

Definition at line 812 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

817{
818 if constexpr (END_PTS_COLLOCATED0)
819 {
820 unsigned nm01 = nm0 * nm1;
821 for (unsigned f = fac, cnt = 0; f < nface; ++f)
822 {
823 unsigned offset = f * (nm0 - 1);
824 for (unsigned r = 0; r < nm2; ++r)
825 {
826 unsigned outOffset = offset + nm01 * r;
827 for (unsigned q = 0; q < nm1; ++q, ++cnt)
828 {
829 out[outOffset + q * nm0] += in[cnt];
830 }
831 }
832 }
833 }
834 else
835 {
836 for (unsigned f = fac, cnt = 0; f < nface; ++f)
837 {
838 for (unsigned r = 0, ocnt = 0; r < nm2; ++r)
839 {
840 for (unsigned q = 0; q < nm1; ++q, ++cnt)
841 {
842 for (unsigned p = 0; p < nm0; ++p, ++ocnt)
843 {
844 out[ocnt].fma(in[cnt], nbasis[p * tstride + f]);
845 }
846 }
847 }
848 }
849 }
850}

References in, nm0, nm1, nm2, and out.

◆ AddFaceN1ToVolKernel()

template<bool END_PTS_COLLOCATED1, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::AddFaceN1ToVolKernel ( const unsigned  fac,
const unsigned  nface,
const unsigned  tstride,
const unsigned  nm0,
const unsigned  nm1,
const unsigned  nm2,
const simd_type *  nbasis,
const simd_type *  in,
simd_type *  out 
)
static

Leaf kernel, stage two in three dimensions: lift the results of a direction-1 normal face into the volume field.

The direction-1 twin of AddFaceN0ToVolKernel. The face carries nm0 * nm2 entries laid out face-local as r * nm0 + p, the endpoint fast path writes the plane q = f * (nm1 - 1), and the general arm accumulates \(\Lambda_{pqr} \mathrel{+}= h_q(\pm 1)\, F_{pr}\) over every q.

Note
The endpoint arm offsets by f * nm0 * (nm1 - 1), which is an output plane, while the general arm offsets its input by (f - fac) * nm0 * nm2: the trace-mode slabs are nm0 * nm2 apart and are counted from the first face of the call, not from position 0 of the direction.
Template Parameters
END_PTS_COLLOCATED1Direction-1 volume rule contains the domain endpoints.
simd_typeSIMD vector type carrying one element per lane.
Parameters
facPosition of the first face within direction 1.
nfaceOne past the position of the last face.
tstrideRow stride of nbasis, that is the number of traces direction 1 has.
nm0,nm1,nm2Volume quadrature points per direction.
nbasiseInterp table \(h_q(\pm 1)\) of direction 1.
inTrace-mode workspace written by IPWRTPhysFaceKernel, nm0 * nm2 entries per face.
outVolume field of this element group, accumulated onto.

Definition at line 885 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

890{
891 if constexpr (END_PTS_COLLOCATED1)
892 {
893 unsigned nm01 = nm0 * nm1;
894 for (unsigned f = fac, cnt = 0; f < nface; ++f)
895 {
896 unsigned offset = f * nm0 * (nm1 - 1);
897 for (unsigned r = 0; r < nm2; ++r)
898 {
899 unsigned outOffset = offset + nm01 * r;
900 for (unsigned p = 0; p < nm0; ++p, ++cnt)
901 {
902 out[outOffset + p] += in[cnt];
903 }
904 }
905 }
906 }
907 else
908 {
909 for (unsigned f = fac; f < nface; ++f)
910 {
911 // Offset of this face's data in the input. The collocated branch
912 // above uses f * nm0 * (nm1 - 1), but that is an offset into the
913 // *output*, picking the j = 0 or j = nm1 - 1 row. Here the face
914 // contributes nm0 * nm2 values, indexed by the directions
915 // tangential to dir 1.
916 unsigned offset = (f - fac) * nm0 * nm2;
917 for (unsigned r = 0, ocnt = 0; r < nm2; ++r)
918 {
919 unsigned cnt = r * nm0 + offset;
920 for (unsigned q = 0; q < nm1; ++q)
921 {
922 simd_type val = nbasis[q * tstride + f];
923 for (unsigned p = 0; p < nm0; ++p, ++ocnt)
924 {
925 out[ocnt].fma(in[cnt + p], val);
926 }
927 }
928 }
929 }
930 }
931}

References in, nm0, nm1, nm2, and out.

◆ AddFaceN2ToVolKernel()

template<bool END_PTS_COLLOCATED2, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::AddFaceN2ToVolKernel ( const unsigned  fac,
const unsigned  nface,
const unsigned  tstride,
const unsigned  nm0,
const unsigned  nm1,
const unsigned  nm2,
const simd_type *  nbasis,
const simd_type *  in,
simd_type *  out 
)
static

Leaf kernel, stage two in three dimensions: lift the results of a direction-2 normal face into the volume field.

The direction-2 twin of AddFaceN0ToVolKernel. The face carries nm0 * nm1 entries laid out face-local as q * nm0 + p, the endpoint fast path writes the plane r = f * (nm2 - 1), and the general arm accumulates \(\Lambda_{pqr} \mathrel{+}= h_r(\pm 1)\, F_{pq}\) over every r, advancing the input slab by nm0 * nm1 per face.

Template Parameters
END_PTS_COLLOCATED2Direction-2 volume rule contains the domain endpoints.
simd_typeSIMD vector type carrying one element per lane.
Parameters
facPosition of the first face within direction 2.
nfaceOne past the position of the last face.
tstrideRow stride of nbasis, that is the number of traces direction 2 has.
nm0,nm1,nm2Volume quadrature points per direction.
nbasiseInterp table \(h_r(\pm 1)\) of direction 2.
inTrace-mode workspace written by IPWRTPhysFaceKernel, nm0 * nm1 entries per face.
outVolume field of this element group, accumulated onto.

Definition at line 960 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

965{
966 if constexpr (END_PTS_COLLOCATED2)
967 {
968 for (unsigned f = fac, cnt = 0; f < nface; ++f)
969 {
970 unsigned offset = f * nm0 * nm1 * (nm2 - 1);
971 for (unsigned q = 0; q < nm1; ++q)
972 {
973 for (unsigned p = 0; p < nm0; ++p, ++cnt)
974 {
975 out[offset++] += in[cnt];
976 }
977 }
978 }
979 }
980 else
981 {
982 unsigned offset = 0;
983 for (unsigned f = fac; f < nface; ++f)
984 {
985 for (unsigned r = 0, ocnt = 0; r < nm2; ++r)
986 {
987 simd_type val = nbasis[r * tstride + f];
988
989 for (unsigned q = 0, cnt = 0; q < nm1; ++q)
990 {
991 for (unsigned p = 0; p < nm0; ++p, ++ocnt, ++cnt)
992 {
993 out[ocnt].fma(in[offset + cnt], val);
994 }
995 }
996 }
997 offset += nm0 * nm1;
998 }
999 }
1000}

References in, nm0, nm1, nm2, and out.

◆ Advection1DKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::Advection1DKernel ( const unsigned int  nq0,
const unsigned int  ncoord,
const simd_type *  df_ptr,
const simd_type *  advVel0_ptr,
const simd_type *  advVel1_ptr,
const simd_type *  advVel2_ptr,
simd_type *  deriv0,
simd_type *  out,
const typename simd_type::scalarType  scale 
)
static

1D advection finish: out = scale * du/dxi * sum_k df(k) V_k per quadrature point.

A segment has a single reference direction, so the velocity contraction reduces to scaling the one reference derivative by the k-th derivative factor and velocity component for each of the up to three coordinate directions of a possibly embedded segment.

Template Parameters
SHAPE_TYPEElement shape (segments only; unused).
APPENDAccumulate onto out instead of overwriting.
DEFORMEDRead per-point rather than per-element derivative factors.
simd_typeSIMD vector type; one element per lane.
Parameters
nq0Quadrature points per element.
ncoordCoordinate dimension, equal to the number of derivative factors per point.
df_ptrDerivative factors (ncoord per element group, or per point when deformed).
advVel0_ptrVelocity component 0 at the quadrature points.
advVel1_ptrVelocity component 1; read when ncoord >= 2.
advVel2_ptrVelocity component 2; read when ncoord == 3.
deriv0Reference-direction derivative du/dxi.
outOutput plane of nq0 vectors.
scaleScalar factor applied to the result.

Definition at line 96 of file AdvectionBlockOpSerialAVXSumFacKernels.hpp.

101{
102 simd_type df_tmp[3];
103
104 if constexpr (!DEFORMED)
105 {
106 // unroll very small loops
107 df_tmp[0] = df_ptr[0];
108 if (ncoord >= 2)
109 {
110 df_tmp[1] = df_ptr[1];
111 }
112 if (ncoord == 3)
113 {
114 df_tmp[2] = df_ptr[2];
115 }
116 }
117
118 for (unsigned int j = 0; j < nq0; ++j)
119 {
120 if constexpr (DEFORMED)
121 {
122 df_tmp[0] = df_ptr[j * ncoord]; // load 1x
123 if (ncoord >= 2)
124 {
125 df_tmp[1] = df_ptr[j * ncoord + 1]; // load 1x
126 }
127 if (ncoord == 3)
128 {
129 df_tmp[2] = df_ptr[j * ncoord + 2]; // load 1x
130 }
131 }
132
133 // Multiply by derivative factors
134 simd_type in, tmp;
135 in = deriv0[j]; // Load 1x
136 // Multiply by derivative factor, and Vx
137 tmp = df_tmp[0] * advVel0_ptr[j];
138 if (ncoord >= 2)
139 {
140 // Multiply by derivative factor, and Vy
141 tmp.fma(df_tmp[1], advVel1_ptr[j]);
142 }
143 if (ncoord == 3)
144 {
145 // Multiply by derivative factor, and Vz
146 tmp.fma(df_tmp[2], advVel2_ptr[j]);
147 }
148
149 if constexpr (APPEND)
150 {
151 out[j] += scale * in * tmp;
152 }
153 else
154 {
155 out[j] = scale * in * tmp;
156 }
157 }
158}

References in, and out.

◆ Advection2DKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::Advection2DKernel ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  ncoord,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  df_ptr,
const simd_type *  advVel0_ptr,
const simd_type *  advVel1_ptr,
const simd_type *  advVel2_ptr,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  out,
const typename simd_type::scalarType  scale 
)
static

2D advection finish: chain-rule the tensor-direction derivatives into Cartesian ones and contract with the velocity, out = scale * sum_k V_k sum_d df(k,d) du/dxi_d per point.

For triangles the tensor directions are the collapsed coordinates: d0 is multiplied by f1[j] = 2/(1 - eta_1) and d1 augmented by d0 * f0[i] with f0[i] = (1 + eta_0)/2, recovering the standard-coordinate derivatives before the derivative factors are applied. With ncoord == 3 the element is embedded in three-dimensional space and a third factor/velocity pair contributes.

Template Parameters
SHAPE_TYPEElement shape; selects the collapsed-coordinate correction.
APPENDAccumulate onto out instead of overwriting.
DEFORMEDRead per-point rather than per-element derivative factors.
simd_typeSIMD vector type; one element per lane.
Parameters
nq0Quadrature points in direction 0.
nq1Quadrature points in direction 1.
ncoordCoordinate dimension, i.e. number of gradient/velocity components (2 or 3).
f0Collapsed-coordinate factor (1 + eta_0)/2 at the direction-0 points (triangles only).
f1Collapsed-coordinate factor 2/(1 - eta_1) at the direction-1 points (triangles only).
df_ptrDerivative factors (2 * ncoord per element group, or per point when deformed).
advVel0_ptrVelocity component 0 at the quadrature points.
advVel1_ptrVelocity component 1 at the quadrature points.
advVel2_ptrVelocity component 2; read when ncoord == 3.
deriv0Tensor-direction-0 derivative of the group.
deriv1Tensor-direction-1 derivative of the group.
outOutput plane of nq0 * nq1 vectors.
scaleScalar factor applied to the result.

Definition at line 199 of file AdvectionBlockOpSerialAVXSumFacKernels.hpp.

206{
207 auto ndf = 2 * ncoord;
208 simd_type vx, vy, df_tmp[6];
209
210 if constexpr (!DEFORMED)
211 {
212 df_tmp[0] = df_ptr[0];
213 df_tmp[1] = df_ptr[1];
214 df_tmp[2] = df_ptr[2];
215 df_tmp[3] = df_ptr[3];
216
217 if (ncoord == 3)
218 {
219 df_tmp[4] = df_ptr[4];
220 df_tmp[5] = df_ptr[5];
221 }
222 }
223
224 for (unsigned int j = 0, cnt_ji = 0; j < nq1; ++j)
225 {
226 simd_type xfrm1;
227 if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
228 SHAPE_TYPE == LibUtilities::NodalTri)
229 {
230 xfrm1 = f1[j]; // Load 1x
231 }
232
233 for (unsigned int i = 0; i < nq0; ++i, ++cnt_ji)
234 {
235 simd_type d0, d1;
236 d0 = deriv0[cnt_ji]; // Load 1x
237 d1 = deriv1[cnt_ji]; // Load 1x
238
239 // Get advection velocity.
240 vx = advVel0_ptr[cnt_ji];
241 vy = advVel1_ptr[cnt_ji];
242
243 if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
244 SHAPE_TYPE == LibUtilities::NodalTri)
245 {
246 // Moving from collapsed to standard coordinates
247 simd_type xfrm0 = f0[i]; // Load 1x
248 d0 *= xfrm1;
249 d1.fma(d0, xfrm0);
250 }
251
252 if constexpr (DEFORMED)
253 {
254 df_tmp[0] = df_ptr[cnt_ji * ndf];
255 df_tmp[1] = df_ptr[cnt_ji * ndf + 1];
256 df_tmp[2] = df_ptr[cnt_ji * ndf + 2];
257 df_tmp[3] = df_ptr[cnt_ji * ndf + 3];
258
259 if (ncoord == 3)
260 {
261 df_tmp[4] = df_ptr[cnt_ji * ndf + 4];
262 df_tmp[5] = df_ptr[cnt_ji * ndf + 5];
263 }
264 }
265
266 // Multiply by derivative factors
267 simd_type tmp, tmp0;
268 tmp = d0 * df_tmp[0]; // d0 * df0 + d1 * df1
269 tmp.fma(d1, df_tmp[1]);
270 // Multiply advection vel, Vx
271 tmp0 = tmp * vx;
272
273 tmp = d0 * df_tmp[2]; // d0 * df2 + d1 * df3
274 tmp.fma(d1, df_tmp[3]);
275 // Multiply advection vel, Vy
276 tmp0.fma(tmp, vy);
277
278 if (ncoord == 3)
279 {
280 simd_type vz = advVel2_ptr[cnt_ji];
281 tmp = d0 * df_tmp[4]; // d0 * df4 + d1 * df5
282 tmp.fma(d1, df_tmp[5]);
283 // Multiply advection vel, Vz
284 tmp0.fma(tmp, vz);
285 }
286
287 if constexpr (APPEND)
288 {
289 out[cnt_ji].fma(tmp0, scale);
290 }
291 else
292 {
293 out[cnt_ji] = tmp0 * scale;
294 }
295 }
296 }
297}

References Nektar::LibUtilities::NodalTri, out, and Nektar::LibUtilities::Tri.

◆ Advection3DKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::Advection3DKernel ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  f1m,
const simd_type *  f2,
const simd_type *  df_ptr,
const simd_type *  advVel0_ptr,
const simd_type *  advVel1_ptr,
const simd_type *  advVel2_ptr,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  deriv2,
simd_type *  out,
const typename simd_type::scalarType  scale 
)
static

3D advection finish: chain-rule the tensor-direction derivatives into Cartesian ones and contract with the velocity, out = scale * sum_k V_k sum_d df(k,d) du/dxi_d per point.

Hexahedra need no correction and ignore the factor tables. For the other shapes the tensor directions are the collapsed coordinates and are chain-ruled back to standard coordinates before the nine derivative factors are applied:

  • prisms scale d0 by f2[k] and add f0[i] * d0 to d2;
  • pyramids scale both d0 and d1 by f2[k] and add f0[i] * d0 + f1[j] * d1 to d2;
  • tetrahedra scale d0 by f1m[j] * f2[k] and d1 by f2[k], then add f0[i] * d0 to d1 and f0[i] * d0 + f1[j] * d1 to d2, where the d1 in the d2 term is the scaled value taken before that addition.

The factor arguments arrive in the push order of the block operator's table vector (m_f[0] .. m_f[3]), which pairs them with the parameter names as follows: f0 and f1 are the (1 + eta)/2 tabulations of directions 0 and 1, while f1m and f2 are the 2/(1 - eta) tabulations of directions 1 and 2. Note that f1 and f1m are therefore two different factors of the same direction, and that the parameter order is not the direction order.

Template Parameters
SHAPE_TYPEElement shape; selects the collapsed-coordinate correction.
APPENDAccumulate onto out instead of overwriting.
DEFORMEDRead per-point rather than per-element derivative factors.
simd_typeSIMD vector type; one element per lane.
Parameters
nq0Quadrature points in direction 0.
nq1Quadrature points in direction 1.
nq2Quadrature points in direction 2.
f0(1 + eta_0)/2 at the direction-0 points.
f1(1 + eta_1)/2 at the direction-1 points.
f1m2/(1 - eta_1) at the direction-1 points.
f22/(1 - eta_2) at the direction-2 points.
df_ptrDerivative factors (nine per element group, or per point when deformed).
advVel0_ptrVelocity component 0 at the quadrature points.
advVel1_ptrVelocity component 1 at the quadrature points.
advVel2_ptrVelocity component 2 at the quadrature points.
deriv0Tensor-direction-0 derivative of the group.
deriv1Tensor-direction-1 derivative of the group.
deriv2Tensor-direction-2 derivative of the group.
outOutput plane of nq0 * nq1 * nq2 vectors.
scaleScalar factor applied to the result.

Definition at line 350 of file AdvectionBlockOpSerialAVXSumFacKernels.hpp.

358{
359 constexpr auto ndf = 9;
360 simd_type vx, vy, vz, df_tmp[ndf];
361
362 if constexpr (!DEFORMED)
363 {
364 df_tmp[0] = df_ptr[0];
365 df_tmp[1] = df_ptr[1];
366 df_tmp[2] = df_ptr[2];
367 df_tmp[3] = df_ptr[3];
368 df_tmp[4] = df_ptr[4];
369 df_tmp[5] = df_ptr[5];
370 df_tmp[6] = df_ptr[6];
371 df_tmp[7] = df_ptr[7];
372 df_tmp[8] = df_ptr[8];
373 }
374
375 for (unsigned int k = 0, cnt_ijk = 0; k < nq2; ++k)
376 {
377 simd_type xfrm_eta2;
378 if constexpr (SHAPE_TYPE != LibUtilities::Hex)
379 {
380 xfrm_eta2 = f2[k];
381 }
382
383 for (unsigned int j = 0; j < nq1; ++j)
384 {
385 simd_type xfrm_eta1, xfrm;
386 if constexpr (SHAPE_TYPE == LibUtilities::Pyr ||
387 SHAPE_TYPE == LibUtilities::NodalPyr)
388 {
389 xfrm_eta1 = f1[j];
390 }
391 else if constexpr (SHAPE_TYPE == LibUtilities::Tet ||
392 SHAPE_TYPE == LibUtilities::NodalTet)
393 {
394 xfrm_eta1 = f1[j];
395 xfrm = f1m[j] * xfrm_eta2;
396 }
397
398 for (unsigned int i = 0; i < nq0; ++i, ++cnt_ijk)
399 {
400 simd_type d0, d1, d2;
401 d0 = deriv0[cnt_ijk];
402 d1 = deriv1[cnt_ijk];
403 d2 = deriv2[cnt_ijk];
404
405 // Get advection velocity.
406 vx = advVel0_ptr[cnt_ijk];
407 vy = advVel1_ptr[cnt_ijk];
408 vz = advVel2_ptr[cnt_ijk];
409
410 simd_type xfrm_eta0, tmp;
411
412 // Chain-rule to construct cartesian derivatives for non
413 // Hex shapes
414 if constexpr ((SHAPE_TYPE == LibUtilities::Prism) ||
415 (SHAPE_TYPE == LibUtilities::NodalPrism))
416 {
417 d0 *= xfrm_eta2;
418 xfrm_eta0 = f0[i];
419 d2.fma(xfrm_eta0, d0);
420 }
421 else if constexpr (SHAPE_TYPE == LibUtilities::Pyr ||
422 SHAPE_TYPE == LibUtilities::NodalPyr)
423 {
424 d0 *= xfrm_eta2;
425 d1 *= xfrm_eta2;
426 xfrm_eta0 = f0[i];
427 d2.fma(xfrm_eta0, d0);
428 d2.fma(xfrm_eta1, d1);
429 }
430 else if constexpr (SHAPE_TYPE == LibUtilities::Tet ||
431 SHAPE_TYPE == LibUtilities::NodalTet)
432 {
433 d0 *= xfrm;
434 xfrm_eta0 = f0[i] * d0;
435 tmp = d1 * xfrm_eta2;
436 d1 = xfrm_eta0 + tmp;
437 xfrm_eta0.fma(tmp, xfrm_eta1);
438 d2 += xfrm_eta0;
439 }
440
441 if constexpr (DEFORMED)
442 {
443 df_tmp[0] = df_ptr[cnt_ijk * ndf];
444 df_tmp[1] = df_ptr[cnt_ijk * ndf + 1];
445 df_tmp[2] = df_ptr[cnt_ijk * ndf + 2];
446 df_tmp[3] = df_ptr[cnt_ijk * ndf + 3];
447 df_tmp[4] = df_ptr[cnt_ijk * ndf + 4];
448 df_tmp[5] = df_ptr[cnt_ijk * ndf + 5];
449 df_tmp[6] = df_ptr[cnt_ijk * ndf + 6];
450 df_tmp[7] = df_ptr[cnt_ijk * ndf + 7];
451 df_tmp[8] = df_ptr[cnt_ijk * ndf + 8];
452 }
453
454 // Metric for eta_0, xi_1, eta_2
455 simd_type tmp0;
456 tmp = d0 * df_tmp[0];
457 tmp.fma(d1, df_tmp[1]);
458 tmp.fma(d2, df_tmp[2]);
459 // Multiply advection velocity, Vx
460 tmp0 = tmp * vx;
461
462 tmp = d0 * df_tmp[3];
463 tmp.fma(d1, df_tmp[4]);
464 tmp.fma(d2, df_tmp[5]);
465 // Multiply advection velocity, Vy
466 tmp0.fma(tmp, vy);
467
468 tmp = d0 * df_tmp[6];
469 tmp.fma(d1, df_tmp[7]);
470 tmp.fma(d2, df_tmp[8]);
471 // Multiply advection velocity, Vz
472 tmp0.fma(tmp, vz);
473
474 if constexpr (APPEND)
475 {
476 out[cnt_ijk].fma(scale, tmp0);
477 }
478 else
479 {
480 out[cnt_ijk] = scale * tmp0;
481 }
482 }
483 }
484 }
485}

References Nektar::LibUtilities::Hex, Nektar::LibUtilities::NodalPrism, Nektar::LibUtilities::NodalPyr, Nektar::LibUtilities::NodalTet, out, Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, and Nektar::LibUtilities::Tet.

◆ AdvectionDealiasCombineKernel()

template<typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::AdvectionDealiasCombineKernel ( const unsigned int  nqTot,
const unsigned int  ncoord,
const simd_type *  advVelPtr,
const unsigned int  advVelOffset,
const simd_type *  gradPtr,
const unsigned int  gradOffset,
simd_type *  out,
const typename simd_type::scalarType  scale 
)
static

Definition at line 43 of file AdvectionDealiasBlockOpSerialAVXSumFacKernels.hpp.

48{
49 for (unsigned int j = 0; j < nqTot; ++j)
50 {
51 simd_type tmp = advVelPtr[j] * gradPtr[j];
52 for (unsigned int d = 1; d < ncoord; ++d)
53 {
54 tmp.fma(advVelPtr[d * advVelOffset + j],
55 gradPtr[d * gradOffset + j]);
56 }
57
58 out[j] = scale * tmp;
59 }
60}

References out.

Referenced by Nektar::MultiRegions::detail::AdvectionDealiasBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), and Nektar::MultiRegions::detail::AdvectionDealiasBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply().

◆ AdvectionKernelLauncher() [1/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, typename TPhysSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::AdvectionKernelLauncher ( const TPhysSizeParameter1D  sizeParam1D,
const typename simd_type::scalarType *  D0,
const simd_type *  df_ptr,
const simd_type *  advVel0_ptr,
const simd_type *  advVel1_ptr,
const simd_type *  advVel2_ptr,
simd_type *  deriv0,
const simd_type *  in,
simd_type *  out,
const typename simd_type::scalarType  scale 
)
static

Advect one element group of a 1D block: tensor-product differentiation followed by Advection1DKernel.

Unpacks the size parameter – runtime or compile-time, both satisfying IsPhysSizeParameter1D_v as the static_assert enforces – forms du/dxi in deriv0 with PhysDerivTensor1DKernel and hands it to Advection1DKernel together with the group's derivative factors and velocity.

Template Parameters
SHAPE_TYPEElement shape.
APPENDAccumulate onto out.
DEFORMEDPer-point derivative factors.
TPhysSizeParameter1D1D physical-space size parameter (see ElmtHelper.hpp).
simd_typeSIMD vector type; one element per lane.
Parameters
sizeParam1DElement sizes: coordinate dimension and quadrature points.
D01D derivative matrix of the direction.
df_ptrDerivative factors of the group.
advVel0_ptrVelocity component 0 of the group.
advVel1_ptrVelocity component 1; read for embedded segments.
advVel2_ptrVelocity component 2; read for embedded segments.
deriv0Workspace for the reference derivative.
inInput values of the group.
outOutput values of the group.
scaleScalar factor applied to the result.

Definition at line 517 of file AdvectionBlockOpSerialAVXSumFacKernels.hpp.

523{
524 static_assert(IsPhysSizeParameter1D_v<TPhysSizeParameter1D>,
525 "Template argument must be either of type "
526 "NonTemplatedPhysSizeParameter1D or "
527 "TemplatedPhysSizeParameter1D.");
528
529 const unsigned int ncoord = sizeParam1D.ncoord();
530 const unsigned int nq0 = sizeParam1D.nq0();
531
532 // Get the basic derivative.
533 PhysDerivTensor1DKernel(nq0, in, D0, deriv0);
534
535 // Calculate physical derivative.
536 Advection1DKernel<SHAPE_TYPE, APPEND, DEFORMED>(
537 nq0, ncoord, df_ptr, advVel0_ptr, advVel1_ptr, advVel2_ptr, deriv0, out,
538 scale);
539}
static NEK_FORCE_INLINE void PhysDerivTensor1DKernel(const unsigned int nq0, const simd_type *in, const typename simd_type::scalarType *D0, simd_type *out_d0)

References in, out, and PhysDerivTensor1DKernel().

Referenced by Nektar::MultiRegions::detail::AdvectionBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl().

◆ AdvectionKernelLauncher() [2/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, typename TPhysSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::AdvectionKernelLauncher ( const TPhysSizeParameter2D  sizeParam2D,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  df_ptr,
const simd_type *  advVel0_ptr,
const simd_type *  advVel1_ptr,
const simd_type *  advVel2_ptr,
simd_type *  deriv0,
simd_type *  deriv1,
const simd_type *  in,
simd_type *  out,
const typename simd_type::scalarType  scale 
)
static

Advect one element group of a 2D block: tensor-product differentiation followed by Advection2DKernel.

As in 1D, with PhysDerivTensor2DKernel forming the two tensor-direction derivatives in deriv0 and deriv1 and Advection2DKernel applying the triangle collapsed-coordinate correction (through f0 and f1), the derivative factors and the velocity contraction.

Template Parameters
SHAPE_TYPEElement shape.
APPENDAccumulate onto out.
DEFORMEDPer-point derivative factors.
TPhysSizeParameter2D2D physical-space size parameter (see ElmtHelper.hpp).
simd_typeSIMD vector type; one element per lane.
Parameters
sizeParam2DElement sizes: coordinate dimension, which is 3 for elements embedded in three-dimensional space, and per-direction quadrature points.
D01D derivative matrix of direction 0.
D11D derivative matrix of direction 1.
f0Collapsed-coordinate factor of direction 0.
f1Collapsed-coordinate factor of direction 1.
df_ptrDerivative factors of the group.
advVel0_ptrVelocity component 0 of the group.
advVel1_ptrVelocity component 1 of the group.
advVel2_ptrVelocity component 2; read for embedded elements.
deriv0Workspace for the direction-0 derivative.
deriv1Workspace for the direction-1 derivative.
inInput values of the group.
outOutput values of the group.
scaleScalar factor applied to the result.

Definition at line 576 of file AdvectionBlockOpSerialAVXSumFacKernels.hpp.

584{
585 static_assert(IsPhysSizeParameter2D_v<TPhysSizeParameter2D>,
586 "Template argument must be either of type "
587 "NonTemplatedPhysSizeParameter2D or "
588 "TemplatedPhysSizeParameter2D.");
589
590 const unsigned int ncoord = sizeParam2D.ncoord();
591 const unsigned int nq0 = sizeParam2D.nq0();
592 const unsigned int nq1 = sizeParam2D.nq1();
593
594 // Get the basic derivative.
595 PhysDerivTensor2DKernel(nq0, nq1, in, D0, D1, deriv0, deriv1);
596
597 // Calculate physical derivative.
598 Advection2DKernel<SHAPE_TYPE, APPEND, DEFORMED>(
599 nq0, nq1, ncoord, f0, f1, df_ptr, advVel0_ptr, advVel1_ptr, advVel2_ptr,
600 deriv0, deriv1, out, scale);
601}
static NEK_FORCE_INLINE void PhysDerivTensor2DKernel(const unsigned int nq0, const unsigned int nq1, const simd_type *in, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, simd_type *out_d0, simd_type *out_d1, bool Deriv0=true, bool Deriv1=true)

References in, out, and PhysDerivTensor2DKernel().

◆ AdvectionKernelLauncher() [3/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, typename TPhysSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::AdvectionKernelLauncher ( const TPhysSizeParameter3D  sizeParam3D,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
const typename simd_type::scalarType *  D2,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  f1m,
const simd_type *  f2,
const simd_type *  df_ptr,
const simd_type *  advVel0_ptr,
const simd_type *  advVel1_ptr,
const simd_type *  advVel2_ptr,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  deriv2,
const simd_type *  in,
simd_type *  out,
const typename simd_type::scalarType  scale 
)
static

Advect one element group of a 3D block: tensor-product differentiation followed by Advection3DKernel.

Counterpart of the 2D overload for three-dimensional shapes; the size parameter carries no coordinate dimension, since a 3D element always has three. PhysDerivTensor3DKernel forms the three tensor-direction derivatives in deriv0 .. deriv2 and Advection3DKernel applies the shape-specific collapsed-coordinate correction (through f0 .. f2), the nine derivative factors and the velocity contraction.

Template Parameters
SHAPE_TYPEElement shape.
APPENDAccumulate onto out.
DEFORMEDPer-point derivative factors.
TPhysSizeParameter3D3D physical-space size parameter (see ElmtHelper.hpp).
simd_typeSIMD vector type; one element per lane.
Parameters
sizeParam3DElement sizes: per-direction quadrature points.
D01D derivative matrix of direction 0.
D11D derivative matrix of direction 1.
D21D derivative matrix of direction 2.
f0(1 + eta_0)/2 at the direction-0 points.
f1(1 + eta_1)/2 at the direction-1 points.
f1m2/(1 - eta_1) at the direction-1 points.
f22/(1 - eta_2) at the direction-2 points.
df_ptrDerivative factors of the group.
advVel0_ptrVelocity component 0 of the group.
advVel1_ptrVelocity component 1 of the group.
advVel2_ptrVelocity component 2 of the group.
deriv0Workspace for the direction-0 derivative.
deriv1Workspace for the direction-1 derivative.
deriv2Workspace for the direction-2 derivative.
inInput values of the group.
outOutput values of the group.
scaleScalar factor applied to the result.

Definition at line 642 of file AdvectionBlockOpSerialAVXSumFacKernels.hpp.

653{
654 static_assert(IsPhysSizeParameter3D_v<TPhysSizeParameter3D>,
655 "Template argument must be either of type "
656 "NonTemplatedPhysSizeParameter3D or "
657 "TemplatedPhysSizeParameter3D.");
658
659 const unsigned int nq0 = sizeParam3D.nq0();
660 const unsigned int nq1 = sizeParam3D.nq1();
661 const unsigned int nq2 = sizeParam3D.nq2();
662
663 // Get the basic derivative.
664 PhysDerivTensor3DKernel(nq0, nq1, nq2, in, D0, D1, D2, deriv0, deriv1,
665 deriv2);
666
667 // Calculate physical derivative.
668 Advection3DKernel<SHAPE_TYPE, APPEND, DEFORMED>(
669 nq0, nq1, nq2, f0, f1, f1m, f2, df_ptr, advVel0_ptr, advVel1_ptr,
670 advVel2_ptr, deriv0, deriv1, deriv2, out, scale);
671}
static NEK_FORCE_INLINE void PhysDerivTensor3DKernel(const unsigned int nq0, const unsigned int nq1, const unsigned int nq2, const simd_type *in, const typename simd_type::scalarType *D0, const typename simd_type::scalarType *D1, const typename simd_type::scalarType *D2, simd_type *out_d0, simd_type *out_d1, simd_type *out_d2, bool Deriv0=true, bool Deriv1=true, bool Deriv2=true)

References in, out, and PhysDerivTensor3DKernel().

◆ ApplyMetricKernel() [1/3]

template<typename ExecSpace , bool DEFORMED, bool VARCOEFF, typename TData , typename TScalar >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::ApplyMetricKernel ( const unsigned int  nqTot,
const unsigned int  ncoord,
const unsigned int  dimension,
const size_t  nelmt,
const size_t  insize,
const size_t  outsize,
const size_t  advelsize,
const TScalar *  diffCoeff,
const TData *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const TData *  jacptr,
const TData *  dfptr,
const TData *  advVel,
const TData *  inptr,
TData *  outptr,
TData *  bwdptr,
const TScalar  scale 
)
static

Apply the geometry and the three operator coefficients at every quadrature point of an interleaved group of elements.

Reading the reference-space derivatives \(\partial u/\partial\xi_d\) from inptr and the physical values \(u\) from bwdptr, the kernel produces

  • in bwdptr, the integrand of the advection and reaction terms, \(J\,(\mathbf{V}\cdot\nabla u + \mathrm{scale}\cdot u)\), where the Cartesian derivative is recovered by the chain rule \(\partial u/\partial x_k = \sum_d (\partial\xi_d/\partial x_k)\, \partial u/\partial\xi_d\) from dfptr; bwdptr is not read when scale is zero;
  • in outptr, one component per reference direction \(d\), the diffusion flux pulled back to that direction, \(J \sum_{l,k} (\partial\xi_d/\partial x_l)\, D_{lk}\, \partial u/\partial x_k\), ready for the inner product with the basis gradient.

outptr may alias inptr, as it does in the only caller: for a given point all of inptr's components are read into the local Cartesian derivatives before any component of outptr is written. When the geometry is regular the reference-space diffusion metric is constant over an element and is computed once, at the element's first point; when it is deformed it is recomputed per point. The fixed-size local arrays limit both ncoord and dimension to three.

Template Parameters
ExecSpaceExecution space of the calling block operator; not used by the body.
DEFORMEDGeometry is deformed, so the Jacobian and the derivative factors vary point by point.
TDataSIMD vector type of the interleaved group (a scalar type on the Serial space).
TScalarScalar element type of TData.
Parameters
nqTotQuadrature points per element.
ncoordCoordinate dimension: velocity components and rank of the diffusivity tensor.
dimensionReference-element dimension: number of derivative components in inptr and of flux components in outptr.
nelmtElement groups covered by this call (one, in the current caller).
insizeStride between the derivative components of inptr, in vectors.
outsizeStride between the flux components of outptr, in vectors.
advelsizeStride between the velocity components of advVel, in vectors.
diffCoeffConstant upper triangle of the symmetric diffusivity tensor, indexed through LibUtilities::GetDiffCoeffMap (see LinAdvDiffReactionOp::SetDiffCoeff).
varDiffCoeffVariable diffusion tensor (VARCOEFF).
jacptrJacobians: one value per point when deformed, one per element otherwise.
dfptrDerivative factors in point-major order, entry \(\partial\xi_d/\partial x_k\) at k * dimension + d within each point's (or, for regular geometry, each element's) block of ncoord * dimension values.
advVelAdvection velocity at the quadrature points, ncoord components.
inptrReference-space derivatives of \(u\), dimension components.
outptrDiffusion flux out, dimension components.
[in,out]bwdptrIn: \(u\) at the quadrature points; out: the advection-plus-reaction integrand.
scaleReaction coefficient \(\lambda\).

Definition at line 136 of file LinAdvDiffReactionBlockOpSerialAVXStdMatKernels.hpp.

144{
145 const auto nDiffCoeff = ncoord * (ncoord + 1) / 2;
146 TData coeff[6];
147 if constexpr (!VARCOEFF)
148 {
149 for (unsigned int c = 0; c < nDiffCoeff; ++c)
150 {
151 coeff[c] = diffCoeff[c];
152 }
153 }
154 const auto ndf = ncoord * dimension;
155
156 if constexpr (DEFORMED || VARCOEFF)
157 {
158 TData tmp[3], tmp0, metric[3];
159 for (size_t e = 0; e < nelmt; e++)
160 {
161 for (size_t i = 0; i < nqTot; i++)
162 {
163 const size_t idx = nqTot * e + i;
164 if constexpr (VARCOEFF)
165 {
166 for (unsigned int c = 0; c < nDiffCoeff; ++c)
167 {
168 coeff[c] = varDiffCoeff[c * varDiffCoeffSize + idx];
169 }
170 }
171 const auto dfindex = DEFORMED ? idx : e;
172 auto jac = jacptr[dfindex];
173
174 tmp0 = 0.0;
175 for (unsigned int k = 0; k < ncoord; ++k)
176 {
177 tmp[k] = dfptr[ndf * dfindex + k * dimension] * inptr[idx];
178 for (unsigned int d = 1; d < dimension; d++)
179 {
180 tmp[k].fma(dfptr[ndf * dfindex + k * dimension + d],
181 inptr[d * insize + idx]);
182 }
183 tmp0.fma(advVel[k * advelsize + idx], tmp[k]);
184 }
185
186 // Write. bwdptr is left unset when scale is zero.
187 if (scale != 0.0)
188 {
189 tmp0 += scale * bwdptr[idx];
190 }
191 bwdptr[idx] = tmp0 * jac;
192
193 // Compute metric.
194 for (unsigned int d = 0; d < dimension; d++)
195 {
196 for (unsigned int k = 0; k < ncoord; ++k)
197 {
198 metric[k] =
199 dfptr[ndf * dfindex + d] *
200 coeff[LibUtilities::GetDiffCoeffMap(ncoord, k)];
201 for (unsigned int l = 1; l < ncoord; ++l)
202 {
203 metric[k].fma(
204 dfptr[ndf * dfindex + l * dimension + d],
205 coeff[LibUtilities::GetDiffCoeffMap(
206 ncoord, l * ncoord + k)]);
207 }
208 }
209 tmp0 = metric[0] * tmp[0];
210 for (unsigned int k = 1; k < ncoord; k++)
211 {
212 tmp0.fma(metric[k], tmp[k]);
213 }
214
215 // Write.
216 outptr[d * outsize + idx] = tmp0 * jac;
217 }
218 }
219 }
220 }
221 else
222 {
223 TData tmp[3], tmp0, metric[9];
224 for (size_t e = 0; e < nelmt; e++)
225 {
226 auto jac = jacptr[e];
227 for (unsigned int i = 0; i < nqTot; i++)
228 {
229 auto idx = nqTot * e + i;
230 tmp0 = 0.0;
231 for (unsigned int k = 0; k < ncoord; ++k)
232 {
233 tmp[k] = dfptr[ndf * e + k * dimension] * inptr[idx];
234 for (unsigned int d = 1; d < dimension; d++)
235 {
236 tmp[k].fma(dfptr[ndf * e + k * dimension + d],
237 inptr[d * insize + idx]);
238 }
239 tmp0.fma(advVel[k * advelsize + nqTot * e + i], tmp[k]);
240 }
241
242 // Write. bwdptr is left unset when scale is zero.
243 if (scale != 0.0)
244 {
245 tmp0 += scale * bwdptr[idx];
246 }
247 bwdptr[idx] = tmp0 * jac;
248
249 // Compute metric.
250 for (unsigned int d = 0; d < dimension; d++)
251 {
252 if (i == 0)
253 {
254 for (unsigned int k = 0; k < ncoord; ++k)
255 {
256 metric[d * ncoord + k] =
257 dfptr[ndf * e + d] *
258 coeff[LibUtilities::GetDiffCoeffMap(ncoord, k)];
259 for (unsigned int l = 1; l < ncoord; ++l)
260 {
261 metric[d * ncoord + k].fma(
262 dfptr[ndf * e + l * dimension + d],
263 coeff[LibUtilities::GetDiffCoeffMap(
264 ncoord, l * ncoord + k)]);
265 }
266 }
267 }
268 tmp0 = metric[d * ncoord] * tmp[0];
269 for (unsigned int k = 1; k < ncoord; k++)
270 {
271 tmp0.fma(metric[d * ncoord + k], tmp[k]);
272 }
273
274 // Write.
275 outptr[d * outsize + idx] = tmp0 * jac;
276 }
277 }
278 }
279 }
280}
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT jac
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t nelmt
std::vector< double > d(NPUPPER *NPUPPER)

References c, e, Nektar::LibUtilities::GetDiffCoeffMap(), jac, and nelmt.

◆ ApplyMetricKernel() [2/3]

template<typename ExecSpace , bool DEFORMED, bool VARCOEFF, typename TData , typename TScalar >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::ApplyMetricKernel ( const unsigned int  nqTot,
const unsigned int  ncoord,
const unsigned int  dimension,
const size_t  nelmt,
const size_t  insize,
const size_t  outsize,
const TScalar *  diffCoeff,
const TData *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const TData *  jacptr,
const TData *  dfptr,
const TData *  inptr,
TData *  outptr 
)
static

Apply \(J\,G = J\,M^T D M\) to the reference derivatives of an element group.

With inptr holding the reference derivatives \(\partial u/\partial\xi_e\) (direction e at offset e * insize), the kernel writes to outptr, at offset d * outsize,

\[ J \sum_{k,l,e} M_{kd} \, D_{kl} \, M_{le} \, \frac{\partial u}{\partial\xi_e}, \]

the quantity LaplacianOp.hpp derives; in place is allowed and is how the block operator calls it. The two branches differ only in where the geometry is constant:

  • DEFORMED: the factors vary point by point, so per point the physical gradient tmp[k] is formed first and then contracted with the row \(\sum_l M_{ld} D_{lk}\) – one pass over the points, no metric stored;
  • regular: the full symmetric metric sum[d][k] is built once per element from the element's single set of factors and then applied to every point.

The diffusion tensor is read through GetDiffCoeffMap(), which maps a full index pair onto the packed storage described in LaplacianOp::SetDiffCoeff.

Template Parameters
ExecSpaceExecution space; unused, present for uniformity with the other kernels.
DEFORMEDBlock geometry is deformed.
TDataValue type the kernel computes in: the SIMD vector type of the interleaved element group, one lane per element.
TScalarScalar type of the diffusion tensor entries.
Parameters
nqTotQuadrature points per element.
ncoordCoordinate dimension: the range of the physical indices k, l.
dimensionReference dimension: the range of d, e.
nelmtElement groups covered by one call (1 from the block operator).
insizeStride between reference directions in inptr, in SIMD vectors.
outsizeStride between reference directions in outptr.
diffCoeffConstant symmetric diffusion tensor.
varDiffCoeffVariable diffusion tensor (VARCOEFF).
jacptrJacobians: one value per element group when regular, one per quadrature point when deformed.
dfptrDerivative factors in point-major order, as described in the block operator's m_dfptr.
inptrReference derivatives of the group.
outptrDestination; may alias inptr.

Definition at line 115 of file LaplacianBlockOpSerialAVXStdMatKernels.hpp.

121{
122 const auto nDiffCoeff = ncoord * (ncoord + 1) / 2;
123 TData coeff[6];
124 if constexpr (!VARCOEFF)
125 {
126 for (unsigned int c = 0; c < nDiffCoeff; ++c)
127 {
128 coeff[c] = diffCoeff[c];
129 }
130 }
131 const auto ndf = ncoord * dimension;
132
133 if constexpr (DEFORMED || VARCOEFF)
134 {
135 TData tmp[3], tmp0, metric[3];
136 for (size_t e = 0; e < nelmt; e++)
137 {
138 for (size_t i = 0; i < nqTot; i++)
139 {
140 const size_t idx = nqTot * e + i;
141 if constexpr (VARCOEFF)
142 {
143 for (unsigned int c = 0; c < nDiffCoeff; ++c)
144 {
145 coeff[c] = varDiffCoeff[c * varDiffCoeffSize + idx];
146 }
147 }
148 const auto dfindex = DEFORMED ? idx : e;
149 auto jac = jacptr[dfindex];
150
151 for (unsigned int k = 0; k < ncoord; ++k)
152 {
153 tmp[k] = dfptr[ndf * dfindex + k * dimension] * inptr[idx];
154 for (unsigned int d = 1; d < dimension; d++)
155 {
156 tmp[k].fma(dfptr[ndf * dfindex + k * dimension + d],
157 inptr[d * insize + idx]);
158 }
159 }
160
161 // Compute metric.
162 for (unsigned int d = 0; d < dimension; d++)
163 {
164 for (unsigned int k = 0; k < ncoord; ++k)
165 {
166 metric[k] =
167 dfptr[ndf * dfindex + d] *
168 coeff[LibUtilities::GetDiffCoeffMap(ncoord, k)];
169 for (unsigned int l = 1; l < ncoord; ++l)
170 {
171 metric[k].fma(
172 dfptr[ndf * dfindex + l * dimension + d],
173 coeff[LibUtilities::GetDiffCoeffMap(
174 ncoord, l * ncoord + k)]);
175 }
176 }
177 tmp0 = metric[0] * tmp[0];
178 for (unsigned int k = 1; k < ncoord; k++)
179 {
180 tmp0.fma(metric[k], tmp[k]);
181 }
182
183 // Write.
184 outptr[d * outsize + idx] = tmp0 * jac;
185 }
186 }
187 }
188 }
189 else
190 {
191 TData tmp[3], sum[9], metric[3];
192 for (size_t e = 0; e < nelmt; e++)
193 {
194 // Compute metric.
195 for (unsigned int d = 0; d < dimension; d++)
196 {
197 for (unsigned int k = 0; k < ncoord; ++k)
198 {
199 metric[k] = dfptr[ndf * e + d] *
200 coeff[LibUtilities::GetDiffCoeffMap(ncoord, k)];
201 for (unsigned int l = 1; l < ncoord; ++l)
202 {
203 metric[k].fma(dfptr[ndf * e + l * dimension + d],
204 coeff[LibUtilities::GetDiffCoeffMap(
205 ncoord, l * ncoord + k)]);
206 }
207 }
208 for (unsigned int k = 0; k < dimension; ++k)
209 {
210 sum[d * dimension + k] = metric[0] * dfptr[ndf * e + k];
211 for (unsigned int l = 1; l < ncoord; ++l)
212 {
213 sum[d * dimension + k].fma(
214 metric[l], dfptr[ndf * e + l * dimension + k]);
215 }
216 }
217 }
218
219 auto jac = jacptr[e];
220 for (unsigned int i = 0; i < nqTot; i++)
221 {
222 for (unsigned int d = 0; d < dimension; d++)
223 {
224 tmp[d] = sum[d * dimension] * inptr[nqTot * e + i];
225 for (unsigned int k = 1; k < dimension; k++)
226 {
227 tmp[d].fma(sum[d * dimension + k],
228 inptr[nqTot * e + i + k * insize]);
229 }
230 }
231
232 // Write.
233 for (unsigned int d = 0; d < dimension; d++)
234 {
235 outptr[d * outsize + nqTot * e + i] = tmp[d] * jac;
236 }
237 }
238 }
239 }
240}
std::map< int64_t, double > sum

References c, e, Nektar::LibUtilities::GetDiffCoeffMap(), jac, nelmt, and sum.

◆ ApplyMetricKernel() [3/3]

template<typename ExecSpace , bool DEFORMED, bool VARCOEFF, typename TData , typename TScalar >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::ApplyMetricKernel ( const unsigned int  nqTot,
const unsigned int  ncoord,
const unsigned int  dimension,
const size_t  nelmt,
const size_t  insize,
const size_t  outsize,
const TScalar *  diffCoeff,
const TData *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const TData *  jacptr,
const TData *  dfptr,
const TData *  inptr,
TData *  outptr,
TData *  bwdptr,
const TScalar  scale 
)
static

Apply the Jacobian, the derivative factors and the diffusion tensor to one group's reference derivatives, and scale its physical values by lambda * J.

With \(M_{kd} = \partial\xi_d/\partial x_k\) the derivative factors and \(D\) the packed symmetric diffusion tensor, the kernel writes, for every quadrature point,

\[ \mathrm{out}_d = J \sum_{e} G_{de} \frac{\partial u}{\partial \xi_e}, \qquad G_{de} = \sum_{k,l} M_{kd} D_{kl} M_{le}, \]

so that a subsequent inner product with the derivative of the basis yields the weak Laplacian term, and multiplies bwdptr in place by scale * J, so that an inner product with the basis yields the mass term; bwdptr is left untouched when scale is zero. The quadrature weights are not applied here – the standard-region inner-product matrices of the StdMat implementation already carry them.

The two branches differ only in where the geometry is read. On a deformed block the contraction is assembled per quadrature point, one factor at a time (first \(\partial u/\partial x_k\), then \(\sum_l M_{ld} D_{lk}\) against it). On a regular block \(M\) and \(J\) are constant within an element, so the full \(G\) is formed once per element and then applied at every point.

outptr may alias inptr – the block operator passes the same workspace for both, and every point's outputs are computed from that point's inputs before they are written.

Template Parameters
ExecSpaceExecution space of the calling implementation; part of the signature the call sites share, not used in the body.
DEFORMEDGeometry varies within an element.
TDataValue type the arrays are addressed as: one SIMD vector per quadrature point, holding that point's value for each element of the interleaved group.
TScalarScalar type of diffCoeff and scale.
Parameters
nqTotQuadrature points per element.
ncoordCoordinate dimension of the element.
dimensionDimension of the reference element.
nelmtElement groups covered by one call; the Serial/AVX block operator passes 1.
insizeStride between successive reference-derivative directions in inptr, in TData units.
outsizeSame, for outptr.
diffCoeffConstant symmetric diffusion tensor, indexed through LibUtilities::GetDiffCoeffMap().
varDiffCoeffVariable diffusion tensor (VARCOEFF).
jacptrJacobian: one value per element group, or one per quadrature point when DEFORMED.
dfptrDerivative factors, ncoord * dimension per element group – or per quadrature point when DEFORMED – with dfptr[k * dimension + d] = \(M_{kd}\).
inptrReference derivatives of the expansion, dimension planes of nqTot values.
outptrReceives \(J G \nabla_\xi u\), same layout.
bwdptrPhysical values of the expansion, scaled in place by scale * J unless scale is zero.
scaleMass-term weight, i.e. lambda.

Definition at line 129 of file HelmholtzBlockOpSerialAVXStdMatKernels.hpp.

136{
137 const auto nDiffCoeff = ncoord * (ncoord + 1) / 2;
138 TData coeff[6];
139 if constexpr (!VARCOEFF)
140 {
141 for (unsigned int c = 0; c < nDiffCoeff; ++c)
142 {
143 coeff[c] = diffCoeff[c];
144 }
145 }
146 const auto ndf = ncoord * dimension;
147
148 if constexpr (DEFORMED || VARCOEFF)
149 {
150 TData tmp[3], tmp0, metric[3];
151 for (size_t e = 0; e < nelmt; e++)
152 {
153 for (size_t i = 0; i < nqTot; i++)
154 {
155 const size_t idx = nqTot * e + i;
156 if constexpr (VARCOEFF)
157 {
158 for (unsigned int c = 0; c < nDiffCoeff; ++c)
159 {
160 coeff[c] = varDiffCoeff[c * varDiffCoeffSize + idx];
161 }
162 }
163 const auto dfindex = DEFORMED ? idx : e;
164 auto jac = jacptr[dfindex];
165
166 for (unsigned int k = 0; k < ncoord; ++k)
167 {
168 tmp[k] = dfptr[ndf * dfindex + k * dimension] * inptr[idx];
169 for (unsigned int d = 1; d < dimension; d++)
170 {
171 tmp[k].fma(dfptr[ndf * dfindex + k * dimension + d],
172 inptr[d * insize + idx]);
173 }
174 }
175
176 // Write. bwdptr is left unset when scale is zero.
177 if (scale != 0.0)
178 {
179 bwdptr[idx] *= scale * jac;
180 }
181
182 // Compute metric.
183 for (unsigned int d = 0; d < dimension; d++)
184 {
185 for (unsigned int k = 0; k < ncoord; ++k)
186 {
187 metric[k] =
188 dfptr[ndf * dfindex + d] *
189 coeff[LibUtilities::GetDiffCoeffMap(ncoord, k)];
190 for (unsigned int l = 1; l < ncoord; ++l)
191 {
192 metric[k].fma(
193 dfptr[ndf * dfindex + l * dimension + d],
194 coeff[LibUtilities::GetDiffCoeffMap(
195 ncoord, l * ncoord + k)]);
196 }
197 }
198 tmp0 = metric[0] * tmp[0];
199 for (unsigned int k = 1; k < ncoord; k++)
200 {
201 tmp0.fma(metric[k], tmp[k]);
202 }
203
204 // Write.
205 outptr[d * outsize + idx] = tmp0 * jac;
206 }
207 }
208 }
209 }
210 else
211 {
212 TData tmp[3], sum[9], metric[3];
213 for (size_t e = 0; e < nelmt; e++)
214 {
215 // Compute metric.
216 for (unsigned int d = 0; d < dimension; d++)
217 {
218 for (unsigned int k = 0; k < ncoord; ++k)
219 {
220 metric[k] = dfptr[ndf * e + d] *
221 coeff[LibUtilities::GetDiffCoeffMap(ncoord, k)];
222 for (unsigned int l = 1; l < ncoord; ++l)
223 {
224 metric[k].fma(dfptr[ndf * e + l * dimension + d],
225 coeff[LibUtilities::GetDiffCoeffMap(
226 ncoord, l * ncoord + k)]);
227 }
228 }
229 for (unsigned int k = 0; k < dimension; ++k)
230 {
231 sum[d * dimension + k] = metric[0] * dfptr[ndf * e + k];
232 for (unsigned int l = 1; l < ncoord; ++l)
233 {
234 sum[d * dimension + k].fma(
235 metric[l], dfptr[ndf * e + l * dimension + k]);
236 }
237 }
238 }
239
240 auto jac = jacptr[e];
241 for (unsigned int i = 0; i < nqTot; i++)
242 {
243 for (unsigned int d = 0; d < dimension; d++)
244 {
245 tmp[d] = sum[d * dimension] * inptr[nqTot * e + i];
246 for (unsigned int k = 1; k < dimension; k++)
247 {
248 tmp[d].fma(sum[d * dimension + k],
249 inptr[nqTot * e + i + k * insize]);
250 }
251 }
252
253 // Write.
254 for (unsigned int d = 0; d < dimension; d++)
255 {
256 outptr[d * outsize + nqTot * e + i] = tmp[d] * jac;
257 }
258 // bwdptr is left unset when scale is zero.
259 if (scale != 0.0)
260 {
261 bwdptr[nqTot * e + i] *= scale * jac;
262 }
263 }
264 }
265 }
266}

References c, e, Nektar::LibUtilities::GetDiffCoeffMap(), jac, nelmt, and sum.

◆ AssembleFromBndKernel()

template<typename ExecSpace , typename TData , std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Serial >||std::is_same_v< ExecSpace, NektarSpaces::AVX >, bool > Enable = true>
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::AssembleFromBndKernel ( const unsigned  nvals,
const unsigned *  nassemble,
const unsigned *  nbndvals,
const unsigned *  index,
const unsigned *  offset,
const int8_t *  sign,
const unsigned *  norder,
const TData *  bndptr,
TData *  inoutptr,
const unsigned int  streamID 
)
static

Complete the assembly of the parallel-boundary global DOFs from the received partial sums and scatter the result (Serial and AVX).

Final stage of the three-stage parallel flow, run once communication has finished. For each boundary DOF the received partial sums in bndptr are combined with the sum this rank parked in the DOF's first local slot during AssembleScatrBndKernel – re-multiplying that slot by its sign undoes the sign applied when it was stored – and the total is then scattered to all nassemble[idx] local copies.

The accumulation order is deliberate. The buffer slots of each DOF are sorted by ascending contributing rank, and norder[idx] is this rank's own position in that ordering, so the sum takes the lower-ranked contributions first, then this rank's partial sum, then the remainder. Every rank sharing the DOF therefore adds the same values in the same order and arrives at an identical assembled value, keeping the ranks consistent despite floating-point non-associativity.

The map layout is identical to AssembleScatrBndKernel: per DOF, local coefficient positions followed by buffer positions, never interleaved.

Template Parameters
ExecSpaceNektarSpaces::Serial or NektarSpaces::AVX (overload selected by enable_if).
TDataScalar type of the coefficient data.
Parameters
nvalsNumber of parallel-boundary global DOFs.
nassembleLocal copies per boundary DOF.
nbndvalsReceive-buffer slots per boundary DOF.
indexLocal-coefficient positions followed by buffer positions, per DOF.
offsetStart of each DOF's entries in index / sign.
signSign factors (see file documentation).
norderThis rank's position among the ranks sharing each DOF, i.e. how many buffer slots to accumulate before adding the local partial sum.
bndptrReceive buffer holding the other ranks' partial sums.
inoutptrCoefficient array; all local copies of each boundary DOF are overwritten with the assembled value.
streamIDUnused; host kernels run in submission order.

Definition at line 336 of file AssmbScatrSerialAVXKernels.hpp.

341{
342 for (unsigned idx = 0; idx < nvals; ++idx)
343 {
344 const unsigned ind = offset[idx];
345 const unsigned nidx = nassemble[idx];
346 const unsigned nbnd = nbndvals[idx];
347 const unsigned nord = norder[idx];
348
349 TData ass = 0;
350
351 // assemble bndptr components wtih local ids
352 for (unsigned j = 0; j < nord; ++j)
353 {
354 ass += bndptr[index[ind + nidx + j]];
355 }
356
357 // add in local point in rank ordered assembly
358 ass += inoutptr[index[ind]] * sign[ind];
359
360 // assemble rest of points from where we left off
361 for (unsigned j = nord; j < nbnd; ++j)
362 {
363 ass += bndptr[index[ind + nidx + j]];
364 }
365
366 // copy rank ordered assembled values back to local values
367 for (unsigned j = 0; j < nidx; ++j)
368 {
369 inoutptr[index[ind + j]] = ass * sign[ind + j];
370 }
371 }
372}
#define sign(a, b)
return the sign(b)*a
Definition Polylib.cpp:47

References sign.

◆ AssembleScatrBndKernel()

template<typename ExecSpace , typename TData , std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Serial >||std::is_same_v< ExecSpace, NektarSpaces::AVX >, bool > Enable = true>
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::AssembleScatrBndKernel ( const unsigned  nvals,
const unsigned *  nassemble,
const unsigned *  nbndvals,
const unsigned *  index,
const unsigned *  offset,
const int8_t *  sign,
TData *  inoutptr,
TData *  bndptr,
const unsigned int  streamID 
)
static

Partially assemble the parallel-boundary global DOFs and pack the partial sums into the communication send buffer (Serial and AVX).

First stage of the three-stage parallel flow (see the file documentation). For each global DOF shared with other ranks this kernel:

  1. gathers this rank's nassemble[idx] local copies into a partial sum held in the global sign convention;
  2. parks that sum in the first local slot only (multiplied by the slot's sign), where AssembleFromBndKernel later re-reads it – the remaining copies are deliberately left untouched until the final scatter;
  3. writes the raw partial sum, with no sign factor, into the nbndvals[idx] send-buffer slots, one per exchange entry with the neighbouring ranks sharing the DOF (exchanged values always travel in the global convention).

Per DOF, the first nassemble[idx] entries of index (from offset[idx]) address local coefficients in inoutptr and the next nbndvals[idx] entries address slots in bndptr. Unlike the interior AVX kernel, the boundary maps are never interleaved, so one scalar loop serves both host execution spaces.

Template Parameters
ExecSpaceNektarSpaces::Serial or NektarSpaces::AVX (overload selected by enable_if).
TDataScalar type of the coefficient data.
Parameters
nvalsNumber of parallel-boundary global DOFs.
nassembleLocal copies per boundary DOF; must be >= 1.
nbndvalsSend-buffer slots per boundary DOF.
indexLocal-coefficient positions followed by buffer positions, per DOF.
offsetStart of each DOF's entries in index / sign.
signSign factors (see file documentation).
inoutptrCoefficient array; only the first local slot of each boundary DOF is written.
bndptrSend buffer receiving the partial sums.
streamIDUnused; host kernels run in submission order.

Definition at line 259 of file AssmbScatrSerialAVXKernels.hpp.

264{
265 for (unsigned idx = 0; idx < nvals; ++idx)
266 {
267 const unsigned ind = offset[idx];
268 const unsigned nidx = nassemble[idx];
269 const unsigned nbnd = nbndvals[idx];
270
271 TData ass = inoutptr[index[ind]] * sign[ind];
272
273 for (unsigned j = 1; j < nidx; ++j)
274 {
275 ass += inoutptr[index[ind + j]] * sign[ind + j];
276 }
277
278 // keep one local copy for full assembly
279 inoutptr[index[ind]] = ass * sign[ind];
280
281 // put assembled values into boudnary array
282 for (unsigned j = 0; j < nbnd; ++j)
283 {
284 bndptr[index[ind + nidx + j]] = ass;
285 }
286 }
287}

References sign.

◆ AssembleScatrKernel()

template<typename ExecSpace , typename TData , std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::AVX >, bool > Enable = true>
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::AssembleScatrKernel ( const unsigned  nvals,
const unsigned *  nassemble,
const unsigned *  ind,
const unsigned *  offset,
const int8_t *  sign,
TData *  inoutptr,
const unsigned int  streamID 
)
static

Assemble and scatter the device-interior global DOFs; AVX variant reading SIMD-interleaved map data.

Assemble and scatter the device-interior global DOFs; serial variant reading contiguously packed map data.

Global DOFs are processed in blocks of vector_width (the SIMD lane count of TData in the AVX space). Within a block the map data is lane-interleaved: contribution j of the DOF handled by lane i sits at offset[idx + i] + j * vector_width, so consecutive lanes read consecutive index/sign entries. Each block spans vector_width times its largest valence, and all arrays are padded to a multiple of vector_width, so nvals itself need not be. The loops here are still scalar – the layout mirrors the warp-interleaved device format rather than exploiting intrinsics.

The first contribution of every lane is gathered before nassemble is consulted. This is safe on padding lanes (nassemble == 0) only because LocalToGlobalDataCreator guarantees that padded index slots duplicate a valid location (padded sign entries are additionally zeroed); the gathered value is discarded, since the write-back loop is bounded by nassemble. Genuine DOFs must have nassemble[idx] >= 1.

Template Parameters
ExecSpaceMust be NektarSpaces::AVX (overload selected by enable_if).
TDataScalar type of the coefficient data.
Parameters
nvalsNumber of global DOFs to process.
nassembleLocal copies per global DOF; zero on padding lanes.
indexInterleaved positions of the copies in inoutptr.
offsetStart of each DOF's entries in index / sign.
signInterleaved sign factors (see file documentation).
inoutptrCoefficient array, updated in place.
streamIDUnused; host kernels run in submission order.

With an interleave width of one, each global DOF's entries in ind and sign are stored back to back in DOF order, so the running counter cnt – the prefix sum of nassemble – equals offset[idx] at every step. The offset array is therefore accepted (to keep the signature shared with the AVX overload) but never read; this kernel silently relies on the packed layout staying equivalent to the offsets produced by LocalToGlobalDataCreator.

Template Parameters
ExecSpaceMust be NektarSpaces::Serial (overload selected by enable_if).
TDataScalar type of the coefficient data.
Parameters
nvalsNumber of global DOFs to process.
nassembleLocal copies per global DOF; must be >= 1 since the first copy is read before the count is checked.
indPositions of the copies in inoutptr, packed contiguously in DOF order.
offsetUnused (see above).
signSign factors (see file documentation).
inoutptrCoefficient array, updated in place.
streamIDUnused; host kernels run in submission order.

Definition at line 131 of file AssmbScatrSerialAVXKernels.hpp.

135{
136 constexpr unsigned int vector_width =
138 for (unsigned idx = 0; idx < nvals; idx += vector_width)
139 {
140 for (unsigned i = 0; i < vector_width; ++i)
141 {
142 TData ass =
143 inoutptr[index[offset[idx + i]]] * sign[offset[idx + i]];
144
145 // might be able to write this in a simd loop
146 // but not sure it will provide much asdditional speed.
147 for (unsigned j = 1; j < nassemble[idx + i]; ++j)
148 {
149 ass += inoutptr[index[offset[idx + i] + j * vector_width]] *
150 sign[offset[idx + i] + j * vector_width];
151 }
152
153 for (unsigned j = 0; j < nassemble[idx + i]; ++j)
154 {
155 inoutptr[index[offset[idx + i] + j * vector_width]] =
156 ass * sign[offset[idx + i] + j * vector_width];
157 }
158 }
159 }
160}

References sign.

◆ BuildCGBndCondCoeffMaps()

template<typename ExecSpace , typename TData , typename PerComponentFn >
CGBndCondCoeffMaps< TData > Nektar::MultiRegions::detail::BuildCGBndCondCoeffMaps ( const MultiRegions::ExpListSharedPtr &  expansionList,
const std::vector< std::string > &  components,
const SpatialDomains::BoundaryRegionCollection &  bregions,
const std::vector< std::vector< bool > > &  isTypeByRegion,
const std::vector< size_t > &  numBcExpCoeffs,
size_t  numBndCoeffCompSize,
const CGBndCondCoeffMapSet  mapSet,
PerComponentFn &&  perComponent 
)

Definition at line 314 of file CGBndCondMapBuilder.hpp.

321{
322 using MemSpace = typename ExecSpace::memory_space;
323 const unsigned int nComp = components.size();
324
326
327 auto domainBlocks =
328 MultiRegions::GetBlockAttributes<TData, FieldState::Coeff>(
329 expansionList, MultiRegions::UnitInterleaveWidths(expansionList));
330 std::vector<size_t> blockBound(domainBlocks.size());
331 size_t bound = 0;
332 for (unsigned int blk = 0; blk < domainBlocks.size(); ++blk)
333 {
334 const auto &block = domainBlocks[blk];
335 const auto ncoeff = block.GetNumData();
336 const auto nelmt = block.GetNumElements();
337 bound += nelmt * ncoeff;
338 blockBound[blk] = bound;
339 }
340
341 // Collect the compact type-to-full-boundary coefficient index map for
342 // one component. Boundary coefficients themselves are dynamic and are
343 // filled in by the caller's v_UpdateBndCoeffs().
344 std::vector<size_t> index(numBndCoeffCompSize);
345 std::vector<std::vector<size_t>> typeIndexByComp(nComp);
346 size_t bndcnt = 0, cnt = 0;
347 for (unsigned int i = 0; i < bregions.size(); ++i)
348 {
349 auto nBndExpCoeff = numBcExpCoeffs[i];
350
351 if (std::any_of(isTypeByRegion[i].begin(), isTypeByRegion[i].end(),
352 [](bool b) { return b; }))
353 {
354 for (size_t j = 0; j < nBndExpCoeff; ++j)
355 {
356 index[bndcnt + j] = cnt + j;
357 }
358 for (unsigned int nc = 0; nc < nComp; ++nc)
359 {
360 if (isTypeByRegion[i][nc])
361 {
362 for (size_t j = 0; j < nBndExpCoeff; ++j)
363 {
364 typeIndexByComp[nc].push_back(bndcnt + j);
365 }
366 }
367 }
368 bndcnt += nBndExpCoeff;
369 }
370 cnt += nBndExpCoeff;
371 }
372
373 ASSERTL1(bndcnt == numBndCoeffCompSize,
374 "The component size does not match the number of coefficients "
375 "for all boundary conditions of this type.")
376
377 result.signChange.resize(nComp, false);
378 result.compOffsets.assign(domainBlocks.size(),
379 std::vector<size_t>(nComp, 0));
380 result.compCounts.assign(domainBlocks.size(),
381 std::vector<size_t>(nComp, 0));
382 result.compUniqueOffsets.assign(domainBlocks.size(),
383 std::vector<size_t>(nComp, 0));
384 result.compUniqueCounts.assign(domainBlocks.size(),
385 std::vector<size_t>(nComp, 0));
386 result.compGroupOffsets.assign(domainBlocks.size(),
387 std::vector<size_t>(nComp, 0));
388 result.compGroupCounts.assign(domainBlocks.size(),
389 std::vector<size_t>(nComp, 0));
390
391 // Full set of entries (Dirichlet's view) -- every matching boundary
392 // trace coefficient, including duplicated targets.
393 std::vector<std::vector<size_t>> mapBlockByBlk(domainBlocks.size());
394 std::vector<std::vector<TData>> signBlockByBlk(domainBlocks.size());
395 std::vector<std::vector<size_t>> bndCoeffSrcBlockByBlk(domainBlocks.size());
396
397 // The same entries, partitioned into a unique-target subset and
398 // duplicate-target groups (Neumann's view) -- see
399 // CGBndCondCoeffMaps::uniqueMap/groupTarget for what these hold and why.
400 std::vector<std::vector<size_t>> uniqueMapBlockByBlk(domainBlocks.size());
401 std::vector<std::vector<TData>> uniqueSignBlockByBlk(domainBlocks.size());
402 std::vector<std::vector<size_t>> uniqueBndCoeffSrcBlockByBlk(
403 domainBlocks.size());
404
405 std::vector<std::vector<size_t>> groupTargetByBlk(domainBlocks.size());
406 std::vector<std::vector<size_t>> groupOffsetByBlk(domainBlocks.size());
407 std::vector<std::vector<size_t>> groupSrcByBlk(domainBlocks.size());
408 std::vector<std::vector<TData>> groupSignByBlk(domainBlocks.size());
409
410 auto expContField =
411 std::dynamic_pointer_cast<MultiRegions::ContField>(expansionList);
412 ASSERTL0(expContField, "A continuous boundary condition operator needs a "
413 "continuous expansion list.");
414
415 for (unsigned int nc = 0; nc < nComp; ++nc)
416 {
417 // Use the assembly map of this component's variable, not that of
418 // the expansion list's own variable: the components can have
419 // different boundary conditions, and so different Dirichlet degrees
420 // of freedom and boundary-to-local maps and signs read below. The
421 // lookup shares or builds each variable's map only once.
422 const MultiRegions::AssemblyMapCGSharedPtr &assmbMap =
423 expContField->GetLocalToGlobalMap(components[nc]);
424 auto &sign = assmbMap->GetBndCondCoeffsToLocalCoeffsSign();
425 auto &map = assmbMap->GetBndCondCoeffsToLocalCoeffsMap();
426 result.signChange[nc] = assmbMap->GetSignChange();
427
428 std::vector<std::tuple<size_t, size_t>> mapReordered;
429 mapReordered.reserve(typeIndexByComp[nc].size());
430 for (size_t idx : typeIndexByComp[nc])
431 {
432 mapReordered.push_back(std::make_tuple(idx, map[index[idx]]));
433 }
434 std::sort(mapReordered.begin(), mapReordered.end(),
435 [](std::tuple<size_t, size_t> const &t1,
436 std::tuple<size_t, size_t> const &t2) {
437 return std::tie(std::get<1>(t1), std::get<0>(t1)) <
438 std::tie(std::get<1>(t2), std::get<0>(t2));
439 });
440
441 std::vector<std::vector<size_t>> blockIndices(domainBlocks.size());
442 size_t cursor = 0;
443 for (unsigned int blk = 0; blk < domainBlocks.size(); ++blk)
444 {
445 while (cursor < mapReordered.size() &&
446 std::get<1>(mapReordered[cursor]) < blockBound[blk])
447 {
448 blockIndices[blk].push_back(cursor);
449 cursor++;
450 }
451 }
452
453 for (unsigned int blk = 0; blk < domainBlocks.size(); ++blk)
454 {
455 const size_t offset = (blk == 0) ? 0 : blockBound[blk - 1];
456 const size_t compOffset = mapBlockByBlk[blk].size();
457 const size_t compUniqueOffset = uniqueMapBlockByBlk[blk].size();
458 const size_t compGroupOffset = groupTargetByBlk[blk].size();
459 result.compOffsets[blk][nc] = compOffset;
460 result.compUniqueOffsets[blk][nc] = compUniqueOffset;
461 result.compGroupOffsets[blk][nc] = compGroupOffset;
462
463 const auto &blkIdx = blockIndices[blk];
464 mapBlockByBlk[blk].reserve(compOffset + blkIdx.size());
465 signBlockByBlk[blk].reserve(compOffset + blkIdx.size());
466 bndCoeffSrcBlockByBlk[blk].reserve(compOffset + blkIdx.size());
467 uniqueMapBlockByBlk[blk].reserve(compUniqueOffset + blkIdx.size());
468 uniqueSignBlockByBlk[blk].reserve(compUniqueOffset + blkIdx.size());
469 uniqueBndCoeffSrcBlockByBlk[blk].reserve(compUniqueOffset +
470 blkIdx.size());
471
472 // blkIdx is sorted by target local coefficient index, so any
473 // duplicate targets -- two boundary trace pieces of the same
474 // element sharing a vertex/edge -- form a contiguous run. Every
475 // entry always goes into the full map/sign/bndCoeffSrc (below);
476 // a run of length 1 (the overwhelming majority) additionally
477 // goes into the unique-target arrays, while longer runs are
478 // folded into one "group" entry instead, so a scatter-ADD
479 // consumer can sum their contributions locally and write them
480 // once, rather than racing an atomic_add.
481 size_t pos = 0;
482 while (pos < blkIdx.size())
483 {
484 const size_t target = std::get<1>(mapReordered[blkIdx[pos]]);
485 size_t runEnd = pos + 1;
486 while (runEnd < blkIdx.size() &&
487 std::get<1>(mapReordered[blkIdx[runEnd]]) == target)
488 {
489 ++runEnd;
490 }
491
492 for (size_t r = pos; r < runEnd; ++r)
493 {
494 const size_t idx = blkIdx[r];
495 mapBlockByBlk[blk].push_back(target - offset);
496 signBlockByBlk[blk].push_back(
497 result.signChange[nc]
498 ? sign[index[std::get<0>(mapReordered[idx])]]
499 : static_cast<TData>(1));
500 bndCoeffSrcBlockByBlk[blk].push_back(
501 std::get<0>(mapReordered[idx]) +
502 nc * numBndCoeffCompSize);
503 }
504
505 if (runEnd - pos == 1)
506 {
507 const size_t idx = blkIdx[pos];
508 uniqueMapBlockByBlk[blk].push_back(target - offset);
509 uniqueSignBlockByBlk[blk].push_back(
510 result.signChange[nc]
511 ? sign[index[std::get<0>(mapReordered[idx])]]
512 : static_cast<TData>(1));
513 uniqueBndCoeffSrcBlockByBlk[blk].push_back(
514 std::get<0>(mapReordered[idx]) +
515 nc * numBndCoeffCompSize);
516 }
517 else
518 {
519 groupTargetByBlk[blk].push_back(target - offset);
520 groupOffsetByBlk[blk].push_back(groupSrcByBlk[blk].size());
521 for (size_t r = pos; r < runEnd; ++r)
522 {
523 const size_t idx = blkIdx[r];
524 groupSignByBlk[blk].push_back(
525 result.signChange[nc]
526 ? sign[index[std::get<0>(mapReordered[idx])]]
527 : static_cast<TData>(1));
528 groupSrcByBlk[blk].push_back(
529 std::get<0>(mapReordered[idx]) +
530 nc * numBndCoeffCompSize);
531 }
532 }
533
534 pos = runEnd;
535 }
536
537 result.compCounts[blk][nc] = mapBlockByBlk[blk].size() - compOffset;
538 result.compUniqueCounts[blk][nc] =
539 uniqueMapBlockByBlk[blk].size() - compUniqueOffset;
540 result.compGroupCounts[blk][nc] =
541 groupTargetByBlk[blk].size() - compGroupOffset;
542 }
543 result.anySignChange = result.anySignChange || result.signChange[nc];
544
545 perComponent(nc, assmbMap, domainBlocks, blockBound);
546 }
547
548 const bool isFull = (mapSet == CGBndCondCoeffMapSet::Full);
549 if (isFull)
550 {
551 result.map.reserve(domainBlocks.size());
552 result.bndCoeff.reserve(domainBlocks.size());
553 result.bndCoeffSrc.reserve(domainBlocks.size());
554 if (result.anySignChange)
555 {
556 result.sign.reserve(domainBlocks.size());
557 }
558 }
559 else
560 {
561 result.uniqueMap.reserve(domainBlocks.size());
562 result.uniqueBndCoeff.reserve(domainBlocks.size());
563 result.uniqueBndCoeffSrc.reserve(domainBlocks.size());
564 result.groupTarget.reserve(domainBlocks.size());
565 result.groupOffset.reserve(domainBlocks.size());
566 result.groupSrc.reserve(domainBlocks.size());
567 result.groupValue.reserve(domainBlocks.size());
568 if (result.anySignChange)
569 {
570 result.uniqueSign.reserve(domainBlocks.size());
571 result.groupSign.reserve(domainBlocks.size());
572 }
573 }
574 for (unsigned int blk = 0; blk < domainBlocks.size(); ++blk)
575 {
576 ASSERTL1(mapBlockByBlk[blk].size() == bndCoeffSrcBlockByBlk[blk].size(),
577 "Mismatch between map and boundary coefficient sizes.");
578 if (isFull)
579 {
580 result.map.push_back(
581 LibUtilities::MemoryRegion<size_t>::template FromVector<
582 MemSpace, size_t>(mapBlockByBlk[blk]));
583 // bndCoeff[blk] is populated in full by CGBndCondGatherKernel on
584 // every UpdateBndCoeffs() call, so it does not need a zeroed
585 // starting value here.
586 result.bndCoeff.emplace_back(bndCoeffSrcBlockByBlk[blk].size());
587 result.bndCoeffSrc.push_back(
588 LibUtilities::MemoryRegion<size_t>::template FromVector<
589 MemSpace, size_t>(bndCoeffSrcBlockByBlk[blk]));
590 if (result.anySignChange)
591 {
592 result.sign.push_back(
593 LibUtilities::MemoryRegion<TData>::template FromVector<
594 MemSpace, TData>(signBlockByBlk[blk]));
595 }
596 }
597 else
598 {
599 result.uniqueMap.push_back(
600 LibUtilities::MemoryRegion<size_t>::template FromVector<
601 MemSpace, size_t>(uniqueMapBlockByBlk[blk]));
602 // uniqueBndCoeff[blk] is populated in full by
603 // CGBndCondGatherKernel on every UpdateBndCoeffs() call, same as
604 // bndCoeff above.
605 result.uniqueBndCoeff.emplace_back(
606 uniqueBndCoeffSrcBlockByBlk[blk].size());
607 result.uniqueBndCoeffSrc.push_back(
608 LibUtilities::MemoryRegion<size_t>::template FromVector<
609 MemSpace, size_t>(uniqueBndCoeffSrcBlockByBlk[blk]));
610 if (result.anySignChange)
611 {
612 result.uniqueSign.push_back(
613 LibUtilities::MemoryRegion<TData>::template FromVector<
614 MemSpace, TData>(uniqueSignBlockByBlk[blk]));
615 }
616
617 // Close off the group CSR with a trailing sentinel (the total
618 // number of grouped contributions), so group g's slice is always
619 // [groupOffset[g], groupOffset[g + 1]).
620 groupOffsetByBlk[blk].push_back(groupSrcByBlk[blk].size());
621
622 result.groupTarget.push_back(
623 LibUtilities::MemoryRegion<size_t>::template FromVector<
624 MemSpace, size_t>(groupTargetByBlk[blk]));
625 result.groupOffset.push_back(
626 LibUtilities::MemoryRegion<size_t>::template FromVector<
627 MemSpace, size_t>(groupOffsetByBlk[blk]));
628 result.groupSrc.push_back(
629 LibUtilities::MemoryRegion<size_t>::template FromVector<
630 MemSpace, size_t>(groupSrcByBlk[blk]));
631 // groupValue[blk] is gathered in full by CGBndCondGatherKernel on
632 // every UpdateBndCoeffs() call, same as bndCoeff above.
633 result.groupValue.emplace_back(groupSrcByBlk[blk].size());
634 if (result.anySignChange)
635 {
636 result.groupSign.push_back(
637 LibUtilities::MemoryRegion<TData>::template FromVector<
638 MemSpace, TData>(groupSignByBlk[blk]));
639 }
640 }
641 }
642
643 return result;
644}
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
STL namespace.
std::vector< LibUtilities::MemoryRegion< size_t > > groupOffset
std::vector< std::vector< size_t > > compUniqueOffsets
std::vector< LibUtilities::MemoryRegion< TData > > uniqueBndCoeff
std::vector< LibUtilities::MemoryRegion< size_t > > uniqueMap
std::vector< LibUtilities::MemoryRegion< TData > > groupSign
std::vector< LibUtilities::MemoryRegion< size_t > > map
std::vector< LibUtilities::MemoryRegion< size_t > > bndCoeffSrc
std::vector< std::vector< size_t > > compGroupCounts
std::vector< std::vector< size_t > > compOffsets
std::vector< LibUtilities::MemoryRegion< size_t > > uniqueBndCoeffSrc
std::vector< LibUtilities::MemoryRegion< TData > > sign
std::vector< LibUtilities::MemoryRegion< TData > > uniqueSign
std::vector< LibUtilities::MemoryRegion< TData > > bndCoeff
std::vector< LibUtilities::MemoryRegion< TData > > groupValue
std::vector< std::vector< size_t > > compUniqueCounts
std::vector< LibUtilities::MemoryRegion< size_t > > groupSrc
std::vector< std::vector< size_t > > compGroupOffsets
std::vector< LibUtilities::MemoryRegion< size_t > > groupTarget
std::vector< std::vector< size_t > > compCounts

References Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::anySignChange, ASSERTL0, ASSERTL1, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::bndCoeff, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::bndCoeffSrc, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::compCounts, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::compGroupCounts, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::compGroupOffsets, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::compOffsets, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::compUniqueCounts, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::compUniqueOffsets, Full, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::groupOffset, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::groupSign, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::groupSrc, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::groupTarget, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::groupValue, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::map, nelmt, sign, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::sign, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::signChange, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::uniqueBndCoeff, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::uniqueBndCoeffSrc, Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::uniqueMap, and Nektar::MultiRegions::detail::CGBndCondCoeffMaps< TData >::uniqueSign.

◆ BuildCGBndCondRegions()

template<typename ExecSpace , typename TData , typename IsMatchFn , typename OnMatchedRegionFn >
CGBndCondRegions< TData > Nektar::MultiRegions::detail::BuildCGBndCondRegions ( const MultiRegions::ExpListSharedPtr &  expansionList,
const std::vector< std::string > &  components,
const SpatialDomains::BoundaryRegionCollection &  bregions,
const SpatialDomains::BoundaryConditionCollection &  bconditions,
const std::string &  wspLabel,
std::vector< LibUtilities::Field< TData, FieldState::Phys > > &  wspPhys,
std::vector< LibUtilities::Field< TData, FieldState::Coeff > > &  wspCoeffs,
std::vector< std::shared_ptr< ExpressionOp< TData > > > &  expressionOps,
bool &  hasTimeDependentBndCoeffs,
IsMatchFn &&  isMatch,
OnMatchedRegionFn &&  onMatchedRegion 
)

Definition at line 95 of file CGBndCondMapBuilder.hpp.

106{
107 using MemSpace = typename ExecSpace::memory_space;
108 const unsigned int nComp = components.size();
109
110 auto session = expansionList->GetSession();
111 auto graph = expansionList->GetGraph();
112 unsigned int nhomo = 1;
113 session->LoadParameter("HomModesZ", nhomo, 1);
114
116
117 for (auto &it : bregions)
118 {
119 auto regionId = it.first;
120 auto collectionIter = bconditions.find(regionId);
121
122 ASSERTL1(collectionIter != bconditions.end(),
123 "Unable to locate collection " + std::to_string(regionId));
124
126 (*collectionIter).second;
127
128 // Note use just the first component as we are just looking for the
129 // boundary expansion list
130 auto conditionMapIter = bndCondMap->find(components[0]);
131
132 ASSERTL1(conditionMapIter != bndCondMap->end(),
133 "Unable to locate condition map.");
134
135 SpatialDomains::BoundaryConditionShPtr bc = (*conditionMapIter).second;
136
137 // Create boundary condition expansion
138 auto bcExpList =
140 session, *(it.second), graph, true, components[0], false,
141 bc->GetComm(), Collections::eNoImpType);
142
143 // Set data warehouse for device support operators
144 bcExpList->SetDataWarehouse();
145
146 // Save number of coefficients
147 result.numBcExpCoeffs.push_back(bcExpList->GetNcoeffs());
148
149 // Check if any component has a matching condition
150 bool hasMatch = false;
151 std::vector<bool> isMatchComp(nComp);
152 for (unsigned int nc = 0; nc < nComp; nc++)
153 {
154 auto cndMapIter = bndCondMap->find(components[nc]);
155 bc = (*cndMapIter).second;
156 bool tmp = isMatch(bc);
157
158 isMatchComp[nc] = tmp;
159 hasMatch = hasMatch || tmp;
160 hasTimeDependentBndCoeffs =
161 hasTimeDependentBndCoeffs || (tmp && bc->IsTimeDependent());
162 }
163
164 result.isTypeByRegion.push_back(isMatchComp);
165
166 // Skip, if no matching condition in this boundary region
167 if (!hasMatch)
168 {
169 continue;
170 }
171
172 // Create fields for evaluating BCs into, at width 1: their
173 // coefficients are copied out block by block as contiguous elements.
174 const auto ones = MultiRegions::UnitInterleaveWidths(bcExpList);
175 auto blocks_phys =
176 MultiRegions::GetBlockAttributes<TData, FieldState::Phys>(bcExpList,
177 ones);
179 wspLabel + " phys", blocks_phys, nComp, nhomo));
180 auto blocks_coeffs =
181 MultiRegions::GetBlockAttributes<TData, FieldState::Coeff>(
182 bcExpList, ones);
184 wspLabel + " coeff", blocks_coeffs, nComp, nhomo));
185
186 // Compute number of boundary coefficients.
187 for (unsigned int blk = 0; blk < blocks_coeffs.size(); ++blk)
188 {
189 const auto ncoeff = blocks_coeffs[blk].GetNumData();
190 const auto nelmt = blocks_coeffs[blk].GetNumElements();
191 result.numBndCoeffCompSize += nelmt * ncoeff;
192 }
193
194 // Initialize memory regions
195 wspPhys.back().template Initialize<MemSpace>(0.0);
196 wspCoeffs.back().template Initialize<MemSpace>(0.0);
197
198 // Create operators for this boundary condition
199 expressionOps.push_back(ExpressionOp<TData>::Create(
200 bcExpList, components, ExecSpace::name));
201 expressionOps.back()->SetComponentMask(isMatchComp);
202
203 // Gather equations for each field/component
204 std::vector<LibUtilities::EquationSharedPtr> listOfEquations;
205 for (unsigned int nc = 0; nc < nComp; nc++)
206 {
207 auto cndMapIter = bndCondMap->find(components[nc]);
208 bc = (*cndMapIter).second;
209 listOfEquations.push_back(bc->GetEquation());
210 }
211
212 // Set boundary conditions for each component in this boundary region
213 expressionOps.back()->SetExpressions(listOfEquations);
214
215 onMatchedRegion(bcExpList);
216 }
217
218 return result;
219}
LibUtilities::SessionReaderSharedPtr session
SpatialDomains::MeshGraphSharedPtr graph
A Field represents expansion data to be operated on.
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
std::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
Definition Conditions.h:251
std::shared_ptr< BoundaryConditionMap > BoundaryConditionMapShPtr
Definition Conditions.h:257
std::vector< std::vector< bool > > isTypeByRegion

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL1, Nektar::Collections::eNoImpType, graph, Nektar::MultiRegions::detail::CGBndCondRegions< TData >::isTypeByRegion, nelmt, Nektar::MultiRegions::detail::CGBndCondRegions< TData >::numBcExpCoeffs, Nektar::MultiRegions::detail::CGBndCondRegions< TData >::numBndCoeffCompSize, and session.

◆ BuildExpressionKernels()

template<typename TData >
void Nektar::MultiRegions::detail::BuildExpressionKernels ( ExpressionKernels &  kernels,
const std::string &  kernel_src 
)

Compile the generated source and retrieve the kernels from it, releasing the kernels compiled for any previous expression.

The four name expressions <APPEND, INTERLEAVEWIDTH, TData> for APPEND in {true, false} and INTERLEAVEWIDTH in {1, warp size}, with TData set by this operator's instantiation, are registered; the program is then compiled with NVRTC/HIPRTC, loaded as a driver module and the lowered names resolved into the kernel handles for the launch to use.

Template Parameters
TDataFloating-point type the kernels are compiled for.
Parameters
kernelsCompiled module and kernel handles, replaced.
kernel_srcSource from GetExpressionKernelSource().

Definition at line 230 of file ExpressionBlockOpDeviceGenericHIPCUDAHelper.hpp.

232{
234
235 // Create program.
236 nekrtcProgram prog;
237 CHECK_NEKRTC_ERROR(nekrtcCreateProgram(&prog, kernel_src.c_str(),
238 expressionKernelSourceName.c_str(),
239 0, nullptr, nullptr));
240
241 // Register specialisation.
242 const auto name_exprs = GetExpressionKernelNameExpressions<TData>();
243 for (const auto &name_expr : name_exprs)
244 {
245 CHECK_NEKRTC_ERROR(nekrtcAddNameExpression(prog, name_expr.c_str()));
246 }
247
248 // Compile program.
249 const char *opts[] = {"--std=c++17"};
251
252 // Load module.
253 size_t code_size;
254 CHECK_NEKRTC_ERROR(nekrtcGetCodeSize(prog, &code_size));
255 std::vector<char> code(code_size);
256 CHECK_NEKRTC_ERROR(nekrtcGetCode(prog, code.data()));
258 nekModuleLoadData(&kernels.nekModule, code.data()));
259
260 // Retrieve mangled name and register function.
261 for (unsigned int i = 0; i < eNumExpressionKernels; ++i)
262 {
263 const char *mangled_name;
265 nekrtcGetLoweredName(prog, name_exprs[i].c_str(), &mangled_name));
267 &kernels.kernels[i], kernels.nekModule, mangled_name));
268 }
270}
#define nekrtcCompileProgram
#define nekrtcAddNameExpression
#define nekrtcProgram
#define nekModuleGetFunction
#define nekrtcDestroyProgram
#define nekrtcGetCode
#define nekrtcGetLoweredName
#define CHECK_NEKRTC_ERROR(err)
#define nekrtcCreateProgram
#define nekrtcGetCodeSize
#define CHECK_HIPCUDA_DRIVER_ERROR(err)
#define nekModuleLoadData
void ReleaseExpressionKernels(ExpressionKernels &kernels)
Unload the module holding the compiled kernels, if any.
std::array< NEKfunction, eNumExpressionKernels > kernels
Kernel handles, in ExpressionKernelIndex order.

References CHECK_HIPCUDA_DRIVER_ERROR, CHECK_NEKRTC_ERROR, eNumExpressionKernels, Nektar::MultiRegions::detail::ExpressionKernels::kernels, Nektar::MultiRegions::detail::ExpressionKernels::nekModule, nekModuleGetFunction, nekModuleLoadData, nekrtcAddNameExpression, nekrtcCompileProgram, nekrtcCreateProgram, nekrtcDestroyProgram, nekrtcGetCode, nekrtcGetCodeSize, nekrtcGetLoweredName, nekrtcProgram, and ReleaseExpressionKernels().

◆ BwdTrans1DWorkspace()

static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::BwdTrans1DWorkspace ( LibUtilities::ShapeType  SHAPE_TYPE,
const unsigned int  nm0,
const unsigned int  nq0 
)
static

◆ BwdTrans2DWorkspace()

static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::BwdTrans2DWorkspace ( LibUtilities::ShapeType  SHAPE_TYPE,
const unsigned int  nm0,
const unsigned int  nm1,
const unsigned int  nq0,
const unsigned int  nq1,
unsigned int &  wsp0Size 
)
static

Grow wsp0Size to the workspace the 2D kernels need for the given shape and sizes.

Updates a running maximum so one workspace can be sized across several queries. Sizes are in SIMD vectors: quadrilaterals stage nm1 * nq0 direction-0 sums; triangles only nm0 per direction-1 point, the collapsed basis making the first stage per-point; nodal triangles additionally need room behind that for the modal-converted coefficients the launcher writes at offset nm0.

Parameters
SHAPE_TYPEShape of the block's elements.
nm0,nm1Modes per direction.
nq0,nq1Quadrature points per direction.
[in,out]wsp0SizeRaised to the required size if smaller.

Definition at line 102 of file BwdTransBlockOpSerialAVXSumFacKernels.hpp.

107{
108 if (SHAPE_TYPE == LibUtilities::Quad)
109 {
110 wsp0Size = std::max(wsp0Size, nm1 * nq0);
111 }
112 else if (SHAPE_TYPE == LibUtilities::Tri)
113 {
114 wsp0Size = std::max(wsp0Size, nm0);
115 }
116 else if (SHAPE_TYPE == LibUtilities::NodalTri)
117 {
118 const unsigned int nmTot =
119 LibUtilities::GetNumberOfCoefficients(SHAPE_TYPE, nm0, nm1);
120
121 wsp0Size = std::max(wsp0Size, nm0 + nmTot);
122 }
123}

References Nektar::LibUtilities::GetNumberOfCoefficients(), nm0, nm1, nmTot, Nektar::LibUtilities::NodalTri, Nektar::LibUtilities::Quad, Nektar::LibUtilities::Tri, and wsp0Size.

Referenced by Nektar::MultiRegions::detail::AdvectionDealiasBlockOpImpl< ExecSpace, Implementation, TData >::AdvectionDealiasBlockOpImpl(), Nektar::MultiRegions::detail::BwdTransBlockOpImpl< ExecSpace, Implementation, TData >::BwdTransBlockOpImpl(), Nektar::MultiRegions::detail::HelmholtzBlockOpImpl< ExecSpace, Implementation, TData >::HelmholtzBlockOpImpl(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::LaplacianBlockOpImpl(), Nektar::MultiRegions::detail::LinAdvDiffReactionBlockOpImpl< ExecSpace, Implementation, TData >::LinAdvDiffReactionBlockOpImpl(), Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::MassBlockOpImpl(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::SizeWorkspaces(), Nektar::MultiRegions::detail::PhysGalerkinProject1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::v_SetScaleFactor(), and Nektar::MultiRegions::detail::PhysInterp1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::v_SetScaleFactor().

◆ BwdTrans3DWorkspace()

static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::BwdTrans3DWorkspace ( LibUtilities::ShapeType  SHAPE_TYPE,
const unsigned int  nm0,
const unsigned int  nm1,
const unsigned int  nm2,
const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
unsigned int &  wsp0Size,
unsigned int &  wsp1Size 
)
static

Grow wsp0Size and wsp1Size to the workspaces the 3D kernels need for the given shape and sizes.

As BwdTrans2DWorkspace, in SIMD vectors and as running maxima. The two workspaces hold the intermediates of the first and second sum-factorisation stages respectively; for the nodal shapes wsp0 is enlarged to carry the modal-converted coefficients behind the first stage's own area.

Parameters
SHAPE_TYPEShape of the block's elements.
nm0,nm1,nm2Modes per direction.
nq0,nq1,nq2Quadrature points per direction.
[in,out]wsp0SizeRaised to the required size if smaller.
[in,out]wsp1SizeRaised to the required size if smaller.

Definition at line 141 of file BwdTransBlockOpSerialAVXSumFacKernels.hpp.

149{
150 if (SHAPE_TYPE == LibUtilities::Hex)
151 {
152 wsp0Size = std::max(wsp0Size, nq0 * nm1 * nm2);
153 wsp1Size = std::max(wsp1Size, nq0 * nq1 * nm2);
154 }
155 else if (SHAPE_TYPE == LibUtilities::Tet ||
156 SHAPE_TYPE == LibUtilities::Prism ||
157 SHAPE_TYPE == LibUtilities::Pyr)
158 {
159 wsp0Size = std::max(wsp0Size, nm0 * nm1);
160 wsp1Size = std::max(wsp1Size, nm0);
161 }
162 else if (SHAPE_TYPE == LibUtilities::NodalTet ||
163 SHAPE_TYPE == LibUtilities::NodalPrism ||
164 SHAPE_TYPE == LibUtilities::NodalPyr)
165 {
166 const unsigned int nmTot =
167 LibUtilities::GetNumberOfCoefficients(SHAPE_TYPE, nm0, nm1, nm2);
168 wsp0Size = std::max(wsp0Size, nm0 * nm1 + nmTot);
169 wsp1Size = std::max(wsp1Size, nm0);
170 }
171}

References Nektar::LibUtilities::GetNumberOfCoefficients(), Nektar::LibUtilities::Hex, nm0, nm1, nm2, nmTot, Nektar::LibUtilities::NodalPrism, Nektar::LibUtilities::NodalPyr, Nektar::LibUtilities::NodalTet, Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, Nektar::LibUtilities::Tet, wsp0Size, and wsp1Size.

Referenced by Nektar::MultiRegions::detail::AdvectionDealiasBlockOpImpl< ExecSpace, Implementation, TData >::AdvectionDealiasBlockOpImpl(), Nektar::MultiRegions::detail::BwdTransBlockOpImpl< ExecSpace, Implementation, TData >::BwdTransBlockOpImpl(), Nektar::MultiRegions::detail::HelmholtzBlockOpImpl< ExecSpace, Implementation, TData >::HelmholtzBlockOpImpl(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::LaplacianBlockOpImpl(), Nektar::MultiRegions::detail::LinAdvDiffReactionBlockOpImpl< ExecSpace, Implementation, TData >::LinAdvDiffReactionBlockOpImpl(), Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::MassBlockOpImpl(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::SizeWorkspaces(), Nektar::MultiRegions::detail::PhysGalerkinProject1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::v_SetScaleFactor(), and Nektar::MultiRegions::detail::PhysInterp1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::v_SetScaleFactor().

◆ BwdTransKernelLauncher() [1/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, typename TSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::BwdTransKernelLauncher ( const TSizeParameter1D  sizeParam1D,
const bool  isModified,
const typename simd_type::scalarType *  basis0,
const simd_type *  NtoM,
const simd_type *  in,
simd_type *  out 
)
static

1D dispatch: forward one element group's transform to the segment kernel.

Template Parameters
SHAPE_TYPEShape tag (segments only in 1D).
APPENDAccumulate onto out instead of overwriting.
TSizeParameter1D1D size parameter, in the runtime or the compile-time form; with the latter the sizes below are compile-time constants and the kernel's loops unroll.
simd_typeSIMD vector type; each vector holds one value of every element of the interleaved group.
Parameters
sizeParam1DModal and quadrature sizes of the expansion.
isModifiedFirst-direction basis is eModified_A; the segment kernel needs no correction, so unused.
basis01D basis table, basis0[p * nq0 + i] = mode p at point i.
NtoMNodal-to-modal matrix; no 1D nodal shape, so unused.
inInterleaved coefficients of the element group.
outInterleaved physical values of the group.

Definition at line 199 of file BwdTransBlockOpSerialAVXSumFacKernels.hpp.

203{
204 static_assert(IsSizeParameter1D_v<TSizeParameter1D>,
205 "Template argument must be either of type "
206 "NonTemplatedSizeParameter1D or TemplatedSizeParameter1D.");
207
208 const unsigned int nm0 = sizeParam1D.nm0();
209 const unsigned int nq0 = sizeParam1D.nq0();
210
211 BwdTransSegKernel<APPEND>(nm0, nq0, basis0, in, out);
212}

References in, nm0, and out.

Referenced by Nektar::MultiRegions::detail::BwdTransBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), and Nektar::MultiRegions::detail::PhysGalerkinProject1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl().

◆ BwdTransKernelLauncher() [2/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, typename TSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::BwdTransKernelLauncher ( const TSizeParameter2D  sizeParam2D,
const bool  isModified,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  basis1,
const simd_type *  NtoM,
simd_type *  wsp0,
const simd_type *  in,
simd_type *  out 
)
static

2D dispatch: select the quadrilateral or (nodal) triangular kernel for one element group at compile time.

For NodalTri the coefficients are first mapped to the modified modal basis by MatVecKernel with NtoM, using the tail of wsp0 beyond its first nm0 vectors as destination; the triangular kernel then runs on the converted coefficients. For Tri, isModified triggers the extra collapsed vertex-mode contribution inside BwdTransTriKernel.

Template Parameters
SHAPE_TYPEQuad, Tri or NodalTri.
APPENDAccumulate onto out instead of overwriting.
TSizeParameter2D2D size parameter, runtime or compile-time form.
simd_typeSIMD vector type of the interleaved group.
Parameters
sizeParam2DModal and quadrature sizes per direction.
isModifiedFirst-direction basis is eModified_A.
basis0Direction-0 basis table (nm0 rows of nq0).
basis1Direction-1 basis table; for triangles indexed by the combined (p,q) mode, one row per mode.
NtoMNodal-to-modal matrix (nodal shapes only).
wsp0Workspace sized by BwdTrans2DWorkspace.
inInterleaved coefficients of the element group.
outInterleaved physical values of the group.

Definition at line 243 of file BwdTransBlockOpSerialAVXSumFacKernels.hpp.

249{
250 static_assert(IsSizeParameter2D_v<TSizeParameter2D>,
251 "Template argument must be either of type "
252 "NonTemplatedSizeParameter2D or TemplatedSizeParameter2D.");
253
254 const unsigned int nm0 = sizeParam2D.nm0();
255 const unsigned int nm1 = sizeParam2D.nm1();
256 [[maybe_unused]] const unsigned int nmTot = sizeParam2D.nmTot();
257 const unsigned int nq0 = sizeParam2D.nq0();
258 const unsigned int nq1 = sizeParam2D.nq1();
259
260 if constexpr (SHAPE_TYPE == LibUtilities::NodalTri)
261 {
262 simd_type *in1 = wsp0 + nm0;
263
264 MatVecKernel(nmTot, NtoM, in, in1);
265 BwdTransTriKernel<APPEND>(nm0, nm1, nq0, nq1, isModified, basis0,
266 basis1, wsp0, in1, out);
267 }
268 else if constexpr (SHAPE_TYPE == LibUtilities::Tri)
269 {
270 BwdTransTriKernel<APPEND>(nm0, nm1, nq0, nq1, isModified, basis0,
271 basis1, wsp0, in, out);
272 }
273 else
274 {
275 BwdTransQuadKernel<APPEND>(nm0, nm1, nq0, nq1, basis0, basis1, wsp0, in,
276 out);
277 }
278}

References in, in1, Nektar::MatVecKernel(), nm0, nm1, nmTot, Nektar::LibUtilities::NodalTri, out, and Nektar::LibUtilities::Tri.

◆ BwdTransKernelLauncher() [3/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, typename TSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::BwdTransKernelLauncher ( const TSizeParameter3D  sizeParam3D,
const bool  isModified,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  basis1,
const typename simd_type::scalarType *  basis2,
const simd_type *  NtoM,
simd_type *  wsp0,
simd_type *  wsp1,
const simd_type *  in,
simd_type *  out 
)
static

3D dispatch: select the hexahedral, (nodal) tetrahedral, (nodal) prismatic or pyramidal kernel for one element group at compile time.

As in 2D, the nodal shapes are first mapped to the modified modal basis by MatVecKernel with NtoM, the destination sitting behind the shape's own area inside wsp0, and isModified triggers the collapsed-mode corrections inside the shape kernels.

Template Parameters
SHAPE_TYPEHex, Tet, NodalTet, Prism, NodalPrism, Pyr or NodalPyr.
APPENDAccumulate onto out instead of overwriting.
TSizeParameter3D3D size parameter, runtime or compile-time form.
simd_typeSIMD vector type of the interleaved group.
Parameters
sizeParam3DModal and quadrature sizes per direction.
isModifiedFirst-direction basis is eModified_A.
basis0Direction-0 basis table (nm0 rows of nq0).
basis1Direction-1 basis table; combined-mode indexed for the tetrahedron.
basis2Direction-2 basis table; combined-mode indexed for the collapsed shapes.
NtoMNodal-to-modal matrix (nodal shapes only).
wsp0,wsp1Workspaces sized by BwdTrans3DWorkspace.
inInterleaved coefficients of the element group.
outInterleaved physical values of the group.

Definition at line 312 of file BwdTransBlockOpSerialAVXSumFacKernels.hpp.

319{
320 static_assert(IsSizeParameter3D_v<TSizeParameter3D>,
321 "Template argument must be either of type "
322 "NonTemplatedSizeParameter3D or TemplatedSizeParameter3D.");
323
324 const unsigned int nm0 = sizeParam3D.nm0();
325 const unsigned int nm1 = sizeParam3D.nm1();
326 const unsigned int nm2 = sizeParam3D.nm2();
327 [[maybe_unused]] const unsigned int nmTot = sizeParam3D.nmTot();
328 const unsigned int nq0 = sizeParam3D.nq0();
329 const unsigned int nq1 = sizeParam3D.nq1();
330 const unsigned int nq2 = sizeParam3D.nq2();
331
332 if constexpr (SHAPE_TYPE == LibUtilities::Hex)
333 {
334 BwdTransHexKernel<APPEND>(nm0, nm1, nm2, nq0, nq1, nq2, basis0, basis1,
335 basis2, wsp0, wsp1, in, out);
336 }
337 else if constexpr (SHAPE_TYPE == LibUtilities::Tet)
338 {
339 BwdTransTetKernel<APPEND>(nm0, nm1, nm2, nq0, nq1, nq2, isModified,
340 basis0, basis1, basis2, wsp0, wsp1, in, out);
341 }
342 else if constexpr (SHAPE_TYPE == LibUtilities::NodalTet)
343 {
344 simd_type *in1 = wsp0 + nm0 * nm1;
345
346 MatVecKernel(nmTot, NtoM, in, in1);
347 BwdTransTetKernel<APPEND>(nm0, nm1, nm2, nq0, nq1, nq2, isModified,
348 basis0, basis1, basis2, wsp0, wsp1, in1, out);
349 }
350 else if constexpr (SHAPE_TYPE == LibUtilities::Prism)
351 {
352 BwdTransPrismKernel<APPEND>(nm0, nm1, nm2, nq0, nq1, nq2, isModified,
353 basis0, basis1, basis2, wsp0, wsp1, in,
354 out);
355 }
356 else if constexpr (SHAPE_TYPE == LibUtilities::NodalPrism)
357 {
358 simd_type *in1 = wsp0 + nm0 * nm1;
359
360 MatVecKernel(nmTot, NtoM, in, in1);
361 BwdTransPrismKernel<APPEND>(nm0, nm1, nm2, nq0, nq1, nq2, isModified,
362 basis0, basis1, basis2, wsp0, wsp1, in1,
363 out);
364 }
365 else if constexpr (SHAPE_TYPE == LibUtilities::Pyr)
366 {
367 BwdTransPyrKernel<APPEND>(nm0, nm1, nm2, nq0, nq1, nq2, isModified,
368 basis0, basis1, basis2, wsp0, wsp1, in, out);
369 }
370 else if constexpr (SHAPE_TYPE == LibUtilities::NodalPyr)
371 {
372 simd_type *in1 = wsp0 + nm0 * nm1;
373
374 MatVecKernel(nmTot, NtoM, in, in1);
375 BwdTransPyrKernel<APPEND>(nm0, nm1, nm2, nq0, nq1, nq2, isModified,
376 basis0, basis1, basis2, wsp0, wsp1, in1, out);
377 }
378}

References Nektar::LibUtilities::Hex, in, in1, Nektar::MatVecKernel(), nm0, nm1, nm2, nmTot, Nektar::LibUtilities::NodalPrism, Nektar::LibUtilities::NodalPyr, Nektar::LibUtilities::NodalTet, out, Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, and Nektar::LibUtilities::Tet.

◆ CGBndCondGatherKernel()

template<typename ExecSpace , typename TData >
void Nektar::MultiRegions::detail::CGBndCondGatherKernel ( const size_t  nsize,
const size_t *  idxPtr,
const TData *  srcPtr,
TData *  dstPtr,
const unsigned int  streamID 
)

Definition at line 51 of file CGBndCondKernels.hpp.

54{
56
57 Nektar::parallel_for<ExecSpace>(
58 0u, nsize,
59 NEKTAR_LAMBDA(const size_t i) { dstPtr[i] = srcPtr[idxPtr[i]]; });
60
62}
#define NEKTAR_LAMBDA
static void LoopExecutionSetStreamID(const unsigned int streamID)

References Nektar::LoopExecutionSetStreamID(), and NEKTAR_LAMBDA.

◆ CGBndCondGatherScatterKernel()

template<typename ExecSpace , typename TData >
void Nektar::MultiRegions::detail::CGBndCondGatherScatterKernel ( const size_t  nsize,
const size_t *  srcIdxPtr,
const size_t *  dstIdxPtr,
const TData *  srcPtr,
TData *  dstPtr,
const unsigned int  streamID 
)

Definition at line 68 of file CGBndCondKernels.hpp.

71{
73
74 Nektar::parallel_for<ExecSpace>(
75 0u, nsize, NEKTAR_LAMBDA(const size_t i) {
76 dstPtr[dstIdxPtr[i]] = srcPtr[srcIdxPtr[i]];
77 });
78
80}

References Nektar::LoopExecutionSetStreamID(), and NEKTAR_LAMBDA.

◆ CGBndCondUnpackAbsMaxKernel()

template<typename ExecSpace , typename TData , std::enable_if_t<!std::is_same_v< ExecSpace, NektarSpaces::Device >, bool > Enable = true>
void Nektar::MultiRegions::detail::CGBndCondUnpackAbsMaxKernel ( const size_t  nsize,
const size_t *  idxPtr,
const TData *  srcPtr,
TData *  dstPtr,
const unsigned int  streamID 
)

Definition at line 124 of file CGBndCondKernels.hpp.

127{
128 for (size_t i = 0; i < nsize; ++i)
129 {
130 TData *const dst = dstPtr + idxPtr[i];
131 if (std::abs(srcPtr[i]) > std::abs(*dst))
132 {
133 *dst = srcPtr[i];
134 }
135 }
136}

◆ CompileExpressionKernels()

template<typename TData >
void Nektar::MultiRegions::detail::CompileExpressionKernels ( ExpressionKernels &  kernels,
const std::string &  kernel_src,
const unsigned int  streamID 
)

Compile the generated source; see BuildExpressionKernels().

Compile the generated source in the context of the block's queue and retrieve the kernel of each variant from it, releasing the kernels compiled for any previous expression. Raises an error if the device cannot compile SYCL source or the compilation fails.

Template Parameters
TDataFloating-point type the kernels are compiled for.
Parameters
kernelsCompiled kernels, replaced.
kernel_srcSource from GetExpressionKernelSource().
streamIDStream index of the block; unused.
Template Parameters
TDataFloating-point type the kernels are compiled for.
Parameters
kernelsCompiled kernels, replaced.
kernel_srcSource from GetExpressionKernelSource().
streamIDStream index of the block.

Definition at line 336 of file ExpressionBlockOpDeviceGenericHIPCUDAHelper.hpp.

339{
340 BuildExpressionKernels<TData>(kernels, kernel_src);
341}

◆ CompNeedsCollapsedFac()

constexpr bool Nektar::MultiRegions::detail::CompNeedsCollapsedFac ( LibUtilities::ShapeType  shape,
unsigned  d,
unsigned  dir 
)
constexpr

Whether component d of the trace normal derivative factors, which multiplies \(\partial/\partial\eta_d\), needs the \(2/(1 - \eta)\) factor of collapsed direction dir.

Reading off the chain rules, with \(f_d\) the Cartesian to element local factors:

Tri d0: (f0 + (1+eta0)/2 f1) 2/(1-eta1) d1: f1 Prism d0: (f0 + (1+eta0)/2 f2) 2/(1-eta2) Pyr d0: (f0 + (1+eta0)/2 f2) 2/(1-eta2) d1: (f1 + (1+eta1)/2 f2) 2/(1-eta2) Tet d0: (f0 + (1+eta0)/2 (f1+f2)) 2/(1-eta1) 2/(1-eta2) d1: (f1 + (1+eta1)/2 f2) 2/(1-eta2)

The bracketed part is regular and stays in the trace data; this returns which of the singular multipliers the component still needs.

Definition at line 103 of file IProductWRTPhysNormalDerivTraceBlockOp.hpp.

105{
106 if (!IsCollapsedDir(shape, dir))
107 {
108 return false;
109 }
110
111 switch (shape)
112 {
113 case LibUtilities::Tri:
114 case LibUtilities::NodalTri:
115 return d == 0; // dir == 1
116 case LibUtilities::Prism:
117 case LibUtilities::NodalPrism:
118 return d == 0; // dir == 2
119 case LibUtilities::Pyr:
120 case LibUtilities::NodalPyr:
121 return d == 0 || d == 1; // dir == 2
122 case LibUtilities::Tet:
123 case LibUtilities::NodalTet:
124 return (dir == 1) ? (d == 0) : (d == 0 || d == 1);
125 default:
126 return false;
127 }
128}
constexpr bool IsCollapsedDir(LibUtilities::ShapeType shape, unsigned dir)
Directions in which a shape is collapsed: those whose chain rule from the element local coordinate to...

References IsCollapsedDir(), Nektar::LibUtilities::NodalPrism, Nektar::LibUtilities::NodalPyr, Nektar::LibUtilities::NodalTet, Nektar::LibUtilities::NodalTri, Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, Nektar::LibUtilities::Tet, and Nektar::LibUtilities::Tri.

Referenced by DispatchWorkSpace(), DispatchWorkSpace(), IPWRTPhysNormalDerivTracePerDir2DKernel(), and IPWRTPhysNormalDerivTracePerDir3DKernel().

◆ constexpr() [1/5]

if Nektar::MultiRegions::detail::constexpr ( COLLAPSED  )
constexpr

Definition at line 388 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacTOPKernels.hpp.

389 {
390 // Copy to shared memory.
391 LoadToSharedMemory(nm1, twoOver1, s_twoOver1, threadBlock);
392
393 localBarrier(threadBlock);
394 }

References nm1, s_twoOver1, threadBlock, and twoOver1.

◆ constexpr() [2/5]

if Nektar::MultiRegions::detail::constexpr ( COLLAPSED1  )
constexpr

Definition at line 609 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacTOPKernels.hpp.

610 {
611 // Copy to shared memory.
612 LoadToSharedMemory(nm1, twoOver1, s_twoOver1, threadBlock);
613 }

References nm1, s_twoOver1, threadBlock, and twoOver1.

◆ constexpr() [3/5]

if Nektar::MultiRegions::detail::constexpr ( COLLAPSED1||  COLLAPSED2)
constexpr

Definition at line 619 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacTOPKernels.hpp.

620 {
621 localBarrier(threadBlock);
622 }

References threadBlock.

◆ constexpr() [4/5]

if Nektar::MultiRegions::detail::constexpr ( COLLAPSED2  )
constexpr

Definition at line 614 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacTOPKernels.hpp.

615 {
616 // Copy to shared memory.
617 LoadToSharedMemory(nm2, twoOver2, s_twoOver2, threadBlock);
618 }

References nm2, s_twoOver2, threadBlock, and twoOver2.

◆ constexpr() [5/5]

else if Nektar::MultiRegions::detail::constexpr ( SHAPE_TYPE  = = LibUtilities::Tri || SHAPE_TYPE == LibUtilities::NodalTri)
constexpr

Definition at line 457 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

459 {
460 s_twoOver1 = (TData *)shmemptr;
461 tableSize = nm1;
462
463 // Copy to shared memory.
464 LoadToSharedMemory(nm1, twoOver1, s_twoOver1, threadBlock);
465
466 localBarrier(threadBlock);
467 }

References nm1, s_twoOver1, shmemptr, tableSize, threadBlock, and twoOver1.

◆ ContractTraceNormalChunk()

template<bool ASSIGN, typename vec_t >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::ContractTraceNormalChunk ( const unsigned int  nq,
const vec_t *  normal,
const vec_t *  trace,
vec_t *  out 
)
static

Accumulate one direction's share of the outward normal component on one chunk of element-local traces: out = normal * trace, or out += normal * trace with a fused multiply-add after the first direction, at the nq trace points of a SIMD group of elements.

Template Parameters
ASSIGNFirst direction: overwrite out.
Parameters
nqTrace points per element.
normalThe direction's normal component on the chunk.
traceThe direction's trace on the chunk.
outThe normal component on the chunk.

Definition at line 2139 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

2143{
2144 for (unsigned int q = 0; q < nq; ++q)
2145 {
2146 if constexpr (ASSIGN)
2147 {
2148 out[q] = normal[q] * trace[q];
2149 }
2150 else
2151 {
2152 out[q].fma(normal[q], trace[q]);
2153 }
2154 }
2155}

◆ ContractTraceNormalKernel()

template<typename TData >
static void Nektar::MultiRegions::detail::ContractTraceNormalKernel ( const size_t  npts,
const unsigned  ndim,
const unsigned  nvar,
const TData *  tensor,
const TData *  normals,
TData *  out,
const unsigned int  streamID 
)
static

The outward normal component of a vector-valued field on the element-local traces of one block: out[f] = sum_d n[d] * tensor[f * ndim + d] at every point, one launch with each thread forming every component of one point. The three arrays share one layout, component-major with npts between components and the elements interleaved at the same width within a component, so consecutive threads read consecutive addresses of each (coalesced) at any interleave width.

Definition at line 2571 of file PhysTraceExtractBlockOpDeviceSumFacKernels.hpp.

2575{
2577 Nektar::parallel_for<NektarSpaces::Device>(
2578 0u, npts, NEKTAR_LAMBDA(const size_t i) {
2579 for (unsigned f = 0; f < nvar; ++f)
2580 {
2581 TData sum = 0.0;
2582 for (unsigned d = 0; d < ndim; ++d)
2583 {
2584 sum += normals[d * npts + i] *
2585 tensor[(f * ndim + d) * npts + i];
2586 }
2587 out[f * npts + i] = sum;
2588 }
2589 });
2591}

References Nektar::LoopExecutionSetStreamID(), NEKTAR_LAMBDA, out, and sum.

Referenced by Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::v_ApplyNormalComponent().

◆ convertPow()

std::string Nektar::MultiRegions::detail::convertPow ( std::string  expr)
inline

Rewrite every caret power x^y in expr into a pow(x, y) call, since ^ is exclusive-or rather than exponentiation in the generated kernel source.

Each operand is taken to be either a bracketed group or a run of alphanumeric/'.' characters adjacent to the caret; a leading minus sign of the exponent is included.

Parameters
exprExpression string in the session-file notation.
Returns
The rewritten expression.

Definition at line 192 of file ExpressionBlockOpDeviceGenericHelper.hpp.

193{
194 size_t caret;
195 while ((caret = expr.find('^')) != std::string::npos)
196 {
197 int left_start, right_end;
198
199 // 1. Identify Left Operand (Base)
200 if (expr[caret - 1] == ')')
201 {
202 left_start = findMatching(expr, caret - 1, -1);
203 }
204 else
205 {
206 left_start = caret - 1;
207 while (left_start > 0 && (isalnum(expr[left_start - 1]) ||
208 expr[left_start - 1] == '.'))
209 {
210 left_start--;
211 }
212 }
213 std::string base = expr.substr(left_start, caret - left_start);
214
215 // 2. Identify Right Operand (Exponent)
216 if (expr[caret + 1] == '(')
217 {
218 right_end = findMatching(expr, caret + 1, 1);
219 }
220 else
221 {
222 right_end = caret + 1;
223 while (right_end < expr.length() - 1 &&
224 (isalnum(expr[right_end + 1]) || expr[right_end + 1] == '.'))
225 {
226 right_end++;
227 }
228 }
229 std::string exponent = expr.substr(caret + 1, right_end - caret);
230
231 // 3. Replace x^y with pow(x, y)
232 std::string replacement = "pow(" + base + ", " + exponent + ")";
233 expr.replace(left_start, (right_end - left_start + 1), replacement);
234 }
235 return expr;
236}
const Array< OneD, NekDouble > base(3, 0.0)
int findMatching(const std::string &s, int start, int direction)
Find the bracket matching the one at start by scanning in the given direction.

References findMatching().

Referenced by GetExpressionKernelBody().

◆ Curl2DScalarStdMatKernel()

template<typename ExecSpace , bool DEFORMED, typename TData >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::Curl2DScalarStdMatKernel ( const unsigned int  nqTot,
const TData *  df_ptr,
const TData *  deriv,
TData *  omega 
)
static

Scalar curl of a two-dimensional vector field, omega = d(u1)/dx0 - d(u0)/dx1, per quadrature point with one element per SIMD lane.

The derivative-factor entry k * 2 + d maps the reference-direction-d derivative into the Cartesian-k gradient component. For regular geometry one set of four factors is stored per element group; for deformed geometry one per quadrature point. The chain rule and the curl are applied in a single sweep.

Template Parameters
ExecSpaceExecution space; unused.
DEFORMEDRead per-point rather than per-element derivative factors.
TDataSIMD vector type of the data (a scalar type on the Serial execution space).
Parameters
nqTotQuadrature points per element.
df_ptrDerivative factors: four vectors per element group (regular) or per point (deformed).
derivReference-space derivatives of the two components, ordered as deriv[(c * 2 + d) * nqTot + i] for component c and direction d.
omegaOutput plane of nqTot vectors.

Definition at line 84 of file CurlCurlBlockOpSerialAVXStdMatKernels.hpp.

88{
89 constexpr unsigned int ndf = 4u;
90
91 TData df_tmp[4];
92 if constexpr (!DEFORMED)
93 {
94 df_tmp[0] = df_ptr[0];
95 df_tmp[1] = df_ptr[1];
96 df_tmp[2] = df_ptr[2];
97 df_tmp[3] = df_ptr[3];
98 }
99
100 for (unsigned int i = 0; i < nqTot; ++i)
101 {
102 const TData d0u = deriv[i];
103 const TData d1u = deriv[nqTot + i];
104 const TData d0v = deriv[2u * nqTot + i];
105 const TData d1v = deriv[3u * nqTot + i];
106
107 if constexpr (DEFORMED)
108 {
109 df_tmp[0] = df_ptr[ndf * i];
110 df_tmp[1] = df_ptr[ndf * i + 1];
111 df_tmp[2] = df_ptr[ndf * i + 2];
112 df_tmp[3] = df_ptr[ndf * i + 3];
113 }
114
115 TData dvdx = d0v * df_tmp[0];
116 dvdx.fma(d1v, df_tmp[1]);
117 TData dudy = d0u * df_tmp[2];
118 dudy.fma(d1u, df_tmp[3]);
119
120 omega[i] = dvdx - dudy;
121 }
122}

◆ Curl2DScalarSumFacKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::Curl2DScalarSumFacKernel ( const unsigned  nq0,
const unsigned  nq1,
const unsigned int  ncoord,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  df_ptr,
const simd_type *  tderiv0_0,
const simd_type *  tderiv1_0,
const simd_type *  tderiv0_1,
const simd_type *  tderiv1_1,
simd_type *  out 
)
static

Scalar curl of a two-dimensional vector field, omega = d(u1)/dx0 - d(u0)/dx1, from the tensor-direction derivatives of both components, per quadrature point with one element per SIMD lane.

For triangles the tensor directions are the collapsed coordinates: each direction-0 derivative is multiplied by f1[j] = 2/(1 - eta_1) and the direction-1 derivative augmented by it times f0[i] = (1 + eta_0)/2, recovering the standard-coordinate derivatives before the derivative factors are applied. The derivative-factor entry k * 2 + d then maps the direction-d derivative into the Cartesian-k gradient component, and the two off-diagonal Cartesian derivatives are combined into omega. All of this happens in a single sweep rather than in separate passes.

Template Parameters
SHAPE_TYPEElement shape; selects the collapsed-coordinate correction.
DEFORMEDRead per-point rather than per-element derivative factors.
simd_typeSIMD vector type; one element per lane.
Parameters
nq0Quadrature points in direction 0.
nq1Quadrature points in direction 1.
ncoordCoordinate dimension; sets the stride 2 * ncoord between the factor sets of consecutive points.
f0Collapsed-coordinate factor (1 + eta_0)/2 at the direction-0 points (triangles only).
f1Collapsed-coordinate factor 2/(1 - eta_1) at the direction-1 points (triangles only).
df_ptrDerivative factors (2 * ncoord per element group, or per point when deformed); the first four are read.
tderiv0_0Tensor-direction-0 derivative of component u0.
tderiv1_0Tensor-direction-1 derivative of component u0.
tderiv0_1Tensor-direction-0 derivative of component u1.
tderiv1_1Tensor-direction-1 derivative of component u1.
outOutput plane of nq0 * nq1 vectors receiving omega.

Definition at line 113 of file CurlCurlBlockOpSerialAVXSumFacKernels.hpp.

119{
120 const unsigned int ndf = 2 * ncoord;
121 simd_type df_tmp[4];
122
123 if constexpr (!DEFORMED)
124 {
125 df_tmp[0] = df_ptr[0];
126 df_tmp[1] = df_ptr[1];
127 df_tmp[2] = df_ptr[2];
128 df_tmp[3] = df_ptr[3];
129 }
130
131 for (unsigned int j = 0, cnt_ji = 0; j < nq1; ++j)
132 {
133 simd_type xfrm1;
134 if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
135 SHAPE_TYPE == LibUtilities::NodalTri)
136 {
137 xfrm1 = f1[j]; // Load 1x
138 }
139
140 for (unsigned int i = 0; i < nq0; ++i, ++cnt_ji)
141 {
142 simd_type d0u = tderiv0_0[cnt_ji]; // Load 1x
143 simd_type d1u = tderiv1_0[cnt_ji]; // Load 1x
144 simd_type d0v = tderiv0_1[cnt_ji]; // Load 1x
145 simd_type d1v = tderiv1_1[cnt_ji]; // Load 1x
146
147 if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
148 SHAPE_TYPE == LibUtilities::NodalTri)
149 {
150 // Moving from collapsed to standard coordinates
151 simd_type xfrm0 = f0[i]; // Load 1x
152 d0u *= xfrm1;
153 d1u.fma(d0u, xfrm0);
154 d0v *= xfrm1;
155 d1v.fma(d0v, xfrm0);
156 }
157
158 // Multiply by derivative factors
159 if constexpr (DEFORMED)
160 {
161 df_tmp[0] = df_ptr[cnt_ji * ndf + 0];
162 df_tmp[1] = df_ptr[cnt_ji * ndf + 1];
163 df_tmp[2] = df_ptr[cnt_ji * ndf + 2];
164 df_tmp[3] = df_ptr[cnt_ji * ndf + 3];
165 }
166
167 simd_type dvdx = d0v * df_tmp[0];
168 dvdx.fma(d1v, df_tmp[1]);
169 simd_type dudy = d0u * df_tmp[2];
170 dudy.fma(d1u, df_tmp[3]);
171
172 out[cnt_ji] = dvdx - dudy; // Store 1x
173 }
174 }
175}

References Nektar::LibUtilities::NodalTri, out, and Nektar::LibUtilities::Tri.

◆ Curl2DVectorStdMatKernel()

template<typename ExecSpace , bool DEFORMED, typename TData >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::Curl2DVectorStdMatKernel ( const unsigned int  nqTot,
const TData *  df_ptr,
const TData *  deriv,
TData *  out0,
TData *  out1 
)
static

Vector curl of a two-dimensional scalar field, out = ( d(omega)/dx1, -d(omega)/dx0 ), per quadrature point with one element per SIMD lane.

The derivative factors are read as in Curl2DScalarStdMatKernel; both output components come out of the same sweep, so the sign flip needs no pass of its own.

Template Parameters
ExecSpaceExecution space; unused.
DEFORMEDRead per-point rather than per-element derivative factors.
TDataSIMD vector type of the data (a scalar type on the Serial execution space).
Parameters
nqTotQuadrature points per element.
df_ptrDerivative factors: four vectors per element group (regular) or per point (deformed).
derivReference-space derivatives of omega, ordered as deriv[d * nqTot + i] for direction d.
out0First output component, nqTot vectors.
out1Second output component, nqTot vectors.

Definition at line 148 of file CurlCurlBlockOpSerialAVXStdMatKernels.hpp.

152{
153 constexpr unsigned int ndf = 4u;
154
155 TData df_tmp[4];
156 if constexpr (!DEFORMED)
157 {
158 df_tmp[0] = df_ptr[0];
159 df_tmp[1] = df_ptr[1];
160 df_tmp[2] = df_ptr[2];
161 df_tmp[3] = df_ptr[3];
162 }
163
164 for (unsigned int i = 0; i < nqTot; ++i)
165 {
166 const TData d0 = deriv[i];
167 const TData d1 = deriv[nqTot + i];
168
169 if constexpr (DEFORMED)
170 {
171 df_tmp[0] = df_ptr[ndf * i];
172 df_tmp[1] = df_ptr[ndf * i + 1];
173 df_tmp[2] = df_ptr[ndf * i + 2];
174 df_tmp[3] = df_ptr[ndf * i + 3];
175 }
176
177 TData dwdx = d0 * df_tmp[0];
178 dwdx.fma(d1, df_tmp[1]);
179 TData dwdy = d0 * df_tmp[2];
180 dwdy.fma(d1, df_tmp[3]);
181
182 out0[i] = dwdy;
183 out1[i] = -dwdx;
184 }
185}

◆ Curl2DVectorSumFacKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::Curl2DVectorSumFacKernel ( const unsigned  nq0,
const unsigned  nq1,
const unsigned int  ncoord,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  df_ptr,
const simd_type *  tderiv0,
const simd_type *  tderiv1,
simd_type *  out0,
simd_type *  out1 
)
static

Vector curl of a two-dimensional scalar field, out = ( d(omega)/dx1, -d(omega)/dx0 ), from the tensor-direction derivatives of omega, per quadrature point with one element per SIMD lane.

The collapsed-coordinate correction and the derivative factors are applied as in Curl2DScalarSumFacKernel; both output components come out of the same sweep, so the sign flip needs no pass of its own.

Template Parameters
SHAPE_TYPEElement shape; selects the collapsed-coordinate correction.
DEFORMEDRead per-point rather than per-element derivative factors.
simd_typeSIMD vector type; one element per lane.
Parameters
nq0Quadrature points in direction 0.
nq1Quadrature points in direction 1.
ncoordCoordinate dimension; sets the stride 2 * ncoord between the factor sets of consecutive points.
f0Collapsed-coordinate factor (1 + eta_0)/2 at the direction-0 points (triangles only).
f1Collapsed-coordinate factor 2/(1 - eta_1) at the direction-1 points (triangles only).
df_ptrDerivative factors (2 * ncoord per element group, or per point when deformed); the first four are read.
tderiv0Tensor-direction-0 derivative of omega.
tderiv1Tensor-direction-1 derivative of omega.
out0First output component, nq0 * nq1 vectors.
out1Second output component, nq0 * nq1 vectors.

Definition at line 210 of file CurlCurlBlockOpSerialAVXSumFacKernels.hpp.

215{
216 const unsigned int ndf = 2 * ncoord;
217 simd_type df_tmp[4];
218
219 if constexpr (!DEFORMED)
220 {
221 df_tmp[0] = df_ptr[0];
222 df_tmp[1] = df_ptr[1];
223 df_tmp[2] = df_ptr[2];
224 df_tmp[3] = df_ptr[3];
225 }
226
227 for (unsigned int j = 0, cnt_ji = 0; j < nq1; ++j)
228 {
229 simd_type xfrm1;
230 if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
231 SHAPE_TYPE == LibUtilities::NodalTri)
232 {
233 xfrm1 = f1[j]; // Load 1x
234 }
235
236 for (unsigned int i = 0; i < nq0; ++i, ++cnt_ji)
237 {
238 simd_type d0 = tderiv0[cnt_ji]; // Load 1x
239 simd_type d1 = tderiv1[cnt_ji]; // Load 1x
240
241 if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
242 SHAPE_TYPE == LibUtilities::NodalTri)
243 {
244 // Moving from collapsed to standard coordinates
245 simd_type xfrm0 = f0[i]; // Load 1x
246 d0 *= xfrm1;
247 d1.fma(d0, xfrm0);
248 }
249
250 // Multiply by derivative factors
251 if constexpr (DEFORMED)
252 {
253 df_tmp[0] = df_ptr[cnt_ji * ndf + 0];
254 df_tmp[1] = df_ptr[cnt_ji * ndf + 1];
255 df_tmp[2] = df_ptr[cnt_ji * ndf + 2];
256 df_tmp[3] = df_ptr[cnt_ji * ndf + 3];
257 }
258
259 simd_type dwdx = d0 * df_tmp[0];
260 dwdx.fma(d1, df_tmp[1]);
261 simd_type dwdy = d0 * df_tmp[2];
262 dwdy.fma(d1, df_tmp[3]);
263
264 out0[cnt_ji] = dwdy; // Store 1x
265 out1[cnt_ji] = -dwdx; // Store 1x
266 }
267 }
268}

References Nektar::LibUtilities::NodalTri, and Nektar::LibUtilities::Tri.

◆ Curl3DH1KernelLauncher()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::Curl3DH1KernelLauncher ( const TPhysSizeParameter2D  sizeParam2D,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  df_ptr,
simd_type *  wsp,
const simd_type *  in0,
const simd_type *  in1,
const simd_type *  in2,
simd_type *  out0,
simd_type *  out1,
simd_type *  out2 
)
static

Definition at line 608 of file CurlCurlBlockOpSerialAVXSumFacKernels.hpp.

615{
616 static_assert(IsPhysSizeParameter2D_v<TPhysSizeParameter2D>,
617 "Template argument must be either of type "
618 "NonTemplatedPhysSizeParameter2D or "
619 "TemplatedPhysSizeParameter2D.");
620
621 const unsigned int nq0 = sizeParam2D.nq0();
622 const unsigned int nq1 = sizeParam2D.nq1();
623 const unsigned int nqTot = sizeParam2D.nqTot();
624
625 // Tensorial derivatives of the first two components, then of the third
626 // once the first two have been consumed.
627 simd_type *tderiv_u = wsp;
628 simd_type *tderiv_v = tderiv_u + 2u * nqTot;
629
630 PhysDerivTensor2DKernel(nq0, nq1, in0, D0, D1, tderiv_u, tderiv_u + nqTot);
631 PhysDerivTensor2DKernel(nq0, nq1, in1, D0, D1, tderiv_v, tderiv_v + nqTot);
632
633 // The third component, df_y/dx - df_x/dy.
634 Curl2DScalarSumFacKernel<SHAPE_TYPE, DEFORMED>(
635 nq0, nq1, 2, f0, f1, df_ptr, tderiv_u, tderiv_u + nqTot, tderiv_v,
636 tderiv_v + nqTot, out2);
637
638 // The first two components, {df_z/dy, -df_z/dx}.
639 PhysDerivTensor2DKernel(nq0, nq1, in2, D0, D1, tderiv_u, tderiv_u + nqTot);
640 Curl2DVectorSumFacKernel<SHAPE_TYPE, DEFORMED>(
641 nq0, nq1, 2, f0, f1, df_ptr, tderiv_u, tderiv_u + nqTot, out0, out1);
642}
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT wsp

References in1, in2, PhysDerivTensor2DKernel(), and wsp.

Referenced by Nektar::MultiRegions::detail::CurlCurlBlockOpImpl< ExecSpace, Implementation, TData >::OperatorCurl3DH1().

◆ Curl3DStdMatKernel()

template<typename ExecSpace , bool DEFORMED, typename TData >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::Curl3DStdMatKernel ( const unsigned int  nqTot,
const TData *  df_ptr,
const TData *  deriv,
TData *  out0,
TData *  out1,
TData *  out2 
)
static

Curl of a three-dimensional vector field, per quadrature point with one element per SIMD lane; used for both passes of the curl-curl operator, omega = curl u and out = curl omega.

The derivative-factor entry k * 3 + d maps the reference-direction-d derivative into the Cartesian-k gradient component; nine factors are stored per element group (regular) or per point (deformed). Only the six off-diagonal Cartesian derivatives are formed, the diagonal ones cancelling out of the curl: out0 = d(u2)/dx1 - d(u1)/dx2, out1 = d(u0)/dx2 - d(u2)/dx0, out2 = d(u1)/dx0 - d(u0)/dx1.

Template Parameters
ExecSpaceExecution space; unused.
DEFORMEDRead per-point rather than per-element derivative factors.
TDataSIMD vector type of the data (a scalar type on the Serial execution space).
Parameters
nqTotQuadrature points per element.
df_ptrDerivative factors: nine vectors per element group (regular) or per point (deformed).
derivReference-space derivatives of the three components, ordered as deriv[(c * 3 + d) * nqTot + i] for component c and direction d.
out0First output component, nqTot vectors.
out1Second output component, nqTot vectors.
out2Third output component, nqTot vectors.

Definition at line 218 of file CurlCurlBlockOpSerialAVXStdMatKernels.hpp.

222{
223 constexpr unsigned int ndf = 9u;
224
225 TData df_tmp[9];
226 if constexpr (!DEFORMED)
227 {
228 df_tmp[0] = df_ptr[0];
229 df_tmp[1] = df_ptr[1];
230 df_tmp[2] = df_ptr[2];
231 df_tmp[3] = df_ptr[3];
232 df_tmp[4] = df_ptr[4];
233 df_tmp[5] = df_ptr[5];
234 df_tmp[6] = df_ptr[6];
235 df_tmp[7] = df_ptr[7];
236 df_tmp[8] = df_ptr[8];
237 }
238
239 for (unsigned int i = 0; i < nqTot; ++i)
240 {
241 TData d0[3], d1[3], d2[3];
242 d0[0] = deriv[i];
243 d1[0] = deriv[nqTot + i];
244 d2[0] = deriv[2u * nqTot + i];
245 d0[1] = deriv[3u * nqTot + i];
246 d1[1] = deriv[4u * nqTot + i];
247 d2[1] = deriv[5u * nqTot + i];
248 d0[2] = deriv[6u * nqTot + i];
249 d1[2] = deriv[7u * nqTot + i];
250 d2[2] = deriv[8u * nqTot + i];
251
252 if constexpr (DEFORMED)
253 {
254 df_tmp[0] = df_ptr[ndf * i + 0];
255 df_tmp[1] = df_ptr[ndf * i + 1];
256 df_tmp[2] = df_ptr[ndf * i + 2];
257 df_tmp[3] = df_ptr[ndf * i + 3];
258 df_tmp[4] = df_ptr[ndf * i + 4];
259 df_tmp[5] = df_ptr[ndf * i + 5];
260 df_tmp[6] = df_ptr[ndf * i + 6];
261 df_tmp[7] = df_ptr[ndf * i + 7];
262 df_tmp[8] = df_ptr[ndf * i + 8];
263 }
264
265 TData dudy = d0[0] * df_tmp[3];
266 dudy.fma(d1[0], df_tmp[4]);
267 dudy.fma(d2[0], df_tmp[5]);
268
269 TData dudz = d0[0] * df_tmp[6];
270 dudz.fma(d1[0], df_tmp[7]);
271 dudz.fma(d2[0], df_tmp[8]);
272
273 TData dvdx = d0[1] * df_tmp[0];
274 dvdx.fma(d1[1], df_tmp[1]);
275 dvdx.fma(d2[1], df_tmp[2]);
276
277 TData dvdz = d0[1] * df_tmp[6];
278 dvdz.fma(d1[1], df_tmp[7]);
279 dvdz.fma(d2[1], df_tmp[8]);
280
281 TData dwdx = d0[2] * df_tmp[0];
282 dwdx.fma(d1[2], df_tmp[1]);
283 dwdx.fma(d2[2], df_tmp[2]);
284
285 TData dwdy = d0[2] * df_tmp[3];
286 dwdy.fma(d1[2], df_tmp[4]);
287 dwdy.fma(d2[2], df_tmp[5]);
288
289 out0[i] = dwdy - dvdz; // dw/dy - dv/dz
290 out1[i] = dudz - dwdx; // du/dz - dw/dx
291 out2[i] = dvdx - dudy; // dv/dx - du/dy
292 }
293}

◆ Curl3DSumFacKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::Curl3DSumFacKernel ( const unsigned  nq0,
const unsigned  nq1,
const unsigned  nq2,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  f1m,
const simd_type *  f2,
const simd_type *  df_ptr,
const simd_type *  tderiv0_0,
const simd_type *  tderiv1_0,
const simd_type *  tderiv2_0,
const simd_type *  tderiv0_1,
const simd_type *  tderiv1_1,
const simd_type *  tderiv2_1,
const simd_type *  tderiv0_2,
const simd_type *  tderiv1_2,
const simd_type *  tderiv2_2,
simd_type *  out0,
simd_type *  out1,
simd_type *  out2 
)
static

Curl of a three-dimensional vector field from the tensor-direction derivatives of its three components, per quadrature point with one element per SIMD lane; used for both passes of the curl-curl operator, omega = curl u and out = curl omega.

For the simplex-type shapes the tensor directions are the collapsed coordinates and each component's derivatives are first chain-ruled back to the standard coordinates: a prism scales the direction-0 derivative by f2[k] and adds f0[i] times it to direction 2; a pyramid scales directions 0 and 1 by f2[k] and adds f0[i] and f1[j] times them to direction 2; a tetrahedron scales direction 0 by f1m[j] * f2[k], rebuilds direction 1 from f0[i] times that and f2[k] times the old direction-1 derivative, and adds both contributions – the second weighted by f1[j] – to direction 2. Hexahedra need no correction. The derivative-factor entry k * 3 + d then maps the direction-d derivative into the Cartesian-k gradient component; only the six off-diagonal Cartesian derivatives are formed, the diagonal ones cancelling out of the curl: out0 = d(u2)/dx1 - d(u1)/dx2, out1 = d(u0)/dx2 - d(u2)/dx0, out2 = d(u1)/dx0 - d(u0)/dx1.

Template Parameters
SHAPE_TYPEElement shape; selects the collapsed-coordinate correction.
DEFORMEDRead per-point rather than per-element derivative factors.
simd_typeSIMD vector type; one element per lane.
Parameters
nq0Quadrature points in direction 0.
nq1Quadrature points in direction 1.
nq2Quadrature points in direction 2.
f0Collapsed-coordinate factor (1 + eta_0)/2 at the direction-0 points (prisms, pyramids and tetrahedra).
f1Collapsed-coordinate factor (1 + eta_1)/2 at the direction-1 points (pyramids and tetrahedra).
f1mCollapsed-coordinate factor 2/(1 - eta_1) at the direction-1 points (tetrahedra only).
f2Collapsed-coordinate factor 2/(1 - eta_2) at the direction-2 points (prisms, pyramids and tetrahedra).
df_ptrDerivative factors (nine per element group, or per point when deformed).
tderiv0_0Tensor-direction-0 derivative of component 0.
tderiv1_0Tensor-direction-1 derivative of component 0.
tderiv2_0Tensor-direction-2 derivative of component 0.
tderiv0_1Tensor-direction-0 derivative of component 1.
tderiv1_1Tensor-direction-1 derivative of component 1.
tderiv2_1Tensor-direction-2 derivative of component 1.
tderiv0_2Tensor-direction-0 derivative of component 2.
tderiv1_2Tensor-direction-1 derivative of component 2.
tderiv2_2Tensor-direction-2 derivative of component 2.
out0First output component, nq0 * nq1 * nq2 vectors.
out1Second output component, nq0 * nq1 * nq2 vectors.
out2Third output component, nq0 * nq1 * nq2 vectors.

Definition at line 328 of file CurlCurlBlockOpSerialAVXSumFacKernels.hpp.

338{
339 constexpr unsigned int ndf = 9u;
340 simd_type df_tmp[9];
341
342 if constexpr (!DEFORMED)
343 {
344 df_tmp[0] = df_ptr[0];
345 df_tmp[1] = df_ptr[1];
346 df_tmp[2] = df_ptr[2];
347 df_tmp[3] = df_ptr[3];
348 df_tmp[4] = df_ptr[4];
349 df_tmp[5] = df_ptr[5];
350 df_tmp[6] = df_ptr[6];
351 df_tmp[7] = df_ptr[7];
352 df_tmp[8] = df_ptr[8];
353 }
354
355 for (unsigned int k = 0, cnt_ijk = 0; k < nq2; ++k)
356 {
357 simd_type xfrm_eta2;
358 if constexpr (SHAPE_TYPE != LibUtilities::Hex)
359 {
360 xfrm_eta2 = f2[k];
361 }
362
363 for (unsigned int j = 0; j < nq1; ++j)
364 {
365 simd_type xfrm_eta1, xfrm;
366 if constexpr (SHAPE_TYPE == LibUtilities::Pyr ||
367 SHAPE_TYPE == LibUtilities::NodalPyr)
368 {
369 xfrm_eta1 = f1[j];
370 }
371 else if constexpr (SHAPE_TYPE == LibUtilities::Tet ||
372 SHAPE_TYPE == LibUtilities::NodalTet)
373 {
374 xfrm_eta1 = f1[j];
375 xfrm = f1m[j] * xfrm_eta2;
376 }
377
378 for (unsigned int i = 0; i < nq0; ++i, ++cnt_ijk)
379 {
380 simd_type d0[3], d1[3], d2[3];
381 d0[0] = tderiv0_0[cnt_ijk]; // Load 1x
382 d1[0] = tderiv1_0[cnt_ijk]; // Load 1x
383 d2[0] = tderiv2_0[cnt_ijk]; // Load 1x
384 d0[1] = tderiv0_1[cnt_ijk]; // Load 1x
385 d1[1] = tderiv1_1[cnt_ijk]; // Load 1x
386 d2[1] = tderiv2_1[cnt_ijk]; // Load 1x
387 d0[2] = tderiv0_2[cnt_ijk]; // Load 1x
388 d1[2] = tderiv1_2[cnt_ijk]; // Load 1x
389 d2[2] = tderiv2_2[cnt_ijk]; // Load 1x
390
391 // Chain-rule to construct cartesian derivatives for non Hex
392 // shapes. Applied to each component in turn.
393 if constexpr (SHAPE_TYPE != LibUtilities::Hex)
394 {
395 const simd_type xfrm_eta0 = f0[i]; // Load 1x
396
397 auto collapse = [&](simd_type &a0, simd_type &a1,
398 simd_type &a2) {
399 if constexpr ((SHAPE_TYPE == LibUtilities::Prism) ||
400 (SHAPE_TYPE == LibUtilities::NodalPrism))
401 {
402 a0 *= xfrm_eta2;
403 a2.fma(xfrm_eta0, a0);
404 }
405 else if constexpr (SHAPE_TYPE == LibUtilities::Pyr ||
406 SHAPE_TYPE == LibUtilities::NodalPyr)
407 {
408 a0 *= xfrm_eta2;
409 a1 *= xfrm_eta2;
410 a2.fma(xfrm_eta0, a0);
411 a2.fma(xfrm_eta1, a1);
412 }
413 else if constexpr (SHAPE_TYPE == LibUtilities::Tet ||
414 SHAPE_TYPE == LibUtilities::NodalTet)
415 {
416 a0 *= xfrm;
417 simd_type tmp0 = xfrm_eta0 * a0;
418 simd_type tmp1 = a1 * xfrm_eta2;
419 a1 = tmp0 + tmp1;
420 tmp0.fma(tmp1, xfrm_eta1);
421 a2 += tmp0;
422 }
423 };
424
425 collapse(d0[0], d1[0], d2[0]);
426 collapse(d0[1], d1[1], d2[1]);
427 collapse(d0[2], d1[2], d2[2]);
428 }
429
430 // Multiply by derivative factors
431 if constexpr (DEFORMED)
432 {
433 df_tmp[0] = df_ptr[cnt_ijk * ndf + 0];
434 df_tmp[1] = df_ptr[cnt_ijk * ndf + 1];
435 df_tmp[2] = df_ptr[cnt_ijk * ndf + 2];
436 df_tmp[3] = df_ptr[cnt_ijk * ndf + 3];
437 df_tmp[4] = df_ptr[cnt_ijk * ndf + 4];
438 df_tmp[5] = df_ptr[cnt_ijk * ndf + 5];
439 df_tmp[6] = df_ptr[cnt_ijk * ndf + 6];
440 df_tmp[7] = df_ptr[cnt_ijk * ndf + 7];
441 df_tmp[8] = df_ptr[cnt_ijk * ndf + 8];
442 }
443
444 // Physical derivative of component c in direction m. Only
445 // the six off-diagonal entries are needed, the diagonal ones
446 // cancel out.
447 simd_type dudy = d0[0] * df_tmp[3];
448 dudy.fma(d1[0], df_tmp[4]);
449 dudy.fma(d2[0], df_tmp[5]);
450
451 simd_type dudz = d0[0] * df_tmp[6];
452 dudz.fma(d1[0], df_tmp[7]);
453 dudz.fma(d2[0], df_tmp[8]);
454
455 simd_type dvdx = d0[1] * df_tmp[0];
456 dvdx.fma(d1[1], df_tmp[1]);
457 dvdx.fma(d2[1], df_tmp[2]);
458
459 simd_type dvdz = d0[1] * df_tmp[6];
460 dvdz.fma(d1[1], df_tmp[7]);
461 dvdz.fma(d2[1], df_tmp[8]);
462
463 simd_type dwdx = d0[2] * df_tmp[0];
464 dwdx.fma(d1[2], df_tmp[1]);
465 dwdx.fma(d2[2], df_tmp[2]);
466
467 simd_type dwdy = d0[2] * df_tmp[3];
468 dwdy.fma(d1[2], df_tmp[4]);
469 dwdy.fma(d2[2], df_tmp[5]);
470
471 out0[cnt_ijk] = dwdy - dvdz; // Store 1x
472 out1[cnt_ijk] = dudz - dwdx; // Store 1x
473 out2[cnt_ijk] = dvdx - dudy; // Store 1x
474 }
475 }
476 }
477}

References Nektar::LibUtilities::Hex, Nektar::LibUtilities::NodalPrism, Nektar::LibUtilities::NodalPyr, Nektar::LibUtilities::NodalTet, Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, and Nektar::LibUtilities::Tet.

◆ CurlCurlKernelLauncher() [1/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::CurlCurlKernelLauncher ( const TPhysSizeParameter1D  sizeParam1D,
const typename simd_type::scalarType *  D0,
const simd_type *  df_ptr,
simd_type *  wsp,
const simd_type *  in0,
simd_type *  out0 
)
static

1D entry point: the curl-curl is undefined on a segment, so the group's single component is differentiated once – PhysDerivTensor1DKernel followed by PhysDerivDir1DKernel with the direction-0 derivative factor – and the derivative written to the output.

Exists so that the generated segment ShapeBlock() compiles; the block operator's constructor asserts that the block is two- or three-dimensional (see CurlCurlBlockOpSerialAVXSumFac.hpp).

Template Parameters
SHAPE_TYPEElement shape (segments only).
DEFORMEDDerivative factors vary point by point.
TPhysSizeParameter1D1D physical-space size parameter, runtime or compile-time (checked by static_assert).
simd_typeSIMD vector type; one element per lane.
Parameters
sizeParam1DElement sizes: coordinate dimension and quadrature points.
D01D derivative matrix of the direction.
df_ptrDerivative factors of the group.
wspWorkspace of at least nq0 vectors for the tensor-direction derivative.
in0Input values of the group.
out0Output values of the group.

Definition at line 506 of file CurlCurlBlockOpSerialAVXSumFacKernels.hpp.

510{
511 static_assert(IsPhysSizeParameter1D_v<TPhysSizeParameter1D>,
512 "Template argument must be either of type "
513 "NonTemplatedPhysSizeParameter1D or "
514 "TemplatedPhysSizeParameter1D.");
515
516 const unsigned int ncoord = sizeParam1D.ncoord();
517 const unsigned int nq0 = sizeParam1D.nq0();
518
519 // The curl of a scalar field on a segment reduces to its derivative.
520 PhysDerivTensor1DKernel(nq0, in0, D0, wsp);
521 PhysDerivDir1DKernel<SHAPE_TYPE, false, DEFORMED, 0>(nq0, ncoord, df_ptr,
522 wsp, out0);
523}

References PhysDerivTensor1DKernel(), and wsp.

Referenced by Nektar::MultiRegions::detail::CurlCurlBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl().

◆ CurlCurlKernelLauncher() [2/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::CurlCurlKernelLauncher ( const TPhysSizeParameter2D  sizeParam2D,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  df_ptr,
simd_type *  wsp,
const simd_type *  in0,
const simd_type *  in1,
simd_type *  out0,
simd_type *  out1 
)
static

2D entry point: evaluate curl(curl u) for one element group.

Lays the workspace out as the two tensor-direction derivatives of u0, the two of u1 and one plane for omega – five planes of nqTot vectors, the count NumWorkspace() in the block operator provides. Differentiates both components with PhysDerivTensor2DKernel, forms omega with Curl2DScalarSumFacKernel, differentiates omega into the planes of u0 and writes the two output components with Curl2DVectorSumFacKernel. The coordinate dimension passed to the curl kernels is two, so the factor sets are read at a stride of four.

Template Parameters
SHAPE_TYPEElement shape; selects the collapsed-coordinate correction.
DEFORMEDDerivative factors vary point by point.
TPhysSizeParameter2D2D physical-space size parameter, runtime or compile-time (checked by static_assert).
simd_typeSIMD vector type; one element per lane.
Parameters
sizeParam2DElement sizes: coordinate dimension and per-direction quadrature points.
D01D derivative matrix of direction 0.
D11D derivative matrix of direction 1.
f0Collapsed-coordinate factor of direction 0.
f1Collapsed-coordinate factor of direction 1.
df_ptrDerivative factors of the group.
wspWorkspace of at least 5 * nqTot vectors.
in0Input component u0 of the group.
in1Input component u1 of the group.
out0First output component of the group.
out1Second output component of the group.

Definition at line 559 of file CurlCurlBlockOpSerialAVXSumFacKernels.hpp.

566{
567 static_assert(IsPhysSizeParameter2D_v<TPhysSizeParameter2D>,
568 "Template argument must be either of type "
569 "NonTemplatedPhysSizeParameter2D or "
570 "TemplatedPhysSizeParameter2D.");
571
572 const unsigned int nq0 = sizeParam2D.nq0();
573 const unsigned int nq1 = sizeParam2D.nq1();
574 const unsigned int nqTot = sizeParam2D.nqTot();
575
576 // Tensorial derivatives of both components.
577 simd_type *tderiv_u = wsp;
578 simd_type *tderiv_v = tderiv_u + 2u * nqTot;
579 simd_type *omega = tderiv_v + 2u * nqTot;
580
581 PhysDerivTensor2DKernel(nq0, nq1, in0, D0, D1, tderiv_u, tderiv_u + nqTot);
582 PhysDerivTensor2DKernel(nq0, nq1, in1, D0, D1, tderiv_v, tderiv_v + nqTot);
583
584 // omega_z = dv/dx - du/dy
585 Curl2DScalarSumFacKernel<SHAPE_TYPE, DEFORMED>(
586 nq0, nq1, 2, f0, f1, df_ptr, tderiv_u, tderiv_u + nqTot, tderiv_v,
587 tderiv_v + nqTot, omega);
588
589 // q = {d(omega_z)/dy, -d(omega_z)/dx}
590 PhysDerivTensor2DKernel(nq0, nq1, omega, D0, D1, tderiv_u,
591 tderiv_u + nqTot);
592 Curl2DVectorSumFacKernel<SHAPE_TYPE, DEFORMED>(
593 nq0, nq1, 2, f0, f1, df_ptr, tderiv_u, tderiv_u + nqTot, out0, out1);
594}

References in1, PhysDerivTensor2DKernel(), and wsp.

◆ CurlCurlKernelLauncher() [3/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::CurlCurlKernelLauncher ( const TPhysSizeParameter3D  sizeParam3D,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
const typename simd_type::scalarType *  D2,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  f1m,
const simd_type *  f2,
const simd_type *  df_ptr,
simd_type *  wsp,
const simd_type *  in0,
const simd_type *  in1,
const simd_type *  in2,
simd_type *  out0,
simd_type *  out1,
simd_type *  out2 
)
static

3D entry point: evaluate curl(curl u) for one element group.

Lays the workspace out as the nine tensor-direction derivatives – three per component – followed by the three planes of omega: twelve planes of nqTot vectors, the count NumWorkspace() provides. Differentiates the three components with PhysDerivTensor3DKernel, forms omega with Curl3DSumFacKernel, differentiates the components of omega into the same nine planes and writes the three output components with a second Curl3DSumFacKernel call. Each tensor-direction derivative is thus formed once and reused for every Cartesian derivative that needs it.

Template Parameters
SHAPE_TYPEElement shape; selects the collapsed-coordinate correction.
DEFORMEDDerivative factors vary point by point.
TPhysSizeParameter3D3D physical-space size parameter, runtime or compile-time (checked by static_assert).
simd_typeSIMD vector type; one element per lane.
Parameters
sizeParam3DElement sizes: per-direction quadrature points.
D01D derivative matrix of direction 0.
D11D derivative matrix of direction 1.
D21D derivative matrix of direction 2.
f0Collapsed-coordinate factor (1 + eta_0)/2 of direction 0.
f1Collapsed-coordinate factor (1 + eta_1)/2 of direction 1.
f1mCollapsed-coordinate factor 2/(1 - eta_1) of direction 1.
f2Collapsed-coordinate factor 2/(1 - eta_2) of direction 2.
df_ptrDerivative factors of the group.
wspWorkspace of at least 12 * nqTot vectors.
in0Input component u0 of the group.
in1Input component u1 of the group.
in2Input component u2 of the group.
out0First output component of the group.
out1Second output component of the group.
out2Third output component of the group.

Definition at line 686 of file CurlCurlBlockOpSerialAVXSumFacKernels.hpp.

695{
696 static_assert(IsPhysSizeParameter3D_v<TPhysSizeParameter3D>,
697 "Template argument must be either of type "
698 "NonTemplatedPhysSizeParameter3D or "
699 "TemplatedPhysSizeParameter3D.");
700
701 const unsigned int nq0 = sizeParam3D.nq0();
702 const unsigned int nq1 = sizeParam3D.nq1();
703 const unsigned int nq2 = sizeParam3D.nq2();
704 const unsigned int nqTot = sizeParam3D.nqTot();
705
706 // Tensorial derivatives of the three components. Each one is evaluated
707 // once and reused for every physical direction that needs it.
708 simd_type *tderiv = wsp;
709 simd_type *omega = tderiv + 9u * nqTot;
710
711 PhysDerivTensor3DKernel(nq0, nq1, nq2, in0, D0, D1, D2, tderiv,
712 tderiv + nqTot, tderiv + 2u * nqTot);
713 PhysDerivTensor3DKernel(nq0, nq1, nq2, in1, D0, D1, D2, tderiv + 3u * nqTot,
714 tderiv + 4u * nqTot, tderiv + 5u * nqTot);
715 PhysDerivTensor3DKernel(nq0, nq1, nq2, in2, D0, D1, D2, tderiv + 6u * nqTot,
716 tderiv + 7u * nqTot, tderiv + 8u * nqTot);
717
718 // omega = curl(u)
719 Curl3DSumFacKernel<SHAPE_TYPE, DEFORMED>(
720 nq0, nq1, nq2, f0, f1, f1m, f2, df_ptr, tderiv, tderiv + nqTot,
721 tderiv + 2u * nqTot, tderiv + 3u * nqTot, tderiv + 4u * nqTot,
722 tderiv + 5u * nqTot, tderiv + 6u * nqTot, tderiv + 7u * nqTot,
723 tderiv + 8u * nqTot, omega, omega + nqTot, omega + 2u * nqTot);
724
725 // Tensorial derivatives of omega.
726 PhysDerivTensor3DKernel(nq0, nq1, nq2, omega, D0, D1, D2, tderiv,
727 tderiv + nqTot, tderiv + 2u * nqTot);
728 PhysDerivTensor3DKernel(nq0, nq1, nq2, omega + nqTot, D0, D1, D2,
729 tderiv + 3u * nqTot, tderiv + 4u * nqTot,
730 tderiv + 5u * nqTot);
731 PhysDerivTensor3DKernel(nq0, nq1, nq2, omega + 2u * nqTot, D0, D1, D2,
732 tderiv + 6u * nqTot, tderiv + 7u * nqTot,
733 tderiv + 8u * nqTot);
734
735 // out = curl(omega)
736 Curl3DSumFacKernel<SHAPE_TYPE, DEFORMED>(
737 nq0, nq1, nq2, f0, f1, f1m, f2, df_ptr, tderiv, tderiv + nqTot,
738 tderiv + 2u * nqTot, tderiv + 3u * nqTot, tderiv + 4u * nqTot,
739 tderiv + 5u * nqTot, tderiv + 6u * nqTot, tderiv + 7u * nqTot,
740 tderiv + 8u * nqTot, out0, out1, out2);
741}

References in1, in2, PhysDerivTensor3DKernel(), and wsp.

◆ DiffusionCoeffwithWJ1DKernel() [1/2]

template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJ1DKernel ( const unsigned int  ncoord,
const unsigned int  nq0,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const simd_type *  df_ptr,
simd_type *  deriv0 
)
static

1D launcher dispatching to DiffusionCoeffwithWJSegKernel.

Definition at line 1733 of file LaplacianBlockOpSerialAVXSumFacKernels.hpp.

1739{
1740 if constexpr (SHAPE_TYPE == LibUtilities::Seg)
1741 {
1742 DiffusionCoeffwithWJSegKernel<SCALE, DEFORMED, VARCOEFF>(
1743 ncoord, nq0, useDiffCoeff, diffCoeff, varDiffCoeff,
1744 varDiffCoeffSize, jac_ptr, w0, df_ptr, deriv0);
1745 }
1746}

References Nektar::LibUtilities::Seg.

◆ DiffusionCoeffwithWJ1DKernel() [2/2]

template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJ1DKernel ( const unsigned int  ncoord,
const unsigned int  nq0,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const simd_type *  df_ptr,
simd_type *  deriv0,
simd_type *  phys = nullptr,
typename simd_type::scalarType  lambda = 0.0 
)
static

1D launcher dispatching to DiffusionCoeffwithWJSegKernel.

Definition at line 1797 of file HelmholtzBlockOpSerialAVXSumFacKernels.hpp.

1804{
1805 if constexpr (SHAPE_TYPE == LibUtilities::Seg)
1806 {
1807 DiffusionCoeffwithWJSegKernel<SCALE, DEFORMED, VARCOEFF>(
1808 ncoord, nq0, useDiffCoeff, diffCoeff, varDiffCoeff,
1809 varDiffCoeffSize, jac_ptr, w0, df_ptr, deriv0, phys, lambda);
1810 }
1811}

References Nektar::LibUtilities::Seg.

◆ DiffusionCoeffwithWJ2DKernel() [1/2]

template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJ2DKernel ( const unsigned int  ncoord,
const unsigned int  nq0,
const unsigned int  nq1,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const simd_type *  df_ptr,
const simd_type *  h0,
const simd_type *  h1,
simd_type *  deriv0,
simd_type *  deriv1 
)
static

2D launcher dispatching to shape-specific metric kernels.

Definition at line 1753 of file LaplacianBlockOpSerialAVXSumFacKernels.hpp.

1761{
1762 if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
1763 SHAPE_TYPE == LibUtilities::NodalTri)
1764 {
1765 DiffusionCoeffwithWJTriKernel<SCALE, DEFORMED, VARCOEFF>(
1766 ncoord, nq0, nq1, useDiffCoeff, diffCoeff, varDiffCoeff,
1767 varDiffCoeffSize, jac_ptr, w0, w1, df_ptr, h0, h1, deriv0, deriv1);
1768 }
1769 else if constexpr (SHAPE_TYPE == LibUtilities::Quad)
1770 {
1771 DiffusionCoeffwithWJQuadKernel<SCALE, DEFORMED, VARCOEFF>(
1772 ncoord, nq0, nq1, useDiffCoeff, diffCoeff, varDiffCoeff,
1773 varDiffCoeffSize, jac_ptr, w0, w1, df_ptr, deriv0, deriv1);
1774 }
1775}

References Nektar::LibUtilities::NodalTri, Nektar::LibUtilities::Quad, and Nektar::LibUtilities::Tri.

◆ DiffusionCoeffwithWJ2DKernel() [2/2]

template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJ2DKernel ( const unsigned int  ncoord,
const unsigned int  nq0,
const unsigned int  nq1,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const simd_type *  df_ptr,
const simd_type *  h0,
const simd_type *  h1,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  phys = nullptr,
typename simd_type::scalarType  lambda = 0.0 
)
static

2D launcher dispatching to shape-specific metric kernels.

Definition at line 1818 of file HelmholtzBlockOpSerialAVXSumFacKernels.hpp.

1827{
1828 if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
1829 SHAPE_TYPE == LibUtilities::NodalTri)
1830 {
1831 DiffusionCoeffwithWJTriKernel<SCALE, DEFORMED, VARCOEFF>(
1832 ncoord, nq0, nq1, useDiffCoeff, diffCoeff, varDiffCoeff,
1833 varDiffCoeffSize, jac_ptr, w0, w1, df_ptr, h0, h1, deriv0, deriv1,
1834 phys, lambda);
1835 }
1836 else if constexpr (SHAPE_TYPE == LibUtilities::Quad)
1837 {
1838 DiffusionCoeffwithWJQuadKernel<SCALE, DEFORMED, VARCOEFF>(
1839 ncoord, nq0, nq1, useDiffCoeff, diffCoeff, varDiffCoeff,
1840 varDiffCoeffSize, jac_ptr, w0, w1, df_ptr, deriv0, deriv1, phys,
1841 lambda);
1842 }
1843}

References Nektar::LibUtilities::NodalTri, Nektar::LibUtilities::Quad, and Nektar::LibUtilities::Tri.

◆ DiffusionCoeffwithWJ3DKernel() [1/2]

template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJ3DKernel ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const simd_type *  df_ptr,
const simd_type *  h0,
const simd_type *  h1,
const simd_type *  h2,
const simd_type *  h3,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  deriv2 
)
static

3D launcher dispatching to shape-specific metric kernels.

Definition at line 1782 of file LaplacianBlockOpSerialAVXSumFacKernels.hpp.

1792{
1793 if constexpr (SHAPE_TYPE == LibUtilities::Hex)
1794 {
1795 DiffusionCoeffwithWJHexKernel<SCALE, DEFORMED, VARCOEFF>(
1796 nq0, nq1, nq2, useDiffCoeff, diffCoeff, varDiffCoeff,
1797 varDiffCoeffSize, jac_ptr, w0, w1, w2, df_ptr, deriv0, deriv1,
1798 deriv2);
1799 }
1800 else if constexpr ((SHAPE_TYPE == LibUtilities::Tet) ||
1801 (SHAPE_TYPE == LibUtilities::NodalTet))
1802 {
1803 DiffusionCoeffwithWJTetKernel<SCALE, DEFORMED, VARCOEFF>(
1804 nq0, nq1, nq2, useDiffCoeff, diffCoeff, varDiffCoeff,
1805 varDiffCoeffSize, jac_ptr, w0, w1, w2, df_ptr, h0, h1, h2, h3,
1806 deriv0, deriv1, deriv2);
1807 }
1808 else if constexpr ((SHAPE_TYPE == LibUtilities::Prism) ||
1809 (SHAPE_TYPE == LibUtilities::NodalPrism))
1810 {
1811 DiffusionCoeffwithWJPrismKernel<SCALE, DEFORMED, VARCOEFF>(
1812 nq0, nq1, nq2, useDiffCoeff, diffCoeff, varDiffCoeff,
1813 varDiffCoeffSize, jac_ptr, w0, w1, w2, df_ptr, h0, h3, deriv0,
1814 deriv1, deriv2);
1815 }
1816 else if constexpr (SHAPE_TYPE == LibUtilities::Pyr ||
1817 SHAPE_TYPE == LibUtilities::NodalPyr)
1818 {
1819 DiffusionCoeffwithWJPyrKernel<SCALE, DEFORMED, VARCOEFF>(
1820 nq0, nq1, nq2, useDiffCoeff, diffCoeff, varDiffCoeff,
1821 varDiffCoeffSize, jac_ptr, w0, w1, w2, df_ptr, h0, h1, h3, deriv0,
1822 deriv1, deriv2);
1823 }
1824}

References Nektar::LibUtilities::Hex, Nektar::LibUtilities::NodalPrism, Nektar::LibUtilities::NodalPyr, Nektar::LibUtilities::NodalTet, Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, and Nektar::LibUtilities::Tet.

◆ DiffusionCoeffwithWJ3DKernel() [2/2]

template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJ3DKernel ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const simd_type *  df_ptr,
const simd_type *  h0,
const simd_type *  h1,
const simd_type *  h2,
const simd_type *  h3,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  deriv2,
simd_type *  phys = nullptr,
typename simd_type::scalarType  lambda = 0.0 
)
static

3D launcher dispatching to shape-specific metric kernels.

Definition at line 1850 of file HelmholtzBlockOpSerialAVXSumFacKernels.hpp.

1861{
1862 if constexpr (SHAPE_TYPE == LibUtilities::Hex)
1863 {
1864 DiffusionCoeffwithWJHexKernel<SCALE, DEFORMED, VARCOEFF>(
1865 nq0, nq1, nq2, useDiffCoeff, diffCoeff, varDiffCoeff,
1866 varDiffCoeffSize, jac_ptr, w0, w1, w2, df_ptr, deriv0, deriv1,
1867 deriv2, phys, lambda);
1868 }
1869 else if constexpr ((SHAPE_TYPE == LibUtilities::Tet) ||
1870 (SHAPE_TYPE == LibUtilities::NodalTet))
1871 {
1872 DiffusionCoeffwithWJTetKernel<SCALE, DEFORMED, VARCOEFF>(
1873 nq0, nq1, nq2, useDiffCoeff, diffCoeff, varDiffCoeff,
1874 varDiffCoeffSize, jac_ptr, w0, w1, w2, df_ptr, h0, h1, h2, h3,
1875 deriv0, deriv1, deriv2, phys, lambda);
1876 }
1877 else if constexpr ((SHAPE_TYPE == LibUtilities::Prism) ||
1878 (SHAPE_TYPE == LibUtilities::NodalPrism))
1879 {
1880 DiffusionCoeffwithWJPrismKernel<SCALE, DEFORMED, VARCOEFF>(
1881 nq0, nq1, nq2, useDiffCoeff, diffCoeff, varDiffCoeff,
1882 varDiffCoeffSize, jac_ptr, w0, w1, w2, df_ptr, h0, h3, deriv0,
1883 deriv1, deriv2, phys, lambda);
1884 }
1885 else if constexpr (SHAPE_TYPE == LibUtilities::Pyr ||
1886 SHAPE_TYPE == LibUtilities::NodalPyr)
1887 {
1888 DiffusionCoeffwithWJPyrKernel<SCALE, DEFORMED, VARCOEFF>(
1889 nq0, nq1, nq2, useDiffCoeff, diffCoeff, varDiffCoeff,
1890 varDiffCoeffSize, jac_ptr, w0, w1, w2, df_ptr, h0, h1, h3, deriv0,
1891 deriv1, deriv2, phys, lambda);
1892 }
1893}

References Nektar::LibUtilities::Hex, Nektar::LibUtilities::NodalPrism, Nektar::LibUtilities::NodalPyr, Nektar::LibUtilities::NodalTet, Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, and Nektar::LibUtilities::Tet.

◆ DiffusionCoeffwithWJHexKernel() [1/2]

template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJHexKernel ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const simd_type *  df_ptr,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  deriv2 
)
static

Hex kernel contracting reference derivatives with diffusion tensor and metric terms.

Definition at line 735 of file LaplacianBlockOpSerialAVXSumFacKernels.hpp.

744{
745 constexpr auto ndf = 9;
746
747 simd_type jac = {1.0};
748 simd_type df0, df1, df2, df3, df4, df5, df6, df7, df8;
749 simd_type metric00, metric01, metric02, metric11, metric12, metric22;
750
751 simd_type d00 = {1.0};
752 simd_type d01 = {0.0};
753 simd_type d11 = {1.0};
754 simd_type d02 = {0.0};
755 simd_type d12 = {0.0};
756 simd_type d22 = {1.0}; // var diffusion terms
757 simd_type td0, td1, td2, td3, td4, td5, td6, td7,
758 td8; // temp terms for vardiff
759
760 if (useDiffCoeff && !VARCOEFF)
761 {
762 d00 = diffCoeff[0];
763 d01 = diffCoeff[1];
764 d11 = diffCoeff[2];
765 d02 = diffCoeff[3];
766 d12 = diffCoeff[4];
767 d22 = diffCoeff[5];
768 }
769
770 // Precompute Laplacian metrics
771 if constexpr (!DEFORMED)
772 {
773 jac = jac_ptr[0];
774 df0 = df_ptr[0];
775 df1 = df_ptr[1];
776 df2 = df_ptr[2];
777 df3 = df_ptr[3];
778 df4 = df_ptr[4];
779 df5 = df_ptr[5];
780 df6 = df_ptr[6];
781 df7 = df_ptr[7];
782 df8 = df_ptr[8];
783
784 if (!useDiffCoeff)
785 {
786 metric00 = df0 * df0;
787 metric00.fma(df3, df3);
788 metric00.fma(df6, df6);
789
790 metric01 = df0 * df1;
791 metric01.fma(df3, df4);
792 metric01.fma(df6, df7);
793
794 metric02 = df0 * df2;
795 metric02.fma(df3, df5);
796 metric02.fma(df6, df8);
797
798 metric11 = df1 * df1;
799 metric11.fma(df4, df4);
800 metric11.fma(df7, df7);
801
802 metric12 = df1 * df2;
803 metric12.fma(df4, df5);
804 metric12.fma(df7, df8);
805
806 metric22 = df2 * df2;
807 metric22.fma(df5, df5);
808 metric22.fma(df8, df8);
809 }
810 else if (!VARCOEFF)
811 { // with vardiff
812 td0 = df0 * d00;
813 td0.fma(df3, d01);
814 td0.fma(df6, d02);
815
816 td1 = df0 * d01;
817 td1.fma(df3, d11);
818 td1.fma(df6, d12);
819
820 td2 = df0 * d02;
821 td2.fma(df3, d12);
822 td2.fma(df6, d22);
823
824 td3 = df1 * d00;
825 td3.fma(df4, d01);
826 td3.fma(df7, d02);
827
828 td4 = df1 * d01;
829 td4.fma(df4, d11);
830 td4.fma(df7, d12);
831
832 td5 = df1 * d02;
833 td5.fma(df4, d12);
834 td5.fma(df7, d22);
835
836 td6 = df2 * d00;
837 td6.fma(df5, d01);
838 td6.fma(df8, d02);
839
840 td7 = df2 * d01;
841 td7.fma(df5, d11);
842 td7.fma(df8, d12);
843
844 td8 = df2 * d02;
845 td8.fma(df5, d12);
846 td8.fma(df8, d22);
847
848 metric00 = td0 * df0;
849 metric00.fma(td1, df3);
850 metric00.fma(td2, df6);
851
852 metric01 = td0 * df1;
853 metric01.fma(td1, df4);
854 metric01.fma(td2, df7);
855
856 metric02 = td0 * df2;
857 metric02.fma(td1, df5);
858 metric02.fma(td2, df8);
859
860 metric11 = td3 * df1;
861 metric11.fma(td4, df4);
862 metric11.fma(td5, df7);
863
864 metric12 = td3 * df2;
865 metric12.fma(td4, df5);
866 metric12.fma(td5, df8);
867
868 metric22 = td6 * df2;
869 metric22.fma(td7, df5);
870 metric22.fma(td8, df8);
871 }
872 }
873
874 // All matrices are column major ordered since operators used to
875 // be computed via BLAS.
876 if constexpr (DEFORMED || VARCOEFF)
877 {
878 for (unsigned int r = 0; r < nq2; ++r)
879 {
880 simd_type w2J = jac * w2[r];
881 for (unsigned int q = 0; q < nq1; ++q)
882 {
883 simd_type w21J = w2J * w1[q];
884 unsigned int cnt_qr = (r * nq1 + q);
885 for (unsigned int p = 0; p < nq0; ++p)
886 {
887 unsigned int cnt = cnt_qr * nq0 + p;
888
889 simd_type wJ = w21J * w0[p];
890
891 // 2. evaluate diffusion coeff if deformed
892 if constexpr (DEFORMED)
893 {
894 wJ *= jac_ptr[cnt];
895 df0 = df_ptr[cnt * ndf];
896 df1 = df_ptr[cnt * ndf + 1];
897 df2 = df_ptr[cnt * ndf + 2];
898 df3 = df_ptr[cnt * ndf + 3];
899 df4 = df_ptr[cnt * ndf + 4];
900 df5 = df_ptr[cnt * ndf + 5];
901 df6 = df_ptr[cnt * ndf + 6];
902 df7 = df_ptr[cnt * ndf + 7];
903 df8 = df_ptr[cnt * ndf + 8];
904 }
905
906 if (!VARCOEFF && !useDiffCoeff)
907 {
908 metric00 = df0 * df0;
909 metric00.fma(df3, df3);
910 metric00.fma(df6, df6);
911
912 metric01 = df0 * df1;
913 metric01.fma(df3, df4);
914 metric01.fma(df6, df7);
915
916 metric02 = df0 * df2;
917 metric02.fma(df3, df5);
918 metric02.fma(df6, df8);
919
920 metric11 = df1 * df1;
921 metric11.fma(df4, df4);
922 metric11.fma(df7, df7);
923
924 metric12 = df1 * df2;
925 metric12.fma(df4, df5);
926 metric12.fma(df7, df8);
927
928 metric22 = df2 * df2;
929 metric22.fma(df5, df5);
930 metric22.fma(df8, df8);
931 }
932 else
933 { // with vardiff
934
935 if constexpr (VARCOEFF)
936 {
937 d00 = varDiffCoeff[0 * varDiffCoeffSize + cnt];
938 d01 = varDiffCoeff[1 * varDiffCoeffSize + cnt];
939 d11 = varDiffCoeff[2 * varDiffCoeffSize + cnt];
940 d02 = varDiffCoeff[3 * varDiffCoeffSize + cnt];
941 d12 = varDiffCoeff[4 * varDiffCoeffSize + cnt];
942 d22 = varDiffCoeff[5 * varDiffCoeffSize + cnt];
943 }
944
945 td0 = df0 * d00;
946 td0.fma(df3, d01);
947 td0.fma(df6, d02);
948
949 td1 = df0 * d01;
950 td1.fma(df3, d11);
951 td1.fma(df6, d12);
952
953 td2 = df0 * d02;
954 td2.fma(df3, d12);
955 td2.fma(df6, d22);
956
957 td3 = df1 * d00;
958 td3.fma(df4, d01);
959 td3.fma(df7, d02);
960
961 td4 = df1 * d01;
962 td4.fma(df4, d11);
963 td4.fma(df7, d12);
964
965 td5 = df1 * d02;
966 td5.fma(df4, d12);
967 td5.fma(df7, d22);
968
969 td6 = df2 * d00;
970 td6.fma(df5, d01);
971 td6.fma(df8, d02);
972
973 td7 = df2 * d01;
974 td7.fma(df5, d11);
975 td7.fma(df8, d12);
976
977 td8 = df2 * d02;
978 td8.fma(df5, d12);
979 td8.fma(df8, d22);
980
981 metric00 = td0 * df0;
982 metric00.fma(td1, df3);
983 metric00.fma(td2, df6);
984
985 metric01 = td0 * df1;
986 metric01.fma(td1, df4);
987 metric01.fma(td2, df7);
988
989 metric02 = td0 * df2;
990 metric02.fma(td1, df5);
991 metric02.fma(td2, df8);
992
993 metric11 = td3 * df1;
994 metric11.fma(td4, df4);
995 metric11.fma(td5, df7);
996
997 metric12 = td3 * df2;
998 metric12.fma(td4, df5);
999 metric12.fma(td5, df8);
1000
1001 metric22 = td6 * df2;
1002 metric22.fma(td7, df5);
1003 metric22.fma(td8, df8);
1004 }
1005
1006 simd_type d0 = deriv0[cnt];
1007 simd_type d1 = deriv1[cnt];
1008 simd_type d2 = deriv2[cnt];
1009
1010 // 3. apply diffusion coeff to deriv and get output
1011 simd_type tmp0 = metric00 * d0;
1012 tmp0.fma(metric01, d1);
1013 tmp0.fma(metric02, d2);
1014 deriv0[cnt] = tmp0 * wJ;
1015
1016 simd_type tmp1 = metric01 * d0;
1017 tmp1.fma(metric11, d1);
1018 tmp1.fma(metric12, d2);
1019 deriv1[cnt] = tmp1 * wJ;
1020
1021 simd_type tmp2 = metric02 * d0;
1022 tmp2.fma(metric12, d1);
1023 tmp2.fma(metric22, d2);
1024 deriv2[cnt] = tmp2 * wJ;
1025 }
1026 }
1027 }
1028 }
1029 else
1030 { // Make use of the precomputed metric
1031
1032 for (unsigned int r = 0; r < nq2; ++r)
1033 {
1034 simd_type w2J = jac * w2[r];
1035 for (unsigned int q = 0; q < nq1; ++q)
1036 {
1037 simd_type w21J = w2J * w1[q];
1038 unsigned int cnt_qr = (r * nq1 + q);
1039 for (unsigned int p = 0; p < nq0; ++p)
1040 {
1041 unsigned int cnt = cnt_qr * nq0 + p;
1042
1043 simd_type wJ = w21J * w0[p];
1044
1045 simd_type d0 = deriv0[cnt];
1046 simd_type d1 = deriv1[cnt];
1047 simd_type d2 = deriv2[cnt];
1048
1049 simd_type tmp0 = metric00 * d0;
1050 tmp0.fma(metric01, d1);
1051 tmp0.fma(metric02, d2);
1052 deriv0[cnt] = tmp0 * wJ;
1053
1054 simd_type tmp1 = metric01 * d0;
1055 tmp1.fma(metric11, d1);
1056 tmp1.fma(metric12, d2);
1057 deriv1[cnt] = tmp1 * wJ;
1058
1059 simd_type tmp2 = metric02 * d0;
1060 tmp2.fma(metric12, d1);
1061 tmp2.fma(metric22, d2);
1062 deriv2[cnt] = tmp2 * wJ;
1063 }
1064 }
1065 }
1066 }
1067}

References jac.

◆ DiffusionCoeffwithWJHexKernel() [2/2]

template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJHexKernel ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const simd_type *  df_ptr,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  deriv2,
simd_type *  phys,
typename simd_type::scalarType  lambda = 0.0 
)
static

Hex kernel contracting reference derivatives with diffusion tensor and metric terms, with optional lambda-weighted mass contribution.

Definition at line 768 of file HelmholtzBlockOpSerialAVXSumFacKernels.hpp.

779{
780 constexpr auto ndf = 9;
781
782 simd_type jac = {1.0};
783 simd_type df0, df1, df2, df3, df4, df5, df6, df7, df8;
784 simd_type metric00, metric01, metric02, metric11, metric12, metric22;
785
786 simd_type d00 = {1.0};
787 simd_type d01 = {0.0};
788 simd_type d11 = {1.0};
789 simd_type d02 = {0.0};
790 simd_type d12 = {0.0};
791 simd_type d22 = {1.0}; // var diffusion terms
792 simd_type td0, td1, td2, td3, td4, td5, td6, td7,
793 td8; // temp terms for vardiff
794
795 if (useDiffCoeff && !VARCOEFF)
796 {
797 d00 = diffCoeff[0];
798 d01 = diffCoeff[1];
799 d11 = diffCoeff[2];
800 d02 = diffCoeff[3];
801 d12 = diffCoeff[4];
802 d22 = diffCoeff[5];
803 }
804
805 // Precompute Laplacian metrics
806 if constexpr (!DEFORMED)
807 {
808 jac = jac_ptr[0];
809 df0 = df_ptr[0];
810 df1 = df_ptr[1];
811 df2 = df_ptr[2];
812 df3 = df_ptr[3];
813 df4 = df_ptr[4];
814 df5 = df_ptr[5];
815 df6 = df_ptr[6];
816 df7 = df_ptr[7];
817 df8 = df_ptr[8];
818
819 if (!useDiffCoeff)
820 {
821 metric00 = df0 * df0;
822 metric00.fma(df3, df3);
823 metric00.fma(df6, df6);
824
825 metric01 = df0 * df1;
826 metric01.fma(df3, df4);
827 metric01.fma(df6, df7);
828
829 metric02 = df0 * df2;
830 metric02.fma(df3, df5);
831 metric02.fma(df6, df8);
832
833 metric11 = df1 * df1;
834 metric11.fma(df4, df4);
835 metric11.fma(df7, df7);
836
837 metric12 = df1 * df2;
838 metric12.fma(df4, df5);
839 metric12.fma(df7, df8);
840
841 metric22 = df2 * df2;
842 metric22.fma(df5, df5);
843 metric22.fma(df8, df8);
844 }
845 else if (!VARCOEFF)
846 { // with vardiff
847 td0 = df0 * d00;
848 td0.fma(df3, d01);
849 td0.fma(df6, d02);
850
851 td1 = df0 * d01;
852 td1.fma(df3, d11);
853 td1.fma(df6, d12);
854
855 td2 = df0 * d02;
856 td2.fma(df3, d12);
857 td2.fma(df6, d22);
858
859 td3 = df1 * d00;
860 td3.fma(df4, d01);
861 td3.fma(df7, d02);
862
863 td4 = df1 * d01;
864 td4.fma(df4, d11);
865 td4.fma(df7, d12);
866
867 td5 = df1 * d02;
868 td5.fma(df4, d12);
869 td5.fma(df7, d22);
870
871 td6 = df2 * d00;
872 td6.fma(df5, d01);
873 td6.fma(df8, d02);
874
875 td7 = df2 * d01;
876 td7.fma(df5, d11);
877 td7.fma(df8, d12);
878
879 td8 = df2 * d02;
880 td8.fma(df5, d12);
881 td8.fma(df8, d22);
882
883 metric00 = td0 * df0;
884 metric00.fma(td1, df3);
885 metric00.fma(td2, df6);
886
887 metric01 = td0 * df1;
888 metric01.fma(td1, df4);
889 metric01.fma(td2, df7);
890
891 metric02 = td0 * df2;
892 metric02.fma(td1, df5);
893 metric02.fma(td2, df8);
894
895 metric11 = td3 * df1;
896 metric11.fma(td4, df4);
897 metric11.fma(td5, df7);
898
899 metric12 = td3 * df2;
900 metric12.fma(td4, df5);
901 metric12.fma(td5, df8);
902
903 metric22 = td6 * df2;
904 metric22.fma(td7, df5);
905 metric22.fma(td8, df8);
906 }
907 }
908
909 // All matrices are column major ordered since operators used to
910 // be computed via BLAS.
911 if constexpr (DEFORMED || VARCOEFF)
912 {
913 for (unsigned int r = 0; r < nq2; ++r)
914 {
915 simd_type w2J = jac * w2[r];
916 for (unsigned int q = 0; q < nq1; ++q)
917 {
918 simd_type w21J = w2J * w1[q];
919 unsigned int cnt_qr = (r * nq1 + q);
920 for (unsigned int p = 0; p < nq0; ++p)
921 {
922 unsigned int cnt = cnt_qr * nq0 + p;
923
924 simd_type wJ = w21J * w0[p];
925
926 // 2. evaluate diffusion coeff if deformed
927 if constexpr (DEFORMED)
928 {
929 wJ *= jac_ptr[cnt];
930 df0 = df_ptr[cnt * ndf];
931 df1 = df_ptr[cnt * ndf + 1];
932 df2 = df_ptr[cnt * ndf + 2];
933 df3 = df_ptr[cnt * ndf + 3];
934 df4 = df_ptr[cnt * ndf + 4];
935 df5 = df_ptr[cnt * ndf + 5];
936 df6 = df_ptr[cnt * ndf + 6];
937 df7 = df_ptr[cnt * ndf + 7];
938 df8 = df_ptr[cnt * ndf + 8];
939 }
940
941 if (!VARCOEFF && !useDiffCoeff)
942 {
943 metric00 = df0 * df0;
944 metric00.fma(df3, df3);
945 metric00.fma(df6, df6);
946
947 metric01 = df0 * df1;
948 metric01.fma(df3, df4);
949 metric01.fma(df6, df7);
950
951 metric02 = df0 * df2;
952 metric02.fma(df3, df5);
953 metric02.fma(df6, df8);
954
955 metric11 = df1 * df1;
956 metric11.fma(df4, df4);
957 metric11.fma(df7, df7);
958
959 metric12 = df1 * df2;
960 metric12.fma(df4, df5);
961 metric12.fma(df7, df8);
962
963 metric22 = df2 * df2;
964 metric22.fma(df5, df5);
965 metric22.fma(df8, df8);
966 }
967 else
968 { // with vardiff
969
970 if constexpr (VARCOEFF)
971 {
972 d00 = varDiffCoeff[0 * varDiffCoeffSize + cnt];
973 d01 = varDiffCoeff[1 * varDiffCoeffSize + cnt];
974 d11 = varDiffCoeff[2 * varDiffCoeffSize + cnt];
975 d02 = varDiffCoeff[3 * varDiffCoeffSize + cnt];
976 d12 = varDiffCoeff[4 * varDiffCoeffSize + cnt];
977 d22 = varDiffCoeff[5 * varDiffCoeffSize + cnt];
978 }
979
980 td0 = df0 * d00;
981 td0.fma(df3, d01);
982 td0.fma(df6, d02);
983
984 td1 = df0 * d01;
985 td1.fma(df3, d11);
986 td1.fma(df6, d12);
987
988 td2 = df0 * d02;
989 td2.fma(df3, d12);
990 td2.fma(df6, d22);
991
992 td3 = df1 * d00;
993 td3.fma(df4, d01);
994 td3.fma(df7, d02);
995
996 td4 = df1 * d01;
997 td4.fma(df4, d11);
998 td4.fma(df7, d12);
999
1000 td5 = df1 * d02;
1001 td5.fma(df4, d12);
1002 td5.fma(df7, d22);
1003
1004 td6 = df2 * d00;
1005 td6.fma(df5, d01);
1006 td6.fma(df8, d02);
1007
1008 td7 = df2 * d01;
1009 td7.fma(df5, d11);
1010 td7.fma(df8, d12);
1011
1012 td8 = df2 * d02;
1013 td8.fma(df5, d12);
1014 td8.fma(df8, d22);
1015
1016 metric00 = td0 * df0;
1017 metric00.fma(td1, df3);
1018 metric00.fma(td2, df6);
1019
1020 metric01 = td0 * df1;
1021 metric01.fma(td1, df4);
1022 metric01.fma(td2, df7);
1023
1024 metric02 = td0 * df2;
1025 metric02.fma(td1, df5);
1026 metric02.fma(td2, df8);
1027
1028 metric11 = td3 * df1;
1029 metric11.fma(td4, df4);
1030 metric11.fma(td5, df7);
1031
1032 metric12 = td3 * df2;
1033 metric12.fma(td4, df5);
1034 metric12.fma(td5, df8);
1035
1036 metric22 = td6 * df2;
1037 metric22.fma(td7, df5);
1038 metric22.fma(td8, df8);
1039 }
1040
1041 simd_type d0 = deriv0[cnt];
1042 simd_type d1 = deriv1[cnt];
1043 simd_type d2 = deriv2[cnt];
1044
1045 // 3. apply diffusion coeff to deriv and get output
1046 simd_type tmp0 = metric00 * d0;
1047 tmp0.fma(metric01, d1);
1048 tmp0.fma(metric02, d2);
1049 deriv0[cnt] = tmp0 * wJ;
1050
1051 simd_type tmp1 = metric01 * d0;
1052 tmp1.fma(metric11, d1);
1053 tmp1.fma(metric12, d2);
1054 deriv1[cnt] = tmp1 * wJ;
1055
1056 simd_type tmp2 = metric02 * d0;
1057 tmp2.fma(metric12, d1);
1058 tmp2.fma(metric22, d2);
1059 deriv2[cnt] = tmp2 * wJ;
1060
1061 if constexpr (SCALE)
1062 {
1063 phys[cnt] *= lambda * wJ;
1064 }
1065 }
1066 }
1067 }
1068 }
1069 else
1070 { // Make use of the precomputed metric
1071
1072 for (unsigned int r = 0; r < nq2; ++r)
1073 {
1074 simd_type w2J = jac * w2[r];
1075 for (unsigned int q = 0; q < nq1; ++q)
1076 {
1077 simd_type w21J = w2J * w1[q];
1078 unsigned int cnt_qr = (r * nq1 + q);
1079 for (unsigned int p = 0; p < nq0; ++p)
1080 {
1081 unsigned int cnt = cnt_qr * nq0 + p;
1082
1083 simd_type wJ = w21J * w0[p];
1084
1085 simd_type d0 = deriv0[cnt];
1086 simd_type d1 = deriv1[cnt];
1087 simd_type d2 = deriv2[cnt];
1088
1089 simd_type tmp0 = metric00 * d0;
1090 tmp0.fma(metric01, d1);
1091 tmp0.fma(metric02, d2);
1092 deriv0[cnt] = tmp0 * wJ;
1093
1094 simd_type tmp1 = metric01 * d0;
1095 tmp1.fma(metric11, d1);
1096 tmp1.fma(metric12, d2);
1097 deriv1[cnt] = tmp1 * wJ;
1098
1099 simd_type tmp2 = metric02 * d0;
1100 tmp2.fma(metric12, d1);
1101 tmp2.fma(metric22, d2);
1102 deriv2[cnt] = tmp2 * wJ;
1103
1104 if constexpr (SCALE)
1105 {
1106 phys[cnt] *= lambda * wJ;
1107 }
1108 }
1109 }
1110 }
1111 }
1112}

References jac.

◆ DiffusionCoeffwithWJPrismKernel() [1/2]

template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJPrismKernel ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const simd_type *  df_ptr,
const simd_type *  hfac0,
const simd_type *  hfac3,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  deriv2 
)
static

Prism kernel contracting reference derivatives with diffusion tensor and metric terms.

Definition at line 1301 of file LaplacianBlockOpSerialAVXSumFacKernels.hpp.

1311{
1312 constexpr auto ndf = 9;
1313
1314 simd_type jac = {1.0};
1315 simd_type df0, df1, df2, df3, df4, df5, df6, df7, df8;
1316 simd_type g0, g1, g2, g3, g4, g5; // metrics
1317 [[maybe_unused]] simd_type d00 = {1.0};
1318 [[maybe_unused]] simd_type d01 = {0.0};
1319 [[maybe_unused]] simd_type d11 = {1.0};
1320 [[maybe_unused]] simd_type d02 = {0.0};
1321 [[maybe_unused]] simd_type d12 = {0.0};
1322 [[maybe_unused]] simd_type d22 = {1.0}; // var diffusion terms
1323 simd_type td0, td1, td2, td3, td4, td5, td6, td7,
1324 td8; // temp terms for vardiff
1325
1326 if (useDiffCoeff && !VARCOEFF)
1327 {
1328 d00 = diffCoeff[0];
1329 d01 = diffCoeff[1];
1330 d11 = diffCoeff[2];
1331 d02 = diffCoeff[3];
1332 d12 = diffCoeff[4];
1333 d22 = diffCoeff[5];
1334 }
1335
1336 if constexpr (!DEFORMED)
1337 {
1338 jac = jac_ptr[0];
1339 df0 = df_ptr[0];
1340 df1 = df_ptr[1];
1341 df2 = df_ptr[2];
1342 df3 = df_ptr[3];
1343 df4 = df_ptr[4];
1344 df5 = df_ptr[5];
1345 df6 = df_ptr[6];
1346 df7 = df_ptr[7];
1347 df8 = df_ptr[8];
1348 }
1349
1350 for (unsigned int r = 0; r < nq2; ++r)
1351 {
1352 simd_type h3 = hfac3[r];
1353 simd_type w2J = jac * w2[r];
1354 for (unsigned int q = 0; q < nq1; ++q)
1355 {
1356 unsigned int cnt_qr = (r * nq1 + q);
1357 simd_type w21J = w2J * w1[q];
1358 for (unsigned int p = 0; p < nq0; ++p)
1359 {
1360 unsigned int cnt = cnt_qr * nq0 + p;
1361 simd_type wJ = w21J * w0[p];
1362
1363 // 3. apply diffusion coeff to deriv and fill output
1364 simd_type h0 = hfac0[p];
1365
1366 if constexpr (DEFORMED)
1367 {
1368 wJ *= jac_ptr[cnt];
1369 df0 = df_ptr[cnt * ndf];
1370 df1 = df_ptr[cnt * ndf + 1];
1371 df2 = df_ptr[cnt * ndf + 2];
1372 df3 = df_ptr[cnt * ndf + 3];
1373 df4 = df_ptr[cnt * ndf + 4];
1374 df5 = df_ptr[cnt * ndf + 5];
1375 df6 = df_ptr[cnt * ndf + 6];
1376 df7 = df_ptr[cnt * ndf + 7];
1377 df8 = df_ptr[cnt * ndf + 8];
1378 }
1379 simd_type tmp0 = h3 * (h0 * df2 + df0);
1380 simd_type tmp1 = h3 * (h0 * df5 + df3);
1381 simd_type tmp2 = h3 * (h0 * df8 + df6);
1382
1383 if (!VARCOEFF && !useDiffCoeff)
1384 {
1385 g0 = tmp0 * tmp0;
1386 g0.fma(tmp1, tmp1);
1387 g0.fma(tmp2, tmp2);
1388
1389 g3 = df1 * tmp0;
1390 g3.fma(df4, tmp1);
1391 g3.fma(df7, tmp2);
1392
1393 g4 = df2 * tmp0;
1394 g4.fma(df5, tmp1);
1395 g4.fma(df8, tmp2);
1396
1397 g1 = df1 * df1;
1398 g1.fma(df4, df4);
1399 g1.fma(df7, df7);
1400
1401 g2 = df2 * df2;
1402 g2.fma(df5, df5);
1403 g2.fma(df8, df8);
1404
1405 g5 = df1 * df2;
1406 g5.fma(df4, df5);
1407 g5.fma(df7, df8);
1408 }
1409 else
1410 {
1411 // vardiff
1412 if constexpr (VARCOEFF)
1413 {
1414 d00 = varDiffCoeff[0 * varDiffCoeffSize + cnt];
1415 d01 = varDiffCoeff[1 * varDiffCoeffSize + cnt];
1416 d11 = varDiffCoeff[2 * varDiffCoeffSize + cnt];
1417 d02 = varDiffCoeff[3 * varDiffCoeffSize + cnt];
1418 d12 = varDiffCoeff[4 * varDiffCoeffSize + cnt];
1419 d22 = varDiffCoeff[5 * varDiffCoeffSize + cnt];
1420 }
1421
1422 td0 = tmp0 * d00;
1423 td0.fma(tmp1, d01);
1424 td0.fma(tmp2, d02);
1425
1426 td1 = tmp0 * d01;
1427 td1.fma(tmp1, d11);
1428 td1.fma(tmp2, d12);
1429
1430 td2 = tmp0 * d02;
1431 td2.fma(tmp1, d12);
1432 td2.fma(tmp2, d22);
1433
1434 td3 = df1 * d00;
1435 td3.fma(df4, d01);
1436 td3.fma(df7, d02);
1437
1438 td4 = df1 * d01;
1439 td4.fma(df4, d11);
1440 td4.fma(df7, d12);
1441
1442 td5 = df1 * d02;
1443 td5.fma(df4, d12);
1444 td5.fma(df7, d22);
1445
1446 td6 = df2 * d00;
1447 td6.fma(df5, d01);
1448 td6.fma(df8, d02);
1449
1450 td7 = df2 * d01;
1451 td7.fma(df5, d11);
1452 td7.fma(df8, d12);
1453
1454 td8 = df2 * d02;
1455 td8.fma(df5, d12);
1456 td8.fma(df8, d22);
1457
1458 g0 = td0 * tmp0;
1459 g0.fma(td1, tmp1);
1460 g0.fma(td2, tmp2);
1461
1462 g3 = td0 * df1;
1463 g3.fma(td1, df4);
1464 g3.fma(td2, df7);
1465
1466 g4 = td0 * df2;
1467 g4.fma(td1, df5);
1468 g4.fma(td2, df8);
1469
1470 g1 = td3 * df1;
1471 g1.fma(td4, df4);
1472 g1.fma(td5, df7);
1473
1474 g5 = td3 * df2;
1475 g5.fma(td4, df5);
1476 g5.fma(td5, df8);
1477
1478 g2 = td6 * df2;
1479 g2.fma(td7, df5);
1480 g2.fma(td8, df8);
1481 }
1482
1483 simd_type d0 = deriv0[cnt];
1484 simd_type d1 = deriv1[cnt];
1485 simd_type d2 = deriv2[cnt];
1486
1487 tmp0 = g0 * d0;
1488 tmp0.fma(g3, d1);
1489 tmp0.fma(g4, d2);
1490 deriv0[cnt] = tmp0 * wJ;
1491
1492 tmp1 = g3 * d0;
1493 tmp1.fma(g1, d1);
1494 tmp1.fma(g5, d2);
1495 deriv1[cnt] = tmp1 * wJ;
1496
1497 tmp2 = g4 * d0;
1498 tmp2.fma(g5, d1);
1499 tmp2.fma(g2, d2);
1500 deriv2[cnt] = tmp2 * wJ;
1501 }
1502 }
1503 }
1504}

References jac.

◆ DiffusionCoeffwithWJPrismKernel() [2/2]

template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJPrismKernel ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const simd_type *  df_ptr,
const simd_type *  hfac0,
const simd_type *  hfac3,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  deriv2,
simd_type *  phys,
typename simd_type::scalarType  lambda = 0.0 
)
static

Prism kernel contracting reference derivatives with diffusion tensor and metric terms, with optional lambda-weighted mass contribution.

Definition at line 1352 of file HelmholtzBlockOpSerialAVXSumFacKernels.hpp.

1363{
1364 constexpr auto ndf = 9;
1365
1366 simd_type jac = {1.0};
1367 simd_type df0, df1, df2, df3, df4, df5, df6, df7, df8;
1368 simd_type g0, g1, g2, g3, g4, g5; // metrics
1369 [[maybe_unused]] simd_type d00 = {1.0};
1370 [[maybe_unused]] simd_type d01 = {0.0};
1371 [[maybe_unused]] simd_type d11 = {1.0};
1372 [[maybe_unused]] simd_type d02 = {0.0};
1373 [[maybe_unused]] simd_type d12 = {0.0};
1374 [[maybe_unused]] simd_type d22 = {1.0}; // var diffusion terms
1375 simd_type td0, td1, td2, td3, td4, td5, td6, td7,
1376 td8; // temp terms for vardiff
1377
1378 if (useDiffCoeff && !VARCOEFF)
1379 {
1380 d00 = diffCoeff[0];
1381 d01 = diffCoeff[1];
1382 d11 = diffCoeff[2];
1383 d02 = diffCoeff[3];
1384 d12 = diffCoeff[4];
1385 d22 = diffCoeff[5];
1386 }
1387
1388 if constexpr (!DEFORMED)
1389 {
1390 jac = jac_ptr[0];
1391 df0 = df_ptr[0];
1392 df1 = df_ptr[1];
1393 df2 = df_ptr[2];
1394 df3 = df_ptr[3];
1395 df4 = df_ptr[4];
1396 df5 = df_ptr[5];
1397 df6 = df_ptr[6];
1398 df7 = df_ptr[7];
1399 df8 = df_ptr[8];
1400 }
1401
1402 for (unsigned int r = 0; r < nq2; ++r)
1403 {
1404 simd_type h3 = hfac3[r];
1405 simd_type w2J = jac * w2[r];
1406 for (unsigned int q = 0; q < nq1; ++q)
1407 {
1408 unsigned int cnt_qr = (r * nq1 + q);
1409 simd_type w21J = w2J * w1[q];
1410 for (unsigned int p = 0; p < nq0; ++p)
1411 {
1412 unsigned int cnt = cnt_qr * nq0 + p;
1413 simd_type wJ = w21J * w0[p];
1414
1415 // 3. apply diffusion coeff to deriv and fill output
1416 simd_type h0 = hfac0[p];
1417
1418 if constexpr (DEFORMED)
1419 {
1420 wJ *= jac_ptr[cnt];
1421 df0 = df_ptr[cnt * ndf];
1422 df1 = df_ptr[cnt * ndf + 1];
1423 df2 = df_ptr[cnt * ndf + 2];
1424 df3 = df_ptr[cnt * ndf + 3];
1425 df4 = df_ptr[cnt * ndf + 4];
1426 df5 = df_ptr[cnt * ndf + 5];
1427 df6 = df_ptr[cnt * ndf + 6];
1428 df7 = df_ptr[cnt * ndf + 7];
1429 df8 = df_ptr[cnt * ndf + 8];
1430 }
1431 simd_type tmp0 = h3 * (h0 * df2 + df0);
1432 simd_type tmp1 = h3 * (h0 * df5 + df3);
1433 simd_type tmp2 = h3 * (h0 * df8 + df6);
1434
1435 if (!VARCOEFF && !useDiffCoeff)
1436 {
1437 g0 = tmp0 * tmp0;
1438 g0.fma(tmp1, tmp1);
1439 g0.fma(tmp2, tmp2);
1440
1441 g3 = df1 * tmp0;
1442 g3.fma(df4, tmp1);
1443 g3.fma(df7, tmp2);
1444
1445 g4 = df2 * tmp0;
1446 g4.fma(df5, tmp1);
1447 g4.fma(df8, tmp2);
1448
1449 g1 = df1 * df1;
1450 g1.fma(df4, df4);
1451 g1.fma(df7, df7);
1452
1453 g2 = df2 * df2;
1454 g2.fma(df5, df5);
1455 g2.fma(df8, df8);
1456
1457 g5 = df1 * df2;
1458 g5.fma(df4, df5);
1459 g5.fma(df7, df8);
1460 }
1461 else
1462 {
1463 // vardiff
1464 if constexpr (VARCOEFF)
1465 {
1466 d00 = varDiffCoeff[0 * varDiffCoeffSize + cnt];
1467 d01 = varDiffCoeff[1 * varDiffCoeffSize + cnt];
1468 d11 = varDiffCoeff[2 * varDiffCoeffSize + cnt];
1469 d02 = varDiffCoeff[3 * varDiffCoeffSize + cnt];
1470 d12 = varDiffCoeff[4 * varDiffCoeffSize + cnt];
1471 d22 = varDiffCoeff[5 * varDiffCoeffSize + cnt];
1472 }
1473
1474 td0 = tmp0 * d00;
1475 td0.fma(tmp1, d01);
1476 td0.fma(tmp2, d02);
1477
1478 td1 = tmp0 * d01;
1479 td1.fma(tmp1, d11);
1480 td1.fma(tmp2, d12);
1481
1482 td2 = tmp0 * d02;
1483 td2.fma(tmp1, d12);
1484 td2.fma(tmp2, d22);
1485
1486 td3 = df1 * d00;
1487 td3.fma(df4, d01);
1488 td3.fma(df7, d02);
1489
1490 td4 = df1 * d01;
1491 td4.fma(df4, d11);
1492 td4.fma(df7, d12);
1493
1494 td5 = df1 * d02;
1495 td5.fma(df4, d12);
1496 td5.fma(df7, d22);
1497
1498 td6 = df2 * d00;
1499 td6.fma(df5, d01);
1500 td6.fma(df8, d02);
1501
1502 td7 = df2 * d01;
1503 td7.fma(df5, d11);
1504 td7.fma(df8, d12);
1505
1506 td8 = df2 * d02;
1507 td8.fma(df5, d12);
1508 td8.fma(df8, d22);
1509
1510 g0 = td0 * tmp0;
1511 g0.fma(td1, tmp1);
1512 g0.fma(td2, tmp2);
1513
1514 g3 = td0 * df1;
1515 g3.fma(td1, df4);
1516 g3.fma(td2, df7);
1517
1518 g4 = td0 * df2;
1519 g4.fma(td1, df5);
1520 g4.fma(td2, df8);
1521
1522 g1 = td3 * df1;
1523 g1.fma(td4, df4);
1524 g1.fma(td5, df7);
1525
1526 g5 = td3 * df2;
1527 g5.fma(td4, df5);
1528 g5.fma(td5, df8);
1529
1530 g2 = td6 * df2;
1531 g2.fma(td7, df5);
1532 g2.fma(td8, df8);
1533 }
1534
1535 simd_type d0 = deriv0[cnt];
1536 simd_type d1 = deriv1[cnt];
1537 simd_type d2 = deriv2[cnt];
1538
1539 tmp0 = g0 * d0;
1540 tmp0.fma(g3, d1);
1541 tmp0.fma(g4, d2);
1542 deriv0[cnt] = tmp0 * wJ;
1543
1544 tmp1 = g3 * d0;
1545 tmp1.fma(g1, d1);
1546 tmp1.fma(g5, d2);
1547 deriv1[cnt] = tmp1 * wJ;
1548
1549 tmp2 = g4 * d0;
1550 tmp2.fma(g5, d1);
1551 tmp2.fma(g2, d2);
1552 deriv2[cnt] = tmp2 * wJ;
1553
1554 if constexpr (SCALE)
1555 {
1556 phys[cnt] *= lambda * wJ;
1557 }
1558 }
1559 }
1560 }
1561}

References jac.

◆ DiffusionCoeffwithWJPyrKernel() [1/2]

template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJPyrKernel ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const simd_type *  df_ptr,
const simd_type *  hfac0,
const simd_type *  hfac1,
const simd_type *  hfac3,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  deriv2 
)
static

Pyramid kernel contracting reference derivatives with diffusion tensor and metric terms.

Definition at line 1511 of file LaplacianBlockOpSerialAVXSumFacKernels.hpp.

1521{
1522 constexpr auto ndf = 9;
1523
1524 simd_type jac = {1.0};
1525 simd_type df0, df1, df2, df3, df4, df5, df6, df7, df8;
1526 simd_type g0, g1, g2, g3, g4, g5; // metrics
1527 simd_type d00 = {1.0};
1528 simd_type d01 = {0.0};
1529 simd_type d11 = {1.0};
1530 simd_type d02 = {0.0};
1531 simd_type d12 = {0.0};
1532 simd_type d22 = {1.0}; // var diffusion terms
1533 simd_type td0, td1, td2, td3, td4, td5, td6, td7,
1534 td8; // temp terms for vardiff
1535
1536 if (useDiffCoeff && !VARCOEFF)
1537 {
1538 d00 = diffCoeff[0];
1539 d01 = diffCoeff[1];
1540 d11 = diffCoeff[2];
1541 d02 = diffCoeff[3];
1542 d12 = diffCoeff[4];
1543 d22 = diffCoeff[5];
1544 }
1545
1546 if constexpr (!DEFORMED)
1547 {
1548 jac = jac_ptr[0];
1549 df0 = df_ptr[0];
1550 df1 = df_ptr[1];
1551 df2 = df_ptr[2];
1552 df3 = df_ptr[3];
1553 df4 = df_ptr[4];
1554 df5 = df_ptr[5];
1555 df6 = df_ptr[6];
1556 df7 = df_ptr[7];
1557 df8 = df_ptr[8];
1558 }
1559
1560 for (unsigned int r = 0; r < nq2; ++r)
1561 {
1562 simd_type h3 = hfac3[r];
1563 simd_type w2J = jac * w2[r];
1564 for (unsigned int q = 0; q < nq1; ++q)
1565 {
1566 simd_type h1 = hfac1[q];
1567 simd_type h1h3 = h1 * h3;
1568 simd_type w21J = w2J * w1[q];
1569 unsigned int cnt_qr = (r * nq1 + q);
1570 for (unsigned int p = 0; p < nq0; ++p)
1571 {
1572 unsigned int cnt = cnt_qr * nq0 + p;
1573
1574 // 3. apply diffusion coeff to deriv and fill output
1575 simd_type h0 = hfac0[p];
1576 simd_type h0h3 = h0 * h3;
1577 simd_type wJ = w21J * w0[p];
1578
1579 if constexpr (DEFORMED)
1580 {
1581 wJ *= jac_ptr[cnt];
1582 df0 = df_ptr[cnt * ndf];
1583 df1 = df_ptr[cnt * ndf + 1];
1584 df2 = df_ptr[cnt * ndf + 2];
1585 df3 = df_ptr[cnt * ndf + 3];
1586 df4 = df_ptr[cnt * ndf + 4];
1587 df5 = df_ptr[cnt * ndf + 5];
1588 df6 = df_ptr[cnt * ndf + 6];
1589 df7 = df_ptr[cnt * ndf + 7];
1590 df8 = df_ptr[cnt * ndf + 8];
1591 }
1592 simd_type tmp0 = h3 * df0;
1593 tmp0.fma(h0h3, df2);
1594 simd_type tmp1 = h3 * df3;
1595 tmp1.fma(h0h3, df5);
1596 simd_type tmp2 = h3 * df6;
1597 tmp2.fma(h0h3, df8);
1598
1599 simd_type tmp3 = h3 * df1;
1600 tmp3.fma(h1h3, df2);
1601 simd_type tmp4 = h3 * df4;
1602 tmp4.fma(h1h3, df5);
1603 simd_type tmp5 = h3 * df7;
1604 tmp5.fma(h1h3, df8);
1605
1606 if (!VARCOEFF && !useDiffCoeff)
1607 {
1608 g0 = tmp0 * tmp0;
1609 g0.fma(tmp1, tmp1);
1610 g0.fma(tmp2, tmp2);
1611
1612 g1 = tmp3 * tmp3;
1613 g1.fma(tmp4, tmp4);
1614 g1.fma(tmp5, tmp5);
1615
1616 g2 = df2 * df2;
1617 g2.fma(df5, df5);
1618 g2.fma(df8, df8);
1619
1620 g3 = tmp0 * tmp3;
1621 g3.fma(tmp1, tmp4);
1622 g3.fma(tmp2, tmp5);
1623
1624 g4 = df2 * tmp0;
1625 g4.fma(df5, tmp1);
1626 g4.fma(df8, tmp2);
1627
1628 g5 = df2 * tmp3;
1629 g5.fma(df5, tmp4);
1630 g5.fma(df8, tmp5);
1631 }
1632 else
1633 {
1634 if constexpr (VARCOEFF)
1635 {
1636 d00 = varDiffCoeff[0 * varDiffCoeffSize + cnt];
1637 d01 = varDiffCoeff[1 * varDiffCoeffSize + cnt];
1638 d11 = varDiffCoeff[2 * varDiffCoeffSize + cnt];
1639 d02 = varDiffCoeff[3 * varDiffCoeffSize + cnt];
1640 d12 = varDiffCoeff[4 * varDiffCoeffSize + cnt];
1641 d22 = varDiffCoeff[5 * varDiffCoeffSize + cnt];
1642 }
1643
1644 td0 = tmp0 * d00;
1645 td0.fma(tmp1, d01);
1646 td0.fma(tmp2, d02);
1647
1648 td1 = tmp0 * d01;
1649 td1.fma(tmp1, d11);
1650 td1.fma(tmp2, d12);
1651
1652 td2 = tmp0 * d02;
1653 td2.fma(tmp1, d12);
1654 td2.fma(tmp2, d22);
1655
1656 td3 = tmp3 * d00;
1657 td3.fma(tmp4, d01);
1658 td3.fma(tmp5, d02);
1659
1660 td4 = tmp3 * d01;
1661 td4.fma(tmp4, d11);
1662 td4.fma(tmp5, d12);
1663
1664 td5 = tmp3 * d02;
1665 td5.fma(tmp4, d12);
1666 td5.fma(tmp5, d22);
1667
1668 td6 = df2 * d00;
1669 td6.fma(df5, d01);
1670 td6.fma(df8, d02);
1671
1672 td7 = df2 * d01;
1673 td7.fma(df5, d11);
1674 td7.fma(df8, d12);
1675
1676 td8 = df2 * d02;
1677 td8.fma(df5, d12);
1678 td8.fma(df8, d22);
1679
1680 g0 = td0 * tmp0;
1681 g0.fma(td1, tmp1);
1682 g0.fma(td2, tmp2);
1683
1684 g3 = td0 * tmp3;
1685 g3.fma(td1, tmp4);
1686 g3.fma(td2, tmp5);
1687
1688 g4 = td0 * df2;
1689 g4.fma(td1, df5);
1690 g4.fma(td2, df8);
1691
1692 g1 = td3 * tmp3;
1693 g1.fma(td4, tmp4);
1694 g1.fma(td5, tmp5);
1695
1696 g5 = td3 * df2;
1697 g5.fma(td4, df5);
1698 g5.fma(td5, df8);
1699
1700 g2 = td6 * df2;
1701 g2.fma(td7, df5);
1702 g2.fma(td8, df8);
1703 }
1704
1705 simd_type d0 = deriv0[cnt];
1706 simd_type d1 = deriv1[cnt];
1707 simd_type d2 = deriv2[cnt];
1708
1709 tmp0 = g0 * d0;
1710 tmp0.fma(g3, d1);
1711 tmp0.fma(g4, d2);
1712 deriv0[cnt] = tmp0 * wJ;
1713
1714 tmp1 = g3 * d0;
1715 tmp1.fma(g1, d1);
1716 tmp1.fma(g5, d2);
1717 deriv1[cnt] = tmp1 * wJ;
1718
1719 tmp2 = g4 * d0;
1720 tmp2.fma(g5, d1);
1721 tmp2.fma(g2, d2);
1722 deriv2[cnt] = tmp2 * wJ;
1723 }
1724 }
1725 }
1726}

References jac.

◆ DiffusionCoeffwithWJPyrKernel() [2/2]

template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJPyrKernel ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const simd_type *  df_ptr,
const simd_type *  hfac0,
const simd_type *  hfac1,
const simd_type *  hfac3,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  deriv2,
simd_type *  phys,
typename simd_type::scalarType  lambda = 0.0 
)
static

Pyramid kernel contracting reference derivatives with diffusion tensor and metric terms, with optional lambda-weighted mass contribution.

Definition at line 1568 of file HelmholtzBlockOpSerialAVXSumFacKernels.hpp.

1580{
1581 constexpr auto ndf = 9;
1582
1583 simd_type jac = {1.0};
1584 simd_type df0, df1, df2, df3, df4, df5, df6, df7, df8;
1585 simd_type g0, g1, g2, g3, g4, g5; // metrics
1586 simd_type d00 = {1.0};
1587 simd_type d01 = {0.0};
1588 simd_type d11 = {1.0};
1589 simd_type d02 = {0.0};
1590 simd_type d12 = {0.0};
1591 simd_type d22 = {1.0}; // var diffusion terms
1592 simd_type td0, td1, td2, td3, td4, td5, td6, td7,
1593 td8; // temp terms for vardiff
1594
1595 if (useDiffCoeff && !VARCOEFF)
1596 {
1597 d00 = diffCoeff[0];
1598 d01 = diffCoeff[1];
1599 d11 = diffCoeff[2];
1600 d02 = diffCoeff[3];
1601 d12 = diffCoeff[4];
1602 d22 = diffCoeff[5];
1603 }
1604
1605 if constexpr (!DEFORMED)
1606 {
1607 jac = jac_ptr[0];
1608 df0 = df_ptr[0];
1609 df1 = df_ptr[1];
1610 df2 = df_ptr[2];
1611 df3 = df_ptr[3];
1612 df4 = df_ptr[4];
1613 df5 = df_ptr[5];
1614 df6 = df_ptr[6];
1615 df7 = df_ptr[7];
1616 df8 = df_ptr[8];
1617 }
1618
1619 for (unsigned int r = 0; r < nq2; ++r)
1620 {
1621 simd_type h3 = hfac3[r];
1622 simd_type w2J = jac * w2[r];
1623 for (unsigned int q = 0; q < nq1; ++q)
1624 {
1625 simd_type h1 = hfac1[q];
1626 simd_type h1h3 = h1 * h3;
1627 simd_type w21J = w2J * w1[q];
1628 unsigned int cnt_qr = (r * nq1 + q);
1629 for (unsigned int p = 0; p < nq0; ++p)
1630 {
1631 unsigned int cnt = cnt_qr * nq0 + p;
1632
1633 // 3. apply diffusion coeff to deriv and fill output
1634 simd_type h0 = hfac0[p];
1635 simd_type h0h3 = h0 * h3;
1636 simd_type wJ = w21J * w0[p];
1637
1638 if constexpr (DEFORMED)
1639 {
1640 wJ *= jac_ptr[cnt];
1641 df0 = df_ptr[cnt * ndf];
1642 df1 = df_ptr[cnt * ndf + 1];
1643 df2 = df_ptr[cnt * ndf + 2];
1644 df3 = df_ptr[cnt * ndf + 3];
1645 df4 = df_ptr[cnt * ndf + 4];
1646 df5 = df_ptr[cnt * ndf + 5];
1647 df6 = df_ptr[cnt * ndf + 6];
1648 df7 = df_ptr[cnt * ndf + 7];
1649 df8 = df_ptr[cnt * ndf + 8];
1650 }
1651 simd_type tmp0 = h3 * df0;
1652 tmp0.fma(h0h3, df2);
1653 simd_type tmp1 = h3 * df3;
1654 tmp1.fma(h0h3, df5);
1655 simd_type tmp2 = h3 * df6;
1656 tmp2.fma(h0h3, df8);
1657
1658 simd_type tmp3 = h3 * df1;
1659 tmp3.fma(h1h3, df2);
1660 simd_type tmp4 = h3 * df4;
1661 tmp4.fma(h1h3, df5);
1662 simd_type tmp5 = h3 * df7;
1663 tmp5.fma(h1h3, df8);
1664
1665 if (!VARCOEFF && !useDiffCoeff)
1666 {
1667 g0 = tmp0 * tmp0;
1668 g0.fma(tmp1, tmp1);
1669 g0.fma(tmp2, tmp2);
1670
1671 g1 = tmp3 * tmp3;
1672 g1.fma(tmp4, tmp4);
1673 g1.fma(tmp5, tmp5);
1674
1675 g2 = df2 * df2;
1676 g2.fma(df5, df5);
1677 g2.fma(df8, df8);
1678
1679 g3 = tmp0 * tmp3;
1680 g3.fma(tmp1, tmp4);
1681 g3.fma(tmp2, tmp5);
1682
1683 g4 = df2 * tmp0;
1684 g4.fma(df5, tmp1);
1685 g4.fma(df8, tmp2);
1686
1687 g5 = df2 * tmp3;
1688 g5.fma(df5, tmp4);
1689 g5.fma(df8, tmp5);
1690 }
1691 else
1692 {
1693 if constexpr (VARCOEFF)
1694 {
1695 d00 = varDiffCoeff[0 * varDiffCoeffSize + cnt];
1696 d01 = varDiffCoeff[1 * varDiffCoeffSize + cnt];
1697 d11 = varDiffCoeff[2 * varDiffCoeffSize + cnt];
1698 d02 = varDiffCoeff[3 * varDiffCoeffSize + cnt];
1699 d12 = varDiffCoeff[4 * varDiffCoeffSize + cnt];
1700 d22 = varDiffCoeff[5 * varDiffCoeffSize + cnt];
1701 }
1702
1703 td0 = tmp0 * d00;
1704 td0.fma(tmp1, d01);
1705 td0.fma(tmp2, d02);
1706
1707 td1 = tmp0 * d01;
1708 td1.fma(tmp1, d11);
1709 td1.fma(tmp2, d12);
1710
1711 td2 = tmp0 * d02;
1712 td2.fma(tmp1, d12);
1713 td2.fma(tmp2, d22);
1714
1715 td3 = tmp3 * d00;
1716 td3.fma(tmp4, d01);
1717 td3.fma(tmp5, d02);
1718
1719 td4 = tmp3 * d01;
1720 td4.fma(tmp4, d11);
1721 td4.fma(tmp5, d12);
1722
1723 td5 = tmp3 * d02;
1724 td5.fma(tmp4, d12);
1725 td5.fma(tmp5, d22);
1726
1727 td6 = df2 * d00;
1728 td6.fma(df5, d01);
1729 td6.fma(df8, d02);
1730
1731 td7 = df2 * d01;
1732 td7.fma(df5, d11);
1733 td7.fma(df8, d12);
1734
1735 td8 = df2 * d02;
1736 td8.fma(df5, d12);
1737 td8.fma(df8, d22);
1738
1739 g0 = td0 * tmp0;
1740 g0.fma(td1, tmp1);
1741 g0.fma(td2, tmp2);
1742
1743 g3 = td0 * tmp3;
1744 g3.fma(td1, tmp4);
1745 g3.fma(td2, tmp5);
1746
1747 g4 = td0 * df2;
1748 g4.fma(td1, df5);
1749 g4.fma(td2, df8);
1750
1751 g1 = td3 * tmp3;
1752 g1.fma(td4, tmp4);
1753 g1.fma(td5, tmp5);
1754
1755 g5 = td3 * df2;
1756 g5.fma(td4, df5);
1757 g5.fma(td5, df8);
1758
1759 g2 = td6 * df2;
1760 g2.fma(td7, df5);
1761 g2.fma(td8, df8);
1762 }
1763
1764 simd_type d0 = deriv0[cnt];
1765 simd_type d1 = deriv1[cnt];
1766 simd_type d2 = deriv2[cnt];
1767
1768 tmp0 = g0 * d0;
1769 tmp0.fma(g3, d1);
1770 tmp0.fma(g4, d2);
1771 deriv0[cnt] = tmp0 * wJ;
1772
1773 tmp1 = g3 * d0;
1774 tmp1.fma(g1, d1);
1775 tmp1.fma(g5, d2);
1776 deriv1[cnt] = tmp1 * wJ;
1777
1778 tmp2 = g4 * d0;
1779 tmp2.fma(g5, d1);
1780 tmp2.fma(g2, d2);
1781 deriv2[cnt] = tmp2 * wJ;
1782
1783 if constexpr (SCALE)
1784 {
1785 phys[cnt] *= lambda * wJ;
1786 }
1787 }
1788 }
1789 }
1790}

References jac.

◆ DiffusionCoeffwithWJQuadKernel() [1/2]

template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJQuadKernel ( const unsigned int  ncoord,
const unsigned int  nq0,
const unsigned int  nq1,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const simd_type *  df_ptr,
simd_type *  deriv0,
simd_type *  deriv1 
)
static

Quad kernel contracting reference derivatives with diffusion tensor and metric terms.

Definition at line 464 of file LaplacianBlockOpSerialAVXSumFacKernels.hpp.

472{
473 const auto ndf = 2 * ncoord;
474
475 simd_type jac = {1.0};
476 simd_type d00 = {1.0};
477 simd_type d01 = {0.0};
478 simd_type d11 = {1.0};
479 simd_type d02 = {0.0};
480 simd_type d12 = {0.0};
481 simd_type d22 = {1.0}; // var diffusion terms
482 simd_type dtmp0, dtmp1, dtmp2, dtmp3; // temp for vardiff
483 simd_type dtmp4, dtmp5;
484 simd_type df0, df1, df2, df3, df4 = {0.0}, df5 = {0.0};
485 simd_type metric00, metric01, metric11;
486
487 if (useDiffCoeff && !VARCOEFF)
488 {
489 d00 = diffCoeff[0];
490 d01 = diffCoeff[1];
491 d11 = diffCoeff[2];
492 if (ncoord == 3)
493 {
494 d02 = diffCoeff[3];
495 d12 = diffCoeff[4];
496 d22 = diffCoeff[5];
497 }
498 }
499
500 // Precompute Laplacian metrics
501 if constexpr (!DEFORMED)
502 {
503 jac = jac_ptr[0];
504
505 df0 = df_ptr[0];
506 df1 = df_ptr[1];
507 df2 = df_ptr[2];
508 df3 = df_ptr[3];
509 if (ncoord == 3)
510 {
511 df4 = df_ptr[4];
512 df5 = df_ptr[5];
513 }
514
515 if (!useDiffCoeff)
516 {
517 metric00 = df0 * df0;
518 metric00.fma(df2, df2);
519 metric01 = df0 * df1;
520 metric01.fma(df2, df3);
521 metric11 = df1 * df1;
522 metric11.fma(df3, df3);
523 if (ncoord == 3)
524 {
525 metric00.fma(df4, df4);
526 metric01.fma(df4, df5);
527 metric11.fma(df5, df5);
528 }
529 }
530 else if (!VARCOEFF)
531 {
532 if (ncoord == 2)
533 {
534 dtmp0 = df0 * d00;
535 dtmp0.fma(df2, d01);
536 dtmp1 = df0 * d01;
537 dtmp1.fma(df2, d11);
538 dtmp2 = df1 * d00;
539 dtmp2.fma(df3, d01);
540 dtmp3 = df1 * d01;
541 dtmp3.fma(df3, d11);
542
543 metric00 = df0 * dtmp0;
544 metric00.fma(df2, dtmp1);
545 metric01 = df1 * dtmp0;
546 metric01.fma(df3, dtmp1);
547 metric11 = df1 * dtmp2;
548 metric11.fma(df3, dtmp3);
549 }
550 else
551 {
552 dtmp0 = df0 * d00;
553 dtmp0.fma(df2, d01);
554 dtmp0.fma(df4, d02);
555 dtmp1 = df0 * d01;
556 dtmp1.fma(df2, d11);
557 dtmp1.fma(df4, d12);
558 dtmp2 = df0 * d02;
559 dtmp2.fma(df2, d12);
560 dtmp2.fma(df4, d22);
561 dtmp3 = df1 * d00;
562 dtmp3.fma(df3, d01);
563 dtmp3.fma(df5, d02);
564 dtmp4 = df1 * d01;
565 dtmp4.fma(df3, d11);
566 dtmp4.fma(df5, d12);
567 dtmp5 = df1 * d02;
568 dtmp5.fma(df3, d12);
569 dtmp5.fma(df5, d22);
570
571 metric00 = df0 * dtmp0;
572 metric00.fma(df2, dtmp1);
573 metric00.fma(df4, dtmp2);
574 metric01 = df1 * dtmp0;
575 metric01.fma(df3, dtmp1);
576 metric01.fma(df5, dtmp2);
577 metric11 = df1 * dtmp3;
578 metric11.fma(df3, dtmp4);
579 metric11.fma(df5, dtmp5);
580 }
581 }
582 }
583
584 if constexpr (DEFORMED || VARCOEFF)
585 {
586 for (unsigned int q = 0; q < nq1; ++q)
587 {
588 simd_type w1J = jac * w1[q];
589 for (unsigned int p = 0; p < nq0; ++p)
590 {
591 unsigned int cnt = q * nq0 + p;
592
593 simd_type wJ = w1J * w0[p];
594
595 if constexpr (DEFORMED)
596 {
597 wJ *= jac_ptr[cnt];
598 df0 = df_ptr[cnt * ndf];
599 df1 = df_ptr[cnt * ndf + 1];
600 df2 = df_ptr[cnt * ndf + 2];
601 df3 = df_ptr[cnt * ndf + 3];
602 if (ncoord == 3)
603 {
604 df4 = df_ptr[cnt * ndf + 4];
605 df5 = df_ptr[cnt * ndf + 5];
606 }
607 }
608
609 if (!useDiffCoeff)
610 {
611 metric00 = df0 * df0;
612 metric00.fma(df2, df2);
613 metric01 = df0 * df1;
614 metric01.fma(df2, df3);
615 metric11 = df1 * df1;
616 metric11.fma(df3, df3);
617
618 if (ncoord == 3)
619 {
620 metric00.fma(df4, df4);
621 metric01.fma(df4, df5);
622 metric11.fma(df5, df5);
623 }
624 }
625 else
626 {
627 if constexpr (VARCOEFF)
628 {
629 d00 = varDiffCoeff[0 * varDiffCoeffSize + cnt];
630 d01 = varDiffCoeff[1 * varDiffCoeffSize + cnt];
631 d11 = varDiffCoeff[2 * varDiffCoeffSize + cnt];
632 if (ncoord == 3)
633 {
634 d02 = varDiffCoeff[3 * varDiffCoeffSize + cnt];
635 d12 = varDiffCoeff[4 * varDiffCoeffSize + cnt];
636 d22 = varDiffCoeff[5 * varDiffCoeffSize + cnt];
637 }
638 }
639
640 if (ncoord == 2)
641 {
642 dtmp0 = df0 * d00;
643 dtmp0.fma(df2, d01);
644 dtmp1 = df0 * d01;
645 dtmp1.fma(df2, d11);
646 dtmp2 = df1 * d00;
647 dtmp2.fma(df3, d01);
648 dtmp3 = df1 * d01;
649 dtmp3.fma(df3, d11);
650
651 metric00 = df0 * dtmp0;
652 metric00.fma(df2, dtmp1);
653 metric01 = df1 * dtmp0;
654 metric01.fma(df3, dtmp1);
655 metric11 = df1 * dtmp2;
656 metric11.fma(df3, dtmp3);
657 }
658 else
659 {
660 dtmp0 = df0 * d00;
661 dtmp0.fma(df2, d01);
662 dtmp0.fma(df4, d02);
663 dtmp1 = df0 * d01;
664 dtmp1.fma(df2, d11);
665 dtmp1.fma(df4, d12);
666 dtmp2 = df0 * d02;
667 dtmp2.fma(df2, d12);
668 dtmp2.fma(df4, d22);
669 dtmp3 = df1 * d00;
670 dtmp3.fma(df3, d01);
671 dtmp3.fma(df5, d02);
672 dtmp4 = df1 * d01;
673 dtmp4.fma(df3, d11);
674 dtmp4.fma(df5, d12);
675 dtmp5 = df1 * d02;
676 dtmp5.fma(df3, d12);
677 dtmp5.fma(df5, d22);
678
679 metric00 = df0 * dtmp0;
680 metric00.fma(df2, dtmp1);
681 metric00.fma(df4, dtmp2);
682 metric01 = df1 * dtmp0;
683 metric01.fma(df3, dtmp1);
684 metric01.fma(df5, dtmp2);
685 metric11 = df1 * dtmp3;
686 metric11.fma(df3, dtmp4);
687 metric11.fma(df5, dtmp5);
688 }
689 }
690
691 simd_type d0 = deriv0[cnt];
692 simd_type d1 = deriv1[cnt];
693
694 simd_type tmp = metric00 * d0;
695 tmp.fma(metric01, d1);
696 deriv0[cnt] = tmp * wJ;
697
698 tmp = metric01 * d0;
699 tmp.fma(metric11, d1);
700 deriv1[cnt] = tmp * wJ;
701 }
702 }
703 }
704 else
705 { // make use of the precomputed metric
706 for (unsigned int q = 0; q < nq1; ++q)
707 {
708 simd_type w1J = jac * w1[q];
709 for (unsigned int p = 0; p < nq0; ++p)
710 {
711 unsigned int cnt = q * nq0 + p;
712
713 simd_type wJ = w1J * w0[p];
714
715 simd_type d0 = deriv0[cnt];
716 simd_type d1 = deriv1[cnt];
717
718 simd_type tmp = metric00 * d0;
719 tmp.fma(metric01, d1);
720 deriv0[cnt] = tmp * wJ;
721
722 tmp = metric01 * d0;
723 tmp.fma(metric11, d1);
724 deriv1[cnt] = tmp * wJ;
725 }
726 }
727 }
728}

References jac.

◆ DiffusionCoeffwithWJQuadKernel() [2/2]

template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJQuadKernel ( const unsigned int  ncoord,
const unsigned int  nq0,
const unsigned int  nq1,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const simd_type *  df_ptr,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  phys,
typename simd_type::scalarType  lambda = 0.0 
)
static

Quad kernel contracting reference derivatives with diffusion tensor and metric terms, with optional lambda-weighted mass contribution.

Definition at line 484 of file HelmholtzBlockOpSerialAVXSumFacKernels.hpp.

493{
494 const auto ndf = 2 * ncoord;
495
496 simd_type jac = {1.0};
497 simd_type d00 = {1.0};
498 simd_type d01 = {0.0};
499 simd_type d11 = {1.0};
500 simd_type d02 = {0.0};
501 simd_type d12 = {0.0};
502 simd_type d22 = {1.0}; // var diffusion terms
503 simd_type dtmp0, dtmp1, dtmp2, dtmp3; // temp for vardiff
504 simd_type dtmp4, dtmp5;
505 simd_type df0, df1, df2, df3, df4 = {0.0}, df5 = {0.0};
506 simd_type metric00, metric01, metric11;
507
508 if (useDiffCoeff && !VARCOEFF)
509 {
510 d00 = diffCoeff[0];
511 d01 = diffCoeff[1];
512 d11 = diffCoeff[2];
513 if (ncoord == 3)
514 {
515 d02 = diffCoeff[3];
516 d12 = diffCoeff[4];
517 d22 = diffCoeff[5];
518 }
519 }
520
521 // Precompute Laplacian metrics
522 if constexpr (!DEFORMED)
523 {
524 jac = jac_ptr[0];
525
526 df0 = df_ptr[0];
527 df1 = df_ptr[1];
528 df2 = df_ptr[2];
529 df3 = df_ptr[3];
530 if (ncoord == 3)
531 {
532 df4 = df_ptr[4];
533 df5 = df_ptr[5];
534 }
535
536 if (!useDiffCoeff)
537 {
538 metric00 = df0 * df0;
539 metric00.fma(df2, df2);
540 metric01 = df0 * df1;
541 metric01.fma(df2, df3);
542 metric11 = df1 * df1;
543 metric11.fma(df3, df3);
544 if (ncoord == 3)
545 {
546 metric00.fma(df4, df4);
547 metric01.fma(df4, df5);
548 metric11.fma(df5, df5);
549 }
550 }
551 else if (!VARCOEFF)
552 {
553 if (ncoord == 2)
554 {
555 dtmp0 = df0 * d00;
556 dtmp0.fma(df2, d01);
557 dtmp1 = df0 * d01;
558 dtmp1.fma(df2, d11);
559 dtmp2 = df1 * d00;
560 dtmp2.fma(df3, d01);
561 dtmp3 = df1 * d01;
562 dtmp3.fma(df3, d11);
563
564 metric00 = df0 * dtmp0;
565 metric00.fma(df2, dtmp1);
566 metric01 = df1 * dtmp0;
567 metric01.fma(df3, dtmp1);
568 metric11 = df1 * dtmp2;
569 metric11.fma(df3, dtmp3);
570 }
571 else
572 {
573 dtmp0 = df0 * d00;
574 dtmp0.fma(df2, d01);
575 dtmp0.fma(df4, d02);
576 dtmp1 = df0 * d01;
577 dtmp1.fma(df2, d11);
578 dtmp1.fma(df4, d12);
579 dtmp2 = df0 * d02;
580 dtmp2.fma(df2, d12);
581 dtmp2.fma(df4, d22);
582 dtmp3 = df1 * d00;
583 dtmp3.fma(df3, d01);
584 dtmp3.fma(df5, d02);
585 dtmp4 = df1 * d01;
586 dtmp4.fma(df3, d11);
587 dtmp4.fma(df5, d12);
588 dtmp5 = df1 * d02;
589 dtmp5.fma(df3, d12);
590 dtmp5.fma(df5, d22);
591
592 metric00 = df0 * dtmp0;
593 metric00.fma(df2, dtmp1);
594 metric00.fma(df4, dtmp2);
595 metric01 = df1 * dtmp0;
596 metric01.fma(df3, dtmp1);
597 metric01.fma(df5, dtmp2);
598 metric11 = df1 * dtmp3;
599 metric11.fma(df3, dtmp4);
600 metric11.fma(df5, dtmp5);
601 }
602 }
603 }
604
605 if constexpr (DEFORMED || VARCOEFF)
606 {
607 for (unsigned int q = 0; q < nq1; ++q)
608 {
609 simd_type w1J = jac * w1[q];
610 for (unsigned int p = 0; p < nq0; ++p)
611 {
612 unsigned int cnt = q * nq0 + p;
613
614 simd_type wJ = w1J * w0[p];
615
616 if constexpr (DEFORMED)
617 {
618 wJ *= jac_ptr[cnt];
619 df0 = df_ptr[cnt * ndf];
620 df1 = df_ptr[cnt * ndf + 1];
621 df2 = df_ptr[cnt * ndf + 2];
622 df3 = df_ptr[cnt * ndf + 3];
623 if (ncoord == 3)
624 {
625 df4 = df_ptr[cnt * ndf + 4];
626 df5 = df_ptr[cnt * ndf + 5];
627 }
628 }
629
630 if (!useDiffCoeff)
631 {
632 metric00 = df0 * df0;
633 metric00.fma(df2, df2);
634 metric01 = df0 * df1;
635 metric01.fma(df2, df3);
636 metric11 = df1 * df1;
637 metric11.fma(df3, df3);
638
639 if (ncoord == 3)
640 {
641 metric00.fma(df4, df4);
642 metric01.fma(df4, df5);
643 metric11.fma(df5, df5);
644 }
645 }
646 else
647 {
648 if constexpr (VARCOEFF)
649 {
650 d00 = varDiffCoeff[0 * varDiffCoeffSize + cnt];
651 d01 = varDiffCoeff[1 * varDiffCoeffSize + cnt];
652 d11 = varDiffCoeff[2 * varDiffCoeffSize + cnt];
653 if (ncoord == 3)
654 {
655 d02 = varDiffCoeff[3 * varDiffCoeffSize + cnt];
656 d12 = varDiffCoeff[4 * varDiffCoeffSize + cnt];
657 d22 = varDiffCoeff[5 * varDiffCoeffSize + cnt];
658 }
659 }
660
661 if (ncoord == 2)
662 {
663 dtmp0 = df0 * d00;
664 dtmp0.fma(df2, d01);
665 dtmp1 = df0 * d01;
666 dtmp1.fma(df2, d11);
667 dtmp2 = df1 * d00;
668 dtmp2.fma(df3, d01);
669 dtmp3 = df1 * d01;
670 dtmp3.fma(df3, d11);
671
672 metric00 = df0 * dtmp0;
673 metric00.fma(df2, dtmp1);
674 metric01 = df1 * dtmp0;
675 metric01.fma(df3, dtmp1);
676 metric11 = df1 * dtmp2;
677 metric11.fma(df3, dtmp3);
678 }
679 else
680 {
681 dtmp0 = df0 * d00;
682 dtmp0.fma(df2, d01);
683 dtmp0.fma(df4, d02);
684 dtmp1 = df0 * d01;
685 dtmp1.fma(df2, d11);
686 dtmp1.fma(df4, d12);
687 dtmp2 = df0 * d02;
688 dtmp2.fma(df2, d12);
689 dtmp2.fma(df4, d22);
690 dtmp3 = df1 * d00;
691 dtmp3.fma(df3, d01);
692 dtmp3.fma(df5, d02);
693 dtmp4 = df1 * d01;
694 dtmp4.fma(df3, d11);
695 dtmp4.fma(df5, d12);
696 dtmp5 = df1 * d02;
697 dtmp5.fma(df3, d12);
698 dtmp5.fma(df5, d22);
699
700 metric00 = df0 * dtmp0;
701 metric00.fma(df2, dtmp1);
702 metric00.fma(df4, dtmp2);
703 metric01 = df1 * dtmp0;
704 metric01.fma(df3, dtmp1);
705 metric01.fma(df5, dtmp2);
706 metric11 = df1 * dtmp3;
707 metric11.fma(df3, dtmp4);
708 metric11.fma(df5, dtmp5);
709 }
710 }
711
712 simd_type d0 = deriv0[cnt];
713 simd_type d1 = deriv1[cnt];
714
715 simd_type tmp = metric00 * d0;
716 tmp.fma(metric01, d1);
717 deriv0[cnt] = tmp * wJ;
718
719 tmp = metric01 * d0;
720 tmp.fma(metric11, d1);
721 deriv1[cnt] = tmp * wJ;
722
723 // modify phys only when required
724 if constexpr (SCALE)
725 {
726 phys[cnt] *= wJ * lambda;
727 }
728 }
729 }
730 }
731 else
732 { // make use of the precomputed metric
733 for (unsigned int q = 0; q < nq1; ++q)
734 {
735 simd_type w1J = jac * w1[q];
736 for (unsigned int p = 0; p < nq0; ++p)
737 {
738 unsigned int cnt = q * nq0 + p;
739
740 simd_type wJ = w1J * w0[p];
741
742 simd_type d0 = deriv0[cnt];
743 simd_type d1 = deriv1[cnt];
744
745 simd_type tmp = metric00 * d0;
746 tmp.fma(metric01, d1);
747 deriv0[cnt] = tmp * wJ;
748
749 tmp = metric01 * d0;
750 tmp.fma(metric11, d1);
751 deriv1[cnt] = tmp * wJ;
752
753 // modify phys only when required
754 if constexpr (SCALE)
755 {
756 phys[cnt] *= wJ * lambda;
757 }
758 }
759 }
760 }
761}

References jac.

◆ DiffusionCoeffwithWJSegKernel() [1/2]

template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJSegKernel ( const unsigned int  ncoord,
const unsigned int  nq0,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const simd_type *  df_ptr,
simd_type *  deriv0 
)
static

Segment kernel contracting reference derivative with diffusion tensor and metric terms.

Definition at line 75 of file LaplacianBlockOpSerialAVXSumFacKernels.hpp.

82{
83 const auto ndf = ncoord;
84
85 simd_type jac = {1.0};
86 simd_type d00 = {1.0};
87 simd_type d01 = {0.0};
88 simd_type d11 = {1.0};
89 simd_type d02 = {0.0};
90 simd_type d12 = {0.0};
91 simd_type d22 = {1.0}; // var diffusion terms
92 simd_type dtmp0, dtmp1, dtmp2; // temp for vardiff
93 simd_type df0, df1 = {0.0}, df2 = {0.0};
94 simd_type metric00;
95
96 if (useDiffCoeff && !VARCOEFF)
97 {
98 d00 = diffCoeff[0];
99 if (ncoord > 1)
100 {
101 d01 = diffCoeff[1];
102 d11 = diffCoeff[2];
103 }
104 if (ncoord == 3)
105 {
106 d02 = diffCoeff[3];
107 d12 = diffCoeff[4];
108 d22 = diffCoeff[5];
109 }
110 }
111
112 // Precompute Laplacian metrics
113 if constexpr (!DEFORMED)
114 {
115 jac = jac_ptr[0];
116
117 df0 = df_ptr[0];
118 if (ncoord > 1)
119 {
120 df1 = df_ptr[1];
121 }
122 if (ncoord == 3)
123 {
124 df2 = df_ptr[2];
125 }
126
127 if (!useDiffCoeff)
128 {
129 metric00 = df0 * df0;
130 if (ncoord > 1)
131 {
132 metric00.fma(df1, df1);
133 }
134 if (ncoord == 3)
135 {
136 metric00.fma(df2, df2);
137 }
138 }
139 else if (!VARCOEFF)
140 {
141 if (ncoord == 1)
142 {
143 metric00 = df0 * df0 * d00;
144 }
145 else if (ncoord == 2)
146 {
147 dtmp0 = df0 * d00;
148 dtmp0.fma(df1, d01);
149 dtmp1 = df0 * d01;
150 dtmp1.fma(df1, d11);
151
152 metric00 = df0 * dtmp0;
153 metric00.fma(df1, dtmp1);
154 }
155 else
156 {
157 dtmp0 = df0 * d00;
158 dtmp0.fma(df1, d01);
159 dtmp0.fma(df2, d02);
160 dtmp1 = df0 * d01;
161 dtmp1.fma(df1, d11);
162 dtmp1.fma(df2, d12);
163 dtmp2 = df0 * d02;
164 dtmp2.fma(df1, d12);
165 dtmp2.fma(df2, d22);
166
167 metric00 = df0 * dtmp0;
168 metric00.fma(df1, dtmp1);
169 metric00.fma(df2, dtmp2);
170 }
171 }
172 }
173
174 if constexpr (DEFORMED || VARCOEFF)
175 {
176 for (unsigned int p = 0; p < nq0; ++p)
177 {
178 simd_type wJ = jac * w0[p];
179
180 if constexpr (DEFORMED)
181 {
182 wJ *= jac_ptr[p];
183 df0 = df_ptr[p * ndf];
184 if (ncoord > 1)
185 {
186 df1 = df_ptr[p * ndf + 1];
187 }
188 if (ncoord == 3)
189 {
190 df2 = df_ptr[p * ndf + 2];
191 }
192 }
193
194 if (!useDiffCoeff)
195 {
196 metric00 = df0 * df0;
197 if (ncoord > 1)
198 {
199 metric00.fma(df1, df1);
200 }
201 if (ncoord == 3)
202 {
203 metric00.fma(df2, df2);
204 }
205 }
206 else
207 {
208 if constexpr (VARCOEFF)
209 {
210 d00 = varDiffCoeff[0 * varDiffCoeffSize + p];
211 if (ncoord > 1)
212 {
213 d01 = varDiffCoeff[1 * varDiffCoeffSize + p];
214 d11 = varDiffCoeff[2 * varDiffCoeffSize + p];
215 }
216 if (ncoord == 3)
217 {
218 d02 = varDiffCoeff[3 * varDiffCoeffSize + p];
219 d12 = varDiffCoeff[4 * varDiffCoeffSize + p];
220 d22 = varDiffCoeff[5 * varDiffCoeffSize + p];
221 }
222 }
223
224 if (ncoord == 1)
225 {
226 metric00 = df0 * df0 * d00;
227 }
228 else if (ncoord == 2)
229 {
230 dtmp0 = df0 * d00;
231 dtmp0.fma(df1, d01);
232 dtmp1 = df0 * d01;
233 dtmp1.fma(df1, d11);
234
235 metric00 = df0 * dtmp0;
236 metric00.fma(df1, dtmp1);
237 }
238 else
239 {
240 dtmp0 = df0 * d00;
241 dtmp0.fma(df1, d01);
242 dtmp0.fma(df2, d02);
243 dtmp1 = df0 * d01;
244 dtmp1.fma(df1, d11);
245 dtmp1.fma(df2, d12);
246 dtmp2 = df0 * d02;
247 dtmp2.fma(df1, d12);
248 dtmp2.fma(df2, d22);
249
250 metric00 = df0 * dtmp0;
251 metric00.fma(df1, dtmp1);
252 metric00.fma(df2, dtmp2);
253 }
254 }
255
256 deriv0[p] = metric00 * deriv0[p] * wJ;
257 }
258 }
259 else
260 { // make use of the precomputed metric
261 for (unsigned int p = 0; p < nq0; ++p)
262 {
263 simd_type wJ = jac * w0[p];
264
265 deriv0[p] = metric00 * deriv0[p] * wJ;
266 }
267 }
268}

References jac.

◆ DiffusionCoeffwithWJSegKernel() [2/2]

template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJSegKernel ( const unsigned int  ncoord,
const unsigned int  nq0,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const simd_type *  df_ptr,
simd_type *  deriv0,
simd_type *  phys,
typename simd_type::scalarType  lambda = 0.0 
)
static

Segment kernel contracting reference derivative with diffusion tensor and metric terms, with optional lambda-weighted mass contribution.

Definition at line 75 of file HelmholtzBlockOpSerialAVXSumFacKernels.hpp.

83{
84 const auto ndf = ncoord;
85
86 simd_type jac = {1.0};
87 simd_type d00 = {1.0};
88 simd_type d01 = {0.0};
89 simd_type d11 = {1.0};
90 simd_type d02 = {0.0};
91 simd_type d12 = {0.0};
92 simd_type d22 = {1.0}; // var diffusion terms
93 simd_type dtmp0, dtmp1, dtmp2; // temp for vardiff
94 simd_type df0, df1 = {0.0}, df2 = {0.0};
95 simd_type metric00;
96
97 if (useDiffCoeff && !VARCOEFF)
98 {
99 d00 = diffCoeff[0];
100 if (ncoord > 1)
101 {
102 d01 = diffCoeff[1];
103 d11 = diffCoeff[2];
104 }
105 if (ncoord == 3)
106 {
107 d02 = diffCoeff[3];
108 d12 = diffCoeff[4];
109 d22 = diffCoeff[5];
110 }
111 }
112
113 // Precompute Laplacian metrics
114 if constexpr (!DEFORMED)
115 {
116 jac = jac_ptr[0];
117
118 df0 = df_ptr[0];
119 if (ncoord > 1)
120 {
121 df1 = df_ptr[1];
122 }
123 if (ncoord == 3)
124 {
125 df2 = df_ptr[2];
126 }
127
128 if (!useDiffCoeff)
129 {
130 metric00 = df0 * df0;
131 if (ncoord > 1)
132 {
133 metric00.fma(df1, df1);
134 }
135 if (ncoord == 3)
136 {
137 metric00.fma(df2, df2);
138 }
139 }
140 else if (!VARCOEFF)
141 {
142 if (ncoord == 1)
143 {
144 metric00 = df0 * df0 * d00;
145 }
146 else if (ncoord == 2)
147 {
148 dtmp0 = df0 * d00;
149 dtmp0.fma(df1, d01);
150 dtmp1 = df0 * d01;
151 dtmp1.fma(df1, d11);
152
153 metric00 = df0 * dtmp0;
154 metric00.fma(df1, dtmp1);
155 }
156 else
157 {
158 dtmp0 = df0 * d00;
159 dtmp0.fma(df1, d01);
160 dtmp0.fma(df2, d02);
161 dtmp1 = df0 * d01;
162 dtmp1.fma(df1, d11);
163 dtmp1.fma(df2, d12);
164 dtmp2 = df0 * d02;
165 dtmp2.fma(df1, d12);
166 dtmp2.fma(df2, d22);
167
168 metric00 = df0 * dtmp0;
169 metric00.fma(df1, dtmp1);
170 metric00.fma(df2, dtmp2);
171 }
172 }
173 }
174
175 if constexpr (DEFORMED || VARCOEFF)
176 {
177 for (unsigned int p = 0; p < nq0; ++p)
178 {
179 simd_type wJ = jac * w0[p];
180
181 if constexpr (DEFORMED)
182 {
183 wJ *= jac_ptr[p];
184 df0 = df_ptr[p * ndf];
185 if (ncoord > 1)
186 {
187 df1 = df_ptr[p * ndf + 1];
188 }
189 if (ncoord == 3)
190 {
191 df2 = df_ptr[p * ndf + 2];
192 }
193 }
194
195 if (!useDiffCoeff)
196 {
197 metric00 = df0 * df0;
198 if (ncoord > 1)
199 {
200 metric00.fma(df1, df1);
201 }
202 if (ncoord == 3)
203 {
204 metric00.fma(df2, df2);
205 }
206 }
207 else
208 {
209 if constexpr (VARCOEFF)
210 {
211 d00 = varDiffCoeff[0 * varDiffCoeffSize + p];
212 if (ncoord > 1)
213 {
214 d01 = varDiffCoeff[1 * varDiffCoeffSize + p];
215 d11 = varDiffCoeff[2 * varDiffCoeffSize + p];
216 }
217 if (ncoord == 3)
218 {
219 d02 = varDiffCoeff[3 * varDiffCoeffSize + p];
220 d12 = varDiffCoeff[4 * varDiffCoeffSize + p];
221 d22 = varDiffCoeff[5 * varDiffCoeffSize + p];
222 }
223 }
224
225 if (ncoord == 1)
226 {
227 metric00 = df0 * df0 * d00;
228 }
229 else if (ncoord == 2)
230 {
231 dtmp0 = df0 * d00;
232 dtmp0.fma(df1, d01);
233 dtmp1 = df0 * d01;
234 dtmp1.fma(df1, d11);
235
236 metric00 = df0 * dtmp0;
237 metric00.fma(df1, dtmp1);
238 }
239 else
240 {
241 dtmp0 = df0 * d00;
242 dtmp0.fma(df1, d01);
243 dtmp0.fma(df2, d02);
244 dtmp1 = df0 * d01;
245 dtmp1.fma(df1, d11);
246 dtmp1.fma(df2, d12);
247 dtmp2 = df0 * d02;
248 dtmp2.fma(df1, d12);
249 dtmp2.fma(df2, d22);
250
251 metric00 = df0 * dtmp0;
252 metric00.fma(df1, dtmp1);
253 metric00.fma(df2, dtmp2);
254 }
255 }
256
257 deriv0[p] = metric00 * deriv0[p] * wJ;
258
259 // modify phys only when required
260 if constexpr (SCALE)
261 {
262 phys[p] *= wJ * lambda;
263 }
264 }
265 }
266 else
267 { // make use of the precomputed metric
268 for (unsigned int p = 0; p < nq0; ++p)
269 {
270 simd_type wJ = jac * w0[p];
271
272 deriv0[p] = metric00 * deriv0[p] * wJ;
273
274 // modify phys only when required
275 if constexpr (SCALE)
276 {
277 phys[p] *= wJ * lambda;
278 }
279 }
280 }
281}

References jac.

◆ DiffusionCoeffwithWJTetKernel() [1/2]

template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJTetKernel ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const simd_type *  df_ptr,
const simd_type *  hfac0,
const simd_type *  hfac1,
const simd_type *  hfac2,
const simd_type *  hfac3,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  deriv2 
)
static

Tet kernel contracting reference derivatives with diffusion tensor and metric terms.

Definition at line 1074 of file LaplacianBlockOpSerialAVXSumFacKernels.hpp.

1085{
1086 constexpr auto ndf = 9;
1087
1088 simd_type jac = {1.0};
1089 simd_type df0, df1, df2, df3, df4, df5, df6, df7, df8;
1090 simd_type g0, g1, g2, g3, g4, g5;
1091 simd_type d00 = {1.0};
1092 simd_type d01 = {0.0};
1093 simd_type d11 = {1.0};
1094 simd_type d02 = {0.0};
1095 simd_type d12 = {0.0};
1096 simd_type d22 = {1.0}; // var diffusion terms
1097 simd_type td0, td1, td2, td3, td4, td5, td6, td7,
1098 td8; // temp terms for vardiff
1099
1100 if (useDiffCoeff && !VARCOEFF)
1101 {
1102 d00 = diffCoeff[0];
1103 d01 = diffCoeff[1];
1104 d11 = diffCoeff[2];
1105 d02 = diffCoeff[3];
1106 d12 = diffCoeff[4];
1107 d22 = diffCoeff[5];
1108 }
1109
1110 if constexpr (!DEFORMED)
1111 {
1112 jac = jac_ptr[0];
1113 df0 = df_ptr[0];
1114 df1 = df_ptr[1];
1115 df2 = df_ptr[2];
1116 df3 = df_ptr[3];
1117 df4 = df_ptr[4];
1118 df5 = df_ptr[5];
1119 df6 = df_ptr[6];
1120 df7 = df_ptr[7];
1121 df8 = df_ptr[8];
1122 }
1123
1124 for (unsigned int r = 0; r < nq2; ++r)
1125 {
1126 simd_type h3 = hfac3[r];
1127 simd_type w2J = jac * w2[r];
1128 for (unsigned int q = 0; q < nq1; ++q)
1129 {
1130 simd_type h1 = hfac1[q];
1131 simd_type h2 = hfac2[q];
1132 simd_type h2h3 = h2 * h3;
1133 simd_type h1h3 = h1 * h3;
1134 simd_type w21J = w2J * w1[q];
1135
1136 unsigned int cnt_qr = (r * nq1 + q);
1137 for (unsigned int p = 0; p < nq0; ++p)
1138 {
1139 unsigned int cnt = cnt_qr * nq0 + p;
1140
1141 simd_type wJ = w21J * w0[p];
1142
1143 // 3. apply diffusion coeff to deriv and fill output
1144 if constexpr (DEFORMED)
1145 {
1146 wJ *= jac_ptr[cnt];
1147 df0 = df_ptr[cnt * ndf];
1148 df1 = df_ptr[cnt * ndf + 1];
1149 df2 = df_ptr[cnt * ndf + 2];
1150 df3 = df_ptr[cnt * ndf + 3];
1151 df4 = df_ptr[cnt * ndf + 4];
1152 df5 = df_ptr[cnt * ndf + 5];
1153 df6 = df_ptr[cnt * ndf + 6];
1154 df7 = df_ptr[cnt * ndf + 7];
1155 df8 = df_ptr[cnt * ndf + 8];
1156 }
1157
1158 simd_type h0h2h3 = hfac0[p] * h2h3;
1159
1160 simd_type tmp0 = h0h2h3 * (df1 + df2);
1161 tmp0.fma(df0, h2h3);
1162 simd_type tmp1 = h0h2h3 * (df4 + df5);
1163 tmp1.fma(df3, h2h3);
1164 simd_type tmp2 = h0h2h3 * (df7 + df8);
1165 tmp2.fma(df6, h2h3);
1166
1167 simd_type tmp3 = df1 * h3;
1168 tmp3.fma(df2, h1h3);
1169 simd_type tmp4 = df4 * h3;
1170 tmp4.fma(df5, h1h3);
1171 simd_type tmp5 = df7 * h3;
1172 tmp5.fma(df8, h1h3);
1173
1174 if (!VARCOEFF && !useDiffCoeff)
1175 {
1176 g0 = tmp0 * tmp0;
1177 g0.fma(tmp1, tmp1);
1178 g0.fma(tmp2, tmp2);
1179
1180 g4 = df2 * tmp0;
1181 g4.fma(df5, tmp1);
1182 g4.fma(df8, tmp2);
1183
1184 g3 = tmp0 * tmp3;
1185 g3.fma(tmp1, tmp4);
1186 g3.fma(tmp2, tmp5);
1187
1188 g1 = tmp3 * tmp3;
1189 g1.fma(tmp4, tmp4);
1190 g1.fma(tmp5, tmp5);
1191
1192 g5 = df2 * tmp3;
1193 g5.fma(df5, tmp4);
1194 g5.fma(df8, tmp5);
1195
1196 g2 = df2 * df2;
1197 g2.fma(df5, df5);
1198 g2.fma(df8, df8);
1199 }
1200 else
1201 {
1202 if constexpr (VARCOEFF)
1203 {
1204 d00 = varDiffCoeff[0 * varDiffCoeffSize + cnt];
1205 d01 = varDiffCoeff[1 * varDiffCoeffSize + cnt];
1206 d11 = varDiffCoeff[2 * varDiffCoeffSize + cnt];
1207 d02 = varDiffCoeff[3 * varDiffCoeffSize + cnt];
1208 d12 = varDiffCoeff[4 * varDiffCoeffSize + cnt];
1209 d22 = varDiffCoeff[5 * varDiffCoeffSize + cnt];
1210 }
1211
1212 td0 = tmp0 * d00;
1213 td0.fma(tmp1, d01);
1214 td0.fma(tmp2, d02);
1215
1216 td1 = tmp0 * d01;
1217 td1.fma(tmp1, d11);
1218 td1.fma(tmp2, d12);
1219
1220 td2 = tmp0 * d02;
1221 td2.fma(tmp1, d12);
1222 td2.fma(tmp2, d22);
1223
1224 td3 = tmp3 * d00;
1225 td3.fma(tmp4, d01);
1226 td3.fma(tmp5, d02);
1227
1228 td4 = tmp3 * d01;
1229 td4.fma(tmp4, d11);
1230 td4.fma(tmp5, d12);
1231
1232 td5 = tmp3 * d02;
1233 td5.fma(tmp4, d12);
1234 td5.fma(tmp5, d22);
1235
1236 td6 = df2 * d00;
1237 td6.fma(df5, d01);
1238 td6.fma(df8, d02);
1239
1240 td7 = df2 * d01;
1241 td7.fma(df5, d11);
1242 td7.fma(df8, d12);
1243
1244 td8 = df2 * d02;
1245 td8.fma(df5, d12);
1246 td8.fma(df8, d22);
1247
1248 g0 = td0 * tmp0;
1249 g0.fma(td1, tmp1);
1250 g0.fma(td2, tmp2);
1251
1252 g3 = td0 * tmp3;
1253 g3.fma(td1, tmp4);
1254 g3.fma(td2, tmp5);
1255
1256 g4 = td0 * df2;
1257 g4.fma(td1, df5);
1258 g4.fma(td2, df8);
1259
1260 g1 = td3 * tmp3;
1261 g1.fma(td4, tmp4);
1262 g1.fma(td5, tmp5);
1263
1264 g5 = td3 * df2;
1265 g5.fma(td4, df5);
1266 g5.fma(td5, df8);
1267
1268 g2 = td6 * df2;
1269 g2.fma(td7, df5);
1270 g2.fma(td8, df8);
1271 }
1272
1273 simd_type d0 = deriv0[cnt];
1274 simd_type d1 = deriv1[cnt];
1275 simd_type d2 = deriv2[cnt];
1276
1277 tmp0 = g0 * d0;
1278 tmp0.fma(g3, d1);
1279 tmp0.fma(g4, d2);
1280 deriv0[cnt] = tmp0 * wJ;
1281
1282 tmp1 = g3 * d0;
1283 tmp1.fma(g1, d1);
1284 tmp1.fma(g5, d2);
1285 deriv1[cnt] = tmp1 * wJ;
1286
1287 tmp2 = g4 * d0;
1288 tmp2.fma(g5, d1);
1289 tmp2.fma(g2, d2);
1290 deriv2[cnt] = tmp2 * wJ;
1291 }
1292 }
1293 }
1294}

References jac.

◆ DiffusionCoeffwithWJTetKernel() [2/2]

template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJTetKernel ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const simd_type *  df_ptr,
const simd_type *  hfac0,
const simd_type *  hfac1,
const simd_type *  hfac2,
const simd_type *  hfac3,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  deriv2,
simd_type *  phys,
typename simd_type::scalarType  lambda = 0.0 
)
static

Tet kernel contracting reference derivatives with diffusion tensor and metric terms, with optional lambda-weighted mass contribution.

Definition at line 1119 of file HelmholtzBlockOpSerialAVXSumFacKernels.hpp.

1131{
1132 constexpr auto ndf = 9;
1133
1134 simd_type jac = {1.0};
1135 simd_type df0, df1, df2, df3, df4, df5, df6, df7, df8;
1136 simd_type g0, g1, g2, g3, g4, g5;
1137 simd_type d00 = {1.0};
1138 simd_type d01 = {0.0};
1139 simd_type d11 = {1.0};
1140 simd_type d02 = {0.0};
1141 simd_type d12 = {0.0};
1142 simd_type d22 = {1.0}; // var diffusion terms
1143 simd_type td0, td1, td2, td3, td4, td5, td6, td7,
1144 td8; // temp terms for vardiff
1145
1146 if (useDiffCoeff && !VARCOEFF)
1147 {
1148 d00 = diffCoeff[0];
1149 d01 = diffCoeff[1];
1150 d11 = diffCoeff[2];
1151 d02 = diffCoeff[3];
1152 d12 = diffCoeff[4];
1153 d22 = diffCoeff[5];
1154 }
1155
1156 if constexpr (!DEFORMED)
1157 {
1158 jac = jac_ptr[0];
1159 df0 = df_ptr[0];
1160 df1 = df_ptr[1];
1161 df2 = df_ptr[2];
1162 df3 = df_ptr[3];
1163 df4 = df_ptr[4];
1164 df5 = df_ptr[5];
1165 df6 = df_ptr[6];
1166 df7 = df_ptr[7];
1167 df8 = df_ptr[8];
1168 }
1169
1170 for (unsigned int r = 0; r < nq2; ++r)
1171 {
1172 simd_type h3 = hfac3[r];
1173 simd_type w2J = jac * w2[r];
1174 for (unsigned int q = 0; q < nq1; ++q)
1175 {
1176 simd_type h1 = hfac1[q];
1177 simd_type h2 = hfac2[q];
1178 simd_type h2h3 = h2 * h3;
1179 simd_type h1h3 = h1 * h3;
1180 simd_type w21J = w2J * w1[q];
1181
1182 unsigned int cnt_qr = (r * nq1 + q);
1183 for (unsigned int p = 0; p < nq0; ++p)
1184 {
1185 unsigned int cnt = cnt_qr * nq0 + p;
1186
1187 simd_type wJ = w21J * w0[p];
1188
1189 // 3. apply diffusion coeff to deriv and fill output
1190 if constexpr (DEFORMED)
1191 {
1192 wJ *= jac_ptr[cnt];
1193 df0 = df_ptr[cnt * ndf];
1194 df1 = df_ptr[cnt * ndf + 1];
1195 df2 = df_ptr[cnt * ndf + 2];
1196 df3 = df_ptr[cnt * ndf + 3];
1197 df4 = df_ptr[cnt * ndf + 4];
1198 df5 = df_ptr[cnt * ndf + 5];
1199 df6 = df_ptr[cnt * ndf + 6];
1200 df7 = df_ptr[cnt * ndf + 7];
1201 df8 = df_ptr[cnt * ndf + 8];
1202 }
1203
1204 simd_type h0h2h3 = hfac0[p] * h2h3;
1205
1206 simd_type tmp0 = h0h2h3 * (df1 + df2);
1207 tmp0.fma(df0, h2h3);
1208 simd_type tmp1 = h0h2h3 * (df4 + df5);
1209 tmp1.fma(df3, h2h3);
1210 simd_type tmp2 = h0h2h3 * (df7 + df8);
1211 tmp2.fma(df6, h2h3);
1212
1213 simd_type tmp3 = df1 * h3;
1214 tmp3.fma(df2, h1h3);
1215 simd_type tmp4 = df4 * h3;
1216 tmp4.fma(df5, h1h3);
1217 simd_type tmp5 = df7 * h3;
1218 tmp5.fma(df8, h1h3);
1219
1220 if (!VARCOEFF && !useDiffCoeff)
1221 {
1222 g0 = tmp0 * tmp0;
1223 g0.fma(tmp1, tmp1);
1224 g0.fma(tmp2, tmp2);
1225
1226 g4 = df2 * tmp0;
1227 g4.fma(df5, tmp1);
1228 g4.fma(df8, tmp2);
1229
1230 g3 = tmp0 * tmp3;
1231 g3.fma(tmp1, tmp4);
1232 g3.fma(tmp2, tmp5);
1233
1234 g1 = tmp3 * tmp3;
1235 g1.fma(tmp4, tmp4);
1236 g1.fma(tmp5, tmp5);
1237
1238 g5 = df2 * tmp3;
1239 g5.fma(df5, tmp4);
1240 g5.fma(df8, tmp5);
1241
1242 g2 = df2 * df2;
1243 g2.fma(df5, df5);
1244 g2.fma(df8, df8);
1245 }
1246 else
1247 {
1248 if constexpr (VARCOEFF)
1249 {
1250 d00 = varDiffCoeff[0 * varDiffCoeffSize + cnt];
1251 d01 = varDiffCoeff[1 * varDiffCoeffSize + cnt];
1252 d11 = varDiffCoeff[2 * varDiffCoeffSize + cnt];
1253 d02 = varDiffCoeff[3 * varDiffCoeffSize + cnt];
1254 d12 = varDiffCoeff[4 * varDiffCoeffSize + cnt];
1255 d22 = varDiffCoeff[5 * varDiffCoeffSize + cnt];
1256 }
1257
1258 td0 = tmp0 * d00;
1259 td0.fma(tmp1, d01);
1260 td0.fma(tmp2, d02);
1261
1262 td1 = tmp0 * d01;
1263 td1.fma(tmp1, d11);
1264 td1.fma(tmp2, d12);
1265
1266 td2 = tmp0 * d02;
1267 td2.fma(tmp1, d12);
1268 td2.fma(tmp2, d22);
1269
1270 td3 = tmp3 * d00;
1271 td3.fma(tmp4, d01);
1272 td3.fma(tmp5, d02);
1273
1274 td4 = tmp3 * d01;
1275 td4.fma(tmp4, d11);
1276 td4.fma(tmp5, d12);
1277
1278 td5 = tmp3 * d02;
1279 td5.fma(tmp4, d12);
1280 td5.fma(tmp5, d22);
1281
1282 td6 = df2 * d00;
1283 td6.fma(df5, d01);
1284 td6.fma(df8, d02);
1285
1286 td7 = df2 * d01;
1287 td7.fma(df5, d11);
1288 td7.fma(df8, d12);
1289
1290 td8 = df2 * d02;
1291 td8.fma(df5, d12);
1292 td8.fma(df8, d22);
1293
1294 g0 = td0 * tmp0;
1295 g0.fma(td1, tmp1);
1296 g0.fma(td2, tmp2);
1297
1298 g3 = td0 * tmp3;
1299 g3.fma(td1, tmp4);
1300 g3.fma(td2, tmp5);
1301
1302 g4 = td0 * df2;
1303 g4.fma(td1, df5);
1304 g4.fma(td2, df8);
1305
1306 g1 = td3 * tmp3;
1307 g1.fma(td4, tmp4);
1308 g1.fma(td5, tmp5);
1309
1310 g5 = td3 * df2;
1311 g5.fma(td4, df5);
1312 g5.fma(td5, df8);
1313
1314 g2 = td6 * df2;
1315 g2.fma(td7, df5);
1316 g2.fma(td8, df8);
1317 }
1318
1319 simd_type d0 = deriv0[cnt];
1320 simd_type d1 = deriv1[cnt];
1321 simd_type d2 = deriv2[cnt];
1322
1323 tmp0 = g0 * d0;
1324 tmp0.fma(g3, d1);
1325 tmp0.fma(g4, d2);
1326 deriv0[cnt] = tmp0 * wJ;
1327
1328 tmp1 = g3 * d0;
1329 tmp1.fma(g1, d1);
1330 tmp1.fma(g5, d2);
1331 deriv1[cnt] = tmp1 * wJ;
1332
1333 tmp2 = g4 * d0;
1334 tmp2.fma(g5, d1);
1335 tmp2.fma(g2, d2);
1336 deriv2[cnt] = tmp2 * wJ;
1337
1338 if constexpr (SCALE)
1339 {
1340 phys[cnt] *= lambda * wJ;
1341 }
1342 }
1343 }
1344 }
1345}

References jac.

◆ DiffusionCoeffwithWJTriKernel() [1/2]

template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJTriKernel ( const unsigned int  ncoord,
const unsigned int  nq0,
const unsigned int  nq1,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const simd_type *  df_ptr,
const simd_type *  hfac0,
const simd_type *  hfac1,
simd_type *  deriv0,
simd_type *  deriv1 
)
static

Triangle kernel contracting reference derivatives with diffusion tensor and metric terms.

Definition at line 275 of file LaplacianBlockOpSerialAVXSumFacKernels.hpp.

284{
285 const auto ndf = 2 * ncoord;
286
287 simd_type jac = {1.0};
288 simd_type d00 = {1.0};
289 simd_type d01 = {0.0};
290 simd_type d11 = {1.0};
291 simd_type d02 = {0.0};
292 simd_type d12 = {0.0};
293 simd_type d22 = {1.0}; // var diffusion terms
294 simd_type dtmp0, dtmp1, dtmp2, dtmp3; // temp for vardiff
295 simd_type dtmp4, dtmp5;
296 simd_type df0, df1, df2, df3, df4 = {0.0}, df5 = {0.0};
297 simd_type metric00, metric01, metric11;
298
299 if (useDiffCoeff && !VARCOEFF)
300 {
301 d00 = diffCoeff[0];
302 d01 = diffCoeff[1];
303 d11 = diffCoeff[2];
304 if (ncoord == 3)
305 {
306 d02 = diffCoeff[3];
307 d12 = diffCoeff[4];
308 d22 = diffCoeff[5];
309 }
310 }
311
312 // Precompute Laplacian metrics
313 if constexpr (!DEFORMED)
314 {
315 jac = jac_ptr[0];
316
317 df0 = df_ptr[0];
318 df1 = df_ptr[1];
319 df2 = df_ptr[2];
320 df3 = df_ptr[3];
321 if (ncoord == 3)
322 {
323 df4 = df_ptr[4];
324 df5 = df_ptr[5];
325 }
326 }
327
328 for (unsigned int q = 0; q < nq1; ++q)
329 {
330 simd_type h1 = hfac1[q];
331 simd_type w1J = jac * w1[q];
332 for (unsigned int p = 0; p < nq0; ++p)
333 {
334 unsigned int cnt = q * nq0 + p;
335
336 simd_type wJ = w1J * w0[p];
337
338 if constexpr (DEFORMED)
339 {
340 wJ *= jac_ptr[cnt];
341 df0 = df_ptr[cnt * ndf];
342 df1 = df_ptr[cnt * ndf + 1];
343 df2 = df_ptr[cnt * ndf + 2];
344 df3 = df_ptr[cnt * ndf + 3];
345 if (ncoord == 3)
346 {
347 df4 = df_ptr[cnt * ndf + 4];
348 df5 = df_ptr[cnt * ndf + 5];
349 }
350 }
351
352 simd_type h0 = hfac0[p];
353
354 // M = [M_00, df1; M_10; df3]
355 metric00 = h1 * (df0 + h0 * df1); // M_00
356 simd_type tmp = h1 * (df2 + h0 * df3); // M_10
357
358 if (!VARCOEFF && !useDiffCoeff)
359 {
360 metric01 = metric00 * df1;
361 metric00 = metric00 * metric00;
362
363 metric01.fma(tmp, df3);
364 metric00.fma(tmp, tmp);
365
366 metric11 = df1 * df1;
367 metric11.fma(df3, df3);
368
369 if (ncoord == 3)
370 {
371 simd_type tmp2 = h1 * (df4 + h0 * df5); // M_10
372 metric00.fma(tmp2, tmp2);
373 metric01.fma(tmp2, df5);
374 metric11.fma(df5, df5);
375 }
376 }
377 else
378 {
379 if constexpr (VARCOEFF)
380 {
381 d00 = varDiffCoeff[0 * varDiffCoeffSize + cnt];
382 d01 = varDiffCoeff[1 * varDiffCoeffSize + cnt];
383 d11 = varDiffCoeff[2 * varDiffCoeffSize + cnt];
384 if (ncoord == 3)
385 {
386 d02 = varDiffCoeff[3 * varDiffCoeffSize + cnt];
387 d12 = varDiffCoeff[4 * varDiffCoeffSize + cnt];
388 d22 = varDiffCoeff[5 * varDiffCoeffSize + cnt];
389 }
390 }
391
392 if (ncoord == 2)
393 {
394 // M = [M_00, df1; M_10; df3]
395 dtmp0 = metric00 * d00;
396 dtmp0.fma(tmp, d01);
397 dtmp1 = metric00 * d01;
398 dtmp1.fma(tmp, d11);
399 dtmp2 = df1 * d00;
400 dtmp2.fma(df3, d01);
401 dtmp3 = df1 * d01;
402 dtmp3.fma(df3, d11);
403
404 metric00 = metric00 * dtmp0;
405 metric00.fma(tmp, dtmp1);
406 metric01 = df1 * dtmp0;
407 metric01.fma(df3, dtmp1);
408 metric11 = df1 * dtmp2;
409 metric11.fma(df3, dtmp3);
410 }
411 else
412 {
413 simd_type tmp2 = h1 * (df4 + h0 * df5); // M_10
414 dtmp0 = metric00 * d00;
415 dtmp0.fma(tmp, d01);
416 dtmp0.fma(tmp2, d02);
417 dtmp1 = metric00 * d01;
418 dtmp1.fma(tmp, d11);
419 dtmp1.fma(tmp2, d12);
420 dtmp2 = metric00 * d02;
421 dtmp2.fma(tmp, d12);
422 dtmp2.fma(tmp2, d22);
423 dtmp3 = df1 * d00;
424 dtmp3.fma(df3, d01);
425 dtmp3.fma(df5, d02);
426 dtmp4 = df1 * d01;
427 dtmp4.fma(df3, d11);
428 dtmp4.fma(df5, d12);
429 dtmp5 = df1 * d02;
430 dtmp5.fma(df3, d12);
431 dtmp5.fma(df5, d22);
432
433 metric00 = metric00 * dtmp0;
434 metric00.fma(tmp, dtmp1);
435 metric00.fma(tmp2, dtmp2);
436 metric01 = df1 * dtmp0;
437 metric01.fma(df3, dtmp1);
438 metric01.fma(df5, dtmp2);
439 metric11 = df1 * dtmp3;
440 metric11.fma(df3, dtmp4);
441 metric11.fma(df5, dtmp5);
442 }
443 }
444
445 simd_type d0 = deriv0[cnt];
446 simd_type d1 = deriv1[cnt];
447
448 tmp = metric00 * d0;
449 tmp.fma(metric01, d1);
450 deriv0[cnt] = tmp * wJ;
451
452 tmp = metric01 * d0;
453 tmp.fma(metric11, d1);
454 deriv1[cnt] = tmp * wJ;
455 }
456 }
457}

References jac.

◆ DiffusionCoeffwithWJTriKernel() [2/2]

template<bool SCALE, bool DEFORMED, bool VARCOEFF, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DiffusionCoeffwithWJTriKernel ( const unsigned int  ncoord,
const unsigned int  nq0,
const unsigned int  nq1,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const simd_type *  df_ptr,
const simd_type *  hfac0,
const simd_type *  hfac1,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  phys,
typename simd_type::scalarType  lambda = 0.0 
)
static

Triangle kernel contracting reference derivatives with diffusion tensor and metric terms, with optional lambda-weighted mass contribution.

Definition at line 288 of file HelmholtzBlockOpSerialAVXSumFacKernels.hpp.

298{
299 const auto ndf = 2 * ncoord;
300
301 simd_type jac = {1.0};
302 simd_type d00 = {1.0};
303 simd_type d01 = {0.0};
304 simd_type d11 = {1.0};
305 simd_type d02 = {0.0};
306 simd_type d12 = {0.0};
307 simd_type d22 = {1.0}; // var diffusion terms
308 simd_type dtmp0, dtmp1, dtmp2, dtmp3; // temp for vardiff
309 simd_type dtmp4, dtmp5;
310 simd_type df0, df1, df2, df3, df4 = {0.0}, df5 = {0.0};
311 simd_type metric00, metric01, metric11;
312
313 if (useDiffCoeff && !VARCOEFF)
314 {
315 d00 = diffCoeff[0];
316 d01 = diffCoeff[1];
317 d11 = diffCoeff[2];
318 if (ncoord == 3)
319 {
320 d02 = diffCoeff[3];
321 d12 = diffCoeff[4];
322 d22 = diffCoeff[5];
323 }
324 }
325
326 // Precompute Laplacian metrics
327 if constexpr (!DEFORMED)
328 {
329 jac = jac_ptr[0];
330
331 df0 = df_ptr[0];
332 df1 = df_ptr[1];
333 df2 = df_ptr[2];
334 df3 = df_ptr[3];
335 if (ncoord == 3)
336 {
337 df4 = df_ptr[4];
338 df5 = df_ptr[5];
339 }
340 }
341
342 for (unsigned int q = 0; q < nq1; ++q)
343 {
344 simd_type h1 = hfac1[q];
345 simd_type w1J = jac * w1[q];
346 for (unsigned int p = 0; p < nq0; ++p)
347 {
348 unsigned int cnt = q * nq0 + p;
349
350 simd_type wJ = w1J * w0[p];
351
352 if constexpr (DEFORMED)
353 {
354 wJ *= jac_ptr[cnt];
355 df0 = df_ptr[cnt * ndf];
356 df1 = df_ptr[cnt * ndf + 1];
357 df2 = df_ptr[cnt * ndf + 2];
358 df3 = df_ptr[cnt * ndf + 3];
359 if (ncoord == 3)
360 {
361 df4 = df_ptr[cnt * ndf + 4];
362 df5 = df_ptr[cnt * ndf + 5];
363 }
364 }
365
366 simd_type h0 = hfac0[p];
367
368 // M = [M_00, df1; M_10; df3]
369 metric00 = h1 * (df0 + h0 * df1); // M_00
370 simd_type tmp = h1 * (df2 + h0 * df3); // M_10
371
372 if (!VARCOEFF && !useDiffCoeff)
373 {
374 metric01 = metric00 * df1;
375 metric00 = metric00 * metric00;
376
377 metric01.fma(tmp, df3);
378 metric00.fma(tmp, tmp);
379
380 metric11 = df1 * df1;
381 metric11.fma(df3, df3);
382
383 if (ncoord == 3)
384 {
385 simd_type tmp2 = h1 * (df4 + h0 * df5); // M_10
386 metric00.fma(tmp2, tmp2);
387 metric01.fma(tmp2, df5);
388 metric11.fma(df5, df5);
389 }
390 }
391 else
392 {
393 if constexpr (VARCOEFF)
394 {
395 d00 = varDiffCoeff[0 * varDiffCoeffSize + cnt];
396 d01 = varDiffCoeff[1 * varDiffCoeffSize + cnt];
397 d11 = varDiffCoeff[2 * varDiffCoeffSize + cnt];
398 if (ncoord == 3)
399 {
400 d02 = varDiffCoeff[3 * varDiffCoeffSize + cnt];
401 d12 = varDiffCoeff[4 * varDiffCoeffSize + cnt];
402 d22 = varDiffCoeff[5 * varDiffCoeffSize + cnt];
403 }
404 }
405
406 if (ncoord == 2)
407 {
408 // M = [M_00, df1; M_10; df3]
409 dtmp0 = metric00 * d00;
410 dtmp0.fma(tmp, d01);
411 dtmp1 = metric00 * d01;
412 dtmp1.fma(tmp, d11);
413 dtmp2 = df1 * d00;
414 dtmp2.fma(df3, d01);
415 dtmp3 = df1 * d01;
416 dtmp3.fma(df3, d11);
417
418 metric00 = metric00 * dtmp0;
419 metric00.fma(tmp, dtmp1);
420 metric01 = df1 * dtmp0;
421 metric01.fma(df3, dtmp1);
422 metric11 = df1 * dtmp2;
423 metric11.fma(df3, dtmp3);
424 }
425 else
426 {
427 simd_type tmp2 = h1 * (df4 + h0 * df5); // M_10
428 dtmp0 = metric00 * d00;
429 dtmp0.fma(tmp, d01);
430 dtmp0.fma(tmp2, d02);
431 dtmp1 = metric00 * d01;
432 dtmp1.fma(tmp, d11);
433 dtmp1.fma(tmp2, d12);
434 dtmp2 = metric00 * d02;
435 dtmp2.fma(tmp, d12);
436 dtmp2.fma(tmp2, d22);
437 dtmp3 = df1 * d00;
438 dtmp3.fma(df3, d01);
439 dtmp3.fma(df5, d02);
440 dtmp4 = df1 * d01;
441 dtmp4.fma(df3, d11);
442 dtmp4.fma(df5, d12);
443 dtmp5 = df1 * d02;
444 dtmp5.fma(df3, d12);
445 dtmp5.fma(df5, d22);
446
447 metric00 = metric00 * dtmp0;
448 metric00.fma(tmp, dtmp1);
449 metric00.fma(tmp2, dtmp2);
450 metric01 = df1 * dtmp0;
451 metric01.fma(df3, dtmp1);
452 metric01.fma(df5, dtmp2);
453 metric11 = df1 * dtmp3;
454 metric11.fma(df3, dtmp4);
455 metric11.fma(df5, dtmp5);
456 }
457 }
458
459 simd_type d0 = deriv0[cnt];
460 simd_type d1 = deriv1[cnt];
461
462 tmp = metric00 * d0;
463 tmp.fma(metric01, d1);
464 deriv0[cnt] = tmp * wJ;
465
466 tmp = metric01 * d0;
467 tmp.fma(metric11, d1);
468 deriv1[cnt] = tmp * wJ;
469
470 // modify phys only when required
471 if constexpr (SCALE)
472 {
473 phys[cnt] *= wJ * lambda;
474 }
475 }
476 }
477}

References jac.

◆ DirBndCondKernel() [1/2]

template<typename ExecSpace , typename TData >
void Nektar::MultiRegions::detail::DirBndCondKernel ( const size_t  nsize,
const size_t *  mapPtr,
const TData *  inptr,
TData *  outptr,
const unsigned int  streamID 
)

Definition at line 43 of file DirBndCondKernels.hpp.

46{
48
49 Nektar::parallel_for<ExecSpace>(
50 0u, nsize,
51 NEKTAR_LAMBDA(const size_t i) { outptr[mapPtr[i]] = inptr[i]; });
52
54}

References Nektar::LoopExecutionSetStreamID(), and NEKTAR_LAMBDA.

◆ DirBndCondKernel() [2/2]

template<typename ExecSpace , typename TData >
void Nektar::MultiRegions::detail::DirBndCondKernel ( const size_t  nsize,
const TData *  signPtr,
const size_t *  mapPtr,
const TData *  inptr,
TData *  outptr,
const unsigned int  streamID 
)

Definition at line 57 of file DirBndCondKernels.hpp.

60{
62
63 Nektar::parallel_for<ExecSpace>(
64 0u, nsize, NEKTAR_LAMBDA(const size_t i) {
65 outptr[mapPtr[i]] = signPtr[i] * inptr[i];
66 });
67
69}

References Nektar::LoopExecutionSetStreamID(), and NEKTAR_LAMBDA.

◆ DispatchWorkSpace() [1/2]

Nektar::MultiRegions::detail::DispatchWorkSpace ( useSharedMemoryWsp  ,
[&] (const auto isShared) { TData *wspbase=isShared ?(TData *) shmemptr+tableSize :wsp;while(e< nelmt) { const size_t ilane=e % warpsize;const size_t iwarp=e/warpsize;const TData *inptr=in+numDataIn *(nelmt *c+warpsize *iwarp);TData *outptr=out+numDataOut *(nelmt *c+warpsize *iwarp);const size_t wspOffset=isShared ? 0 :nelmt *c+warpsize *iwarp;TData *wspptr=wspbase+(edgeSize+numDataOut) *wspOffset;TData *volptr=wspptr+edgeSize *warpsize;const unsigned int off1=warpsize *2 *tnq00;const unsigned int joff1=(DEFORMED) ? off1 :warpsize *2;for(unsigned int d=0;d< 2;++d) { const bool useD1=CompNeedsCollapsedFac(SHAPE_TYPE, d, 1);const TData *jacptr=jac+d *jacCompStride+numDataJac *warpsize *iwarp;if(!(append||d > 0)) { for(unsigned int p=0;p< numDataOut;++p) { outptr[warpsize *p+ilane]=0.0;} } { TData *dst=useD1 ? volptr :outptr;if(useD1) { for(unsigned int p=0;p< numDataOut;++p) { dst[warpsize *p+ilane]=0.0;} } const TData *nb=(0==d) ? dnbasis0 :nbasis0;const TData *tb=(traceDir0==d) ? dtbasis0 :tbasis0;const bool coll=(traceDir0==d) ? false :isColl0;const bool endp=(0==d) ? false :endPtsColl0;if(endp) { IPWRTPhysTraceEdgeN0Kernel< true, DEFORMED >(ilane, 0, 2, 2, nm0, nm1, nb, tnq00, tb, tw0, jacptr, wspptr, inptr, dst, coll);} else { IPWRTPhysTraceEdgeN0Kernel< false, DEFORMED >(ilane, 0, 2, 2, nm0, nm1, nb, tnq00, tb, tw0, jacptr, wspptr, inptr, dst, coll);} if(useD1) { ScaleAddCollapsedFacKernel(ilane, nm0, nm1, 1u, true, false, s_twoOver1, s_twoOver1, volptr, outptr);} } { const TData *nb=(1==d) ? dnbasis1 :nbasis1;const TData *tb=(traceDir1==d) ? dtbasis1 :tbasis1;const bool coll=(traceDir1==d) ? false :isColl1;const bool endp=(1==d) ? false :endPtsColl1;if(endp) { IPWRTPhysTraceEdgeN1Kernel< true, DEFORMED >(ilane, 0, nedgeN1, nedgeN1, nm0, nm1, nb, tnq10, tb, tw1, jacptr+joff1, wspptr, inptr+off1, outptr, coll);} else { IPWRTPhysTraceEdgeN1Kernel< false, DEFORMED >(ilane, 0, nedgeN1, nedgeN1, nm0, nm1, nb, tnq10, tb, tw1, jacptr+joff1, wspptr, inptr+off1, outptr, coll);} } } e+=getGlobalRange< 0 >(threadBlock);} }   
)

◆ DispatchWorkSpace() [2/2]

Nektar::MultiRegions::detail::DispatchWorkSpace ( useSharedMemoryWsp  ,
[&] (const auto isShared) { TData *wspbase=isShared ?(TData *) shmemptr+tableSize :wsp;while(e< nelmt) { const size_t ilane=e % warpsize;const size_t iwarp=e/warpsize;const TData *inptr=in+numDataIn *(nelmt *c+warpsize *iwarp);TData *outptr=out+numDataOut *(nelmt *c+warpsize *iwarp);const size_t wspOffset=isShared ? 0 :nelmt *c+warpsize *iwarp;TData *wspptr=wspbase+(wsp0Size+wsp1Size+numDataOut) *wspOffset;TData *wsp1ptr=wspptr+wsp0Size *warpsize;TData *volptr=wsp1ptr+wsp1Size *warpsize;const unsigned int in1=2 *tnq00 *tnq01;const unsigned int jac1=DEFORMED ? in1 :2;const unsigned int in2=in1+nfaceN1 *tnq10 *tnq11;const unsigned int jac2=jac1+(DEFORMED ? nfaceN1 *tnq10 *tnq11 :nfaceN1);for(unsigned int d=0;d< 3;++d) { const bool c1=CompNeedsCollapsedFac(SHAPE_TYPE, d, 1);const bool c2=CompNeedsCollapsedFac(SHAPE_TYPE, d, 2);const TData *jacptr=jac+d *jacCompStride+numDataJac *warpsize *iwarp;if(!(append||d > 0)) { for(unsigned int p=0;p< numDataOut;++p) { outptr[warpsize *p+ilane]=0.0;} } const TData *nbd0=(0==d) ? dnbasis0 :nbasis0;const TData *nbd1=(1==d) ? dnbasis1 :nbasis1;const TData *nbd2=(2==d) ? dnbasis2 :nbasis2;const TData *tbd0=(traceDir00==d) ? dtbasis00 :tbasis00;const TData *tbd1=(traceDir01==d) ? dtbasis01 :tbasis01;const TData *tbd2=(traceDir10==d) ? dtbasis10 :tbasis10;const TData *tbd3=(traceDir11==d) ? dtbasis11 :tbasis11;const TData *tbd4=(traceDir20==d) ? dtbasis20 :tbasis20;const TData *tbd5=(traceDir21==d) ? dtbasis21 :tbasis21;const bool cd0=(traceDir00==d) ? false :isColl00;const bool cd1=(traceDir01==d) ? false :isColl01;const bool cd2=(traceDir10==d) ? false :isColl10;const bool cd3=(traceDir11==d) ? false :isColl11;const bool cd4=(traceDir20==d) ? false :isColl20;const bool cd5=(traceDir21==d) ? false :isColl21;const bool epd0=(0==d) ? false :endPtsColl0;const bool epd1=(1==d) ? false :endPtsColl1;const bool epd2=(2==d) ? false :endPtsColl2;{ const bool scale=c1||c2;TData *dst=scale ? volptr :outptr;if(scale) { for(unsigned int p=0;p< numDataOut;++p) { dst[warpsize *p+ilane]=0.0;} } if(epd0) { IPWRTPhysTraceFaceN0Kernel< true, DEFORMED >(ilane, 0, 2, 2, nm0, nm1, nm2, nbd0, tnq00, tnq01, tbd0, tbd1, tw00, tw01, jacptr, wspptr, wsp1ptr, inptr, dst, cd0, cd1);} else { IPWRTPhysTraceFaceN0Kernel< false, DEFORMED >(ilane, 0, 2, 2, nm0, nm1, nm2, nbd0, tnq00, tnq01, tbd0, tbd1, tw00, tw01, jacptr, wspptr, wsp1ptr, inptr, dst, cd0, cd1);} if(scale) { ScaleAddCollapsedFacKernel(ilane, nm0, nm1, nm2, c1, c2, s_twoOver1, s_twoOver2, volptr, outptr);} } { const bool scale=c2;TData *dst=scale ? volptr :outptr;if(scale) { for(unsigned int p=0;p< numDataOut;++p) { dst[warpsize *p+ilane]=0.0;} } if(epd1) { IPWRTPhysTraceFaceN1Kernel< true, DEFORMED >(ilane, 0, nfaceN1, nfaceN1, nm0, nm1, nm2, nbd1, tnq10, tnq11, tbd2, tbd3, tw10, tw11, jacptr+jac1 *warpsize, wspptr, wsp1ptr, inptr+in1 *warpsize, dst, cd2, cd3);} else { IPWRTPhysTraceFaceN1Kernel< false, DEFORMED >(ilane, 0, nfaceN1, nfaceN1, nm0, nm1, nm2, nbd1, tnq10, tnq11, tbd2, tbd3, tw10, tw11, jacptr+jac1 *warpsize, wspptr, wsp1ptr, inptr+in1 *warpsize, dst, cd2, cd3);} if(scale) { ScaleAddCollapsedFacKernel(ilane, nm0, nm1, nm2, false, c2, s_twoOver1, s_twoOver2, volptr, outptr);} } { const bool scale=c1;TData *dst=scale ? volptr :outptr;if(scale) { for(unsigned int p=0;p< numDataOut;++p) { dst[warpsize *p+ilane]=0.0;} } if(epd2) { IPWRTPhysTraceFaceN2Kernel< true, DEFORMED >(ilane, 0, nfaceN2, nfaceN2, nm0, nm1, nm2, nbd2, tnq20, tnq21, tbd4, tbd5, tw20, tw21, jacptr+jac2 *warpsize, wspptr, wsp1ptr, inptr+in2 *warpsize, dst, cd4, cd5);} else { IPWRTPhysTraceFaceN2Kernel< false, DEFORMED >(ilane, 0, nfaceN2, nfaceN2, nm0, nm1, nm2, nbd2, tnq20, tnq21, tbd4, tbd5, tw20, tw21, jacptr+jac2 *warpsize, wspptr, wsp1ptr, inptr+in2 *warpsize, dst, cd4, cd5);} if(scale) { ScaleAddCollapsedFacKernel(ilane, nm0, nm1, nm2, c1, false, s_twoOver1, s_twoOver2, volptr, outptr);} } } e+=getGlobalRange< 0 >(threadBlock);} }   
)

◆ DivergenceKernelLauncher() [1/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DivergenceKernelLauncher ( const TPhysSizeParameter1D  sizeParam1D,
const typename simd_type::scalarType *  D0,
const simd_type *  df_ptr,
simd_type *  wsp0,
const simd_type *  in0,
simd_type *  out 
)
static

Differentiate one element group of a 1D block: out = du/dx, with u the single component at in0.

Unpacks the size parameter – runtime or compile-time, both satisfying IsPhysSizeParameter1D_v as the static_assert enforces – forms du/dxi in wsp0 with PhysDerivTensor1DKernel and scales it with PhysDerivDir1DKernel by the group's derivative factor for direction 0, the first of the ncoord factors each point (deformed) or element (regular) carries, overwriting out.

Template Parameters
SHAPE_TYPEElement shape (segments only; unused).
DEFORMEDPer-point derivative factors.
TPhysSizeParameter1D1D physical-space size parameter (see ElmtHelper.hpp).
simd_typeSIMD vector type; one element per lane.
Parameters
sizeParam1DElement sizes: coordinate dimension and quadrature points.
D01D derivative matrix of the direction.
df_ptrDerivative factors of the group.
wsp0Workspace for the reference derivative.
in0Input values of the group.
outOutput values of the group.

Definition at line 98 of file DivergenceBlockOpSerialAVXSumFacKernels.hpp.

102{
103 static_assert(IsPhysSizeParameter1D_v<TPhysSizeParameter1D>,
104 "Template argument must be either of type "
105 "NonTemplatedPhysSizeParameter1D or "
106 "TemplatedPhysSizeParameter1D.");
107
108 const unsigned int ncoord = sizeParam1D.ncoord();
109 const unsigned int nq0 = sizeParam1D.nq0();
110
111 // du/dx
112 PhysDerivTensor1DKernel(nq0, in0, D0, wsp0);
113 PhysDerivDir1DKernel<SHAPE_TYPE, false, DEFORMED, 0>(nq0, ncoord, df_ptr,
114 wsp0, out);
115}

References out, and PhysDerivTensor1DKernel().

Referenced by Nektar::MultiRegions::detail::DivergenceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl().

◆ DivergenceKernelLauncher() [2/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DivergenceKernelLauncher ( const TPhysSizeParameter2D  sizeParam2D,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  df_ptr,
simd_type *  wsp0,
simd_type *  wsp1,
const simd_type *  in0,
const simd_type *  in1,
simd_type *  out 
)
static

Differentiate one element group of a 2D block: out = du/dx + dv/dy, with u and v the components at in0 and in1.

Unpacks the size parameter – runtime or compile-time, both satisfying IsPhysSizeParameter2D_v as the static_assert enforces – then, for u, forms the two reference-direction derivatives in wsp0 and wsp1 with PhysDerivTensor2DKernel and hands them to PhysDerivDir2DKernel with DIR = 0, which applies the collapsed-coordinate correction for triangles (using f0 and f1), contracts with row 0 of the derivative factors and overwrites out; the same pair of calls with v, DIR = 1 and APPEND then adds dv/dy.

Template Parameters
SHAPE_TYPEElement shape; selects the collapsed-coordinate correction.
DEFORMEDPer-point derivative factors.
TPhysSizeParameter2D2D physical-space size parameter (see ElmtHelper.hpp).
simd_typeSIMD vector type; one element per lane.
Parameters
sizeParam2DElement sizes: coordinate dimension and quadrature points per direction.
D01D derivative matrix of direction 0.
D11D derivative matrix of direction 1.
f0Collapsed-coordinate factor (1 + eta_0)/2 at the direction-0 points (triangles only).
f1Collapsed-coordinate factor 2/(1 - eta_1) at the direction-1 points (triangles only).
df_ptrDerivative factors of the group, 2 * ncoord per element group, or per point when deformed.
wsp0Workspace for the direction-0 derivative.
wsp1Workspace for the direction-1 derivative.
in0First component of the group.
in1Second component of the group.
outOutput values of the group.

Definition at line 157 of file DivergenceBlockOpSerialAVXSumFacKernels.hpp.

163{
164 static_assert(IsPhysSizeParameter2D_v<TPhysSizeParameter2D>,
165 "Template argument must be either of type "
166 "NonTemplatedPhysSizeParameter2D or "
167 "TemplatedPhysSizeParameter2D.");
168
169 const unsigned int ncoord = sizeParam2D.ncoord();
170 const unsigned int nq0 = sizeParam2D.nq0();
171 const unsigned int nq1 = sizeParam2D.nq1();
172
173 // du/dx
174 PhysDerivTensor2DKernel(nq0, nq1, in0, D0, D1, wsp0, wsp1);
175 PhysDerivDir2DKernel<SHAPE_TYPE, false, DEFORMED, 0>(
176 nq0, nq1, ncoord, f0, f1, df_ptr, wsp0, wsp1, out);
177
178 // dv/dy
179 PhysDerivTensor2DKernel(nq0, nq1, in1, D0, D1, wsp0, wsp1);
180 PhysDerivDir2DKernel<SHAPE_TYPE, true, DEFORMED, 1>(
181 nq0, nq1, ncoord, f0, f1, df_ptr, wsp0, wsp1, out);
182}

References in1, out, and PhysDerivTensor2DKernel().

◆ DivergenceKernelLauncher() [3/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::DivergenceKernelLauncher ( const TPhysSizeParameter3D  sizeParam3D,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
const typename simd_type::scalarType *  D2,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  f1m,
const simd_type *  f2,
const simd_type *  df_ptr,
simd_type *  wsp0,
simd_type *  wsp1,
simd_type *  wsp2,
const simd_type *  in0,
const simd_type *  in1,
const simd_type *  in2,
simd_type *  out 
)
static

Differentiate one element group of a 3D block: out = du/dx + dv/dy + dw/dz, with u, v and w the components at in0, in1 and in2.

As in two dimensions, each component in turn is differentiated in the three reference directions by PhysDerivTensor3DKernel into wsp0 to wsp2 and contracted with its row of derivative factors by PhysDerivDir3DKernel, which also applies the collapsed-coordinate correction of the shape (using f0, f1, f1m and f2); the DIR = 0 call overwrites out and the DIR = 1, 2 calls set APPEND and accumulate. The element is assumed to have coordinate dimension three, so it carries nine derivative factors.

Template Parameters
SHAPE_TYPEElement shape; selects the collapsed-coordinate correction.
DEFORMEDPer-point derivative factors.
TPhysSizeParameter3D3D physical-space size parameter (see ElmtHelper.hpp).
simd_typeSIMD vector type; one element per lane.
Parameters
sizeParam3DElement sizes: quadrature points per direction.
D01D derivative matrix of direction 0.
D11D derivative matrix of direction 1.
D21D derivative matrix of direction 2.
f0\(\tfrac{1}{2}(1+\eta_0)\) at the direction-0 points.
f1\(\tfrac{1}{2}(1+\eta_1)\) at the direction-1 points.
f1m\(2/(1-\eta_1)\) at the direction-1 points.
f2\(2/(1-\eta_2)\) at the direction-2 points. All four are unused for hexahedra.
df_ptrDerivative factors of the group, nine per element group, or per point when deformed.
wsp0Workspace for the direction-0 derivative.
wsp1Workspace for the direction-1 derivative.
wsp2Workspace for the direction-2 derivative.
in0First component of the group.
in1Second component of the group.
in2Third component of the group.
outOutput values of the group.

Definition at line 228 of file DivergenceBlockOpSerialAVXSumFacKernels.hpp.

237{
238 static_assert(IsPhysSizeParameter3D_v<TPhysSizeParameter3D>,
239 "Template argument must be either of type "
240 "NonTemplatedPhysSizeParameter3D or "
241 "TemplatedPhysSizeParameter3D.");
242
243 const unsigned int nq0 = sizeParam3D.nq0();
244 const unsigned int nq1 = sizeParam3D.nq1();
245 const unsigned int nq2 = sizeParam3D.nq2();
246
247 // du/dx
248 PhysDerivTensor3DKernel(nq0, nq1, nq2, in0, D0, D1, D2, wsp0, wsp1, wsp2);
249 PhysDerivDir3DKernel<SHAPE_TYPE, false, DEFORMED, 0>(
250 nq0, nq1, nq2, f0, f1, f1m, f2, df_ptr, wsp0, wsp1, wsp2, out);
251
252 // dv/dy
253 PhysDerivTensor3DKernel(nq0, nq1, nq2, in1, D0, D1, D2, wsp0, wsp1, wsp2);
254 PhysDerivDir3DKernel<SHAPE_TYPE, true, DEFORMED, 1>(
255 nq0, nq1, nq2, f0, f1, f1m, f2, df_ptr, wsp0, wsp1, wsp2, out);
256
257 // dw/dz
258 PhysDerivTensor3DKernel(nq0, nq1, nq2, in2, D0, D1, D2, wsp0, wsp1, wsp2);
259 PhysDerivDir3DKernel<SHAPE_TYPE, true, DEFORMED, 2>(
260 nq0, nq1, nq2, f0, f1, f1m, f2, df_ptr, wsp0, wsp1, wsp2, out);
261}

References in1, in2, out, and PhysDerivTensor3DKernel().

◆ EnqueueExpressionKernel()

template<typename TData , typename TStream >
void Nektar::MultiRegions::detail::EnqueueExpressionKernel ( const ExpressionKernels &  kernels,
const ExpressionKernelIndex  index,
const ExpressionKernelArgs< TData > &  kernelArgs,
const unsigned int  gridSize,
const unsigned int  blockSize,
TStream  stream 
)

Launch a variant of the compiled kernels on a native stream.

Template Parameters
TDataFloating-point type of the field data.
TStreamNative stream type.
Parameters
kernelsCompiled kernels.
indexVariant to launch.
kernelArgsLaunch arguments; the launch takes their addresses.
gridSizeNumber of thread blocks.
blockSizeThreads per block.
streamStream to launch on.

Definition at line 287 of file ExpressionBlockOpDeviceGenericHIPCUDAHelper.hpp.

292{
293 // The launch takes the address of each argument, so the arguments must
294 // outlive it: they are held by kernelArgs.
295 const size_t numEvar = kernelArgs.evarptr.size();
296 const size_t numArgs = 7 + numEvar + kernelArgs.outptr.size();
297 auto &args = kernelArgs.launchArgs;
298 args.resize(numArgs);
299 args[0] = (void *)&kernelArgs.nsize;
300 args[1] = (void *)&kernelArgs.compSize;
301 args[2] = (void *)&kernelArgs.nelmt;
302 args[3] = (void *)&kernelArgs.ndata;
303 args[4] = (void *)&kernelArgs.scale;
304 args[5] = (void *)&kernelArgs.coordptr;
305 args[6] = (void *)&kernelArgs.time;
306
307 // Set input pointers.
308 for (size_t i = 0; i < numEvar; ++i)
309 {
310 args[7 + i] = (void *)&kernelArgs.evarptr[i];
311 }
312
313 // Set output pointers.
314 for (size_t i = 0; i < kernelArgs.outptr.size(); ++i)
315 {
316 args[7 + numEvar + i] = (void *)&kernelArgs.outptr[i];
317 }
318
319 // Launch kernel.
320 CHECK_HIPCUDA_DRIVER_ERROR(nekLaunchKernel(kernels.kernels[index], gridSize,
321 1, 1, blockSize, 1, 1, 0, stream,
322 args.data(), nullptr));
323}
#define nekLaunchKernel
size_t nsize
Stored values of one component over every homogeneous mode.
std::vector< const TData * > evarptr
One input pointer per EVAR, at the component's first mode.
std::vector< void * > launchArgs
Addresses of the arguments above, as a CUDA/HIP launch takes them, kept so that their storage is reus...
const TData * coordptr
Coordinate table of the block, for one mode.
size_t compSize
Stored values of one component in one mode.
std::vector< TData * > outptr
One output pointer per unmasked component, at its first mode.
size_t nelmt
Number of elements of the block, without padding.

References CHECK_HIPCUDA_DRIVER_ERROR, Nektar::MultiRegions::detail::ExpressionKernelArgs< TData >::compSize, Nektar::MultiRegions::detail::ExpressionKernelArgs< TData >::coordptr, Nektar::MultiRegions::detail::ExpressionKernelArgs< TData >::evarptr, Nektar::MultiRegions::detail::ExpressionKernels::kernels, Nektar::MultiRegions::detail::ExpressionKernelArgs< TData >::launchArgs, Nektar::MultiRegions::detail::ExpressionKernelArgs< TData >::ndata, nekLaunchKernel, Nektar::MultiRegions::detail::ExpressionKernelArgs< TData >::nelmt, Nektar::MultiRegions::detail::ExpressionKernelArgs< TData >::nsize, Nektar::MultiRegions::detail::ExpressionKernelArgs< TData >::outptr, Nektar::MultiRegions::detail::ExpressionKernelArgs< TData >::scale, and Nektar::MultiRegions::detail::ExpressionKernelArgs< TData >::time.

Referenced by LaunchExpressionKernel().

◆ FETCH_SHARED_MEMORY()

Nektar::MultiRegions::detail::FETCH_SHARED_MEMORY ( shmemptr  )

◆ FetchTraceTables()

template<typename TTable , typename MemSpace >
TraceTables< TTable > Nektar::MultiRegions::detail::FetchTraceTables ( const LocalRegions::ExpansionSharedPtr &  exp,
const LibUtilities::NekDataWarehouseSharedPtr &  warehouse 
)

Fetch the trace tables of the block whose representative expansion is exp from warehouse.

A direction with one trace takes its end-point interpolant onto the Gauss-Legendre-with-M points, whose first point is \(\xi = -1\); a direction with two onto the Gauss-Lobatto points, both ends.

Template Parameters
TTableTable entry type.
MemSpaceMemory space the tables are fetched to.
Parameters
expRepresentative expansion of the block.
warehouseWarehouse the tables are fetched from.

Definition at line 108 of file TraceTables.hpp.

111{
113 const auto shape = exp->DetShapeType();
114 const unsigned int ndim = exp->GetShapeDimension();
115
116 for (unsigned int dir = 0; dir < ndim; ++dir)
117 {
118 const auto bkey = exp->GetBasis(dir)->GetBasisKey();
119 t.nm.push_back(exp->GetNumPoints(dir));
120
121 const unsigned int ntrace =
122 LibUtilities::ShapeTypeNumTraceInDir[shape][dir];
123 const LibUtilities::PointsType endPtsType =
124 ntrace == 1 ? LibUtilities::eGaussLegendreWithM
125 : LibUtilities::eGaussLobattoLegendre;
126 t.B.push_back(warehouse->template GetData<MemSpace>(
127 LibUtilities::BasisDataKey<TTable>(bkey, LibUtilities::eInterp,
128 ntrace, endPtsType)));
129
130 const unsigned int nEndPts =
131 LibUtilities::PointsTypeNumEndPts[bkey.GetPointsType()];
132 ASSERTL1(nEndPts == 0 || nEndPts == ntrace,
133 "Trace and number of end points in PointsType differ");
134 t.endPtsCollocated.push_back(nEndPts != 0);
135 }
136
137 const auto expPtsKeys = exp->GetPointsKeys();
138 for (unsigned int f = 0; f < ndim; ++f)
139 {
140 const unsigned int tr = ndim - 1 - f;
141 for (unsigned int d = 0; d + 1 < ndim; ++d)
142 {
143 const unsigned int dir = exp->GetGeom()->GetDir(tr, d);
144 const auto trBKey = exp->GetTraceBasisKey(tr, d);
145 const auto trPtsKey = trBKey.GetPointsKey();
146 const unsigned int nq = trPtsKey.GetNumPoints();
147
148 t.isCollocated.push_back(expPtsKeys[dir] == trPtsKey);
149 t.nq.push_back(nq);
150 t.B.push_back(warehouse->template GetData<MemSpace>(
152 exp->GetBasis(dir)->GetBasisKey(), LibUtilities::eInterp,
153 nq, trPtsKey.GetPointsType())));
154 t.W.push_back(warehouse->template GetData<MemSpace>(
156 LibUtilities::eWeights)));
157 }
158 }
159 return t;
160}
The trace tables of one element block.
std::vector< const TTable * > W
The trace quadrature weights of each face pair.
std::vector< bool > isCollocated
Whether each face pair's trace rule is the volume rule of its direction, in which case its in-face in...
std::vector< unsigned int > nq
Trace quadrature points of each face pair.
std::vector< bool > endPtsCollocated
Whether each direction's volume rule contains its end points, in which case its end-point interpolant...
std::vector< const TTable * > B
The end-point interpolant of each direction, on its traces, then the in-face interpolant of each fac...
std::vector< unsigned int > nm
Volume quadrature points per direction.

References ASSERTL1, Nektar::MultiRegions::detail::TraceTables< TTable >::B, Nektar::LibUtilities::eGaussLegendreWithM, Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eInterp, Nektar::MultiRegions::detail::TraceTables< TTable >::endPtsCollocated, Nektar::LibUtilities::eWeights, Nektar::MultiRegions::detail::TraceTables< TTable >::isCollocated, Nektar::MultiRegions::detail::TraceTables< TTable >::nm, Nektar::MultiRegions::detail::TraceTables< TTable >::nq, Nektar::LibUtilities::PointsTypeNumEndPts, Nektar::LibUtilities::ShapeTypeNumTraceInDir, and Nektar::MultiRegions::detail::TraceTables< TTable >::W.

◆ findMatching()

int Nektar::MultiRegions::detail::findMatching ( const std::string &  s,
int  start,
int  direction 
)
inline

Find the bracket matching the one at start by scanning in the given direction.

Parameters
sExpression string to scan.
startPosition of the opening or closing bracket to match.
direction+1 to scan forwards from an opening bracket, -1 to scan backwards from a closing one.
Returns
Position of the matching bracket, or start if none is found.

Definition at line 164 of file ExpressionBlockOpDeviceGenericHelper.hpp.

165{
166 int count = 0;
167 for (int i = start; i >= 0 && i < s.length(); i += direction)
168 {
169 if (s[i] == '(')
170 count += direction;
171 else if (s[i] == ')')
172 count -= direction;
173 if (count == 0)
174 return i;
175 }
176 return start;
177}

Referenced by convertPow().

◆ for()

Nektar::MultiRegions::detail::for ( )

Definition at line 257 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacTOPKernels.hpp.

261 {
262 const auto elmtBlock =
263 GetDeviceElmtBlock(e0, nelmt, elmtsPerBlock, threadBlock);
264 const size_t e = elmtBlock.elmtIdx;
265 const unsigned int idx0 = getLocalIdx<0>(elmtBlock);
266 const unsigned int stride = getLocalRange<0>(elmtBlock);
267
268 const TData *inptr = in + numDataIn * (nelmt * c + e);
269 TData *outptr = out + numDataOut * (nelmt * c + e);
270 const TData *jacptr = jac + numDataJac * e;
271
272 const TData fg0 = jacptr[0] * inptr[0];
273 const TData fg1 = jacptr[1] * inptr[1];
274
275 for (unsigned int p = idx0; p < nm0; p += stride)
276 {
277 TData acc = append ? outptr[p] : TData(0.0);
278 acc += dnbasis0[2 * p] * fg0;
279 acc += dnbasis0[2 * p + 1] * fg1;
280 outptr[p] = acc;
281 }
282
283 localBarrier(elmtBlock);
284 }
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int numDataJac
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int numDataOut
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const bool append
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int numDataIn
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT dnbasis0

References append, c, dnbasis0, e, elmtsPerBlock, in, jac, nelmt, nm0, numDataIn, numDataJac, numDataOut, out, and threadBlock.

◆ FwdTransBC1DKernel()

template<typename ExecSpace , LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::FwdTransBC1DKernel ( const unsigned int  nm0,
const unsigned int  nq0,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  w0,
const unsigned int  offset_seg,
const simd_type *  invintmass,
const simd_type *  jac,
const simd_type *  in,
simd_type *  out,
simd_type *  wsp1,
simd_type *  wsp2 
)
static

Definition at line 294 of file FwdTransBCBlockOpSerialAVXKernels.hpp.

300{
301 FwdTransBCSegKernel<ExecSpace, DEFORMED>(
302 nm0, nq0, basis0, w0, offset_seg, invintmass, jac, in, out, wsp1, wsp2);
303}

References in, jac, nm0, and out.

◆ FwdTransBC2DKernel()

template<typename ExecSpace , LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::FwdTransBC2DKernel ( const unsigned int  nm0,
const unsigned int  nm1,
const unsigned int  nq0,
const unsigned int  nq1,
const bool  isModified,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  basis1,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  interp1to0,
const unsigned int  offset_seg,
const simd_type *  invintmass0,
const simd_type *  invintmass1,
const simd_type *  tJac,
const unsigned int *  tMap,
const int *  tSign,
const unsigned int  nmTotInt,
const unsigned int *  iMap,
const simd_type *  invintmass,
const simd_type *  jac,
const simd_type *  in,
simd_type *  out,
simd_type *  wsp1,
simd_type *  wsp2,
simd_type *  wsp3,
simd_type *  wsp4 
)
static

Definition at line 307 of file FwdTransBCBlockOpSerialAVXKernels.hpp.

321{
322 if constexpr (SHAPE_TYPE == LibUtilities::Quad)
323 {
324 FwdTransBCQuadKernel<ExecSpace, DEFORMED>(
325 nm0, nm1, nq0, nq1, basis0, basis1, w0, w1, offset_seg, invintmass0,
326 invintmass1, tJac, tMap, tSign, nmTotInt, iMap, invintmass, jac, in,
327 out, wsp1, wsp2, wsp3, wsp4);
328 }
329 else if constexpr (SHAPE_TYPE == LibUtilities::Tri)
330 {
331 FwdTransBCTriKernel<ExecSpace, DEFORMED>(
332 nm0, nm1, nq0, nq1, isModified, basis0, basis1, w0, w1, interp1to0,
333 offset_seg, invintmass0, tJac, tMap, tSign, nmTotInt, iMap,
334 invintmass, jac, in, out, wsp1, wsp2, wsp3, wsp4);
335 }
336 // else if constexpr (SHAPE_TYPE == LibUtilities::NodalTri)
337 // {
338 // const auto nmTot = nm0 * (nm0 + 1) / 2;
339 // simd_type *outtmp = wsp0 + nq1;
340 //
341 // FwdTransBCTriKernel<SCALE, APPEND>(
342 // nm0, nm1, nq0, nq1, isModified, in, B0, B1, wsp0, outtmp, scale);
343 // MatVecKernel(nmTot, NtoMTrans, outtmp, out);
344 // }
345}

References in, jac, nm0, nm1, out, Nektar::LibUtilities::Quad, and Nektar::LibUtilities::Tri.

◆ FwdTransBCQuadKernel()

template<typename ExecSpace , bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::FwdTransBCQuadKernel ( const unsigned int  nm0,
const unsigned int  nm1,
const unsigned int  nq0,
const unsigned int  nq1,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  basis1,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const unsigned int  offset_seg,
const simd_type *  invintmass0,
const simd_type *  invintmass1,
const simd_type *  tJac,
const unsigned int *  tMap,
const int *  tSign,
const unsigned int  nmTotInt,
const unsigned int *  iMap,
const simd_type *  invintmass,
const simd_type *  jac,
const simd_type *  in,
simd_type *  out,
simd_type *  wsp1,
simd_type *  wsp2,
simd_type *  wsp3,
simd_type *  wsp4 
)
static

Step 1: Extract edge modes

Step 2: Evaluate edge contributions via mass matrix

Step 3: Project face/interior modes onto boundary

Definition at line 89 of file FwdTransBCBlockOpSerialAVXKernels.hpp.

101{
102 // Get relevant sizes in phys and coeff space
103 const unsigned int nqTot = nq0 * nq1;
104 const unsigned int nmEdgeTot = 2 * nm0 + 2 * nm1;
105
106 /// Step 1: Extract edge modes
107 for (unsigned int i = 0; i < nq0; i++)
108 {
109 wsp1[i] = in[i];
110 wsp1[i + nq0 + nq1] = in[nq0 * (nq1 - 1) + i];
111 }
112 for (unsigned int i = 0; i < nq1; i++)
113 {
114 wsp1[i + nq0] = in[nq0 - 1 + i * nq0];
115 wsp1[i + 2 * nq0 + nq1] = in[i * nq0];
116 }
117
118 // Zero wsp2
119 for (unsigned int i = 0; i < nmEdgeTot; i++)
120 {
121 wsp2[i] = 0.0;
122 }
123
124 // Remove vertex contribution for every edge
125 // TODO Do we need a separate check whether segment is deformed?
126 simd_type tmp = 1.0;
127 FwdTransBCSegKernel<ExecSpace, false>(nm0, nq0, basis0, w0, offset_seg,
128 invintmass0, &tmp, wsp1, wsp2, wsp3,
129 wsp4);
130 FwdTransBCSegKernel<ExecSpace, false>(nm1, nq1, basis1, w1, offset_seg,
131 invintmass1, &tmp, wsp1 + nq0,
132 wsp2 + nm0, wsp3, wsp4);
133 FwdTransBCSegKernel<ExecSpace, false>(nm0, nq0, basis0, w0, offset_seg,
134 invintmass0, &tmp, wsp1 + nq0 + nq1,
135 wsp2 + nm0 + nm1, wsp3, wsp4);
136 FwdTransBCSegKernel<ExecSpace, false>(
137 nm1, nq1, basis1, w1, offset_seg, invintmass1, &tmp,
138 wsp1 + 2 * nq0 + nq1, wsp2 + 2 * nm0 + nm1, wsp3, wsp4);
139
140 // Map edge modes (without vertex contribution) back into face
141 for (unsigned int j = 0u; j < nmEdgeTot; j++)
142 {
143 out[tMap[j]] = tSign[j] * wsp2[j];
144 }
145
146 /// Step 2: Evaluate edge contributions via mass matrix
147 BwdTransQuadKernel<false>(nm0, nm1, nq0, nq1, basis0, basis1, wsp2, out,
148 wsp1);
149
150 // Subtract vertex contribution from Dirichlet condition
151 for (unsigned int i = 0; i < nqTot; i++)
152 {
153 wsp1[i] = in[i] - wsp1[i];
154 }
155
156 // Complete mass matrix with IProduct
157 if constexpr (DEFORMED)
158 {
159 IProductQuadKernel<false, false, DEFORMED>(nm0, nm1, nq0, nq1, wsp1,
160 basis0, basis1, w0, w1, jac,
161 wsp3, wsp2, 1.0);
162 }
163 else
164 {
165 simd_type tmp = 1.0;
166 IProductQuadKernel<false, false, DEFORMED>(nm0, nm1, nq0, nq1, wsp1,
167 basis0, basis1, w0, w1, &tmp,
168 wsp3, wsp2, 1.0);
169 }
170
171 /// Step 3: Project face/interior modes onto boundary
172 // Map to interior coeffs
173 for (unsigned int j = 0u; j < nmTotInt; j++)
174 {
175 wsp1[j] = wsp2[iMap[j]];
176 }
177
178 // Projection ie matrix vector product with inverse interior mass
179 MatVecKernel(nmTotInt, invintmass, wsp1, wsp2);
180
181 // Map to volume
182 for (unsigned int j = 0u; j < nmTotInt; j++)
183 {
184 out[iMap[j]] = wsp2[j];
185 }
186}

References in, jac, Nektar::MatVecKernel(), nm0, nm1, and out.

◆ FwdTransBCSegKernel()

template<typename ExecSpace , bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::FwdTransBCSegKernel ( const unsigned int  nm0,
const unsigned int  nq0,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  w0,
const unsigned int  offset_seg,
const simd_type *  invintmass,
const simd_type *  jac,
const simd_type *  in,
simd_type *  out,
simd_type *  wsp1,
simd_type *  wsp2 
)
static

Definition at line 47 of file FwdTransBCBlockOpSerialAVXKernels.hpp.

53{
54 const auto nmInt = nm0 - 2;
55
56 // Step 1: Set vertex modes and evaluate mass matrix (BwdTrans +
57 // IProd) Assume outblock is initialised as zero
58 // TODO vertex map changes with GLL_Lagrange
59 out[0] = in[0];
60 out[1] = in[nq0 - 1];
61
62 // Step 1: Evaluate vertex contributions.
63 BwdTransSegKernel<false>(nm0, nq0, basis0, out, wsp2);
64
65 // Subtract vertex contribution from Dirichlet condition
66 for (unsigned int i = 0; i < nq0; i++)
67 {
68 wsp2[i] = in[i] - wsp2[i];
69 }
70
71 // Complete mass matrix with IProduct
72 if constexpr (DEFORMED)
73 {
74 IProductSegKernel<false, false, DEFORMED>(nm0, nq0, wsp2, basis0, w0,
75 jac, wsp1, 1.0);
76 }
77 else
78 {
79 simd_type tmp = 1.0;
80 IProductSegKernel<false, false, DEFORMED>(nm0, nq0, wsp2, basis0, w0,
81 &tmp, wsp1, 1.0);
82 }
83
84 // Step 3: Project edge interior modes onto boundary
85 MatVecKernel(nmInt, invintmass, wsp1 + offset_seg, out + offset_seg);
86}

References in, jac, Nektar::MatVecKernel(), nm0, and out.

◆ FwdTransBCTriKernel()

template<typename ExecSpace , bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::FwdTransBCTriKernel ( const unsigned int  nm0,
const unsigned int  nm1,
const unsigned int  nq0,
const unsigned int  nq1,
const bool  isModified,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  basis1,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  interp1to0,
const unsigned int  offset_seg,
const simd_type *  invintmass0,
const simd_type *  tJac,
const unsigned int *  tMap,
const int *  tSign,
const unsigned int  nmTotInt,
const unsigned int *  iMap,
const simd_type *  invintmass,
const simd_type *  jac,
const simd_type *  in,
simd_type *  out,
simd_type *  wsp1,
simd_type *  wsp2,
simd_type *  wsp3,
simd_type *  wsp4 
)
static

Step 1: Extract edge modes

Step 2: Evaluate edge contributions via mass matrix

Step 3: Project face/interior modes onto boundary

Definition at line 189 of file FwdTransBCBlockOpSerialAVXKernels.hpp.

203{
204 // Get relevant sizes in phys and coeff space
205 const unsigned int nqTot = nq0 * nq1;
206 const unsigned int nmEdgeTot = nm0 + 2 * nm1;
207
208 /// Step 1: Extract edge modes
209 for (unsigned int i = 0; i < nq0; i++)
210 {
211 // Interpolate basis1 to basis0 for edge1 and edge2
212 simd_type tmp = 0.0;
213 simd_type tmp2 = 0.0;
214 for (unsigned int j = 0u; j < nq1; j++)
215 {
216 tmp += in[nq0 - 1 + j * nq0] * interp1to0[i * nq1 + j];
217 tmp2 += in[j * nq0] * interp1to0[i * nq1 + j];
218 }
219
220 wsp1[i] = in[i];
221 wsp1[i + nq0] = tmp;
222 wsp1[i + 2 * nq0] = tmp2;
223 }
224
225 // Zero wsp2
226 for (unsigned int i = 0; i < nmEdgeTot; i++)
227 {
228 wsp2[i] = 0.0;
229 }
230
231 // Remove vertex contribution for every edge
232 // TODO Do we need a separate check whether segment is deformed?
233 simd_type tmp = 1.0;
234 FwdTransBCSegKernel<ExecSpace, false>(nm0, nq0, basis0, w0, offset_seg,
235 invintmass0, &tmp, wsp1, wsp2, wsp3,
236 wsp4);
237 FwdTransBCSegKernel<ExecSpace, false>(nm0, nq0, basis0, w0, offset_seg,
238 invintmass0, &tmp, wsp1 + nq0,
239 wsp2 + nm0, wsp3, wsp4);
240 FwdTransBCSegKernel<ExecSpace, false>(nm0, nq0, basis0, w0, offset_seg,
241 invintmass0, &tmp, wsp1 + 2 * nq0,
242 wsp2 + nm0 + nm1, wsp3, wsp4);
243
244 // Map edge modes (without vertex contribution) back into face
245 for (unsigned int j = 0u; j < nmEdgeTot; j++)
246 {
247 out[tMap[j]] = tSign[j] * wsp2[j];
248 }
249
250 /// Step 2: Evaluate edge contributions via mass matrix
251 BwdTransTriKernel<false>(nm0, nm1, nq0, nq1, isModified, basis0, basis1,
252 wsp2, out, wsp1);
253
254 // Subtract vertex contribution from Dirichlet condition
255 for (unsigned int i = 0; i < nqTot; i++)
256 {
257 wsp1[i] = in[i] - wsp1[i];
258 }
259
260 // Complete mass matrix with IProduct
261 if constexpr (DEFORMED)
262 {
263 IProductTriKernel<false, false, DEFORMED>(
264 nm0, nm1, nq0, nq1, isModified, wsp1, basis0, basis1, w0, w1, jac,
265 wsp3, wsp2, 1.0);
266 }
267 else
268 {
269 simd_type tmp = 1.0;
270 IProductTriKernel<false, false, DEFORMED>(
271 nm0, nm1, nq0, nq1, isModified, wsp1, basis0, basis1, w0, w1, &tmp,
272 wsp3, wsp2, 1.0);
273 }
274
275 /// Step 3: Project face/interior modes onto boundary
276 // Map to interior coeffs
277 for (unsigned int j = 0u; j < nmTotInt; j++)
278 {
279 wsp1[j] = wsp2[iMap[j]];
280 }
281
282 // Projection ie matrix vector product with inverse interior mass
283 MatVecKernel(nmTotInt, invintmass, wsp1, wsp2);
284
285 // Map to volume
286 for (unsigned int j = 0u; j < nmTotInt; j++)
287 {
288 out[iMap[j]] = wsp2[j];
289 }
290}

References in, jac, Nektar::MatVecKernel(), nm0, nm1, and out.

◆ GetExpressionKernelArguments()

std::string Nektar::MultiRegions::detail::GetExpressionKernelArguments ( const std::vector< std::string > &  vnames,
const std::vector< bool > &  cmask 
)
inline

Emit the argument list matching GetExpressionKernelParameters(), without the enclosing brackets, so that a kernel can forward its parameters on.

Parameters
vnamesVariable names of the expressions.
cmaskPer-component enable flags.
Returns
The argument list.

Definition at line 343 of file ExpressionBlockOpDeviceGenericHelper.hpp.

345{
346 std::string kernel_src = "";
347
348 kernel_src += "nsize, compSize, nelmt, ndata, scale, coordptr, t, ";
349 for (unsigned int i = 4; i < vnames.size(); i++)
350 {
351 kernel_src += vnames[i] + "ptr, ";
352 }
353 for (unsigned int nc = 0; nc < cmask.size(); nc++)
354 {
355 if (cmask[nc])
356 {
357 kernel_src += "out" + std::to_string(nc) + ", ";
358 }
359 }
360 kernel_src.pop_back();
361 kernel_src.pop_back();
362
363 return kernel_src;
364}

◆ GetExpressionKernelBody()

std::string Nektar::MultiRegions::detail::GetExpressionKernelBody ( const std::vector< LibUtilities::EquationSharedPtr > &  exprs,
const std::vector< bool > &  cmask,
const std::vector< std::string > &  vnames,
const unsigned int  coordDim,
const std::string &  threadIndex,
const std::string &  mathPrefix 
)
inline

Emit the body of an expression kernel, without the enclosing braces.

The body takes its thread index from threadIndex, returns past nsize, and on a padded element writes zero to every enabled output (when not appending) without evaluating the expressions. Otherwise it gathers the coordinates for the interleave width the kernel is instantiated on and the EVAR values, then assigns or appends scale * (expression) to each enabled output. #defines make the common maths functions take TData arguments, so integer literals do not make calls like sqrt(61) ambiguous, local lambdas define the interpreter's sign, rad and ang, and caret powers are rewritten by convertPow().

One kernel covers every homogeneous mode of the block: the modes of a component are stored back to back, so the thread index walks them, while the coordinates are held for one mode only and are read at the index within the mode.

Parameters
exprsParsed expressions, one per component.
cmaskPer-component enable flags.
vnamesVariable names of the expressions.
coordDimCoordinate dimension of the block.
threadIndexExpression yielding the global thread index.
mathPrefixQualification of the maths functions, e.g. sycl::.
Returns
The kernel body.

Definition at line 423 of file ExpressionBlockOpDeviceGenericHelper.hpp.

428{
429 std::string kernel_src = "";
430
431 // Assign local variables:
432 // 1. Thread index.
433 kernel_src += " const size_t tid = " + threadIndex + ";\n";
434 kernel_src += " if (tid >= nsize) return;\n";
435 kernel_src += " const size_t cid = tid % compSize;\n";
436 kernel_src += " const size_t elmt = (INTERLEAVEWIDTH == 1)\n";
437 kernel_src += " ? cid / ndata\n";
438 kernel_src +=
439 " : (cid / (ndata * INTERLEAVEWIDTH)) * INTERLEAVEWIDTH"
440 " + cid % INTERLEAVEWIDTH;\n";
441 kernel_src += " if (elmt >= nelmt)\n";
442 kernel_src += " {\n";
443 kernel_src += " if constexpr (!APPEND)\n";
444 kernel_src += " {\n";
445 for (unsigned int nc = 0; nc < cmask.size(); nc++)
446 {
447 if (cmask[nc])
448 {
449 kernel_src +=
450 " out" + std::to_string(nc) + "[tid] = 0;\n";
451 }
452 }
453 kernel_src += " }\n";
454 kernel_src += " return;\n";
455 kernel_src += " }\n";
456 // 2. Coordinates.
457 if (coordDim == 1)
458 {
459 kernel_src += " TData x;\n";
460 }
461 else if (coordDim == 2)
462 {
463 kernel_src += " TData x, y;\n";
464 }
465 else if (coordDim == 3)
466 {
467 kernel_src += " TData x, y, z;\n";
468 }
469 kernel_src += " if constexpr (INTERLEAVEWIDTH == 1) {\n";
470 if (coordDim == 1)
471 {
472 kernel_src += " x = coordptr[cid];\n";
473 }
474 else if (coordDim == 2)
475 {
476 kernel_src += " x = coordptr[2 * cid];\n";
477 kernel_src += " y = coordptr[2 * cid + 1];\n";
478 }
479 else if (coordDim == 3)
480 {
481 kernel_src += " x = coordptr[3 * cid];\n";
482 kernel_src += " y = coordptr[3 * cid + 1];\n";
483 kernel_src += " z = coordptr[3 * cid + 2];\n";
484 }
485 kernel_src += " } else if constexpr (INTERLEAVEWIDTH != 1) {\n";
486 kernel_src += " const size_t ilane = cid % INTERLEAVEWIDTH;\n";
487 kernel_src += " const size_t iwarp = cid / INTERLEAVEWIDTH;\n";
488 if (coordDim == 1)
489 {
490 kernel_src +=
491 " x = coordptr[iwarp * INTERLEAVEWIDTH + ilane];\n";
492 }
493 else if (coordDim == 2)
494 {
495 kernel_src +=
496 " x = coordptr[iwarp * 2 * INTERLEAVEWIDTH + ilane];\n";
497 kernel_src += " y = coordptr[iwarp * 2 * INTERLEAVEWIDTH + "
498 "INTERLEAVEWIDTH + ilane];\n";
499 }
500 else if (coordDim == 3)
501 {
502 kernel_src +=
503 " x = coordptr[iwarp * 3 * INTERLEAVEWIDTH + ilane];\n";
504 kernel_src += " y = coordptr[iwarp * 3 * INTERLEAVEWIDTH + "
505 "INTERLEAVEWIDTH + ilane];\n";
506 kernel_src += " z = coordptr[iwarp * 3 * INTERLEAVEWIDTH + 2 * "
507 "INTERLEAVEWIDTH + ilane];\n";
508 }
509 kernel_src += " } \n";
510 kernel_src += "\n";
511 // 3. Pointers.
512 for (unsigned int i = 4; i < vnames.size(); i++)
513 {
514 kernel_src +=
515 " const TData " + vnames[i] + " = " + vnames[i] + "ptr[tid];\n";
516 }
517
518 // Expressions are emitted from the original session string, so numeric
519 // literals keep their source spelling. In runtime compilation, calls such
520 // as sqrt(61) are ambiguous because 61 is an int and both float and double
521 // overloads are viable. Cast math-function arguments to TData so overload
522 // resolution follows the precision of this generated kernel.
523 kernel_src +=
524 "#define sqrt(x) " + mathPrefix + "sqrt(static_cast<TData>(x))\n";
525 kernel_src +=
526 "#define sin(x) " + mathPrefix + "sin(static_cast<TData>(x))\n";
527 kernel_src +=
528 "#define cos(x) " + mathPrefix + "cos(static_cast<TData>(x))\n";
529 kernel_src +=
530 "#define tan(x) " + mathPrefix + "tan(static_cast<TData>(x))\n";
531 kernel_src +=
532 "#define exp(x) " + mathPrefix + "exp(static_cast<TData>(x))\n";
533 kernel_src +=
534 "#define log(x) " + mathPrefix + "log(static_cast<TData>(x))\n";
535 kernel_src +=
536 "#define log10(x) " + mathPrefix + "log10(static_cast<TData>(x))\n";
537 kernel_src += "#define pow(x,y) " + mathPrefix +
538 "pow(static_cast<TData>(x), static_cast<TData>(y))\n";
539
540 // Functions of the host interpreter with no maths library counterpart,
541 // defined as it defines them.
542 kernel_src += " const auto sign = [](const TData v) -> TData\n";
543 kernel_src += " {\n";
544 kernel_src += " return TData(v > TData(0)) - TData(v < TData(0));\n";
545 kernel_src += " };\n";
546 kernel_src +=
547 " const auto rad = [](const TData a, const TData b) -> TData\n";
548 kernel_src += " {\n";
549 kernel_src += " return (a != TData(0) || b != TData(0))\n";
550 kernel_src += " ? sqrt(a * a + b * b) : TData(0);\n";
551 kernel_src += " };\n";
552 kernel_src +=
553 " const auto ang = [](const TData a, const TData b) -> TData\n";
554 kernel_src += " {\n";
555 kernel_src += " return (a != TData(0) || b != TData(0))\n";
556 kernel_src += " ? " + mathPrefix + "atan2(b, a) : TData(0);\n";
557 kernel_src += " };\n";
558
559 // Define expression.
560 for (unsigned int nc = 0; nc < exprs.size(); nc++)
561 {
562 if (cmask[nc])
563 {
564 std::string expression = convertPow(exprs[nc]->GetExpression());
565 kernel_src += " if constexpr (APPEND)\n";
566 kernel_src += " {\n";
567 kernel_src += " out" + std::to_string(nc) +
568 "[tid] += scale * (" + expression + ");\n";
569 kernel_src += " }\n";
570 kernel_src += " else\n";
571 kernel_src += " {\n";
572 kernel_src += " out" + std::to_string(nc) +
573 "[tid] = scale * (" + expression + ");\n";
574 kernel_src += " };\n";
575 }
576 }
577
578 return kernel_src;
579}
std::string convertPow(std::string expr)
Rewrite every caret power x^y in expr into a pow(x, y) call, since ^ is exclusive-or rather than expo...

References convertPow().

Referenced by GetExpressionKernelSource().

◆ GetExpressionKernelConstants()

std::string Nektar::MultiRegions::detail::GetExpressionKernelConstants ( const std::vector< LibUtilities::EquationSharedPtr > &  exprs)
inline

Emit the constants and the parameters of the expressions as macro variables, so that they are substituted when the kernel is compiled. A name defined by several expressions is emitted once.

Parameters
exprsParsed expressions, one per component.
Returns
One #define per name, followed by a blank line.

Definition at line 247 of file ExpressionBlockOpDeviceGenericHelper.hpp.

249{
250 std::string kernel_src = "";
251
252 std::map<std::string, double> constmap;
253 for (unsigned int nc = 0; nc < exprs.size(); nc++)
254 {
255 auto constants = exprs[nc]->GetConstants();
256 for (auto &constant : constants)
257 {
258 if (constmap.find(constant.first) == constmap.end())
259 {
260 kernel_src +=
261 "#define " + constant.first + " " +
262 boost::lexical_cast<std::string>(constant.second) + "\n";
263 constmap.emplace(constant);
264 }
265 }
266 }
267 for (unsigned int nc = 0; nc < exprs.size(); nc++)
268 {
269 auto parameters = exprs[nc]->GetParameters();
270 for (auto &parameter : parameters)
271 {
272 if (constmap.find(parameter.first) == constmap.end())
273 {
274 kernel_src +=
275 "#define " + parameter.first + " " +
276 boost::lexical_cast<std::string>(parameter.second) + "\n";
277 constmap.emplace(parameter);
278 }
279 }
280 }
281 kernel_src += "\n";
282
283 return kernel_src;
284}

Referenced by GetExpressionKernelSource().

◆ GetExpressionKernelNameExpressions()

template<typename TData >
std::array< std::string, eNumExpressionKernels > Nektar::MultiRegions::detail::GetExpressionKernelNameExpressions ( void  )
inline

The name expressions the kernel variants are registered and looked up under, in ExpressionKernelIndex order.

Template Parameters
TDataFloating-point type the kernels are compiled for.

Definition at line 120 of file ExpressionBlockOpDeviceGenericHIPCUDAHelper.hpp.

121{
122 const auto variants = GetExpressionKernelVariants();
123
124 std::array<std::string, eNumExpressionKernels> name_exprs;
125 for (unsigned int i = 0; i < eNumExpressionKernels; ++i)
126 {
127 name_exprs[i] = expressionKernelName + "<" + variants[i].append + ", " +
128 variants[i].interleaveWidth + ", " +
129 DataTypeToString<TData>() + ">";
130 }
131
132 return name_exprs;
133}
const std::string expressionKernelName
The name the generated kernel function is compiled under.
std::array< ExpressionKernelVariant, eNumExpressionKernels > GetExpressionKernelVariants(void)
The kernel variants, in ExpressionKernelIndex order.

References eNumExpressionKernels, expressionKernelName, and GetExpressionKernelVariants().

◆ GetExpressionKernelParameters()

std::string Nektar::MultiRegions::detail::GetExpressionKernelParameters ( const std::vector< std::string > &  vnames,
const std::vector< bool > &  cmask 
)
inline

Emit the parameter list of an expression kernel, without the enclosing brackets: the fields of ExpressionKernelArgs in order, the EVAR pointers named <name>ptr and the outputs out<nc>.

Parameters
vnamesVariable names of the expressions (see ExpressionBlockOp::GetEvarsNames()); entries from 4 on are the EVARs.
cmaskPer-component enable flags; only enabled components get an output pointer.
Returns
The parameter list.

Definition at line 299 of file ExpressionBlockOpDeviceGenericHelper.hpp.

301{
302 std::string kernel_src = "";
303
304 // 0. size.
305 kernel_src += "const size_t nsize, ";
306 kernel_src += "const size_t compSize, ";
307 kernel_src += "const size_t nelmt, ";
308 kernel_src += "const size_t ndata, ";
309 kernel_src += "const TData scale, ";
310 // 1. Coordinates.
311 kernel_src += "const TData* coordptr, ";
312 // 2. time variable.
313 kernel_src += "const TData t, ";
314 // 3. Pointers.
315 for (unsigned int i = 4; i < vnames.size(); i++)
316 {
317 kernel_src += "const TData* " + vnames[i] + "ptr, ";
318 }
319 // 4. Output variable.
320 for (unsigned int nc = 0; nc < cmask.size(); nc++)
321 {
322 if (cmask[nc])
323 {
324 kernel_src += "TData* out" + std::to_string(nc) + ", ";
325 }
326 }
327 kernel_src.pop_back();
328 kernel_src.pop_back();
329
330 return kernel_src;
331}

Referenced by GetExpressionKernelSource().

◆ GetExpressionKernelSource()

template<typename TData >
std::string Nektar::MultiRegions::detail::GetExpressionKernelSource ( const std::vector< LibUtilities::EquationSharedPtr > &  exprs,
const std::vector< bool > &  cmask,
const unsigned int  coordDim 
)

Generate the CUDA/HIP source of the expression kernel.

Generate the SYCL source of the expression kernels.

The emitted source consists of:

  1. a #define for every constant and every parameter of each expression, so those names resolve to their session values (GetExpressionKernelConstants());
  2. a kernel expression_kernel templated on an APPEND flag, the interleave width and the data type, taking the parameters of GetExpressionKernelParameters(): the EVAR input pointers are named after the variable-list entries from index 4 on, and there is one output pointer per unmasked component;
  3. its body (GetExpressionKernelBody()): a guarded thread index, a zero write (unless appending) and early return on padded elements, and the coordinate gather, emitted for coordDim in both flat (width 1) and element-interleaved addressing, selected by the width template parameter; #defines forcing the common maths functions to take TData arguments, so integer literals in the expression strings do not make calls like sqrt(61) ambiguous under runtime compilation; and, per unmasked component, the expression itself – caret powers rewritten into pow() calls by convertPow() – assigned or appended to out<nc>[tid], scaled.
Template Parameters
TDataFloating-point type the kernel is generated for.
Parameters
exprsParsed expressions, one per component; the first expression's variable list defines the EVAR names for all of them.
cmaskPer-component enable flags.
coordDimCoordinate dimension of the block.
Returns
The kernel source.

A free function kernel cannot itself be templated and be looked up by name, so the kernel body (GetExpressionKernelBody()) is written once as a function template on APPEND and INTERLEAVEWIDTH, and each variant is entered through an extern "C" kernel of its own, named with the variant's suffix.

Template Parameters
TDataFloating-point type the kernels are generated for.
Parameters
exprsParsed expressions, one per component; the first expression's variable list defines the EVAR names for all of them.
cmaskPer-component enable flags.
coordDimCoordinate dimension of the block.
Returns
The kernel source.

Definition at line 170 of file ExpressionBlockOpDeviceGenericHIPCUDAHelper.hpp.

173{
174 // Generate a kernel function from the string expressions, and compile
175 // it at runtime.
176 const auto vnames = ExpressionBlockOp<TData>::GetEvarsNames(exprs[0]);
177
178 std::string kernel_src = "";
179
180 // Specify constants and parameters as macro variables.
181 kernel_src += GetExpressionKernelConstants(exprs);
182
183 // Declare the kernel, templated on whether it appends to its output and on
184 // the interleave width of the storage it reads.
185 kernel_src += "template<bool APPEND, unsigned int INTERLEAVEWIDTH, "
186 "typename TData>\n";
187 kernel_src += "__global__ void " + expressionKernelName;
188 kernel_src += "(" + GetExpressionKernelParameters(vnames, cmask) + ")\n";
189 kernel_src += "{\n";
190 kernel_src += GetExpressionKernelBody(exprs, cmask, vnames, coordDim,
191 "blockIdx.x * blockDim.x + "
192 "threadIdx.x",
193 "");
194 kernel_src += "}\n";
195
196 return kernel_src;
197}
Block-level interface of the Expression operator: evaluates the configured expressions at every quadr...
std::string GetExpressionKernelBody(const std::vector< LibUtilities::EquationSharedPtr > &exprs, const std::vector< bool > &cmask, const std::vector< std::string > &vnames, const unsigned int coordDim, const std::string &threadIndex, const std::string &mathPrefix)
Emit the body of an expression kernel, without the enclosing braces.
std::string GetExpressionKernelParameters(const std::vector< std::string > &vnames, const std::vector< bool > &cmask)
Emit the parameter list of an expression kernel, without the enclosing brackets: the fields of Expres...
std::string GetExpressionKernelConstants(const std::vector< LibUtilities::EquationSharedPtr > &exprs)
Emit the constants and the parameters of the expressions as macro variables, so that they are substit...

References expressionKernelName, Nektar::MultiRegions::ExpressionBlockOp< TData >::GetEvarsNames(), GetExpressionKernelBody(), GetExpressionKernelConstants(), and GetExpressionKernelParameters().

◆ GetExpressionKernelVariants()

std::array< ExpressionKernelVariant, eNumExpressionKernels > Nektar::MultiRegions::detail::GetExpressionKernelVariants ( void  )
inline

The kernel variants, in ExpressionKernelIndex order.

Definition at line 131 of file ExpressionBlockOpDeviceGenericHelper.hpp.

132{
133 const std::string interleaveWidth =
134 std::to_string(NektarSpaces::Device::warpSize);
135
136 return {
137 ExpressionKernelVariant{"true", "1", "_append_scalar"},
138 ExpressionKernelVariant{"false", "1", "_assign_scalar"},
139 ExpressionKernelVariant{"true", interleaveWidth, "_append_interleaved"},
140 ExpressionKernelVariant{"false", interleaveWidth,
141 "_assign_interleaved"}};
142}
One variant of the expression kernel: the template arguments instantiating it, and the suffix naming ...

References Nektar::NektarSpaces::Device::warpSize.

Referenced by GetExpressionKernelNameExpressions().

◆ HelmholtzKernelLauncher() [1/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::HelmholtzKernelLauncher ( const TSizeParameter1D  sizeParam1D,
const bool  isModified,
const unsigned int  ncoord,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  w0,
const simd_type *  NtoM,
const simd_type *  NtoMTrans,
const simd_type *  jac,
const simd_type *  df,
simd_type *  deriv0,
simd_type *  bwd,
const simd_type *  in,
simd_type *  out,
const typename simd_type::scalarType  lambda 
)
static

1D launcher stringing together the five sum-factorised stages for one element group.

Definition at line 1901 of file HelmholtzBlockOpSerialAVXSumFacKernels.hpp.

1912{
1913 static_assert(IsSizeParameter1D_v<TSizeParameter1D>,
1914 "Template argument must be either of type "
1915 "NonTemplatedSizeParameter1D or TemplatedSizeParameter1D.");
1916
1917 const unsigned int nq0 = sizeParam1D.nq0();
1918
1919 // Step 1: BwdTrans.
1920 BwdTransKernelLauncher<SHAPE_TYPE, false>(sizeParam1D, isModified, basis0,
1921 NtoM, in, bwd);
1922
1923 // Step 2: Get tensor derivatives.
1924 PhysDerivTensor1DKernel(nq0, bwd, D0, deriv0);
1925
1926 // Step 3: Apply diffusion coeff and WJ.
1927 DiffusionCoeffwithWJ1DKernel<SHAPE_TYPE, true, DEFORMED, VARCOEFF>(
1928 ncoord, nq0, useDiffCoeff, diffCoeff, varDiffCoeff, varDiffCoeffSize,
1929 jac, w0, df, deriv0, bwd, lambda);
1930
1931 // Step 4: Apply derivative and sum up.
1932 SumDerivTensor1DKernel<true>(nq0, deriv0, D0, bwd);
1933
1934 // Step 5: Inner product without WJ.
1935 IProductWRTBaseKernelLauncher<SHAPE_TYPE, false, false>(
1936 sizeParam1D, isModified, bwd, basis0, NtoMTrans, out);
1937}

References in, jac, out, and PhysDerivTensor1DKernel().

Referenced by Nektar::MultiRegions::detail::HelmholtzBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl().

◆ HelmholtzKernelLauncher() [2/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::HelmholtzKernelLauncher ( const TSizeParameter2D  sizeParam2D,
const bool  isModified,
const unsigned int  ncoord,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  basis1,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  NtoM,
const simd_type *  NtoMTrans,
const simd_type *  jac,
const simd_type *  df,
simd_type *  wsp0,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  bwd,
const simd_type *  in,
simd_type *  out,
const typename simd_type::scalarType  lambda 
)
static

2D launcher stringing together the five sum-factorised stages for one element group.

Definition at line 1945 of file HelmholtzBlockOpSerialAVXSumFacKernels.hpp.

1960{
1961 static_assert(IsSizeParameter2D_v<TSizeParameter2D>,
1962 "Template argument must be either of type "
1963 "NonTemplatedSizeParameter2D or TemplatedSizeParameter2D.");
1964
1965 const unsigned int nq0 = sizeParam2D.nq0();
1966 const unsigned int nq1 = sizeParam2D.nq1();
1967
1968 // Step 1: BwdTrans.
1969 BwdTransKernelLauncher<SHAPE_TYPE, false>(sizeParam2D, isModified, basis0,
1970 basis1, NtoM, wsp0, in, bwd);
1971
1972 // Step 2: Get tensor derivatives.
1973 PhysDerivTensor2DKernel(nq0, nq1, bwd, D0, D1, deriv0, deriv1);
1974
1975 // Step 3: Apply diffusion coeff and WJ.
1976 DiffusionCoeffwithWJ2DKernel<SHAPE_TYPE, true, DEFORMED, VARCOEFF>(
1977 ncoord, nq0, nq1, useDiffCoeff, diffCoeff, varDiffCoeff,
1978 varDiffCoeffSize, jac, w0, w1, df, f0, f1, deriv0, deriv1, bwd, lambda);
1979
1980 // Step 4: Apply derivative and sum up.
1981 SumDerivTensor2DKernel<true>(nq0, nq1, deriv0, deriv1, D0, D1, bwd);
1982
1983 // Step 5: Inner product without WJ.
1984 IProductWRTBaseKernelLauncher<SHAPE_TYPE, false, false>(
1985 sizeParam2D, isModified, bwd, basis0, basis1, NtoMTrans, wsp0, out);
1986}

References in, jac, out, and PhysDerivTensor2DKernel().

◆ HelmholtzKernelLauncher() [3/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::HelmholtzKernelLauncher ( const TSizeParameter3D  sizeParam3D,
const bool  isModified,
const unsigned int  ncoord,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  basis1,
const typename simd_type::scalarType *  basis2,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
const typename simd_type::scalarType *  D2,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  f1m,
const simd_type *  f2,
const simd_type *  NtoM,
const simd_type *  NtoMTrans,
const simd_type *  jac,
const simd_type *  df,
simd_type *  wsp0,
simd_type *  wsp1,
simd_type *  wsp2,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  deriv2,
simd_type *  bwd,
const simd_type *  in,
simd_type *  out,
const typename simd_type::scalarType  lambda 
)
static

3D launcher stringing together the five sum-factorised stages for one element group.

Definition at line 1994 of file HelmholtzBlockOpSerialAVXSumFacKernels.hpp.

2014{
2015 static_assert(IsSizeParameter3D_v<TSizeParameter3D>,
2016 "Template argument must be either of type "
2017 "NonTemplatedSizeParameter3D or TemplatedSizeParameter3D.");
2018
2019 const unsigned int nq0 = sizeParam3D.nq0();
2020 const unsigned int nq1 = sizeParam3D.nq1();
2021 const unsigned int nq2 = sizeParam3D.nq2();
2022
2023 // Step 1: BwdTrans.
2024 BwdTransKernelLauncher<SHAPE_TYPE, false>(sizeParam3D, isModified, basis0,
2025 basis1, basis2, NtoM, wsp0, wsp1,
2026 in, bwd);
2027
2028 // Step 2: Get tensor derivatives.
2029 PhysDerivTensor3DKernel(nq0, nq1, nq2, bwd, D0, D1, D2, deriv0, deriv1,
2030 deriv2);
2031
2032 // Step 3: Apply diffusion coeff and WJ.
2033 DiffusionCoeffwithWJ3DKernel<SHAPE_TYPE, true, DEFORMED, VARCOEFF>(
2034 nq0, nq1, nq2, useDiffCoeff, diffCoeff, varDiffCoeff, varDiffCoeffSize,
2035 jac, w0, w1, w2, df, f0, f1, f1m, f2, deriv0, deriv1, deriv2, bwd,
2036 lambda);
2037
2038 // Step 4: Apply derivative and sum up.
2039 SumDerivTensor3DKernel<true>(nq0, nq1, nq2, deriv0, deriv1, deriv2, D0, D1,
2040 D2, bwd);
2041
2042 // Step 5: Inner product without WJ.
2043 IProductWRTBaseKernelLauncher<SHAPE_TYPE, false, false>(
2044 sizeParam3D, isModified, bwd, basis0, basis1, basis2, NtoMTrans, wsp0,
2045 wsp1, wsp2, out);
2046}

References in, jac, out, and PhysDerivTensor3DKernel().

◆ InitExpressionKernelCompiler()

void Nektar::MultiRegions::detail::InitExpressionKernelCompiler ( void  )
inline

Initialise the device context the runtime compiler needs: a cudaFree(0)/hipFree(0) on the native builds, nothing on SYCL.

Initialise the device context the runtime compiler needs.

Definition at line 87 of file ExpressionBlockOpDeviceGenericHIPCUDAHelper.hpp.

88{
89#if defined(NEKTAR_ENABLE_CUDA)
90 CHECK_HIPCUDA_ERROR(cudaFree(0));
91#elif defined(NEKTAR_ENABLE_HIP)
92 CHECK_HIPCUDA_ERROR(hipFree(0));
93#endif
94}
#define CHECK_HIPCUDA_ERROR(err)

References CHECK_HIPCUDA_ERROR.

Referenced by Nektar::MultiRegions::detail::ExpressionBlockOpImpl< ExecSpace, Implementation, TData >::ExpressionBlockOpImpl().

◆ InverseMultiplicityKernel()

template<typename ExecSpace , typename TData >
void Nektar::MultiRegions::detail::InverseMultiplicityKernel ( const size_t  nsize,
TData *  ptr,
const unsigned int  streamID 
)

Replace every multiplicity in ptr by its reciprocal, and by zero where it is zero.

The multiplicity of a local coefficient is a whole number, zero exactly where its orientation sign is zero, so a value below one half is zero.

Parameters
nsizeNumber of values.
ptrMultiplicities on entry, their reciprocals on return.
streamIDStream the kernel runs on.

Definition at line 55 of file AvgAssmbScatrKernels.hpp.

57{
59
60 Nektar::parallel_for<ExecSpace>(
61 0u, nsize, NEKTAR_LAMBDA(const size_t i) {
62 ptr[i] = (ptr[i] < TData(0.5)) ? TData(0) : TData(1) / ptr[i];
63 });
64
66}

References Nektar::LoopExecutionSetStreamID(), and NEKTAR_LAMBDA.

◆ IProduct1DWorkspace()

static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProduct1DWorkspace ( LibUtilities::ShapeType  SHAPE_TYPE,
const unsigned int  nm0,
const unsigned int  nq0 
)
static

1D workspace query: the segment kernel contracts its only direction straight into the output and needs no workspace, so this is a no-op kept for uniformity with the 2D and 3D forms.

Definition at line 86 of file IProductWRTBaseBlockOpSerialAVXSumFacKernels.hpp.

91{
92 // Check preconditions
93 // None
94}

◆ IProduct2DWorkspace()

static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProduct2DWorkspace ( LibUtilities::ShapeType  SHAPE_TYPE,
const unsigned int  nm0,
const unsigned int  nm1,
const unsigned int  nq0,
const unsigned int  nq1,
unsigned int &  wsp0Size 
)
static

Grow wsp0Size to the workspace the 2D launcher needs for the given shape and sizes.

Updates a running maximum so one workspace can be sized across several queries. Sizes are in SIMD vectors: every 2D shape stages nq1 direction-0 sums, one per direction-1 quadrature point, and nodal triangles additionally need nmTot = nm0 * (nm0 + 1) / 2 vectors behind those to hold the modal-basis result before it is mapped to the nodal coefficients (see the 2D IProductWRTBaseKernelLauncher).

Parameters
SHAPE_TYPEShape of the block's elements.
nm0,nm1Modes per direction.
nq0,nq1Quadrature points per direction.
[in,out]wsp0SizeRaised to the required size if smaller.

Definition at line 112 of file IProductWRTBaseBlockOpSerialAVXSumFacKernels.hpp.

117{
118 if (SHAPE_TYPE == LibUtilities::NodalTri)
119 {
120 wsp0Size = std::max(wsp0Size, nq1 + nm0 * (nm0 + 1) / 2);
121 }
122 else
123 {
124 wsp0Size = std::max(wsp0Size, nq1);
125 }
126}

References nm0, Nektar::LibUtilities::NodalTri, and wsp0Size.

Referenced by Nektar::MultiRegions::detail::HelmholtzBlockOpImpl< ExecSpace, Implementation, TData >::HelmholtzBlockOpImpl(), Nektar::MultiRegions::detail::IProductWRTBaseBlockOpImpl< ExecSpace, Implementation, TData >::IProductWRTBaseBlockOpImpl(), Nektar::MultiRegions::detail::IProductWRTDerivBaseBlockOpImpl< ExecSpace, Implementation, TFieldOut, TData >::IProductWRTDerivBaseBlockOpImpl(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::LaplacianBlockOpImpl(), Nektar::MultiRegions::detail::LinAdvDiffReactionBlockOpImpl< ExecSpace, Implementation, TData >::LinAdvDiffReactionBlockOpImpl(), Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::MassBlockOpImpl(), and Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::SizeWorkspaces().

◆ IProduct3DWorkspace()

static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProduct3DWorkspace ( LibUtilities::ShapeType  SHAPE_TYPE,
const unsigned int  nm0,
const unsigned int  nm1,
const unsigned int  nm2,
const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
unsigned int &  wsp0Size,
unsigned int &  wsp1Size,
unsigned int &  wsp2Size 
)
static

Grow wsp0Size, wsp1Size and wsp2Size to the workspaces the 3D launcher needs for the given shape and sizes.

As IProduct2DWorkspace, in SIMD vectors and as running maxima. wsp0 holds the nq1 * nq2 direction-0 sums and wsp1 the nq2 sums of the second stage; for the nodal shapes wsp0 is enlarged by the shape's mode count to hold the modal-basis result before the nodal mapping. wsp2 (nm1 vectors) is only read by the prism kernels, which accumulate their collapsed-edge correction there, one entry per direction-1 mode.

Parameters
SHAPE_TYPEShape of the block's elements.
nm0,nm1,nm2Modes per direction.
nq0,nq1,nq2Quadrature points per direction.
[in,out]wsp0SizeRaised to the required size if smaller.
[in,out]wsp1SizeRaised to the required size if smaller.
[in,out]wsp2SizeRaised to the required size if smaller.

Definition at line 146 of file IProductWRTBaseBlockOpSerialAVXSumFacKernels.hpp.

152{
153 if (SHAPE_TYPE == LibUtilities::NodalTet ||
154 SHAPE_TYPE == LibUtilities::NodalPrism ||
155 SHAPE_TYPE == LibUtilities::NodalPyr)
156 {
157 const unsigned int nmTot =
158 LibUtilities::GetNumberOfCoefficients(SHAPE_TYPE, nm0, nm1, nm2);
159 wsp0Size = std::max(wsp0Size, nq1 * nq2 + nmTot);
160 }
161 else
162 {
163 wsp0Size = std::max(wsp0Size, nq1 * nq2);
164 }
165 wsp1Size = std::max(wsp1Size, nq2);
166 wsp2Size = std::max(wsp2Size, nm1);
167}

References Nektar::LibUtilities::GetNumberOfCoefficients(), nm0, nm1, nm2, nmTot, Nektar::LibUtilities::NodalPrism, Nektar::LibUtilities::NodalPyr, Nektar::LibUtilities::NodalTet, wsp0Size, and wsp1Size.

Referenced by Nektar::MultiRegions::detail::HelmholtzBlockOpImpl< ExecSpace, Implementation, TData >::HelmholtzBlockOpImpl(), Nektar::MultiRegions::detail::IProductWRTBaseBlockOpImpl< ExecSpace, Implementation, TData >::IProductWRTBaseBlockOpImpl(), Nektar::MultiRegions::detail::IProductWRTDerivBaseBlockOpImpl< ExecSpace, Implementation, TFieldOut, TData >::IProductWRTDerivBaseBlockOpImpl(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::LaplacianBlockOpImpl(), Nektar::MultiRegions::detail::LinAdvDiffReactionBlockOpImpl< ExecSpace, Implementation, TData >::LinAdvDiffReactionBlockOpImpl(), Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::MassBlockOpImpl(), and Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::SizeWorkspaces().

◆ IProductWRTBaseKernelLauncher() [1/6]

template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, typename TSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTBaseKernelLauncher ( const TSizeParameter1D  sizeParam1D,
const bool  isModified,
const simd_type *  in,
const typename simd_type::scalarType *  B0,
const simd_type *  NtoMTrans,
simd_type *  out,
typename simd_type::scalarType  scale = 1.0 
)
static

1D launcher without the quadrature metric: applies the basis transpose alone to one element group; selected by the absence of the weight and Jacobian arguments.

Parameters
sizeParam1DElement sizes; nm0 and nq0 are read.
isModifiedFirst-direction basis is eModified_A; unused in 1D.
inInterleaved physical values of the element group, assumed to carry the quadrature metric already.
B0One-dimensional basis table.
NtoMTransTransposed nodal-to-modal matrix; unused in 1D.
outInterleaved coefficients of the element group.
scaleFactor applied when SCALE is set.

Definition at line 229 of file IProductWRTBaseBlockOpSerialAVXSumFacKernels.hpp.

234{
235 static_assert(IsSizeParameter1D_v<TSizeParameter1D>,
236 "Template argument must be either of type "
237 "NonTemplatedSizeParameter1D or TemplatedSizeParameter1D.");
238
239 const unsigned int nm0 = sizeParam1D.nm0();
240 const unsigned int nq0 = sizeParam1D.nq0();
241
242 IProductSegKernel<SCALE, APPEND>(nm0, nq0, in, B0, out, scale);
243}

References in, nm0, and out.

◆ IProductWRTBaseKernelLauncher() [2/6]

template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, bool DEFORMED, typename TSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTBaseKernelLauncher ( const TSizeParameter1D  sizeParam1D,
const bool  isModified,
const simd_type *  in,
const typename simd_type::scalarType *  B0,
const typename simd_type::scalarType *  w0,
const simd_type *  NtoMTrans,
const simd_type *  jac,
simd_type *  out,
typename simd_type::scalarType  scale = 1.0 
)
static

1D launcher: forward one element group's inner product to the segment kernel, quadrature metric included.

Template Parameters
SHAPE_TYPEShape tag (segments only in 1D).
SCALEMultiply the result by scale.
APPENDAccumulate onto out instead of overwriting.
DEFORMEDjac holds one vector per quadrature point rather than one per element group.
TSizeParameter1D1D size parameter, templated or not.
simd_typeSIMD vector type; each vector holds one value of every element of the interleaved group.
Parameters
sizeParam1DElement sizes; nm0 and nq0 are read.
isModifiedFirst-direction basis is eModified_A; unused in 1D.
inInterleaved physical values of the element group.
B0One-dimensional basis table, B0[p * nq0 + i] being mode p at point i.
w0Direction-0 quadrature weights.
NtoMTransTransposed nodal-to-modal matrix; unused in 1D.
jacInterleaved Jacobians of the element group.
outInterleaved coefficients of the element group.
scaleFactor applied when SCALE is set.

Definition at line 195 of file IProductWRTBaseBlockOpSerialAVXSumFacKernels.hpp.

201{
202 static_assert(IsSizeParameter1D_v<TSizeParameter1D>,
203 "Template argument must be either of type "
204 "NonTemplatedSizeParameter1D or TemplatedSizeParameter1D.");
205
206 const unsigned int nm0 = sizeParam1D.nm0();
207 const unsigned int nq0 = sizeParam1D.nq0();
208
209 IProductSegKernel<SCALE, APPEND, DEFORMED>(nm0, nq0, in, B0, w0, jac, out,
210 scale);
211}

References in, jac, nm0, and out.

Referenced by Nektar::MultiRegions::detail::IProductWRTBaseBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl().

◆ IProductWRTBaseKernelLauncher() [3/6]

template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, typename TSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTBaseKernelLauncher ( const TSizeParameter2D  sizeParam2D,
const bool  isModified,
const simd_type *  in,
const typename simd_type::scalarType *  B0,
const typename simd_type::scalarType *  B1,
const simd_type *  NtoMTrans,
simd_type *  wsp0,
simd_type *  out,
typename simd_type::scalarType  scale = 1.0 
)
static

2D launcher without the quadrature metric: applies the basis transpose alone, otherwise identical to the metric overload, including the NodalTri behaviour of APPEND noted there.

Parameters
sizeParam2DElement sizes: modes and points per direction and the total mode count.
isModifiedFirst-direction basis is eModified_A.
inInterleaved physical values of the group, assumed to carry the quadrature metric already.
B0,B1Basis tables per direction.
NtoMTransTransposed nodal-to-modal matrix (nodal shapes only).
wsp0Group workspace, sized by IProduct2DWorkspace.
outInterleaved coefficients of the group.
scaleFactor applied when SCALE is set.

Definition at line 342 of file IProductWRTBaseBlockOpSerialAVXSumFacKernels.hpp.

349{
350 static_assert(IsSizeParameter2D_v<TSizeParameter2D>,
351 "Template argument must be either of type "
352 "NonTemplatedSizeParameter2D or TemplatedSizeParameter2D.");
353
354 const unsigned int nm0 = sizeParam2D.nm0();
355 const unsigned int nm1 = sizeParam2D.nm1();
356 [[maybe_unused]] const unsigned int nmTot = sizeParam2D.nmTot();
357 const unsigned int nq0 = sizeParam2D.nq0();
358 const unsigned int nq1 = sizeParam2D.nq1();
359
360 if constexpr (SHAPE_TYPE == LibUtilities::NodalTri)
361 {
362 simd_type *outtmp = wsp0 + nq1;
363
364 IProductTriKernel<SCALE, false>(nm0, nm1, nq0, nq1, isModified, in, B0,
365 B1, wsp0, outtmp, scale);
366 MatVecKernel<APPEND>(nmTot, NtoMTrans, outtmp, out);
367 }
368 else if constexpr (SHAPE_TYPE == LibUtilities::Tri)
369 {
370 IProductTriKernel<SCALE, APPEND>(nm0, nm1, nq0, nq1, isModified, in, B0,
371 B1, wsp0, out, scale);
372 }
373 else
374 {
375 IProductQuadKernel<SCALE, APPEND>(nm0, nm1, nq0, nq1, in, B0, B1, wsp0,
376 out, scale);
377 }
378}

References in, nm0, nm1, nmTot, Nektar::LibUtilities::NodalTri, out, and Nektar::LibUtilities::Tri.

◆ IProductWRTBaseKernelLauncher() [4/6]

template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, bool DEFORMED, typename TSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTBaseKernelLauncher ( const TSizeParameter2D  sizeParam2D,
const bool  isModified,
const simd_type *  in,
const typename simd_type::scalarType *  B0,
const typename simd_type::scalarType *  B1,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const simd_type *  NtoMTrans,
const simd_type *  jac,
simd_type *  wsp0,
simd_type *  out,
typename simd_type::scalarType  scale = 1.0 
)
static

2D launcher: select the quadrilateral or (nodal) triangular kernel for one element group at compile time, quadrature metric included.

For NodalTri the triangular kernel writes the modal-basis result to the tail of wsp0 (beyond its first nq1 vectors) and MatVecKernel then maps those nmTot values to the nodal coefficients with NtoMTrans. For the triangles, isModified triggers the extra collapsed-vertex contribution inside IProductTriKernel.

On NodalTri the triangular kernel overwrites the modal slice and APPEND governs the nodal mapping instead.

Template Parameters
SHAPE_TYPEQuad, Tri or NodalTri.
SCALEMultiply the result by scale.
APPENDAccumulate onto out instead of overwriting.
DEFORMEDjac holds one vector per quadrature point.
TSizeParameter2D2D size parameter, templated or not.
simd_typeSIMD vector type of the interleaved group.
Parameters
sizeParam2DElement sizes: modes and points per direction and the total mode count.
isModifiedFirst-direction basis is eModified_A.
inInterleaved physical values of the group.
B0Direction-0 basis table (nm0 rows of nq0).
B1Direction-1 basis table; for the triangles indexed by the combined (p,q) mode, one row per mode.
w0,w1Quadrature weights per direction.
NtoMTransTransposed nodal-to-modal matrix (nodal shapes only).
jacInterleaved Jacobians of the group.
wsp0Group workspace, sized by IProduct2DWorkspace.
outInterleaved coefficients of the group.
scaleFactor applied when SCALE is set.

Definition at line 282 of file IProductWRTBaseBlockOpSerialAVXSumFacKernels.hpp.

290{
291 static_assert(IsSizeParameter2D_v<TSizeParameter2D>,
292 "Template argument must be either of type "
293 "NonTemplatedSizeParameter2D or TemplatedSizeParameter2D.");
294
295 const unsigned int nm0 = sizeParam2D.nm0();
296 const unsigned int nm1 = sizeParam2D.nm1();
297 [[maybe_unused]] const unsigned int nmTot = sizeParam2D.nmTot();
298 const unsigned int nq0 = sizeParam2D.nq0();
299 const unsigned int nq1 = sizeParam2D.nq1();
300
301 if constexpr (SHAPE_TYPE == LibUtilities::NodalTri)
302 {
303 simd_type *outtmp = wsp0 + nq1;
304
305 IProductTriKernel<SCALE, false, DEFORMED>(nm0, nm1, nq0, nq1,
306 isModified, in, B0, B1, w0,
307 w1, jac, wsp0, outtmp, scale);
308 MatVecKernel<APPEND>(nmTot, NtoMTrans, outtmp, out);
309 }
310 else if constexpr (SHAPE_TYPE == LibUtilities::Tri)
311 {
312 IProductTriKernel<SCALE, APPEND, DEFORMED>(nm0, nm1, nq0, nq1,
313 isModified, in, B0, B1, w0,
314 w1, jac, wsp0, out, scale);
315 }
316 else
317 {
318 IProductQuadKernel<SCALE, APPEND, DEFORMED>(
319 nm0, nm1, nq0, nq1, in, B0, B1, w0, w1, jac, wsp0, out, scale);
320 }
321}

References in, jac, nm0, nm1, nmTot, Nektar::LibUtilities::NodalTri, out, and Nektar::LibUtilities::Tri.

◆ IProductWRTBaseKernelLauncher() [5/6]

template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, typename TSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTBaseKernelLauncher ( const TSizeParameter3D  sizeParam3D,
const bool  isModified,
const simd_type *  in,
const typename simd_type::scalarType *  B0,
const typename simd_type::scalarType *  B1,
const typename simd_type::scalarType *  B2,
const simd_type *  NtoMTrans,
simd_type *  wsp0,
simd_type *  wsp1,
simd_type *  wsp2,
simd_type *  out,
typename simd_type::scalarType  scale = 1.0 
)
static

3D launcher without the quadrature metric: applies the basis transpose alone, otherwise identical to the metric overload, including the nodal-shape behaviour of APPEND noted there.

Parameters
sizeParam3DElement sizes: modes and points per direction and the total mode count.
isModifiedFirst-direction basis is eModified_A.
inInterleaved physical values of the group, assumed to carry the quadrature metric already.
B0,B1,B2Basis tables per direction.
NtoMTransTransposed nodal-to-modal matrix (nodal shapes only).
wsp0,wsp1Group workspaces of the two contraction stages.
wsp2Correction workspace; prisms only.
outInterleaved coefficients of the group.
scaleFactor applied when SCALE is set.

Definition at line 517 of file IProductWRTBaseBlockOpSerialAVXSumFacKernels.hpp.

525{
526 static_assert(IsSizeParameter3D_v<TSizeParameter3D>,
527 "Template argument must be either of type "
528 "NonTemplatedSizeParameter3D or TemplatedSizeParameter3D.");
529
530 const unsigned int nm0 = sizeParam3D.nm0();
531 const unsigned int nm1 = sizeParam3D.nm1();
532 const unsigned int nm2 = sizeParam3D.nm2();
533 [[maybe_unused]] const unsigned int nmTot = sizeParam3D.nmTot();
534 const unsigned int nq0 = sizeParam3D.nq0();
535 const unsigned int nq1 = sizeParam3D.nq1();
536 const unsigned int nq2 = sizeParam3D.nq2();
537 if constexpr (SHAPE_TYPE == LibUtilities::Hex)
538 {
539 IProductHexKernel<SCALE, APPEND>(nm0, nm1, nm2, nq0, nq1, nq2, in, B0,
540 B1, B2, wsp0, wsp1, out, scale);
541 }
542 else if constexpr (SHAPE_TYPE == LibUtilities::Tet)
543 {
544 IProductTetKernel<SCALE, APPEND>(nm0, nm1, nm2, nq0, nq1, nq2,
545 isModified, in, B0, B1, B2, wsp0, wsp1,
546 out, scale);
547 }
548 else if constexpr (SHAPE_TYPE == LibUtilities::NodalTet)
549 {
550 simd_type *outtmp = wsp0 + nq1 * nq2;
551
552 IProductTetKernel<SCALE, false>(nm0, nm1, nm2, nq0, nq1, nq2,
553 isModified, in, B0, B1, B2, wsp0, wsp1,
554 outtmp, scale);
555 MatVecKernel<APPEND>(nmTot, NtoMTrans, outtmp, out);
556 }
557 else if constexpr (SHAPE_TYPE == LibUtilities::Prism)
558 {
559 IProductPrismKernel<SCALE, APPEND>(nm0, nm1, nm2, nq0, nq1, nq2,
560 isModified, in, B0, B1, B2, wsp0,
561 wsp1, wsp2, out, scale);
562 }
563 else if constexpr (SHAPE_TYPE == LibUtilities::NodalPrism)
564 {
565 simd_type *outtmp = wsp0 + nq1 * nq2;
566
567 IProductPrismKernel<SCALE, false>(nm0, nm1, nm2, nq0, nq1, nq2,
568 isModified, in, B0, B1, B2, wsp0,
569 wsp1, wsp2, outtmp, scale);
570 MatVecKernel<APPEND>(nmTot, NtoMTrans, outtmp, out);
571 }
572 else if constexpr (SHAPE_TYPE == LibUtilities::Pyr)
573 {
574 IProductPyrKernel<SCALE, APPEND>(nm0, nm1, nm2, nq0, nq1, nq2,
575 isModified, in, B0, B1, B2, wsp0, wsp1,
576 out, scale);
577 }
578 else if constexpr (SHAPE_TYPE == LibUtilities::NodalPyr)
579 {
580 simd_type *outtmp = wsp0 + nq1 * nq2;
581
582 IProductPyrKernel<SCALE, false>(nm0, nm1, nm2, nq0, nq1, nq2,
583 isModified, in, B0, B1, B2, wsp0, wsp1,
584 outtmp, scale);
585 MatVecKernel<APPEND>(nmTot, NtoMTrans, outtmp, out);
586 }
587}

References Nektar::LibUtilities::Hex, in, nm0, nm1, nm2, nmTot, Nektar::LibUtilities::NodalPrism, Nektar::LibUtilities::NodalPyr, Nektar::LibUtilities::NodalTet, out, Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, and Nektar::LibUtilities::Tet.

◆ IProductWRTBaseKernelLauncher() [6/6]

template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, bool DEFORMED, typename TSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTBaseKernelLauncher ( const TSizeParameter3D  sizeParam3D,
const bool  isModified,
const simd_type *  in,
const typename simd_type::scalarType *  B0,
const typename simd_type::scalarType *  B1,
const typename simd_type::scalarType *  B2,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const simd_type *  NtoMTrans,
const simd_type *  jac,
simd_type *  wsp0,
simd_type *  wsp1,
simd_type *  wsp2,
simd_type *  out,
typename simd_type::scalarType  scale = 1.0 
)
static

3D launcher: select the hexahedral, (nodal) tetrahedral, (nodal) prismatic or pyramidal kernel for one element group at compile time, quadrature metric included.

For the nodal shapes the shape kernel writes the modal-basis result to the tail of wsp0 (beyond its first nq1 * nq2 vectors) and MatVecKernel then maps those nmTot values to the nodal coefficients with NtoMTrans. isModified triggers the collapsed vertex and edge corrections inside the tetrahedral, prismatic and pyramidal kernels.

On the nodal shapes the shape kernel overwrites the modal slice and APPEND governs the nodal mapping instead.

Template Parameters
SHAPE_TYPEHex, Tet, NodalTet, Prism, NodalPrism, Pyr or NodalPyr.
SCALEMultiply the result by scale.
APPENDAccumulate onto out instead of overwriting.
DEFORMEDjac holds one vector per quadrature point.
TSizeParameter3D3D size parameter, templated or not.
simd_typeSIMD vector type of the interleaved group.
Parameters
sizeParam3DElement sizes: modes and points per direction and the total mode count.
isModifiedFirst-direction basis is eModified_A.
inInterleaved physical values of the group.
B0,B1,B2Basis tables per direction; along a collapsed direction indexed by the shape's combined mode.
w0,w1,w2Quadrature weights per direction.
NtoMTransTransposed nodal-to-modal matrix (nodal shapes only).
jacInterleaved Jacobians of the group.
wsp0,wsp1Group workspaces of the two contraction stages, sized by IProduct3DWorkspace.
wsp2Correction workspace; prisms only.
outInterleaved coefficients of the group.
scaleFactor applied when SCALE is set.

Definition at line 420 of file IProductWRTBaseBlockOpSerialAVXSumFacKernels.hpp.

432{
433 static_assert(IsSizeParameter3D_v<TSizeParameter3D>,
434 "Template argument must be either of type "
435 "NonTemplatedSizeParameter3D or TemplatedSizeParameter3D.");
436
437 const unsigned int nm0 = sizeParam3D.nm0();
438 const unsigned int nm1 = sizeParam3D.nm1();
439 const unsigned int nm2 = sizeParam3D.nm2();
440 [[maybe_unused]] const unsigned int nmTot = sizeParam3D.nmTot();
441 const unsigned int nq0 = sizeParam3D.nq0();
442 const unsigned int nq1 = sizeParam3D.nq1();
443 const unsigned int nq2 = sizeParam3D.nq2();
444 if constexpr (SHAPE_TYPE == LibUtilities::Hex)
445 {
446 IProductHexKernel<SCALE, APPEND, DEFORMED>(nm0, nm1, nm2, nq0, nq1, nq2,
447 in, B0, B1, B2, w0, w1, w2,
448 jac, wsp0, wsp1, out, scale);
449 }
450 else if constexpr (SHAPE_TYPE == LibUtilities::Tet)
451 {
452 IProductTetKernel<SCALE, APPEND, DEFORMED>(
453 nm0, nm1, nm2, nq0, nq1, nq2, isModified, in, B0, B1, B2, w0, w1,
454 w2, jac, wsp0, wsp1, out, scale);
455 }
456 else if constexpr (SHAPE_TYPE == LibUtilities::NodalTet)
457 {
458 simd_type *outtmp = wsp0 + nq1 * nq2;
459
460 IProductTetKernel<SCALE, false, DEFORMED>(
461 nm0, nm1, nm2, nq0, nq1, nq2, isModified, in, B0, B1, B2, w0, w1,
462 w2, jac, wsp0, wsp1, outtmp, scale);
463 MatVecKernel<APPEND>(nmTot, NtoMTrans, outtmp, out);
464 }
465 else if constexpr (SHAPE_TYPE == LibUtilities::Prism)
466 {
467 IProductPrismKernel<SCALE, APPEND, DEFORMED>(
468 nm0, nm1, nm2, nq0, nq1, nq2, isModified, in, B0, B1, B2, w0, w1,
469 w2, jac, wsp0, wsp1, wsp2, out, scale);
470 }
471 else if constexpr (SHAPE_TYPE == LibUtilities::NodalPrism)
472 {
473 simd_type *outtmp = wsp0 + nq1 * nq2;
474
475 IProductPrismKernel<SCALE, false, DEFORMED>(
476 nm0, nm1, nm2, nq0, nq1, nq2, isModified, in, B0, B1, B2, w0, w1,
477 w2, jac, wsp0, wsp1, wsp2, outtmp, scale);
478 MatVecKernel<APPEND>(nmTot, NtoMTrans, outtmp, out);
479 }
480 else if constexpr (SHAPE_TYPE == LibUtilities::Pyr)
481 {
482 IProductPyrKernel<SCALE, APPEND, DEFORMED>(
483 nm0, nm1, nm2, nq0, nq1, nq2, isModified, in, B0, B1, B2, w0, w1,
484 w2, jac, wsp0, wsp1, out, scale);
485 }
486 else if constexpr (SHAPE_TYPE == LibUtilities::NodalPyr)
487 {
488 simd_type *outtmp = wsp0 + nq1 * nq2;
489
490 IProductPyrKernel<SCALE, false, DEFORMED>(
491 nm0, nm1, nm2, nq0, nq1, nq2, isModified, in, B0, B1, B2, w0, w1,
492 w2, jac, wsp0, wsp1, outtmp, scale);
493 MatVecKernel<APPEND>(nmTot, NtoMTrans, outtmp, out);
494 }
495}

References Nektar::LibUtilities::Hex, in, jac, nm0, nm1, nm2, nmTot, Nektar::LibUtilities::NodalPrism, Nektar::LibUtilities::NodalPyr, Nektar::LibUtilities::NodalTet, out, Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, and Nektar::LibUtilities::Tet.

◆ IProductWRTDerivBaseKernelLauncher() [1/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTDerivBaseKernelLauncher ( const TSizeParameter1D  sizeParam1D,
const unsigned int  indim,
const simd_type *  df_ptr,
simd_type *  df_tmp,
const size_t  inoffset,
const simd_type *  in,
const simd_type *  jac,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  D0,
simd_type *  tmp0,
simd_type *  out 
)
static

Segment launcher: form the weighted direction field of one element group and apply the transposed derivative.

StdAlignDerivBase1D writes \(g_0\) into tmp0, and SumDerivTensor1DKernel then writes \(D_0^{\mathsf T} g_0\) to out, overwriting it.

Template Parameters
SHAPE_TYPEShape of the block's elements (Seg); unused.
DEFORMEDTrue when the geometric factors vary within an element.
TSizeParameter1D1D size parameter, modal or physical-space.
simd_typeSIMD vector type of one interleaved element group.
Parameters
sizeParam1DSizes of the expansion; only nq0 is read.
indimCoordinate dimension: number of input components read.
df_ptrDerivative factors of the element group.
df_tmpCaller-owned scratch for the factors of the current point.
inoffsetStride, in vectors, between the input's coordinate components.
inInput vector \({\bf f}\).
jacJacobians of the element group.
w0Quadrature weights of the expansion.
D0One-dimensional derivative matrix.
tmp0Plane of nq0 vectors receiving \(g_0\).
outPlane of nq0 vectors receiving the transposed derivative.

Definition at line 486 of file IProductWRTDerivBaseBlockOpSerialAVXSumFacKernels.hpp.

492{
493 static_assert(IsSizeParameter1D_v<TSizeParameter1D> ||
494 IsPhysSizeParameter1D_v<TSizeParameter1D>,
495 "Template argument must be a one dimensional size "
496 "parameter.");
497
498 const unsigned int nq0 = sizeParam1D.nq0();
499
500 // Align the derivative with the standard element.
501 StdAlignDerivBase1D<DEFORMED>(nq0, indim, df_ptr, df_tmp, inoffset, in,
502 tmp0, jac, w0);
503
504 // Apply the transposed derivative and sum up.
505 SumDerivTensor1DKernel<false>(nq0, tmp0, D0, out);
506}

References in, jac, and out.

Referenced by Nektar::MultiRegions::detail::IProductWRTDerivBaseBlockOpImpl< ExecSpace, Implementation, TFieldOut, TData >::OperatorNDImpl().

◆ IProductWRTDerivBaseKernelLauncher() [2/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTDerivBaseKernelLauncher ( const TSizeParameter2D  sizeParam2D,
const unsigned int  indim,
const simd_type *  df_ptr,
simd_type *  df_tmp,
const size_t  inoffset,
const simd_type *  in,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  jac,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
simd_type *  tmp0,
simd_type *  tmp1,
simd_type *  out 
)
static

Quadrilateral or triangle launcher: form the two weighted direction fields of one element group and apply the transposed derivatives.

StdAlignDerivBase2D writes \(g_0\) and \(g_1\) into tmp0 and tmp1 – including, for the triangles, the collapsed corrections from f0 and f1 – and SumDerivTensor2DKernel sums their transposed derivatives into out, overwriting it.

Template Parameters
SHAPE_TYPEShape of the block's elements.
DEFORMEDTrue when the geometric factors vary within an element.
TSizeParameter2D2D size parameter, modal or physical-space.
simd_typeSIMD vector type of one interleaved element group.
Parameters
sizeParam2DSizes per direction; only nq0 and nq1 are read.
indimCoordinate dimension: number of input components read.
df_ptrDerivative factors of the element group.
df_tmpCaller-owned scratch for the factors of the current point.
inoffsetStride, in vectors, between the input's coordinate components.
inInput vector \({\bf f}\).
f0Table of (1 + eta_0)/2 (triangles).
f1Table of 2/(1 - eta_1) (triangles).
jacJacobians of the element group.
w0,w1Quadrature weights per direction.
D0,D1One-dimensional derivative matrices.
tmp0,tmp1Planes of nq0 * nq1 vectors receiving the direction fields.
outPlane of nq0 * nq1 vectors receiving the summed transposed derivative.

Definition at line 546 of file IProductWRTDerivBaseBlockOpSerialAVXSumFacKernels.hpp.

555{
556 static_assert(IsSizeParameter2D_v<TSizeParameter2D> ||
557 IsPhysSizeParameter2D_v<TSizeParameter2D>,
558 "Template argument must be a two dimensional size "
559 "parameter.");
560
561 const unsigned int nq0 = sizeParam2D.nq0();
562 const unsigned int nq1 = sizeParam2D.nq1();
563
564 simd_type *tmpPtr[2] = {tmp0, tmp1};
565
566 // Align the derivative with the standard element.
567 StdAlignDerivBase2D<SHAPE_TYPE, DEFORMED>(nq0, nq1, indim, df_ptr, df_tmp,
568 inoffset, in, tmpPtr, f0, f1, jac,
569 w0, w1);
570
571 // Apply the transposed derivative and sum up.
572 SumDerivTensor2DKernel<false>(nq0, nq1, tmpPtr[0], tmpPtr[1], D0, D1, out);
573}

References in, jac, and out.

◆ IProductWRTDerivBaseKernelLauncher() [3/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTDerivBaseKernelLauncher ( const TSizeParameter3D  sizeParam3D,
const unsigned int  indim,
const simd_type *  df_ptr,
simd_type *  df_tmp,
const size_t  inoffset,
const simd_type *  in,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  f1m,
const simd_type *  f2,
const simd_type *  jac,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
const typename simd_type::scalarType *  D2,
simd_type *  tmp0,
simd_type *  tmp1,
simd_type *  tmp2,
simd_type *  out 
)
static

Three-dimensional launcher: form the three weighted direction fields of one element group and apply the transposed derivatives.

StdAlignDerivBase3D writes the direction fields into tmp0 ... tmp2 – with the shape's collapsed corrections from the four factor tables – and SumDerivTensor3DKernel sums their transposed derivatives into out, overwriting it. The coordinate dimension of a 3D element is always three, so indim is unused.

Template Parameters
SHAPE_TYPEShape of the block's elements.
DEFORMEDTrue when the geometric factors vary within an element.
TSizeParameter3D3D size parameter, modal or physical-space.
simd_typeSIMD vector type of one interleaved element group.
Parameters
sizeParam3DSizes per direction; only the point counts are read.
indimCoordinate dimension; unused.
df_ptrDerivative factors of the element group, nine per point.
df_tmpCaller-owned scratch for the factors of the current point.
inoffsetStride, in vectors, between the input's coordinate components.
inInput vector \({\bf f}\).
f0Table of (1 + eta_0)/2.
f1Table of (1 + eta_1)/2.
f1mTable of 2/(1 - eta_1).
f2Table of 2/(1 - eta_2).
jacJacobians of the element group.
w0,w1,w2Quadrature weights per direction.
D0,D1,D2One-dimensional derivative matrices.
tmp0,tmp1,tmp2Planes of nqTot vectors receiving the direction fields.
outPlane of nqTot vectors receiving the summed transposed derivative.

Definition at line 616 of file IProductWRTDerivBaseBlockOpSerialAVXSumFacKernels.hpp.

629{
630 static_assert(IsSizeParameter3D_v<TSizeParameter3D> ||
631 IsPhysSizeParameter3D_v<TSizeParameter3D>,
632 "Template argument must be a three dimensional size "
633 "parameter.");
634
635 const unsigned int nq0 = sizeParam3D.nq0();
636 const unsigned int nq1 = sizeParam3D.nq1();
637 const unsigned int nq2 = sizeParam3D.nq2();
638
639 simd_type *tmpPtr[3] = {tmp0, tmp1, tmp2};
640
641 // Align the derivative with the standard element.
642 StdAlignDerivBase3D<SHAPE_TYPE, DEFORMED>(nq0, nq1, nq2, df_ptr, df_tmp,
643 inoffset, f0, f1, f1m, f2, jac,
644 w0, w1, w2, in, tmpPtr);
645
646 // Apply the transposed derivative and sum up.
647 SumDerivTensor3DKernel<false>(nq0, nq1, nq2, tmpPtr[0], tmpPtr[1],
648 tmpPtr[2], D0, D1, D2, out);
649}

References in, jac, and out.

◆ IProductWRTPhysNormalDerivTrace1DKernel()

template<typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTrace1DKernel ( const unsigned  nm0,
const simd_type *  dnbasis0,
const simd_type *  jac,
const simd_type *  in,
simd_type *  out,
const bool  append 
)
static

The one-dimensional lift: \(\langle \partial_n \phi, g \rangle\) over a segment's two vertices.

A segment's traces are single points, so there is no trace quadrature to sum over, no tangential table and no trace Jacobian. What is left is the point evaluation

\[ out_p \mathrel{+}= \sum_{v=0,1} \partial h_p(\xi_v)\, F_v\, g_v , \]

with \(F_v\) the normal derivative factor at that vertex, which the data warehouse supplies as the single component of the factor array. There is no end-point collocated shortcut: the interpolation to a collocated end point is a selection matrix, which its derivative never is.

Parameters
nm0Volume quadrature points of the segment.
dnbasis0Derivative table \(\partial h_p(\pm 1)\), indexed dnbasis0[2 * p + v].
jacNormal derivative factor \(F_v\) at each vertex.
inPacked trace values \(g_v\), the two vertices.
outVolume-shaped result of the element group.
appendAccumulate onto out instead of zeroing it first.

Definition at line 115 of file IProductWRTPhysNormalDerivTraceBlockOpSerialAVXSumFacKernels.hpp.

118{
119 if (!append)
120 {
121 std::memset((void *)out, 0, nm0 * sizeof(simd_type));
122 }
123
124 for (unsigned p = 0; p < nm0; ++p)
125 {
126 simd_type sum = static_cast<typename simd_type::scalarType>(0.0);
127 sum.fma(dnbasis0[2 * p] * jac[0], in[0]);
128 sum.fma(dnbasis0[2 * p + 1] * jac[1], in[1]);
129
130 out[p] = out[p] + sum;
131 }
132}

References append, dnbasis0, in, jac, nm0, out, and sum.

Referenced by IProductWRTPhysNormalDerivTraceKernelLauncher().

◆ IProductWRTPhysNormalDerivTraceKernelLauncher() [1/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TTraceSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceKernelLauncher ( const TTraceSizeParameter1D  sizeParam1D,
const simd_type *  nbasis0,
const simd_type *  dnbasis0,
const simd_type *  twoOver0,
const simd_type *  jac,
const size_t  jacCompStride,
simd_type *  volwsp,
const simd_type *  in,
simd_type *  out,
const bool  append,
const bool  endPtsCollocated0 
)
static

Launcher for one element group of segments.

The one-dimensional arm of the overload set OperatorND() calls; the higher-dimensional arms follow below, and overload resolution picks between them by the number of arguments the index sequences expand to. A segment's traces are points, so it takes no tangential table, no weight and no workspace, and only the derivative table and the vertex factors are read.

Template Parameters
SHAPE_TYPESeg; unread, the path being the same for every one-dimensional expansion.
DEFORMEDUnread: a segment carries one factor per vertex whatever its geometry.
Parameters
sizeParam1DVolume quadrature points of the shape.
nbasis0Unread: a segment's traces are points, so no interpolation table is needed.
dnbasis0Derivative table \(\partial h_p(\pm 1)\) at the two vertices.
twoOver0Unread: a segment has no collapsed direction.
jacNormal derivative factor at each vertex.
jacCompStrideUnread: there is only the one term.
volwspUnread: a segment needs no volume-sized scratch.
inPacked trace values, the two vertices.
outVolume-shaped result of the element group.
appendAccumulate onto the volume field instead of zeroing it first.
endPtsCollocated0Unread: a segment has no end-point collocated shortcut.

Definition at line 683 of file IProductWRTPhysNormalDerivTraceBlockOpSerialAVXSumFacKernels.hpp.

690{
691 static_assert(IsTraceSizeParameter1D_v<TTraceSizeParameter1D>,
692 "Template argument must be either of type "
693 "NonTemplatedTraceSizeParameter1D or "
694 "TemplatedTraceSizeParameter1D.");
695
696 IProductWRTPhysNormalDerivTrace1DKernel(sizeParam1D.nm0(), dnbasis0, jac,
697 in, out, append);
698}
static NEK_FORCE_INLINE void IProductWRTPhysNormalDerivTrace1DKernel(const unsigned nm0, const simd_type *dnbasis0, const simd_type *jac, const simd_type *in, simd_type *out, const bool append)
The one-dimensional lift: over a segment's two vertices.

References append, dnbasis0, in, IProductWRTPhysNormalDerivTrace1DKernel(), jac, and out.

Referenced by Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), and Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl().

◆ IProductWRTPhysNormalDerivTraceKernelLauncher() [2/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TTraceSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceKernelLauncher ( const TTraceSizeParameter2D  sizeParam2D,
const simd_type *  nbasis0,
const simd_type *  nbasis1,
const simd_type *  dnbasis0,
const simd_type *  dnbasis1,
const simd_type *  tbasis0,
const simd_type *  tbasis1,
const simd_type *  dtbasis0,
const simd_type *  dtbasis1,
const simd_type *  tw0,
const simd_type *  tw1,
const simd_type *  twoOver0,
const simd_type *  twoOver1,
const simd_type *  jac,
const size_t  jacCompStride,
simd_type *  wsp,
simd_type *  volwsp,
const simd_type *  in,
simd_type *  out,
const unsigned  traceDir0,
const unsigned  traceDir1,
const bool  append,
const bool  isCollocated0,
const bool  isCollocated1,
const bool  endPtsCollocated0,
const bool  endPtsCollocated1 
)
static

All edges of one two-dimensional element group: the two terms of the operator, one per element direction, accumulated in turn.

Template Parameters
SHAPE_TYPEQuad, Tri or NodalTri.
DEFORMEDFactors vary point by point along the traces.
Parameters
appendAccumulate onto out instead of zeroing it first.
sizeParam2DVolume and trace point counts of the shape.
nbasis0,nbasis1eInterp tables \(h_p(\pm 1)\) per direction.
dnbasis0,dnbasis1Their derivatives.
tbasis0,tbasis1eInterp tables to the trace points, per direction.
dtbasis0,dtbasis1Derivatives of tbasis0, tbasis1.
tw0,tw1Trace quadrature weights per direction.
twoOver0,twoOver1\(2/(1 - \eta)\) at the element points per direction; direction 0 is never collapsed and its slot is null and unread.
jacFactor array of this element group, term 0; term 1 sits jacCompStride SIMD vectors further on.
jacCompStrideOffset, in SIMD vectors, between the two terms' factor arrays.
wspTrace-mode scratch, 2 * max(nm0,nm1).
volwspVolume-sized scratch for the collapsed factor scaling; unread on a quadrilateral.
inPacked trace values of this element group.
outVolume-shaped result of this element group.
traceDir0,traceDir1Element direction each trace slot runs along.
isCollocated0,isCollocated1Trace points of the direction-0 and direction-1 edges coincide with the volume points.
endPtsCollocated0,endPtsCollocated1Volume rule of direction 0 and direction 1 contains the domain endpoints.

Definition at line 742 of file IProductWRTPhysNormalDerivTraceBlockOpSerialAVXSumFacKernels.hpp.

754{
755 static_assert(IsTraceSizeParameter2D_v<TTraceSizeParameter2D>,
756 "Template argument must be either of type "
757 "NonTemplatedTraceSizeParameter2D or "
758 "TemplatedTraceSizeParameter2D.");
759
760 // Shape size.
761 const unsigned nm0 = sizeParam2D.nm0();
762 const unsigned nm1 = sizeParam2D.nm1();
763 const unsigned tnq00 = sizeParam2D.nq00();
764 const unsigned tnq10 = sizeParam2D.nq10();
765
766 // One term per element direction; the later terms append onto the
767 // first. The term is a run-time index so that the size-specialised
768 // body is instantiated once per size rather than once per term.
769 for (unsigned d = 0; d < 2; ++d)
770 {
771 IPWRTPhysNormalDerivTracePerDir2DKernel<SHAPE_TYPE, DEFORMED>(
772 d, nm0, nm1, tnq00, tnq10, nbasis0, nbasis1, dnbasis0, dnbasis1,
773 tbasis0, tbasis1, dtbasis0, dtbasis1, tw0, tw1, twoOver1,
774 jac + d * jacCompStride, in, wsp, volwsp, out, traceDir0, traceDir1,
775 append || d > 0, isCollocated0, isCollocated1, endPtsCollocated0,
776 endPtsCollocated1);
777 }
778}

References append, dnbasis0, dnbasis1, dtbasis0, dtbasis1, endPtsCollocated0, in, jac, jacCompStride, nbasis0, nbasis1, nm0, nm1, out, tbasis0, tbasis1, tnq00, tnq10, traceDir0, traceDir1, tw0, tw1, twoOver1, and wsp.

◆ IProductWRTPhysNormalDerivTraceKernelLauncher() [3/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TTraceSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceKernelLauncher ( const TTraceSizeParameter3D  sizeParam3D,
const simd_type *  nbasis0,
const simd_type *  nbasis1,
const simd_type *  nbasis2,
const simd_type *  dnbasis0,
const simd_type *  dnbasis1,
const simd_type *  dnbasis2,
const simd_type *  tbasis00,
const simd_type *  tbasis01,
const simd_type *  tbasis10,
const simd_type *  tbasis11,
const simd_type *  tbasis20,
const simd_type *  tbasis21,
const simd_type *  dtbasis00,
const simd_type *  dtbasis01,
const simd_type *  dtbasis10,
const simd_type *  dtbasis11,
const simd_type *  dtbasis20,
const simd_type *  dtbasis21,
const simd_type *  tw00,
const simd_type *  tw01,
const simd_type *  tw10,
const simd_type *  tw11,
const simd_type *  tw20,
const simd_type *  tw21,
const simd_type *  twoOver0,
const simd_type *  twoOver1,
const simd_type *  twoOver2,
const simd_type *  jac,
const size_t  jacCompStride,
simd_type *  wsp0,
simd_type *  wsp1,
simd_type *  volwsp,
const simd_type *  in,
simd_type *  out,
const unsigned  traceDir00,
const unsigned  traceDir01,
const unsigned  traceDir10,
const unsigned  traceDir11,
const unsigned  traceDir20,
const unsigned  traceDir21,
const bool  append,
const bool  isCollocated00,
const bool  isCollocated01,
const bool  isCollocated10,
const bool  isCollocated11,
const bool  isCollocated20,
const bool  isCollocated21,
const bool  endPtsCollocated0,
const bool  endPtsCollocated1,
const bool  endPtsCollocated2 
)
static

All faces of one three-dimensional element group: the three terms of the operator, one per element direction, accumulated in turn.

Template Parameters
SHAPE_TYPEHex, Prism, NodalPrism, Pyr, NodalPyr, Tet or NodalTet.
DEFORMEDFactors vary point by point along the traces.
Parameters
appendAccumulate onto out instead of zeroing it first.
sizeParam3DVolume and trace point counts of the shape.
nbasis0,nbasis1,nbasis2eInterp tables \(h_p(\pm 1)\) per direction.
dnbasis0,dnbasis1,dnbasis2Derivatives of nbasis0, nbasis1, nbasis2.
tbasis00,tbasis01,tbasis10,tbasis11,tbasis20,tbasis21eInterp tables to the trace points, per normal direction and tangential direction.
dtbasis00,dtbasis01,dtbasis10,dtbasis11,dtbasis20,dtbasis21Derivatives of tbasis00, tbasis01, tbasis10, tbasis11, tbasis20, tbasis21.
tw00,tw01,tw10,tw11,tw20,tw21Trace quadrature weights in the same order as tbasis00 to tbasis21.
twoOver0,twoOver1,twoOver2\(2/(1 - \eta)\) at the element points per direction; direction 0 is never collapsed and its slot is null and unread, as is any direction the shape does not collapse.
jacFactor array of this element group, term 0; term d sits d * jacCompStride SIMD vectors further on.
jacCompStrideOffset, in SIMD vectors, between successive terms' factor arrays.
wsp0Trace-mode workspace, two faces' worth.
wsp1Scratch for the fully general face contraction.
volwspVolume-sized scratch for the collapsed factor scaling; unread on a hexahedron.
inPacked trace values of this element group.
outVolume-shaped result of this element group.
traceDir00,traceDir01,traceDir10,traceDir11,traceDir20,traceDir21Element direction each trace slot runs along.
isCollocated00,isCollocated01Trace points of the direction-0 face's tangential directions coincide with the volume points.
isCollocated10,isCollocated11The same for direction 1.
isCollocated20,isCollocated21The same for direction 2.
endPtsCollocated0,endPtsCollocated1,endPtsCollocated2Volume rule of each direction contains the domain endpoints.

Definition at line 831 of file IProductWRTPhysNormalDerivTraceBlockOpSerialAVXSumFacKernels.hpp.

855{
856 static_assert(IsTraceSizeParameter3D_v<TTraceSizeParameter3D>,
857 "Template argument must be either of type "
858 "NonTemplatedTraceSizeParameter3D or "
859 "TemplatedTraceSizeParameter3D.");
860
861 // Shape size.
862 const unsigned nm0 = sizeParam3D.nm0();
863 const unsigned nm1 = sizeParam3D.nm1();
864 const unsigned nm2 = sizeParam3D.nm2();
865 const unsigned tnq00 = sizeParam3D.nq00();
866 const unsigned tnq01 = sizeParam3D.nq01();
867 const unsigned tnq10 = sizeParam3D.nq10();
868 const unsigned tnq11 = sizeParam3D.nq11();
869 const unsigned tnq20 = sizeParam3D.nq20();
870 const unsigned tnq21 = sizeParam3D.nq21();
871
872 // One term per element direction; the later terms append onto the
873 // first. The term is a run-time index so that the size-specialised
874 // body is instantiated once per size rather than once per term.
875 for (unsigned d = 0; d < 3; ++d)
876 {
877 IPWRTPhysNormalDerivTracePerDir3DKernel<SHAPE_TYPE, DEFORMED>(
878 d, nm0, nm1, nm2, tnq00, tnq01, tnq10, tnq11, tnq20, tnq21, nbasis0,
879 nbasis1, nbasis2, dnbasis0, dnbasis1, dnbasis2, tbasis00, tbasis01,
880 tbasis10, tbasis11, tbasis20, tbasis21, dtbasis00, dtbasis01,
881 dtbasis10, dtbasis11, dtbasis20, dtbasis21, tw00, tw01, tw10, tw11,
882 tw20, tw21, twoOver1, twoOver2, jac + d * jacCompStride, in, wsp0,
883 wsp1, volwsp, out, traceDir00, traceDir01, traceDir10, traceDir11,
884 traceDir20, traceDir21, append || d > 0, isCollocated00,
885 isCollocated01, isCollocated10, isCollocated11, isCollocated20,
886 isCollocated21, endPtsCollocated0, endPtsCollocated1,
887 endPtsCollocated2);
888 }
889}

References append, dnbasis0, dnbasis1, dnbasis2, dtbasis00, dtbasis01, dtbasis10, dtbasis11, dtbasis20, dtbasis21, endPtsCollocated0, in, jac, jacCompStride, nbasis0, nbasis1, nbasis2, nm0, nm1, nm2, out, tbasis00, tbasis01, tbasis10, tbasis11, tbasis20, tbasis21, tnq00, tnq01, tnq10, tnq11, tnq20, tnq21, traceDir00, traceDir01, traceDir10, traceDir11, traceDir20, traceDir21, tw00, tw01, tw10, tw11, tw20, tw21, twoOver1, and twoOver2.

◆ IProductWRTPhysNormalDerivTraceSharedMemorySize() [1/3]

template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter1D , std::enable_if_t< std::is_same_v< Implementation, SumFac > &&IsTraceSizeParameter1D_v< TTraceSizeParameter1D >, bool > Enable = true>
constexpr unsigned int Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceSharedMemorySize ( const TTraceSizeParameter1D  sizeParam1D,
const unsigned int  elmtsPerBlock,
const bool  useSharedMemoryWsp 
)
inlineconstexpr

Dynamic shared memory one block needs, in elements: none, a segment having no collapsed direction and no workspace.

Dynamic shared memory one block needs, in elements: none, a segment's traces being points.

Definition at line 138 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

142{
143 return 0;
144}

Referenced by Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize().

◆ IProductWRTPhysNormalDerivTraceSharedMemorySize() [2/3]

template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter2D , std::enable_if_t< std::is_same_v< Implementation, SumFac > &&IsTraceSizeParameter2D_v< TTraceSizeParameter2D >, bool > Enable = true>
constexpr unsigned int Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceSharedMemorySize ( const TTraceSizeParameter2D  sizeParam2D,
const unsigned int  elmtsPerBlock,
const bool  useSharedMemoryWsp 
)
inlineconstexpr

Dynamic shared memory one block needs, in elements: the \(2/(1 - \eta_1)\) table of a collapsed shape, staged once per block, then, with useSharedMemoryWsp, the workspace of the block's elmtsPerBlock elements.

Dynamic shared memory one block needs, in elements: the \(2/(1 - \eta_1)\) table of a collapsed shape, then the workspace of the block's elmtsPerBlock elements.

useSharedMemoryWsp is ignored: the kernels have no global-memory fallback, so the workspace is always reserved here, and a request beyond the shared memory per block is fatal in GetDeviceKernelParameters().

Definition at line 156 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

159{
160 const unsigned int wspSize =
162 ? static_cast<unsigned int>(
164 Implementation>(
165 elmtsPerBlock, sizeParam2D))
166 : 0u;
167
168 if constexpr (SHAPE_TYPE == LibUtilities::Quad)
169 {
170 return wspSize;
171 }
172 else if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
173 SHAPE_TYPE == LibUtilities::NodalTri)
174 {
175 const unsigned int nm1 = sizeParam2D.nm1();
176
177 return nm1 + wspSize;
178 }
179}
constexpr size_t IProductWRTPhysNormalDerivTraceWorkSpaceSize(const size_t nelmt, const TTraceSizeParameter1D sizeParam1D)
Workspace of a whole block, per component: none, a segment's traces being points.
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp useSharedMemoryWsp
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int elmtsPerBlock

References elmtsPerBlock, IProductWRTPhysNormalDerivTraceWorkSpaceSize(), nm1, Nektar::LibUtilities::NodalTri, Nektar::LibUtilities::Quad, Nektar::LibUtilities::Tri, and useSharedMemoryWsp.

◆ IProductWRTPhysNormalDerivTraceSharedMemorySize() [3/3]

template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter3D , std::enable_if_t< std::is_same_v< Implementation, SumFac > &&IsTraceSizeParameter3D_v< TTraceSizeParameter3D >, bool > Enable = true>
constexpr unsigned int Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceSharedMemorySize ( const TTraceSizeParameter3D  sizeParam3D,
const unsigned int  elmtsPerBlock,
const bool  useSharedMemoryWsp 
)
inlineconstexpr

Dynamic shared memory one block needs, in elements: the \(2/(1 - \eta)\) tables of the shape's collapsed directions, staged once per block, then, with useSharedMemoryWsp, the workspace of the block's elmtsPerBlock elements.

Dynamic shared memory one block needs, in elements: the \(2/(1 - \eta)\) tables of the shape's collapsed directions, then the workspace of the block's elmtsPerBlock elements.

useSharedMemoryWsp is ignored: the kernels have no global-memory fallback, so the workspace is always reserved here, and a request beyond the shared memory per block is fatal in GetDeviceKernelParameters().

Definition at line 191 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

194{
195 const unsigned int nm1 = sizeParam3D.nm1();
196 const unsigned int nm2 = sizeParam3D.nm2();
197
198 const unsigned int wspSize =
200 ? static_cast<unsigned int>(
202 Implementation>(
203 elmtsPerBlock, sizeParam3D))
204 : 0u;
205
206 if constexpr (SHAPE_TYPE == LibUtilities::Hex)
207 {
208 return wspSize;
209 }
210 else if constexpr (SHAPE_TYPE == LibUtilities::Tet ||
211 SHAPE_TYPE == LibUtilities::NodalTet)
212 {
213 return nm1 + nm2 + wspSize;
214 }
215 else if constexpr (SHAPE_TYPE == LibUtilities::Prism ||
216 SHAPE_TYPE == LibUtilities::NodalPrism ||
217 SHAPE_TYPE == LibUtilities::Pyr ||
218 SHAPE_TYPE == LibUtilities::NodalPyr)
219 {
220 return nm2 + wspSize;
221 }
222}

References elmtsPerBlock, Nektar::LibUtilities::Hex, IProductWRTPhysNormalDerivTraceWorkSpaceSize(), nm1, nm2, Nektar::LibUtilities::NodalPrism, Nektar::LibUtilities::NodalPyr, Nektar::LibUtilities::NodalTet, Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, Nektar::LibUtilities::Tet, and useSharedMemoryWsp.

◆ IProductWRTPhysNormalDerivTraceWorkSpaceSize() [1/6]

template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter1D , std::enable_if_t< std::is_same_v< Implementation, SumFac > &&IsTraceSizeParameter1D_v< TTraceSizeParameter1D >, bool > Enable = true>
constexpr size_t Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceWorkSpaceSize ( const size_t  nelmt,
const TTraceSizeParameter1D  sizeParam1D 
)
inlineconstexpr

◆ IProductWRTPhysNormalDerivTraceWorkSpaceSize() [2/6]

template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter1D , std::enable_if_t< std::is_same_v< Implementation, SumFacTOP > &&IsTraceSizeParameter1D_v< TTraceSizeParameter1D >, bool > Enable = true>
NEK_HOSTDEVICE_INLINE constexpr size_t Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceWorkSpaceSize ( const size_t  nelmt,
const TTraceSizeParameter1D  sizeParam1D 
)
constexpr

Workspace of nelmt elements, per component: none, a segment's traces being points.

Definition at line 85 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacTOPKernels.hpp.

88{
89 return 0;
90}

◆ IProductWRTPhysNormalDerivTraceWorkSpaceSize() [3/6]

template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter2D , std::enable_if_t< std::is_same_v< Implementation, SumFac > &&IsTraceSizeParameter2D_v< TTraceSizeParameter2D >, bool > Enable = true>
constexpr size_t Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceWorkSpaceSize ( const size_t  nelmt,
const TTraceSizeParameter2D  sizeParam2D 
)
inlineconstexpr

Workspace of a whole block, per component: an edge pair's trace-mode buffer followed by a volume-sized buffer for the collapsed factor scaling, one of each per element.

Definition at line 99 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

101{
102 return (2u * IProductWRTPhysTraceEdgeModeBlockSize(sizeParam2D) +
103 sizeParam2D.nmTot()) *
104 nelmt;
105}

References nelmt.

◆ IProductWRTPhysNormalDerivTraceWorkSpaceSize() [4/6]

template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter2D , std::enable_if_t< std::is_same_v< Implementation, SumFacTOP > &&IsTraceSizeParameter2D_v< TTraceSizeParameter2D >, bool > Enable = true>
NEK_HOSTDEVICE_INLINE constexpr size_t Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceWorkSpaceSize ( const size_t  nelmt,
const TTraceSizeParameter2D  sizeParam2D 
)
constexpr

Workspace of nelmt elements, per component: an edge pair's trace-mode buffer, the element's volume and, for a collapsed shape, the volume buffer of the collapsed factor scaling, per element.

Definition at line 101 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacTOPKernels.hpp.

103{
104 constexpr bool COLLAPSED = IsCollapsedDir(SHAPE_TYPE, 1);
105
106 const unsigned int nmTot = sizeParam2D.nmTot();
107
108 return (2u * IProductWRTPhysTraceEdgeModeBlockSize(sizeParam2D) +
109 (COLLAPSED ? 2u : 1u) * nmTot) *
110 nelmt;
111}

References COLLAPSED, IsCollapsedDir(), nelmt, and nmTot.

◆ IProductWRTPhysNormalDerivTraceWorkSpaceSize() [5/6]

template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter3D , std::enable_if_t< std::is_same_v< Implementation, SumFac > &&IsTraceSizeParameter3D_v< TTraceSizeParameter3D >, bool > Enable = true>
constexpr size_t Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceWorkSpaceSize ( const size_t  nelmt,
const TTraceSizeParameter3D  sizeParam3D 
)
inlineconstexpr

Workspace of a whole block, per component: the face mode blocks of a face pair, the contraction scratch and a volume-sized buffer for the collapsed factor scaling, one of each per element.

A face group goes through one call of the face core, which writes one mode block per face covered, so the block is sized for the two faces a direction can hold; the scratch is refilled per face and takes one. The two-dimensional size above does the same for an edge pair.

Definition at line 121 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

123{
124 return (2u * IProductWRTPhysTraceFaceModeBlockSize(sizeParam3D) +
125 IProductWRTPhysTraceFaceScratchSize(sizeParam3D) +
126 sizeParam3D.nmTot()) *
127 nelmt;
128}

References nelmt.

◆ IProductWRTPhysNormalDerivTraceWorkSpaceSize() [6/6]

template<LibUtilities::ShapeType SHAPE_TYPE, typename Implementation , typename TTraceSizeParameter3D , std::enable_if_t< std::is_same_v< Implementation, SumFacTOP > &&IsTraceSizeParameter3D_v< TTraceSizeParameter3D >, bool > Enable = true>
NEK_HOSTDEVICE_INLINE constexpr size_t Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceWorkSpaceSize ( const size_t  nelmt,
const TTraceSizeParameter3D  sizeParam3D 
)
constexpr

Workspace of nelmt elements, per component: one face's mode block, the face contraction scratch, the element's volume and, for a collapsed shape, the volume buffer of the collapsed factor scaling, per element.

Definition at line 123 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacTOPKernels.hpp.

125{
126 constexpr bool COLLAPSED1 = IsCollapsedDir(SHAPE_TYPE, 1);
127 constexpr bool COLLAPSED2 = IsCollapsedDir(SHAPE_TYPE, 2);
128
129 const unsigned int nmTot = sizeParam3D.nmTot();
130
131 return (IProductWRTPhysTraceFaceModeBlockSize(sizeParam3D) +
132 IProductWRTPhysTraceFaceScratchSize(sizeParam3D) +
133 ((COLLAPSED1 || COLLAPSED2) ? 2u : 1u) * nmTot) *
134 nelmt;
135}

References COLLAPSED1, COLLAPSED2, IsCollapsedDir(), nelmt, and nmTot.

◆ IProductWRTPhysTrace1DKernel()

template<bool END_PTS_COLLOCATED, bool APPEND, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTPhysTrace1DKernel ( const unsigned  nm0,
const simd_type *  basisn0,
const simd_type *  in,
simd_type *  out 
)
static

One group of segments: lift the two endpoint values onto the volume grid.

The traces of a segment are its two vertices, so there is no surface measure, no trace quadrature and no Jacobian to apply: the whole operator is the rank-one lift \(\Lambda_p \mathrel{+}= h_p(-1)\,\hat f_0 + h_p(+1)\,\hat f_1\). Under END_PTS_COLLOCATED the volume rule contains both domain endpoints, \(h_p(\pm 1)\) is a Kronecker delta and the two values drop straight into the first and last volume point. Otherwise the interpolation table is applied in full; a segment has two traces in direction 0, which is the stride of two into basisn0.

Both arms accumulate onto out, so it is the zeroing under APPEND == false that turns the non-appending instantiation into a plain write.

Template Parameters
END_PTS_COLLOCATEDVolume rule contains the domain endpoints.
APPENDAccumulate onto out instead of zeroing it first.
simd_typeSIMD vector type carrying one element per lane.
Parameters
nm0Volume quadrature points of the segment.
basisn0eInterp table \(h_p(\pm 1)\), indexed basisn0[2 * p + f].
inPacked trace values, the two vertices.
outVolume-shaped result of the element group.

Definition at line 221 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

224{
225 if constexpr (!APPEND)
226 {
227 // zero field
228 std::memset((void *)out, 0, nm0 * sizeof(simd_type));
229 }
230
231 if constexpr (END_PTS_COLLOCATED)
232 {
233 out[0] += in[0];
234 out[nm0 - 1] += in[1];
235 }
236 else
237 {
238 for (unsigned p = 0; p < nm0; ++p)
239 {
240 simd_type sum = 0.0;
241 sum.fma(basisn0[2 * p], in[0]);
242 sum.fma(basisn0[2 * p + 1], in[1]);
243
244 out[p] += sum;
245 }
246 }
247}

References in, nm0, out, and sum.

◆ IProductWRTPhysTraceEdgeKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool APPEND, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTPhysTraceEdgeKernel ( const unsigned  edge,
const unsigned  nm0,
const unsigned  nm1,
const simd_type *  nbasis0,
const simd_type *  nbasis1,
const unsigned  tnq00,
const unsigned  tnq10,
const simd_type *  tbasis0,
const simd_type *  tbasis1,
const simd_type *  tw00,
const simd_type *  tw10,
const simd_type *  tjac,
simd_type *  wsp,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated0,
const bool  isCollocated1,
const bool  endPtsCollocated0,
const bool  endPtsCollocated1 
)
static

One named edge of one two-dimensional element group: turn the edge id into a direction and a position, then integrate and lift.

The single-trace entry point, used when the solver drives one trace at a time rather than the whole boundary. in and tjac already point at that edge's block, so the position within the direction is expressed only through the [edg, nedge) window handed to the glue kernels. The edge to (direction, position) map is 3->(0,0), 1->(0,1), 0->(1,0), 2->(1,1) for a quadrilateral, and 2->(0,0), 1->(0,1), 0->(1,0) for a triangle, whose direction 1 carries a single trace at the collapsed end. An unrecognised edge raises a fatal error.

Note
SHAPE_TYPE here is the shape the block operator names when it calls, and it names the parent shape: a NodalTri arrives as Tri and takes the triangle arm correctly. That is the opposite of the bulk kernel, which is instantiated on the true shape; see the file note.
The block operator only ever instantiates this with APPEND == true, so nothing is zeroed here and the caller must zero the volume field before applying its first trace.
For the lower edge of a two-trace direction the window is [0, 1), which is not the nbasis row stride: the lift kernels take that separately, from ShapeTypeNumTraceInDir, so the general (non-endPtsCollocated) arm reads the table at the direction's trace count either way.
Template Parameters
SHAPE_TYPEQuad, or Tri standing in for any triangle.
DEFORMEDTrace Jacobian varies point by point.
APPENDAccumulate onto out instead of zeroing it first.
simd_typeSIMD vector type carrying one element per lane.
Parameters
edgeNektar edge id of the trace to apply.
nm0,nm1Volume quadrature points per direction.
nbasis0,nbasis1eInterp tables \(h_p(\pm 1)\) per direction.
tnq00,tnq10Trace quadrature points of the direction-0 and direction-1 edges.
tbasis0,tbasis1eInterp tables to the trace points, per direction.
tw00,tw10Trace quadrature weights per direction.
tjacTrace Jacobian of this element group, already offset to this edge.
wspTrace-mode scratch, max(nm0,nm1) entries.
inPacked trace values, already offset to this edge.
outVolume field of this element group.
isCollocated0Direction-0 trace points coincide with the volume points.
isCollocated1Direction-1 trace points coincide with the volume points.
endPtsCollocated0Direction-0 volume rule contains the domain endpoints.
endPtsCollocated1Direction-1 volume rule contains the domain endpoints.

Definition at line 632 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

640{
641 if constexpr (!APPEND)
642 {
643 // zero field
644 std::memset((void *)out, 0, nm0 * nm1 * sizeof(simd_type));
645 }
646
647 // One nbasis row per trace of the direction. A per-trace call covers
648 // one position within a direction, so its window is not the row stride
649 // and the two cannot be taken for one another.
650 constexpr unsigned tstride0 =
651 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][0];
652 constexpr unsigned tstride1 =
653 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][1];
654
655 if constexpr (SHAPE_TYPE == LibUtilities::Tri)
656 {
657 switch (edge)
658 {
659 case 0:
660 if (endPtsCollocated1)
661 {
662 IPWRTPhysTraceEdgeN1Kernel<true, DEFORMED>(
663 0, 1, tstride1, nm0, nm1, nbasis1, tnq10, tbasis1, tw10,
664 tjac, wsp, in, out, isCollocated1);
665 }
666 else
667 {
668 IPWRTPhysTraceEdgeN1Kernel<false, DEFORMED>(
669 0, 1, tstride1, nm0, nm1, nbasis1, tnq10, tbasis1, tw10,
670 tjac, wsp, in, out, isCollocated1);
671 }
672 break;
673 case 1:
674 if (endPtsCollocated0)
675 {
676
677 IPWRTPhysTraceEdgeN0Kernel<true, DEFORMED>(
678 1, 2, tstride0, nm0, nm1, nbasis0, tnq00, tbasis0, tw00,
679 tjac, wsp, in, out, isCollocated0);
680 }
681 else
682 {
683
684 IPWRTPhysTraceEdgeN0Kernel<false, DEFORMED>(
685 1, 2, tstride0, nm0, nm1, nbasis0, tnq00, tbasis0, tw00,
686 tjac, wsp, in, out, isCollocated0);
687 }
688 break;
689 case 2:
690 if (endPtsCollocated0)
691 {
692
693 IPWRTPhysTraceEdgeN0Kernel<true, DEFORMED>(
694 0, 1, tstride0, nm0, nm1, nbasis0, tnq00, tbasis0, tw00,
695 tjac, wsp, in, out, isCollocated0);
696 }
697 else
698 {
699
700 IPWRTPhysTraceEdgeN0Kernel<false, DEFORMED>(
701 0, 1, tstride0, nm0, nm1, nbasis0, tnq00, tbasis0, tw00,
702 tjac, wsp, in, out, isCollocated0);
703 }
704 break;
705 default:
706 NEKERROR(ErrorUtil::efatal, "Unrecognised edge input");
707 break;
708 }
709 }
710 else
711 {
712 switch (edge)
713 {
714 case 0:
715 if (endPtsCollocated1)
716 {
717 IPWRTPhysTraceEdgeN1Kernel<true, DEFORMED>(
718 0, 1, tstride1, nm0, nm1, nbasis1, tnq10, tbasis1, tw10,
719 tjac, wsp, in, out, isCollocated1);
720 }
721 else
722 {
723 IPWRTPhysTraceEdgeN1Kernel<false, DEFORMED>(
724 0, 1, tstride1, nm0, nm1, nbasis1, tnq10, tbasis1, tw10,
725 tjac, wsp, in, out, isCollocated1);
726 }
727 break;
728 case 1:
729 if (endPtsCollocated0)
730 {
731
732 IPWRTPhysTraceEdgeN0Kernel<true, DEFORMED>(
733 1, 2, tstride0, nm0, nm1, nbasis0, tnq00, tbasis0, tw00,
734 tjac, wsp, in, out, isCollocated0);
735 }
736 else
737 {
738
739 IPWRTPhysTraceEdgeN0Kernel<false, DEFORMED>(
740 1, 2, tstride0, nm0, nm1, nbasis0, tnq00, tbasis0, tw00,
741 tjac, wsp, in, out, isCollocated0);
742 }
743 break;
744 case 2:
745 if (endPtsCollocated1)
746 {
747 IPWRTPhysTraceEdgeN1Kernel<true, DEFORMED>(
748 1, 2, tstride1, nm0, nm1, nbasis1, tnq10, tbasis1, tw10,
749 tjac, wsp, in, out, isCollocated1);
750 }
751 else
752 {
753 IPWRTPhysTraceEdgeN1Kernel<false, DEFORMED>(
754 1, 2, tstride1, nm0, nm1, nbasis1, tnq10, tbasis1, tw10,
755 tjac, wsp, in, out, isCollocated1);
756 }
757 break;
758 case 3:
759 if (endPtsCollocated0)
760 {
761
762 IPWRTPhysTraceEdgeN0Kernel<true, DEFORMED>(
763 0, 1, tstride0, nm0, nm1, nbasis0, tnq00, tbasis0, tw00,
764 tjac, wsp, in, out, isCollocated0);
765 }
766 else
767 {
768
769 IPWRTPhysTraceEdgeN0Kernel<false, DEFORMED>(
770 0, 1, tstride0, nm0, nm1, nbasis0, tnq00, tbasis0, tw00,
771 tjac, wsp, in, out, isCollocated0);
772 }
773 break;
774 default:
775 NEKERROR(ErrorUtil::efatal, "Unrecognised edge input");
776 break;
777 }
778 }
779}
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...

References Nektar::ErrorUtil::efatal, endPtsCollocated0, in, nbasis0, nbasis1, NEKERROR, nm0, nm1, out, Nektar::LibUtilities::ShapeTypeNumTraceInDir, tbasis0, tbasis1, tnq00, tnq10, Nektar::LibUtilities::Tri, tw00, tw10, and wsp.

Referenced by Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::LaunchIProductWRTPhysTraceND().

◆ IProductWRTPhysTraceFaceKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool APPEND, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTPhysTraceFaceKernel ( const unsigned  face,
const unsigned  nm0,
const unsigned  nm1,
const unsigned  nm2,
const simd_type *  nbasis0,
const simd_type *  nbasis1,
const simd_type *  nbasis2,
const unsigned  tnq00,
const unsigned  tnq01,
const unsigned  tnq10,
const unsigned  tnq11,
const unsigned  tnq20,
const unsigned  tnq21,
const simd_type *  tbasis00,
const simd_type *  tbasis01,
const simd_type *  tbasis10,
const simd_type *  tbasis11,
const simd_type *  tbasis20,
const simd_type *  tbasis21,
const simd_type *  tw00,
const simd_type *  tw01,
const simd_type *  tw10,
const simd_type *  tw11,
const simd_type *  tw20,
const simd_type *  tw21,
const simd_type *  tjac,
simd_type *  wsp,
simd_type *  wsp1,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated00,
const bool  isCollocated01,
const bool  isCollocated10,
const bool  isCollocated11,
const bool  isCollocated20,
const bool  isCollocated21,
const bool  endPtsCollocated0,
const bool  endPtsCollocated1,
const bool  endPtsCollocated2 
)
static

One named face of one three-dimensional element group: turn the face id into a direction and a position, then integrate and lift.

The single-trace entry point, used when the solver drives one trace at a time rather than the whole boundary. in and tjac already point at that face's block, so the position within the direction is expressed only through the [fac, nface) window handed to the glue kernels. The face to (direction, position) map is 4->(0,0), 2->(0,1), 1->(1,0), 3->(1,1), 0->(2,0) and, for the hexahedron alone, 5->(2,1); a tetrahedron instead has 3->(0,0), 2->(0,1), 1->(1,0), 0->(2,0), which is what the SHAPE_TYPE test inside case 3 selects.

Note
The switch has no default arm, so a face id outside the shape's range falls through with no diagnostic, leaving out as the APPEND gate left it: untouched under APPEND == true, zeroed under APPEND == false. The two-dimensional twin raises a fatal error in the same position.
SHAPE_TYPE here is the shape the block operator names when it calls, and it names the parent shape: a NodalTet arrives as Tet and a NodalPrism as Prism, so both take the right arm. That is the opposite of the bulk kernel, which is instantiated on the true shape; see the file note.
The block operator only ever instantiates this with APPEND == true, so nothing is zeroed here and the caller must zero the volume field before applying its first trace.
For the lower face of a two-trace direction the window is [0, 1), which is not the nbasis row stride: the lift kernels take that separately, from ShapeTypeNumTraceInDir, so the general (non-endPtsCollocated) arm reads the table at the direction's trace count either way.
Template Parameters
SHAPE_TYPEHex, Prism, Pyr or Tet; the block operator maps the nodal shapes onto these.
DEFORMEDTrace Jacobian varies point by point.
APPENDAccumulate onto out instead of zeroing it first.
simd_typeSIMD vector type carrying one element per lane.
Parameters
faceNektar face id of the trace to apply.
nm0,nm1,nm2Volume quadrature points per direction.
nbasis0,nbasis1,nbasis2eInterp tables \(h_p(\pm 1)\) per direction.
tnq00,tnq01Trace quadrature points of an \(N_0\) face.
tnq10,tnq11Trace quadrature points of an \(N_1\) face.
tnq20,tnq21Trace quadrature points of an \(N_2\) face.
tbasis00,tbasis01,tbasis10,tbasis11,tbasis20,tbasis21eInterp tables to the trace points, per normal direction and tangential direction.
tw00,tw01,tw10,tw11,tw20,tw21Trace quadrature weights in the same order.
tjacTrace Jacobian of this element group, already offset to this face.
wspTrace-mode workspace of one face.
wsp1Scratch for the fully general face contraction.
inPacked trace values, already offset to this face.
outVolume field of this element group.
isCollocated00,isCollocated01Tangential collocation flags of the direction-0 faces.
isCollocated10,isCollocated11The same for direction 1.
isCollocated20,isCollocated21The same for direction 2.
endPtsCollocated0,endPtsCollocated1,endPtsCollocated2Volume rule of that direction contains the domain endpoints.

Definition at line 1446 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

1462{
1463 if constexpr (!APPEND)
1464 {
1465 // zero field
1466 std::memset((void *)out, 0, nm0 * nm1 * nm2 * sizeof(simd_type));
1467 }
1468
1469 // One nbasis row per trace of the direction. A per-trace call covers
1470 // one position within a direction, so its window is not the row stride
1471 // and the two cannot be taken for one another.
1472 constexpr unsigned tstride0 =
1473 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][0];
1474 constexpr unsigned tstride1 =
1475 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][1];
1476 constexpr unsigned tstride2 =
1477 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][2];
1478
1479 switch (face)
1480 {
1481 case 0:
1482 if (endPtsCollocated2)
1483 {
1484 IPWRTPhysTraceFaceN2Kernel<true, DEFORMED>(
1485 0, 1, tstride2, nm0, nm1, nm2, nbasis2, tnq20, tnq21,
1486 tbasis20, tbasis21, tw20, tw21, tjac, wsp, wsp1, in, out,
1487 isCollocated20, isCollocated21);
1488 }
1489 else
1490 {
1491 IPWRTPhysTraceFaceN2Kernel<false, DEFORMED>(
1492 0, 1, tstride2, nm0, nm1, nm2, nbasis2, tnq20, tnq21,
1493 tbasis20, tbasis21, tw20, tw21, tjac, wsp, wsp1, in, out,
1494 isCollocated20, isCollocated21);
1495 }
1496 break;
1497 case 1:
1498 if (endPtsCollocated1)
1499 {
1500 IPWRTPhysTraceFaceN1Kernel<true, DEFORMED>(
1501 0, 1, tstride1, nm0, nm1, nm2, nbasis1, tnq10, tnq11,
1502 tbasis10, tbasis11, tw10, tw11, tjac, wsp, wsp1, in, out,
1503 isCollocated10, isCollocated11);
1504 }
1505 else
1506 {
1507 IPWRTPhysTraceFaceN1Kernel<false, DEFORMED>(
1508 0, 1, tstride1, nm0, nm1, nm2, nbasis1, tnq10, tnq11,
1509 tbasis10, tbasis11, tw10, tw11, tjac, wsp, wsp1, in, out,
1510 isCollocated10, isCollocated11);
1511 }
1512 break;
1513 case 2:
1514 if (endPtsCollocated0)
1515 {
1516 IPWRTPhysTraceFaceN0Kernel<true, DEFORMED>(
1517 1, 2, tstride0, nm0, nm1, nm2, nbasis0, tnq00, tnq01,
1518 tbasis00, tbasis01, tw00, tw01, tjac, wsp, wsp1, in, out,
1519 isCollocated00, isCollocated01);
1520 }
1521 else
1522 {
1523 IPWRTPhysTraceFaceN0Kernel<false, DEFORMED>(
1524 1, 2, tstride0, nm0, nm1, nm2, nbasis0, tnq00, tnq01,
1525 tbasis00, tbasis01, tw00, tw01, tjac, wsp, wsp1, in, out,
1526 isCollocated00, isCollocated01);
1527 }
1528
1529 break;
1530 case 3:
1531 if constexpr (SHAPE_TYPE == LibUtilities::Tet)
1532 {
1533 if (endPtsCollocated0)
1534 {
1535 IPWRTPhysTraceFaceN0Kernel<true, DEFORMED>(
1536 0, 1, tstride0, nm0, nm1, nm2, nbasis0, tnq00, tnq01,
1537 tbasis00, tbasis01, tw00, tw01, tjac, wsp, wsp1, in,
1538 out, isCollocated00, isCollocated01);
1539 }
1540 else
1541 {
1542 IPWRTPhysTraceFaceN0Kernel<false, DEFORMED>(
1543 0, 1, tstride0, nm0, nm1, nm2, nbasis0, tnq00, tnq01,
1544 tbasis00, tbasis01, tw00, tw01, tjac, wsp, wsp1, in,
1545 out, isCollocated00, isCollocated01);
1546 }
1547 }
1548 else
1549 {
1550 if (endPtsCollocated1)
1551 {
1552 IPWRTPhysTraceFaceN1Kernel<true, DEFORMED>(
1553 1, 2, tstride1, nm0, nm1, nm2, nbasis1, tnq10, tnq11,
1554 tbasis10, tbasis11, tw10, tw11, tjac, wsp, wsp1, in,
1555 out, isCollocated10, isCollocated11);
1556 }
1557 else
1558 {
1559 IPWRTPhysTraceFaceN1Kernel<false, DEFORMED>(
1560 1, 2, tstride1, nm0, nm1, nm2, nbasis1, tnq10, tnq11,
1561 tbasis10, tbasis11, tw10, tw11, tjac, wsp, wsp1, in,
1562 out, isCollocated10, isCollocated11);
1563 }
1564 }
1565 break;
1566 case 4:
1567 if (endPtsCollocated0)
1568 {
1569 IPWRTPhysTraceFaceN0Kernel<true, DEFORMED>(
1570 0, 1, tstride0, nm0, nm1, nm2, nbasis0, tnq00, tnq01,
1571 tbasis00, tbasis01, tw00, tw01, tjac, wsp, wsp1, in, out,
1572 isCollocated00, isCollocated01);
1573 }
1574 else
1575 {
1576 IPWRTPhysTraceFaceN0Kernel<false, DEFORMED>(
1577 0, 1, tstride0, nm0, nm1, nm2, nbasis0, tnq00, tnq01,
1578 tbasis00, tbasis01, tw00, tw01, tjac, wsp, wsp1, in, out,
1579 isCollocated00, isCollocated01);
1580 }
1581 break;
1582 case 5:
1583 if (endPtsCollocated2)
1584 {
1585 IPWRTPhysTraceFaceN2Kernel<true, DEFORMED>(
1586 1, 2, tstride2, nm0, nm1, nm2, nbasis2, tnq20, tnq21,
1587 tbasis20, tbasis21, tw20, tw21, tjac, wsp, wsp1, in, out,
1588 isCollocated20, isCollocated21);
1589 }
1590 else
1591 {
1592 IPWRTPhysTraceFaceN2Kernel<false, DEFORMED>(
1593 1, 2, tstride2, nm0, nm1, nm2, nbasis2, tnq20, tnq21,
1594 tbasis20, tbasis21, tw20, tw21, tjac, wsp, wsp1, in, out,
1595 isCollocated20, isCollocated21);
1596 }
1597 break;
1598 }
1599}

References endPtsCollocated0, in, nbasis0, nbasis1, nbasis2, nm0, nm1, nm2, out, Nektar::LibUtilities::ShapeTypeNumTraceInDir, tbasis00, tbasis01, tbasis10, tbasis11, tbasis20, tbasis21, Nektar::LibUtilities::Tet, tnq00, tnq01, tnq10, tnq11, tnq20, tnq21, tw00, tw01, tw10, tw11, tw20, tw21, and wsp.

Referenced by Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::LaunchIProductWRTPhysTraceND().

◆ IProductWRTPhysTraceKernelLauncher() [1/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool APPEND, typename TTraceSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTPhysTraceKernelLauncher ( const TTraceSizeParameter1D  sizeParam1D,
const simd_type *  nbasis0,
const simd_type *  tjac,
const simd_type *  in,
simd_type *  out,
const bool  endPtsCollocated0 
)
static

Launcher for one element group of segments.

The one-dimensional arm of the overload set OperatorND() calls; the higher-dimensional arms follow below, and overload resolution picks between them by the number of arguments the index sequences expand to. A segment's traces are points carrying no surface measure, so it takes no tangential table, no weight, no workspace and no tangential collocation flag, and the trace Jacobian it is handed is null and unread.

Template Parameters
SHAPE_TYPESeg; unread, the path being the same for every one-dimensional expansion.
DEFORMEDUnread: a segment trace carries no Jacobian.
APPENDAccumulate onto the volume field instead of zeroing it first.

Definition at line 1624 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

1628{
1629 static_assert(IsTraceSizeParameter1D_v<TTraceSizeParameter1D>,
1630 "Template argument must be either of type "
1631 "NonTemplatedTraceSizeParameter1D or "
1632 "TemplatedTraceSizeParameter1D.");
1633
1634 if (endPtsCollocated0)
1635 {
1636 IProductWRTPhysTrace1DKernel<true, APPEND>(sizeParam1D.nm0(), nbasis0,
1637 in, out);
1638 }
1639 else
1640 {
1641 IProductWRTPhysTrace1DKernel<false, APPEND>(sizeParam1D.nm0(), nbasis0,
1642 in, out);
1643 }
1644}

References endPtsCollocated0, in, nbasis0, and out.

Referenced by Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyGroupsImpl(), Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), and Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl().

◆ IProductWRTPhysTraceKernelLauncher() [2/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool APPEND, typename TTraceSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTPhysTraceKernelLauncher ( const TTraceSizeParameter2D  sizeParam2D,
const simd_type *  nbasis0,
const simd_type *  nbasis1,
const simd_type *  tbasis0,
const simd_type *  tbasis1,
const simd_type *  tw00,
const simd_type *  tw10,
const simd_type *  tjac,
simd_type *  wsp,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated0,
const bool  isCollocated1,
const bool  endPtsCollocated0,
const bool  endPtsCollocated1 
)
static

All edges of one two-dimensional element group: optionally zero the volume field, then walk the packed traces.

The bulk entry point. It applies the direction-0 pair first, then advances in by the pair's 2 * tnq00 values and tjac by the same number of points when deformed or by two trace slots when regular, and applies the direction-1 traces: a pair, or a single edge when SHAPE_TYPE is exactly Tri, whose direction-1 upper end is the collapsed vertex. Quadrilateral and triangle run the identical leaf kernels; the hypotenuse is simply the \(\eta_0 = +1\) line of the collapsed square and its edge Jacobian carries the physical metric of the slant.

The endPtsCollocated flags are runtime booleans, so each call site is written out twice to instantiate both arms of the leaf template.

Template Parameters
SHAPE_TYPEQuad, Tri or NodalTri.
DEFORMEDTrace Jacobian varies point by point.
APPENDAccumulate onto out instead of zeroing it first.
simd_typeSIMD vector type carrying one element per lane.
Parameters
sizeParam2DVolume and trace point counts of the shape.
nbasis0,nbasis1eInterp tables \(h_p(\pm 1)\) per direction.
tbasis0,tbasis1eInterp tables to the trace points, per direction.
tw00,tw10Trace quadrature weights per direction.
tjacTrace Jacobian of this element group.
wspTrace-mode scratch, 2 * max(nm0,nm1) entries.
inPacked trace values of this element group.
outVolume field of this element group.
isCollocated0Direction-0 trace points coincide with the volume points.
isCollocated1Direction-1 trace points coincide with the volume points.
endPtsCollocated0Direction-0 volume rule contains the domain endpoints.
endPtsCollocated1Direction-1 volume rule contains the domain endpoints.

Definition at line 1689 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

1696{
1697 static_assert(IsTraceSizeParameter2D_v<TTraceSizeParameter2D>,
1698 "Template argument must be either of type "
1699 "NonTemplatedTraceSizeParameter2D or "
1700 "TemplatedTraceSizeParameter2D.");
1701
1702 // Shape size.
1703 const unsigned nm0 = sizeParam2D.nm0();
1704 const unsigned nm1 = sizeParam2D.nm1();
1705 const unsigned tnq00 = sizeParam2D.nq00();
1706 const unsigned tnq10 = sizeParam2D.nq10();
1707
1708 if constexpr (!APPEND)
1709 {
1710 // zero field
1711 std::memset((void *)out, 0, nm0 * nm1 * sizeof(simd_type));
1712 }
1713
1714 // A bulk call spans the whole direction, so its window is also the
1715 // nbasis row stride; the per-trace entry point has to state the two
1716 // separately.
1717 if (endPtsCollocated0)
1718 {
1719
1720 IPWRTPhysTraceEdgeN0Kernel<true, DEFORMED>(0, 2, 2, nm0, nm1, nbasis0,
1721 tnq00, tbasis0, tw00, tjac,
1722 wsp, in, out, isCollocated0);
1723 }
1724 else
1725 {
1726
1727 IPWRTPhysTraceEdgeN0Kernel<false, DEFORMED>(
1728 0, 2, 2, nm0, nm1, nbasis0, tnq00, tbasis0, tw00, tjac, wsp, in,
1729 out, isCollocated0);
1730 }
1731
1732 unsigned offset = 2 * tnq00; // edge offset for following edge
1733 unsigned joffset = (DEFORMED) ? 2 * tnq00 : 2;
1734
1735 // edge 0 in tris, edges 0 + 2 in quads
1736 constexpr unsigned ntrace1 =
1737 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][1];
1738
1739 if (endPtsCollocated1)
1740 {
1741 IPWRTPhysTraceEdgeN1Kernel<true, DEFORMED>(
1742 0, ntrace1, ntrace1, nm0, nm1, nbasis1, tnq10, tbasis1, tw10,
1743 tjac + joffset, wsp, in + offset, out, isCollocated1);
1744 }
1745 else
1746 {
1747 IPWRTPhysTraceEdgeN1Kernel<false, DEFORMED>(
1748 0, ntrace1, ntrace1, nm0, nm1, nbasis1, tnq10, tbasis1, tw10,
1749 tjac + joffset, wsp, in + offset, out, isCollocated1);
1750 }
1751}

References endPtsCollocated0, in, nbasis0, nbasis1, nm0, nm1, out, Nektar::LibUtilities::ShapeTypeNumTraceInDir, tbasis0, tbasis1, tnq00, tnq10, tw00, tw10, and wsp.

◆ IProductWRTPhysTraceKernelLauncher() [3/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool APPEND, typename TTraceSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IProductWRTPhysTraceKernelLauncher ( const TTraceSizeParameter3D  sizeParam3D,
const simd_type *  nbasis0,
const simd_type *  nbasis1,
const simd_type *  nbasis2,
const simd_type *  tbasis00,
const simd_type *  tbasis01,
const simd_type *  tbasis10,
const simd_type *  tbasis11,
const simd_type *  tbasis20,
const simd_type *  tbasis21,
const simd_type *  tw00,
const simd_type *  tw01,
const simd_type *  tw10,
const simd_type *  tw11,
const simd_type *  tw20,
const simd_type *  tw21,
const simd_type *  tjac,
simd_type *  wsp,
simd_type *  wsp1,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated00,
const bool  isCollocated01,
const bool  isCollocated10,
const bool  isCollocated11,
const bool  isCollocated20,
const bool  isCollocated21,
const bool  endPtsCollocated0,
const bool  endPtsCollocated1,
const bool  endPtsCollocated2 
)
static

All faces of one three-dimensional element group: optionally zero the volume field, then walk the packed traces a pair at a time.

The bulk entry point, and on this execution space the only one for three dimensions: every shape reaches it, including the nodal ones. It applies the direction-0 pair first, then advances in by that pair's 2 * tnq00 * tnq01 values and tjac by the same count when deformed or by two trace slots when regular, and repeats for direction 1 and direction 2. Which of those carry a pair and which a single trace is what the two if constexpr tests decide: a tetrahedron has one direction-1 face, and everything but a hexahedron has one direction-2 face.

Because the pairs are applied together, wsp holds two faces' worth of trace modes, which is how the block operator sizes it.

The endPtsCollocated flags are runtime booleans, so each call site is written out twice to instantiate both arms of the leaf template.

Template Parameters
SHAPE_TYPEHex, Prism, NodalPrism, Pyr, NodalPyr, Tet or NodalTet.
DEFORMEDTrace Jacobian varies point by point.
APPENDAccumulate onto out instead of zeroing it first.
simd_typeSIMD vector type carrying one element per lane.
Parameters
sizeParam3DVolume and trace point counts of the shape.
nbasis0,nbasis1,nbasis2eInterp tables \(h_p(\pm 1)\) per direction.
tbasis00,tbasis01,tbasis10,tbasis11,tbasis20,tbasis21eInterp tables to the trace points, per normal direction and tangential direction.
tw00,tw01,tw10,tw11,tw20,tw21Trace quadrature weights in the same order.
tjacTrace Jacobian of this element group.
wspTrace-mode workspace, two faces' worth.
wsp1Scratch for the fully general face contraction.
inPacked trace values of this element group.
outVolume field of this element group.
isCollocated00,isCollocated01Tangential collocation flags of the direction-0 faces.
isCollocated10,isCollocated11The same for direction 1.
isCollocated20,isCollocated21The same for direction 2.
endPtsCollocated0,endPtsCollocated1,endPtsCollocated2Volume rule of that direction contains the domain endpoints.

Definition at line 1801 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

1815{
1816 static_assert(IsTraceSizeParameter3D_v<TTraceSizeParameter3D>,
1817 "Template argument must be either of type "
1818 "NonTemplatedTraceSizeParameter3D or "
1819 "TemplatedTraceSizeParameter3D.");
1820
1821 // Shape size.
1822 const unsigned nm0 = sizeParam3D.nm0();
1823 const unsigned nm1 = sizeParam3D.nm1();
1824 const unsigned nm2 = sizeParam3D.nm2();
1825 const unsigned tnq00 = sizeParam3D.nq00();
1826 const unsigned tnq01 = sizeParam3D.nq01();
1827 const unsigned tnq10 = sizeParam3D.nq10();
1828 const unsigned tnq11 = sizeParam3D.nq11();
1829 const unsigned tnq20 = sizeParam3D.nq20();
1830 const unsigned tnq21 = sizeParam3D.nq21();
1831
1832 if constexpr (!APPEND)
1833 {
1834 // zero field
1835 std::memset((void *)out, 0, nm0 * nm1 * nm2 * sizeof(simd_type));
1836 }
1837
1838 // A bulk call spans the whole direction, so its window is also the
1839 // nbasis row stride; the per-trace entry point has to state the two
1840 // separately.
1841 if (endPtsCollocated0)
1842 {
1843 IPWRTPhysTraceFaceN0Kernel<true, DEFORMED>(
1844 0, 2, 2, nm0, nm1, nm2, nbasis0, tnq00, tnq01, tbasis00, tbasis01,
1845 tw00, tw01, tjac, wsp, wsp1, in, out, isCollocated00,
1846 isCollocated01);
1847 }
1848 else
1849 {
1850 IPWRTPhysTraceFaceN0Kernel<false, DEFORMED>(
1851 0, 2, 2, nm0, nm1, nm2, nbasis0, tnq00, tnq01, tbasis00, tbasis01,
1852 tw00, tw01, tjac, wsp, wsp1, in, out, isCollocated00,
1853 isCollocated01);
1854 }
1855
1856 unsigned offset = 2 * tnq00 * tnq01;
1857 unsigned joffset = (DEFORMED) ? offset : 2;
1858
1859 constexpr unsigned nface1 =
1860 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][1];
1861
1862 if (endPtsCollocated1)
1863 {
1864 IPWRTPhysTraceFaceN1Kernel<true, DEFORMED>(
1865 0, nface1, nface1, nm0, nm1, nm2, nbasis1, tnq10, tnq11, tbasis10,
1866 tbasis11, tw10, tw11, tjac + joffset, wsp, wsp1, in + offset, out,
1867 isCollocated10, isCollocated11);
1868 }
1869 else
1870 {
1871 IPWRTPhysTraceFaceN1Kernel<false, DEFORMED>(
1872 0, nface1, nface1, nm0, nm1, nm2, nbasis1, tnq10, tnq11, tbasis10,
1873 tbasis11, tw10, tw11, tjac + joffset, wsp, wsp1, in + offset, out,
1874 isCollocated10, isCollocated11);
1875 }
1876 offset += nface1 * tnq10 * tnq11;
1877 joffset += (DEFORMED) ? nface1 * tnq10 * tnq11 : nface1;
1878
1879 constexpr unsigned nface2 =
1880 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][2];
1881
1882 if (endPtsCollocated2)
1883 {
1884 IPWRTPhysTraceFaceN2Kernel<true, DEFORMED>(
1885 0, nface2, nface2, nm0, nm1, nm2, nbasis2, tnq20, tnq21, tbasis20,
1886 tbasis21, tw20, tw21, tjac + joffset, wsp, wsp1, in + offset, out,
1887 isCollocated20, isCollocated21);
1888 }
1889 else
1890 {
1891 IPWRTPhysTraceFaceN2Kernel<false, DEFORMED>(
1892 0, nface2, nface2, nm0, nm1, nm2, nbasis2, tnq20, tnq21, tbasis20,
1893 tbasis21, tw20, tw21, tjac + joffset, wsp, wsp1, in + offset, out,
1894 isCollocated20, isCollocated21);
1895 }
1896}

References endPtsCollocated0, in, nbasis0, nbasis1, nbasis2, nm0, nm1, nm2, out, Nektar::LibUtilities::ShapeTypeNumTraceInDir, tbasis00, tbasis01, tbasis10, tbasis11, tbasis20, tbasis21, tnq00, tnq01, tnq10, tnq11, tnq20, tnq21, tw00, tw01, tw10, tw11, tw20, tw21, and wsp.

◆ IPWRTPhysEdgeKernel()

template<bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IPWRTPhysEdgeKernel ( const unsigned  edg,
const unsigned  nedge,
const unsigned  nm,
const unsigned  tnq,
const simd_type *  tbasis,
const simd_type *  tw,
const simd_type *  tjac,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated 
)
static

Leaf kernel, stage one in two dimensions: integrate an edge, or a pair of edges, against the hat functions of the in-edge direction.

For every edge in [edg, nedge) and every volume point q of the in-edge direction this forms \(F_q = \sum_i w_i\, h_q(\xi^{tr}_i)\, J\, \hat f_i\) over the tnq trace quadrature points. Under isCollocated the trace points are the volume points, the table is the identity and the contraction degenerates to a pointwise multiply by the weight and the Jacobian; the debug assertion states the precondition that makes that legal.

out is the caller's trace-mode workspace, not the volume field: it receives nm entries per edge, edge-major, starting at zero, and both arms write it rather than accumulate onto it. For regular geometry the Jacobian slot is e - edg, that is relative to the first edge of this call, the caller having already offset tjac to the right trace.

Template Parameters
DEFORMEDTrace Jacobian varies point by point.
simd_typeSIMD vector type carrying one element per lane.
Parameters
edgPosition of the first edge within its direction.
nedgeOne past the position of the last edge.
nmVolume quadrature points of the in-edge direction, hence entries produced per edge.
tnqTrace quadrature points of the edge.
tbasiseInterp table \(h_q(\xi^{tr}_i)\), indexed tbasis[q * tnq + i].
twTrace quadrature weights.
tjacTrace Jacobian of this element group.
inPacked trace values of the edges covered.
outTrace-mode workspace.
isCollocatedTrace points coincide with the volume points.

Definition at line 288 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

293{
294 if (isCollocated)
295 {
296 ASSERTL1(nm == tnq, "Basis is not collocated");
297
298 unsigned cnt = 0;
299 for (unsigned e = edg; e < nedge; ++e)
300 {
301 for (unsigned q = 0; q < nm; ++q, ++cnt)
302 {
303 // integrate mode over edge
304 simd_type jac_val;
305
306 if constexpr (DEFORMED)
307 {
308 jac_val = tjac[cnt];
309 }
310 else
311 {
312 jac_val = tjac[e - edg];
313 }
314
315 out[cnt] = in[cnt] * jac_val * tw[q];
316 }
317 }
318 }
319 else // integrate
320 {
321 unsigned cnt = 0;
322 unsigned qOffset = 0;
323 for (unsigned e = edg; e < nedge; ++e)
324 {
325 for (unsigned q = 0; q < nm; ++q)
326 {
327 simd_type sum_q = 0.0;
328 unsigned bOffset = q * tnq;
329
330 for (unsigned i = 0; i < tnq; ++i)
331 {
332 simd_type jac_val;
333
334 if constexpr (DEFORMED)
335 {
336 jac_val = tjac[qOffset + i];
337 }
338 else
339 {
340 jac_val = tjac[e - edg];
341 }
342
343 simd_type prod =
344 in[qOffset + i] * tbasis[bOffset + i] * jac_val;
345 sum_q.fma(prod, tw[i]);
346 }
347 out[cnt++] = sum_q;
348 }
349 qOffset += tnq;
350 }
351 }
352}

References ASSERTL1, e, in, and out.

◆ IPWRTPhysFaceKernel()

template<bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IPWRTPhysFaceKernel ( const unsigned  fac,
const unsigned  nface,
const unsigned  nm0,
const unsigned  nm1,
const unsigned  tnq0,
const unsigned  tnq1,
const simd_type *  tbasis0,
const simd_type *  tbasis1,
const simd_type *  tw0,
const simd_type *  tw1,
const simd_type *  tjac,
simd_type *  wsp,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated0,
const bool  isCollocated1 
)
static

Leaf kernel, stage one in three dimensions: integrate a face, or a pair of faces, against the hat functions of the two in-face directions.

For every face in [fac, nface) it forms

\[ F_{pq} = \sum_j w_j\, h_q(\xi^{tr}_j) \sum_i w_i\, h_p(\xi^{tr}_i)\, J(\xi^{tr}_i, \xi^{tr}_j)\, \hat f(\xi^{tr}_i, \xi^{tr}_j), \]

writing nm0 * nm1 entries per face at q * nm0 + p, face-major, into the caller's trace-mode workspace out.

Four arms cover the collocation cases: both directions collocated is a pointwise multiply by the two weights and the Jacobian; one direction collocated contracts the other only and scales by the collocated direction's weight; neither collocated runs the two contractions in sequence through wsp, which is why the caller must keep wsp and out distinct. The debug assertions state the preconditions the collocated arms rely on.

Note
nm0 and nm1 are the in-face counts the glue level supplies, (nm1,nm2) for an \(N_0\) face, (nm0,nm2) for \(N_1\) and (nm0,nm1) for \(N_2\), not the element's direction-0 and direction-1 counts.
Template Parameters
DEFORMEDTrace Jacobian varies point by point.
simd_typeSIMD vector type carrying one element per lane.
Parameters
facPosition of the first face within its direction.
nfaceOne past the position of the last face.
nm0,nm1Volume quadrature points of the two in-face directions, hence entries produced per face.
tnq0,tnq1Trace quadrature points of the two in-face directions.
tbasis0eInterp table to the trace points of the first in-face direction, tbasis0[p * tnq0 + i].
tbasis1The same for the second in-face direction.
tw0,tw1Trace quadrature weights per in-face direction.
tjacTrace Jacobian of this element group.
wspScratch for the fully general arm, nm0 * tnq1 entries.
inPacked trace values of the faces covered.
outTrace-mode workspace.
isCollocated0First in-face direction is collocated.
isCollocated1Second in-face direction is collocated.

Definition at line 1050 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

1057{
1058 if (isCollocated0 && isCollocated1) // simply multipby by weights
1059 {
1060 ASSERTL1((nm0 == tnq0) && (nm1 == tnq1), "Bases are not collocated");
1061
1062 for (unsigned f = fac, cnt = 0; f < nface; ++f)
1063 {
1064 for (unsigned j = 0; j < tnq1; ++j)
1065 {
1066 for (unsigned i = 0; i < tnq0; ++i, ++cnt)
1067 {
1068 // integrate mode over edge
1069 simd_type jac_val;
1070
1071 if constexpr (DEFORMED)
1072 {
1073 jac_val = tjac[cnt];
1074 }
1075 else
1076 {
1077 jac_val = tjac[f - fac];
1078 }
1079
1080 out[cnt] = in[cnt] * jac_val * tw0[i] * tw1[j];
1081 }
1082 }
1083 }
1084 }
1085 else if (isCollocated0) // full inner product in dir 1
1086 {
1087 ASSERTL1((nm0 == tnq0), "Basis is not collocated");
1088
1089 unsigned inOffset = 0, outOffset = 0;
1090 for (unsigned f = fac; f < nface; ++f)
1091 {
1092 for (unsigned i = 0; i < tnq0; ++i)
1093 {
1094 for (unsigned q = 0; q < nm1; ++q)
1095 {
1096 unsigned qoffset = q * tnq1;
1097 simd_type sum_q = 0;
1098 for (unsigned j = 0; j < tnq1; ++j)
1099 {
1100 unsigned joffset = j * tnq0 + inOffset;
1101
1102 // integrate mode over edge
1103 simd_type jac_val;
1104
1105 if constexpr (DEFORMED)
1106 {
1107 jac_val = tjac[joffset + i];
1108 }
1109 else
1110 {
1111 jac_val = tjac[f - fac];
1112 }
1113
1114 simd_type prod =
1115 in[joffset + i] * jac_val * tbasis1[qoffset + j];
1116 sum_q.fma(prod, tw1[j]);
1117 }
1118 out[outOffset + q * nm0 + i] = sum_q * tw0[i];
1119 }
1120 }
1121 inOffset += tnq0 * tnq1;
1122 outOffset += nm0 * nm1;
1123 }
1124 }
1125 else if (isCollocated1) // full inner product in dir 0
1126 {
1127 ASSERTL1((nm1 == tnq1), "Basis is not collocated");
1128
1129 unsigned offset = 0;
1130 for (unsigned f = fac, cnt = 0; f < nface; ++f)
1131 {
1132 for (unsigned j = 0; j < tnq1; ++j)
1133 {
1134 unsigned joffset = j * tnq0 + offset;
1135 for (unsigned p = 0; p < nm0; ++p, ++cnt)
1136 {
1137 unsigned poffset = p * tnq0;
1138 simd_type sum_p = 0;
1139 for (unsigned i = 0; i < tnq0; ++i)
1140 {
1141 // integrate mode over edge
1142 simd_type jac_val;
1143
1144 if constexpr (DEFORMED)
1145 {
1146 jac_val = tjac[joffset + i];
1147 }
1148 else
1149 {
1150 jac_val = tjac[f - fac];
1151 }
1152 simd_type prod =
1153 in[joffset + i] * jac_val * tbasis0[poffset + i];
1154 sum_p.fma(prod, tw0[i]);
1155 }
1156 out[cnt] = sum_p * tw1[j];
1157 }
1158 }
1159 offset += tnq0 * tnq1;
1160 }
1161 }
1162 else // full inner product
1163 {
1164 unsigned inOffset = 0, outOffset = 0;
1165 for (unsigned f = fac, cnt = 0; f < nface; ++f)
1166 {
1167 for (unsigned j = 0; j < tnq1; ++j)
1168 {
1169 unsigned joffset = j * tnq0 + inOffset;
1170
1171 for (unsigned p = 0; p < nm0; ++p, ++cnt)
1172 {
1173 unsigned poffset = p * tnq0;
1174 simd_type sum_p = 0;
1175 for (unsigned i = 0; i < tnq0; ++i)
1176 {
1177 // integrate mode over edge
1178 simd_type jac_val;
1179
1180 if constexpr (DEFORMED)
1181 {
1182 jac_val = tjac[joffset + i];
1183 }
1184 else
1185 {
1186 jac_val = tjac[f - fac];
1187 }
1188 simd_type prod =
1189 in[joffset + i] * jac_val * tbasis0[poffset + i];
1190 sum_p.fma(prod, tw0[i]);
1191 }
1192 wsp[j * nm0 + p] = sum_p;
1193 }
1194 }
1195
1196 for (unsigned p = 0; p < nm0; ++p)
1197 {
1198 for (unsigned q = 0; q < nm1; ++q)
1199 {
1200 unsigned qoffset = q * tnq1;
1201 simd_type sum_q = 0;
1202 for (unsigned j = 0; j < tnq1; ++j)
1203 {
1204 simd_type prod =
1205 wsp[j * nm0 + p] * tbasis1[qoffset + j];
1206 sum_q.fma(prod, tw1[j]);
1207 }
1208 out[outOffset + q * nm0 + p] = sum_q;
1209 }
1210 }
1211 inOffset += tnq0 * tnq1;
1212 outOffset += nm0 * nm1;
1213 }
1214 }
1215}
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT tw1
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT tbasis1
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT tbasis0
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT tw0

References ASSERTL1, in, nm0, nm1, out, tbasis0, tbasis1, tw0, tw1, and wsp.

◆ IPWRTPhysNormalDerivTraceEdgeGroupKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, unsigned EDGE_NORMAL_DIR, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IPWRTPhysNormalDerivTraceEdgeGroupKernel ( const bool  useD1,
const unsigned  nm0,
const unsigned  nm1,
const unsigned  tnq00,
const unsigned  tnq10,
const simd_type *  nbasis,
const simd_type *  tbasis,
const simd_type *  tw,
const simd_type *  twoOver1,
const simd_type *  jac,
const simd_type *  in,
simd_type *  wsp,
simd_type *  volwsp,
simd_type *  out,
const bool  isCollocated,
const bool  endPtsCollocated 
)
static

One edge group of a term of the two-dimensional operator, accumulated into out.

EDGE_NORMAL_DIR names the group: the element coordinate direction its edges are normal to. The tables handed in are already those of the term being evaluated, so this only routes the group through the volume workspace when it carries the collapsed factor.

Parameters
useD1The group carries \(2/(1 - \eta_1)\) and is accumulated through volwsp. A run-time flag so that one group body per size serves every direction term.
nm0,nm1Volume quadrature points per direction.
tnq00,tnq10Trace quadrature points of the direction-0 and direction-1 edges; only the one matching EDGE_NORMAL_DIR is read.
nbasiseInterp table of this term's normal direction, already the derivative table when this group is the derivative term.
tbasiseInterp table to this group's trace points.
twTrace quadrature weights of this group's direction.
twoOver1\(2/(1 - \eta_1)\) at the element's own points; unread unless useD1.
jacThis term's component of the factor array for the element group.
inPacked trace values of this element group.
wspTrace-mode scratch for the underlying edge kernel.
volwspVolume-sized scratch that receives the group before scaling; written and read only when useD1.
outAccumulates the group's contribution.
isCollocatedTrace points of this group's tangential direction coincide with the volume points; forwarded to the underlying edge kernel.
endPtsCollocatedVolume rule of this group's normal direction contains the domain endpoints; selects the endpoint-collocated arm of the underlying edge kernel.

Definition at line 216 of file IProductWRTPhysNormalDerivTraceBlockOpSerialAVXSumFacKernels.hpp.

223{
224 const unsigned numDataOut = nm0 * nm1;
225
226 // Edge group offsets into the input and the factors, matching what
227 // the plain trace lift does internally. Only the group being
228 // instantiated reads its own offsets, so the others go unused.
229 [[maybe_unused]] constexpr unsigned nedgeN0 =
230 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][0];
231 [[maybe_unused]] constexpr unsigned nedgeN1 =
232 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][1];
233
234 [[maybe_unused]] const unsigned off1 = 2 * tnq00;
235 [[maybe_unused]] const unsigned joff1 = (DEFORMED) ? off1 : 2;
236
237 simd_type *dst = useD1 ? volwsp : out;
238 if (useD1)
239 {
240 std::memset((void *)dst, 0, numDataOut * sizeof(simd_type));
241 }
242
243 if constexpr (EDGE_NORMAL_DIR == 0)
244 {
245 if (endPtsCollocated)
246 {
247 IPWRTPhysTraceEdgeN0Kernel<true, DEFORMED>(
248 0, nedgeN0, nedgeN0, nm0, nm1, nbasis, tnq00, tbasis, tw, jac,
249 wsp, in, dst, isCollocated);
250 }
251 else
252 {
253 IPWRTPhysTraceEdgeN0Kernel<false, DEFORMED>(
254 0, nedgeN0, nedgeN0, nm0, nm1, nbasis, tnq00, tbasis, tw, jac,
255 wsp, in, dst, isCollocated);
256 }
257 }
258 else
259 {
260 if (endPtsCollocated)
261 {
262 IPWRTPhysTraceEdgeN1Kernel<true, DEFORMED>(
263 0, nedgeN1, nedgeN1, nm0, nm1, nbasis, tnq10, tbasis, tw,
264 jac + joff1, wsp, in + off1, dst, isCollocated);
265 }
266 else
267 {
268 IPWRTPhysTraceEdgeN1Kernel<false, DEFORMED>(
269 0, nedgeN1, nedgeN1, nm0, nm1, nbasis, tnq10, tbasis, tw,
270 jac + joff1, wsp, in + off1, dst, isCollocated);
271 }
272 }
273
274 if (useD1)
275 {
276 // nm2 is one: the volume is a single eta_2 layer in 2D.
277 ScaleAddCollapsedFacKernel(nm0, nm1, 1u, true, false, twoOver1,
278 twoOver1, volwsp, out);
279 }
280}
NEK_DEVICE_INLINE void ScaleAddCollapsedFacKernel(const unsigned int ilane, const unsigned int nm0, const unsigned int nm1, const unsigned int nm2, const bool useD1, const bool useD2, const TData *NEK_RESTRICT twoOver1, const TData *NEK_RESTRICT twoOver2, const TData *NEK_RESTRICT volwsp, TData *NEK_RESTRICT out)
Scale a volume workspace by the collapsed factors a trace group still needs and accumulate it into th...

References in, jac, joff1, nedgeN1, nm0, nm1, numDataOut, off1, out, ScaleAddCollapsedFacKernel(), Nektar::LibUtilities::ShapeTypeNumTraceInDir, tnq00, tnq10, twoOver1, and wsp.

◆ IPWRTPhysNormalDerivTraceFaceGroupKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, unsigned FACE_NORMAL_DIR, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IPWRTPhysNormalDerivTraceFaceGroupKernel ( const bool  useD1,
const bool  useD2,
const unsigned  nm0,
const unsigned  nm1,
const unsigned  nm2,
const unsigned  tnq00,
const unsigned  tnq01,
const unsigned  tnq10,
const unsigned  tnq11,
const unsigned  tnq20,
const unsigned  tnq21,
const simd_type *  nbasis,
const simd_type *  tbasisA,
const simd_type *  tbasisB,
const simd_type *  twA,
const simd_type *  twB,
const simd_type *  twoOver1,
const simd_type *  twoOver2,
const simd_type *  jac,
const simd_type *  in,
simd_type *  wsp0,
simd_type *  wsp1,
simd_type *  volwsp,
simd_type *  out,
const bool  isCollocatedA,
const bool  isCollocatedB,
const bool  endPtsCollocated 
)
static

One face group of a term of the three-dimensional operator, accumulated into out.

FACE_NORMAL_DIR names the group: the element coordinate direction its faces are normal to. The groups are evaluated apart so each can drop the collapsed factors it does not need. Where a factor is wanted the group goes into volwsp first and is scaled there, on the element's own points, because the factor is singular at the collapsed apex, a quadrature point of the trace but never of the element.

Parameters
useD1,useD2The group carries \(2/(1 - \eta_1)\), \(2/(1 - \eta_2)\). Run-time flags so that one group body per size serves every direction term.
nm0,nm1,nm2Volume quadrature points per direction.
tnq00,tnq01Trace quadrature points of the direction-0 face; only the pair matching FACE_NORMAL_DIR is read.
tnq10,tnq11Trace quadrature points of the direction-1 face.
tnq20,tnq21Trace quadrature points of the direction-2 face.
nbasiseInterp table of this term's normal direction, already the derivative table when this group is the derivative term.
tbasisA,tbasisBeInterp tables to this group's trace points, one per tangential direction.
twA,twBTrace quadrature weights of this group's tangential directions.
twoOver1,twoOver2\(2/(1 - \eta_1)\), \(2/(1 - \eta_2)\) at the element's own points; unread unless the matching flag is set.
jacThis term's component of the factor array for the element group.
inPacked trace values of this element group.
wsp0,wsp1Trace-mode scratch, forwarded to the underlying face kernel.
volwspVolume-sized scratch that receives the group before scaling; written and read only when useD1 or useD2.
outAccumulates the group's contribution.
isCollocatedA,isCollocatedBTrace points of this group's tangential directions coincide with the volume points; forwarded to the underlying face kernel.
endPtsCollocatedVolume rule of this group's normal direction contains the domain endpoints; selects the endpoint-collocated arm of the underlying face kernel.

Definition at line 422 of file IProductWRTPhysNormalDerivTraceBlockOpSerialAVXSumFacKernels.hpp.

433{
434 const unsigned numDataOut = nm0 * nm1 * nm2;
435
436 // Face group offsets into the input and the factors, matching what
437 // the plain trace lift does internally. Only the group being
438 // instantiated reads its own offsets, so the others go unused.
439 [[maybe_unused]] constexpr unsigned nfaceN0 =
440 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][0];
441 [[maybe_unused]] constexpr unsigned nfaceN1 =
442 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][1];
443 [[maybe_unused]] constexpr unsigned nfaceN2 =
444 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][2];
445
446 [[maybe_unused]] const unsigned off1 = 2 * tnq00 * tnq01;
447 [[maybe_unused]] const unsigned joff1 = (DEFORMED) ? off1 : 2;
448 [[maybe_unused]] const unsigned dd2 = nfaceN1 * tnq10 * tnq11;
449 [[maybe_unused]] const unsigned off2 = off1 + dd2;
450 [[maybe_unused]] const unsigned joff2 =
451 joff1 + ((DEFORMED) ? dd2 : nfaceN1);
452
453 const bool scale = useD1 || useD2;
454 simd_type *dst = scale ? volwsp : out;
455 if (scale)
456 {
457 std::memset((void *)dst, 0, numDataOut * sizeof(simd_type));
458 }
459
460 if constexpr (FACE_NORMAL_DIR == 0)
461 {
462 if (endPtsCollocated)
463 {
464 IPWRTPhysTraceFaceN0Kernel<true, DEFORMED>(
465 0, nfaceN0, nfaceN0, nm0, nm1, nm2, nbasis, tnq00, tnq01,
466 tbasisA, tbasisB, twA, twB, jac, wsp0, wsp1, in, dst,
467 isCollocatedA, isCollocatedB);
468 }
469 else
470 {
471 IPWRTPhysTraceFaceN0Kernel<false, DEFORMED>(
472 0, nfaceN0, nfaceN0, nm0, nm1, nm2, nbasis, tnq00, tnq01,
473 tbasisA, tbasisB, twA, twB, jac, wsp0, wsp1, in, dst,
474 isCollocatedA, isCollocatedB);
475 }
476 }
477 else if constexpr (FACE_NORMAL_DIR == 1)
478 {
479 if (endPtsCollocated)
480 {
481 IPWRTPhysTraceFaceN1Kernel<true, DEFORMED>(
482 0, nfaceN1, nfaceN1, nm0, nm1, nm2, nbasis, tnq10, tnq11,
483 tbasisA, tbasisB, twA, twB, jac + joff1, wsp0, wsp1, in + off1,
484 dst, isCollocatedA, isCollocatedB);
485 }
486 else
487 {
488 IPWRTPhysTraceFaceN1Kernel<false, DEFORMED>(
489 0, nfaceN1, nfaceN1, nm0, nm1, nm2, nbasis, tnq10, tnq11,
490 tbasisA, tbasisB, twA, twB, jac + joff1, wsp0, wsp1, in + off1,
491 dst, isCollocatedA, isCollocatedB);
492 }
493 }
494 else
495 {
496 if (endPtsCollocated)
497 {
498 IPWRTPhysTraceFaceN2Kernel<true, DEFORMED>(
499 0, nfaceN2, nfaceN2, nm0, nm1, nm2, nbasis, tnq20, tnq21,
500 tbasisA, tbasisB, twA, twB, jac + joff2, wsp0, wsp1, in + off2,
501 dst, isCollocatedA, isCollocatedB);
502 }
503 else
504 {
505 IPWRTPhysTraceFaceN2Kernel<false, DEFORMED>(
506 0, nfaceN2, nfaceN2, nm0, nm1, nm2, nbasis, tnq20, tnq21,
507 tbasisA, tbasisB, twA, twB, jac + joff2, wsp0, wsp1, in + off2,
508 dst, isCollocatedA, isCollocatedB);
509 }
510 }
511
512 if (scale)
513 {
514 ScaleAddCollapsedFacKernel(nm0, nm1, nm2, useD1, useD2, twoOver1,
515 twoOver2, volwsp, out);
516 }
517}

References in, jac, joff1, nfaceN1, nfaceN2, nm0, nm1, nm2, numDataOut, off1, out, ScaleAddCollapsedFacKernel(), Nektar::LibUtilities::ShapeTypeNumTraceInDir, tnq00, tnq01, tnq10, tnq11, tnq20, tnq21, twoOver1, and twoOver2.

◆ IPWRTPhysNormalDerivTracePerDir2DKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IPWRTPhysNormalDerivTracePerDir2DKernel ( const unsigned  derivDir,
const unsigned  nm0,
const unsigned  nm1,
const unsigned  tnq00,
const unsigned  tnq10,
const simd_type *  nbasis0,
const simd_type *  nbasis1,
const simd_type *  dnbasis0,
const simd_type *  dnbasis1,
const simd_type *  tbasis0,
const simd_type *  tbasis1,
const simd_type *  dtbasis0,
const simd_type *  dtbasis1,
const simd_type *  tw0,
const simd_type *  tw1,
const simd_type *  twoOver1,
const simd_type *  jac,
const simd_type *  in,
simd_type *  wsp,
simd_type *  volwsp,
simd_type *  out,
const unsigned  traceDir0,
const unsigned  traceDir1,
const bool  append,
const bool  isCollocated0,
const bool  isCollocated1,
const bool  endPtsCollocated0,
const bool  endPtsCollocated1 
)
static

Term derivDir of the two-dimensional operator: the trace inner product taken with the direction derivDir table replaced by its derivative.

The edge groups are evaluated apart so the group normal to the collapsed direction can drop its factor. A collapsed direction has exactly one trace and it always sits at \(\eta_1 = -1\), where \(2/(1 - \eta_1)\) is one, so group 1 never scales. Splitting rather than scaling the combined result means this does not rely on that edge depositing on the \(\eta_1 = -1\) row, so the element is free to carry a direction 1 quadrature with no end point, and the trace any quadrature at all.

Parameters
derivDirElement direction whose table is the derivative.
nm0,nm1Volume quadrature points per direction.
tnq00,tnq10Trace quadrature points of the direction-0 and direction-1 edges.
nbasis0,nbasis1eInterp tables \(h_p(\pm 1)\) per direction.
dnbasis0,dnbasis1Derivatives of nbasis0, nbasis1.
tbasis0,tbasis1eInterp tables to the trace points, per direction.
dtbasis0,dtbasis1Derivatives of tbasis0, tbasis1.
tw0,tw1Trace quadrature weights per direction.
twoOver1\(2/(1 - \eta_1)\) at the element's own points; unread unless direction 1 is collapsed and is not derivDir.
jacThis term's component of the factor array for the element group.
inPacked trace values of this element group.
wspTrace-mode scratch, forwarded to the edge groups.
volwspVolume-sized scratch, forwarded to the edge groups.
outAccumulates the term's contribution.
traceDir0,traceDir1Element direction each trace slot runs along.
appendAccumulate onto out instead of zeroing it first.
isCollocated0,isCollocated1Trace points of the direction-0 and direction-1 edges coincide with the volume points.
endPtsCollocated0,endPtsCollocated1Volume rule of direction 0 and direction 1 contains the domain endpoints.

Definition at line 327 of file IProductWRTPhysNormalDerivTraceBlockOpSerialAVXSumFacKernels.hpp.

339{
340 const bool c1 = CompNeedsCollapsedFac(SHAPE_TYPE, derivDir, 1);
341
342 if (!append)
343 {
344 std::memset((void *)out, 0, nm0 * nm1 * sizeof(simd_type));
345 }
346
347 // Term derivDir picks the derivative table wherever a slot's element
348 // direction is derivDir. A derivative slot is never collocated, and a
349 // direction never has its own end points collocated for its own term.
350 const simd_type *nb0 = (0 == derivDir) ? dnbasis0 : nbasis0;
351 const simd_type *nb1 = (1 == derivDir) ? dnbasis1 : nbasis1;
352 const simd_type *tb0 = (traceDir0 == derivDir) ? dtbasis0 : tbasis0;
353 const simd_type *tb1 = (traceDir1 == derivDir) ? dtbasis1 : tbasis1;
354 const bool cd0 = (traceDir0 == derivDir) ? false : isCollocated0;
355 const bool cd1 = (traceDir1 == derivDir) ? false : isCollocated1;
356 const bool epd0 = (0 == derivDir) ? false : endPtsCollocated0;
357 const bool epd1 = (1 == derivDir) ? false : endPtsCollocated1;
358
359 // The groups are written out so that each keeps its constant normal
360 // direction; the term is a run-time index, so this body is
361 // instantiated once per size and serves every term.
362 IPWRTPhysNormalDerivTraceEdgeGroupKernel<SHAPE_TYPE, DEFORMED, 0>(
363 c1, nm0, nm1, tnq00, tnq10, nb0, tb0, tw0, twoOver1, jac, in, wsp,
364 volwsp, out, cd0, epd0);
365 IPWRTPhysNormalDerivTraceEdgeGroupKernel<SHAPE_TYPE, DEFORMED, 1>(
366 false, nm0, nm1, tnq00, tnq10, nb1, tb1, tw1, twoOver1, jac, in, wsp,
367 volwsp, out, cd1, epd1);
368}
constexpr bool CompNeedsCollapsedFac(LibUtilities::ShapeType shape, unsigned d, unsigned dir)
Whether component d of the trace normal derivative factors, which multiplies , needs the factor of c...

References append, CompNeedsCollapsedFac(), dnbasis0, dnbasis1, dtbasis0, dtbasis1, endPtsCollocated0, in, jac, nbasis0, nbasis1, nm0, nm1, out, tbasis0, tbasis1, tnq00, tnq10, traceDir0, traceDir1, tw0, tw1, twoOver1, and wsp.

◆ IPWRTPhysNormalDerivTracePerDir3DKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IPWRTPhysNormalDerivTracePerDir3DKernel ( const unsigned  derivDir,
const unsigned  nm0,
const unsigned  nm1,
const unsigned  nm2,
const unsigned  tnq00,
const unsigned  tnq01,
const unsigned  tnq10,
const unsigned  tnq11,
const unsigned  tnq20,
const unsigned  tnq21,
const simd_type *  nbasis0,
const simd_type *  nbasis1,
const simd_type *  nbasis2,
const simd_type *  dnbasis0,
const simd_type *  dnbasis1,
const simd_type *  dnbasis2,
const simd_type *  tbasis00,
const simd_type *  tbasis01,
const simd_type *  tbasis10,
const simd_type *  tbasis11,
const simd_type *  tbasis20,
const simd_type *  tbasis21,
const simd_type *  dtbasis00,
const simd_type *  dtbasis01,
const simd_type *  dtbasis10,
const simd_type *  dtbasis11,
const simd_type *  dtbasis20,
const simd_type *  dtbasis21,
const simd_type *  tw00,
const simd_type *  tw01,
const simd_type *  tw10,
const simd_type *  tw11,
const simd_type *  tw20,
const simd_type *  tw21,
const simd_type *  twoOver1,
const simd_type *  twoOver2,
const simd_type *  jac,
const simd_type *  in,
simd_type *  wsp0,
simd_type *  wsp1,
simd_type *  volwsp,
simd_type *  out,
const unsigned  traceDir00,
const unsigned  traceDir01,
const unsigned  traceDir10,
const unsigned  traceDir11,
const unsigned  traceDir20,
const unsigned  traceDir21,
const bool  append,
const bool  isCollocated00,
const bool  isCollocated01,
const bool  isCollocated10,
const bool  isCollocated11,
const bool  isCollocated20,
const bool  isCollocated21,
const bool  endPtsCollocated0,
const bool  endPtsCollocated1,
const bool  endPtsCollocated2 
)
static

Term derivDir of the three-dimensional operator: the trace inner product taken with the direction derivDir table replaced by its derivative.

A face group normal to a collapsed direction sits at \(\eta = -1\), where that direction's factor is one, so group k drops the direction k factor. That is a property of the shape, not of the quadrature, so it does not lean on the end points being collocated. With no collapsed direction nothing is scaled and this is the plain trace lift written out one group at a time.

Parameters
derivDirElement direction whose table is the derivative.
nm0,nm1,nm2Volume quadrature points per direction.
tnq00,tnq01Trace quadrature points of the direction-0 face.
tnq10,tnq11Trace quadrature points of the direction-1 face.
tnq20,tnq21Trace quadrature points of the direction-2 face.
nbasis0,nbasis1,nbasis2eInterp tables \(h_p(\pm 1)\) per direction.
dnbasis0,dnbasis1,dnbasis2Derivatives of nbasis0, nbasis1, nbasis2.
tbasis00,tbasis01,tbasis10,tbasis11,tbasis20,tbasis21eInterp tables to the trace points, per normal direction and tangential direction.
dtbasis00,dtbasis01,dtbasis10,dtbasis11,dtbasis20,dtbasis21Derivatives of tbasis00, tbasis01, tbasis10, tbasis11, tbasis20, tbasis21.
tw00,tw01,tw10,tw11,tw20,tw21Trace quadrature weights in the same order as tbasis00 to tbasis21.
twoOver1,twoOver2\(2/(1 - \eta_1)\), \(2/(1 - \eta_2)\) at the element's own points; unread on a direction the shape does not collapse.
jacThis term's component of the factor array for the element group.
inPacked trace values of this element group.
wsp0Trace-mode workspace, two faces' worth.
wsp1Scratch for the fully general face contraction.
volwspVolume-sized scratch for the collapsed factor scaling; unread on a hexahedron.
outAccumulates the term's contribution.
traceDir00,traceDir01,traceDir10,traceDir11,traceDir20,traceDir21Element direction each trace slot runs along.
appendAccumulate onto out instead of zeroing it first.
isCollocated00,isCollocated01Trace points of the direction-0 face's tangential directions coincide with the volume points.
isCollocated10,isCollocated11The same for direction 1.
isCollocated20,isCollocated21The same for direction 2.
endPtsCollocated0,endPtsCollocated1,endPtsCollocated2Volume rule of each direction contains the domain endpoints.

Definition at line 576 of file IProductWRTPhysNormalDerivTraceBlockOpSerialAVXSumFacKernels.hpp.

601{
602 const bool c1 = CompNeedsCollapsedFac(SHAPE_TYPE, derivDir, 1);
603 const bool c2 = CompNeedsCollapsedFac(SHAPE_TYPE, derivDir, 2);
604
605 if (!append)
606 {
607 std::memset((void *)out, 0, nm0 * nm1 * nm2 * sizeof(simd_type));
608 }
609
610 // Term derivDir picks the derivative table wherever a slot's element
611 // direction is derivDir. A derivative slot is never collocated, and a
612 // direction never has its own end points collocated for its own term.
613 const simd_type *nb0 = (0 == derivDir) ? dnbasis0 : nbasis0;
614 const simd_type *nb1 = (1 == derivDir) ? dnbasis1 : nbasis1;
615 const simd_type *nb2 = (2 == derivDir) ? dnbasis2 : nbasis2;
616 const simd_type *tb00 = (traceDir00 == derivDir) ? dtbasis00 : tbasis00;
617 const simd_type *tb01 = (traceDir01 == derivDir) ? dtbasis01 : tbasis01;
618 const simd_type *tb10 = (traceDir10 == derivDir) ? dtbasis10 : tbasis10;
619 const simd_type *tb11 = (traceDir11 == derivDir) ? dtbasis11 : tbasis11;
620 const simd_type *tb20 = (traceDir20 == derivDir) ? dtbasis20 : tbasis20;
621 const simd_type *tb21 = (traceDir21 == derivDir) ? dtbasis21 : tbasis21;
622 const bool cd00 = (traceDir00 == derivDir) ? false : isCollocated00;
623 const bool cd01 = (traceDir01 == derivDir) ? false : isCollocated01;
624 const bool cd10 = (traceDir10 == derivDir) ? false : isCollocated10;
625 const bool cd11 = (traceDir11 == derivDir) ? false : isCollocated11;
626 const bool cd20 = (traceDir20 == derivDir) ? false : isCollocated20;
627 const bool cd21 = (traceDir21 == derivDir) ? false : isCollocated21;
628 const bool epd0 = (0 == derivDir) ? false : endPtsCollocated0;
629 const bool epd1 = (1 == derivDir) ? false : endPtsCollocated1;
630 const bool epd2 = (2 == derivDir) ? false : endPtsCollocated2;
631
632 // The groups are written out so that each keeps its constant normal
633 // direction; the term is a run-time index, so this body is
634 // instantiated once per size and serves every term.
635 IPWRTPhysNormalDerivTraceFaceGroupKernel<SHAPE_TYPE, DEFORMED, 0>(
636 c1, c2, nm0, nm1, nm2, tnq00, tnq01, tnq10, tnq11, tnq20, tnq21, nb0,
637 tb00, tb01, tw00, tw01, twoOver1, twoOver2, jac, in, wsp0, wsp1, volwsp,
638 out, cd00, cd01, epd0);
639 IPWRTPhysNormalDerivTraceFaceGroupKernel<SHAPE_TYPE, DEFORMED, 1>(
640 false, c2, nm0, nm1, nm2, tnq00, tnq01, tnq10, tnq11, tnq20, tnq21, nb1,
641 tb10, tb11, tw10, tw11, twoOver1, twoOver2, jac, in, wsp0, wsp1, volwsp,
642 out, cd10, cd11, epd1);
643 IPWRTPhysNormalDerivTraceFaceGroupKernel<SHAPE_TYPE, DEFORMED, 2>(
644 c1, false, nm0, nm1, nm2, tnq00, tnq01, tnq10, tnq11, tnq20, tnq21, nb2,
645 tb20, tb21, tw20, tw21, twoOver1, twoOver2, jac, in, wsp0, wsp1, volwsp,
646 out, cd20, cd21, epd2);
647}

References append, CompNeedsCollapsedFac(), dnbasis0, dnbasis1, dnbasis2, dtbasis00, dtbasis01, dtbasis10, dtbasis11, dtbasis20, dtbasis21, endPtsCollocated0, in, jac, nbasis0, nbasis1, nbasis2, nm0, nm1, nm2, out, tbasis00, tbasis01, tbasis10, tbasis11, tbasis20, tbasis21, tnq00, tnq01, tnq10, tnq11, tnq20, tnq21, traceDir00, traceDir01, traceDir10, traceDir11, traceDir20, traceDir21, tw00, tw01, tw10, tw11, tw20, tw21, twoOver1, and twoOver2.

◆ IPWRTPhysTraceEdgeN0Kernel()

template<bool END_PTS_COLLOCATED0, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IPWRTPhysTraceEdgeN0Kernel ( const unsigned  edg,
const unsigned  nedge,
const unsigned  tstride,
const unsigned  nm0,
const unsigned  nm1,
const simd_type *  nbasis,
const unsigned  tnq,
const simd_type *  tbasis,
const simd_type *  tw,
const simd_type *  tjac,
simd_type *  wsp,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated 
)
static

Glue for a direction-0 normal edge: integrate, then lift.

Routes the direction's tables and counts into the two leaf stages. The in-edge direction of a direction-0 normal is direction 1, so the integration produces nm1 entries per edge into wsp, which the lift then spreads along direction 0.

Template Parameters
END_PTS_COLLOCATED0Direction-0 volume rule contains the domain endpoints.
DEFORMEDTrace Jacobian varies point by point.
simd_typeSIMD vector type carrying one element per lane.
Parameters
edgPosition of the first edge within direction 0.
nedgeOne past the position of the last edge.
tstrideRow stride of nbasis, that is the number of traces direction 0 has.
nm0Volume quadrature points in direction 0.
nm1Volume quadrature points in direction 1.
nbasiseInterp table \(h_i(\pm 1)\) of direction 0.
tnqTrace quadrature points of the edge.
tbasiseInterp table to the trace points of direction 0.
twTrace quadrature weights of direction 0.
tjacTrace Jacobian of this element group.
wspTrace-mode scratch, at least nm1 entries per edge covered.
inPacked trace values of the edges covered.
outVolume field of this element group, accumulated onto.
isCollocatedTrace points coincide with the volume points.

Definition at line 513 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

519{
520 IPWRTPhysEdgeKernel<DEFORMED>(edg, nedge, nm1, tnq, tbasis, tw, tjac, in,
521 wsp, isCollocated);
522
523 AddEdgeN0ToVolKernel<END_PTS_COLLOCATED0>(edg, nedge, tstride, nm0, nm1,
524 nbasis, wsp, out);
525}

References in, nm0, nm1, out, and wsp.

◆ IPWRTPhysTraceEdgeN1Kernel()

template<bool END_PTS_COLLOCATED0, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IPWRTPhysTraceEdgeN1Kernel ( const unsigned  edg,
const unsigned  nedge,
const unsigned  tstride,
const unsigned  nm0,
const unsigned  nm1,
const simd_type *  nbasis,
const unsigned  tnq,
const simd_type *  tbasis,
const simd_type *  tw,
const simd_type *  tjac,
simd_type *  wsp,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated 
)
static

Glue for a direction-1 normal edge: integrate, then lift.

The twin of IPWRTPhysTraceEdgeN0Kernel one direction over. The in-edge direction is now direction 0, so the integration produces nm0 entries per edge into wsp and the lift spreads them along direction 1.

Template Parameters
END_PTS_COLLOCATED0Direction-1 volume rule contains the domain endpoints, despite the name.
DEFORMEDTrace Jacobian varies point by point.
simd_typeSIMD vector type carrying one element per lane.
Parameters
edgPosition of the first edge within direction 1.
nedgeOne past the position of the last edge.
tstrideRow stride of nbasis, that is the number of traces direction 1 has.
nm0Volume quadrature points in direction 0.
nm1Volume quadrature points in direction 1.
nbasiseInterp table \(h_q(\pm 1)\) of direction 1.
tnqTrace quadrature points of the edge.
tbasiseInterp table to the trace points of direction 1.
twTrace quadrature weights of direction 1.
tjacTrace Jacobian of this element group.
wspTrace-mode scratch, at least nm0 entries per edge covered.
inPacked trace values of the edges covered.
outVolume field of this element group, accumulated onto.
isCollocatedTrace points coincide with the volume points.

Definition at line 560 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

566{
567 IPWRTPhysEdgeKernel<DEFORMED>(edg, nedge, nm0, tnq, tbasis, tw, tjac, in,
568 wsp, isCollocated);
569
570 AddEdgeN1ToVolKernel<END_PTS_COLLOCATED0>(edg, nedge, tstride, nm0, nm1,
571 nbasis, wsp, out);
572}

References in, nm0, nm1, out, and wsp.

◆ IPWRTPhysTraceFaceN0Kernel()

template<bool END_PTS_COLLOCATED0, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IPWRTPhysTraceFaceN0Kernel ( const unsigned  fac,
const unsigned  nface,
const unsigned  tstride,
const unsigned  nm0,
const unsigned  nm1,
const unsigned  nm2,
const simd_type *  nbasis,
const unsigned  tnq0,
const unsigned  tnq1,
const simd_type *  tbasis0,
const simd_type *  tbasis1,
const simd_type *  tw0,
const simd_type *  tw1,
const simd_type *  tjac,
simd_type *  wsp,
simd_type *  wsp1,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated0 = false,
const bool  isCollocated1 = false 
)
static

Glue for a direction-0 normal face: integrate, then lift.

Routes the direction's tables and counts into the two leaf stages. The in-face directions of an \(N_0\) face are 1 and 2, so the face integration is asked for (nm1, nm2) entries per face and the lift spreads them along direction 0. Note the workspace swap: wsp1 is handed to the integration as its scratch and wsp receives the trace-mode result.

Template Parameters
END_PTS_COLLOCATED0Direction-0 volume rule contains the domain endpoints.
DEFORMEDTrace Jacobian varies point by point.
simd_typeSIMD vector type carrying one element per lane.
Parameters
facPosition of the first face within direction 0.
nfaceOne past the position of the last face.
tstrideRow stride of nbasis, that is the number of traces direction 0 has.
nm0,nm1,nm2Volume quadrature points per direction.
nbasiseInterp table \(h_p(\pm 1)\) of direction 0.
tnq0,tnq1Trace quadrature points of the two in-face directions.
tbasis0,tbasis1eInterp tables to those trace points.
tw0,tw1Trace quadrature weights of the in-face directions.
tjacTrace Jacobian of this element group.
wspTrace-mode workspace, nm1 * nm2 entries per face covered.
wsp1Scratch for the fully general face contraction.
inPacked trace values of the faces covered.
outVolume field of this element group, accumulated onto.
isCollocated0First in-face direction is collocated.
isCollocated1Second in-face direction is collocated.

Definition at line 1255 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

1263{
1264 IPWRTPhysFaceKernel<DEFORMED>(fac, nface, nm1, nm2, tnq0, tnq1, tbasis0,
1265 tbasis1, tw0, tw1, tjac, wsp1, in, wsp,
1266 isCollocated0, isCollocated1);
1267
1268 AddFaceN0ToVolKernel<END_PTS_COLLOCATED0>(fac, nface, tstride, nm0, nm1,
1269 nm2, nbasis, wsp, out);
1270}

References in, nm0, nm1, nm2, out, tbasis0, tbasis1, tw0, tw1, and wsp.

◆ IPWRTPhysTraceFaceN1Kernel()

template<bool END_PTS_COLLOCATED1, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IPWRTPhysTraceFaceN1Kernel ( const unsigned  fac,
const unsigned  nface,
const unsigned  tstride,
const unsigned  nm0,
const unsigned  nm1,
const unsigned  nm2,
const simd_type *  nbasis,
const unsigned  tnq0,
const unsigned  tnq1,
const simd_type *  tbasis0,
const simd_type *  tbasis1,
const simd_type *  tw0,
const simd_type *  tw1,
const simd_type *  tjac,
simd_type *  wsp,
simd_type *  wsp1,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated0 = false,
const bool  isCollocated1 = false 
)
static

Glue for a direction-1 normal face: integrate, then lift.

The in-face directions of an \(N_1\) face are 0 and 2, so the face integration is asked for (nm0, nm2) entries per face and the lift spreads them along direction 1.

Template Parameters
END_PTS_COLLOCATED1Direction-1 volume rule contains the domain endpoints.
DEFORMEDTrace Jacobian varies point by point.
simd_typeSIMD vector type carrying one element per lane.
Parameters
facPosition of the first face within direction 1.
nfaceOne past the position of the last face.
tstrideRow stride of nbasis, that is the number of traces direction 1 has.
nm0,nm1,nm2Volume quadrature points per direction.
nbasiseInterp table \(h_q(\pm 1)\) of direction 1.
tnq0,tnq1Trace quadrature points of the two in-face directions.
tbasis0,tbasis1eInterp tables to those trace points.
tw0,tw1Trace quadrature weights of the in-face directions.
tjacTrace Jacobian of this element group.
wspTrace-mode workspace, nm0 * nm2 entries per face covered.
wsp1Scratch for the fully general face contraction.
inPacked trace values of the faces covered.
outVolume field of this element group, accumulated onto.
isCollocated0First in-face direction is collocated.
isCollocated1Second in-face direction is collocated.

Definition at line 1307 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

1315{
1316 IPWRTPhysFaceKernel<DEFORMED>(fac, nface, nm0, nm2, tnq0, tnq1, tbasis0,
1317 tbasis1, tw0, tw1, tjac, wsp1, in, wsp,
1318 isCollocated0, isCollocated1);
1319
1320 AddFaceN1ToVolKernel<END_PTS_COLLOCATED1>(fac, nface, tstride, nm0, nm1,
1321 nm2, nbasis, wsp, out);
1322}

References in, nm0, nm1, nm2, out, tbasis0, tbasis1, tw0, tw1, and wsp.

◆ IPWRTPhysTraceFaceN2Kernel()

template<bool END_PTS_COLLOCATED2, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::IPWRTPhysTraceFaceN2Kernel ( const unsigned  fac,
const unsigned  nface,
const unsigned  tstride,
const unsigned  nm0,
const unsigned  nm1,
const unsigned  nm2,
const simd_type *  nbasis,
const unsigned  tnq0,
const unsigned  tnq1,
const simd_type *  tbasis0,
const simd_type *  tbasis1,
const simd_type *  tw0,
const simd_type *  tw1,
const simd_type *  tjac,
simd_type *  wsp,
simd_type *  wsp1,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated0 = false,
const bool  isCollocated1 = false 
)
static

Glue for a direction-2 normal face: integrate, then lift.

The in-face directions of an \(N_2\) face are 0 and 1, so the face integration is asked for (nm0, nm1) entries per face and the lift spreads them along direction 2.

Template Parameters
END_PTS_COLLOCATED2Direction-2 volume rule contains the domain endpoints.
DEFORMEDTrace Jacobian varies point by point.
simd_typeSIMD vector type carrying one element per lane.
Parameters
facPosition of the first face within direction 2.
nfaceOne past the position of the last face.
tstrideRow stride of nbasis, that is the number of traces direction 2 has.
nm0,nm1,nm2Volume quadrature points per direction.
nbasiseInterp table \(h_r(\pm 1)\) of direction 2.
tnq0,tnq1Trace quadrature points of the two in-face directions.
tbasis0,tbasis1eInterp tables to those trace points.
tw0,tw1Trace quadrature weights of the in-face directions.
tjacTrace Jacobian of this element group.
wspTrace-mode workspace, nm0 * nm1 entries per face covered.
wsp1Scratch for the fully general face contraction.
inPacked trace values of the faces covered.
outVolume field of this element group, accumulated onto.
isCollocated0First in-face direction is collocated.
isCollocated1Second in-face direction is collocated.

Definition at line 1359 of file IProductWRTPhysTraceBlockOpSerialAVXSumFacKernels.hpp.

1367{
1368 IPWRTPhysFaceKernel<DEFORMED>(fac, nface, nm0, nm1, tnq0, tnq1, tbasis0,
1369 tbasis1, tw0, tw1, tjac, wsp1, in, wsp,
1370 isCollocated0, isCollocated1);
1371
1372 AddFaceN2ToVolKernel<END_PTS_COLLOCATED2>(fac, nface, tstride, nm0, nm1,
1373 nm2, nbasis, wsp, out);
1374}

References in, nm0, nm1, nm2, out, tbasis0, tbasis1, tw0, tw1, and wsp.

◆ IsCollapsedDir()

constexpr bool Nektar::MultiRegions::detail::IsCollapsedDir ( LibUtilities::ShapeType  shape,
unsigned  dir 
)
constexpr

Directions in which a shape is collapsed: those whose chain rule from the element local coordinate to the collapsed one carries a \(2/(1 - \eta)\) factor. Direction 0 is never collapsed.

The collapsed directions always use a Gauss-Radau distribution that excludes \(\eta = +1\), so \(2/(1 - \eta)\) is finite at the element's own points. It is not finite at the trace's points, which is why the factor is applied to the volume result rather than folded into the trace data.

Definition at line 64 of file IProductWRTPhysNormalDerivTraceBlockOp.hpp.

65{
66 switch (shape)
67 {
68 case LibUtilities::Tri:
69 case LibUtilities::NodalTri:
70 return dir == 1;
71 case LibUtilities::Tet:
72 case LibUtilities::NodalTet:
73 return dir == 1 || dir == 2;
74 case LibUtilities::Prism:
75 case LibUtilities::NodalPrism:
76 case LibUtilities::Pyr:
77 case LibUtilities::NodalPyr:
78 return dir == 2;
79 default:
80 return false;
81 }
82}

References Nektar::LibUtilities::NodalPrism, Nektar::LibUtilities::NodalPyr, Nektar::LibUtilities::NodalTet, Nektar::LibUtilities::NodalTri, Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, Nektar::LibUtilities::Tet, and Nektar::LibUtilities::Tri.

Referenced by CompNeedsCollapsedFac(), Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceBlockOpImpl< ExecSpace, Implementation, TData >::IProductWRTPhysNormalDerivTraceBlockOpImpl(), IProductWRTPhysNormalDerivTraceWorkSpaceSize(), and IProductWRTPhysNormalDerivTraceWorkSpaceSize().

◆ IsDeviceExpression()

bool Nektar::MultiRegions::detail::IsDeviceExpression ( const std::set< std::string > &  variables,
const std::set< std::string > &  functions,
const unsigned int  coordDim 
)
inline

Whether the expression kernel can be compiled for an expression using variables and calling functions (see ExpressionBlockOp::GetExpressionVariables() and ExpressionBlockOp::GetExpressionFunctions()).

The expression is pasted into the kernel source, so a function only the host interpreter defines, or a coordinate beyond the coordDim the kernel declares, would fail to compile.

Definition at line 376 of file ExpressionBlockOpDeviceGenericHelper.hpp.

379{
380 static const std::set<std::string> hostOnly = {"awgn", "bessel"};
381
382 for (const auto &function : functions)
383 {
384 if (hostOnly.count(function))
385 {
386 return false;
387 }
388 }
389 return !(variables.count("y") && coordDim < 2) &&
390 !(variables.count("z") && coordDim < 3);
391}

Referenced by Nektar::MultiRegions::detail::ExpressionBlockOpImpl< ExecSpace, Implementation, TData >::v_IsAvailable().

◆ JacobianDerivFactorKernel()

template<typename ExecSpace , bool DEFORMED, typename TData >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::JacobianDerivFactorKernel ( const unsigned int  nqTot,
const unsigned int  ncoord,
const unsigned int  dimension,
const size_t  nelmt,
const size_t  inoffset,
const size_t  outsize,
const TData *  jacptr,
const TData *  dfptr,
const TData *  inptr,
TData *  outptr,
const TData  scale 
)
static

Multiply the input vector by the derivative factors and the Jacobian, without the quadrature weights (Coeff output path).

Template Parameters
ExecSpaceExecution space of the calling implementation (Serial or AVX); unused in the body.
DEFORMEDTrue when the geometric factors vary within an element.
TDataSIMD vector type of one interleaved element group.
Parameters
nqTotQuadrature points per element.
ncoordCoordinate dimension: number of input components read.
dimensionReference dimension: number of output fields written.
nelmtElement groups processed by this call (the block implementation passes 1).
inoffsetStride, in vectors, between the input's coordinate components.
outsizeStride, in vectors, between the output fields of successive reference directions.
jacptrJacobians of the group.
dfptrDerivative factors of the group.
inptrInput vector \({\bf f}\); component k starts at inptr + k * inoffset.
outptrReceives the dimension fields \(g_d\), field d starting at outptr + d * outsize.
scaleFactor applied to every value written.

Definition at line 100 of file IProductWRTDerivBaseBlockOpSerialAVXStdMatKernels.hpp.

105{
106 const auto ndf = ncoord * dimension;
107 const auto nsize = nqTot * nelmt;
108
109 TData tmp[3];
110 if constexpr (DEFORMED)
111 {
112 for (size_t idx = 0; idx < nsize; idx++)
113 {
114 for (unsigned int d = 0; d < dimension; d++)
115 {
116 tmp[d] = dfptr[ndf * idx + d] * inptr[idx];
117 for (unsigned int k = 1; k < ncoord; ++k)
118 {
119 tmp[d].fma(dfptr[ndf * idx + k * dimension + d],
120 inptr[k * inoffset + idx]);
121 }
122 }
123 for (unsigned int d = 0; d < dimension; d++)
124 {
125 outptr[d * outsize + idx] = scale * tmp[d] * jacptr[idx];
126 }
127 }
128 }
129 else
130 {
131 for (size_t e = 0; e < nelmt; e++)
132 {
133 for (unsigned int i = 0; i < nqTot; i++)
134 {
135 for (unsigned int d = 0; d < dimension; d++)
136 {
137 tmp[d] = dfptr[ndf * e + d] * inptr[nqTot * e + i];
138 for (unsigned int k = 1; k < ncoord; ++k)
139 {
140 tmp[d].fma(dfptr[ndf * e + k * dimension + d],
141 inptr[nqTot * e + i + k * inoffset]);
142 }
143 }
144 for (unsigned int d = 0; d < dimension; d++)
145 {
146 outptr[d * outsize + nqTot * e + i] =
147 scale * tmp[d] * jacptr[e];
148 }
149 }
150 }
151 }
152}

References e, and nelmt.

◆ JacobianDerivFactorWeightsKernel()

template<typename ExecSpace , bool DEFORMED, typename TData >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::JacobianDerivFactorWeightsKernel ( const unsigned int  nqTot,
const unsigned int  ncoord,
const unsigned int  dimension,
const size_t  nelmt,
const size_t  inoffset,
const size_t  outsize,
const TData *  jacptr,
const TData *  dfptr,
const TData *  weights,
const TData *  inptr,
TData *  outptr,
const TData  scale 
)
static

Multiply the input vector by the derivative factors, the Jacobian and the quadrature weights (Phys output path).

Identical to JacobianDerivFactorKernel except that each value is additionally weighted by weights, the element's quadrature weight at that point. The Phys path needs this because its standard-region matrix (ePhysDerivStdMat) carries no weights.

Template Parameters
ExecSpaceExecution space of the calling implementation (Serial or AVX); unused in the body.
DEFORMEDTrue when the geometric factors vary within an element.
TDataSIMD vector type of one interleaved element group.
Parameters
nqTotQuadrature points per element.
ncoordCoordinate dimension: number of input components read.
dimensionReference dimension: number of output fields written.
nelmtElement groups processed by this call.
inoffsetStride, in vectors, between the input's coordinate components.
outsizeStride, in vectors, between the output fields of successive reference directions.
jacptrJacobians of the group.
dfptrDerivative factors of the group.
weightsQuadrature weight per point of the element.
inptrInput vector \({\bf f}\).
outptrReceives the dimension weighted fields.
scaleFactor applied to every value written.

Definition at line 187 of file IProductWRTDerivBaseBlockOpSerialAVXStdMatKernels.hpp.

192{
193 const auto ndf = ncoord * dimension;
194
195 TData tmp[3];
196 if constexpr (DEFORMED)
197 {
198 for (size_t e = 0; e < nelmt; e++)
199 {
200 for (unsigned i = 0; i < nqTot; i++)
201 {
202 size_t idx = e * nqTot + i;
203
204 auto wj = jacptr[idx] * weights[i];
205
206 for (unsigned int d = 0; d < dimension; d++)
207 {
208 tmp[d] = dfptr[ndf * idx + d] * inptr[idx];
209 for (unsigned int k = 1; k < ncoord; ++k)
210 {
211 tmp[d].fma(dfptr[ndf * idx + k * dimension + d],
212 inptr[k * inoffset + idx]);
213 }
214 }
215 for (unsigned int d = 0; d < dimension; d++)
216 {
217 outptr[d * outsize + idx] = scale * tmp[d] * wj;
218 }
219 }
220 }
221 }
222 else
223 {
224 for (size_t e = 0; e < nelmt; e++)
225 {
226 for (unsigned i = 0; i < nqTot; i++)
227 {
228 auto wj = jacptr[e] * weights[i];
229
230 for (unsigned d = 0; d < dimension; d++)
231 {
232 tmp[d] = dfptr[ndf * e + d] * inptr[nqTot * e + i];
233 for (unsigned k = 1; k < ncoord; ++k)
234 {
235 tmp[d].fma(dfptr[ndf * e + k * dimension + d],
236 inptr[nqTot * e + i + k * inoffset]);
237 }
238 }
239 for (unsigned d = 0; d < dimension; d++)
240 {
241 outptr[d * outsize + nqTot * e + i] = scale * tmp[d] * wj;
242 }
243 }
244 }
245 }
246}

References e, and nelmt.

◆ LaplacianKernelLauncher() [1/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::LaplacianKernelLauncher ( const TSizeParameter1D  sizeParam1D,
const bool  isModified,
const unsigned int  ncoord,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  w0,
const simd_type *  NtoM,
const simd_type *  NtoMTrans,
const simd_type *  jac,
const simd_type *  df,
simd_type *  deriv0,
simd_type *  bwd,
const simd_type *  in,
simd_type *  out 
)
static

1D launcher stringing together the five sum-factorised stages for one element group.

Definition at line 1832 of file LaplacianBlockOpSerialAVXSumFacKernels.hpp.

1842{
1843 static_assert(IsSizeParameter1D_v<TSizeParameter1D>,
1844 "Template argument must be either of type "
1845 "NonTemplatedSizeParameter1D or TemplatedSizeParameter1D.");
1846
1847 const unsigned int nq0 = sizeParam1D.nq0();
1848
1849 // Step 1: BwdTrans.
1850 BwdTransKernelLauncher<SHAPE_TYPE, false>(sizeParam1D, isModified, basis0,
1851 NtoM, in, bwd);
1852
1853 // Step 2: Get tensor derivatives.
1854 PhysDerivTensor1DKernel(nq0, bwd, D0, deriv0);
1855
1856 // Step 3: Apply diffusion coeff and WJ.
1857 DiffusionCoeffwithWJ1DKernel<SHAPE_TYPE, true, DEFORMED, VARCOEFF>(
1858 ncoord, nq0, useDiffCoeff, diffCoeff, varDiffCoeff, varDiffCoeffSize,
1859 jac, w0, df, deriv0);
1860
1861 // Step 4: Apply derivative and sum up.
1862 SumDerivTensor1DKernel<false>(nq0, deriv0, D0, bwd);
1863
1864 // Step 5: Inner product without WJ.
1865 IProductWRTBaseKernelLauncher<SHAPE_TYPE, false, false>(
1866 sizeParam1D, isModified, bwd, basis0, NtoMTrans, out);
1867}

References in, jac, out, and PhysDerivTensor1DKernel().

Referenced by Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl().

◆ LaplacianKernelLauncher() [2/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::LaplacianKernelLauncher ( const TSizeParameter2D  sizeParam2D,
const bool  isModified,
const unsigned int  ncoord,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  basis1,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  NtoM,
const simd_type *  NtoMTrans,
const simd_type *  jac,
const simd_type *  df,
simd_type *  wsp0,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  bwd,
const simd_type *  in,
simd_type *  out 
)
static

2D launcher stringing together the five sum-factorised stages for one element group.

Definition at line 1875 of file LaplacianBlockOpSerialAVXSumFacKernels.hpp.

1890{
1891 static_assert(IsSizeParameter2D_v<TSizeParameter2D>,
1892 "Template argument must be either of type "
1893 "NonTemplatedSizeParameter2D or TemplatedSizeParameter2D.");
1894
1895 const unsigned int nq0 = sizeParam2D.nq0();
1896 const unsigned int nq1 = sizeParam2D.nq1();
1897
1898 // Step 1: BwdTrans.
1899 BwdTransKernelLauncher<SHAPE_TYPE, false>(sizeParam2D, isModified, basis0,
1900 basis1, NtoM, wsp0, in, bwd);
1901
1902 // Step 2: Get tensor derivatives.
1903 PhysDerivTensor2DKernel(nq0, nq1, bwd, D0, D1, deriv0, deriv1);
1904
1905 // Step 3: Apply diffusion coeff and WJ.
1906 DiffusionCoeffwithWJ2DKernel<SHAPE_TYPE, true, DEFORMED, VARCOEFF>(
1907 ncoord, nq0, nq1, useDiffCoeff, diffCoeff, varDiffCoeff,
1908 varDiffCoeffSize, jac, w0, w1, df, f0, f1, deriv0, deriv1);
1909
1910 // Step 4: Apply derivative and sum up.
1911 SumDerivTensor2DKernel<false>(nq0, nq1, deriv0, deriv1, D0, D1, bwd);
1912
1913 // Step 5: Inner product without WJ.
1914 IProductWRTBaseKernelLauncher<SHAPE_TYPE, false, false>(
1915 sizeParam2D, isModified, bwd, basis0, basis1, NtoMTrans, wsp0, out);
1916}

References in, jac, out, and PhysDerivTensor2DKernel().

◆ LaplacianKernelLauncher() [3/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::LaplacianKernelLauncher ( const TSizeParameter3D  sizeParam3D,
const bool  isModified,
const unsigned int  ncoord,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  basis1,
const typename simd_type::scalarType *  basis2,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
const typename simd_type::scalarType *  D2,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  f1m,
const simd_type *  f2,
const simd_type *  NtoM,
const simd_type *  NtoMTrans,
const simd_type *  jac,
const simd_type *  df,
simd_type *  wsp0,
simd_type *  wsp1,
simd_type *  wsp2,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  deriv2,
simd_type *  bwd,
const simd_type *  in,
simd_type *  out 
)
static

3D launcher stringing together the five sum-factorised stages for one element group.

Definition at line 1924 of file LaplacianBlockOpSerialAVXSumFacKernels.hpp.

1943{
1944 static_assert(IsSizeParameter3D_v<TSizeParameter3D>,
1945 "Template argument must be either of type "
1946 "NonTemplatedSizeParameter3D or TemplatedSizeParameter3D.");
1947
1948 const unsigned int nq0 = sizeParam3D.nq0();
1949 const unsigned int nq1 = sizeParam3D.nq1();
1950 const unsigned int nq2 = sizeParam3D.nq2();
1951
1952 // Step 1: BwdTrans.
1953 BwdTransKernelLauncher<SHAPE_TYPE, false>(sizeParam3D, isModified, basis0,
1954 basis1, basis2, NtoM, wsp0, wsp1,
1955 in, bwd);
1956
1957 // Step 2: Get tensor derivatives.
1958 PhysDerivTensor3DKernel(nq0, nq1, nq2, bwd, D0, D1, D2, deriv0, deriv1,
1959 deriv2);
1960
1961 // Step 3: Apply diffusion coeff and WJ.
1962 DiffusionCoeffwithWJ3DKernel<SHAPE_TYPE, true, DEFORMED, VARCOEFF>(
1963 nq0, nq1, nq2, useDiffCoeff, diffCoeff, varDiffCoeff, varDiffCoeffSize,
1964 jac, w0, w1, w2, df, f0, f1, f1m, f2, deriv0, deriv1, deriv2);
1965
1966 // Step 4: Apply derivative and sum up.
1967 SumDerivTensor3DKernel<false>(nq0, nq1, nq2, deriv0, deriv1, deriv2, D0, D1,
1968 D2, bwd);
1969
1970 // Step 5: Inner product without WJ.
1971 IProductWRTBaseKernelLauncher<SHAPE_TYPE, false, false>(
1972 sizeParam3D, isModified, bwd, basis0, basis1, basis2, NtoMTrans, wsp0,
1973 wsp1, wsp2, out);
1974}

References in, jac, out, and PhysDerivTensor3DKernel().

◆ LaunchExpressionKernel()

template<typename TData >
void Nektar::MultiRegions::detail::LaunchExpressionKernel ( const ExpressionKernels &  kernels,
const ExpressionKernelIndex  index,
const ExpressionKernelArgs< TData > &  kernelArgs,
const unsigned int  gridSize,
const unsigned int  blockSize,
const unsigned int  streamID 
)

Launch a variant of the compiled kernels on the block's stream.

Launch a variant of the compiled kernels on the block's queue.

Template Parameters
TDataFloating-point type of the field data.
Parameters
kernelsCompiled kernels.
indexVariant to launch.
kernelArgsLaunch arguments.
gridSizeNumber of thread blocks.
blockSizeThreads per block.
streamIDStream index of the block.
Template Parameters
TDataFloating-point type of the field data.
Parameters
kernelsCompiled kernels.
indexVariant to launch.
kernelArgsLaunch arguments.
gridSizeNumber of work-groups.
blockSizeWork-items per work-group.
streamIDStream index of the block.

Definition at line 357 of file ExpressionBlockOpDeviceGenericHIPCUDAHelper.hpp.

363{
364 EnqueueExpressionKernel(kernels, index, kernelArgs, gridSize, blockSize,
365 GetExpressionKernelStream(streamID));
366}
void EnqueueExpressionKernel(const ExpressionKernels &kernels, const ExpressionKernelIndex index, const ExpressionKernelArgs< TData > &kernelArgs, const unsigned int gridSize, const unsigned int blockSize, TStream stream)
Launch a variant of the compiled kernels on a native stream.

References EnqueueExpressionKernel().

Referenced by Nektar::MultiRegions::detail::ExpressionBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply().

◆ LinAdvDiffReactionKernelLauncher() [1/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::LinAdvDiffReactionKernelLauncher ( const TSizeParameter1D  sizeParam1D,
const bool  isModified,
const unsigned int  ncoord,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  w0,
const simd_type *  NtoM,
const simd_type *  NtoMTrans,
const simd_type *  jac,
const simd_type *  df,
const simd_type *  advVel0_ptr,
const simd_type *  advVel1_ptr,
const simd_type *  advVel2_ptr,
simd_type *  deriv0,
simd_type *  bwd,
const simd_type *  in,
simd_type *  out,
const typename simd_type::scalarType  lambda 
)
static

Apply the whole operator to one element group of a 1D block.

Unpacks the size parameter – runtime or compile-time, both satisfying IsSizeParameter1D_v as the static_assert enforces – and runs the six stages on the group:

  1. BwdTransKernelLauncher: coefficients to \(u\) at the quadrature points, in bwd;
  2. PhysDerivTensor1DKernel: the reference derivative \(\partial u/\partial\xi_0\), in deriv0;
  3. AddAdvection1DKernel: overwrites bwd with \(\mathbf{V}\cdot\nabla u + \lambda u\), applying the chain rule to the reference derivative as it goes;
  4. DiffusionCoeffwithWJ1DKernel of the Helmholtz family: replaces deriv0 by the diffusion flux pulled back to the reference direction and applies the quadrature weights and the Jacobian to it and to bwd, with a unit coefficient since the reaction term is already in bwd; the tensor is read directly from the coefficient pointer using its component stride;
  5. SumDerivTensor1DKernel: contracts the flux against the transposed derivative matrix and adds it onto bwd, which then holds the whole integrand;
  6. IProductWRTBaseKernelLauncher without weights or Jacobian (already applied), writing the output coefficients.
Template Parameters
SHAPE_TYPEElement shape (segments only).
DEFORMEDJacobian and derivative factors vary point by point.
TSizeParameter1D1D size parameter (see ElmtHelper.hpp).
simd_typeSIMD vector type; one element per lane.
Parameters
sizeParam1DElement sizes: modes and quadrature points.
isModifiedFirst-direction basis is eModified_A.
ncoordCoordinate dimension.
diffCoeffConstant diffusivity tensor (see LinAdvDiffReactionOp::SetDiffCoeff).
varDiffCoeffVariable diffusivity tensor (VARCOEFF).
useDiffCoeffFalse for the constant identity tensor.
varDiffCoeffSizeStride between tensor components in SIMD vectors.
basis01D basis table.
D01D collocation derivative matrix.
w01D quadrature weights.
NtoMNodal-to-modal matrix; unused for segments.
NtoMTransIts transpose; unused for segments.
jacJacobians of the group.
dfDerivative factors of the group.
advVel0_ptrVelocity component 0 of the group.
advVel1_ptrVelocity component 1; read for embedded segments.
advVel2_ptrVelocity component 2; read for embedded segments.
deriv0Quadrature-space buffer for the derivative and then the flux.
bwdQuadrature-space buffer for \(u\) and then the integrand.
inCoefficients of the group.
outOutput coefficients of the group, overwritten.
lambdaReaction coefficient.

Definition at line 560 of file LinAdvDiffReactionBlockOpSerialAVXSumFacKernels.hpp.

573{
574 static_assert(IsSizeParameter1D_v<TSizeParameter1D>,
575 "Template argument must be either of type "
576 "NonTemplatedSizeParameter1D or TemplatedSizeParameter1D.");
577
578 const unsigned int nq0 = sizeParam1D.nq0();
579
580 // Step 1: BwdTrans.
581 BwdTransKernelLauncher<SHAPE_TYPE, false>(sizeParam1D, isModified, basis0,
582 NtoM, in, bwd);
583
584 // Step 2: Get tensor derivatives.
585 PhysDerivTensor1DKernel(nq0, bwd, D0, deriv0);
586
587 // Step 3: Evaluate advection term and add to bwd * lambda.
588 AddAdvection1DKernel<DEFORMED>(ncoord, nq0, advVel0_ptr, advVel1_ptr,
589 advVel2_ptr, df, deriv0, bwd, lambda);
590
591 // Step 4: Apply diffusion coeff and WJ.
592 DiffusionCoeffwithWJ1DKernel<SHAPE_TYPE, true, DEFORMED, VARCOEFF>(
593 ncoord, nq0, useDiffCoeff, diffCoeff, varDiffCoeff, varDiffCoeffSize,
594 jac, w0, df, deriv0, bwd, 1.0);
595
596 // Step 5: Apply derivative and sum up.
597 SumDerivTensor1DKernel<true>(nq0, deriv0, D0, bwd);
598
599 // Step 6: Inner product without WJ.
600 IProductWRTBaseKernelLauncher<SHAPE_TYPE, false, false>(
601 sizeParam1D, isModified, bwd, basis0, NtoMTrans, out);
602}

References in, jac, out, and PhysDerivTensor1DKernel().

Referenced by Nektar::MultiRegions::detail::LinAdvDiffReactionBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl().

◆ LinAdvDiffReactionKernelLauncher() [2/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::LinAdvDiffReactionKernelLauncher ( const TSizeParameter2D  sizeParam2D,
const bool  isModified,
const unsigned int  ncoord,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  basis1,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  NtoM,
const simd_type *  NtoMTrans,
const simd_type *  jac,
const simd_type *  df,
const simd_type *  advVel0_ptr,
const simd_type *  advVel1_ptr,
const simd_type *  advVel2_ptr,
simd_type *  wsp0,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  bwd,
const simd_type *  in,
simd_type *  out,
const typename simd_type::scalarType  lambda 
)
static

Apply the whole operator to one element group of a 2D block (quadrilaterals and modal or nodal triangles).

As the 1D overload, with the two-dimensional stages: the backward transform and the inner product use the workspace wsp0 and, for NodalTri, convert from and back to the nodal coefficients through NtoM and NtoMTrans; PhysDerivTensor2DKernel leaves the two reference derivatives – still in collapsed coordinates for triangles – in deriv0 and deriv1; AddAdvection2DKernel and DiffusionCoeffwithWJ2DKernel each complete the collapsed-coordinate chain rule with f0 and f1 before applying the derivative factors; SumDerivTensor2DKernel sums both flux components onto bwd.

Template Parameters
SHAPE_TYPEQuad, Tri or NodalTri.
DEFORMEDJacobian and derivative factors vary point by point.
TSizeParameter2D2D size parameter (see ElmtHelper.hpp).
simd_typeSIMD vector type; one element per lane.
Parameters
sizeParam2DElement sizes: modes and quadrature points per direction.
isModifiedFirst-direction basis is eModified_A.
ncoordCoordinate dimension (2, or 3 for a surface element embedded in three dimensions).
diffCoeffConstant diffusivity tensor.
varDiffCoeffVariable diffusivity tensor (VARCOEFF).
useDiffCoeffFalse for the constant identity tensor.
varDiffCoeffSizeStride between tensor components in SIMD vectors.
basis0,basis11D basis tables.
D0,D11D collocation derivative matrices.
w0,w11D quadrature weights.
f0Collapsed-coordinate factor \((1+\eta_0)/2\), per direction-0 point; triangles only.
f1Collapsed-coordinate factor \(2/(1-\eta_1)\), per direction-1 point; triangles only.
NtoMNodal-to-modal matrix; NodalTri only.
NtoMTransIts transpose; NodalTri only.
jacJacobians of the group.
dfDerivative factors of the group.
advVel0_ptr,advVel1_ptrVelocity components 0 and 1.
advVel2_ptrVelocity component 2; read when ncoord == 3.
wsp0Shape-kernel workspace.
deriv0,deriv1Quadrature-space buffers for the derivatives and then the flux.
bwdQuadrature-space buffer for \(u\) and then the integrand.
inCoefficients of the group.
outOutput coefficients of the group, overwritten.
lambdaReaction coefficient.

Definition at line 658 of file LinAdvDiffReactionBlockOpSerialAVXSumFacKernels.hpp.

674{
675 static_assert(IsSizeParameter2D_v<TSizeParameter2D>,
676 "Template argument must be either of type "
677 "NonTemplatedSizeParameter2D or TemplatedSizeParameter2D.");
678
679 const unsigned int nq0 = sizeParam2D.nq0();
680 const unsigned int nq1 = sizeParam2D.nq1();
681
682 // Step 1: BwdTrans.
683 BwdTransKernelLauncher<SHAPE_TYPE, false>(sizeParam2D, isModified, basis0,
684 basis1, NtoM, wsp0, in, bwd);
685
686 // Step 2: Get tensor derivatives.
687 PhysDerivTensor2DKernel(nq0, nq1, bwd, D0, D1, deriv0, deriv1);
688
689 // Step 3: Evaluate advection term and add to bwd * lambda.
690 AddAdvection2DKernel<SHAPE_TYPE, DEFORMED>(
691 ncoord, nq0, nq1, f0, f1, advVel0_ptr, advVel1_ptr, advVel2_ptr, df,
692 deriv0, deriv1, bwd, lambda);
693
694 // Step 4: Apply diffusion coeff and WJ.
695 DiffusionCoeffwithWJ2DKernel<SHAPE_TYPE, true, DEFORMED, VARCOEFF>(
696 ncoord, nq0, nq1, useDiffCoeff, diffCoeff, varDiffCoeff,
697 varDiffCoeffSize, jac, w0, w1, df, f0, f1, deriv0, deriv1, bwd, 1.0);
698
699 // Step 5: Apply derivative and sum up.
700 SumDerivTensor2DKernel<true>(nq0, nq1, deriv0, deriv1, D0, D1, bwd);
701
702 // Step 6: Inner product without WJ.
703 IProductWRTBaseKernelLauncher<SHAPE_TYPE, false, false>(
704 sizeParam2D, isModified, bwd, basis0, basis1, NtoMTrans, wsp0, out);
705}

References in, jac, out, and PhysDerivTensor2DKernel().

◆ LinAdvDiffReactionKernelLauncher() [3/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, bool VARCOEFF, typename TSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::LinAdvDiffReactionKernelLauncher ( const TSizeParameter3D  sizeParam3D,
const bool  isModified,
const unsigned int  ncoord,
const bool  useDiffCoeff,
const typename simd_type::scalarType *  diffCoeff,
const simd_type *  varDiffCoeff,
const size_t  varDiffCoeffSize,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  basis1,
const typename simd_type::scalarType *  basis2,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
const typename simd_type::scalarType *  D2,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  f1m,
const simd_type *  f2,
const simd_type *  NtoM,
const simd_type *  NtoMTrans,
const simd_type *  jac,
const simd_type *  df,
const simd_type *  advVel0_ptr,
const simd_type *  advVel1_ptr,
const simd_type *  advVel2_ptr,
simd_type *  wsp0,
simd_type *  wsp1,
simd_type *  wsp2,
simd_type *  deriv0,
simd_type *  deriv1,
simd_type *  deriv2,
simd_type *  bwd,
const simd_type *  in,
simd_type *  out,
const typename simd_type::scalarType  lambda 
)
static

Apply the whole operator to one element group of a 3D block (hexahedra, modal or nodal tetrahedra and prisms, and pyramids).

The three-dimensional counterpart of the 2D overload: three workspaces, three derivative buffers and the four collapsed-coordinate factor tables, which AddAdvection3DKernel and DiffusionCoeffwithWJ3DKernel use according to the shape. The coordinate dimension is accepted but not used – a three-dimensional element has coordinate dimension three.

Template Parameters
SHAPE_TYPEHex, Tet, NodalTet, Prism, NodalPrism, Pyr or NodalPyr.
DEFORMEDJacobian and derivative factors vary point by point.
TSizeParameter3D3D size parameter (see ElmtHelper.hpp).
simd_typeSIMD vector type; one element per lane.
Parameters
sizeParam3DElement sizes: modes and quadrature points per direction.
isModifiedFirst-direction basis is eModified_A.
ncoordCoordinate dimension; unused.
diffCoeffConstant diffusivity tensor.
varDiffCoeffVariable diffusivity tensor (VARCOEFF).
useDiffCoeffFalse for the constant identity tensor.
varDiffCoeffSizeStride between tensor components in SIMD vectors.
basis0,basis1,basis21D basis tables.
D0,D1,D21D collocation derivative matrices.
w0,w1,w21D quadrature weights.
f0\((1+\eta_0)/2\), per direction-0 point.
f1\((1+\eta_1)/2\), per direction-1 point.
f1m\(2/(1-\eta_1)\), per direction-1 point.
f2\(2/(1-\eta_2)\), per direction-2 point.
NtoMNodal-to-modal matrix; nodal shapes only.
NtoMTransIts transpose; nodal shapes only.
jacJacobians of the group.
dfDerivative factors of the group.
advVel0_ptr,advVel1_ptr,advVel2_ptrVelocity components.
wsp0,wsp1,wsp2Shape-kernel workspaces.
deriv0,deriv1,deriv2Quadrature-space buffers for the derivatives and then the flux.
bwdQuadrature-space buffer for \(u\) and then the integrand.
inCoefficients of the group.
outOutput coefficients of the group, overwritten.
lambdaReaction coefficient.

Definition at line 756 of file LinAdvDiffReactionBlockOpSerialAVXSumFacKernels.hpp.

777{
778 static_assert(IsSizeParameter3D_v<TSizeParameter3D>,
779 "Template argument must be either of type "
780 "NonTemplatedSizeParameter3D or TemplatedSizeParameter3D.");
781
782 const unsigned int nq0 = sizeParam3D.nq0();
783 const unsigned int nq1 = sizeParam3D.nq1();
784 const unsigned int nq2 = sizeParam3D.nq2();
785
786 // Step 1: BwdTrans.
787 BwdTransKernelLauncher<SHAPE_TYPE, false>(sizeParam3D, isModified, basis0,
788 basis1, basis2, NtoM, wsp0, wsp1,
789 in, bwd);
790
791 // Step 2: Get tensor derivatives.
792 PhysDerivTensor3DKernel(nq0, nq1, nq2, bwd, D0, D1, D2, deriv0, deriv1,
793 deriv2);
794
795 // Step 3: Evaluate advection term and add to bwd * lambda.
796 AddAdvection3DKernel<SHAPE_TYPE, DEFORMED>(
797 nq0, nq1, nq2, f0, f1, f1m, f2, advVel0_ptr, advVel1_ptr, advVel2_ptr,
798 df, deriv0, deriv1, deriv2, bwd, lambda);
799
800 // Step 4: Apply diffusion coeff and WJ.
801 DiffusionCoeffwithWJ3DKernel<SHAPE_TYPE, true, DEFORMED, VARCOEFF>(
802 nq0, nq1, nq2, useDiffCoeff, diffCoeff, varDiffCoeff, varDiffCoeffSize,
803 jac, w0, w1, w2, df, f0, f1, f1m, f2, deriv0, deriv1, deriv2, bwd, 1.0);
804
805 // Step 5: Apply derivative and sum up.
806 SumDerivTensor3DKernel<true>(nq0, nq1, nq2, deriv0, deriv1, deriv2, D0, D1,
807 D2, bwd);
808
809 // Step 6: Inner product without WJ.
810 IProductWRTBaseKernelLauncher<SHAPE_TYPE, false, false>(
811 sizeParam3D, isModified, bwd, basis0, basis1, basis2, NtoMTrans, wsp0,
812 wsp1, wsp2, out);
813}

References in, jac, out, and PhysDerivTensor3DKernel().

◆ LocalDirBndCondKernel()

template<typename ExecSpace , typename TData >
void Nektar::MultiRegions::detail::LocalDirBndCondKernel ( const size_t  nsize,
const size_t *  id0Ptr,
const size_t *  id1Ptr,
const TData *  signPtr,
const TData *  inptr,
TData *  outptr,
const unsigned int  streamID 
)

Definition at line 84 of file DirBndCondKernels.hpp.

88{
90
91 // Note: inptr and outptr might alias each other.
92 Nektar::parallel_for<ExecSpace>(
93 0u, nsize, NEKTAR_LAMBDA(const size_t i) {
94 outptr[id0Ptr[i]] = inptr[id1Ptr[i]] * signPtr[i];
95 });
96
98}

References Nektar::LoopExecutionSetStreamID(), and NEKTAR_LAMBDA.

◆ MassKernelLauncher() [1/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, bool DEFORMED, typename TSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::MassKernelLauncher ( const TSizeParameter1D  sizeParam1D,
const bool  isModified,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  w0,
const simd_type *  NtoM,
const simd_type *  NtoMTrans,
const simd_type *  jac,
simd_type *  bwd,
const simd_type *  in,
simd_type *  out,
typename simd_type::scalarType  scale = 1.0 
)
static

1D launcher: backward transform then inner product with the basis for one element group of segments.

Template Parameters
SHAPE_TYPEShape tag (segments only in 1D).
SCALEMultiply the result by scale.
APPENDAccumulate onto out instead of overwriting.
DEFORMEDjac holds one vector per quadrature point rather than one per element group.
TSizeParameter1D1D size parameter, templated or not.
simd_typeSIMD vector type; each vector holds one value of every element of the interleaved group.
Parameters
sizeParam1DElement sizes; nm0 and nq0 are read.
isModifiedFirst-direction basis is eModified_A; unused in 1D.
basis0One-dimensional basis table, basis0[p * nq0 + i] being mode p at point i.
w0Direction-0 quadrature weights.
NtoMNodal-to-modal matrix; unused in 1D.
NtoMTransTransposed nodal-to-modal matrix; unused in 1D.
jacInterleaved Jacobians of the element group.
bwdInterleaved physical values of the group, written by the transform and read by the inner product.
inInterleaved coefficients of the element group.
outInterleaved coefficients of the element group.
scaleFactor applied when SCALE is set.

Definition at line 96 of file MassBlockOpSerialAVXSumFacKernels.hpp.

103{
104 static_assert(IsSizeParameter1D_v<TSizeParameter1D>,
105 "Template argument must be either of type "
106 "NonTemplatedSizeParameter1D or TemplatedSizeParameter1D.");
107
108 // Step 1: BwdTrans.
109 BwdTransKernelLauncher<SHAPE_TYPE, false>(sizeParam1D, isModified, basis0,
110 NtoM, in, bwd);
111
112 // Step 2: Inner product for mass matrix operation.
113 IProductWRTBaseKernelLauncher<SHAPE_TYPE, SCALE, APPEND, DEFORMED>(
114 sizeParam1D, isModified, bwd, basis0, w0, NtoMTrans, jac, out, scale);
115}

References in, jac, and out.

Referenced by Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl().

◆ MassKernelLauncher() [2/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, bool DEFORMED, typename TSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::MassKernelLauncher ( const TSizeParameter2D  sizeParam2D,
const bool  isModified,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  basis1,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const simd_type *  NtoM,
const simd_type *  NtoMTrans,
const simd_type *  jac,
simd_type *  wsp0,
simd_type *  bwd,
const simd_type *  in,
simd_type *  out,
typename simd_type::scalarType  scale = 1.0 
)
static

2D launcher: backward transform then inner product with the basis for one element group of quadrilaterals or (nodal) triangles.

For NodalTri the transform maps the coefficients to the modal basis with NtoM before its tensor-product stages and the inner product maps its modal result back with NtoMTrans afterwards. For the triangles, isModified triggers the extra collapsed-vertex contribution inside the shape kernels.

Template Parameters
SHAPE_TYPEQuad, Tri or NodalTri.
SCALEMultiply the result by scale.
APPENDAccumulate onto out instead of overwriting.
DEFORMEDjac holds one vector per quadrature point.
TSizeParameter2D2D size parameter, templated or not.
simd_typeSIMD vector type of the interleaved group.
Parameters
sizeParam2DElement sizes: modes and points per direction and the total mode count.
isModifiedFirst-direction basis is eModified_A.
basis0Direction-0 basis table (nm0 rows of nq0).
basis1Direction-1 basis table; for the triangles indexed by the combined (p,q) mode, one row per mode.
w0,w1Quadrature weights per direction.
NtoMNodal-to-modal matrix (nodal shapes only).
NtoMTransIts transpose (nodal shapes only).
jacInterleaved Jacobians of the group.
wsp0Group workspace shared by the two stages.
bwdInterleaved physical values of the group, written by the transform and read by the inner product.
inInterleaved coefficients of the group.
outInterleaved coefficients of the group.
scaleFactor applied when SCALE is set.

Definition at line 153 of file MassBlockOpSerialAVXSumFacKernels.hpp.

162{
163 static_assert(IsSizeParameter2D_v<TSizeParameter2D>,
164 "Template argument must be either of type "
165 "NonTemplatedSizeParameter2D or TemplatedSizeParameter2D.");
166
167 // Step 1: BwdTrans.
168 BwdTransKernelLauncher<SHAPE_TYPE, false>(sizeParam2D, isModified, basis0,
169 basis1, NtoM, wsp0, in, bwd);
170
171 // Step 2: Inner product for mass matrix operation.
172 IProductWRTBaseKernelLauncher<SHAPE_TYPE, SCALE, APPEND, DEFORMED>(
173 sizeParam2D, isModified, bwd, basis0, basis1, w0, w1, NtoMTrans, jac,
174 wsp0, out, scale);
175}

References in, jac, and out.

◆ MassKernelLauncher() [3/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool SCALE, bool APPEND, bool DEFORMED, typename TSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::MassKernelLauncher ( const TSizeParameter3D  sizeParam3D,
const bool  isModified,
const typename simd_type::scalarType *  basis0,
const typename simd_type::scalarType *  basis1,
const typename simd_type::scalarType *  basis2,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const simd_type *  NtoM,
const simd_type *  NtoMTrans,
const simd_type *  jac,
simd_type *  wsp0,
simd_type *  wsp1,
simd_type *  wsp2,
simd_type *  bwd,
const simd_type *  in,
simd_type *  out,
typename simd_type::scalarType  scale = 1.0 
)
static

3D launcher: backward transform then inner product with the basis for one element group of hexahedra, (nodal) tetrahedra, (nodal) prisms or pyramids.

The nodal mappings and the isModified corrections apply as in the 2D overload. The transform uses wsp0 and wsp1 and the inner product all three workspaces; the block implementation sizes each to the larger of the two stages' demands.

Template Parameters
SHAPE_TYPEHex, Tet, NodalTet, Prism, NodalPrism, Pyr or NodalPyr.
SCALEMultiply the result by scale.
APPENDAccumulate onto out instead of overwriting.
DEFORMEDjac holds one vector per quadrature point.
TSizeParameter3D3D size parameter, templated or not.
simd_typeSIMD vector type of the interleaved group.
Parameters
sizeParam3DElement sizes: modes and points per direction and the total mode count.
isModifiedFirst-direction basis is eModified_A.
basis0,basis1,basis2Basis tables per direction; along a collapsed direction indexed by the shape's combined mode.
w0,w1,w2Quadrature weights per direction.
NtoMNodal-to-modal matrix (nodal shapes only).
NtoMTransIts transpose (nodal shapes only).
jacInterleaved Jacobians of the group.
wsp0,wsp1Group workspaces of the two contraction stages, shared by transform and inner product.
wsp2Correction workspace of the inner product; prisms only.
bwdInterleaved physical values of the group, written by the transform and read by the inner product.
inInterleaved coefficients of the group.
outInterleaved coefficients of the group.
scaleFactor applied when SCALE is set.

Definition at line 217 of file MassBlockOpSerialAVXSumFacKernels.hpp.

228{
229 static_assert(IsSizeParameter3D_v<TSizeParameter3D>,
230 "Template argument must be either of type "
231 "NonTemplatedSizeParameter3D or TemplatedSizeParameter3D.");
232
233 // Step 1: BwdTrans.
234 BwdTransKernelLauncher<SHAPE_TYPE, false>(sizeParam3D, isModified, basis0,
235 basis1, basis2, NtoM, wsp0, wsp1,
236 in, bwd);
237
238 // Step 2: Inner product for mass matrix operation.
239 IProductWRTBaseKernelLauncher<SHAPE_TYPE, SCALE, APPEND, DEFORMED>(
240 sizeParam3D, isModified, bwd, basis0, basis1, basis2, w0, w1, w2,
241 NtoMTrans, jac, wsp0, wsp1, wsp2, out, scale);
242}

References in, jac, and out.

◆ MultiplyByDerivDirFactorKernel()

template<typename ExecSpace , bool APPEND, bool DEFORMED, typename TData >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::MultiplyByDerivDirFactorKernel ( const unsigned  dir,
const unsigned  nqTot,
const unsigned  ncoord,
const unsigned  dimension,
const size_t  nelmt,
const size_t  inoffset,
const TData *  dfptr,
const TData *  inptr,
TData *  outptr 
)
static

Contract the standard-region derivatives of a lane group into the single Cartesian derivative dir, overwriting or accumulating.

The runtime dir argument plays the role that the DIR template parameter plays in the sum-factorised kernels: it selects the derivative-factor rows dir * dimension + d.

Template Parameters
ExecSpaceExecution space; unused.
APPENDAccumulate onto outptr instead of overwriting.
DEFORMEDDerivative factors vary point by point.
TDataSIMD vector type of the interleaved lane group.
Parameters
dirCartesian component to produce.
nqTotQuadrature points per element.
ncoordCartesian components the factor array holds (coordDim); sets the per-point factor stride.
dimensionStandard directions to contract over.
nelmtElement groups covered by this call.
inoffsetStride, in SIMD vectors, between the standard-direction planes of inptr.
dfptrDerivative factors of the group.
inptrStandard-direction derivatives, plane d at d * inoffset.
outptrSingle Cartesian derivative plane.

Definition at line 187 of file PhysDerivBlockOpSerialAVXStdMatKernels.hpp.

191{
192 const auto ndf = ncoord * dimension;
193 const auto nsize = nqTot * nelmt;
194
195 TData tmp;
196 if constexpr (DEFORMED)
197 {
198 for (size_t idx = 0; idx < nsize; idx++)
199 {
200 tmp = dfptr[ndf * idx + dir * dimension] * inptr[idx];
201 for (unsigned int d = 1; d < dimension; d++)
202 {
203 tmp.fma(dfptr[ndf * idx + dir * dimension + d],
204 inptr[d * inoffset + idx]);
205 }
206 if constexpr (APPEND)
207 {
208 outptr[idx] += tmp;
209 }
210 else
211 {
212 outptr[idx] = tmp;
213 }
214 }
215 }
216 else
217 {
218 for (size_t e = 0; e < nelmt; e++)
219 {
220 for (unsigned int i = 0; i < nqTot; i++)
221 {
222 tmp = dfptr[ndf * e + dir * dimension] * inptr[nqTot * e + i];
223 for (unsigned int d = 1; d < dimension; d++)
224 {
225 tmp.fma(dfptr[ndf * e + dir * dimension + d],
226 inptr[nqTot * e + i + d * inoffset]);
227 }
228 if constexpr (APPEND)
229 {
230 outptr[nqTot * e + i] += tmp;
231 }
232 else
233 {
234 outptr[nqTot * e + i] = tmp;
235 }
236 }
237 }
238 }
239}

References e, and nelmt.

Referenced by Nektar::MultiRegions::detail::DivergenceBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply().

◆ MultiplyByDerivFactorAndAdvecVelKernel()

template<typename ExecSpace , bool APPEND, bool DEFORMED, typename TData , typename TScalar >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::MultiplyByDerivFactorAndAdvecVelKernel ( const unsigned int  nqTot,
const unsigned int  ncoord,
const unsigned int  dimension,
const size_t  nelmt,
const size_t  inoffset,
const TData *  dfptr,
const TData *  advVel,
const size_t  advelsize,
const TData *  inptr,
TData *  outptr,
const TScalar  scale 
)
static

From reference-space derivatives, form the Cartesian gradient and contract it with the advection velocity: out = scale * sum_k V_k sum_d df(k,d) du/dxi_d, evaluated per quadrature point with one element per SIMD lane.

The derivative-factor entry k * dimension + d maps the reference-direction-d derivative into the Cartesian-k gradient component. For regular geometry one factor set is stored per element group; for deformed geometry one per quadrature point.

Template Parameters
ExecSpaceExecution space; unused here.
APPENDAccumulate onto outptr instead of overwriting it.
DEFORMEDRead per-point rather than per-element derivative factors.
TDataSIMD vector type of the data (the width-one tinysimd::scalarT wrapper on the Serial execution space).
TScalarType of the scale factor.
Parameters
nqTotQuadrature points per element.
ncoordCartesian gradient/velocity components.
dimensionReference directions covered by inptr.
nelmtElement groups to process (the block operator passes 1 and advances the pointers itself).
inoffsetStride, in SIMD vectors, between the reference-direction planes of inptr.
dfptrDerivative factors: ncoord * dimension vectors per element group (regular) or point (deformed).
advVelVelocity data; component k starts at k * advelsize vectors.
advelsizeStride, in SIMD vectors, between velocity components.
inptrReference-space derivatives, one plane of nqTot vectors per direction.
outptrOutput plane of nqTot vectors per element group.
scaleScalar factor applied to the result.

Definition at line 86 of file AdvectionBlockOpSerialAVXStdMatKernels.hpp.

91{
92 const auto ndf = ncoord * dimension;
93 const auto nsize = nqTot * nelmt;
94
95 TData tmp[3], tmp0;
96 if constexpr (DEFORMED)
97 {
98 for (size_t idx = 0; idx < nsize; idx++)
99 {
100 tmp0 = 0.0;
101 for (unsigned int k = 0; k < ncoord; k++)
102 {
103 tmp[k] = dfptr[ndf * idx + k * dimension] * inptr[idx];
104 for (unsigned int d = 1; d < dimension; d++)
105 {
106 tmp[k].fma(dfptr[ndf * idx + k * dimension + d],
107 inptr[d * inoffset + idx]);
108 }
109 tmp0.fma(advVel[k * advelsize + idx], tmp[k]);
110 }
111
112 if constexpr (APPEND)
113 {
114 outptr[idx].fma(scale, tmp0);
115 }
116 else
117 {
118 outptr[idx] = scale * tmp0;
119 }
120 }
121 }
122 else
123 {
124 for (size_t e = 0; e < nelmt; e++)
125 {
126 for (unsigned int i = 0; i < nqTot; i++)
127 {
128 tmp0 = 0.0;
129 for (unsigned int k = 0; k < ncoord; k++)
130 {
131 tmp[k] =
132 dfptr[ndf * e + k * dimension] * inptr[nqTot * e + i];
133 for (unsigned int d = 1; d < dimension; d++)
134 {
135 tmp[k].fma(dfptr[ndf * e + k * dimension + d],
136 inptr[nqTot * e + i + d * inoffset]);
137 }
138 tmp0.fma(advVel[k * advelsize + i], tmp[k]);
139 }
140
141 if constexpr (APPEND)
142 {
143 outptr[nqTot * e + i].fma(scale, tmp0);
144 }
145 else
146 {
147 outptr[nqTot * e + i] = scale * tmp0;
148 }
149 }
150 }
151 }
152}

References e, and nelmt.

Referenced by Nektar::MultiRegions::detail::AdvectionBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply().

◆ MultiplyByDerivFactorKernel()

template<typename ExecSpace , bool DEFORMED, typename TData >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::MultiplyByDerivFactorKernel ( const unsigned int  nqTot,
const unsigned int  ncoord,
const unsigned int  dimension,
const size_t  nelmt,
const size_t  inoffset,
const size_t  outoffset,
const TData *  dfptr,
const TData *  inptr,
TData *  outptr 
)
static

Contract the standard-region derivatives of a lane group into all ncoord Cartesian derivatives.

Safe to run in place (outptr equal to inptr, as PhysDeriv does): all ncoord results for one point are formed in registers before any of them is stored.

Template Parameters
ExecSpaceExecution space; unused.
DEFORMEDDerivative factors vary point by point.
TDataSIMD vector type of the interleaved lane group.
Parameters
nqTotQuadrature points per element.
ncoordCartesian components to produce (coordDim); at most 3, the size of the per-point register buffer.
dimensionStandard directions to contract over.
nelmtElement groups covered by this call; the StdMat block operator passes 1 and advances the pointers itself.
inoffsetStride, in SIMD vectors, between the standard-direction planes of inptr.
outoffsetStride, in SIMD vectors, between the Cartesian planes of outptr.
dfptrDerivative factors of the group, from the first point (deformed) or the first element (regular).
inptrStandard-direction derivatives, plane d at d * inoffset.
outptrCartesian derivatives, plane k written at k * outoffset.

Definition at line 106 of file PhysDerivBlockOpSerialAVXStdMatKernels.hpp.

111{
112 const auto ndf = ncoord * dimension;
113 const auto nsize = nqTot * nelmt;
114
115 TData tmp[3];
116 if constexpr (DEFORMED)
117 {
118 for (size_t idx = 0; idx < nsize; idx++)
119 {
120 for (unsigned int k = 0; k < ncoord; k++)
121 {
122 tmp[k] = dfptr[ndf * idx + k * dimension] * inptr[idx];
123 for (unsigned int d = 1; d < dimension; d++)
124 {
125 tmp[k].fma(dfptr[ndf * idx + k * dimension + d],
126 inptr[d * inoffset + idx]);
127 }
128 }
129 for (unsigned int k = 0; k < ncoord; k++)
130 {
131 outptr[k * outoffset + idx] = tmp[k];
132 }
133 }
134 }
135 else
136 {
137 for (size_t e = 0; e < nelmt; e++)
138 {
139 for (unsigned int i = 0; i < nqTot; i++)
140 {
141 for (unsigned int k = 0; k < ncoord; k++)
142 {
143 tmp[k] =
144 dfptr[ndf * e + k * dimension] * inptr[nqTot * e + i];
145 for (unsigned int d = 1; d < dimension; d++)
146 {
147 tmp[k].fma(dfptr[ndf * e + k * dimension + d],
148 inptr[nqTot * e + i + d * inoffset]);
149 }
150 }
151 for (unsigned int k = 0; k < ncoord; k++)
152 {
153 outptr[k * outoffset + nqTot * e + i] = tmp[k];
154 }
155 }
156 }
157 }
158}

References e, and nelmt.

◆ NeuBndCondGroupKernel() [1/2]

template<typename ExecSpace , typename TData >
void Nektar::MultiRegions::detail::NeuBndCondGroupKernel ( const size_t  nGroups,
const size_t *  groupOffsetPtr,
const size_t *  groupTargetPtr,
const TData *  inptr,
TData *  outptr,
const unsigned int  streamID 
)

Definition at line 87 of file NeuBndCondKernels.hpp.

90{
92
93 Nektar::parallel_for<ExecSpace>(
94 0u, nGroups, NEKTAR_LAMBDA(const size_t g) {
95 TData acc = static_cast<TData>(0);
96 for (size_t j = groupOffsetPtr[g]; j < groupOffsetPtr[g + 1]; ++j)
97 {
98 acc += inptr[j];
99 }
100 outptr[groupTargetPtr[g]] += acc;
101 });
102
104}

References Nektar::LoopExecutionSetStreamID(), and NEKTAR_LAMBDA.

◆ NeuBndCondGroupKernel() [2/2]

template<typename ExecSpace , typename TData >
void Nektar::MultiRegions::detail::NeuBndCondGroupKernel ( const size_t  nGroups,
const size_t *  groupOffsetPtr,
const size_t *  groupTargetPtr,
const TData *  signPtr,
const TData *  inptr,
TData *  outptr,
const unsigned int  streamID 
)

Definition at line 107 of file NeuBndCondKernels.hpp.

111{
113
114 Nektar::parallel_for<ExecSpace>(
115 0u, nGroups, NEKTAR_LAMBDA(const size_t g) {
116 TData acc = static_cast<TData>(0);
117 for (size_t j = groupOffsetPtr[g]; j < groupOffsetPtr[g + 1]; ++j)
118 {
119 acc += signPtr[j] * inptr[j];
120 }
121 outptr[groupTargetPtr[g]] += acc;
122 });
123
125}

References Nektar::LoopExecutionSetStreamID(), and NEKTAR_LAMBDA.

◆ NeuBndCondKernel() [1/2]

template<typename ExecSpace , typename TData >
void Nektar::MultiRegions::detail::NeuBndCondKernel ( const size_t  bndExpSize,
const size_t *  mapPtr,
const TData *  inptr,
TData *  outptr,
const unsigned int  streamID 
)

Definition at line 49 of file NeuBndCondKernels.hpp.

52{
54
55 Nektar::parallel_for<ExecSpace>(
56 0u, bndExpSize,
57 NEKTAR_LAMBDA(const size_t i) { outptr[mapPtr[i]] += inptr[i]; });
58
60}

References Nektar::LoopExecutionSetStreamID(), and NEKTAR_LAMBDA.

◆ NeuBndCondKernel() [2/2]

template<typename ExecSpace , typename TData >
void Nektar::MultiRegions::detail::NeuBndCondKernel ( const size_t  bndExpSize,
const TData *  signPtr,
const size_t *  mapPtr,
const TData *  inptr,
TData *  outptr,
const unsigned int  streamID 
)

Definition at line 63 of file NeuBndCondKernels.hpp.

66{
68
69 Nektar::parallel_for<ExecSpace>(
70 0u, bndExpSize, NEKTAR_LAMBDA(const size_t i) {
71 outptr[mapPtr[i]] += signPtr[i] * inptr[i];
72 });
73
75}

References Nektar::LoopExecutionSetStreamID(), and NEKTAR_LAMBDA.

◆ ParallelDirBndSignKernel()

template<typename ExecSpace , typename TData >
void Nektar::MultiRegions::detail::ParallelDirBndSignKernel ( const size_t  nsize,
const int *  signPtr,
TData *  outptr,
const unsigned int  streamID 
)

Definition at line 72 of file DirBndCondKernels.hpp.

74{
76
77 Nektar::parallel_for<ExecSpace>(
78 0u, nsize, NEKTAR_LAMBDA(const size_t i) { outptr[signPtr[i]] *= -1; });
79
81}

References Nektar::LoopExecutionSetStreamID(), and NEKTAR_LAMBDA.

◆ PhysDeriv1DKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysDeriv1DKernel ( const unsigned int  nq0,
const unsigned int  ncoord,
const simd_type *  df_ptr,
simd_type *  out[3] 
)
static

One dimension: scale a segment's standard derivative by the derivative factors, in place, for every Cartesian component.

With one standard direction there is nothing to contract and no collapsed-coordinate correction: out[k][j] = out[0][j] * df[k], evaluated from k = ncoord-1 downwards so that out[0] – which is both the input and an output – is overwritten last.

Template Parameters
SHAPE_TYPEShape tag (segments only in 1D); unused.
DEFORMEDDerivative factors vary point by point.
simd_typeSIMD vector type; each vector holds one value of every element of the interleaved group.
Parameters
nq0Quadrature points of the element.
ncoordCoordinate dimension (1, 2 or 3), equal to the derivative factors per point.
df_ptrDerivative factors of the element group.
outThe ncoord Cartesian planes; on entry out[0] holds the standard derivative, on exit all ncoord planes hold Cartesian derivatives.

Definition at line 110 of file PhysDerivBlockOpSerialAVXSumFacKernels.hpp.

114{
115 simd_type df_tmp[3] = {};
116
117 if constexpr (!DEFORMED)
118 {
119 // unroll very small loops
120 df_tmp[0] = df_ptr[0];
121 if (ncoord >= 2)
122 {
123 df_tmp[1] = df_ptr[1];
124 }
125 if (ncoord == 3)
126 {
127 df_tmp[2] = df_ptr[2];
128 }
129 }
130
131 for (unsigned int j = 0; j < nq0; ++j)
132 {
133 if constexpr (DEFORMED)
134 {
135 df_tmp[0] = df_ptr[j * ncoord]; // load 1x
136 if (ncoord >= 2)
137 {
138 df_tmp[1] = df_ptr[j * ncoord + 1]; // load 1x
139 }
140 if (ncoord == 3)
141 {
142 df_tmp[2] = df_ptr[j * ncoord + 2]; // load 1x
143 }
144 }
145
146 // Multiply by derivative factors
147 simd_type in, tmp;
148 in = out[0][j]; // Load 1x
149 if (ncoord == 3)
150 {
151 tmp = in * df_tmp[2];
152 out[2][j] = tmp;
153 }
154 if (ncoord >= 2)
155 {
156 tmp = in * df_tmp[1];
157 out[1][j] = tmp;
158 }
159 tmp = in * df_tmp[0];
160 out[0][j] = tmp;
161 }
162}

References in, and out.

◆ PhysDeriv2DKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysDeriv2DKernel ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  ncoord,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  df_ptr,
simd_type *  out[3] 
)
static

Two dimensions: correct the collapsed derivatives of a triangle and contract with the derivative factors, in place, for every Cartesian component.

For a (nodal) triangle the collapsed-to-standard correction

\[ \frac{\partial u}{\partial \xi_0} = \frac{2}{1-\eta_1}\frac{\partial u}{\partial \eta_0}, \qquad \frac{\partial u}{\partial \xi_1} = \frac{\partial u}{\partial \eta_1} + \frac{1+\eta_0}{2}\frac{\partial u}{\partial \xi_0} \]

is applied first; quadrilaterals skip it, f0 and f1 then being unused. Each output component is then out[k] = d0 * df[2k] + d1 * df[2k+1], the third being produced only for an element embedded in three dimensions.

Template Parameters
SHAPE_TYPEQuad, Tri or NodalTri.
DEFORMEDDerivative factors vary point by point.
simd_typeSIMD vector type of the interleaved group.
Parameters
nq0,nq1Quadrature points per direction.
ncoordCartesian components to produce (coordDim, 2 or 3); the derivative factors come in ndf = 2 * ncoord per point.
f0Table of \(\tfrac{1}{2}(1+\eta_0)\) at the direction-0 points (triangles only).
f1Table of \(2/(1-\eta_1)\) at the direction-1 points (triangles only).
df_ptrDerivative factors of the element group.
outThe three Cartesian planes; on entry out[0] and out[1] hold the collapsed derivatives, on exit out[0..ncoord-1] hold Cartesian ones.

Definition at line 250 of file PhysDerivBlockOpSerialAVXSumFacKernels.hpp.

254{
255 const unsigned int ndf = 2 * ncoord;
256 simd_type df_tmp[6] = {};
257
258 if constexpr (!DEFORMED)
259 {
260 df_tmp[0] = df_ptr[0];
261 df_tmp[1] = df_ptr[1];
262 df_tmp[2] = df_ptr[2];
263 df_tmp[3] = df_ptr[3];
264
265 if (ncoord == 3)
266 {
267 df_tmp[4] = df_ptr[4];
268 df_tmp[5] = df_ptr[5];
269 }
270 }
271
272 for (unsigned int j = 0, cnt_ji = 0; j < nq1; ++j)
273 {
274 simd_type xfrm1;
275 if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
276 SHAPE_TYPE == LibUtilities::NodalTri)
277 {
278 xfrm1 = f1[j]; // Load 1x
279 }
280
281 for (unsigned int i = 0; i < nq0; ++i, ++cnt_ji)
282 {
283 simd_type d0, d1;
284 d0 = out[0][cnt_ji]; // Load 1x
285 d1 = out[1][cnt_ji]; // Load 1x
286
287 if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
288 SHAPE_TYPE == LibUtilities::NodalTri)
289 {
290 // Moving from collapsed to standard coordinates
291 simd_type xfrm0 = f0[i]; // Load 1x
292 d0 *= xfrm1;
293 d1.fma(d0, xfrm0);
294 }
295
296 if constexpr (DEFORMED)
297 {
298 df_tmp[0] = df_ptr[cnt_ji * ndf];
299 df_tmp[1] = df_ptr[cnt_ji * ndf + 1];
300 df_tmp[2] = df_ptr[cnt_ji * ndf + 2];
301 df_tmp[3] = df_ptr[cnt_ji * ndf + 3];
302
303 if (ncoord == 3)
304 {
305 df_tmp[4] = df_ptr[cnt_ji * ndf + 4];
306 df_tmp[5] = df_ptr[cnt_ji * ndf + 5];
307 }
308 }
309
310 // Multiply by derivative factors
311 simd_type tmp;
312 tmp = d0 * df_tmp[0]; // d0 * df0 + d1 * df1
313 tmp.fma(d1, df_tmp[1]);
314 out[0][cnt_ji] = tmp;
315
316 tmp = d0 * df_tmp[2]; // d0 * df2 + d1 * df3
317 tmp.fma(d1, df_tmp[3]);
318 out[1][cnt_ji] = tmp;
319
320 if (ncoord == 3)
321 {
322 tmp = d0 * df_tmp[4]; // d0 * df4 + d1 * df5
323 tmp.fma(d1, df_tmp[5]);
324 out[2][cnt_ji] = tmp;
325 }
326 }
327 }
328}

References Nektar::LibUtilities::NodalTri, out, and Nektar::LibUtilities::Tri.

◆ PhysDeriv3DKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysDeriv3DKernel ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  f1m,
const simd_type *  f2,
const simd_type *  df_ptr,
simd_type *  out_d0,
simd_type *  out_d1,
simd_type *  out_d2 
)
static

Three dimensions: correct the collapsed derivatives of a non-hexahedral shape and contract with the derivative factors, in place, for all three Cartesian components.

The collapsed-to-standard correction is shape specific and uses the four factor tables: a prism scales direction 0 by f2 and adds its f0 multiple onto direction 2; a pyramid scales directions 0 and 1 by f2 and adds their f0 and f1 multiples onto direction 2; a (nodal) tetrahedron scales direction 0 by f1m and f2 and direction 1 by f2, then folds both into directions 1 and 2. Hexahedra need no correction and leave f0 – f2 unused. Each output component is then out[k] = sum_d d_d * df[3k+d], the nine derivative factors of a three-dimensional element.

Template Parameters
SHAPE_TYPEHex, Tet, NodalTet, Prism, NodalPrism, Pyr or NodalPyr.
DEFORMEDDerivative factors vary point by point.
simd_typeSIMD vector type of the interleaved group.
Parameters
nq0,nq1,nq2Quadrature points per direction.
f0\(\tfrac{1}{2}(1+\eta_0)\) at the direction-0 points.
f1\(\tfrac{1}{2}(1+\eta_1)\) at the direction-1 points.
f1m\(2/(1-\eta_1)\) at the direction-1 points.
f2\(2/(1-\eta_2)\) at the direction-2 points.
df_ptrDerivative factors of the element group, nine per point (deformed) or per element (regular).
out_d0Collapsed derivative along direction 0 on entry, \(\partial u/\partial x_0\) on exit.
out_d1As out_d0 for direction 1 and \(x_1\).
out_d2As out_d0 for direction 2 and \(x_2\).

Definition at line 450 of file PhysDerivBlockOpSerialAVXSumFacKernels.hpp.

456{
457 constexpr unsigned int ndf = 9;
458 simd_type df_tmp[ndf];
459
460 if constexpr (!DEFORMED)
461 {
462 df_tmp[0] = df_ptr[0];
463 df_tmp[1] = df_ptr[1];
464 df_tmp[2] = df_ptr[2];
465 df_tmp[3] = df_ptr[3];
466 df_tmp[4] = df_ptr[4];
467 df_tmp[5] = df_ptr[5];
468 df_tmp[6] = df_ptr[6];
469 df_tmp[7] = df_ptr[7];
470 df_tmp[8] = df_ptr[8];
471 }
472
473 for (unsigned int k = 0, cnt_ijk = 0; k < nq2; ++k)
474 {
475 simd_type xfrm_eta2;
476 if constexpr (SHAPE_TYPE != LibUtilities::Hex)
477 {
478 xfrm_eta2 = f2[k];
479 }
480
481 for (unsigned int j = 0; j < nq1; ++j)
482 {
483 simd_type xfrm_eta1, xfrm;
484 if constexpr (SHAPE_TYPE == LibUtilities::Pyr ||
485 SHAPE_TYPE == LibUtilities::NodalPyr)
486 {
487 xfrm_eta1 = f1[j];
488 }
489 else if constexpr (SHAPE_TYPE == LibUtilities::Tet ||
490 SHAPE_TYPE == LibUtilities::NodalTet)
491 {
492 xfrm_eta1 = f1[j];
493 xfrm = f1m[j] * xfrm_eta2;
494 }
495
496 for (unsigned int i = 0; i < nq0; ++i, ++cnt_ijk)
497 {
498 simd_type d0, d1, d2;
499 d0 = out_d0[cnt_ijk];
500 d1 = out_d1[cnt_ijk];
501 d2 = out_d2[cnt_ijk];
502
503 simd_type xfrm_eta0, tmp;
504
505 // Chain-rule to construct cartesian derivatives for non
506 // Hex shapes
507 if constexpr ((SHAPE_TYPE == LibUtilities::Prism) ||
508 (SHAPE_TYPE == LibUtilities::NodalPrism))
509 {
510 d0 *= xfrm_eta2;
511 xfrm_eta0 = f0[i];
512 d2.fma(xfrm_eta0, d0);
513 }
514 else if constexpr (SHAPE_TYPE == LibUtilities::Pyr ||
515 SHAPE_TYPE == LibUtilities::NodalPyr)
516 {
517 d0 *= xfrm_eta2;
518 d1 *= xfrm_eta2;
519 xfrm_eta0 = f0[i];
520 d2.fma(xfrm_eta0, d0);
521 d2.fma(xfrm_eta1, d1);
522 }
523 else if constexpr (SHAPE_TYPE == LibUtilities::Tet ||
524 SHAPE_TYPE == LibUtilities::NodalTet)
525 {
526 d0 *= xfrm;
527 xfrm_eta0 = f0[i] * d0;
528 tmp = d1 * xfrm_eta2;
529 d1 = xfrm_eta0 + tmp;
530 xfrm_eta0.fma(tmp, xfrm_eta1);
531 d2 += xfrm_eta0;
532 }
533
534 if constexpr (DEFORMED)
535 {
536 df_tmp[0] = df_ptr[cnt_ijk * ndf];
537 df_tmp[1] = df_ptr[cnt_ijk * ndf + 1];
538 df_tmp[2] = df_ptr[cnt_ijk * ndf + 2];
539 df_tmp[3] = df_ptr[cnt_ijk * ndf + 3];
540 df_tmp[4] = df_ptr[cnt_ijk * ndf + 4];
541 df_tmp[5] = df_ptr[cnt_ijk * ndf + 5];
542 df_tmp[6] = df_ptr[cnt_ijk * ndf + 6];
543 df_tmp[7] = df_ptr[cnt_ijk * ndf + 7];
544 df_tmp[8] = df_ptr[cnt_ijk * ndf + 8];
545 }
546
547 // Metric for eta_0, xi_1, eta_2
548 tmp = d0 * df_tmp[0];
549 tmp.fma(d1, df_tmp[1]);
550 tmp.fma(d2, df_tmp[2]);
551 out_d0[cnt_ijk] = tmp;
552
553 tmp = d0 * df_tmp[3];
554 tmp.fma(d1, df_tmp[4]);
555 tmp.fma(d2, df_tmp[5]);
556 out_d1[cnt_ijk] = tmp;
557
558 tmp = d0 * df_tmp[6];
559 tmp.fma(d1, df_tmp[7]);
560 tmp.fma(d2, df_tmp[8]);
561 out_d2[cnt_ijk] = tmp;
562 }
563 }
564 }
565}

References Nektar::LibUtilities::Hex, Nektar::LibUtilities::NodalPrism, Nektar::LibUtilities::NodalPyr, Nektar::LibUtilities::NodalTet, Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, and Nektar::LibUtilities::Tet.

◆ PhysDerivDir1DKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, unsigned int DIR, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysDerivDir1DKernel ( const unsigned int  nq0,
const unsigned int  ncoord,
const simd_type *  df_ptr,
const simd_type *  in,
simd_type *  out 
)
static

One dimension, single component: scale a segment's standard derivative by the derivative factor of direction DIR.

Template Parameters
SHAPE_TYPEShape tag (segments only in 1D); unused.
APPENDAccumulate onto out instead of overwriting.
DEFORMEDDerivative factors vary point by point.
DIRCartesian component to produce.
simd_typeSIMD vector type of the interleaved group.
Parameters
nq0Quadrature points of the element.
ncoordCoordinate dimension, equal to the derivative factors per point; sets the per-point factor stride.
df_ptrDerivative factors of the element group.
inStandard derivative of the element group.
outCartesian component DIR.

Definition at line 183 of file PhysDerivBlockOpSerialAVXSumFacKernels.hpp.

188{
189 simd_type df_tmp;
190
191 if constexpr (!DEFORMED)
192 {
193 // unroll very small loops
194 df_tmp = df_ptr[DIR];
195 }
196
197 for (unsigned int j = 0; j < nq0; ++j)
198 {
199 if constexpr (DEFORMED)
200 {
201 df_tmp = df_ptr[j * ncoord + DIR]; // load 1x
202 }
203
204 // Multiply by derivative factors
205 if constexpr (APPEND)
206 {
207 out[j].fma(in[j], df_tmp);
208 }
209 else
210 {
211 out[j] = in[j] * df_tmp;
212 }
213 }
214}

References in, and out.

◆ PhysDerivDir2DKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, unsigned int DIR, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysDerivDir2DKernel ( const unsigned  nq0,
const unsigned  nq1,
const unsigned int  ncoord,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  df_ptr,
const simd_type *  tderiv0,
const simd_type *  tderiv1,
simd_type *  out 
)
static

Two dimensions, single component: as PhysDeriv2DKernel, but reading the collapsed derivatives from separate arrays and producing only the Cartesian component DIR.

Template Parameters
SHAPE_TYPEQuad, Tri or NodalTri.
APPENDAccumulate onto out instead of overwriting.
DEFORMEDDerivative factors vary point by point.
DIRCartesian component to produce; selects the derivative-factor rows 2 * DIR and 2 * DIR + 1.
simd_typeSIMD vector type of the interleaved group.
Parameters
nq0,nq1Quadrature points per direction.
ncoordCartesian components the factor array holds (coordDim); sets the per-point factor stride ndf = 2 * ncoord.
f0,f1Collapsed-coordinate factor tables, as in PhysDeriv2DKernel (triangles only).
df_ptrDerivative factors of the element group.
tderiv0Collapsed derivative along direction 0.
tderiv1Collapsed derivative along direction 1.
outCartesian component DIR.

Definition at line 355 of file PhysDerivBlockOpSerialAVXSumFacKernels.hpp.

360{
361 const unsigned int ndf = 2 * ncoord;
362 simd_type df_tmp[2];
363
364 if constexpr (!DEFORMED)
365 {
366 df_tmp[0] = df_ptr[2 * DIR];
367 df_tmp[1] = df_ptr[2 * DIR + 1];
368 }
369
370 for (unsigned int j = 0, cnt_ji = 0; j < nq1; ++j)
371 {
372 simd_type xfrm1;
373 if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
374 SHAPE_TYPE == LibUtilities::NodalTri)
375 {
376 xfrm1 = f1[j]; // Load 1x
377 }
378
379 for (unsigned int i = 0; i < nq0; ++i, ++cnt_ji)
380 {
381 simd_type d0, d1;
382 d0 = tderiv0[cnt_ji]; // Load 1x
383 d1 = tderiv1[cnt_ji]; // Load 1x
384
385 if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
386 SHAPE_TYPE == LibUtilities::NodalTri)
387 {
388 // Moving from collapsed to standard coordinates
389 simd_type xfrm0 = f0[i]; // Load 1x
390 d0 *= xfrm1;
391 d1.fma(d0, xfrm0);
392 }
393
394 // Multiply by derivative factors
395 if constexpr (DEFORMED)
396 {
397 df_tmp[0] = df_ptr[cnt_ji * ndf + 2 * DIR];
398 df_tmp[1] = df_ptr[cnt_ji * ndf + 2 * DIR + 1];
399 }
400
401 simd_type tmp;
402 tmp = d0 * df_tmp[0];
403 tmp.fma(d1, df_tmp[1]);
404 if constexpr (APPEND)
405 {
406 out[cnt_ji] += tmp;
407 }
408 else
409 {
410 out[cnt_ji] = tmp;
411 }
412 }
413 }
414}

References Nektar::LibUtilities::NodalTri, out, and Nektar::LibUtilities::Tri.

◆ PhysDerivDir3DKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, bool APPEND, bool DEFORMED, unsigned int DIR, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysDerivDir3DKernel ( const unsigned  nq0,
const unsigned  nq1,
const unsigned  nq2,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  f1m,
const simd_type *  f2,
const simd_type *  df_ptr,
const simd_type *  tderiv0,
const simd_type *  tderiv1,
const simd_type *  tderiv2,
simd_type *  out 
)
static

Three dimensions, single component: as PhysDeriv3DKernel, but reading the collapsed derivatives from separate arrays and producing only the Cartesian component DIR.

Template Parameters
SHAPE_TYPEHex, Tet, NodalTet, Prism, NodalPrism, Pyr or NodalPyr.
APPENDAccumulate onto out instead of overwriting.
DEFORMEDDerivative factors vary point by point.
DIRCartesian component to produce; selects the derivative-factor rows 3 * DIR + 0,1,2.
simd_typeSIMD vector type of the interleaved group.
Parameters
nq0,nq1,nq2Quadrature points per direction.
f0,f1,f1m,f2Collapsed-coordinate factor tables, as in PhysDeriv3DKernel.
df_ptrDerivative factors of the element group.
tderiv0Collapsed derivative along direction 0.
tderiv1Collapsed derivative along direction 1.
tderiv2Collapsed derivative along direction 2.
outCartesian component DIR.

Definition at line 590 of file PhysDerivBlockOpSerialAVXSumFacKernels.hpp.

596{
597 constexpr unsigned int ndf = 9u;
598 simd_type df_tmp[3];
599
600 if constexpr (!DEFORMED)
601 {
602 df_tmp[0] = df_ptr[3 * DIR];
603 df_tmp[1] = df_ptr[3 * DIR + 1];
604 df_tmp[2] = df_ptr[3 * DIR + 2];
605 }
606
607 for (unsigned int k = 0, cnt_ijk = 0; k < nq2; ++k)
608 {
609 simd_type xfrm_eta2;
610 if constexpr (SHAPE_TYPE != LibUtilities::Hex)
611 {
612 xfrm_eta2 = f2[k];
613 }
614
615 for (unsigned int j = 0; j < nq1; ++j)
616 {
617 simd_type xfrm_eta1, xfrm;
618 if constexpr (SHAPE_TYPE == LibUtilities::Pyr ||
619 SHAPE_TYPE == LibUtilities::NodalPyr)
620 {
621 xfrm_eta1 = f1[j];
622 }
623 else if constexpr (SHAPE_TYPE == LibUtilities::Tet ||
624 SHAPE_TYPE == LibUtilities::NodalTet)
625 {
626 xfrm_eta1 = f1[j];
627 xfrm = f1m[j] * xfrm_eta2;
628 }
629
630 for (unsigned int i = 0; i < nq0; ++i, ++cnt_ijk)
631 {
632 simd_type d0, d1, d2;
633 d0 = tderiv0[cnt_ijk];
634 d1 = tderiv1[cnt_ijk];
635 d2 = tderiv2[cnt_ijk];
636
637 simd_type xfrm_eta0, tmp;
638
639 // Chain-rule to construct cartesian derivatives for non
640 // Hex shapes
641 if constexpr ((SHAPE_TYPE == LibUtilities::Prism) ||
642 (SHAPE_TYPE == LibUtilities::NodalPrism))
643 {
644 d0 *= xfrm_eta2;
645 xfrm_eta0 = f0[i];
646 d2.fma(xfrm_eta0, d0);
647 }
648 else if constexpr (SHAPE_TYPE == LibUtilities::Pyr ||
649 SHAPE_TYPE == LibUtilities::NodalPyr)
650 {
651 d0 *= xfrm_eta2;
652 d1 *= xfrm_eta2;
653 xfrm_eta0 = f0[i];
654 d2.fma(xfrm_eta0, d0);
655 d2.fma(xfrm_eta1, d1);
656 }
657 else if constexpr (SHAPE_TYPE == LibUtilities::Tet ||
658 SHAPE_TYPE == LibUtilities::NodalTet)
659 {
660 d0 *= xfrm;
661 xfrm_eta0 = f0[i] * d0;
662 tmp = d1 * xfrm_eta2;
663 d1 = xfrm_eta0 + tmp;
664 xfrm_eta0.fma(tmp, xfrm_eta1);
665 d2 += xfrm_eta0;
666 }
667
668 if constexpr (DEFORMED)
669 {
670 df_tmp[0] = df_ptr[cnt_ijk * ndf + 3 * DIR];
671 df_tmp[1] = df_ptr[cnt_ijk * ndf + 3 * DIR + 1];
672 df_tmp[2] = df_ptr[cnt_ijk * ndf + 3 * DIR + 2];
673 }
674
675 tmp = d0 * df_tmp[0];
676 tmp.fma(d1, df_tmp[1]);
677 tmp.fma(d2, df_tmp[2]);
678 if constexpr (APPEND)
679 {
680 out[cnt_ijk] += tmp;
681 }
682 else
683 {
684 out[cnt_ijk] = tmp;
685 }
686 }
687 }
688 }
689}

References Nektar::LibUtilities::Hex, Nektar::LibUtilities::NodalPrism, Nektar::LibUtilities::NodalPyr, Nektar::LibUtilities::NodalTet, out, Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, and Nektar::LibUtilities::Tet.

◆ PhysDerivKernelLauncher() [1/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysDerivKernelLauncher ( const TPhysSizeParameter1D  sizeParam1D,
const typename simd_type::scalarType *  D0,
const simd_type *  df_ptr,
const simd_type *  in,
simd_type *  out[3] 
)
static

Differentiate one element group of a 1D block: the standard derivative into out[0], then all ncoord Cartesian derivatives in place.

Unpacks the size parameter – runtime or compile-time, both satisfying IsPhysSizeParameter1D_v as the static_assert enforces – forms du/dxi in out[0] with PhysDerivTensor1DKernel and hands the planes to PhysDeriv1DKernel, which scales that derivative by the group's ncoord derivative factors into out[0 .. ncoord-1].

Template Parameters
SHAPE_TYPEElement shape (segments only; unused).
DEFORMEDPer-point derivative factors.
TPhysSizeParameter1D1D physical-space size parameter (see ElmtHelper.hpp).
simd_typeSIMD vector type; one element per lane.
Parameters
sizeParam1DElement sizes: coordinate dimension and quadrature points.
D01D differentiation matrix of the direction.
df_ptrDerivative factors of the group.
inInput values of the group.
outThe Cartesian output planes of the group; out[0 .. ncoord-1] are written.

Definition at line 718 of file PhysDerivBlockOpSerialAVXSumFacKernels.hpp.

722{
723 static_assert(IsPhysSizeParameter1D_v<TPhysSizeParameter1D>,
724 "Template argument must be either of type "
725 "NonTemplatedPhysSizeParameter1D or "
726 "TemplatedPhysSizeParameter1D.");
727
728 const unsigned int ncoord = sizeParam1D.ncoord();
729 const unsigned int nq0 = sizeParam1D.nq0();
730
731 // Get the basic derivative.
732 PhysDerivTensor1DKernel(nq0, in, D0, out[0]);
733
734 // Calculate physical derivative.
735 PhysDeriv1DKernel<SHAPE_TYPE, DEFORMED>(nq0, ncoord, df_ptr, out);
736}

References in, out, and PhysDerivTensor1DKernel().

Referenced by Nektar::MultiRegions::detail::PhysDerivBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl().

◆ PhysDerivKernelLauncher() [2/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysDerivKernelLauncher ( const TPhysSizeParameter2D  sizeParam2D,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  df_ptr,
const simd_type *  in,
simd_type *  out[3] 
)
static

Differentiate one element group of a 2D block: the two collapsed derivatives into out[0] and out[1], then all ncoord Cartesian derivatives in place.

Unpacks the size parameter – runtime or compile-time, both satisfying IsPhysSizeParameter2D_v as the static_assert enforces – forms the two reference-direction derivatives with PhysDerivTensor2DKernel and hands the planes to PhysDeriv2DKernel, which applies the collapsed-coordinate correction for triangles (using f0 and f1) and contracts with the derivative factors into out[0 .. ncoord-1].

Template Parameters
SHAPE_TYPEElement shape; selects the collapsed-coordinate correction.
DEFORMEDPer-point derivative factors.
TPhysSizeParameter2D2D physical-space size parameter (see ElmtHelper.hpp).
simd_typeSIMD vector type; one element per lane.
Parameters
sizeParam2DElement sizes: coordinate dimension and quadrature points per direction.
D01D differentiation matrix of direction 0.
D11D differentiation matrix of direction 1.
f0Collapsed-coordinate factor (1 + eta_0)/2 at the direction-0 points (triangles only).
f1Collapsed-coordinate factor 2/(1 - eta_1) at the direction-1 points (triangles only).
df_ptrDerivative factors of the group, 2 * ncoord per element group, or per point when deformed.
inInput values of the group.
outThe Cartesian output planes of the group; out[0 .. ncoord-1] are written.

Definition at line 774 of file PhysDerivBlockOpSerialAVXSumFacKernels.hpp.

780{
781 static_assert(IsPhysSizeParameter2D_v<TPhysSizeParameter2D>,
782 "Template argument must be either of type "
783 "NonTemplatedPhysSizeParameter2D or "
784 "TemplatedPhysSizeParameter2D.");
785
786 const unsigned int ncoord = sizeParam2D.ncoord();
787 const unsigned int nq0 = sizeParam2D.nq0();
788 const unsigned int nq1 = sizeParam2D.nq1();
789
790 // Get the basic derivative.
791 PhysDerivTensor2DKernel(nq0, nq1, in, D0, D1, out[0], out[1]);
792
793 // Calculate physical derivative.
794 PhysDeriv2DKernel<SHAPE_TYPE, DEFORMED>(nq0, nq1, ncoord, f0, f1, df_ptr,
795 out);
796}

References in, out, and PhysDerivTensor2DKernel().

◆ PhysDerivKernelLauncher() [3/3]

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename TPhysSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysDerivKernelLauncher ( const TPhysSizeParameter3D  sizeParam3D,
const typename simd_type::scalarType *  D0,
const typename simd_type::scalarType *  D1,
const typename simd_type::scalarType *  D2,
const simd_type *  f0,
const simd_type *  f1,
const simd_type *  f1m,
const simd_type *  f2,
const simd_type *  df_ptr,
const simd_type *  in,
simd_type *  out[3] 
)
static

Differentiate one element group of a 3D block: the three collapsed derivatives into out[0 .. 2], then the three Cartesian derivatives in place.

Unpacks the size parameter – runtime or compile-time, both satisfying IsPhysSizeParameter3D_v as the static_assert enforces – forms the three reference-direction derivatives with PhysDerivTensor3DKernel and hands the planes to PhysDeriv3DKernel, which applies the collapsed-coordinate correction of the shape (using f0, f1, f1m and f2) and contracts with the nine derivative factors. No coordinate dimension is carried: a three-dimensional element always has three of both.

Template Parameters
SHAPE_TYPEElement shape; selects the collapsed-coordinate correction.
DEFORMEDPer-point derivative factors.
TPhysSizeParameter3D3D physical-space size parameter (see ElmtHelper.hpp).
simd_typeSIMD vector type; one element per lane.
Parameters
sizeParam3DElement sizes: quadrature points per direction.
D01D differentiation matrix of direction 0.
D11D differentiation matrix of direction 1.
D21D differentiation matrix of direction 2.
f0Collapsed-coordinate factor table of direction 0.
f1Collapsed-coordinate factor table of direction 1.
f1mSecond factor table of direction 1, used by the tetrahedral correction.
f2Collapsed-coordinate factor table of direction 2. All four are unused for hexahedra.
df_ptrDerivative factors of the group, nine per element group, or per point when deformed.
inInput values of the group.
outThe three Cartesian output planes of the group.

Definition at line 838 of file PhysDerivBlockOpSerialAVXSumFacKernels.hpp.

845{
846 static_assert(IsPhysSizeParameter3D_v<TPhysSizeParameter3D>,
847 "Template argument must be either of type "
848 "NonTemplatedPhysSizeParameter3D or "
849 "TemplatedPhysSizeParameter3D.");
850
851 const unsigned int nq0 = sizeParam3D.nq0();
852 const unsigned int nq1 = sizeParam3D.nq1();
853 const unsigned int nq2 = sizeParam3D.nq2();
854
855 // Get the basic derivative.
856 PhysDerivTensor3DKernel(nq0, nq1, nq2, in, D0, D1, D2, out[0], out[1],
857 out[2]);
858
859 // Calculate physical derivative.
860 PhysDeriv3DKernel<SHAPE_TYPE, DEFORMED>(nq0, nq1, nq2, f0, f1, f1m, f2,
861 df_ptr, out[0], out[1], out[2]);
862}

References in, out, and PhysDerivTensor3DKernel().

◆ PhysExtractEdgeN0EndPtsKernel()

template<bool END_PTS_COLLOCATED0, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysExtractEdgeN0EndPtsKernel ( const unsigned  edg,
const unsigned  nedg,
const unsigned  tstride,
const unsigned  nq0,
const unsigned  nq1,
const typename simd_type::scalarType *  ntbasis0,
const simd_type *  in,
simd_type *  out 
)
static

Stage one in two dimensions: reduce the volume block to the boundary lines of one or both direction-0 normal edges.

For every edge in [edg, nedg) this applies the direction-0 contraction \(v_q = \sum_p u_{pq}\, h_p(\pm 1)\), leaving one value per direction-1 volume point. Under END_PTS_COLLOCATED0 the table is a Kronecker delta and the contraction degenerates to reading the boundary column p = e * (nq0 - 1), which is why edg and nedg are absolute positions within the direction, 0 for the lower edge and 1 for the upper, rather than indices within this call.

out receives nq1 values per edge, edge-major, starting at index zero. On the general path of the glue kernel it is a workspace rather than the trace field.

Note
The general arm indexes ntbasis0[p * 2 + e], a hard-coded row stride of two. Direction 0 carries a trace pair in both two-dimensional shapes, so that does match the table here; the direction-1 twin makes the same assumption where it does not hold.
Template Parameters
END_PTS_COLLOCATED0Direction-0 volume rule contains the domain endpoints.
simd_typeSIMD vector type, one element per lane.
Parameters
edgPosition of the first edge within direction 0.
nedgOne past the position of the last edge.
tstrideRow stride of ntbasis0: the shape's number of traces in direction 0.
nq0,nq1Volume quadrature points per direction; the glue kernel forwards its own nq0 and nq1, which came from the entry point's nm0 and nm1.
ntbasis0eInterp table \(h_p(\pm 1)\) of direction 0.
inVolume field of this element group.
outExtracted values, nq1 per edge.

Definition at line 339 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

344{
345 if constexpr (END_PTS_COLLOCATED0) // copy end points values
346 {
347 for (unsigned e = edg, cnt_eq = 0; e < nedg; ++e)
348 {
349 unsigned offset = e * (nq0 - 1);
350 for (unsigned q = 0; q < nq1; ++q, ++cnt_eq)
351 {
352 out[cnt_eq] = in[q * nq0 + offset];
353 }
354 }
355 }
356 else // interpolate to end points
357 {
358 for (unsigned e = edg, cnt_eq = 0; e < nedg; ++e)
359 {
360 for (unsigned q = 0; q < nq1; ++q, ++cnt_eq)
361 {
362 simd_type tmp = in[q * nq0] * ntbasis0[e];
363
364 for (unsigned p = 1; p < nq0; ++p)
365 {
366 tmp.fma(in[p + q * nq0], ntbasis0[p * tstride + e]);
367 }
368 out[cnt_eq] = tmp;
369 }
370 }
371 }
372}

References e, in, and out.

◆ PhysExtractEdgeN0Kernel()

template<bool END_PTS_COLLOCATED0, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysExtractEdgeN0Kernel ( const unsigned  edg,
const unsigned  nedg,
const unsigned  tstride,
const unsigned  nq0,
const unsigned  nq1,
const typename simd_type::scalarType *  ntbasis0,
const unsigned  nq00,
const typename simd_type::scalarType *  tbasis00,
simd_type *  wsp,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated00 = false 
)
static

Glue for the direction-0 normal edges: extract, then interpolate.

Runs PhysExtractEdgeN0EndPtsKernel over the edges in [edg, nedg) and, unless the in-edge direction is collocated, follows it with PhysInterpEdgeKernel from the direction-1 volume points onto the edge's nq00 trace points. When it is collocated the extraction writes straight to out and wsp is untouched. The in-edge direction of a direction-0 normal is direction 1, which is why the interpolation is set up as nq1 -> nq00 with the direction's tangential-0 table.

Note
isCollocated00 is not forwarded to PhysInterpEdgeKernel: the interpolating branch is precisely the one in which the flag is false, so that kernel is always entered on its general arm.
The plain-comment header above this template names direction 1 throughout, and the table and count it names are the direction-1 ones. This kernel serves the direction-0 normals.
Template Parameters
END_PTS_COLLOCATED0Direction-0 volume rule contains the domain endpoints; forwarded to stage one.
simd_typeSIMD vector type, one element per lane.
Parameters
edgPosition of the first edge within direction 0; 0 and nedg 2 covers the pair, and one edge is either (0, 1) or (1, 2).
nedgOne past the position of the last edge; at most 2, as the debug assertion states.
tstrideRow stride of ntbasis0: the shape's number of traces in direction 0.
nq0,nq1Volume quadrature points per direction; the entry point passes its nm0 and nm1.
ntbasis0eInterp table \(h_p(\pm 1)\) of direction 0.
nq00Trace quadrature points along a direction-0 normal edge.
tbasis00eInterp table onto those trace points.
wspScratch for the extracted values, nq1 per edge; used only on the interpolating path.
inVolume field of this element group.
outTrace values, nq00 per edge on the interpolating path and nq1 per edge on the collocated one, where the two counts agree.
isCollocated00Edge trace points coincide with the direction-1 volume points.

Definition at line 503 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

509{
510 ASSERTL1(nedg <= 2, "nedg > 2 is not valid");
511
512 if (isCollocated00)
513 {
514 PhysExtractEdgeN0EndPtsKernel<END_PTS_COLLOCATED0>(
515 edg, nedg, tstride, nq0, nq1, ntbasis0, in, out);
516 }
517 else // interpolate
518 {
519 PhysExtractEdgeN0EndPtsKernel<END_PTS_COLLOCATED0>(
520 edg, nedg, tstride, nq0, nq1, ntbasis0, in, wsp);
521
522 PhysInterpEdgeKernel(nedg - edg, nq1, nq00, tbasis00, wsp, out);
523 }
524}

References ASSERTL1.

◆ PhysExtractEdgeN1EndPtsKernel()

template<bool END_PTS_COLLOCATED1, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysExtractEdgeN1EndPtsKernel ( const unsigned  edg,
const unsigned  nedg,
const unsigned  tstride,
const unsigned  nq0,
const unsigned  nq1,
const typename simd_type::scalarType *  ntbasis1,
const simd_type *  in,
simd_type *  out 
)
static

Stage one in two dimensions: the direction-1 twin of PhysExtractEdgeN0EndPtsKernel.

Applies \(v_p = \sum_q u_{pq}\, h_q(\pm 1)\) over the edges in [edg, nedg), leaving one value per direction-0 volume point. Under END_PTS_COLLOCATED1 the delta property reduces this to reading the boundary row q = e * (nq1 - 1), so again edg and nedg are absolute positions within the direction. out receives nq0 values per edge, edge-major, from index zero.

Note
The general arm indexes ntbasis1[q * 2 + e], a hard-coded row stride of two. That is the table's stride for a quadrilateral, whose direction 1 carries a trace pair, but not for a triangle: there direction 1 has a single trace, the eInterp table has one column, and this arm reads the wrong entries and past the end of the table. A triangle only reaches it if its direction-1 rule contains no domain endpoints; the Radau-type rule the collapsed direction normally carries sets END_PTS_COLLOCATED1 and takes the other arm.
Template Parameters
END_PTS_COLLOCATED1Direction-1 volume rule contains the domain endpoints.
simd_typeSIMD vector type, one element per lane.
Parameters
edgPosition of the first edge within direction 1.
nedgOne past the position of the last edge.
tstrideRow stride of ntbasis1: the shape's number of traces in direction 1.
nq0,nq1Volume quadrature points per direction; the glue kernel forwards its own nq0 and nq1, which came from the entry point's nm0 and nm1.
ntbasis1eInterp table \(h_q(\pm 1)\) of direction 1.
inVolume field of this element group.
outExtracted values, nq0 per edge.

Definition at line 410 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

415{
416 if constexpr (END_PTS_COLLOCATED1) // copy end points values
417 {
418 for (unsigned e = edg, cnt_ep = 0; e < nedg; ++e)
419 {
420 unsigned offset = e * (nq0 * (nq1 - 1));
421 for (unsigned p = 0; p < nq0; ++p, ++cnt_ep)
422 {
423 out[cnt_ep] = in[p + offset];
424 }
425 }
426 }
427 else // interpolate to end points
428 {
429 for (unsigned e = edg, cnt_ep = 0; e < nedg; ++e)
430 {
431 for (unsigned p = 0; p < nq0; ++p, ++cnt_ep)
432 {
433 simd_type tmp = in[p] * ntbasis1[e];
434
435 for (unsigned q = 1; q < nq1; ++q)
436 {
437 tmp.fma(in[p + q * nq0], ntbasis1[q * tstride + e]);
438 }
439 out[cnt_ep] = tmp;
440 }
441 }
442 }
443}

References e, in, and out.

◆ PhysExtractEdgeN1Kernel()

template<bool END_PTS_COLLOCATED1, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysExtractEdgeN1Kernel ( const unsigned  edg,
const unsigned  nedg,
const unsigned  tstride,
const unsigned  nq0,
const unsigned  nq1,
const typename simd_type::scalarType *  ntbasis1,
const unsigned  nq10,
const typename simd_type::scalarType *  tbasis10,
simd_type *  wsp,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated10 = false 
)
static

Glue for the direction-1 normal edges: the direction-1 twin of PhysExtractEdgeN0Kernel.

The in-edge direction of a direction-1 normal is direction 0, so the extraction leaves nq0 values per edge and the interpolation runs nq0 -> nq10 with the direction's tangential-0 table. Everything else, including the collocated shortcut and the unforwarded flag, matches the direction-0 kernel.

Template Parameters
END_PTS_COLLOCATED1Direction-1 volume rule contains the domain endpoints; forwarded to stage one.
simd_typeSIMD vector type, one element per lane.
Parameters
edgPosition of the first edge within direction 1.
nedgOne past the position of the last edge; at most 2, as the debug assertion states. A triangle has a single direction-1 edge and is called with (0, 1).
tstrideRow stride of ntbasis1: the shape's number of traces in direction 1.
nq0,nq1Volume quadrature points per direction; the entry point passes its nm0 and nm1.
ntbasis1eInterp table \(h_q(\pm 1)\) of direction 1.
nq10Trace quadrature points along a direction-1 normal edge.
tbasis10eInterp table onto those trace points.
wspScratch for the extracted values, nq0 per edge; used only on the interpolating path.
inVolume field of this element group.
outTrace values, nq10 per edge on the interpolating path and nq0 per edge on the collocated one, where the two counts agree.
isCollocated10Edge trace points coincide with the direction-0 volume points.

Definition at line 574 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

580{
581 ASSERTL1(nedg <= 2, "nedg > 2 is not valid");
582
583 if (isCollocated10)
584 {
585 PhysExtractEdgeN1EndPtsKernel<END_PTS_COLLOCATED1>(
586 edg, nedg, tstride, nq0, nq1, ntbasis1, in, out);
587 }
588 else // enterpolate
589 {
590 PhysExtractEdgeN1EndPtsKernel<END_PTS_COLLOCATED1>(
591 edg, nedg, tstride, nq0, nq1, ntbasis1, in, wsp);
592
593 PhysInterpEdgeKernel(nedg - edg, nq0, nq10, tbasis10, wsp, out);
594 }
595}

◆ PhysExtractEndFacesN0Kernel()

template<bool END_PTS_COLLOCATED0, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysExtractEndFacesN0Kernel ( const unsigned  fac,
const unsigned  nface,
const unsigned  tstride,
const unsigned  nq0,
const unsigned  nq1,
const unsigned  nq2,
const typename simd_type::scalarType *  ntbasis0,
const simd_type *  in,
simd_type *  out 
)
static

Stage one in three dimensions: reduce the volume block to the boundary planes of one or both direction-0 normal faces.

For every face in [fac, nface) this applies the direction-0 contraction \(v_{jk} = \sum_i u_{ijk}\, h_i(\pm 1)\), leaving one value per point of the (nq1, nq2) volume plane. Under END_PTS_COLLOCATED0 the table is a Kronecker delta and this reduces to reading the boundary plane i = f * (nq0 - 1), so fac and nface are absolute positions within the direction, 0 for the lower face and 1 for the upper.

out receives nq1 * nq2 values per face, face-major, from index zero, with the direction-1 index varying fastest – the ordering PhysInterpFaceKernel expects when it is given (nq1, nq2) as its source counts.

Template Parameters
END_PTS_COLLOCATED0Direction-0 volume rule contains the domain endpoints.
simd_typeSIMD vector type, one element per lane.
Parameters
facPosition of the first face within direction 0.
nfaceOne past the position of the last face.
tstrideRow stride of ntbasis0: the number of traces the direction has, which is not nface when the call covers only part of the direction.
nq0,nq1,nq2Volume quadrature points per direction; the glue kernel forwards its own nq0, nq1 and nq2, which came from the entry point's nm0, nm1 and nm2.
ntbasis0eInterp table \(h_i(\pm 1)\) of direction 0.
inVolume field of this element group.
outExtracted planes, nq1 * nq2 per face.

Definition at line 826 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

831{
832 if constexpr (END_PTS_COLLOCATED0) // copy end faces
833 {
834 unsigned nq0nq1 = nq0 * nq1;
835 for (unsigned f = fac, cnt_fkj = 0; f < nface; ++f)
836 {
837 unsigned offset = f * (nq0 - 1);
838
839 for (unsigned k = 0; k < nq2; ++k)
840 {
841 unsigned offset_fk = k * nq0nq1 + offset;
842
843 for (unsigned j = 0; j < nq1; ++j, ++cnt_fkj)
844 {
845 out[cnt_fkj] = in[offset_fk + j * nq0];
846 }
847 }
848 }
849 }
850 else // interpolate in dir 0
851 {
852 // No f * (nq0 - 1) offset here, unlike the collocated branch above.
853 // There it selects the i = 0 or i = nq0 - 1 plane; here the whole
854 // dir 0 line is summed for every face and the face is selected by
855 // ntbasis0 alone. With the offset, face 1 started at the last point
856 // and ran off the end of the row.
857 unsigned nq0nq1 = nq0 * nq1;
858 for (unsigned f = fac, cnt_fkj = 0; f < nface; ++f)
859 {
860 for (unsigned k = 0; k < nq2; ++k)
861 {
862 unsigned offset_fk = k * nq0nq1;
863 for (unsigned j = 0; j < nq1; ++j, ++cnt_fkj)
864 {
865 unsigned offset_fkp = offset_fk + j * nq0;
866 simd_type tmp = in[offset_fkp] * ntbasis0[f];
867 for (unsigned p = 1; p < nq0; ++p)
868 {
869 tmp.fma(in[offset_fkp + p], ntbasis0[p * tstride + f]);
870 }
871 out[cnt_fkj] = tmp;
872 }
873 }
874 }
875 }
876}

◆ PhysExtractEndFacesN1Kernel()

template<bool END_PTS_COLLOCATED1, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysExtractEndFacesN1Kernel ( const unsigned  fac,
const unsigned  nface,
const unsigned  tstride,
const unsigned  nq0,
const unsigned  nq1,
const unsigned  nq2,
const typename simd_type::scalarType *  ntbasis1,
const simd_type *  in,
simd_type *  out 
)
static

Stage one in three dimensions: the direction-1 twin of PhysExtractEndFacesN0Kernel.

Applies \(v_{ik} = \sum_j u_{ijk}\, h_j(\pm 1)\) over the faces in [fac, nface), leaving one value per point of the (nq0, nq2) volume plane, with the direction-0 index varying fastest. Under END_PTS_COLLOCATED1 the delta property reduces this to reading the boundary plane j = f * (nq1 - 1).

Template Parameters
END_PTS_COLLOCATED1Direction-1 volume rule contains the domain endpoints.
simd_typeSIMD vector type, one element per lane.
Parameters
facPosition of the first face within direction 1.
nfaceOne past the position of the last face.
tstrideRow stride of ntbasis1: the number of traces the direction has, which is not nface when the call covers only part of the direction.
nq0,nq1,nq2Volume quadrature points per direction; the glue kernel forwards its own nq0, nq1 and nq2, which came from the entry point's nm0, nm1 and nm2.
ntbasis1eInterp table \(h_j(\pm 1)\) of direction 1.
inVolume field of this element group.
outExtracted planes, nq0 * nq2 per face.

Definition at line 905 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

910{
911 if constexpr (END_PTS_COLLOCATED1) // copy end faces
912 {
913 unsigned nq0nq1 = nq0 * nq1;
914 for (unsigned f = fac, cnt_fki = 0; f < nface; ++f)
915 {
916 unsigned offset = f * nq0 * (nq1 - 1);
917
918 for (unsigned k = 0; k < nq2; ++k)
919 {
920 unsigned offset_ki = k * nq0nq1 + offset;
921 for (unsigned i = 0; i < nq0; ++i, ++cnt_fki)
922 {
923 out[cnt_fki] = in[i + offset_ki];
924 }
925 }
926 }
927 }
928 else // interpolate in dir 1
929 {
930 // Two fixes against the collocated branch above. There is no
931 // f * nq0 * (nq1 - 1) offset, for the same reason as dir 0. And the
932 // q = 0 term needs the + i that the q >= 1 terms already carry,
933 // otherwise every point on the face takes its leading contribution
934 // from i = 0.
935 unsigned nq0nq1 = nq0 * nq1;
936 for (unsigned f = fac, cnt_fki = 0; f < nface; ++f)
937 {
938 for (unsigned k = 0; k < nq2; ++k)
939 {
940 unsigned offset_ki = k * nq0nq1;
941 for (unsigned i = 0; i < nq0; ++i, ++cnt_fki)
942 {
943 simd_type tmp = in[offset_ki + i] * ntbasis1[f];
944
945 for (unsigned q = 1; q < nq1; ++q)
946 {
947 tmp.fma(in[offset_ki + i + q * nq0],
948 ntbasis1[q * tstride + f]);
949 }
950 out[cnt_fki] = tmp;
951 }
952 }
953 }
954 }
955}

◆ PhysExtractEndFacesN2Kernel()

template<bool END_PTS_COLLOCATED2, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysExtractEndFacesN2Kernel ( const unsigned  fac,
const unsigned  nface,
const unsigned  tstride,
const unsigned  nq0,
const unsigned  nq1,
const unsigned  nq2,
const typename simd_type::scalarType *  ntbasis2,
const simd_type *  in,
simd_type *  out 
)
static

Stage one in three dimensions: the direction-2 twin of PhysExtractEndFacesN0Kernel.

Applies \(v_{ij} = \sum_k u_{ijk}\, h_k(\pm 1)\) over the faces in [fac, nface), leaving one value per point of the (nq0, nq1) volume plane, with the direction-0 index varying fastest. Under END_PTS_COLLOCATED2 the delta property reduces this to reading the boundary plane k = f * (nq2 - 1). The loop variable is named k here although it is the face position, the direction-2 index being the one summed over.

Template Parameters
END_PTS_COLLOCATED2Direction-2 volume rule contains the domain endpoints.
simd_typeSIMD vector type, one element per lane.
Parameters
facPosition of the first face within direction 2.
nfaceOne past the position of the last face.
tstrideRow stride of ntbasis2: the number of traces the direction has, which is not nface when the call covers only part of the direction.
nq0,nq1,nq2Volume quadrature points per direction; the glue kernel forwards its own nq0, nq1 and nq2, which came from the entry point's nm0, nm1 and nm2.
ntbasis2eInterp table \(h_k(\pm 1)\) of direction 2.
inVolume field of this element group.
outExtracted planes, nq0 * nq1 per face.

Definition at line 986 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

991{
992 if constexpr (END_PTS_COLLOCATED2) // copy end faces
993 {
994 for (unsigned k = fac, cnt_kji = 0; k < nface; ++k)
995 {
996 unsigned offset = k * nq0 * nq1 * (nq2 - 1);
997 for (unsigned j = 0, cnt_ji = 0; j < nq1; ++j)
998 {
999 for (unsigned i = 0; i < nq0; ++i, ++cnt_kji, ++cnt_ji)
1000 {
1001 out[cnt_kji] = in[cnt_ji + offset];
1002 }
1003 }
1004 }
1005 }
1006 else // interplolate in dir 2
1007 {
1008 unsigned nq01 = nq0 * nq1;
1009 for (unsigned k = fac, cnt_kji = 0; k < nface; ++k)
1010 {
1011 for (unsigned j = 0, cnt_ji = 0; j < nq1; ++j)
1012 {
1013 for (unsigned i = 0; i < nq0; ++i, ++cnt_kji, ++cnt_ji)
1014 {
1015 simd_type tmp = in[cnt_ji] * ntbasis2[k];
1016
1017 for (unsigned r = 1; r < nq2; ++r)
1018 {
1019 tmp.fma(in[cnt_ji + r * nq01],
1020 ntbasis2[r * tstride + k]);
1021 }
1022 out[cnt_kji] = tmp;
1023 }
1024 }
1025 }
1026 }
1027}

◆ PhysExtractFaceN0Kernel()

template<bool END_PTS_COLLOCATED0, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysExtractFaceN0Kernel ( const unsigned  fac,
const unsigned  nfac,
const unsigned  tstride,
const unsigned  nq0,
const unsigned  nq1,
const unsigned  nq2,
const typename simd_type::scalarType *  ntbasis0,
const unsigned  nq00,
const unsigned  nq01,
const typename simd_type::scalarType *  tbasis00,
const typename simd_type::scalarType *  tbasis01,
simd_type *  wsp1,
simd_type *  wsp2,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated00,
const bool  isCollocated01 
)
static

Glue for the direction-0 normal faces: extract, then interpolate.

Runs PhysExtractEndFacesN0Kernel over the faces in [fac, nfac) and, unless both tangential directions are collocated, follows it with PhysInterpFaceKernel from the (nq1, nq2) volume plane onto the face's (nq00, nq01) trace grid. When both are collocated the extraction writes straight to out and neither workspace is touched. The tangential directions of a direction-0 normal are directions 1 and 2, which is why the interpolation is set up as (nq1, nq2) -> (nq00, nq01) with the direction's two tangential tables.

Template Parameters
END_PTS_COLLOCATED0Direction-0 volume rule contains the domain endpoints; forwarded to stage one.
simd_typeSIMD vector type, one element per lane.
Parameters
facPosition of the first face within direction 0; (0, 2) covers the pair, one face is either (0, 1) or (1, 2).
nfacOne past the position of the last face.
tstrideRow stride of the ntbasis table, forwarded to stage one: the number of traces the direction has.
nq0,nq1,nq2Volume quadrature points per direction; the entry point passes its nm0, nm1 and nm2.
ntbasis0eInterp table \(h_i(\pm 1)\) of direction 0.
nq00,nq01Trace quadrature points of a direction-0 normal face, per tangential direction.
tbasis00eInterp table of tangential direction 0 (volume direction 1).
tbasis01eInterp table of tangential direction 1 (volume direction 2).
wsp1Scratch for the extracted planes, nq1 * nq2 per face.
wsp2Scratch for the tangential-0 interpolation pass.
inVolume field of this element group.
outTrace values, nq00 * nq01 per face.
isCollocated00Tangential-0 trace points are the direction-1 volume points.
isCollocated01Tangential-1 trace points are the direction-2 volume points.

Definition at line 1074 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

1082{
1083 if (isCollocated00 && isCollocated01) // can just extract points directly
1084 {
1085 PhysExtractEndFacesN0Kernel<END_PTS_COLLOCATED0>(
1086 fac, nfac, tstride, nq0, nq1, nq2, ntbasis0, in, out);
1087 }
1088 else
1089 {
1090 PhysExtractEndFacesN0Kernel<END_PTS_COLLOCATED0>(
1091 fac, nfac, tstride, nq0, nq1, nq2, ntbasis0, in, wsp1);
1092
1093 PhysInterpFaceKernel(nfac - fac, nq1, nq2, nq00, nq01, tbasis00,
1094 tbasis01, wsp2, wsp1, out, isCollocated00,
1095 isCollocated01);
1096 }
1097}

◆ PhysExtractFaceN1Kernel()

template<bool END_PTS_COLLOCATED1, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysExtractFaceN1Kernel ( const unsigned  fac,
const unsigned  nfac,
const unsigned  tstride,
const unsigned  nq0,
const unsigned  nq1,
const unsigned  nq2,
const typename simd_type::scalarType *  ntbasis1,
const unsigned  nq10,
const unsigned  nq11,
const typename simd_type::scalarType *  tbasis10,
const typename simd_type::scalarType *  tbasis11,
simd_type *  wsp1,
simd_type *  wsp2,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated10,
const bool  isCollocated11 
)
static

Glue for the direction-1 normal faces: the direction-1 twin of PhysExtractFaceN0Kernel.

The tangential directions of a direction-1 normal are directions 0 and 2, so the interpolation runs (nq0, nq2) -> (nq10, nq11). Everything else, including the both-collocated shortcut, matches the direction-0 kernel.

Template Parameters
END_PTS_COLLOCATED1Direction-1 volume rule contains the domain endpoints; forwarded to stage one.
simd_typeSIMD vector type, one element per lane.
Parameters
facPosition of the first face within direction
  1. A tetrahedron has a single direction-1 face and is called with (0, 1).
nfacOne past the position of the last face.
tstrideRow stride of the ntbasis table, forwarded to stage one: the number of traces the direction has.
nq0,nq1,nq2Volume quadrature points per direction; the entry point passes its nm0, nm1 and nm2.
ntbasis1eInterp table \(h_j(\pm 1)\) of direction 1.
nq10,nq11Trace quadrature points of a direction-1 normal face, per tangential direction.
tbasis10eInterp table of tangential direction 0 (volume direction 0).
tbasis11eInterp table of tangential direction 1 (volume direction 2).
wsp1Scratch for the extracted planes, nq0 * nq2 per face.
wsp2Scratch for the tangential-0 interpolation pass.
inVolume field of this element group.
outTrace values, nq10 * nq11 per face.
isCollocated10Tangential-0 trace points are the direction-0 volume points.
isCollocated11Tangential-1 trace points are the direction-2 volume points.

Definition at line 1140 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

1148{
1149 if (isCollocated10 && isCollocated11) // can just extract points directly
1150 {
1151 PhysExtractEndFacesN1Kernel<END_PTS_COLLOCATED1>(
1152 fac, nfac, tstride, nq0, nq1, nq2, ntbasis1, in, out);
1153 }
1154 else
1155 {
1156 PhysExtractEndFacesN1Kernel<END_PTS_COLLOCATED1>(
1157 fac, nfac, tstride, nq0, nq1, nq2, ntbasis1, in, wsp1);
1158
1159 PhysInterpFaceKernel(nfac - fac, nq0, nq2, nq10, nq11, tbasis10,
1160 tbasis11, wsp2, wsp1, out, isCollocated10,
1161 isCollocated11);
1162 }
1163}

◆ PhysExtractFaceN2Kernel()

template<bool END_PTS_COLLOCATED2, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysExtractFaceN2Kernel ( const unsigned  fac,
const unsigned  nfac,
const unsigned  tstride,
const unsigned  nq0,
const unsigned  nq1,
const unsigned  nq2,
const typename simd_type::scalarType *  ntbasis2,
const unsigned  nq20,
const unsigned  nq21,
const typename simd_type::scalarType *  tbasis20,
const typename simd_type::scalarType *  tbasis21,
simd_type *  wsp1,
simd_type *  wsp2,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated20,
const bool  isCollocated21 
)
static

Glue for the direction-2 normal faces: the direction-2 twin of PhysExtractFaceN0Kernel.

The tangential directions of a direction-2 normal are directions 0 and 1, so the interpolation runs (nq0, nq1) -> (nq20, nq21). Everything else, including the both-collocated shortcut, matches the direction-0 kernel.

Template Parameters
END_PTS_COLLOCATED2Direction-2 volume rule contains the domain endpoints; forwarded to stage one.
simd_typeSIMD vector type, one element per lane.
Parameters
facPosition of the first face within direction
  1. Prism, pyramid and tetrahedron collapse this direction to a single face and are called with (0, 1).
nfacOne past the position of the last face.
tstrideRow stride of the ntbasis table, forwarded to stage one: the number of traces the direction has.
nq0,nq1,nq2Volume quadrature points per direction; the entry point passes its nm0, nm1 and nm2.
ntbasis2eInterp table \(h_k(\pm 1)\) of direction 2.
nq20,nq21Trace quadrature points of a direction-2 normal face, per tangential direction.
tbasis20eInterp table of tangential direction 0 (volume direction 0).
tbasis21eInterp table of tangential direction 1 (volume direction 1).
wsp1Scratch for the extracted planes, nq0 * nq1 per face.
wsp2Scratch for the tangential-0 interpolation pass.
inVolume field of this element group.
outTrace values, nq20 * nq21 per face.
isCollocated20Tangential-0 trace points are the direction-0 volume points.
isCollocated21Tangential-1 trace points are the direction-1 volume points.

Definition at line 1207 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

1215{
1216 if (isCollocated20 && isCollocated21) // can just extract points directly
1217 {
1218 PhysExtractEndFacesN2Kernel<END_PTS_COLLOCATED2>(
1219 fac, nfac, tstride, nq0, nq1, nq2, ntbasis2, in, out);
1220 }
1221 else
1222 {
1223 PhysExtractEndFacesN2Kernel<END_PTS_COLLOCATED2>(
1224 fac, nfac, tstride, nq0, nq1, nq2, ntbasis2, in, wsp1);
1225
1226 PhysInterpFaceKernel(nfac - fac, nq0, nq1, nq20, nq21, tbasis20,
1227 tbasis21, wsp2, wsp1, out, isCollocated20,
1228 isCollocated21);
1229 }
1230}

◆ PhysInterpEdgeKernel()

template<typename TData , typename TScalar >
static NEK_HOSTDEVICE_INLINE void Nektar::MultiRegions::detail::PhysInterpEdgeKernel ( const unsigned  nedg,
const unsigned  nqfrom,
const unsigned  nqto,
const TScalar *  tbasis,
const TData *  in,
TData *  out,
const bool  isCollocated = false 
)
static

Stage two in two dimensions: interpolate the extracted edge values from the volume points of the in-edge direction onto that edge's trace quadrature points.

For every edge and every trace point i, out[i] = sum_p in[p] * tbasis[p * nqto + i]. The edges lie consecutively in both buffers, nqfrom entries each on input and nqto each on output. Under isCollocated the trace points are the volume points, the table is the identity and the call is a copy of nqto * nedg values; the debug assertion states the precondition that makes that legal.

Note
nedg is a count here, unlike the extraction kernels, where it is one past the position of the last edge. The glue kernels pass nedg - edg.
Template Parameters
TDataElement data type: a scalar, or a SIMD vector with one element per lane. The accumulate follows it.
TScalarScalar type of the interpolation table, which is never vectorised.
Parameters
nedgNumber of edges in the buffers.
nqfromVolume quadrature points of the in-edge direction, per edge on input.
nqtoTrace quadrature points, per edge on output.
tbasiseInterp table \(h_p(\xi^{tr}_i)\) of the in-edge direction, indexed tbasis[p * nqto + i].
inExtracted values from stage one.
outValues at the trace quadrature points.
isCollocatedTrace points coincide with the volume points.

Definition at line 82 of file PhysTraceExtractKernels.hpp.

86{
87 if (isCollocated)
88 {
89 NEK_HOSTDEVICE_ASSERTL1(nqto == nqfrom, "Basis is not collocated");
90 for (unsigned i = 0; i < nqto * nedg; ++i)
91 {
92 out[i] = in[i];
93 }
94 }
95 else
96 {
97 unsigned offset = 0;
98 for (unsigned e = 0, cnt_ei = 0; e < nedg; ++e)
99 {
100 for (unsigned i = 0; i < nqto; ++i, ++cnt_ei)
101 {
102 TData tmp = in[offset] * tbasis[i];
103 for (unsigned p = 1; p < nqfrom; ++p)
104 {
105 if constexpr (std::is_floating_point_v<TData>)
106 {
107 tmp += in[offset + p] * tbasis[p * nqto + i];
108 }
109 else
110 {
111 tmp.fma(in[offset + p], tbasis[p * nqto + i]);
112 }
113 }
114 out[cnt_ei] = tmp;
115 }
116 offset += nqfrom; // offset to 2nd edge if required
117 }
118 }
119}
#define NEK_HOSTDEVICE_ASSERTL1(condition, msg)

References e, in, NEK_HOSTDEVICE_ASSERTL1, and out.

◆ PhysInterpFaceKernel()

template<typename TData , typename TScalar >
static NEK_HOSTDEVICE_INLINE void Nektar::MultiRegions::detail::PhysInterpFaceKernel ( const unsigned  nfac,
const unsigned  nqfrom0,
const unsigned  nqfrom1,
const unsigned  nqto0,
const unsigned  nqto1,
const TScalar *  tbasis0,
const TScalar *  tbasis1,
TData *  wsp,
const TData *  in,
TData *  out,
const bool  isCollocated0,
const bool  isCollocated1 
)
static

Stage two in three dimensions: interpolate the extracted face planes from the volume points of the two tangential directions onto the face's trace quadrature points.

The face contraction is a tensor product, so it runs as two one-dimensional passes, direction 0 first. Which passes are needed depends on the two collocation flags, giving three arms:

  • isCollocated1: direction 1 is already the trace rule, so only the tangential-0 pass runs, straight from in to out;
  • isCollocated0: only the tangential-1 pass runs, again straight to out;
  • neither: the tangential-0 pass writes wsp and the tangential-1 pass reads it.

Both directions collocated does not reach here: the glue kernels take their direct branch and do not call this at all.

Faces lie consecutively in every buffer, nqfrom0 * nqfrom1 entries each on input and nqto0 * nqto1 each on output, direction 0 varying fastest throughout.

Template Parameters
TDataElement data type: a scalar, or a SIMD vector with one element per lane. The accumulate follows it.
TScalarScalar type of the interpolation tables.
Parameters
nfacNumber of faces in the buffers; a count here, unlike the extraction kernels, where it is one past the last face position. The glue kernels pass nfac - fac.
nqfrom0,nqfrom1Volume quadrature points of the two tangential directions, per face on input.
nqto0,nqto1Trace quadrature points, per face on output.
tbasis0,tbasis1eInterp tables of the two tangential directions, indexed tbasis0[p * nqto0 + i] and tbasis1[q * nqto1 + j].
wspScratch for the tangential-0 pass; used only when both passes run.
inExtracted planes from stage one.
outValues at the face's trace quadrature points.
isCollocated0Tangential-0 trace points coincide with the volume points of that direction.
isCollocated1Tangential-1 trace points coincide with the volume points of that direction.

Definition at line 167 of file PhysTraceExtractKernels.hpp.

172{
173 if (isCollocated1) // interpolate dir 0 direction directly to output
174 {
175 NEK_HOSTDEVICE_ASSERTL1(nqfrom1 == nqto1, "Basis is not collocated");
176 for (unsigned f = 0, cnt_fjp = 0, cnt_fji = 0; f < nfac; ++f)
177 {
178 for (unsigned j = 0; j < nqfrom1; ++j)
179 {
180 for (unsigned i = 0; i < nqto0; ++i, ++cnt_fji)
181 {
182 TData tmp = in[cnt_fjp] * tbasis0[i];
183 for (unsigned p = 1; p < nqfrom0; ++p)
184 {
185 if constexpr (std::is_floating_point_v<TData>)
186 {
187 tmp += in[cnt_fjp + p] * tbasis0[p * nqto0 + i];
188 }
189 else
190 {
191 tmp.fma(in[cnt_fjp + p], tbasis0[p * nqto0 + i]);
192 }
193 }
194 out[cnt_fji] = tmp;
195 }
196 cnt_fjp += nqfrom0;
197 }
198 }
199 }
200 else if (isCollocated0) // interplate in dir 1
201 {
202 NEK_HOSTDEVICE_ASSERTL1(nqfrom0 == nqto0, "Basis is not collocated");
203 for (unsigned f = 0; f < nfac; ++f)
204 {
205 for (unsigned i = 0; i < nqto0; ++i)
206 {
207 for (unsigned j = 0; j < nqto1; ++j)
208 {
209 TData tmp = in[i] * tbasis1[j];
210 for (unsigned q = 1; q < nqfrom1; ++q)
211 {
212 if constexpr (std::is_floating_point_v<TData>)
213 {
214 tmp += in[i + q * nqto0] * tbasis1[q * nqto1 + j];
215 }
216 else
217 {
218 tmp.fma(in[i + q * nqto0], tbasis1[q * nqto1 + j]);
219 }
220 }
221
222 out[i + j * nqto0] = tmp;
223 }
224 }
225 in += nqto0 * nqfrom1;
226 out += nqto0 * nqto1;
227 }
228 }
229 else // interpolation in dir 0 and dir 1
230 {
231 // dir 0 interpolation to wsp
232 for (unsigned f = 0, cnt_fjp = 0, cnt_fji = 0; f < nfac; ++f)
233 {
234 for (unsigned j = 0; j < nqfrom1; ++j)
235 {
236 for (unsigned i = 0; i < nqto0; ++i, ++cnt_fji)
237 {
238 TData tmp = in[cnt_fjp] * tbasis0[i];
239 for (unsigned p = 1; p < nqfrom0; ++p)
240 {
241 if constexpr (std::is_floating_point_v<TData>)
242 {
243 tmp += in[cnt_fjp + p] * tbasis0[p * nqto0 + i];
244 }
245 else
246 {
247 tmp.fma(in[cnt_fjp + p], tbasis0[p * nqto0 + i]);
248 }
249 }
250 wsp[cnt_fji] = tmp;
251 }
252 cnt_fjp += nqfrom0;
253 }
254 }
255
256 // dir 1 interpolation to out
257 for (unsigned f = 0; f < nfac; ++f)
258 {
259 for (unsigned i = 0; i < nqto0; ++i)
260 {
261 for (unsigned j = 0; j < nqto1; ++j)
262 {
263 TData tmp = wsp[i] * tbasis1[j];
264 for (unsigned q = 1; q < nqfrom1; ++q)
265 {
266 if constexpr (std::is_floating_point_v<TData>)
267 {
268 tmp += wsp[i + q * nqto0] * tbasis1[q * nqto1 + j];
269 }
270 else
271 {
272 tmp.fma(wsp[i + q * nqto0], tbasis1[q * nqto1 + j]);
273 }
274 }
275
276 out[i + j * nqto0] = tmp;
277 }
278 }
279 wsp += nqto0 * nqfrom1;
280 out += nqto0 * nqto1;
281 }
282 }
283}

References in, NEK_HOSTDEVICE_ASSERTL1, out, tbasis0, tbasis1, and wsp.

◆ PhysLiftProjectCoefScaleKernel()

template<typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysLiftProjectCoefScaleKernel ( const unsigned int  nmTot,
const simd_type  coefScale,
simd_type *  inout 
)
static

inout[m] *= coefScale over the nmTot coefficients of one element group: the scale over the Jacobian after the dense standard inverse mass.

Definition at line 62 of file PhysLiftProjectBlockOpSerialAVXSumFacKernels.hpp.

64{
65 for (unsigned int m = 0; m < nmTot; ++m)
66 {
67 inout[m] = inout[m] * coefScale;
68 }
69}

References nmTot.

Referenced by Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyGroupsImpl().

◆ PhysLiftProjectDenseTail()

bool Nektar::MultiRegions::detail::PhysLiftProjectDenseTail ( const LocalRegions::ExpansionSharedPtr &  exp)
inline

Whether the Device SumFacTOP implementation applies the block whose representative expansion is exp through the dense projector: the StdInvMass form of a tetrahedron, prism or pyramid of at most physLiftProjectDenseTailMaxPoints points whose traces have the volume's points in one in-trace direction at least. On an affine element \(B M^{-1} B^{\mathsf T} = J^{-1} P\) with \(P = B M_{\mathrm{std}}^{-1} B^{\mathsf T}\), one nqTot x nqTot matrix per block, so the trace is lifted directly onto every point with the division by the Jacobian, and one batched product applies P to every element, in place of the basis transpose, the inverse mass and the backward transform.

Definition at line 151 of file PhysLiftProjectBlockOp.hpp.

153{
154 const auto shape = exp->DetShapeType();
155 if (PhysLiftProjectFormOf(exp) != PhysLiftProjectForm::StdInvMass ||
156 !(shape == LibUtilities::Tet || shape == LibUtilities::Prism ||
157 shape == LibUtilities::Pyr) ||
158 exp->IsNodalNonTensorialExp() ||
159 static_cast<unsigned int>(exp->GetTotPoints()) >
160 physLiftProjectDenseTailMaxPoints)
161 {
162 return false;
163 }
164 const auto pointsKeys = exp->GetPointsKeys();
165 for (int tr = 0; tr < exp->GetNtraces(); ++tr)
166 {
167 unsigned int collocated = 0;
168 for (unsigned int d = 0; d < 2; ++d)
169 {
170 const auto traceKey = exp->GetTraceBasisKey(tr, d).GetPointsKey();
171 collocated +=
172 pointsKeys[exp->GetGeom()->GetDir(tr, d)] == traceKey ? 1 : 0;
173 }
174 if (collocated == 0)
175 {
176 return false;
177 }
178 }
179 return true;
180}
PhysLiftProjectForm PhysLiftProjectFormOf(const LocalRegions::ExpansionSharedPtr &exp)
The form the block whose representative expansion is exp takes. The square test is on the total count...

References physLiftProjectDenseTailMaxPoints, PhysLiftProjectFormOf(), Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, StdInvMass, and Nektar::LibUtilities::Tet.

Referenced by Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::PhysLiftProjectBlockOpImpl(), and TestPhysLiftProject< TData >::RecordForms().

◆ PhysLiftProjectFormOf()

PhysLiftProjectForm Nektar::MultiRegions::detail::PhysLiftProjectFormOf ( const LocalRegions::ExpansionSharedPtr &  exp)
inline

The form the block whose representative expansion is exp takes. The square test is on the total counts: equal per-direction counts do not make B square on a collapsed-coordinate shape, whose mode count is a fraction of the tensor product.

Definition at line 113 of file PhysLiftProjectBlockOp.hpp.

115{
116 if (exp->GetNcoeffs() == exp->GetTotPoints())
117 {
118 return PhysLiftProjectForm::Pointwise;
119 }
120 if (exp->GetGeomFactors()->GetGtype() == SpatialDomains::eDeformed)
121 {
122 return PhysLiftProjectForm::ElmtInvMass;
123 }
124 return PhysLiftProjectForm::StdInvMass;
125}

References Nektar::SpatialDomains::eDeformed, ElmtInvMass, Pointwise, and StdInvMass.

Referenced by TestPhysLiftProject< TData >::DirectLift(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::PhysLiftProjectBlockOpImpl(), PhysLiftProjectDenseTail(), and TestPhysLiftProject< TData >::RecordForms().

◆ PhysLiftProjectPointScaleKernel()

template<bool DEFORMED, typename simd_type , typename TData >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysLiftProjectPointScaleKernel ( const unsigned int  nqTot,
const TData  scale,
const simd_type *  weights,
const simd_type *  jac,
simd_type *  pointScale 
)
static

The Pointwise form's factor of one element group, pointScale[q] = scale / (w_q J), zero on the padding elements, whose Jacobian is zero. weights holds the quadrature weights at every point (WeightsKey), jac the group's Jacobian, one per element or, when DEFORMED, one per point.

Definition at line 59 of file PhysLiftProjectBlockOpSerialAVXKernels.hpp.

62{
63 for (unsigned int q = 0; q < nqTot; ++q)
64 {
65 const simd_type wJ =
66 DEFORMED ? weights[q] * jac[q] : weights[q] * jac[0];
67 pointScale[q] = SafeDivide(simd_type(scale), wJ);
68 }
69}
NEK_HOSTDEVICE_INLINE TData SafeDivide(const TData &num, const TData &den)
num / den, and zero where den is zero.

References jac, and Nektar::SafeDivide().

◆ PhysLiftProjectPointwiseKernel()

template<bool APPEND, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysLiftProjectPointwiseKernel ( const unsigned int  nqTot,
const simd_type *  pointScale,
const simd_type *  vol,
simd_type *  out 
)
static

The Pointwise form of one element group: out (+)= pointScale * vol.

Definition at line 73 of file PhysLiftProjectBlockOpSerialAVXKernels.hpp.

76{
77 for (unsigned int q = 0; q < nqTot; ++q)
78 {
79 if constexpr (APPEND)
80 {
81 out[q].fma(pointScale[q], vol[q]);
82 }
83 else
84 {
85 out[q] = pointScale[q] * vol[q];
86 }
87 }
88}

References out.

Referenced by Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyPointwise(), and Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyPointwise().

◆ PhysTraceExtractDirLinesKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, unsigned int DIR, bool CONTRACT, unsigned int NDIM, unsigned int NVAR, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysTraceExtractDirLinesKernel ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
const typename simd_type::scalarType *  ntbasis,
const bool  endPts,
const unsigned int *  traceOffset,
const simd_type *const  in[NVAR],
const simd_type *  tensor,
const unsigned int  varStride,
const simd_type(*)  traceNormals[NDIM],
simd_type *const  out[NVAR] 
)
static

The traces of normal direction DIR of NVAR fields at once, line by line along the normal direction: each line's values are loaded once and interpolated to every trace of the direction (h_p(-1), h_p(+1)), or read off the end points when the rule contains them. With CONTRACT the line values are the directional components of a tensor, contracted with each trace's normal (traceNormals, one per trace) before the interpolation, which forms the outward normal component of the tensor on the traces in the same pass.

The trace points are written in the extraction kernels' order (the lower tangential index fastest; one tangential index in two dimensions, none in one) at the traces' packed offsets. The result matches PhysTraceExtractKernelLauncher() when the tangential rules are the volume rules, the one case this kernel takes; a caller interpolates onto any other tangential rule afterwards.

Template Parameters
SHAPE_TYPEShape tag: sets the number of traces of DIR.
DIRNormal direction of the traces.
CONTRACTContract tensor with the trace normals rather than extract in.
NDIMDimension of the element, one to three.
NVARFields extracted together.
simd_typeSIMD vector type, one element per lane.
Parameters
nq0,nq1,nq2Volume quadrature points per direction; nq1 is 1 in one dimension and nq2 is 1 below three.
ntbasiseInterp table \(h_p(\pm 1)\) of direction DIR, ntbasis[p * NF + f] with NF the traces of the direction.
endPtsThe direction's rule contains the end points: the table is a Kronecker delta and the trace values are read off.
traceOffsetOffset of each of the direction's traces in an element's packed trace block.
inVolume fields per variable (CONTRACT false).
tensorTensor, component d of variable v at v * varStride + d * nqTot (CONTRACT true).
varStrideDistance between consecutive variables of tensor, at least NDIM * nqTot.
traceNormalsNormal of each of the direction's traces.
outElement-local trace block per variable.

Definition at line 1693 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

1702{
1703 static_assert(DIR < NDIM, "No such direction");
1704 constexpr unsigned int NF =
1705 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][DIR];
1706 [[maybe_unused]] const unsigned int nqTot = nq0 * nq1 * nq2;
1707 // The normal extent and stride, and the tangential extents and strides:
1708 // the slowest tangential index runs over one value below three
1709 // dimensions, and the fastest over one value in one.
1710 unsigned int nqNormal = DIR == 0 ? nq0 : nq1;
1711 unsigned int strideNormal = DIR == 0 ? 1u : nq0;
1712 const unsigned int nqTanFast = DIR == 0 ? nq1 : nq0;
1713 const unsigned int strideTanFast = DIR == 0 ? nq0 : 1u;
1714 unsigned int nqTanSlow = 1, strideTanSlow = 0;
1715 if constexpr (NDIM == 3)
1716 {
1717 nqNormal = DIR == 2 ? nq2 : nqNormal;
1718 strideNormal = DIR == 2 ? nq0 * nq1 : strideNormal;
1719 nqTanSlow = DIR == 2 ? nq1 : nq2;
1720 strideTanSlow = DIR == 2 ? nq0 : nq0 * nq1;
1721 }
1722 simd_type *traceOut[NF][NVAR];
1723 for (unsigned int f = 0; f < NF; ++f)
1724 {
1725 for (unsigned int v = 0; v < NVAR; ++v)
1726 {
1727 traceOut[f][v] = out[v] + traceOffset[f];
1728 }
1729 }
1730 simd_type traceVal[NF][NVAR];
1731 for (unsigned int tb = 0; tb < nqTanSlow; ++tb)
1732 {
1733 for (unsigned int ta = 0; ta < nqTanFast; ++ta)
1734 {
1735 const unsigned int lineStart =
1736 tb * strideTanSlow + ta * strideTanFast;
1737 const unsigned int tracePt = tb * nqTanFast + ta;
1738 for (unsigned int f = 0; f < NF; ++f)
1739 {
1740 for (unsigned int v = 0; v < NVAR; ++v)
1741 {
1742 traceVal[f][v] = simd_type(0.0);
1743 }
1744 }
1745 for (unsigned int p = 0; p < nqNormal; ++p)
1746 {
1747 const unsigned int q = lineStart + p * strideNormal;
1748 if constexpr (CONTRACT)
1749 {
1750 // The traces of a direction have different normals, so
1751 // the contraction is per trace.
1752 for (unsigned int f = 0; f < NF; ++f)
1753 {
1754 if (endPts && p != f * (nqNormal - 1))
1755 {
1756 continue;
1757 }
1758 for (unsigned int v = 0; v < NVAR; ++v)
1759 {
1760 simd_type normalComp =
1761 traceNormals[f][0] * tensor[v * varStride + q];
1762 for (unsigned int d = 1; d < NDIM; ++d)
1763 {
1764 normalComp.fma(
1765 traceNormals[f][d],
1766 tensor[v * varStride + d * nqTot + q]);
1767 }
1768 if (endPts)
1769 {
1770 traceVal[f][v] = normalComp;
1771 }
1772 else
1773 {
1774 traceVal[f][v].fma(
1775 simd_type(ntbasis[p * NF + f]), normalComp);
1776 }
1777 }
1778 }
1779 }
1780 else
1781 {
1782 simd_type pointVal[NVAR];
1783 for (unsigned int v = 0; v < NVAR; ++v)
1784 {
1785 pointVal[v] = in[v][q];
1786 }
1787 for (unsigned int f = 0; f < NF; ++f)
1788 {
1789 if (endPts)
1790 {
1791 if (p == f * (nqNormal - 1))
1792 {
1793 for (unsigned int v = 0; v < NVAR; ++v)
1794 {
1795 traceVal[f][v] = pointVal[v];
1796 }
1797 }
1798 }
1799 else
1800 {
1801 const simd_type interp = ntbasis[p * NF + f];
1802 for (unsigned int v = 0; v < NVAR; ++v)
1803 {
1804 traceVal[f][v].fma(interp, pointVal[v]);
1805 }
1806 }
1807 }
1808 }
1809 }
1810 for (unsigned int f = 0; f < NF; ++f)
1811 {
1812 for (unsigned int v = 0; v < NVAR; ++v)
1813 {
1814 traceOut[f][v][tracePt] = traceVal[f][v];
1815 }
1816 }
1817 }
1818 }
1819}

◆ PhysTraceExtractEdgeKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysTraceExtractEdgeKernel ( const unsigned  edge,
const unsigned  nm0,
const unsigned  nm1,
const unsigned  nq00,
const unsigned  nq10,
const typename simd_type::scalarType *  ntbasis0,
const typename simd_type::scalarType *  ntbasis1,
const typename simd_type::scalarType *  tbasis00,
const typename simd_type::scalarType *  tbasis10,
simd_type *  wsp,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated00,
const bool  isCollocated10,
const bool  endPtsCollocated0,
const bool  endPtsCollocated1 
)
static

Two-dimensional entry point for a single named edge: turn the edge id into a normal direction and a position, then call the glue.

The mapping is the face-to-(direction, position) table of the shape. A quadrilateral pairs edges 3 and 1 in direction 0 and edges 0 and 2 in direction 1, so 0 -> (1, 0), 1 -> (0, 1), 2 -> (1, 1) and 3 -> (0, 0). A triangle keeps 2 -> (0, 0) and 1 -> (0, 1), the hypotenuse acting as the direction-0 upper end in the collapsed frame, and has the single direction-1 edge 0 -> (1, 0); there is no direction-1 upper edge, the collapsed vertex standing in its place. Any other id raises a fatal error.

The position becomes the (edg, nedg) pair the glue takes, so a lower edge is passed as (0, 1) and an upper edge as (1, 2). out is written from index zero; the block operator adds the trace offset to the pointer it hands in.

The two runtime endpoint booleans select the compile-time arms of the glue, which is why each case appears twice; the two isCollocated flags are forwarded as runtime arguments.

Note
A nodal triangle reaches this through the block operator's single-trace entry, which names LibUtilities::Tri explicitly for both triangle cases, so the triangle arm is taken. That is not true of the bulk entry point of the same name; see the file note.
Template Parameters
SHAPE_TYPETri for the triangle arm, any other two-dimensional shape for the quadrilateral arm.
simd_typeSIMD vector type, one element per lane.
Parameters
edgeEdge id within the shape.
nm0,nm1Volume quadrature points per direction.
nq00,nq10Trace quadrature points of a direction-0 and a direction-1 normal edge.
ntbasis0,ntbasis1eInterp tables \(h(\pm 1)\) per direction.
tbasis00,tbasis10eInterp tables onto the trace points of a direction-0 and a direction-1 normal edge.
wspScratch for the extracted values.
inVolume field of this element group.
outTrace values of this edge, from index zero.
isCollocated00Direction-0 normal edge's trace points are the direction-1 volume points.
isCollocated10Direction-1 normal edge's trace points are the direction-0 volume points.
endPtsCollocated0Direction-0 volume rule contains the domain endpoints.
endPtsCollocated1Direction-1 volume rule contains the domain endpoints.

Definition at line 651 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

661{
662 // One ntbasis row per trace of the direction. A call covering part of
663 // a direction still indexes at that stride, so it cannot be taken
664 // from the loop bound.
665 constexpr unsigned tstride0 =
666 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][0];
667 constexpr unsigned tstride1 =
668 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][1];
669
670 if constexpr (SHAPE_TYPE == LibUtilities::Tri)
671 {
672 switch (edge)
673 {
674 case 0:
675 if (endPtsCollocated1)
676 {
677 PhysExtractEdgeN1Kernel<true>(0, 1, tstride1, nm0, nm1,
678 ntbasis1, nq10, tbasis10, wsp,
679 in, out, isCollocated10);
680 }
681 else
682 {
683 PhysExtractEdgeN1Kernel<false>(
684 0, 1, tstride1, nm0, nm1, ntbasis1, nq10, tbasis10, wsp,
685 in, out, isCollocated10);
686 }
687 break;
688 case 1:
689 if (endPtsCollocated0)
690 {
691 PhysExtractEdgeN0Kernel<true>(1, 2, tstride0, nm0, nm1,
692 ntbasis0, nq00, tbasis00, wsp,
693 in, out, isCollocated00);
694 }
695 else
696 {
697 PhysExtractEdgeN0Kernel<false>(
698 1, 2, tstride0, nm0, nm1, ntbasis0, nq00, tbasis00, wsp,
699 in, out, isCollocated00);
700 }
701 break;
702 case 2:
703 if (endPtsCollocated0)
704 {
705 PhysExtractEdgeN0Kernel<true>(0, 1, tstride0, nm0, nm1,
706 ntbasis0, nq00, tbasis00, wsp,
707 in, out, isCollocated00);
708 }
709 else
710 {
711 PhysExtractEdgeN0Kernel<false>(
712 0, 1, tstride0, nm0, nm1, ntbasis0, nq00, tbasis00, wsp,
713 in, out, isCollocated00);
714 }
715 break;
716 default:
717 NEKERROR(ErrorUtil::efatal, "Unrecognised edge input");
718 break;
719 }
720 }
721 else
722 {
723 switch (edge)
724 {
725 case 0:
726 if (endPtsCollocated1)
727 {
728 PhysExtractEdgeN1Kernel<true>(0, 1, tstride1, nm0, nm1,
729 ntbasis1, nq10, tbasis10, wsp,
730 in, out, isCollocated10);
731 }
732 else
733 {
734 PhysExtractEdgeN1Kernel<false>(
735 0, 1, tstride1, nm0, nm1, ntbasis1, nq10, tbasis10, wsp,
736 in, out, isCollocated10);
737 }
738 break;
739 case 1:
740 if (endPtsCollocated0)
741 {
742 PhysExtractEdgeN0Kernel<true>(1, 2, tstride0, nm0, nm1,
743 ntbasis0, nq00, tbasis00, wsp,
744 in, out, isCollocated00);
745 }
746 else
747 {
748 PhysExtractEdgeN0Kernel<false>(
749 1, 2, tstride0, nm0, nm1, ntbasis0, nq00, tbasis00, wsp,
750 in, out, isCollocated00);
751 }
752 break;
753 case 2:
754 if (endPtsCollocated1)
755 {
756 PhysExtractEdgeN1Kernel<true>(1, 2, tstride1, nm0, nm1,
757 ntbasis1, nq10, tbasis10, wsp,
758 in, out, isCollocated10);
759 }
760 else
761 {
762 PhysExtractEdgeN1Kernel<false>(
763 1, 2, tstride1, nm0, nm1, ntbasis1, nq10, tbasis10, wsp,
764 in, out, isCollocated10);
765 }
766 break;
767 case 3:
768 if (endPtsCollocated0)
769 {
770 PhysExtractEdgeN0Kernel<true>(0, 1, tstride0, nm0, nm1,
771 ntbasis0, nq00, tbasis00, wsp,
772 in, out, isCollocated00);
773 }
774 else
775 {
776 PhysExtractEdgeN0Kernel<false>(
777 0, 1, tstride0, nm0, nm1, ntbasis0, nq00, tbasis00, wsp,
778 in, out, isCollocated00);
779 }
780 break;
781 default:
782 NEKERROR(ErrorUtil::efatal, "Unrecognised edge input");
783 break;
784 }
785 }
786}

◆ PhysTraceExtractKernelLauncher() [1/3]

template<LibUtilities::ShapeType SHAPE_TYPE, typename TTraceSizeParameter1D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysTraceExtractKernelLauncher ( const TTraceSizeParameter1D  sizeParam1D,
const typename simd_type::scalarType *  ntbasis0,
const simd_type *  in,
simd_type *  out,
const bool  endPtsCollocated0 
)
static

One-dimensional bulk entry point: both endpoint values of every element.

The one-dimensional arm of the overload set OperatorND() calls, overload resolution picking between the arms by the number of arguments the index sequences expand to. Unlike the two- and three-dimensional arms, which do the work themselves, this one is a dispatcher: a segment has no in-trace direction, so the whole operation is the two-point extraction PhysTraceExtractSegKernel performs, and all this arm adds is the output stride of two and the turn from a runtime endPtsCollocated0 into that kernel's END_PTS_COLLOCATED template argument. APPEND is always false here: the bulk route never accumulates.

Template Parameters
SHAPE_TYPESeg; unread, the path being the same for every one-dimensional expansion.

Definition at line 1845 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

1849{
1850 static_assert(IsTraceSizeParameter1D_v<TTraceSizeParameter1D>,
1851 "Template argument must be either of type "
1852 "NonTemplatedTraceSizeParameter1D or "
1853 "TemplatedTraceSizeParameter1D.");
1854
1855 // A segment carries no tangential collocation flag; the constructor
1856 // records a single false one that the leaf marks unused anyway.
1857 if (endPtsCollocated0)
1858 {
1859 PhysTraceExtractSegKernel<false, true>(sizeParam1D.nm0(), 2, ntbasis0,
1860 in, out, false);
1861 }
1862 else
1863 {
1864 PhysTraceExtractSegKernel<false, false>(sizeParam1D.nm0(), 2, ntbasis0,
1865 in, out, false);
1866 }
1867}

Referenced by Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl().

◆ PhysTraceExtractKernelLauncher() [2/3]

template<LibUtilities::ShapeType SHAPE_TYPE, typename TTraceSizeParameter2D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysTraceExtractKernelLauncher ( const TTraceSizeParameter2D  sizeParam2D,
const typename simd_type::scalarType *  ntbasis0,
const typename simd_type::scalarType *  ntbasis1,
const typename simd_type::scalarType *  tbasis00,
const typename simd_type::scalarType *  tbasis10,
simd_type *  wsp,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated00,
const bool  isCollocated10,
const bool  endPtsCollocated0,
const bool  endPtsCollocated1 
)
static

Two-dimensional bulk entry point: extract every edge of the element in packed order.

The direction-0 pair goes first, as the pair call (0, 2) writing 2 * nq00 values from index zero, then the direction-1 traces at out + tstride0 * nq00: the pair (0, 2) for a quadrilateral and the single lower edge (0, 1) for a triangle, whose direction 1 is collapsed. The scratch wsp is reused by the two calls, which run one after the other.

On the collocated path the extraction writes nm1 and nm0 values per edge rather than nq00 and nq10, which is consistent because collocation is exactly the statement that those counts agree.

Template Parameters
SHAPE_TYPETri for the triangle arm, any other two-dimensional shape for the quadrilateral arm.
simd_typeSIMD vector type, one element per lane.
Parameters
sizeParam2DVolume and trace point counts of the shape, non-templated where the generated switch found no compiled combination and templated where it did.
ntbasis0,ntbasis1eInterp tables \(h(\pm 1)\) per direction.
tbasis00,tbasis10eInterp tables onto the trace points of a direction-0 and a direction-1 normal edge.
wspScratch for the extracted values, shared by both direction calls.
inVolume field of this element group.
outPacked trace values of the element.
isCollocated00Direction-0 normal edge's trace points are the direction-1 volume points.
isCollocated10Direction-1 normal edge's trace points are the direction-0 volume points.
endPtsCollocated0Direction-0 volume rule contains the domain endpoints.
endPtsCollocated1Direction-1 volume rule contains the domain endpoints.

Definition at line 1913 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

1922{
1923 static_assert(IsTraceSizeParameter2D_v<TTraceSizeParameter2D>,
1924 "Template argument must be either of type "
1925 "NonTemplatedTraceSizeParameter2D or "
1926 "TemplatedTraceSizeParameter2D.");
1927
1928 // Shape size.
1929 const unsigned nm0 = sizeParam2D.nm0();
1930 const unsigned nm1 = sizeParam2D.nm1();
1931 const unsigned nq00 = sizeParam2D.nq00();
1932 const unsigned nq10 = sizeParam2D.nq10();
1933
1934 // One ntbasis row per trace of the direction. A call covering part of
1935 // a direction still indexes at that stride, so it cannot be taken
1936 // from the loop bound.
1937 constexpr unsigned tstride0 =
1938 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][0];
1939 constexpr unsigned tstride1 =
1940 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][1];
1941
1942 // edges with dir0 normals (1 & 3 in quads)
1943 if (endPtsCollocated0)
1944 {
1945 PhysExtractEdgeN0Kernel<true>(0, tstride0, tstride0, nm0, nm1, ntbasis0,
1946 nq00, tbasis00, wsp, in, out,
1947 isCollocated00);
1948 }
1949 else
1950 {
1951 PhysExtractEdgeN0Kernel<false>(0, tstride0, tstride0, nm0, nm1,
1952 ntbasis0, nq00, tbasis00, wsp, in, out,
1953 isCollocated00);
1954 }
1955
1956 // edges with dir 1 normals (edge 0 in tris, edges 0 & 2 in quads)
1957 if (endPtsCollocated1)
1958 {
1959 PhysExtractEdgeN1Kernel<true>(0, tstride1, tstride1, nm0, nm1, ntbasis1,
1960 nq10, tbasis10, wsp, in,
1961 out + tstride0 * nq00, isCollocated10);
1962 }
1963 else
1964 {
1965 PhysExtractEdgeN1Kernel<false>(0, tstride1, tstride1, nm0, nm1,
1966 ntbasis1, nq10, tbasis10, wsp, in,
1967 out + tstride0 * nq00, isCollocated10);
1968 }
1969}

◆ PhysTraceExtractKernelLauncher() [3/3]

template<LibUtilities::ShapeType SHAPE_TYPE, typename TTraceSizeParameter3D , typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysTraceExtractKernelLauncher ( const TTraceSizeParameter3D  sizeParam3D,
const typename simd_type::scalarType *  ntbasis0,
const typename simd_type::scalarType *  ntbasis1,
const typename simd_type::scalarType *  ntbasis2,
const typename simd_type::scalarType *  tbasis00,
const typename simd_type::scalarType *  tbasis01,
const typename simd_type::scalarType *  tbasis10,
const typename simd_type::scalarType *  tbasis11,
const typename simd_type::scalarType *  tbasis20,
const typename simd_type::scalarType *  tbasis21,
simd_type *  sum_irq,
simd_type *  sum_jir,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated00,
const bool  isCollocated01,
const bool  isCollocated10,
const bool  isCollocated11,
const bool  isCollocated20,
const bool  isCollocated21,
const bool  endPtsCollocated0,
const bool  endPtsCollocated1,
const bool  endPtsCollocated2 
)
static

Three-dimensional bulk entry point: extract every face of the element in packed order.

The direction-0 pair goes first, as the pair call (0, 2) writing 2 * nq00 * nq01 values from index zero. The running offset then advances by exactly what each direction wrote, so the direction-1 block follows – the pair (0, 2) for a hexahedron, prism and pyramid, the single face (0, 1) for a tetrahedron, whose direction 1 is collapsed – and then the direction-2 block, the pair (0, 2) for a hexahedron and the single face (0, 1) for every other shape. That reproduces the faces-per-direction counts 2/2/2, 2/2/1 and 2/1/1 of hexahedron, prism or pyramid, and tetrahedron.

The two workspaces are reused by the three direction calls, which run one after the other.

Template Parameters
SHAPE_TYPETet for the single direction-1 face, Hex for the direction-2 pair, any other three-dimensional shape for the prism and pyramid combination.
simd_typeSIMD vector type, one element per lane.
Parameters
sizeParam3DVolume and trace point counts of the shape, non-templated where the generated switch found no compiled combination and templated where it did.
ntbasis0eInterp table \(h_i(\pm 1)\) of direction 0.
ntbasis1eInterp table \(h_j(\pm 1)\) of direction 1.
ntbasis2eInterp table \(h_k(\pm 1)\) of direction 2.
tbasis00,tbasis01eInterp tables of the two tangential directions of a direction-0 normal face.
tbasis10,tbasis11The same for a direction-1 normal face.
tbasis20,tbasis21The same for a direction-2 normal face.
sum_irqScratch for the extracted planes, shared by all three direction calls.
sum_jirScratch for the tangential-0 interpolation pass, likewise shared.
inVolume field of this element group.
outPacked trace values of the element.
isCollocated00Tangential flags of the direction-0 normal faces.
isCollocated01See isCollocated00.
isCollocated10Tangential flags of the direction-1 normal faces.
isCollocated11See isCollocated10.
isCollocated20Tangential flags of the direction-2 normal faces.
isCollocated21See isCollocated20.
endPtsCollocated0Direction-0 volume rule contains the domain endpoints.
endPtsCollocated1The same for direction 1.
endPtsCollocated2The same for direction 2.

Definition at line 2030 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

2047{
2048 static_assert(IsTraceSizeParameter3D_v<TTraceSizeParameter3D>,
2049 "Template argument must be either of type "
2050 "NonTemplatedTraceSizeParameter3D or "
2051 "TemplatedTraceSizeParameter3D.");
2052
2053 // Shape size.
2054 const unsigned nm0 = sizeParam3D.nm0();
2055 const unsigned nm1 = sizeParam3D.nm1();
2056 const unsigned nm2 = sizeParam3D.nm2();
2057 const unsigned nq00 = sizeParam3D.nq00();
2058 const unsigned nq01 = sizeParam3D.nq01();
2059 const unsigned nq10 = sizeParam3D.nq10();
2060 const unsigned nq11 = sizeParam3D.nq11();
2061 const unsigned nq20 = sizeParam3D.nq20();
2062 const unsigned nq21 = sizeParam3D.nq21();
2063
2064 // One ntbasis row per trace of the direction. A call covering part of
2065 // a direction still indexes at that stride, so it cannot be taken
2066 // from the loop bound.
2067 constexpr unsigned tstride0 =
2068 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][0];
2069 constexpr unsigned tstride1 =
2070 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][1];
2071 constexpr unsigned tstride2 =
2072 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][2];
2073
2074 // faces with dir0 normals (4 & 2 in hex)
2075 if (endPtsCollocated0)
2076 {
2077 PhysExtractFaceN0Kernel<true>(0, tstride0, tstride0, nm0, nm1, nm2,
2078 ntbasis0, nq00, nq01, tbasis00, tbasis01,
2079 sum_irq, sum_jir, in, out, isCollocated00,
2080 isCollocated01);
2081 }
2082 else
2083 {
2084 PhysExtractFaceN0Kernel<false>(0, tstride0, tstride0, nm0, nm1, nm2,
2085 ntbasis0, nq00, nq01, tbasis00, tbasis01,
2086 sum_irq, sum_jir, in, out,
2087 isCollocated00, isCollocated01);
2088 }
2089
2090 unsigned offset = tstride0 * nq00 * nq01;
2091
2092 // faces with dir1 normals (1 & 3 in hex, 2 in tet)
2093 if (endPtsCollocated1)
2094 {
2095 PhysExtractFaceN1Kernel<true>(0, tstride1, tstride1, nm0, nm1, nm2,
2096 ntbasis1, nq10, nq11, tbasis10, tbasis11,
2097 sum_irq, sum_jir, in, out + offset,
2098 isCollocated10, isCollocated11);
2099 }
2100 else
2101 {
2102 PhysExtractFaceN1Kernel<false>(0, tstride1, tstride1, nm0, nm1, nm2,
2103 ntbasis1, nq10, nq11, tbasis10, tbasis11,
2104 sum_irq, sum_jir, in, out + offset,
2105 isCollocated10, isCollocated11);
2106 }
2107 offset += tstride1 * nq10 * nq11;
2108
2109 // faces with dir2 normals (0 & 5 in hex, 0 in tet)
2110 if (endPtsCollocated2)
2111 {
2112 PhysExtractFaceN2Kernel<true>(0, tstride2, tstride2, nm0, nm1, nm2,
2113 ntbasis2, nq20, nq21, tbasis20, tbasis21,
2114 sum_irq, sum_jir, in, out + offset,
2115 isCollocated20, isCollocated21);
2116 }
2117 else
2118 {
2119 PhysExtractFaceN2Kernel<false>(0, tstride2, tstride2, nm0, nm1, nm2,
2120 ntbasis2, nq20, nq21, tbasis20, tbasis21,
2121 sum_irq, sum_jir, in, out + offset,
2122 isCollocated20, isCollocated21);
2123 }
2124}

◆ PhysTraceExtractSegKernel()

template<bool APPEND, bool END_PTS_COLLOCATED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysTraceExtractSegKernel ( const unsigned int  nm0,
const unsigned int  nq0,
const typename simd_type::scalarType *  basis0,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated = false 
)
static

One-dimensional extraction: sample a segment's volume field at its two endpoint traces.

The traces of a segment are its two vertices, so there is no in-trace direction and nothing to interpolate along: the whole operator is the single contraction \(v_f = \sum_p u_p\, h_p(\pm 1)\) against the direction-0 table. Three branches cover it.

  • END_PTS_COLLOCATED, decided at compile time: the volume rule contains both domain endpoints, \(h_p(\pm 1)\) is a Kronecker delta and the first and last volume values drop straight into the two outputs. The debug assertion pins the two traces this assumes.
  • isCollocated, decided at run time: the first nq0 volume values are copied one for one. The block operator's one-dimensional path never selects it, its constructor pushing a false collocation flag for the one-dimensional case.
  • otherwise the table is applied in full, out[i] = sum_p in[p] * basis0[p * nq0 + i]. A segment has two traces in direction 0, so the nq0 the caller passes is also the table's row stride and the tight-table contract holds.

This kernel is the whole one-dimensional path of this implementation. It takes no part in the two- and three-dimensional families and calls nothing outside itself. The per-trace one-dimensional entry has no counterpart at all: the block operator raises an error for a segment there.

Template Parameters
APPENDAccumulate onto out instead of overwriting it. The block operator instantiates only the overwriting form.
END_PTS_COLLOCATEDDirection-0 volume rule contains the domain endpoints.
simd_typeSIMD vector type, one element per lane.
Parameters
nm0Volume quadrature points of the segment.
nq0Trace points to produce: two, the segment's vertices.
basis0eInterp table \(h_p(\pm 1)\) of direction 0, indexed basis0[p * nq0 + f]. Unused on the two fast paths.
inVolume field of this element group.
outThe two endpoint values.
isCollocatedTrace points coincide with the volume points.

Definition at line 240 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

244{
245 if constexpr (END_PTS_COLLOCATED)
246 {
247 // The endpoints are element quadrature points, so just pick them up.
248 ASSERTL1(nq0 == 2, "This option only works for endpoint extraction");
249
250 if constexpr (APPEND)
251 {
252 out[0] += in[0];
253 out[1] += in[nm0 - 1];
254 }
255 else
256 {
257 out[0] = in[0];
258 out[1] = in[nm0 - 1];
259 }
260 }
261 else if (isCollocated)
262 {
263 for (unsigned int i = 0; i < nq0; ++i)
264 {
265 if constexpr (APPEND)
266 {
267 out[i] += in[i];
268 }
269 else
270 {
271 out[i] = in[i];
272 }
273 }
274 }
275 else // interpolate the element expansion onto the trace points
276 {
277 for (unsigned int i = 0; i < nq0; ++i)
278 {
279 simd_type tmp = in[0] * basis0[i];
280
281 for (unsigned int p = 1; p < nm0; ++p)
282 {
283 tmp.fma(in[p], basis0[p * nq0 + i]);
284 }
285
286 if constexpr (APPEND)
287 {
288 out[i] += tmp;
289 }
290 else
291 {
292 out[i] = tmp;
293 }
294 }
295 }
296}

References ASSERTL1, in, nm0, and out.

◆ PhysTraceExtractWorkspaceSizes()

std::array< size_t, 2 > Nektar::MultiRegions::detail::PhysTraceExtractWorkspaceSizes ( const std::vector< unsigned int > &  nm,
const std::vector< unsigned int > &  nq 
)
inline

The sizes, in entries of the vector type, of the two workspaces the extraction of one element group needs, for the largest intermediate any shape of the dimension can need. In two dimensions the first holds the values of an edge pair the normal-direction stage extracts, and the second is unused. In three the first holds the face blocks of a face pair, and the second the scratch of the general face interpolation: the first in-trace direction already interpolated while the second is still on the volume points. A segment needs neither.

Parameters
nmVolume quadrature counts per direction.
nqTrace quadrature counts, 2 * f + d in three dimensions.

Definition at line 1630 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

1632{
1633 std::array<size_t, 2> sizes = {0, 0};
1634 if (nm.size() == 2)
1635 {
1636 sizes[0] = 2 * std::max(nm[0], nm[1]);
1637 }
1638 else if (nm.size() == 3)
1639 {
1640 sizes[0] = std::max(nm[0] * nm[1] * 2,
1641 std::max(nm[1] * nm[2] * 2, nm[0] * nm[2] * 2));
1642 sizes[1] = std::max(nq[4] * nm[1] * 2,
1643 std::max(nq[2] * nm[2] * 2, nq[0] * nm[2] * 2));
1644 }
1645 return sizes;
1646}

Referenced by Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::Setup().

◆ PhysTraceFaceExtractKernel()

template<LibUtilities::ShapeType SHAPE_TYPE, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::PhysTraceFaceExtractKernel ( const unsigned  face,
const unsigned  nm0,
const unsigned  nm1,
const unsigned  nm2,
const unsigned  nq00,
const unsigned  nq01,
const unsigned  nq10,
const unsigned  nq11,
const unsigned  nq20,
const unsigned  nq21,
const typename simd_type::scalarType *  ntbasis0,
const typename simd_type::scalarType *  ntbasis1,
const typename simd_type::scalarType *  ntbasis2,
const typename simd_type::scalarType *  tbasis00,
const typename simd_type::scalarType *  tbasis01,
const typename simd_type::scalarType *  tbasis10,
const typename simd_type::scalarType *  tbasis11,
const typename simd_type::scalarType *  tbasis20,
const typename simd_type::scalarType *  tbasis21,
simd_type *  sum_irq,
simd_type *  sum_jir,
const simd_type *  in,
simd_type *  out,
const bool  isCollocated00 = false,
const bool  isCollocated01 = false,
const bool  isCollocated10 = false,
const bool  isCollocated11 = false,
const bool  isCollocated20 = false,
const bool  isCollocated21 = false,
const bool  endPtsCollocated0 = false,
const bool  endPtsCollocated1 = false,
const bool  endPtsCollocated2 = false 
)
static

Three-dimensional entry point for a single named face: turn the face id into a normal direction and a position, then call the glue.

The mapping is the face-to-(direction, position) table of the shape. For the hexahedron, prism and pyramid it is 4 -> (0, 0), 2 -> (0, 1), 1 -> (1, 0), 3 -> (1, 1), 0 -> (2, 0), and for the hexahedron alone 5 -> (2, 1); the prism and pyramid collapse direction 2 and stop at face 4. The tetrahedron collapses directions 1 and 2 and keeps 3 -> (0, 0), 2 -> (0, 1), 1 -> (1, 0), 0 -> (2, 0). Any other id, and any shape outside the four, raises a fatal error.

The position becomes the (fac, nfac) pair the glue takes, so a lower face is passed as (0, 1) and an upper face as (1, 2). out is written from index zero; the block operator adds the trace offset to the pointer it hands in.

The three runtime endpoint booleans select the compile-time arms of the glue, which is why each case appears twice.

Note
A nodal tetrahedron or nodal prism reaches this through the block operator's single-trace entry, which names LibUtilities::Tet and LibUtilities::Prism explicitly for those cases, so the right arm is taken. That is not true of the bulk entry point; see the warning on PhysTraceExtractKernelLauncher.
Every (fac, nfac) pair here reaches stage one as its ntbasis row stride. A bound of one is correct only where the shape really has a single trace in that direction, which makes the lower face of every two-trace direction wrong on the general arm: the direction-0 lower face of all four shapes, the direction-1 lower face of the hexahedron, prism and pyramid, and the direction-2 lower face of the hexahedron. See the notes on the extraction kernels.
Template Parameters
SHAPE_TYPETet, Prism, Pyr or Hex; anything else is a fatal error.
simd_typeSIMD vector type, one element per lane.
Parameters
faceFace id within the shape.
nm0,nm1,nm2Volume quadrature points per direction.
nq00,nq01Trace quadrature points of a direction-0 normal face, per tangential direction.
nq10,nq11The same for a direction-1 normal face.
nq20,nq21The same for a direction-2 normal face.
ntbasis0eInterp table \(h_i(\pm 1)\) of direction 0.
ntbasis1eInterp table \(h_j(\pm 1)\) of direction 1.
ntbasis2eInterp table \(h_k(\pm 1)\) of direction 2.
tbasis00,tbasis01eInterp tables of the two tangential directions of a direction-0 normal face.
tbasis10,tbasis11The same for a direction-1 normal face.
tbasis20,tbasis21The same for a direction-2 normal face.
sum_irqScratch for the extracted plane.
sum_jirScratch for the tangential-0 interpolation pass.
inVolume field of this element group.
outTrace values of this face, from index zero.
isCollocated00Tangential flags of the direction-0 normal faces.
isCollocated01See isCollocated00.
isCollocated10Tangential flags of the direction-1 normal faces.
isCollocated11See isCollocated10.
isCollocated20Tangential flags of the direction-2 normal faces.
isCollocated21See isCollocated20.
endPtsCollocated0Direction-0 volume rule contains the domain endpoints.
endPtsCollocated1The same for direction 1.
endPtsCollocated2The same for direction 2.

Definition at line 1308 of file PhysTraceExtractBlockOpSerialAVXSumFacKernels.hpp.

1327{
1328 // One ntbasis row per trace of the direction. A call covering part of
1329 // a direction still indexes at that stride, so it cannot be taken
1330 // from the loop bound.
1331 constexpr unsigned tstride0 =
1332 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][0];
1333 constexpr unsigned tstride1 =
1334 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][1];
1335 constexpr unsigned tstride2 =
1336 LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][2];
1337
1338 if constexpr (SHAPE_TYPE == LibUtilities::Tet)
1339 {
1340 switch (face)
1341 {
1342 case 0:
1343 if (endPtsCollocated2)
1344 {
1345 PhysExtractFaceN2Kernel<true>(
1346 0, 1, tstride2, nm0, nm1, nm2, ntbasis2, nq20, nq21,
1347 tbasis20, tbasis21, sum_irq, sum_jir, in, out,
1348 isCollocated20, isCollocated21);
1349 }
1350 else
1351 {
1352 PhysExtractFaceN2Kernel<false>(
1353 0, 1, tstride2, nm0, nm1, nm2, ntbasis2, nq20, nq21,
1354 tbasis20, tbasis21, sum_irq, sum_jir, in, out,
1355 isCollocated20, isCollocated21);
1356 }
1357 break;
1358 case 1:
1359 if (endPtsCollocated1)
1360 {
1361 PhysExtractFaceN1Kernel<true>(
1362 0, 1, tstride1, nm0, nm1, nm2, ntbasis1, nq10, nq11,
1363 tbasis10, tbasis11, sum_irq, sum_jir, in, out,
1364 isCollocated10, isCollocated11);
1365 }
1366 else
1367 {
1368 PhysExtractFaceN1Kernel<false>(
1369 0, 1, tstride1, nm0, nm1, nm2, ntbasis1, nq10, nq11,
1370 tbasis10, tbasis11, sum_irq, sum_jir, in, out,
1371 isCollocated10, isCollocated11);
1372 }
1373 break;
1374 case 2:
1375 if (endPtsCollocated0)
1376 {
1377 PhysExtractFaceN0Kernel<true>(
1378 1, 2, tstride0, nm0, nm1, nm2, ntbasis0, nq00, nq01,
1379 tbasis00, tbasis01, sum_irq, sum_jir, in, out,
1380 isCollocated00, isCollocated01);
1381 }
1382 else
1383 {
1384 PhysExtractFaceN0Kernel<false>(
1385 1, 2, tstride0, nm0, nm1, nm2, ntbasis0, nq00, nq01,
1386 tbasis00, tbasis01, sum_irq, sum_jir, in, out,
1387 isCollocated00, isCollocated01);
1388 }
1389 break;
1390 case 3:
1391 if (endPtsCollocated0)
1392 {
1393 PhysExtractFaceN0Kernel<true>(
1394 0, 1, tstride0, nm0, nm1, nm2, ntbasis0, nq00, nq01,
1395 tbasis00, tbasis01, sum_irq, sum_jir, in, out,
1396 isCollocated00, isCollocated01);
1397 }
1398 else
1399 {
1400 PhysExtractFaceN0Kernel<false>(
1401 0, 1, tstride0, nm0, nm1, nm2, ntbasis0, nq00, nq01,
1402 tbasis00, tbasis01, sum_irq, sum_jir, in, out,
1403 isCollocated00, isCollocated01);
1404 }
1405 break;
1406 default:
1407 NEKERROR(ErrorUtil::efatal, "Face not valid");
1408 break;
1409 }
1410 }
1411 else if constexpr (SHAPE_TYPE == LibUtilities::Prism ||
1412 SHAPE_TYPE == LibUtilities::Pyr ||
1413 SHAPE_TYPE == LibUtilities::NodalPyr)
1414 {
1415 switch (face)
1416 {
1417 case 0:
1418 if (endPtsCollocated2)
1419 {
1420 PhysExtractFaceN2Kernel<true>(
1421 0, 1, tstride2, nm0, nm1, nm2, ntbasis2, nq20, nq21,
1422 tbasis20, tbasis21, sum_irq, sum_jir, in, out,
1423 isCollocated20, isCollocated21);
1424 }
1425 else
1426 {
1427 PhysExtractFaceN2Kernel<false>(
1428 0, 1, tstride2, nm0, nm1, nm2, ntbasis2, nq20, nq21,
1429 tbasis20, tbasis21, sum_irq, sum_jir, in, out,
1430 isCollocated20, isCollocated21);
1431 }
1432 break;
1433 case 1:
1434 if (endPtsCollocated1)
1435 {
1436 PhysExtractFaceN1Kernel<true>(
1437 0, 1, tstride1, nm0, nm1, nm2, ntbasis1, nq10, nq11,
1438 tbasis10, tbasis11, sum_irq, sum_jir, in, out,
1439 isCollocated10, isCollocated11);
1440 }
1441 else
1442 {
1443 PhysExtractFaceN1Kernel<false>(
1444 0, 1, tstride1, nm0, nm1, nm2, ntbasis1, nq10, nq11,
1445 tbasis10, tbasis11, sum_irq, sum_jir, in, out,
1446 isCollocated10, isCollocated11);
1447 }
1448 break;
1449 case 2:
1450 if (endPtsCollocated0)
1451 {
1452 PhysExtractFaceN0Kernel<true>(
1453 1, 2, tstride0, nm0, nm1, nm2, ntbasis0, nq00, nq01,
1454 tbasis00, tbasis01, sum_irq, sum_jir, in, out,
1455 isCollocated00, isCollocated01);
1456 }
1457 else
1458 {
1459 PhysExtractFaceN0Kernel<false>(
1460 1, 2, tstride0, nm0, nm1, nm2, ntbasis0, nq00, nq01,
1461 tbasis00, tbasis01, sum_irq, sum_jir, in, out,
1462 isCollocated00, isCollocated01);
1463 }
1464 break;
1465 case 3:
1466 if (endPtsCollocated1)
1467 {
1468 PhysExtractFaceN1Kernel<true>(
1469 1, 2, tstride1, nm0, nm1, nm2, ntbasis1, nq10, nq11,
1470 tbasis10, tbasis11, sum_irq, sum_jir, in, out,
1471 isCollocated10, isCollocated11);
1472 }
1473 else
1474 {
1475 PhysExtractFaceN1Kernel<false>(
1476 1, 2, tstride1, nm0, nm1, nm2, ntbasis1, nq10, nq11,
1477 tbasis10, tbasis11, sum_irq, sum_jir, in, out,
1478 isCollocated10, isCollocated11);
1479 }
1480 break;
1481 case 4:
1482 if (endPtsCollocated0)
1483 {
1484 PhysExtractFaceN0Kernel<true>(
1485 0, 1, tstride0, nm0, nm1, nm2, ntbasis0, nq00, nq01,
1486 tbasis00, tbasis01, sum_irq, sum_jir, in, out,
1487 isCollocated00, isCollocated01);
1488 }
1489 else
1490 {
1491 PhysExtractFaceN0Kernel<false>(
1492 0, 1, tstride0, nm0, nm1, nm2, ntbasis0, nq00, nq01,
1493 tbasis00, tbasis01, sum_irq, sum_jir, in, out,
1494 isCollocated00, isCollocated01);
1495 }
1496 break;
1497 default:
1498 NEKERROR(ErrorUtil::efatal, "Face not valid");
1499 break;
1500 }
1501 }
1502 else if constexpr (SHAPE_TYPE == LibUtilities::Hex)
1503 {
1504 switch (face)
1505 {
1506 case 0:
1507 if (endPtsCollocated2)
1508 {
1509 PhysExtractFaceN2Kernel<true>(
1510 0, 1, tstride2, nm0, nm1, nm2, ntbasis2, nq20, nq21,
1511 tbasis20, tbasis21, sum_irq, sum_jir, in, out,
1512 isCollocated20, isCollocated21);
1513 }
1514 else
1515 {
1516 PhysExtractFaceN2Kernel<false>(
1517 0, 1, tstride2, nm0, nm1, nm2, ntbasis2, nq20, nq21,
1518 tbasis20, tbasis21, sum_irq, sum_jir, in, out,
1519 isCollocated20, isCollocated21);
1520 }
1521 break;
1522 case 1:
1523 if (endPtsCollocated1)
1524 {
1525 PhysExtractFaceN1Kernel<true>(
1526 0, 1, tstride1, nm0, nm1, nm2, ntbasis1, nq10, nq11,
1527 tbasis10, tbasis11, sum_irq, sum_jir, in, out,
1528 isCollocated10, isCollocated11);
1529 }
1530 else
1531 {
1532 PhysExtractFaceN1Kernel<false>(
1533 0, 1, tstride1, nm0, nm1, nm2, ntbasis1, nq10, nq11,
1534 tbasis10, tbasis11, sum_irq, sum_jir, in, out,
1535 isCollocated10, isCollocated11);
1536 }
1537 break;
1538 case 2:
1539 if (endPtsCollocated0)
1540 {
1541 PhysExtractFaceN0Kernel<true>(
1542 1, 2, tstride0, nm0, nm1, nm2, ntbasis0, nq00, nq01,
1543 tbasis00, tbasis01, sum_irq, sum_jir, in, out,
1544 isCollocated00, isCollocated01);
1545 }
1546 else
1547 {
1548 PhysExtractFaceN0Kernel<false>(
1549 1, 2, tstride0, nm0, nm1, nm2, ntbasis0, nq00, nq01,
1550 tbasis00, tbasis01, sum_irq, sum_jir, in, out,
1551 isCollocated00, isCollocated01);
1552 }
1553 break;
1554 case 3:
1555 if (endPtsCollocated1)
1556 {
1557 PhysExtractFaceN1Kernel<true>(
1558 1, 2, tstride1, nm0, nm1, nm2, ntbasis1, nq10, nq11,
1559 tbasis10, tbasis11, sum_irq, sum_jir, in, out,
1560 isCollocated10, isCollocated11);
1561 }
1562 else
1563 {
1564 PhysExtractFaceN1Kernel<false>(
1565 1, 2, tstride1, nm0, nm1, nm2, ntbasis1, nq10, nq11,
1566 tbasis10, tbasis11, sum_irq, sum_jir, in, out,
1567 isCollocated10, isCollocated11);
1568 }
1569 break;
1570 case 4:
1571 if (endPtsCollocated0)
1572 {
1573 PhysExtractFaceN0Kernel<true>(
1574 0, 1, tstride0, nm0, nm1, nm2, ntbasis0, nq00, nq01,
1575 tbasis00, tbasis01, sum_irq, sum_jir, in, out,
1576 isCollocated00, isCollocated01);
1577 }
1578 else
1579 {
1580 PhysExtractFaceN0Kernel<false>(
1581 0, 1, tstride0, nm0, nm1, nm2, ntbasis0, nq00, nq01,
1582 tbasis00, tbasis01, sum_irq, sum_jir, in, out,
1583 isCollocated00, isCollocated01);
1584 }
1585 break;
1586 case 5:
1587 if (endPtsCollocated2)
1588 {
1589 PhysExtractFaceN2Kernel<true>(
1590 1, 2, tstride2, nm0, nm1, nm2, ntbasis2, nq20, nq21,
1591 tbasis20, tbasis21, sum_irq, sum_jir, in, out,
1592 isCollocated20, isCollocated21);
1593 }
1594 else
1595 {
1596 PhysExtractFaceN2Kernel<false>(
1597 1, 2, tstride2, nm0, nm1, nm2, ntbasis2, nq20, nq21,
1598 tbasis20, tbasis21, sum_irq, sum_jir, in, out,
1599 isCollocated20, isCollocated21);
1600 }
1601 break;
1602 default:
1603 NEKERROR(ErrorUtil::efatal, "Face not valid");
1604 break;
1605 }
1606 }
1607 else
1608 {
1609 NEKERROR(ErrorUtil::efatal, "Shape not recognised");
1610 }
1611}

◆ ReleaseExpressionKernels()

void Nektar::MultiRegions::detail::ReleaseExpressionKernels ( ExpressionKernels &  kernels)
inline

Unload the module holding the compiled kernels, if any.

Release the compiled kernels.

Parameters
kernelsCompiled kernels, reset to the uncompiled state.
kernelsCompiled kernels, emptied.

Definition at line 204 of file ExpressionBlockOpDeviceGenericHIPCUDAHelper.hpp.

205{
206 if (kernels.nekModule != nullptr)
207 {
209 kernels.nekModule = nullptr;
210 }
211}
#define nekModuleUnload

References CHECK_HIPCUDA_DRIVER_ERROR, Nektar::MultiRegions::detail::ExpressionKernels::nekModule, and nekModuleUnload.

Referenced by BuildExpressionKernels(), and Nektar::MultiRegions::detail::ExpressionBlockOpImpl< ExecSpace, Implementation, TData >::~ExpressionBlockOpImpl().

◆ RobBndCond1DKernel()

template<typename ExecSpace , typename TData , std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Serial >||std::is_same_v< ExecSpace, NektarSpaces::AVX >, bool > Enable = true>
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::RobBndCond1DKernel ( const size_t  nsize,
const size_t *  offsetPtr,
const TData *  matPtr,
const size_t *  mapPtr,
const TData *  incoeffPtr,
TData *  coeffPtr,
const unsigned int  streamID 
)
static

Definition at line 45 of file RobBndCondSerialAVXKernels.hpp.

49{
50 for (size_t i = 0; i < nsize; i++)
51 {
52 size_t offset = offsetPtr[i];
53 size_t map = mapPtr[i];
54 coeffPtr[offset + map] += matPtr[i] * incoeffPtr[offset + map];
55 }
56}

◆ RobBndCond2DKernel()

template<typename ExecSpace , typename TData , std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Serial >||std::is_same_v< ExecSpace, NektarSpaces::AVX >, bool > Enable = true>
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::RobBndCond2DKernel ( const unsigned int  nmaxcoeff,
const size_t  nsize,
const unsigned int *  ncoeffPtr,
const size_t *  offsetPtr,
const size_t *  matOffsetPtr,
const size_t *  mapOffsetPtr,
const TData *  matPtr,
const size_t *  mapPtr,
const int *  signPtr,
const TData *  incoeffPtr,
TData *  coeffPtr,
const unsigned int  streamID 
)
static

Definition at line 63 of file RobBndCondSerialAVXKernels.hpp.

69{
70 std::vector<TData> vEdgeCoeffs(nmaxcoeff);
71 for (size_t j = 0; j < nsize; j++)
72 {
73 const unsigned int ncoeff = ncoeffPtr[j];
74 const size_t offset = offsetPtr[j];
75 const size_t matOffset = matOffsetPtr[j];
76 const size_t mapOffset = mapOffsetPtr[j];
77
78 for (unsigned int i = 0; i < ncoeff; i++)
79 {
80 const size_t index = mapOffset + i;
81 vEdgeCoeffs[i] =
82 incoeffPtr[offset + mapPtr[index]] * signPtr[index];
83 }
84
85 for (unsigned int i = 0; i < ncoeff; i++)
86 {
87 TData tmp = 0.0;
88 for (unsigned int k = 0; k < ncoeff; k++)
89 {
90 tmp += matPtr[matOffset + ncoeff * k + i] * vEdgeCoeffs[k];
91 }
92
93 const size_t index = mapOffset + i;
94 coeffPtr[offset + mapPtr[index]] += tmp * signPtr[index];
95 }
96 }
97}

◆ ScaleAddCollapsedFacKernel() [1/2]

template<typename TData >
NEK_DEVICE_INLINE void Nektar::MultiRegions::detail::ScaleAddCollapsedFacKernel ( const unsigned int  ilane,
const unsigned int  nm0,
const unsigned int  nm1,
const unsigned int  nm2,
const bool  useD1,
const bool  useD2,
const TData *NEK_RESTRICT  twoOver1,
const TData *NEK_RESTRICT  twoOver2,
const TData *NEK_RESTRICT  volwsp,
TData *NEK_RESTRICT  out 
)

Scale a volume workspace by the collapsed factors a trace group still needs and accumulate it into the output. The factors are table data shared by the block and indexed directly; the volume arrays are warp interleaved. In two dimensions nm2 is one and twoOver2 is unread.

Definition at line 319 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

324{
325 constexpr unsigned int warpsize = NektarSpaces::Device::warpSize;
326 for (unsigned int k = 0; k < nm2; ++k)
327 {
328 for (unsigned int j = 0; j < nm1; ++j)
329 {
330 TData f = 1.0;
331 if (useD1)
332 {
333 f *= twoOver1[j];
334 }
335 if (useD2)
336 {
337 f *= twoOver2[k];
338 }
339
340 const unsigned int o = (k * nm1 + j) * nm0;
341 for (unsigned int i = 0; i < nm0; ++i)
342 {
343 out[warpsize * (o + i) + ilane] +=
344 volwsp[warpsize * (o + i) + ilane] * f;
345 }
346 }
347 }
348}
NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const unsigned int const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT twoOver1

References nm0, nm1, nm2, out, twoOver1, twoOver2, Nektar::NektarSpaces::Device::warpSize, and warpsize.

Referenced by DispatchWorkSpace(), DispatchWorkSpace(), IPWRTPhysNormalDerivTraceEdgeGroupKernel(), and IPWRTPhysNormalDerivTraceFaceGroupKernel().

◆ ScaleAddCollapsedFacKernel() [2/2]

template<typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::ScaleAddCollapsedFacKernel ( const unsigned  nm0,
const unsigned  nm1,
const unsigned  nm2,
const bool  useD1,
const bool  useD2,
const simd_type *  twoOver1,
const simd_type *  twoOver2,
const simd_type *  volwsp,
simd_type *  out 
)
static

Scale a volume workspace by the collapsed factors a trace group still needs, then accumulate it into the output.

Parameters
nm0,nm1,nm2Volume quadrature points per direction.
useD1,useD2Apply \(2/(1 - \eta_1)\), \(2/(1 - \eta_2)\).
twoOver1,twoOver2Those factors at the element's own points of directions 1 and 2; unread when the matching flag is false. In two dimensions nm2 is one and twoOver2 is unread.
volwspVolume-shaped workspace to scale, from the trace group being finished.
outAccumulates the scaled workspace.

Definition at line 149 of file IProductWRTPhysNormalDerivTraceBlockOpSerialAVXSumFacKernels.hpp.

153{
154 for (unsigned k = 0; k < nm2; ++k)
155 {
156 for (unsigned j = 0; j < nm1; ++j)
157 {
158 simd_type f = static_cast<typename simd_type::scalarType>(1.0);
159 if (useD1)
160 {
161 f = f * twoOver1[j];
162 }
163 if (useD2)
164 {
165 f = f * twoOver2[k];
166 }
167
168 const unsigned o = (k * nm1 + j) * nm0;
169 for (unsigned i = 0; i < nm0; ++i)
170 {
171 out[o + i].fma(volwsp[o + i], f);
172 }
173 }
174 }
175}

References nm0, nm1, nm2, out, twoOver1, and twoOver2.

◆ ScaleAddCollapsedFacTOPKernel()

template<typename TthreadBlock , typename TData >
static NEK_DEVICE_INLINE void Nektar::MultiRegions::detail::ScaleAddCollapsedFacTOPKernel ( const unsigned int  nm0,
const unsigned int  nm1,
const unsigned int  nm2,
const bool  useD1,
const bool  useD2,
const TData *NEK_RESTRICT  twoOver1,
const TData *NEK_RESTRICT  twoOver2,
const TData *NEK_RESTRICT  volwsp,
TData *NEK_RESTRICT  out,
const TthreadBlock &  threadBlock 
)
static

Scale a volume buffer by the collapsed factors a trace group still needs and accumulate it into the element's volume, threads striding the points. In two dimensions nm2 is one and twoOver2 is unread.

Definition at line 292 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacTOPKernels.hpp.

297{
298 const unsigned int idx0 = getLocalIdx(threadBlock);
299 const unsigned int stride = getLocalRange(threadBlock);
300 const unsigned int nm01 = nm0 * nm1;
301
302 for (unsigned int idx = idx0; idx < nm01 * nm2; idx += stride)
303 {
304 const unsigned int k = idx / nm01;
305 const unsigned int j = (idx % nm01) / nm0;
306
307 TData f = 1.0;
308 if (useD1)
309 {
310 f *= twoOver1[j];
311 }
312 if (useD2)
313 {
314 f *= twoOver2[k];
315 }
316
317 out[idx] += volwsp[idx] * f;
318 }
319
320 localBarrier(threadBlock);
321}

References nm0, nm1, nm2, out, threadBlock, twoOver1, and twoOver2.

◆ StdAlignDerivBase1D()

template<bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::StdAlignDerivBase1D ( const unsigned int  nq0,
const unsigned int  indim,
const simd_type *  df_ptr,
simd_type *  df_tmp,
const size_t  inoffset,
const simd_type *  in,
simd_type *  out,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w 
)
static

Contract the input vector with the derivative factors of a segment and apply the quadrature metric.

Writes \(g_0\) for every point of the element group, multiplied by the Jacobian and the quadrature weight of each point, so the result is ready for the transposed derivative and, on the Coeff path, for the metric-free IProduct kernel.

Template Parameters
DEFORMEDTrue when the geometric factors vary within an element.
simd_typeSIMD vector type of one interleaved element group.
Parameters
nq0Quadrature points of the element.
indimCoordinate dimension: number of input components read.
df_ptrDerivative factors of the element group.
df_tmpCaller-owned scratch for the factors of the current point.
inoffsetStride, in vectors, between the input's coordinate components.
inInput vector \({\bf f}\).
outReceives the weighted \(g_0\), nq0 vectors.
jac_ptrJacobians of the element group.
wQuadrature weights of the element.

Definition at line 115 of file IProductWRTDerivBaseBlockOpSerialAVXSumFacKernels.hpp.

120{
121 simd_type jac = 1.0;
122 // Calculate dxi/dx in[0] + dxi/dy in[1] + dxi/dz in[2]
123 if constexpr (!DEFORMED)
124 {
125 // unroll very small loops
126 jac = jac_ptr[0];
127 df_tmp[0] = df_ptr[0];
128 if (indim >= 2)
129 {
130 df_tmp[1] = df_ptr[1];
131 }
132 if (indim == 3)
133 {
134 df_tmp[2] = df_ptr[2];
135 }
136 }
137
138 for (unsigned i = 0; i < nq0; ++i)
139 {
140 if constexpr (DEFORMED)
141 {
142 jac = jac_ptr[i];
143 df_tmp[0] = df_ptr[i * indim];
144 if (indim >= 2)
145 {
146 df_tmp[1] = df_ptr[i * indim + 1];
147 }
148 if (indim == 3)
149 {
150 df_tmp[2] = df_ptr[i * indim + 2];
151 }
152 }
153
154 simd_type sum = 0.0;
155 for (unsigned int d = 0; d < indim; ++d)
156 {
157 simd_type inval = in[d * inoffset + i];
158 sum.fma(inval, df_tmp[d]);
159 }
160 out[i] = sum * jac * w[i];
161 }
162}

References in, jac, out, and sum.

◆ StdAlignDerivBase2D()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::StdAlignDerivBase2D ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  indim,
const simd_type *  df_ptr,
simd_type *  df_tmp,
const size_t  inoffset,
const simd_type *  inptr,
simd_type *  out[2],
const simd_type *  Fac0,
const simd_type *  Fac1,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1 
)
static

Contract the input vector with the derivative factors of a quadrilateral or triangle and apply the quadrature metric.

Writes the two weighted direction fields \(g_0\), \(g_1\) in point order (direction 0 fastest). For the triangles the collapsed correction is applied to \(g_0\) before the weighting, using Fac0 and Fac1, which are unused for quadrilaterals.

Template Parameters
SHAPE_TYPEShape of the block's elements.
DEFORMEDTrue when the geometric factors vary within an element.
simd_typeSIMD vector type of one interleaved element group.
Parameters
nq0,nq1Quadrature points per direction.
indimCoordinate dimension: number of input components read.
df_ptrDerivative factors of the element group, 2 * indim per point.
df_tmpCaller-owned scratch for the factors of the current point.
inoffsetStride, in vectors, between the input's coordinate components.
inptrInput vector \({\bf f}\).
outTwo output fields, one per reference direction.
Fac0Table of (1 + eta_0)/2 (triangles).
Fac1Table of 2/(1 - eta_1) (triangles).
jac_ptrJacobians of the element group.
w0,w1Quadrature weights per direction.

Definition at line 195 of file IProductWRTDerivBaseBlockOpSerialAVXSumFacKernels.hpp.

203{
204 const auto ndf = 2 * indim;
205 simd_type jac = 1.0;
206
207 // Calculate dxi/dx in[0] + dxi/dy in[1] + dxi/dz in[2]
208 if constexpr (!DEFORMED)
209 {
210 jac = jac_ptr[0];
211 df_tmp[0] = df_ptr[0];
212 df_tmp[1] = df_ptr[1];
213 df_tmp[2] = df_ptr[2];
214 df_tmp[3] = df_ptr[3];
215
216 if (indim == 3)
217 {
218 df_tmp[4] = df_ptr[4];
219 df_tmp[5] = df_ptr[5];
220 }
221 }
222
223 simd_type f1;
224 unsigned int cnt_ji = 0;
225 for (unsigned int j = 0; j < nq1; ++j)
226 {
227 if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
228 SHAPE_TYPE == LibUtilities::NodalTri)
229 {
230 f1 = simd_type(Fac1[j]);
231 }
232
233 for (unsigned int i = 0; i < nq0; ++i, ++cnt_ji)
234 {
235 if constexpr (DEFORMED)
236 {
237 jac = jac_ptr[cnt_ji];
238 df_tmp[0] = df_ptr[cnt_ji * ndf];
239 df_tmp[1] = df_ptr[cnt_ji * ndf + 1];
240 df_tmp[2] = df_ptr[cnt_ji * ndf + 2];
241 df_tmp[3] = df_ptr[cnt_ji * ndf + 3];
242
243 if (indim == 3)
244 {
245 df_tmp[4] = df_ptr[cnt_ji * ndf + 4];
246 df_tmp[5] = df_ptr[cnt_ji * ndf + 5];
247 }
248 }
249
250 simd_type in0 = inptr[cnt_ji];
251 simd_type in1 = inptr[inoffset + cnt_ji];
252
253 simd_type out0 = df_tmp[0] * in0;
254 out0.fma(df_tmp[2], in1);
255
256 simd_type out1 = df_tmp[1] * in0;
257 out1.fma(df_tmp[3], in1);
258
259 if (indim == 3)
260 {
261 simd_type in2 = inptr[2 * inoffset + cnt_ji];
262 out0.fma(df_tmp[4], in2);
263 out1.fma(df_tmp[5], in2);
264 }
265
266 if constexpr (SHAPE_TYPE == LibUtilities::Tri ||
267 SHAPE_TYPE == LibUtilities::NodalTri)
268 {
269 // Multiply by geometric factors
270 simd_type f0 = Fac0[i];
271
272 // Scale by geometric factor 2/(1-z1)
273 out0 *= f1;
274 // Scale by geometric factor (1+z0)/(1-z1)
275 simd_type c1 = f0 * out1;
276 out0.fma(c1, f1);
277 }
278
279 // store outputs
280 simd_type WJ = jac * w0[i] * w1[j];
281 out[0][cnt_ji] = out0 * WJ;
282 out[1][cnt_ji] = out1 * WJ;
283 }
284 }
285}

References in1, in2, jac, Nektar::LibUtilities::NodalTri, out, and Nektar::LibUtilities::Tri.

◆ StdAlignDerivBase3D()

template<LibUtilities::ShapeType SHAPE_TYPE, bool DEFORMED, typename simd_type >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::StdAlignDerivBase3D ( const unsigned int  nq0,
const unsigned int  nq1,
const unsigned int  nq2,
const simd_type *  df_ptr,
simd_type *  df_tmp,
const size_t  inoffset,
const simd_type *  Fac0,
const simd_type *  Fac1,
const simd_type *  Fac1m,
const simd_type *  Fac2,
const simd_type *  jac_ptr,
const typename simd_type::scalarType *  w0,
const typename simd_type::scalarType *  w1,
const typename simd_type::scalarType *  w2,
const simd_type *  inptr,
simd_type *  out[3] 
)
static

Contract the input vector with the derivative factors of a three-dimensional element and apply the quadrature metric.

Writes the three weighted direction fields in point order (direction 0 fastest). A 3D element's coordinate dimension is always three, so three input components are read and the derivative factors have nine entries per point. The number of additive collapsed correction terms differs per shape – none for the hexahedron, one for the prisms, two for the pyramid and the tetrahedra – and they are applied before the weighting. That count is not the number of factor tables a shape reads, which is larger; the tables a shape does not read are ignored.

Template Parameters
SHAPE_TYPEShape of the block's elements.
DEFORMEDTrue when the geometric factors vary within an element.
simd_typeSIMD vector type of one interleaved element group.
Parameters
nq0,nq1,nq2Quadrature points per direction.
df_ptrDerivative factors of the element group, nine per point.
df_tmpCaller-owned scratch for the factors of the current point.
inoffsetStride, in vectors, between the input's coordinate components.
Fac0Table of (1 + eta_0)/2.
Fac1Table of (1 + eta_1)/2.
Fac1mTable of 2/(1 - eta_1).
Fac2Table of 2/(1 - eta_2).
jac_ptrJacobians of the element group.
w0,w1,w2Quadrature weights per direction.
inptrInput vector \({\bf f}\).
outThree output fields, one per reference direction.

Definition at line 322 of file IProductWRTDerivBaseBlockOpSerialAVXSumFacKernels.hpp.

333{
334 const auto ndf = 9;
335 simd_type jac = 1.0;
336
337 // Calculate dxi/dx in[0] + dxi/dy in[1] + dxi/dz in[2]
338 if constexpr (!DEFORMED)
339 {
340 jac = jac_ptr[0];
341 df_tmp[0] = df_ptr[0];
342 df_tmp[1] = df_ptr[1];
343 df_tmp[2] = df_ptr[2];
344 df_tmp[3] = df_ptr[3];
345 df_tmp[4] = df_ptr[4];
346 df_tmp[5] = df_ptr[5];
347 df_tmp[6] = df_ptr[6];
348 df_tmp[7] = df_ptr[7];
349 df_tmp[8] = df_ptr[8];
350 }
351
352 unsigned int cnt_kji = 0;
353 simd_type f0, f1, f1m, f2;
354
355 for (unsigned int k = 0; k < nq2; ++k)
356 {
357 if constexpr (SHAPE_TYPE != LibUtilities::Hex)
358 {
359 f2 = simd_type(Fac2[k]);
360 }
361
362 for (unsigned int j = 0; j < nq1; ++j)
363 {
364 if constexpr ((SHAPE_TYPE == LibUtilities::Tet) ||
365 (SHAPE_TYPE == LibUtilities::NodalTet))
366 {
367 f1 = simd_type(Fac1[j]);
368 f1m = simd_type(Fac1m[j]);
369 }
370 else if constexpr (SHAPE_TYPE == LibUtilities::Pyr ||
371 SHAPE_TYPE == LibUtilities::NodalPyr)
372 {
373 f1 = simd_type(Fac1[j]);
374 }
375
376 simd_type w12 = w1[j] * w2[k];
377
378 for (unsigned int i = 0; i < nq0; ++i, ++cnt_kji)
379 {
380 if constexpr (DEFORMED)
381 {
382 jac = jac_ptr[cnt_kji];
383 df_tmp[0] = df_ptr[cnt_kji * ndf];
384 df_tmp[1] = df_ptr[cnt_kji * ndf + 1];
385 df_tmp[2] = df_ptr[cnt_kji * ndf + 2];
386 df_tmp[3] = df_ptr[cnt_kji * ndf + 3];
387 df_tmp[4] = df_ptr[cnt_kji * ndf + 4];
388 df_tmp[5] = df_ptr[cnt_kji * ndf + 5];
389 df_tmp[6] = df_ptr[cnt_kji * ndf + 6];
390 df_tmp[7] = df_ptr[cnt_kji * ndf + 7];
391 df_tmp[8] = df_ptr[cnt_kji * ndf + 8];
392 }
393
394 simd_type in0 = inptr[cnt_kji];
395 simd_type in1 = inptr[inoffset + cnt_kji];
396 simd_type in2 = inptr[2 * inoffset + cnt_kji];
397
398 simd_type out0 = df_tmp[0] * in0;
399 out0.fma(df_tmp[3], in1);
400 out0.fma(df_tmp[6], in2);
401
402 simd_type out1 = df_tmp[1] * in0;
403 out1.fma(df_tmp[4], in1);
404 out1.fma(df_tmp[7], in2);
405
406 simd_type out2 = df_tmp[2] * in0;
407 out2.fma(df_tmp[5], in1);
408 out2.fma(df_tmp[8], in2);
409
410 if constexpr ((SHAPE_TYPE == LibUtilities::Tet) ||
411 (SHAPE_TYPE == LibUtilities::NodalTet))
412 {
413 // (out0 + (out1 + out2)*(1+z0)/2) * 2/(1 - z1) * 2/(1 - z2)
414 f0 = Fac0[i];
415 out0.fma(out1 + out2, f0);
416 out0 *= f1m * f2;
417
418 // (out1 + out2 * (1+z1)/2 ) * 2/(1 - z2)
419 out1.fma(out2, f1);
420 out1 *= f2;
421 }
422 else if constexpr (SHAPE_TYPE == LibUtilities::Pyr ||
423 SHAPE_TYPE == LibUtilities::NodalPyr)
424 {
425 // (out0 + out2 * (1 + z0)/2 ) * 2/(1 - z2)
426 f0 = Fac0[i];
427 out0.fma(out2, f0);
428 out0 *= f2;
429
430 // (out1 + out2 * (1+z1)/2 ) * 2/(1 - z2)
431 out1.fma(out2, f1);
432 out1 *= f2;
433 }
434 else if constexpr ((SHAPE_TYPE == LibUtilities::Prism) ||
435 (SHAPE_TYPE == LibUtilities::NodalPrism))
436 {
437 // (out0 + out2 * (1 + z0)/2 ) * 2/(1 - z2)
438 f0 = Fac0[i];
439 out0.fma(out2, f0);
440 out0 *= f2;
441 }
442
443 // store outputs
444 simd_type WJ = jac * w0[i] * w12;
445 out[0][cnt_kji] = out0 * WJ;
446 out[1][cnt_kji] = out1 * WJ;
447 out[2][cnt_kji] = out2 * WJ;
448 }
449 }
450 }
451}

References Nektar::LibUtilities::Hex, in1, in2, jac, Nektar::LibUtilities::NodalPrism, Nektar::LibUtilities::NodalPyr, Nektar::LibUtilities::NodalTet, out, Nektar::LibUtilities::Prism, Nektar::LibUtilities::Pyr, and Nektar::LibUtilities::Tet.

◆ StdInvMassDiagonalScaleKernel()

template<typename simd_type , typename TData >
static NEK_FORCE_INLINE void Nektar::MultiRegions::detail::StdInvMassDiagonalScaleKernel ( const unsigned int  nmTot,
const TData *  diag,
const simd_type  scale,
const simd_type *  in,
simd_type *  out 
)
static

The standard inverse mass of one element group where it is diagonal (StdRegions::StdExpansion::StdInvMassIsDiagonal()), scaled: out[m] = scale * diag[m] * in[m], with diag the nmTot values of the warehouse's StdRegions::eInvMassStdMatDiagonal. On an affine element the inverse mass is the standard one over the Jacobian, which scale may carry, one value per lane. Where it is not diagonal the callers take the libxsmm product instead.

Template Parameters
simd_typeSIMD vector type, one element per lane.

Definition at line 54 of file MultiplyByElmtInvMassBlockOpSerialAVXGenericKernels.hpp.

57{
58 for (unsigned int m = 0; m < nmTot; ++m)
59 {
60 out[m] = in[m] * (scale * simd_type(diag[m]));
61 }
62}

References in, nmTot, and out.

Referenced by Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyGroupsImpl(), and Nektar::MultiRegions::detail::MultiplyByElmtInvMassBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply().

◆ TransposeSizeParameter()

template<typename TSizeParameter >
static NEK_FORCE_INLINE auto Nektar::MultiRegions::detail::TransposeSizeParameter ( const TSizeParameter  sizeParam)
static

Exchange the mode and quadrature roles of a size parameter.

A switch describes an operator's two grids in the direction it was written for: BlockOpSwitchPhysInterp1D.h.in sweeps the native counts as the mode side and the scaled counts derived from them as the quadrature side. A kernel always reads the mode side as its source and the quadrature side as its target, so an operator consuming the scaled grid and producing the native one – PhysGalerkinProject1DScaled, the reverse of PhysInterp1DScaled – needs those two roles exchanged before it can reuse both the switch and the kernels. Transposing keeps a templated size parameter templated, so the compile-time sizes survive the swap.

Both sides are full tensor-product grids here, so the transposed nmTot is the product of the original quadrature counts.

Template Parameters
TSizeParameterPlain (modal/quadrature) size parameter of any dimensionality, in either form.
Parameters
sizeParamSize parameter to transpose; read only for the runtime forms.
Returns
A size parameter of the same dimensionality and form with the mode and quadrature counts exchanged.

Definition at line 1162 of file ElmtHelper.hpp.

1164{
1166 {
1167 return TemplatedSizeParameter1D<TSizeParameter::nq0(),
1168 TSizeParameter::nm0()>();
1169 }
1170 else if constexpr (IsTemplatedSizeParameter2D<TSizeParameter>::value)
1171 {
1172 return TemplatedSizeParameter2D<
1173 TSizeParameter::nq0(), TSizeParameter::nq1(),
1174 TSizeParameter::nq0() * TSizeParameter::nq1(),
1175 TSizeParameter::nm0(), TSizeParameter::nm1()>();
1176 }
1177 else if constexpr (IsTemplatedSizeParameter3D<TSizeParameter>::value)
1178 {
1179 return TemplatedSizeParameter3D<
1180 TSizeParameter::nq0(), TSizeParameter::nq1(), TSizeParameter::nq2(),
1181 TSizeParameter::nq0() * TSizeParameter::nq1() *
1182 TSizeParameter::nq2(),
1183 TSizeParameter::nm0(), TSizeParameter::nm1(),
1184 TSizeParameter::nm2()>();
1185 }
1186 else if constexpr (IsNonTemplatedSizeParameter1D<TSizeParameter>::value)
1187 {
1188 return NonTemplatedSizeParameter1D(sizeParam.nq0(), sizeParam.nm0());
1189 }
1190 else if constexpr (IsNonTemplatedSizeParameter2D<TSizeParameter>::value)
1191 {
1192 return NonTemplatedSizeParameter2D(sizeParam.nq0(), sizeParam.nq1(),
1193 sizeParam.nq0() * sizeParam.nq1(),
1194 sizeParam.nm0(), sizeParam.nm1());
1195 }
1196 else
1197 {
1198 static_assert(IsNonTemplatedSizeParameter3D<TSizeParameter>::value,
1199 "TransposeSizeParameter expects a 1D, 2D or 3D size "
1200 "parameter.");
1201
1202 return NonTemplatedSizeParameter3D(
1203 sizeParam.nq0(), sizeParam.nq1(), sizeParam.nq2(),
1204 sizeParam.nq0() * sizeParam.nq1() * sizeParam.nq2(),
1205 sizeParam.nm0(), sizeParam.nm1(), sizeParam.nm2());
1206 }
1207}
Trait: T is a compile-time 1D modal/quadrature size parameter.
Compile-time counterpart of NonTemplatedSizeParameter1D, instantiated by the generated ShapeBlock swi...

Referenced by Nektar::MultiRegions::detail::PhysGalerkinProject1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::OperatorND().

◆ while()

Nektar::MultiRegions::detail::while ( )

Definition at line 277 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

278 {
279 const size_t ilane = e % warpsize;
280 const size_t iwarp = e / warpsize;
281
282 const TData *inptr = in + numDataIn * (nelmt * c + warpsize * iwarp);
283 TData *outptr = out + numDataOut * (nelmt * c + warpsize * iwarp);
284 const TData *jacptr = jac + numDataJac * warpsize * iwarp;
285
286 if (!append)
287 {
288 for (unsigned int p = 0; p < nm0; ++p)
289 {
290 outptr[warpsize * p + ilane] = 0.0;
291 }
292 }
293
294 const TData f0 = jacptr[warpsize * 0 + ilane];
295 const TData f1 = jacptr[warpsize * 1 + ilane];
296
297 const TData g0 = inptr[warpsize * 0 + ilane];
298 const TData g1 = inptr[warpsize * 1 + ilane];
299
300 for (unsigned int p = 0; p < nm0; ++p)
301 {
302 TData sum = 0.0;
303 sum += dnbasis0[2 * p] * f0 * g0;
304 sum += dnbasis0[2 * p + 1] * f1 * g1;
305
306 outptr[warpsize * p + ilane] += sum;
307 }
308
309 e += getGlobalRange<0>(threadBlock);
310 }

References append, c, dnbasis0, e, in, jac, nelmt, nm0, numDataIn, numDataJac, numDataOut, out, sum, threadBlock, and warpsize.

Variable Documentation

◆ append

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool Nektar::MultiRegions::detail::append

Definition at line 262 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyFusedImpl(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyGroupsImpl(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyPointwise(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplySeparate(), DispatchWorkSpace(), DispatchWorkSpace(), for(), IProductWRTPhysNormalDerivTrace1DKernel(), IProductWRTPhysNormalDerivTraceKernelLauncher(), IProductWRTPhysNormalDerivTraceKernelLauncher(), IProductWRTPhysNormalDerivTraceKernelLauncher(), IPWRTPhysNormalDerivTracePerDir2DKernel(), IPWRTPhysNormalDerivTracePerDir3DKernel(), Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::OperatorND(), Nektar::MultiRegions::detail::IProductWRTBaseBlockOpImpl< ExecSpace, Implementation, TData >::OperatorND(), Nektar::MultiRegions::detail::BwdTransBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::AdvectionBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::AdvectionDealiasBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysGalerkinProject1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTDerivBaseBlockOpImpl< ExecSpace, Implementation, TFieldOut, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::AdvectionBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::v_IProductWRTPhysTrace(), and while().

◆ c

const unsigned int Nektar::MultiRegions::detail::c = getBlockIdx<1>(threadBlock)

◆ COLLAPSED

constexpr bool Nektar::MultiRegions::detail::COLLAPSED = IsCollapsedDir(SHAPE_TYPE, 1)
constexpr

◆ COLLAPSED1

constexpr bool Nektar::MultiRegions::detail::COLLAPSED1 = IsCollapsedDir(SHAPE_TYPE, 1)
constexpr

◆ COLLAPSED2

constexpr bool Nektar::MultiRegions::detail::COLLAPSED2 = IsCollapsedDir(SHAPE_TYPE, 2)
constexpr

◆ dnbasis0

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::dnbasis0

◆ dnbasis1

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::dnbasis1

◆ dnbasis2

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::dnbasis2

◆ dtbasis0

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::dtbasis0

◆ dtbasis00

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::dtbasis00

◆ dtbasis01

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::dtbasis01

◆ dtbasis1

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::dtbasis1

◆ dtbasis10

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::dtbasis10

◆ dtbasis11

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::dtbasis11

◆ dtbasis20

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::dtbasis20

◆ dtbasis21

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::dtbasis21

◆ e

size_t Nektar::MultiRegions::detail::e = getGlobalIdx<0>(threadBlock)

Definition at line 275 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by AddEdgeN0ToVolKernel(), AddEdgeN1ToVolKernel(), Nektar::MultiRegions::detail::CurlCurlBlockOpImpl< ExecSpace, Implementation, TData >::ApplyCurl3DH1(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyGroupsImpl(), Nektar::MultiRegions::detail::HelmholtzBlockOpImpl< ExecSpace, Implementation, TData >::ApplyImpl(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::ApplyImpl(), Nektar::MultiRegions::detail::LinAdvDiffReactionBlockOpImpl< ExecSpace, Implementation, TData >::ApplyImpl(), ApplyMetricKernel(), ApplyMetricKernel(), ApplyMetricKernel(), Nektar::MultiRegions::detail::BndCondPhysOpImpl< ExecSpace, TData >::BndCondPhysOpImpl(), Nektar::MultiRegions::detail::CGBndCondSurfaceIntegral< ExecSpace, TData >::BuildMask(), DispatchWorkSpace(), DispatchWorkSpace(), for(), IPWRTPhysEdgeKernel(), JacobianDerivFactorKernel(), JacobianDerivFactorWeightsKernel(), MultiplyByDerivDirFactorKernel(), MultiplyByDerivFactorAndAdvecVelKernel(), MultiplyByDerivFactorKernel(), Nektar::MultiRegions::detail::FwdTransBCBlockOpImpl< ExecSpace, TData >::Operator0D(), Nektar::MultiRegions::detail::FwdTransBCBlockOpImpl< ExecSpace, TData >::Operator1D(), Nektar::MultiRegions::detail::FwdTransBCBlockOpImpl< ExecSpace, TData >::Operator2D(), Nektar::MultiRegions::detail::CurlCurlBlockOpImpl< ExecSpace, Implementation, TData >::OperatorCurl3DH1(), Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::HelmholtzBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::LinAdvDiffReactionBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::BwdTransBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTBaseBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::AdvectionBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::AdvectionDealiasBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::CurlCurlBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::DivergenceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysDerivBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysGalerkinProject1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysInterp1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTDerivBaseBlockOpImpl< ExecSpace, Implementation, TFieldOut, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDNormalComponent(), PhysExtractEdgeN0EndPtsKernel(), PhysExtractEdgeN1EndPtsKernel(), PhysInterpEdgeKernel(), Nektar::MultiRegions::detail::PhysTraceExtractBndCond< ExecSpace, TData >::PhysTraceExtractBndCond(), Nektar::MultiRegions::detail::RobBndCondOpImpl< ExecSpace, TData >::RobBndCondOpImpl(), Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::MultiplyByElmtInvMassBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::BwdTransBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::IProductWRTBaseBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::AdvectionBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::AdvectionDealiasBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::CurlCurlBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::DivergenceBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::ExpressionBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::PhysDerivBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::PhysGalerkinProject1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::PhysInterp1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::IProductWRTDerivBaseBlockOpImpl< ExecSpace, Implementation, TFieldOut, TData >::v_Apply(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::v_ExtractTrace(), Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::v_IProductWRTPhysTrace(), and while().

◆ edgeSize

const size_t Nektar::MultiRegions::detail::edgeSize
Initial value:
=
2u * IProductWRTPhysTraceEdgeModeBlockSize(sizeParam2D)

Definition at line 450 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by DispatchWorkSpace().

◆ elmtsPerBlock

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock Nektar::MultiRegions::detail::elmtsPerBlock

Definition at line 254 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyFused(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyFusedImpl(), for(), IProductWRTPhysNormalDerivTraceSharedMemorySize(), IProductWRTPhysNormalDerivTraceSharedMemorySize(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::LaunchExtractTraceND(), Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::LaunchIProductWRTPhysTraceND(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::LaunchLiftJacobianWithStageMask(), Nektar::MultiRegions::detail::CurlCurlBlockOpImpl< ExecSpace, Implementation, TData >::OperatorCurl3DH1(), Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::HelmholtzBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::LinAdvDiffReactionBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::BwdTransBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTBaseBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::AdvectionBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::AdvectionDealiasBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::CurlCurlBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::DivergenceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysDerivBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysGalerkinProject1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysInterp1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTDerivBaseBlockOpImpl< ExecSpace, Implementation, TFieldOut, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemoryBytes(), Nektar::MultiRegions::detail::AdvectionBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::BwdTransBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::CurlCurlBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::DivergenceBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::IProductWRTDerivBaseBlockOpImpl< ExecSpace, Implementation, TFieldOut, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::PhysDerivBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::PhysGalerkinProject1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::PhysInterp1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::IProductWRTBaseBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::HelmholtzBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::LinAdvDiffReactionBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), and Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::TraceSharedMemorySize().

◆ elmtWspSize

const size_t Nektar::MultiRegions::detail::elmtWspSize
Initial value:
SHAPE_TYPE, Implementation>(1, sizeParam2D)

Definition at line 403 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacTOPKernels.hpp.

◆ endPtsColl0

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool const bool const bool const bool const bool const bool const bool Nektar::MultiRegions::detail::endPtsColl0

◆ endPtsColl1

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool const bool const bool const bool const bool const bool const bool const bool Nektar::MultiRegions::detail::endPtsColl1

◆ endPtsColl2

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool const bool const bool const bool const bool const bool const bool const bool const bool Nektar::MultiRegions::detail::endPtsColl2

◆ endPtsCollocated0

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const bool const bool Nektar::MultiRegions::detail::endPtsCollocated0

◆ expressionKernelName

const std::string Nektar::MultiRegions::detail::expressionKernelName = "expression_kernel"
inline

The name the generated kernel function is compiled under.

Definition at line 127 of file ExpressionBlockOpDeviceGenericHelper.hpp.

Referenced by GetExpressionKernelNameExpressions(), and GetExpressionKernelSource().

◆ fsz0

const unsigned int Nektar::MultiRegions::detail::fsz0 = tnq00 * tnq01

◆ fsz1

const unsigned int Nektar::MultiRegions::detail::fsz1 = tnq10 * tnq11

◆ fsz2

const unsigned int Nektar::MultiRegions::detail::fsz2 = tnq20 * tnq21

◆ in

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::in

Definition at line 261 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by AddEdgeN0ToVolKernel(), AddEdgeN1ToVolKernel(), AddFaceN0ToVolKernel(), AddFaceN1ToVolKernel(), AddFaceN2ToVolKernel(), Advection1DKernel(), AdvectionKernelLauncher(), AdvectionKernelLauncher(), AdvectionKernelLauncher(), Nektar::MultiRegions::detail::PhysTraceExtractBndCond< ExecSpace, TData >::Apply(), BwdTransKernelLauncher(), BwdTransKernelLauncher(), BwdTransKernelLauncher(), DispatchWorkSpace(), DispatchWorkSpace(), for(), FwdTransBC1DKernel(), FwdTransBC2DKernel(), FwdTransBCQuadKernel(), FwdTransBCSegKernel(), FwdTransBCTriKernel(), HelmholtzKernelLauncher(), HelmholtzKernelLauncher(), HelmholtzKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTDerivBaseKernelLauncher(), IProductWRTDerivBaseKernelLauncher(), IProductWRTDerivBaseKernelLauncher(), IProductWRTPhysNormalDerivTrace1DKernel(), IProductWRTPhysNormalDerivTraceKernelLauncher(), IProductWRTPhysNormalDerivTraceKernelLauncher(), IProductWRTPhysNormalDerivTraceKernelLauncher(), IProductWRTPhysTrace1DKernel(), IProductWRTPhysTraceEdgeKernel(), IProductWRTPhysTraceFaceKernel(), IProductWRTPhysTraceKernelLauncher(), IProductWRTPhysTraceKernelLauncher(), IProductWRTPhysTraceKernelLauncher(), IPWRTPhysEdgeKernel(), IPWRTPhysFaceKernel(), IPWRTPhysNormalDerivTraceEdgeGroupKernel(), IPWRTPhysNormalDerivTraceFaceGroupKernel(), IPWRTPhysNormalDerivTracePerDir2DKernel(), IPWRTPhysNormalDerivTracePerDir3DKernel(), IPWRTPhysTraceEdgeN0Kernel(), IPWRTPhysTraceEdgeN1Kernel(), IPWRTPhysTraceFaceN0Kernel(), IPWRTPhysTraceFaceN1Kernel(), IPWRTPhysTraceFaceN2Kernel(), LaplacianKernelLauncher(), LaplacianKernelLauncher(), LaplacianKernelLauncher(), Nektar::MultiRegions::detail::AdvectionZOpImpl< ExecSpace, TData, APPEND, std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Device > > >::Launch(), Nektar::MultiRegions::detail::AdvectionZOpImpl< ExecSpace, TData, APPEND, std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Serial >||std::is_same_v< ExecSpace, NektarSpaces::AVX > > >::Launch(), Nektar::MultiRegions::detail::DerivZOpImpl< ExecSpace, TData, LAYOUT, DERIVORDER, APPEND, std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Device > > >::Launch(), Nektar::MultiRegions::detail::DerivZOpImpl< ExecSpace, TData, LAYOUT, DERIVORDER, APPEND, std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Serial >||std::is_same_v< ExecSpace, NektarSpaces::AVX > > >::Launch(), LinAdvDiffReactionKernelLauncher(), LinAdvDiffReactionKernelLauncher(), LinAdvDiffReactionKernelLauncher(), MassKernelLauncher(), MassKernelLauncher(), MassKernelLauncher(), Nektar::MultiRegions::detail::AdvectionZOpImpl< ExecSpace, TData, APPEND, std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Device > > >::GraphKey::operator==(), PhysDeriv1DKernel(), PhysDerivDir1DKernel(), PhysDerivKernelLauncher(), PhysDerivKernelLauncher(), PhysDerivKernelLauncher(), PhysExtractEdgeN0EndPtsKernel(), PhysExtractEdgeN1EndPtsKernel(), PhysInterpEdgeKernel(), PhysInterpFaceKernel(), PhysTraceExtractSegKernel(), StdAlignDerivBase1D(), StdInvMassDiagonalScaleKernel(), Nektar::MultiRegions::detail::AssmbScatrOpImpl< ExecSpace, TData, ZERODIR, SIGNCHANGE >::v_Apply(), Nektar::MultiRegions::detail::AvgAssmbScatrOpImpl< ExecSpace, TData >::v_Apply(), Nektar::MultiRegions::detail::RobBndCondOpImpl< ExecSpace, TData >::v_Apply(), Nektar::MultiRegions::detail::FwdTransBCOpImpl< ExecSpace, TData >::v_Apply(), Nektar::MultiRegions::detail::HelmholtzOpImpl< ExecSpace, TData >::v_ApplyFFT(), Nektar::MultiRegions::detail::LaplacianOpImpl< ExecSpace, TData >::v_ApplyFFT(), Nektar::MultiRegions::detail::LinAdvDiffReactionOpImpl< ExecSpace, TData >::v_ApplyFFT(), Nektar::MultiRegions::detail::AdvectionOpImpl< ExecSpace, TData >::v_ApplyFFT(), Nektar::MultiRegions::detail::AdvectionDealiasOpImpl< ExecSpace, TData >::v_ApplyFFT(), Nektar::MultiRegions::detail::CurlCurlOpImpl< ExecSpace, TData >::v_ApplyFFT(), Nektar::MultiRegions::detail::DivergenceOpImpl< ExecSpace, TData >::v_ApplyFFT(), Nektar::MultiRegions::detail::PhysDerivOpImpl< ExecSpace, TData >::v_ApplyFFT(), Nektar::MultiRegions::detail::IProductWRTDerivBaseOpImpl< ExecSpace, TFieldOut, TData >::v_ApplyFFT(), and while().

◆ in1

const unsigned int Nektar::MultiRegions::detail::in1 = 2 * fsz0

◆ in2

const unsigned int Nektar::MultiRegions::detail::in2 = in1 + nfaceN1 * fsz1

◆ isColl0

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const bool const bool Nektar::MultiRegions::detail::isColl0

◆ isColl00

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool Nektar::MultiRegions::detail::isColl00

◆ isColl01

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool const bool Nektar::MultiRegions::detail::isColl01

◆ isColl1

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const bool const bool const bool Nektar::MultiRegions::detail::isColl1

◆ isColl10

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool const bool const bool Nektar::MultiRegions::detail::isColl10

◆ isColl11

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool const bool const bool const bool Nektar::MultiRegions::detail::isColl11

◆ isColl20

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool const bool const bool const bool const bool Nektar::MultiRegions::detail::isColl20

◆ isColl21

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool const bool const bool const bool const bool const bool Nektar::MultiRegions::detail::isColl21

◆ IsPhysSizeParameter1D_v

template<typename T >
constexpr bool Nektar::MultiRegions::detail::IsPhysSizeParameter1D_v = IsPhysSizeParameter1D<T>::value
inlineconstexpr

Definition at line 1088 of file ElmtHelper.hpp.

◆ IsPhysSizeParameter2D_v

template<typename T >
constexpr bool Nektar::MultiRegions::detail::IsPhysSizeParameter2D_v = IsPhysSizeParameter2D<T>::value
inlineconstexpr

Definition at line 1097 of file ElmtHelper.hpp.

◆ IsPhysSizeParameter3D_v

template<typename T >
constexpr bool Nektar::MultiRegions::detail::IsPhysSizeParameter3D_v = IsPhysSizeParameter3D<T>::value
inlineconstexpr

Definition at line 1106 of file ElmtHelper.hpp.

◆ IsSizeParameter1D_v

template<typename T >
constexpr bool Nektar::MultiRegions::detail::IsSizeParameter1D_v = IsSizeParameter1D<T>::value
inlineconstexpr

Definition at line 1115 of file ElmtHelper.hpp.

◆ IsSizeParameter2D_v

template<typename T >
constexpr bool Nektar::MultiRegions::detail::IsSizeParameter2D_v = IsSizeParameter2D<T>::value
inlineconstexpr

Definition at line 1124 of file ElmtHelper.hpp.

◆ IsSizeParameter3D_v

template<typename T >
constexpr bool Nektar::MultiRegions::detail::IsSizeParameter3D_v = IsSizeParameter3D<T>::value
inlineconstexpr

Definition at line 1133 of file ElmtHelper.hpp.

◆ IsTraceSizeParameter1D_v

template<typename T >
constexpr bool Nektar::MultiRegions::detail::IsTraceSizeParameter1D_v
inlineconstexpr
Initial value:
=
IsTraceSizeParameter1D<T>::value

Definition at line 1217 of file ElmtHelper.hpp.

◆ IsTraceSizeParameter2D_v

template<typename T >
constexpr bool Nektar::MultiRegions::detail::IsTraceSizeParameter2D_v
inlineconstexpr
Initial value:
=
IsTraceSizeParameter2D<T>::value

Definition at line 1228 of file ElmtHelper.hpp.

◆ IsTraceSizeParameter3D_v

template<typename T >
constexpr bool Nektar::MultiRegions::detail::IsTraceSizeParameter3D_v
inlineconstexpr
Initial value:
=
IsTraceSizeParameter3D<T>::value

Definition at line 1239 of file ElmtHelper.hpp.

◆ jac

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::jac

Definition at line 259 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyGroupsImpl(), ApplyMetricKernel(), ApplyMetricKernel(), ApplyMetricKernel(), DiffusionCoeffwithWJHexKernel(), DiffusionCoeffwithWJHexKernel(), DiffusionCoeffwithWJPrismKernel(), DiffusionCoeffwithWJPrismKernel(), DiffusionCoeffwithWJPyrKernel(), DiffusionCoeffwithWJPyrKernel(), DiffusionCoeffwithWJQuadKernel(), DiffusionCoeffwithWJQuadKernel(), DiffusionCoeffwithWJSegKernel(), DiffusionCoeffwithWJSegKernel(), DiffusionCoeffwithWJTetKernel(), DiffusionCoeffwithWJTetKernel(), DiffusionCoeffwithWJTriKernel(), DiffusionCoeffwithWJTriKernel(), DispatchWorkSpace(), DispatchWorkSpace(), for(), FwdTransBC1DKernel(), FwdTransBC2DKernel(), FwdTransBCQuadKernel(), FwdTransBCSegKernel(), FwdTransBCTriKernel(), HelmholtzKernelLauncher(), HelmholtzKernelLauncher(), HelmholtzKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTDerivBaseKernelLauncher(), IProductWRTDerivBaseKernelLauncher(), IProductWRTDerivBaseKernelLauncher(), IProductWRTPhysNormalDerivTrace1DKernel(), IProductWRTPhysNormalDerivTraceKernelLauncher(), IProductWRTPhysNormalDerivTraceKernelLauncher(), IProductWRTPhysNormalDerivTraceKernelLauncher(), IPWRTPhysNormalDerivTraceEdgeGroupKernel(), IPWRTPhysNormalDerivTraceFaceGroupKernel(), IPWRTPhysNormalDerivTracePerDir2DKernel(), IPWRTPhysNormalDerivTracePerDir3DKernel(), LaplacianKernelLauncher(), LaplacianKernelLauncher(), LaplacianKernelLauncher(), LinAdvDiffReactionKernelLauncher(), LinAdvDiffReactionKernelLauncher(), LinAdvDiffReactionKernelLauncher(), MassKernelLauncher(), MassKernelLauncher(), MassKernelLauncher(), PhysLiftProjectPointScaleKernel(), StdAlignDerivBase1D(), StdAlignDerivBase2D(), StdAlignDerivBase3D(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), and while().

◆ jac1

const unsigned int Nektar::MultiRegions::detail::jac1 = DEFORMED ? in1 : 2

◆ jac2

const unsigned int Nektar::MultiRegions::detail::jac2 = jac1 + (DEFORMED ? nfaceN1 * fsz1 : nfaceN1)

◆ jacCompStride

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t Nektar::MultiRegions::detail::jacCompStride

◆ joff1

const unsigned int Nektar::MultiRegions::detail::joff1 = (DEFORMED) ? off1 : 2

◆ nbasis0

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT Nektar::MultiRegions::detail::nbasis0

◆ nbasis1

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::nbasis1

◆ nbasis2

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::nbasis2

◆ nedgeN1

constexpr unsigned int Nektar::MultiRegions::detail::nedgeN1
constexpr
Initial value:
=
LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][1]

Definition at line 447 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by DispatchWorkSpace(), and IPWRTPhysNormalDerivTraceEdgeGroupKernel().

◆ nelmt

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t Nektar::MultiRegions::detail::nelmt

Definition at line 253 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by Nektar::MultiRegions::detail::CurlCurlBlockOpImpl< ExecSpace, Implementation, TData >::ApplyCurl3DH1(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyFusedImpl(), Nektar::MultiRegions::detail::HelmholtzBlockOpImpl< ExecSpace, Implementation, TData >::ApplyImpl(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::ApplyImpl(), Nektar::MultiRegions::detail::LinAdvDiffReactionBlockOpImpl< ExecSpace, Implementation, TData >::ApplyImpl(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyInvMass(), ApplyMetricKernel(), ApplyMetricKernel(), ApplyMetricKernel(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyPointwise(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyPointwise(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyProjector(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::ApplyStdInvMassProduct(), BuildCGBndCondCoeffMaps(), BuildCGBndCondRegions(), DispatchWorkSpace(), DispatchWorkSpace(), for(), IProductWRTPhysNormalDerivTraceWorkSpaceSize(), IProductWRTPhysNormalDerivTraceWorkSpaceSize(), JacobianDerivFactorKernel(), JacobianDerivFactorWeightsKernel(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::LaunchLiftJacobian(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::LaunchLiftJacobianWithStageMask(), MultiplyByDerivDirFactorKernel(), MultiplyByDerivFactorAndAdvecVelKernel(), MultiplyByDerivFactorKernel(), Nektar::MultiRegions::detail::FwdTransBCBlockOpImpl< ExecSpace, TData >::Operator0D(), Nektar::MultiRegions::detail::FwdTransBCBlockOpImpl< ExecSpace, TData >::Operator1D(), Nektar::MultiRegions::detail::FwdTransBCBlockOpImpl< ExecSpace, TData >::Operator2D(), Nektar::MultiRegions::detail::CurlCurlBlockOpImpl< ExecSpace, Implementation, TData >::OperatorCurl3DH1(), Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::HelmholtzBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::LinAdvDiffReactionBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::BwdTransBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTBaseBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::AdvectionBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::AdvectionDealiasBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::CurlCurlBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::DivergenceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysDerivBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysGalerkinProject1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysInterp1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTDerivBaseBlockOpImpl< ExecSpace, Implementation, TFieldOut, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::RobBndCondOpImpl< ExecSpace, TData >::RobBndCondOpImpl(), Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::MultiplyByElmtInvMassBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::BwdTransBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::IProductWRTBaseBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::AdvectionBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::AdvectionDealiasBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::CurlCurlBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::DivergenceBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::PhysDerivBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::PhysGalerkinProject1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::PhysInterp1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::IProductWRTDerivBaseBlockOpImpl< ExecSpace, Implementation, TFieldOut, TData >::v_Apply(), and while().

◆ nfaceN1

constexpr unsigned int Nektar::MultiRegions::detail::nfaceN1
constexpr
Initial value:
=
LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][1]

Definition at line 707 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by __LAUNCH_BOUNDS__(), DispatchWorkSpace(), and IPWRTPhysNormalDerivTraceFaceGroupKernel().

◆ nfaceN2

constexpr unsigned int Nektar::MultiRegions::detail::nfaceN2
constexpr
Initial value:
=
LibUtilities::ShapeTypeNumTraceInDir[SHAPE_TYPE][2]

Definition at line 709 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by __LAUNCH_BOUNDS__(), DispatchWorkSpace(), and IPWRTPhysNormalDerivTraceFaceGroupKernel().

◆ nm0

const unsigned int Nektar::MultiRegions::detail::nm0 = sizeParam1D.nm0()

Definition at line 272 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by __LAUNCH_BOUNDS__(), __LAUNCH_BOUNDS__(), __LAUNCH_BOUNDS__(), AddEdgeN0ToVolKernel(), AddEdgeN1ToVolKernel(), AddFaceN0ToVolKernel(), AddFaceN1ToVolKernel(), AddFaceN2ToVolKernel(), Nektar::MultiRegions::detail::BasisDataSize1D::BasisDataSize1D(), Nektar::MultiRegions::detail::BasisDataSize2D< SHAPE_TYPE >::BasisDataSize2D(), Nektar::MultiRegions::detail::BasisDataSize3D< SHAPE_TYPE >::BasisDataSize3D(), BwdTrans2DWorkspace(), BwdTrans3DWorkspace(), BwdTransKernelLauncher(), BwdTransKernelLauncher(), BwdTransKernelLauncher(), DispatchWorkSpace(), DispatchWorkSpace(), for(), FwdTransBC1DKernel(), FwdTransBC2DKernel(), FwdTransBCQuadKernel(), FwdTransBCSegKernel(), FwdTransBCTriKernel(), IProduct2DWorkspace(), IProduct3DWorkspace(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTPhysNormalDerivTrace1DKernel(), IProductWRTPhysNormalDerivTraceKernelLauncher(), IProductWRTPhysNormalDerivTraceKernelLauncher(), IProductWRTPhysTrace1DKernel(), IProductWRTPhysTraceEdgeKernel(), IProductWRTPhysTraceFaceKernel(), IProductWRTPhysTraceKernelLauncher(), IProductWRTPhysTraceKernelLauncher(), IPWRTPhysFaceKernel(), IPWRTPhysNormalDerivTraceEdgeGroupKernel(), IPWRTPhysNormalDerivTraceFaceGroupKernel(), IPWRTPhysNormalDerivTracePerDir2DKernel(), IPWRTPhysNormalDerivTracePerDir3DKernel(), IPWRTPhysTraceEdgeN0Kernel(), IPWRTPhysTraceEdgeN1Kernel(), IPWRTPhysTraceFaceN0Kernel(), IPWRTPhysTraceFaceN1Kernel(), IPWRTPhysTraceFaceN2Kernel(), Nektar::MultiRegions::detail::FwdTransBCBlockOpImpl< ExecSpace, TData >::Operator1D(), Nektar::MultiRegions::detail::FwdTransBCBlockOpImpl< ExecSpace, TData >::Operator2D(), Nektar::MultiRegions::detail::PhysTraceExtractBndCond< ExecSpace, TData >::PhysTraceExtractBndCond(), PhysTraceExtractSegKernel(), ScaleAddCollapsedFacKernel(), ScaleAddCollapsedFacKernel(), ScaleAddCollapsedFacTOPKernel(), and while().

◆ nm1

const unsigned int Nektar::MultiRegions::detail::nm1 = sizeParam2D.nm1()

Definition at line 442 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by __LAUNCH_BOUNDS__(), __LAUNCH_BOUNDS__(), AddEdgeN0ToVolKernel(), AddEdgeN1ToVolKernel(), AddFaceN0ToVolKernel(), AddFaceN1ToVolKernel(), AddFaceN2ToVolKernel(), Nektar::MultiRegions::detail::BasisDataSize2D< SHAPE_TYPE >::BasisDataSize2D(), Nektar::MultiRegions::detail::BasisDataSize3D< SHAPE_TYPE >::BasisDataSize3D(), BwdTrans2DWorkspace(), BwdTrans3DWorkspace(), BwdTransKernelLauncher(), BwdTransKernelLauncher(), constexpr(), constexpr(), constexpr(), DispatchWorkSpace(), DispatchWorkSpace(), FwdTransBC2DKernel(), FwdTransBCQuadKernel(), FwdTransBCTriKernel(), IProduct3DWorkspace(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTPhysNormalDerivTraceKernelLauncher(), IProductWRTPhysNormalDerivTraceKernelLauncher(), IProductWRTPhysNormalDerivTraceSharedMemorySize(), IProductWRTPhysNormalDerivTraceSharedMemorySize(), IProductWRTPhysTraceEdgeKernel(), IProductWRTPhysTraceFaceKernel(), IProductWRTPhysTraceKernelLauncher(), IProductWRTPhysTraceKernelLauncher(), IPWRTPhysFaceKernel(), IPWRTPhysNormalDerivTraceEdgeGroupKernel(), IPWRTPhysNormalDerivTraceFaceGroupKernel(), IPWRTPhysNormalDerivTracePerDir2DKernel(), IPWRTPhysNormalDerivTracePerDir3DKernel(), IPWRTPhysTraceEdgeN0Kernel(), IPWRTPhysTraceEdgeN1Kernel(), IPWRTPhysTraceFaceN0Kernel(), IPWRTPhysTraceFaceN1Kernel(), IPWRTPhysTraceFaceN2Kernel(), Nektar::MultiRegions::detail::FwdTransBCBlockOpImpl< ExecSpace, TData >::Operator2D(), Nektar::MultiRegions::detail::PhysTraceExtractBndCond< ExecSpace, TData >::PhysTraceExtractBndCond(), ScaleAddCollapsedFacKernel(), ScaleAddCollapsedFacKernel(), and ScaleAddCollapsedFacTOPKernel().

◆ nm2

const unsigned int Nektar::MultiRegions::detail::nm2 = sizeParam3D.nm2()

◆ nmTot

const unsigned int Nektar::MultiRegions::detail::nmTot = nm0 * nm1

Definition at line 376 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacTOPKernels.hpp.

Referenced by __LAUNCH_BOUNDS__(), Nektar::MultiRegions::detail::BasisDataSize2D< SHAPE_TYPE >::BasisDataSize2D(), Nektar::MultiRegions::detail::BasisDataSize3D< SHAPE_TYPE >::BasisDataSize3D(), BwdTrans2DWorkspace(), BwdTrans3DWorkspace(), BwdTransKernelLauncher(), BwdTransKernelLauncher(), IProduct3DWorkspace(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTPhysNormalDerivTraceWorkSpaceSize(), IProductWRTPhysNormalDerivTraceWorkSpaceSize(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::LaunchExtractTraceND(), Nektar::MultiRegions::detail::FwdTransBCBlockOpImpl< ExecSpace, TData >::Operator1D(), Nektar::MultiRegions::detail::FwdTransBCBlockOpImpl< ExecSpace, TData >::Operator2D(), Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::HelmholtzBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::LinAdvDiffReactionBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::BwdTransBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTBaseBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysGalerkinProject1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysInterp1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), PhysLiftProjectCoefScaleKernel(), and StdInvMassDiagonalScaleKernel().

◆ numDataIn

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int Nektar::MultiRegions::detail::numDataIn

◆ numDataJac

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int Nektar::MultiRegions::detail::numDataJac

◆ numDataOut

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int Nektar::MultiRegions::detail::numDataOut

Definition at line 255 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by DispatchWorkSpace(), DispatchWorkSpace(), for(), Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceBlockOpImpl< ExecSpace, Implementation, TData >::IProductWRTPhysNormalDerivTraceBlockOpImpl(), IPWRTPhysNormalDerivTraceEdgeGroupKernel(), IPWRTPhysNormalDerivTraceFaceGroupKernel(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::LaunchExtractTraceND(), Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::LaunchIProductWRTPhysTraceND(), Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDNormalComponent(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::v_ExtractTrace(), Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::v_IProductWRTPhysTrace(), and while().

◆ off1

const unsigned int Nektar::MultiRegions::detail::off1 = 2 * tnq00

◆ out

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT Nektar::MultiRegions::detail::out

Definition at line 262 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by AddAdvection1DKernel(), AddAdvection2DKernel(), AddAdvection3DKernel(), AddEdgeN0ToVolKernel(), AddEdgeN1ToVolKernel(), AddFaceN0ToVolKernel(), AddFaceN1ToVolKernel(), AddFaceN2ToVolKernel(), Advection1DKernel(), Advection2DKernel(), Advection3DKernel(), AdvectionDealiasCombineKernel(), AdvectionKernelLauncher(), AdvectionKernelLauncher(), AdvectionKernelLauncher(), Nektar::MultiRegions::detail::PhysTraceExtractBndCond< ExecSpace, TData >::Apply(), BwdTransKernelLauncher(), BwdTransKernelLauncher(), BwdTransKernelLauncher(), ContractTraceNormalKernel(), Curl2DScalarSumFacKernel(), DispatchWorkSpace(), DispatchWorkSpace(), DivergenceKernelLauncher(), DivergenceKernelLauncher(), DivergenceKernelLauncher(), for(), FwdTransBC1DKernel(), FwdTransBC2DKernel(), FwdTransBCQuadKernel(), FwdTransBCSegKernel(), FwdTransBCTriKernel(), HelmholtzKernelLauncher(), HelmholtzKernelLauncher(), HelmholtzKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTBaseKernelLauncher(), IProductWRTDerivBaseKernelLauncher(), IProductWRTDerivBaseKernelLauncher(), IProductWRTDerivBaseKernelLauncher(), IProductWRTPhysNormalDerivTrace1DKernel(), IProductWRTPhysNormalDerivTraceKernelLauncher(), IProductWRTPhysNormalDerivTraceKernelLauncher(), IProductWRTPhysNormalDerivTraceKernelLauncher(), IProductWRTPhysTrace1DKernel(), IProductWRTPhysTraceEdgeKernel(), IProductWRTPhysTraceFaceKernel(), IProductWRTPhysTraceKernelLauncher(), IProductWRTPhysTraceKernelLauncher(), IProductWRTPhysTraceKernelLauncher(), IPWRTPhysEdgeKernel(), IPWRTPhysFaceKernel(), IPWRTPhysNormalDerivTraceEdgeGroupKernel(), IPWRTPhysNormalDerivTraceFaceGroupKernel(), IPWRTPhysNormalDerivTracePerDir2DKernel(), IPWRTPhysNormalDerivTracePerDir3DKernel(), IPWRTPhysTraceEdgeN0Kernel(), IPWRTPhysTraceEdgeN1Kernel(), IPWRTPhysTraceFaceN0Kernel(), IPWRTPhysTraceFaceN1Kernel(), IPWRTPhysTraceFaceN2Kernel(), LaplacianKernelLauncher(), LaplacianKernelLauncher(), LaplacianKernelLauncher(), Nektar::MultiRegions::detail::AdvectionZOpImpl< ExecSpace, TData, APPEND, std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Device > > >::Launch(), Nektar::MultiRegions::detail::AdvectionZOpImpl< ExecSpace, TData, APPEND, std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Serial >||std::is_same_v< ExecSpace, NektarSpaces::AVX > > >::Launch(), Nektar::MultiRegions::detail::DerivZOpImpl< ExecSpace, TData, LAYOUT, DERIVORDER, APPEND, std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Device > > >::Launch(), Nektar::MultiRegions::detail::DerivZOpImpl< ExecSpace, TData, LAYOUT, DERIVORDER, APPEND, std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Serial >||std::is_same_v< ExecSpace, NektarSpaces::AVX > > >::Launch(), LinAdvDiffReactionKernelLauncher(), LinAdvDiffReactionKernelLauncher(), LinAdvDiffReactionKernelLauncher(), MassKernelLauncher(), MassKernelLauncher(), MassKernelLauncher(), Nektar::MultiRegions::detail::AdvectionZOpImpl< ExecSpace, TData, APPEND, std::enable_if_t< std::is_same_v< ExecSpace, NektarSpaces::Device > > >::GraphKey::operator==(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDNormalComponent(), PhysDeriv1DKernel(), PhysDeriv2DKernel(), PhysDerivDir1DKernel(), PhysDerivDir2DKernel(), PhysDerivDir3DKernel(), PhysDerivKernelLauncher(), PhysDerivKernelLauncher(), PhysDerivKernelLauncher(), PhysExtractEdgeN0EndPtsKernel(), PhysExtractEdgeN1EndPtsKernel(), PhysInterpEdgeKernel(), PhysInterpFaceKernel(), PhysLiftProjectPointwiseKernel(), PhysTraceExtractSegKernel(), ScaleAddCollapsedFacKernel(), ScaleAddCollapsedFacKernel(), ScaleAddCollapsedFacTOPKernel(), StdAlignDerivBase1D(), StdAlignDerivBase2D(), StdAlignDerivBase3D(), StdInvMassDiagonalScaleKernel(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::v_Apply(), Nektar::MultiRegions::detail::AssmbScatrOpImpl< ExecSpace, TData, ZERODIR, SIGNCHANGE >::v_Apply(), Nektar::MultiRegions::detail::AvgAssmbScatrOpImpl< ExecSpace, TData >::v_Apply(), Nektar::MultiRegions::detail::RobBndCondOpImpl< ExecSpace, TData >::v_Apply(), Nektar::MultiRegions::detail::FwdTransBCOpImpl< ExecSpace, TData >::v_Apply(), Nektar::MultiRegions::detail::HelmholtzOpImpl< ExecSpace, TData >::v_ApplyFFT(), Nektar::MultiRegions::detail::LaplacianOpImpl< ExecSpace, TData >::v_ApplyFFT(), Nektar::MultiRegions::detail::LinAdvDiffReactionOpImpl< ExecSpace, TData >::v_ApplyFFT(), Nektar::MultiRegions::detail::AdvectionOpImpl< ExecSpace, TData >::v_ApplyFFT(), Nektar::MultiRegions::detail::AdvectionDealiasOpImpl< ExecSpace, TData >::v_ApplyFFT(), Nektar::MultiRegions::detail::CurlCurlOpImpl< ExecSpace, TData >::v_ApplyFFT(), Nektar::MultiRegions::detail::DivergenceOpImpl< ExecSpace, TData >::v_ApplyFFT(), Nektar::MultiRegions::detail::PhysDerivOpImpl< ExecSpace, TData >::v_ApplyFFT(), Nektar::MultiRegions::detail::IProductWRTDerivBaseOpImpl< ExecSpace, TFieldOut, TData >::v_ApplyFFT(), and while().

◆ physLiftProjectDenseTailMaxPoints

constexpr unsigned int Nektar::MultiRegions::detail::physLiftProjectDenseTailMaxPoints = 125u
staticconstexpr

The most points per element the Device SumFacTOP implementation applies the StdInvMass form of a collapsed shape through the dense projector at (PhysLiftProjectDenseTail()): 125, order 4 on the default rules (5^3 points), the highest order it was measured at, where it is still 1.6 to 1.8 times faster than the sum-factorised kernel on GH200 and MI210. It is not tied to the block size: order 5 has 6^3 = 216 points, so any cap from 125 to 215 admits the same elements. The projector's cost per element grows as nqTot^2, against about nqTot^(4/3) for sum-factorisation, so the crossover lies above order 4; the cap moves there once it is measured.

Definition at line 136 of file PhysLiftProjectBlockOp.hpp.

Referenced by PhysLiftProjectDenseTail(), and Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::WithStdInvMassSizeParameter().

◆ s_out

TData * Nektar::MultiRegions::detail::s_out
Initial value:
=
s_wsp + 2u * IProductWRTPhysTraceEdgeModeBlockSize(sizeParam2D)

Definition at line 410 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacTOPKernels.hpp.

◆ s_twoOver1

TData * Nektar::MultiRegions::detail::s_twoOver1 = nullptr

◆ s_twoOver2

TData * Nektar::MultiRegions::detail::s_twoOver2 = nullptr

◆ s_vol

TData * Nektar::MultiRegions::detail::s_vol = s_out + nmTot

◆ s_wsp

TData* Nektar::MultiRegions::detail::s_wsp = s_twoOver1 + (COLLAPSED ? nm1 : 0u) + elmtWspSize * wspIdx

◆ s_wsp0

TData* Nektar::MultiRegions::detail::s_wsp0 = s_twoOver2 + (COLLAPSED2 ? nm2 : 0u) + elmtWspSize * wspIdx

◆ s_wsp1

TData* Nektar::MultiRegions::detail::s_wsp1 = s_wsp0 + IProductWRTPhysTraceFaceModeBlockSize(sizeParam3D)

◆ shmemptr

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool const bool const bool const bool const bool const bool const bool const bool const bool unsigned char * Nektar::MultiRegions::detail::shmemptr

◆ tableSize

unsigned int Nektar::MultiRegions::detail::tableSize = 0

◆ tbasis0

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT Nektar::MultiRegions::detail::tbasis0

◆ tbasis00

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT Nektar::MultiRegions::detail::tbasis00

◆ tbasis01

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::tbasis01

◆ tbasis1

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::tbasis1

◆ tbasis10

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::tbasis10

◆ tbasis11

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::tbasis11

◆ tbasis20

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::tbasis20

◆ tbasis21

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::tbasis21

◆ threadBlock

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const bool const bool const bool const bool const bool const bool const bool const bool const bool const bool unsigned char const TthreadBlock & Nektar::MultiRegions::detail::threadBlock
Initial value:
{
static_assert(IsTraceSizeParameter1D_v<TTraceSizeParameter1D>,
"Template argument must be either of type "
"NonTemplatedTraceSizeParameter1D or "
"TemplatedTraceSizeParameter1D.")

Definition at line 265 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by __LAUNCH_BOUNDS__(), constexpr(), constexpr(), constexpr(), constexpr(), constexpr(), DispatchWorkSpace(), DispatchWorkSpace(), for(), ScaleAddCollapsedFacTOPKernel(), and while().

◆ tnq00

const unsigned int Nektar::MultiRegions::detail::tnq00 = sizeParam2D.nq00()

◆ tnq01

const unsigned int Nektar::MultiRegions::detail::tnq01 = sizeParam3D.nq01()

◆ tnq10

const unsigned int Nektar::MultiRegions::detail::tnq10 = sizeParam2D.nq10()

◆ tnq11

const unsigned int Nektar::MultiRegions::detail::tnq11 = sizeParam3D.nq11()

◆ tnq20

const unsigned int Nektar::MultiRegions::detail::tnq20 = sizeParam3D.nq20()

◆ tnq21

const unsigned int Nektar::MultiRegions::detail::tnq21 = sizeParam3D.nq21()

◆ traceDir0

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int Nektar::MultiRegions::detail::traceDir0

◆ traceDir00

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int Nektar::MultiRegions::detail::traceDir00

◆ traceDir01

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int Nektar::MultiRegions::detail::traceDir01

◆ traceDir1

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int Nektar::MultiRegions::detail::traceDir1

◆ traceDir10

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int Nektar::MultiRegions::detail::traceDir10

◆ traceDir11

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int Nektar::MultiRegions::detail::traceDir11

◆ traceDir20

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int Nektar::MultiRegions::detail::traceDir20

◆ traceDir21

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT const TData *NEK_RESTRICT TData *NEK_RESTRICT const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int const unsigned int Nektar::MultiRegions::detail::traceDir21

◆ tw0

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::tw0

◆ tw00

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::tw00

◆ tw01

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::tw01

◆ tw1

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::tw1

◆ tw10

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::tw10

◆ tw11

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::tw11

◆ tw20

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::tw20

◆ tw21

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::tw21

◆ twoOver0

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::twoOver0

◆ twoOver1

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::twoOver1

◆ twoOver2

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT Nektar::MultiRegions::detail::twoOver2

◆ useSharedMemoryWsp

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp Nektar::MultiRegions::detail::useSharedMemoryWsp

Definition at line 260 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by IProductWRTPhysNormalDerivTraceSharedMemorySize(), IProductWRTPhysNormalDerivTraceSharedMemorySize(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::LaunchExtractTraceND(), Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::LaunchIProductWRTPhysTraceND(), Nektar::MultiRegions::detail::CurlCurlBlockOpImpl< ExecSpace, Implementation, TData >::OperatorCurl3DH1(), Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::HelmholtzBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::LinAdvDiffReactionBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::BwdTransBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTBaseBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::AdvectionBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::AdvectionDealiasBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::CurlCurlBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::DivergenceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysDerivBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysGalerkinProject1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysInterp1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::IProductWRTDerivBaseBlockOpImpl< ExecSpace, Implementation, TFieldOut, TData >::OperatorNDImpl(), Nektar::MultiRegions::detail::AdvectionBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::BwdTransBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::CurlCurlBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::DivergenceBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::IProductWRTDerivBaseBlockOpImpl< ExecSpace, Implementation, TFieldOut, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::IProductWRTPhysNormalDerivTraceBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::PhysDerivBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::PhysGalerkinProject1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::PhysInterp1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::PhysTraceExtractBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::IProductWRTBaseBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::HelmholtzBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), Nektar::MultiRegions::detail::LinAdvDiffReactionBlockOpImpl< ExecSpace, Implementation, TData >::SharedMemorySize(), and Nektar::MultiRegions::detail::IProductWRTPhysTraceBlockOpImpl< ExecSpace, Implementation, TData >::TraceSharedMemorySize().

◆ warpsize

constexpr unsigned int Nektar::MultiRegions::detail::warpsize = NektarSpaces::Device::warpSize
constexpr

◆ wsp

NEK_DEVICE_KERNEL void const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const size_t const TElmtsPerBlock const unsigned int const unsigned int const unsigned int const size_t const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TData *NEK_RESTRICT const TUseSharedWsp TData *NEK_RESTRICT Nektar::MultiRegions::detail::wsp

◆ wsp0Size

const unsigned int Nektar::MultiRegions::detail::wsp0Size
Initial value:
=
2u * IProductWRTPhysTraceFaceModeBlockSize(sizeParam3D)

Definition at line 716 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by Nektar::MultiRegions::detail::AdvectionDealiasBlockOpImpl< ExecSpace, Implementation, TData >::AdvectionDealiasBlockOpImpl(), BwdTrans2DWorkspace(), BwdTrans3DWorkspace(), Nektar::MultiRegions::detail::BwdTransBlockOpImpl< ExecSpace, Implementation, TData >::BwdTransBlockOpImpl(), DispatchWorkSpace(), Nektar::MultiRegions::detail::HelmholtzBlockOpImpl< ExecSpace, Implementation, TData >::HelmholtzBlockOpImpl(), IProduct2DWorkspace(), IProduct3DWorkspace(), Nektar::MultiRegions::detail::IProductWRTBaseBlockOpImpl< ExecSpace, Implementation, TData >::IProductWRTBaseBlockOpImpl(), Nektar::MultiRegions::detail::IProductWRTDerivBaseBlockOpImpl< ExecSpace, Implementation, TFieldOut, TData >::IProductWRTDerivBaseBlockOpImpl(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::LaplacianBlockOpImpl(), Nektar::MultiRegions::detail::LinAdvDiffReactionBlockOpImpl< ExecSpace, Implementation, TData >::LinAdvDiffReactionBlockOpImpl(), Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::MassBlockOpImpl(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::SizeWorkspaces(), Nektar::MultiRegions::detail::PhysGalerkinProject1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::v_SetScaleFactor(), and Nektar::MultiRegions::detail::PhysInterp1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::v_SetScaleFactor().

◆ wsp1Size

const unsigned int Nektar::MultiRegions::detail::wsp1Size
Initial value:
=
IProductWRTPhysTraceFaceScratchSize(sizeParam3D)

Definition at line 718 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacKernels.hpp.

Referenced by Nektar::MultiRegions::detail::AdvectionDealiasBlockOpImpl< ExecSpace, Implementation, TData >::AdvectionDealiasBlockOpImpl(), BwdTrans3DWorkspace(), Nektar::MultiRegions::detail::BwdTransBlockOpImpl< ExecSpace, Implementation, TData >::BwdTransBlockOpImpl(), DispatchWorkSpace(), Nektar::MultiRegions::detail::HelmholtzBlockOpImpl< ExecSpace, Implementation, TData >::HelmholtzBlockOpImpl(), IProduct3DWorkspace(), Nektar::MultiRegions::detail::IProductWRTBaseBlockOpImpl< ExecSpace, Implementation, TData >::IProductWRTBaseBlockOpImpl(), Nektar::MultiRegions::detail::IProductWRTDerivBaseBlockOpImpl< ExecSpace, Implementation, TFieldOut, TData >::IProductWRTDerivBaseBlockOpImpl(), Nektar::MultiRegions::detail::LaplacianBlockOpImpl< ExecSpace, Implementation, TData >::LaplacianBlockOpImpl(), Nektar::MultiRegions::detail::LinAdvDiffReactionBlockOpImpl< ExecSpace, Implementation, TData >::LinAdvDiffReactionBlockOpImpl(), Nektar::MultiRegions::detail::MassBlockOpImpl< ExecSpace, Implementation, TData >::MassBlockOpImpl(), Nektar::MultiRegions::detail::PhysLiftProjectBlockOpImpl< ExecSpace, Implementation, TData >::SizeWorkspaces(), Nektar::MultiRegions::detail::PhysGalerkinProject1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::v_SetScaleFactor(), and Nektar::MultiRegions::detail::PhysInterp1DScaledBlockOpImpl< ExecSpace, Implementation, TData >::v_SetScaleFactor().

◆ wspIdx

const unsigned int Nektar::MultiRegions::detail::wspIdx
Initial value:
=
GetDeviceSharedWorkSpaceIdx(elmtsPerBlock, threadBlock)

Definition at line 401 of file IProductWRTPhysNormalDerivTraceBlockOpDeviceSumFacTOPKernels.hpp.