Nektar++
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
Nektar::LocalRegions::PyrExp Class Reference

#include <PyrExp.h>

Inheritance diagram for Nektar::LocalRegions::PyrExp:
[legend]

Public Member Functions

 PyrExp (const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc, SpatialDomains::Geometry3D *geom)
 Constructor using BasisKey class for quadrature points and order definition.
 
 PyrExp (const PyrExp &T)
 
 ~PyrExp () override=default
 
- Public Member Functions inherited from Nektar::StdRegions::StdPyrExp
 StdPyrExp (const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc)
 
 StdPyrExp (const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc, NekDouble *coeffs, NekDouble *phys)
 
 StdPyrExp ()=default
 
 StdPyrExp (const StdPyrExp &T)=default
 
 ~StdPyrExp () override=default
 
- Public Member Functions inherited from Nektar::StdRegions::StdExpansion3D
 StdExpansion3D (int numcoeffs, const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc)
 
 StdExpansion3D ()=default
 
 StdExpansion3D (const StdExpansion3D &T)=default
 
 ~StdExpansion3D () override=default
 
void IProductWRTBaseKernel (const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, NekDouble > &jac, const bool Deformed, bool CollDir0=false, bool CollDir1=false, bool CollDir2=false)
 
int GetNedges () const
 return the number of edges in 3D expansion
 
int GetEdgeNcoeffs (const int i) const
 This function returns the number of expansion coefficients belonging to the i-th edge.
 
void GetEdgeInteriorToElementMap (const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation traceOrient=eForwards)
 
- Public Member Functions inherited from Nektar::StdRegions::StdExpansion
 StdExpansion ()
 Default Constructor.
 
 StdExpansion (const int numcoeffs, const int numbases, const LibUtilities::BasisKey &Ba=LibUtilities::NullBasisKey, const LibUtilities::BasisKey &Bb=LibUtilities::NullBasisKey, const LibUtilities::BasisKey &Bc=LibUtilities::NullBasisKey)
 Constructor.
 
 StdExpansion (const StdExpansion &T)
 Copy Constructor.
 
virtual ~StdExpansion ()
 Destructor.
 
int GetNumBases () const
 This function returns the number of 1D bases used in the expansion.
 
const Array< OneD, const LibUtilities::BasisSharedPtr > & GetBase () const
 This function gets the shared point to basis.
 
const LibUtilities::BasisSharedPtrGetBasis (int dir) const
 This function gets the shared point to basis in the dir direction.
 
int GetNcoeffs (void) const
 This function returns the total number of coefficients used in the expansion.
 
int GetTotPoints () const
 This function returns the total number of quadrature points used in the element.
 
LibUtilities::BasisType GetBasisType (const int dir) const
 This function returns the type of basis used in the dir direction.
 
int GetBasisNumModes (const int dir) const
 This function returns the number of expansion modes in the dir direction.
 
int EvalBasisNumModesMax (void) const
 This function returns the maximum number of expansion modes over all local directions.
 
LibUtilities::PointsType GetPointsType (const int dir) const
 This function returns the type of quadrature points used in the dir direction.
 
int GetNumPoints (const int dir) const
 This function returns the number of quadrature points in the dir direction.
 
const Array< OneD, const NekDouble > & GetPoints (const int dir) const
 This function returns a pointer to the array containing the quadrature points in dir direction.
 
int GetNverts () const
 This function returns the number of vertices of the expansion domain.
 
int GetTraceNcoeffs (const int i) const
 This function returns the number of expansion coefficients belonging to the i-th trace.
 
int GetTraceIntNcoeffs (const int i) const
 
int GetTraceNumPoints (const int i) const
 This function returns the number of quadrature points belonging to the i-th trace.
 
const LibUtilities::BasisKey GetTraceBasisKey (const int i, int k=-1, bool UseGLL=false) const
 This function returns the basis key belonging to the i-th trace.
 
LibUtilities::PointsKey GetTracePointsKey (const int i, int k=-1) const
 This function returns the basis key belonging to the i-th trace.
 
int NumBndryCoeffs (void) const
 
int NumDGBndryCoeffs (void) const
 
const LibUtilities::PointsKey GetNodalPointsKey () const
 This function returns the type of expansion Nodal point type if defined.
 
int GetNtraces () const
 Returns the number of trace elements connected to this element.
 
LibUtilities::ShapeType DetShapeType () const
 This function returns the shape of the expansion domain.
 
int GetShapeDimension () const
 
bool IsBoundaryInteriorExpansion () const
 
bool IsNodalNonTensorialExp ()
 
void NodalToModal (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void BwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function performs the Backward transformation from coefficient space to physical space.
 
void FwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void FwdTransBndConstrained (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
NekDouble Integral (const Array< OneD, const NekDouble > &inarray)
 This function integrates the specified function over the domain.
 
void FillMode (const int mode, Array< OneD, NekDouble > &outarray)
 This function fills the array outarray with the mode-th mode of the expansion.
 
void IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 this function calculates the inner product of a given function f with the different modes of the expansion
 
void IProductWRTDerivBase (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void IProductWRTDirectionalDerivBase (const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
int GetElmtId ()
 Get the element id of this expansion when used in a list by returning value of m_elmt_id.
 
void SetElmtId (const int id)
 Set the element id of this expansion when used in a list by returning value of m_elmt_id.
 
void GetCoords (Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2=NullNekDouble1DArray, Array< OneD, NekDouble > &coords_3=NullNekDouble1DArray)
 this function returns the physical coordinates of the quadrature points of the expansion
 
Array< OneD, Array< OneD, NekDouble > > GetCoords ()
 
void GetCoord (const Array< OneD, const NekDouble > &Lcoord, Array< OneD, NekDouble > &coord)
 given the coordinates of a point of the element in the local collapsed coordinate system, this function calculates the physical coordinates of the point
 
DNekMatSharedPtr GetStdMatrix (const StdMatrixKey &mkey)
 
DNekBlkMatSharedPtr GetStdStaticCondMatrix (const StdMatrixKey &mkey)
 
Array< OneD, const NekDoubleGetStdFac (const StdFacKey &mkey)
 
void NormVectorIProductWRTBase (const Array< OneD, const NekDouble > &Fx, Array< OneD, NekDouble > &outarray)
 
void NormVectorIProductWRTBase (const Array< OneD, const NekDouble > &Fx, const Array< OneD, NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
 
void NormVectorIProductWRTBase (const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, const Array< OneD, const NekDouble > &Fz, Array< OneD, NekDouble > &outarray)
 
void NormVectorIProductWRTBase (const Array< OneD, const Array< OneD, NekDouble > > &Fvec, Array< OneD, NekDouble > &outarray)
 
DNekScalBlkMatSharedPtr GetLocStaticCondMatrix (const LocalRegions::MatrixKey &mkey)
 
void DropLocStaticCondMatrix (const LocalRegions::MatrixKey &mkey)
 
int CalcNumberOfCoefficients (const std::vector< unsigned int > &nummodes, int &modes_offset)
 
NekDouble StdPhysEvaluate (const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals)
 
int GetCoordim ()
 
void GetBoundaryMap (Array< OneD, unsigned int > &outarray)
 
void GetInteriorMap (Array< OneD, unsigned int > &outarray)
 
int GetVertexMap (const int localVertexId, bool useCoeffPacking=false)
 
void GetTraceToElementMap (const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation traceOrient=eForwards, int P=-1, int Q=-1)
 
void GetTraceCoeffMap (const unsigned int traceid, Array< OneD, unsigned int > &maparray)
 
void GetElmtTraceToTraceMap (const unsigned int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation traceOrient=eForwards, int P=-1, int Q=-1)
 
void GetTraceInteriorToElementMap (const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation traceOrient=eForwards)
 
void GetTraceNumModes (const int tid, int &numModes0, int &numModes1, const Orientation traceOrient=eDir1FwdDir1_Dir2FwdDir2)
 
void MultiplyByQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void MultiplyByStdQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
DNekMatSharedPtr CreateGeneralMatrix (const StdMatrixKey &mkey)
 this function generates the mass matrix \(\mathbf{M}[i][j] = \int \phi_i(\mathbf{x}) \phi_j(\mathbf{x}) d\mathbf{x}\)
 
void GeneralMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void MassMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void LaplacianMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void ReduceOrderCoeffs (int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void SVVLaplacianFilter (Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
 
void ExponentialFilter (Array< OneD, NekDouble > &array, const NekDouble alpha, const NekDouble exponent, const NekDouble cutoff)
 
void LaplacianMatrixOp (const int k1, const int k2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void WeakDerivMatrixOp (const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void WeakDirectionalDerivMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void MassLevelCurvatureMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void LinearAdvectionMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void LinearAdvectionDiffusionReactionMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey, bool addDiffusionTerm=true)
 
void HelmholtzMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
DNekMatSharedPtr GenMatrix (const StdMatrixKey &mkey)
 
void PhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1=NullNekDouble1DArray, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
 
void PhysDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void PhysDirectionalDeriv (const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &direction, Array< OneD, NekDouble > &outarray)
 
void StdPhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1=NullNekDouble1DArray, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
 
NekDouble PhysEvaluate (const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &physvals)
 This function evaluates the expansion at a single (arbitrary) point of the domain.
 
NekDouble PhysEvaluate (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs)
 This function evaluates the first derivative of the expansion at a single (arbitrary) point of the domain.
 
NekDouble PhysEvaluate (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs, std::array< NekDouble, 6 > &secondOrderDerivs)
 
NekDouble PhysEvaluate (const Array< OneD, DNekMatSharedPtr > &I, const Array< OneD, const NekDouble > &physvals)
 This function evaluates the expansion at a single (arbitrary) point of the domain.
 
NekDouble PhysEvaluateBasis (const Array< OneD, const NekDouble > &coords, int mode)
 This function evaluates the basis function mode mode at a point coords of the domain.
 
void ReOrientTracePhysMap (const StdRegions::Orientation orient, Array< OneD, int > &idmap, const int nq0, const int nq1, bool Forwards=true)
 
void LocCoordToLocCollapsed (const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
 Convert local cartesian coordinate xi into local collapsed coordinates eta.
 
void LocCollapsedToLocCoord (const Array< OneD, const NekDouble > &eta, Array< OneD, NekDouble > &xi)
 Convert local collapsed coordinates eta into local cartesian coordinate xi.
 
void PhysInterp (std::shared_ptr< StdExpansion > fromExp, const Array< OneD, const NekDouble > &fromData, Array< OneD, NekDouble > &toData, bool Transpose=false)
 interpolate from one set of quadrature points available from FromExp to the set of quadrature points in the current expansion. If the points are the same this routine will just copy the data
 
virtual void v_NormVectorIProductWRTBase (const Array< OneD, const NekDouble > &Fx, Array< OneD, NekDouble > &outarray)
 
virtual void v_NormVectorIProductWRTBase (const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
 
virtual void v_NormVectorIProductWRTBase (const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, const Array< OneD, const NekDouble > &Fz, Array< OneD, NekDouble > &outarray)
 
NekDouble Linf (const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &sol=NullNekDouble1DArray)
 Function to evaluate the discrete \( L_\infty\) error \( |\epsilon|_\infty = \max |u - u_{exact}|\) where \( u_{exact}\) is given by the array sol.
 
NekDouble L2 (const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &sol=NullNekDouble1DArray)
 Function to evaluate the discrete \( L_2\) error, \( | \epsilon |_{2} = \left [ \int^1_{-1} [u - u_{exact}]^2 dx \right]^{1/2} d\xi_1 \) where \( u_{exact}\) is given by the array sol.
 
NekDouble H1 (const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &sol=NullNekDouble1DArray)
 Function to evaluate the discrete \( H^1\) error, \( | \epsilon |^1_{2} = \left [ \int^1_{-1} [u - u_{exact}]^2 + \nabla(u - u_{exact})\cdot\nabla(u - u_{exact})\cdot dx \right]^{1/2} d\xi_1 \) where \( u_{exact}\) is given by the array sol.
 
const LibUtilities::PointsKeyVector GetPointsKeys () const
 
DNekMatSharedPtr BuildInverseTransformationMatrix (const DNekScalMatSharedPtr &m_transformationmatrix)
 
void PhysInterpToSimplexEquiSpaced (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, int npset=-1)
 This function performs an interpolation from the physical space points provided at input into an array of equispaced points which are not the collapsed coordinate. So for a tetrahedron you will only get a tetrahedral number of values.
 
void PhysInterpToGLL (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, int npset=-1)
 
void PhysInterpToPoints (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, int npset, MatrixType distrib)
 
void GetSimplexEquiSpacedConnectivity (Array< OneD, int > &conn, bool standard=true)
 This function provides the connectivity of local simplices (triangles or tets) to connect the equispaced data points provided by PhysInterpToSimplexEquiSpaced.
 
void EquiSpacedToCoeffs (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function performs a projection/interpolation from the equispaced points sometimes used in post-processing onto the coefficient space.
 
void EquiSpacedToPhys (const int nequi, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
template<class T >
std::shared_ptr< T > as ()
 
void GenStdMatBwdDeriv (const int dir, DNekMatSharedPtr &mat)
 
- Public Member Functions inherited from Nektar::LocalRegions::Expansion3D
 Expansion3D (SpatialDomains::Geometry3D *pGeom)
 
 ~Expansion3D () override=default
 
void SetTraceToGeomOrientation (Array< OneD, NekDouble > &inout)
 Align trace orientation with the geometry orientation.
 
void SetFaceToGeomOrientation (const int face, Array< OneD, NekDouble > &inout)
 Align face orientation with the geometry orientation.
 
void AddHDGHelmholtzFaceTerms (const NekDouble tau, const int edge, Array< OneD, NekDouble > &facePhys, const StdRegions::VarCoeffMap &dirForcing, Array< OneD, NekDouble > &outarray)
 
void AddNormTraceInt (const int dir, Array< OneD, ExpansionSharedPtr > &FaceExp, Array< OneD, Array< OneD, NekDouble > > &faceCoeffs, Array< OneD, NekDouble > &outarray)
 
void AddNormTraceInt (const int dir, Array< OneD, const NekDouble > &inarray, Array< OneD, ExpansionSharedPtr > &FaceExp, Array< OneD, NekDouble > &outarray, const StdRegions::VarCoeffMap &varcoeffs)
 
void AddFaceBoundaryInt (const int face, ExpansionSharedPtr &FaceExp, Array< OneD, NekDouble > &facePhys, Array< OneD, NekDouble > &outarray, const StdRegions::VarCoeffMap &varcoeffs=StdRegions::NullVarCoeffMap)
 
SpatialDomains::Geometry3DGetGeom3D () const
 
void v_ReOrientTracePhysVals (const StdRegions::Orientation orient, const Array< OneD, const NekDouble > &in, Array< OneD, NekDouble > &out, const int nq0, const int nq1, bool Forwards) override
 
void v_NormVectorIProductWRTBase (const Array< OneD, const Array< OneD, NekDouble > > &Fvec, Array< OneD, NekDouble > &outarray) override
 
Array< OneD, unsigned int > GetEdgeInverseBoundaryMap (int eid)
 
Array< OneD, unsigned int > GetTraceInverseBoundaryMap (int fid, StdRegions::Orientation faceOrient=StdRegions::eNoOrientation, int P1=-1, int P2=-1)
 
void GetInverseBoundaryMaps (Array< OneD, unsigned int > &vmap, Array< OneD, Array< OneD, unsigned int > > &emap, Array< OneD, Array< OneD, unsigned int > > &fmap)
 
DNekScalMatSharedPtr CreateMatrix (const MatrixKey &mkey)
 
void GetTracePhysVals (const int trace, const StdRegions::StdExpansionSharedPtr &TraceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient=StdRegions::eNoOrientation)
 
void GetLocTracePhysVals (const int trace, const StdRegions::StdExpansionSharedPtr &TraceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
- Public Member Functions inherited from Nektar::LocalRegions::Expansion
 Expansion (SpatialDomains::Geometry *pGeom)
 
 Expansion (const Expansion &pSrc)
 
 ~Expansion () override
 
void SetTraceExp (const int traceid, ExpansionSharedPtr &f)
 
ExpansionSharedPtr GetTraceExp (const int traceid)
 
ExpansionSharedPtr GetLocTraceExp (const int traceid)
 
StdRegions::StdExpansionSharedPtr GetStdExp () const
 
StdRegions::StdExpansionSharedPtr GetLinStdExp (void) const
 
DNekScalMatSharedPtr GetLocMatrix (const LocalRegions::MatrixKey &mkey)
 
void DropLocMatrix (const LocalRegions::MatrixKey &mkey)
 
DNekScalMatSharedPtr GetLocMatrix (const StdRegions::MatrixType mtype, const StdRegions::ConstFactorMap &factors=StdRegions::NullConstFactorMap, const StdRegions::VarCoeffMap &varcoeffs=StdRegions::NullVarCoeffMap)
 
SpatialDomains::GeometryGetGeom () const
 
void Reset ()
 
IndexMapValuesSharedPtr CreateIndexMap (const IndexMapKey &ikey)
 
DNekScalBlkMatSharedPtr CreateStaticCondMatrix (const MatrixKey &mkey)
 
SpatialDomains::GeomFactorsGetGeomFactors () const
 Get the geometric factors for this object, generating them if required.
 
DNekMatSharedPtr BuildTransformationMatrix (const DNekScalMatSharedPtr &r_bnd, const StdRegions::MatrixType matrixType)
 
DNekMatSharedPtr BuildVertexMatrix (const DNekScalMatSharedPtr &r_bnd)
 
void ExtractDataToCoeffs (const NekDouble *data, const std::vector< unsigned int > &nummodes, const int nmodes_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType)
 
void AddEdgeNormBoundaryInt (const int edge, const std::shared_ptr< Expansion > &EdgeExp, const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
 
void AddEdgeNormBoundaryInt (const int edge, const std::shared_ptr< Expansion > &EdgeExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
 
void AddFaceNormBoundaryInt (const int face, const std::shared_ptr< Expansion > &FaceExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
 
void DGDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, Array< OneD, NekDouble > > &coeffs, Array< OneD, NekDouble > &outarray)
 
NekDouble VectorFlux (const Array< OneD, Array< OneD, NekDouble > > &vec)
 
void NormalTraceDerivFactors (Array< OneD, Array< OneD, NekDouble > > &factors, Array< OneD, Array< OneD, NekDouble > > &d0factors, Array< OneD, Array< OneD, NekDouble > > &d1factors)
 
IndexMapValuesSharedPtr GetIndexMap (const IndexMapKey &ikey)
 
void AlignVectorToCollapsedDir (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
 
ExpansionSharedPtr GetLeftAdjacentElementExp () const
 
ExpansionSharedPtr GetRightAdjacentElementExp () const
 
int GetLeftAdjacentElementTrace () const
 
int GetRightAdjacentElementTrace () const
 
void SetAdjacentElementExp (int traceid, ExpansionSharedPtr &e)
 
StdRegions::Orientation GetTraceOrient (int trace)
 
void SetCoeffsToOrientation (StdRegions::Orientation dir, Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void DivideByQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 Divided by the metric jacobi and quadrature weights.
 
void GetTraceQFactors (const int trace, Array< OneD, NekDouble > &outarray)
 Extract the metric factors to compute the contravariant fluxes along edge edge and stores them into outarray following the local edge orientation (i.e. anticlockwise convention).
 
void GetTracePhysVals (const int trace, const StdRegions::StdExpansionSharedPtr &TraceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient=StdRegions::eNoOrientation)
 
void GetLocTracePhysVals (const int trace, const StdRegions::StdExpansionSharedPtr &TraceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void GetTracePhysMap (const int edge, Array< OneD, int > &outarray)
 
void ReOrientTracePhysVals (const StdRegions::Orientation orient, const Array< OneD, const NekDouble > &in, Array< OneD, NekDouble > &out, const int nq0, const int nq1, bool Forwards=true)
 
const NormalVectorGetTraceNormal (const int id)
 
const std::map< int, NormalVector > & GetTraceNormals (void)
 
void ComputeTraceNormal (const int id)
 
const Array< OneD, const NekDouble > & GetPhysNormals (void)
 
void SetPhysNormals (Array< OneD, const NekDouble > &normal)
 
void SetUpPhysNormals (const int trace)
 
void AddRobinMassMatrix (const int traceid, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat)
 
void TraceNormLen (const int traceid, NekDouble &h, NekDouble &p)
 
void AddRobinTraceContribution (const int traceid, const Array< OneD, const NekDouble > &primCoeffs, const Array< OneD, NekDouble > &incoeffs, Array< OneD, NekDouble > &coeffs)
 
const Array< OneD, const NekDouble > & GetElmtBndNormDirElmtLen (const int nbnd) const
 
void StdDerivBaseOnTraceMat (Array< OneD, DNekMatSharedPtr > &DerivMat)
 
void PhysDerivBaseOnTraceMat (const int traceid, Array< OneD, DNekMatSharedPtr > &DerivMat)
 
void PhysBaseOnTraceMat (const int traceid, DNekMatSharedPtr &BdataMat)
 
void GenGeomFactors ()
 Handles generation of geometry factors.
 

Protected Member Functions

void v_IProductWRTDerivBase (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 Calculates the inner product \( I_{pqr} = (u, \partial_{x_i} \phi_{pqr}) \).
 
void v_AlignVectorToCollapsedDir (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
 
StdRegions::StdExpansionSharedPtr v_GetStdExp (void) const override
 
StdRegions::StdExpansionSharedPtr v_GetLinStdExp (void) const override
 
void v_GetCoord (const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords) override
 
void v_GetCoords (Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
 
void v_ExtractDataToCoeffs (const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType) override
 
NekDouble v_PhysEvalFirstDeriv (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) override
 
void v_GetTracePhysMap (const int face, Array< OneD, int > &outarray) override
 
void v_ComputeTraceNormal (const int face) override
 
void v_SVVLaplacianFilter (Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey) override
 
DNekMatSharedPtr v_GenMatrix (const StdRegions::StdMatrixKey &mkey) override
 
DNekMatSharedPtr v_CreateStdMatrix (const StdRegions::StdMatrixKey &mkey) override
 
DNekScalMatSharedPtr v_GetLocMatrix (const MatrixKey &mkey) override
 
DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix (const MatrixKey &mkey) override
 
void v_DropLocMatrix (const MatrixKey &mkey) override
 
void v_DropLocStaticCondMatrix (const MatrixKey &mkey) override
 
void v_ComputeLaplacianMetric () override
 
- Protected Member Functions inherited from Nektar::StdRegions::StdPyrExp
void v_StdPhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2) override
 Calculate the derivative of the physical points.
 
void v_BwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 Backward transformation is evaluated at the quadrature points.
 
void v_IProductWRTBaseKernel (const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, NekDouble > &jac, const bool Deformed, bool CollDir0=false, bool CollDir1=false, bool CollDir2=false) override
 Inner product of inarray over region with respect to the expansion basis (this)->m_base[0] and return in outarray.
 
void v_IProductWRTDerivBase (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_LocCoordToLocCollapsed (const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta) override
 
void v_LocCollapsedToLocCoord (const Array< OneD, const NekDouble > &eta, Array< OneD, NekDouble > &xi) override
 
void v_GetCoords (Array< OneD, NekDouble > &xi_x, Array< OneD, NekDouble > &xi_y, Array< OneD, NekDouble > &xi_z) override
 
void v_FillMode (const int mode, Array< OneD, NekDouble > &outarray) override
 
void v_GetTraceNumModes (const int fid, int &numModes0, int &numModes1, Orientation faceOrient=eDir1FwdDir1_Dir2FwdDir2) override
 
NekDouble v_PhysEvaluateBasis (const Array< OneD, const NekDouble > &coords, int mode) final
 
NekDouble v_PhysEvalFirstDeriv (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) override
 
int v_GetNverts () const override
 
int v_GetNedges () const override
 
int v_GetNtraces () const override
 
LibUtilities::ShapeType v_DetShapeType () const override
 
int v_NumBndryCoeffs () const override
 
int v_NumDGBndryCoeffs () const override
 
int v_GetTraceNcoeffs (const int i) const override
 
int v_GetTraceIntNcoeffs (const int i) const override
 
int v_GetTraceNumPoints (const int i) const override
 
int v_GetEdgeNcoeffs (const int i) const override
 
int v_CalcNumberOfCoefficients (const std::vector< unsigned int > &nummodes, int &modes_offset) override
 
const LibUtilities::BasisKey v_GetTraceBasisKey (const int i, const int k, bool UseGLL=false) const override
 
int v_GetVertexMap (int localVertexId, bool useCoeffPacking=false) override
 
void v_GetInteriorMap (Array< OneD, unsigned int > &outarray) override
 
void v_GetBoundaryMap (Array< OneD, unsigned int > &outarray) override
 
void v_GetTraceCoeffMap (const unsigned int fid, Array< OneD, unsigned int > &maparray) override
 
void v_GetElmtTraceToTraceMap (const unsigned int fid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation faceOrient, int P, int Q) override
 
void v_GetEdgeInteriorToElementMap (const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation traceOrient=eDir1FwdDir1_Dir2FwdDir2) override
 
void v_GetTraceInteriorToElementMap (const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation traceOrient=eDir1FwdDir1_Dir2FwdDir2) override
 
DNekMatSharedPtr v_GenMatrix (const StdMatrixKey &mkey) override
 
DNekMatSharedPtr v_CreateStdMatrix (const StdMatrixKey &mkey) override
 
void v_SVVLaplacianFilter (Array< OneD, NekDouble > &array, const StdMatrixKey &mkey) override
 
void v_ReduceOrderCoeffs (int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
- Protected Member Functions inherited from Nektar::StdRegions::StdExpansion3D
void PhysTensorDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2)
 Calculate the 3D derivative in the local tensor/collapsed coordinate at the physical points.
 
void v_PhysDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 Calculate the derivative of the physical points in a given direction.
 
NekDouble v_StdPhysEvaluate (const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &physvals) override
 This function evaluates the expansion at a single (arbitrary) point of the domain.
 
NekDouble v_PhysEvaluateInterp (const Array< OneD, DNekMatSharedPtr > &I, const Array< OneD, const NekDouble > &physvals) override
 
void v_IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_MultiplyByStdQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_LaplacianMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
void v_HelmholtzMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
NekDouble BaryTensorDeriv (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs)
 
void v_GetTraceToElementMap (const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation traceOrient, int P, int Q) override
 
void v_GenStdMatBwdDeriv (const int dir, DNekMatSharedPtr &mat) override
 
void v_PhysInterp (std::shared_ptr< StdExpansion > fromExp, const Array< OneD, const NekDouble > &fromData, Array< OneD, NekDouble > &toData, bool Transpose) override
 
void v_ReOrientTracePhysMap (const StdRegions::Orientation orient, Array< OneD, int > &idmap, const int nq0, const int nq1, bool Forwards) override
 This method produces a mapping.
 
int v_GetShapeDimension () const final
 
bool v_IsCollocatedBasis () const final
 
virtual void v_PhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2, Array< OneD, NekDouble > &out_d3)
 Calculate the derivative of the physical points.
 
virtual void v_PhysDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0)
 Calculate the derivative of the physical points in a given direction.
 
- Protected Member Functions inherited from Nektar::StdRegions::StdExpansion
DNekMatSharedPtr CreateStdMatrix (const StdMatrixKey &mkey)
 
std::shared_ptr< Array< OneD, const NekDouble > > CreateStdFac (const StdFacKey &mkey)
 
DNekBlkMatSharedPtr CreateStdStaticCondMatrix (const StdMatrixKey &mkey)
 Create the static condensation of a matrix when using a boundary interior decomposition.
 
void GeneralMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void MassMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void LaplacianMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void LaplacianMatrixOp_MatFree_Kernel (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
 
void LaplacianMatrixOp_MatFree_GenericImpl (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void LaplacianMatrixOp_MatFree (const int k1, const int k2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void WeakDerivMatrixOp_MatFree (const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void WeakDirectionalDerivMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void MassLevelCurvatureMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void LinearAdvectionMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void LinearAdvectionDiffusionReactionMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey, bool addDiffusionTerm=true)
 
void HelmholtzMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
void HelmholtzMatrixOp_MatFree_GenericImpl (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
template<int DIR, bool DERIV = false, bool DERIV2 = false>
NekDouble BaryEvaluate (const NekDouble &coord, const NekDouble *physvals, NekDouble &deriv, NekDouble &deriv2)
 This function performs the barycentric interpolation of the polynomial stored in coord at a point physvals using barycentric interpolation weights in direction.
 
template<int DIR>
NekDouble BaryEvaluateBasis (const NekDouble &coord, const int &mode)
 
template<int DIR, bool DERIV = false, bool DERIV2 = false>
NekDouble BaryEvaluate (const NekDouble &coord, const NekDouble *physvals)
 Helper function to pass an unused value by reference into BaryEvaluate.
 
template<int DIR, bool DERIV = false, bool DERIV2 = false>
NekDouble BaryEvaluate (const NekDouble &coord, const NekDouble *physvals, NekDouble &deriv)
 
virtual LibUtilities::PointsKey v_GetTracePointsKey (const int i, const int j) const
 
virtual const LibUtilities::PointsKey v_GetNodalPointsKey () const
 
virtual bool v_IsBoundaryInteriorExpansion () const
 
virtual bool v_IsNodalNonTensorialExp ()
 
virtual void v_NodalToModal (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_IProductWRTDirectionalDerivBase (const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_FwdTransBndConstrained (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual NekDouble v_PhysEvalFirstSecondDeriv (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs, std::array< NekDouble, 6 > &secondOrderDerivs)
 
virtual void v_GetVertexPhysVals (const int vertex, const Array< OneD, const NekDouble > &inarray, NekDouble &outarray)
 
virtual void v_MassMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_LaplacianMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_ExponentialFilter (Array< OneD, NekDouble > &array, const NekDouble alpha, const NekDouble exponent, const NekDouble cutoff)
 
virtual void v_LaplacianMatrixOp (const int k1, const int k2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_WeakDerivMatrixOp (const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_WeakDirectionalDerivMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_MassLevelCurvatureMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_LinearAdvectionMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_LinearAdvectionDiffusionReactionMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey, bool addDiffusionTerm=true)
 
virtual void v_HelmholtzMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_GetSimplexEquiSpacedConnectivity (Array< OneD, int > &conn, bool standard=true)
 
- Protected Member Functions inherited from Nektar::LocalRegions::Expansion3D
void v_DGDeriv (const int dir, const Array< OneD, const NekDouble > &incoeffs, Array< OneD, ExpansionSharedPtr > &FaceExp, Array< OneD, Array< OneD, NekDouble > > &faceCoeffs, Array< OneD, NekDouble > &out_d) override
 Evaluate coefficients of weak deriviative in the direction dir given the input coefficicents incoeffs and the imposed boundary values in EdgeExp (which will have its phys space updated).
 
void v_PhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2) override
 Calculate the derivative of the physical points.
 
void v_PhysDirectionalDeriv (const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &direction, Array< OneD, NekDouble > &out) override
 Physical derivative along a direction vector.
 
void v_IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 Calculate the inner product of inarray with respect to the elements basis.
 
void v_AddFaceNormBoundaryInt (const int face, const ExpansionSharedPtr &FaceExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray) override
 
void v_AddRobinMassMatrix (const int face, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat) override
 
StdRegions::Orientation v_GetTraceOrient (int face) override
 
void v_GetTracePhysVals (const int face, const StdRegions::StdExpansionSharedPtr &FaceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient) override
 Extract the physical values along face face from inarray into outarray following the face orientation and point distribution defined by defined in FaceExp.
 
void v_GetLocTracePhysVals (const int face, const StdRegions::StdExpansionSharedPtr &FaceExp, const NekDouble *inarray, Array< OneD, NekDouble > &outarray) override
 Extract the physical values along face face from inarray into outarray following the local elemental face orientation and point distribution defined by defined in FaceExp.
 
void v_GenTraceExp (const int traceid, ExpansionSharedPtr &exp) override
 
void GetPhysFaceVarCoeffsFromElement (const int face, ExpansionSharedPtr &FaceExp, const Array< OneD, const NekDouble > &varcoeff, Array< OneD, NekDouble > &outarray)
 
DNekMatSharedPtr v_BuildTransformationMatrix (const DNekScalMatSharedPtr &r_bnd, const StdRegions::MatrixType matrixType) override
 
DNekMatSharedPtr v_BuildInverseTransformationMatrix (const DNekScalMatSharedPtr &transformationmatrix) override
 Build inverse and inverse transposed transformation matrix: \(\mathbf{R^{-1}}\) and \(\mathbf{R^{-T}}\).
 
DNekMatSharedPtr v_BuildVertexMatrix (const DNekScalMatSharedPtr &r_bnd) override
 
void v_TraceNormLen (const int traceid, NekDouble &h, NekDouble &p) override
 
void v_NormalTraceDerivFactors (Array< OneD, Array< OneD, NekDouble > > &d0factors, Array< OneD, Array< OneD, NekDouble > > &d1factors, Array< OneD, Array< OneD, NekDouble > > &d2factors) override
 : This method gets all of the factors which are required as part of the Gradient Jump Penalty stabilisation and involves the product of the normal and geometric factors along the element trace.
 
- Protected Member Functions inherited from Nektar::LocalRegions::Expansion
void ComputeLaplacianMetric ()
 
void ComputeQuadratureMetric ()
 
void ComputeGmatcdotMF (const Array< TwoD, const NekDouble > &df, const Array< OneD, const NekDouble > &direction, Array< OneD, Array< OneD, NekDouble > > &dfdir)
 
Array< OneD, NekDoubleGetMF (const int dir, const int shapedim, const StdRegions::VarCoeffMap &varcoeffs)
 
Array< OneD, NekDoubleGetMFDiv (const int dir, const StdRegions::VarCoeffMap &varcoeffs)
 
Array< OneD, NekDoubleGetMFMag (const int dir, const StdRegions::VarCoeffMap &varcoeffs)
 
void v_FwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 Forward transform from physical quadrature space stored in inarray and evaluate the expansion coefficients and store in (this)->m_coeffs.
 
NekDouble v_PhysEvaluate (const Array< OneD, const NekDouble > &coord, const Array< OneD, const NekDouble > &physvals) override
 
void v_MultiplyByQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
virtual void v_DivideByQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
int v_GetCoordim () const override
 
virtual void v_AddEdgeNormBoundaryInt (const int edge, const std::shared_ptr< Expansion > &EdgeExp, const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
 
virtual void v_AddEdgeNormBoundaryInt (const int edge, const std::shared_ptr< Expansion > &EdgeExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
 
virtual void v_AddFaceNormBoundaryInt (const int face, const std::shared_ptr< Expansion > &FaceExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
 
virtual NekDouble v_VectorFlux (const Array< OneD, Array< OneD, NekDouble > > &vec)
 
void v_SetCoeffsToOrientation (StdRegions::Orientation dir, Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
virtual void v_GetTraceQFactors (const int trace, Array< OneD, NekDouble > &outarray)
 
virtual const Array< OneD, const NekDouble > & v_GetPhysNormals ()
 
virtual void v_SetPhysNormals (Array< OneD, const NekDouble > &normal)
 
virtual void v_SetUpPhysNormals (const int id)
 
virtual void v_AddRobinTraceContribution (const int traceid, const Array< OneD, const NekDouble > &primCoeffs, const Array< OneD, NekDouble > &incoeffs, Array< OneD, NekDouble > &coeffs)
 

Private Member Functions

void v_LaplacianMatrixOp_MatFree_Kernel (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp) override
 

Private Attributes

LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLessm_matrixManager
 
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLessm_staticCondMatrixManager
 

Additional Inherited Members

- Protected Attributes inherited from Nektar::StdRegions::StdExpansion
Array< OneD, LibUtilities::BasisSharedPtrm_base
 
int m_elmt_id
 
int m_ncoeffs
 
std::vector< Array< OneD, const NekDouble > > m_weights
 
LibUtilities::NekManager< StdMatrixKey, DNekMat, StdMatrixKey::opLessm_stdMatrixManager
 
LibUtilities::NekManager< StdMatrixKey, DNekBlkMat, StdMatrixKey::opLessm_stdStaticCondMatrixManager
 
LibUtilities::NekManager< StdFacKey, Array< OneD, const NekDouble > > m_stdFacManager
 
- Protected Attributes inherited from Nektar::LocalRegions::Expansion3D
std::map< int, NormalVectorm_faceNormals
 
- Protected Attributes inherited from Nektar::LocalRegions::Expansion
LibUtilities::NekManager< IndexMapKey, IndexMapValues, IndexMapKey::opLessm_indexMapManager
 
std::map< int, ExpansionWeakPtrm_traceExp
 
SpatialDomains::Geometrym_geom
 
SpatialDomains::GeomFactorsUniquePtr m_geomFactors
 
MetricMap m_metrics
 
std::map< int, NormalVectorm_traceNormals
 
ExpansionWeakPtr m_elementLeft
 
ExpansionWeakPtr m_elementRight
 
int m_elementTraceLeft = -1
 
int m_elementTraceRight = -1
 
std::map< int, Array< OneD, NekDouble > > m_elmtBndNormDirElmtLen
 the element length in each element boundary(Vertex, edge or face) normal direction calculated based on the local m_geomFactors times the standard element length (which is 2.0)
 

Detailed Description

Definition at line 48 of file PyrExp.h.

Constructor & Destructor Documentation

◆ PyrExp() [1/2]

Nektar::LocalRegions::PyrExp::PyrExp ( const LibUtilities::BasisKey Ba,
const LibUtilities::BasisKey Bb,
const LibUtilities::BasisKey Bc,
SpatialDomains::Geometry3D geom 
)

Constructor using BasisKey class for quadrature points and order definition.

Definition at line 43 of file PyrExp.cpp.

48 Ba.GetNumModes(), Bb.GetNumModes(), Bc.GetNumModes()),
49 3, Ba, Bb, Bc),
51 Ba.GetNumModes(), Bb.GetNumModes(), Bc.GetNumModes()),
52 Ba, Bb, Bc),
53 StdPyrExp(Ba, Bb, Bc), Expansion(geom), Expansion3D(geom),
55 std::bind(&Expansion3D::CreateMatrix, this, std::placeholders::_1)),
57 this, std::placeholders::_1))
58{
59}
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
Expansion3D(SpatialDomains::Geometry3D *pGeom)
Definition Expansion3D.h:59
Expansion(SpatialDomains::Geometry *pGeom)
Definition Expansion.cpp:43
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition PyrExp.h:130
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition PyrExp.h:132
StdExpansion()
Default Constructor.
constexpr int getNumberOfCoefficients(int Na, int Nb, int Nc)

◆ PyrExp() [2/2]

Nektar::LocalRegions::PyrExp::PyrExp ( const PyrExp T)

Definition at line 61 of file PyrExp.cpp.

63 Expansion3D(T), m_matrixManager(T.m_matrixManager),
64 m_staticCondMatrixManager(T.m_staticCondMatrixManager)
65{
66}

◆ ~PyrExp()

Nektar::LocalRegions::PyrExp::~PyrExp ( )
overridedefault

Member Function Documentation

◆ v_AlignVectorToCollapsedDir()

void Nektar::LocalRegions::PyrExp::v_AlignVectorToCollapsedDir ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, Array< OneD, NekDouble > > &  outarray 
)
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 138 of file PyrExp.cpp.

141{
142 const int nquad0 = m_base[0]->GetNumPoints();
143 const int nquad1 = m_base[1]->GetNumPoints();
144 const int nquad2 = m_base[2]->GetNumPoints();
145 const int nqtot = nquad0 * nquad1 * nquad2;
146
147 const Array<OneD, const NekDouble> &z0 = m_base[0]->GetZ();
148 const Array<OneD, const NekDouble> &z1 = m_base[1]->GetZ();
149 const Array<OneD, const NekDouble> &z2 = m_base[2]->GetZ();
150
151 Array<OneD, NekDouble> tmp2 = outarray[0];
152 Array<OneD, NekDouble> tmp3 = outarray[1];
153 Array<OneD, NekDouble> tmp4 = outarray[2];
154
155 const Array<TwoD, const NekDouble> &df = m_geomFactors->GetDerivFactors();
156
157 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
158 {
159 Vmath::Vmul(nqtot, &df[3 * dir][0], 1, inarray.data(), 1, tmp2.data(),
160 1);
161 Vmath::Vmul(nqtot, &df[3 * dir + 1][0], 1, inarray.data(), 1,
162 tmp3.data(), 1);
163 Vmath::Vmul(nqtot, &df[3 * dir + 2][0], 1, inarray.data(), 1,
164 tmp4.data(), 1);
165 }
166 else
167 {
168 Vmath::Smul(nqtot, df[3 * dir][0], inarray.data(), 1, tmp2.data(), 1);
169 Vmath::Smul(nqtot, df[3 * dir + 1][0], inarray.data(), 1, tmp3.data(),
170 1);
171 Vmath::Smul(nqtot, df[3 * dir + 2][0], inarray.data(), 1, tmp4.data(),
172 1);
173 }
174
175 int i, j;
176 NekDouble g0, g1, g2, g02;
177
178 for (int k = 0, cnt = 0; k < nquad2; ++k)
179 {
180 g2 = 2.0 / (1.0 - z2[k]);
181
182 for (j = 0; j < nquad1; ++j)
183 {
184 g1 = 0.5 * (1.0 + z1[j]) * g2;
185
186 for (i = 0; i < nquad0; ++i, ++cnt)
187 {
188 g0 = 0.5 * (1.0 + z0[i]);
189 g02 = g0 * g2;
190
191 outarray[0][cnt] = g2 * tmp2[cnt] + g02 * tmp4[cnt];
192 outarray[1][cnt] = g2 * tmp3[cnt] + g1 * tmp4[cnt];
193 }
194 }
195 }
196}
SpatialDomains::GeomFactorsUniquePtr m_geomFactors
Definition Expansion.h:307
Array< OneD, LibUtilities::BasisSharedPtr > m_base
@ eDeformed
Geometry is curved or has non-constant factors.
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition Vmath.hpp:72
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
Definition Vmath.hpp:100

References Nektar::SpatialDomains::eDeformed, Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion::m_geomFactors, Vmath::Smul(), and Vmath::Vmul().

Referenced by v_IProductWRTDerivBase().

◆ v_ComputeLaplacianMetric()

void Nektar::LocalRegions::PyrExp::v_ComputeLaplacianMetric ( )
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 777 of file PyrExp.cpp.

778{
779 int i, j;
780 const unsigned int nqtot = GetTotPoints();
781 const unsigned int dim = 3;
782 const MetricType m[3][3] = {
786
787 for (unsigned int i = 0; i < dim; ++i)
788 {
789 for (unsigned int j = i; j < dim; ++j)
790 {
791 m_metrics[m[i][j]] = Array<OneD, NekDouble>(nqtot);
792 }
793 }
794
795 // Define shorthand synonyms for m_metrics storage
796 Array<OneD, NekDouble> g0(m_metrics[m[0][0]]);
797 Array<OneD, NekDouble> g1(m_metrics[m[1][1]]);
798 Array<OneD, NekDouble> g2(m_metrics[m[2][2]]);
799 Array<OneD, NekDouble> g3(m_metrics[m[0][1]]);
800 Array<OneD, NekDouble> g4(m_metrics[m[0][2]]);
801 Array<OneD, NekDouble> g5(m_metrics[m[1][2]]);
802
803 // Allocate temporary storage
804 Array<OneD, NekDouble> alloc(9 * nqtot, 0.0);
805 Array<OneD, NekDouble> h0(nqtot, alloc);
806 Array<OneD, NekDouble> h1(nqtot, alloc + 1 * nqtot);
807 Array<OneD, NekDouble> h2(nqtot, alloc + 2 * nqtot);
808 Array<OneD, NekDouble> wsp1(nqtot, alloc + 3 * nqtot);
809 Array<OneD, NekDouble> wsp2(nqtot, alloc + 4 * nqtot);
810 Array<OneD, NekDouble> wsp3(nqtot, alloc + 5 * nqtot);
811 Array<OneD, NekDouble> wsp4(nqtot, alloc + 6 * nqtot);
812 Array<OneD, NekDouble> wsp5(nqtot, alloc + 7 * nqtot);
813 Array<OneD, NekDouble> wsp6(nqtot, alloc + 8 * nqtot);
814
815 const Array<TwoD, const NekDouble> &df = m_geomFactors->GetDerivFactors();
816 const Array<OneD, const NekDouble> &z0 = m_base[0]->GetZ();
817 const Array<OneD, const NekDouble> &z1 = m_base[1]->GetZ();
818 const Array<OneD, const NekDouble> &z2 = m_base[2]->GetZ();
819 const unsigned int nquad0 = m_base[0]->GetNumPoints();
820 const unsigned int nquad1 = m_base[1]->GetNumPoints();
821 const unsigned int nquad2 = m_base[2]->GetNumPoints();
822
823 // Populate collapsed coordinate arrays h0, h1 and h2.
824 for (j = 0; j < nquad2; ++j)
825 {
826 for (i = 0; i < nquad1; ++i)
827 {
828 Vmath::Fill(nquad0, 2.0 / (1.0 - z2[j]),
829 &h0[0] + i * nquad0 + j * nquad0 * nquad1, 1);
830 Vmath::Fill(nquad0, 1.0 / (1.0 - z2[j]),
831 &h1[0] + i * nquad0 + j * nquad0 * nquad1, 1);
832 Vmath::Fill(nquad0, (1.0 + z1[i]) / (1.0 - z2[j]),
833 &h2[0] + i * nquad0 + j * nquad0 * nquad1, 1);
834 }
835 }
836 for (i = 0; i < nquad0; i++)
837 {
838 Blas::Dscal(nquad1 * nquad2, 1 + z0[i], &h1[0] + i, nquad0);
839 }
840
841 // Step 3. Construct combined metric terms for physical space to
842 // collapsed coordinate system.
843 // Order of construction optimised to minimise temporary storage
844 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
845 {
846 // f_{1k}
847 Vmath::Vvtvvtp(nqtot, &df[0][0], 1, &h0[0], 1, &df[2][0], 1, &h1[0], 1,
848 &wsp1[0], 1);
849 Vmath::Vvtvvtp(nqtot, &df[3][0], 1, &h0[0], 1, &df[5][0], 1, &h1[0], 1,
850 &wsp2[0], 1);
851 Vmath::Vvtvvtp(nqtot, &df[6][0], 1, &h0[0], 1, &df[8][0], 1, &h1[0], 1,
852 &wsp3[0], 1);
853
854 // g0
855 Vmath::Vvtvvtp(nqtot, &wsp1[0], 1, &wsp1[0], 1, &wsp2[0], 1, &wsp2[0],
856 1, &g0[0], 1);
857 Vmath::Vvtvp(nqtot, &wsp3[0], 1, &wsp3[0], 1, &g0[0], 1, &g0[0], 1);
858
859 // g4
860 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &wsp1[0], 1, &df[5][0], 1, &wsp2[0],
861 1, &g4[0], 1);
862 Vmath::Vvtvp(nqtot, &df[8][0], 1, &wsp3[0], 1, &g4[0], 1, &g4[0], 1);
863
864 // f_{2k}
865 Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &h0[0], 1, &df[2][0], 1, &h2[0], 1,
866 &wsp4[0], 1);
867 Vmath::Vvtvvtp(nqtot, &df[4][0], 1, &h0[0], 1, &df[5][0], 1, &h2[0], 1,
868 &wsp5[0], 1);
869 Vmath::Vvtvvtp(nqtot, &df[7][0], 1, &h0[0], 1, &df[8][0], 1, &h2[0], 1,
870 &wsp6[0], 1);
871
872 // g1
873 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0],
874 1, &g1[0], 1);
875 Vmath::Vvtvp(nqtot, &wsp6[0], 1, &wsp6[0], 1, &g1[0], 1, &g1[0], 1);
876
877 // g3
878 Vmath::Vvtvvtp(nqtot, &wsp1[0], 1, &wsp4[0], 1, &wsp2[0], 1, &wsp5[0],
879 1, &g3[0], 1);
880 Vmath::Vvtvp(nqtot, &wsp3[0], 1, &wsp6[0], 1, &g3[0], 1, &g3[0], 1);
881
882 // g5
883 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &wsp4[0], 1, &df[5][0], 1, &wsp5[0],
884 1, &g5[0], 1);
885 Vmath::Vvtvp(nqtot, &df[8][0], 1, &wsp6[0], 1, &g5[0], 1, &g5[0], 1);
886
887 // g2
888 Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &df[2][0], 1, &df[5][0], 1,
889 &df[5][0], 1, &g2[0], 1);
890 Vmath::Vvtvp(nqtot, &df[8][0], 1, &df[8][0], 1, &g2[0], 1, &g2[0], 1);
891 }
892 else
893 {
894 // f_{1k}
895 Vmath::Svtsvtp(nqtot, df[0][0], &h0[0], 1, df[2][0], &h1[0], 1,
896 &wsp1[0], 1);
897 Vmath::Svtsvtp(nqtot, df[3][0], &h0[0], 1, df[5][0], &h1[0], 1,
898 &wsp2[0], 1);
899 Vmath::Svtsvtp(nqtot, df[6][0], &h0[0], 1, df[8][0], &h1[0], 1,
900 &wsp3[0], 1);
901
902 // g0
903 Vmath::Vvtvvtp(nqtot, &wsp1[0], 1, &wsp1[0], 1, &wsp2[0], 1, &wsp2[0],
904 1, &g0[0], 1);
905 Vmath::Vvtvp(nqtot, &wsp3[0], 1, &wsp3[0], 1, &g0[0], 1, &g0[0], 1);
906
907 // g4
908 Vmath::Svtsvtp(nqtot, df[2][0], &wsp1[0], 1, df[5][0], &wsp2[0], 1,
909 &g4[0], 1);
910 Vmath::Svtvp(nqtot, df[8][0], &wsp3[0], 1, &g4[0], 1, &g4[0], 1);
911
912 // f_{2k}
913 Vmath::Svtsvtp(nqtot, df[1][0], &h0[0], 1, df[2][0], &h2[0], 1,
914 &wsp4[0], 1);
915 Vmath::Svtsvtp(nqtot, df[4][0], &h0[0], 1, df[5][0], &h2[0], 1,
916 &wsp5[0], 1);
917 Vmath::Svtsvtp(nqtot, df[7][0], &h0[0], 1, df[8][0], &h2[0], 1,
918 &wsp6[0], 1);
919
920 // g1
921 Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0],
922 1, &g1[0], 1);
923 Vmath::Vvtvp(nqtot, &wsp6[0], 1, &wsp6[0], 1, &g1[0], 1, &g1[0], 1);
924
925 // g3
926 Vmath::Vvtvvtp(nqtot, &wsp1[0], 1, &wsp4[0], 1, &wsp2[0], 1, &wsp5[0],
927 1, &g3[0], 1);
928 Vmath::Vvtvp(nqtot, &wsp3[0], 1, &wsp6[0], 1, &g3[0], 1, &g3[0], 1);
929
930 // g5
931 Vmath::Svtsvtp(nqtot, df[2][0], &wsp4[0], 1, df[5][0], &wsp5[0], 1,
932 &g5[0], 1);
933 Vmath::Svtvp(nqtot, df[8][0], &wsp6[0], 1, &g5[0], 1, &g5[0], 1);
934
935 // g2
936 Vmath::Fill(nqtot,
937 df[2][0] * df[2][0] + df[5][0] * df[5][0] +
938 df[8][0] * df[8][0],
939 &g2[0], 1);
940 }
941}
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
static void Dscal(const int &n, const double &alpha, double *x, const int &incx)
BLAS level 1: x = alpha x.
Definition Blas.hpp:124
void Svtsvtp(int n, const T alpha, const T *x, int incx, const T beta, const T *y, int incy, T *z, int incz)
Svtsvtp (scalar times vector plus scalar times vector):
Definition Vmath.hpp:473
void Svtvp(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Svtvp (scalar times vector plus vector): z = alpha*x + y.
Definition Vmath.hpp:396
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
Definition Vmath.hpp:366
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition Vmath.hpp:54
void Vvtvvtp(int n, const T *v, int incv, const T *w, int incw, const T *x, int incx, const T *y, int incy, T *z, int incz)
vvtvvtp (vector times vector plus vector times vector):
Definition Vmath.hpp:439

References Blas::Dscal(), Nektar::SpatialDomains::eDeformed, Nektar::LocalRegions::eMetricLaplacian00, Nektar::LocalRegions::eMetricLaplacian01, Nektar::LocalRegions::eMetricLaplacian02, Nektar::LocalRegions::eMetricLaplacian11, Nektar::LocalRegions::eMetricLaplacian12, Nektar::LocalRegions::eMetricLaplacian22, Vmath::Fill(), Nektar::StdRegions::StdExpansion::GetTotPoints(), Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion::m_geomFactors, Nektar::LocalRegions::Expansion::m_metrics, Vmath::Svtsvtp(), Vmath::Svtvp(), Vmath::Vvtvp(), and Vmath::Vvtvvtp().

◆ v_ComputeTraceNormal()

void Nektar::LocalRegions::PyrExp::v_ComputeTraceNormal ( const int  face)
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 413 of file PyrExp.cpp.

414{
416 for (int i = 0; i < ptsKeys.size(); ++i)
417 {
418 // Need at least 2 points for computing normals
419 if (ptsKeys[i].GetNumPoints() == 1)
420 {
421 LibUtilities::PointsKey pKey(2, ptsKeys[i].GetPointsType());
422 ptsKeys[i] = pKey;
423 }
424 }
425
426 SpatialDomains::GeomType type = m_geomFactors->GetGtype();
427 const Array<TwoD, const NekDouble> &df =
428 m_geomFactors->ComputeDerivFactors(ptsKeys);
429 const Array<OneD, const NekDouble> &jac =
430 m_geomFactors->ComputeJac(ptsKeys);
431
432 LibUtilities::BasisKey tobasis0 = GetTraceBasisKey(face, 0);
433 LibUtilities::BasisKey tobasis1 = GetTraceBasisKey(face, 1);
434
435 // Number of quadrature points in face expansion.
436 int nq_face = tobasis0.GetNumPoints() * tobasis1.GetNumPoints();
437
438 int vCoordDim = GetCoordim();
439 int i;
440
441 m_traceNormals[face] = Array<OneD, Array<OneD, NekDouble>>(vCoordDim);
442 Array<OneD, Array<OneD, NekDouble>> &normal = m_traceNormals[face];
443 for (i = 0; i < vCoordDim; ++i)
444 {
445 normal[i] = Array<OneD, NekDouble>(nq_face);
446 }
447
448 size_t nqb = nq_face;
449 size_t nbnd = face;
450 m_elmtBndNormDirElmtLen[nbnd] = Array<OneD, NekDouble>{nqb, 0.0};
451 Array<OneD, NekDouble> &length = m_elmtBndNormDirElmtLen[nbnd];
452
453 // Regular geometry case
454 if (type == SpatialDomains::eRegular ||
456 {
457 NekDouble fac;
458 // Set up normals
459 switch (face)
460 {
461 case 0:
462 {
463 for (i = 0; i < vCoordDim; ++i)
464 {
465 normal[i][0] = -df[3 * i + 2][0];
466 }
467 break;
468 }
469 case 1:
470 {
471 for (i = 0; i < vCoordDim; ++i)
472 {
473 normal[i][0] = -df[3 * i + 1][0];
474 }
475 break;
476 }
477 case 2:
478 {
479 for (i = 0; i < vCoordDim; ++i)
480 {
481 normal[i][0] = df[3 * i][0] + df[3 * i + 2][0];
482 }
483 break;
484 }
485 case 3:
486 {
487 for (i = 0; i < vCoordDim; ++i)
488 {
489 normal[i][0] = df[3 * i + 1][0] + df[3 * i + 2][0];
490 }
491 break;
492 }
493 case 4:
494 {
495 for (i = 0; i < vCoordDim; ++i)
496 {
497 normal[i][0] = -df[3 * i][0];
498 }
499 break;
500 }
501 default:
502 ASSERTL0(false, "face is out of range (face < 4)");
503 }
504
505 // Normalise resulting vector.
506 fac = 0.0;
507 for (i = 0; i < vCoordDim; ++i)
508 {
509 fac += normal[i][0] * normal[i][0];
510 }
511 fac = 1.0 / sqrt(fac);
512
513 Vmath::Fill(nqb, fac, length, 1);
514
515 for (i = 0; i < vCoordDim; ++i)
516 {
517 Vmath::Fill(nq_face, fac * normal[i][0], normal[i], 1);
518 }
519 }
520 else
521 {
522 // Set up deformed normals.
523 int j, k;
524
525 int nq0 = ptsKeys[0].GetNumPoints();
526 int nq1 = ptsKeys[1].GetNumPoints();
527 int nq2 = ptsKeys[2].GetNumPoints();
528 int nq01 = nq0 * nq1;
529 int nqtot;
530
531 // Determine number of quadrature points on the face.
532 if (face == 0)
533 {
534 nqtot = nq0 * nq1;
535 }
536 else if (face == 1 || face == 3)
537 {
538 nqtot = nq0 * nq2;
539 }
540 else
541 {
542 nqtot = nq1 * nq2;
543 }
544
545 LibUtilities::PointsKey points0;
546 LibUtilities::PointsKey points1;
547
548 Array<OneD, NekDouble> faceJac(nqtot);
549 Array<OneD, NekDouble> normals(vCoordDim * nqtot, 0.0);
550
551 // Extract Jacobian along face and recover local derivatives
552 // (dx/dr) for polynomial interpolation by multiplying m_gmat by
553 // jacobian
554 switch (face)
555 {
556 case 0:
557 {
558 for (j = 0; j < nq01; ++j)
559 {
560 normals[j] = -df[2][j] * jac[j];
561 normals[nqtot + j] = -df[5][j] * jac[j];
562 normals[2 * nqtot + j] = -df[8][j] * jac[j];
563 faceJac[j] = jac[j];
564 }
565
566 points0 = ptsKeys[0];
567 points1 = ptsKeys[1];
568 break;
569 }
570
571 case 1:
572 {
573 for (j = 0; j < nq0; ++j)
574 {
575 for (k = 0; k < nq2; ++k)
576 {
577 int tmp = j + nq01 * k;
578 normals[j + k * nq0] = -df[1][tmp] * jac[tmp];
579 normals[nqtot + j + k * nq0] = -df[4][tmp] * jac[tmp];
580 normals[2 * nqtot + j + k * nq0] =
581 -df[7][tmp] * jac[tmp];
582 faceJac[j + k * nq0] = jac[tmp];
583 }
584 }
585
586 points0 = ptsKeys[0];
587 points1 = ptsKeys[2];
588 break;
589 }
590
591 case 2:
592 {
593 for (j = 0; j < nq1; ++j)
594 {
595 for (k = 0; k < nq2; ++k)
596 {
597 int tmp = nq0 - 1 + nq0 * j + nq01 * k;
598 normals[j + k * nq1] =
599 (df[0][tmp] + df[2][tmp]) * jac[tmp];
600 normals[nqtot + j + k * nq1] =
601 (df[3][tmp] + df[5][tmp]) * jac[tmp];
602 normals[2 * nqtot + j + k * nq1] =
603 (df[6][tmp] + df[8][tmp]) * jac[tmp];
604 faceJac[j + k * nq1] = jac[tmp];
605 }
606 }
607
608 points0 = ptsKeys[1];
609 points1 = ptsKeys[2];
610 break;
611 }
612
613 case 3:
614 {
615 for (j = 0; j < nq0; ++j)
616 {
617 for (k = 0; k < nq2; ++k)
618 {
619 int tmp = nq0 * (nq1 - 1) + j + nq01 * k;
620 normals[j + k * nq0] =
621 (df[1][tmp] + df[2][tmp]) * jac[tmp];
622 normals[nqtot + j + k * nq0] =
623 (df[4][tmp] + df[5][tmp]) * jac[tmp];
624 normals[2 * nqtot + j + k * nq0] =
625 (df[7][tmp] + df[8][tmp]) * jac[tmp];
626 faceJac[j + k * nq0] = jac[tmp];
627 }
628 }
629
630 points0 = ptsKeys[0];
631 points1 = ptsKeys[2];
632 break;
633 }
634
635 case 4:
636 {
637 for (j = 0; j < nq1; ++j)
638 {
639 for (k = 0; k < nq2; ++k)
640 {
641 int tmp = j * nq0 + nq01 * k;
642 normals[j + k * nq1] = -df[0][tmp] * jac[tmp];
643 normals[nqtot + j + k * nq1] = -df[3][tmp] * jac[tmp];
644 normals[2 * nqtot + j + k * nq1] =
645 -df[6][tmp] * jac[tmp];
646 faceJac[j + k * nq1] = jac[tmp];
647 }
648 }
649
650 points0 = ptsKeys[1];
651 points1 = ptsKeys[2];
652 break;
653 }
654
655 default:
656 ASSERTL0(false, "face is out of range (face < 4)");
657 }
658
659 Array<OneD, NekDouble> work(nq_face, 0.0);
660 // Interpolate Jacobian and invert
661 LibUtilities::Interp2D(points0, points1, faceJac,
662 tobasis0.GetPointsKey(), tobasis1.GetPointsKey(),
663 work);
664 Vmath::Sdiv(nq_face, 1.0, &work[0], 1, &work[0], 1);
665
666 // Interpolate normal and multiply by inverse Jacobian.
667 for (i = 0; i < vCoordDim; ++i)
668 {
669 LibUtilities::Interp2D(points0, points1, &normals[i * nqtot],
670 tobasis0.GetPointsKey(),
671 tobasis1.GetPointsKey(), &normal[i][0]);
672 Vmath::Vmul(nq_face, work, 1, normal[i], 1, normal[i], 1);
673 }
674
675 // Normalise to obtain unit normals.
676 Vmath::Zero(nq_face, work, 1);
677 for (i = 0; i < GetCoordim(); ++i)
678 {
679 Vmath::Vvtvp(nq_face, normal[i], 1, normal[i], 1, work, 1, work, 1);
680 }
681
682 Vmath::Vsqrt(nq_face, work, 1, work, 1);
683 Vmath::Sdiv(nq_face, 1.0, work, 1, work, 1);
684
685 Vmath::Vcopy(nqb, work, 1, length, 1);
686
687 for (i = 0; i < GetCoordim(); ++i)
688 {
689 Vmath::Vmul(nq_face, normal[i], 1, work, 1, normal[i], 1);
690 }
691 }
692}
#define ASSERTL0(condition, msg)
std::map< int, NormalVector > m_traceNormals
Definition Expansion.h:309
std::map< int, Array< OneD, NekDouble > > m_elmtBndNormDirElmtLen
the element length in each element boundary(Vertex, edge or face) normal direction calculated based o...
Definition Expansion.h:319
const LibUtilities::PointsKeyVector GetPointsKeys() const
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
int GetNumPoints(const int dir) const
This function returns the number of quadrature points in the dir direction.
const LibUtilities::BasisKey GetTraceBasisKey(const int i, int k=-1, bool UseGLL=false) const
This function returns the basis key belonging to the i-th trace.
void Interp2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
this function interpolates a 2D function evaluated at the quadrature points of the 2D basis,...
Definition Interp.cpp:101
std::vector< PointsKey > PointsKeyVector
Definition Points.h:313
GeomType
Indicates the type of element geometry.
@ eRegular
Geometry is straight-sided with constant geometric factors.
@ eMovingRegular
Currently unused.
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
Definition Vmath.hpp:340
void Sdiv(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha/x.
Definition Vmath.hpp:154
void Zero(int n, T *x, const int incx)
Zero vector.
Definition Vmath.hpp:273
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition Vmath.hpp:825
scalarT< T > sqrt(scalarT< T > in)
Definition scalar.hpp:290

References ASSERTL0, Nektar::SpatialDomains::eMovingRegular, Nektar::SpatialDomains::eRegular, Vmath::Fill(), Nektar::StdRegions::StdExpansion::GetCoordim(), Nektar::LibUtilities::BasisKey::GetNumPoints(), Nektar::StdRegions::StdExpansion::GetNumPoints(), Nektar::LibUtilities::BasisKey::GetPointsKey(), Nektar::StdRegions::StdExpansion::GetPointsKeys(), Nektar::StdRegions::StdExpansion::GetPointsType(), Nektar::StdRegions::StdExpansion::GetTraceBasisKey(), Nektar::LibUtilities::Interp2D(), Nektar::LocalRegions::Expansion::m_elmtBndNormDirElmtLen, Nektar::LocalRegions::Expansion::m_geomFactors, Nektar::LocalRegions::Expansion::m_traceNormals, Vmath::Sdiv(), tinysimd::sqrt(), Vmath::Vcopy(), Vmath::Vmul(), Vmath::Vsqrt(), Vmath::Vvtvp(), and Vmath::Zero().

◆ v_CreateStdMatrix()

DNekMatSharedPtr Nektar::LocalRegions::PyrExp::v_CreateStdMatrix ( const StdRegions::StdMatrixKey mkey)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 746 of file PyrExp.cpp.

747{
748 LibUtilities::BasisKey bkey0 = m_base[0]->GetBasisKey();
749 LibUtilities::BasisKey bkey1 = m_base[1]->GetBasisKey();
750 LibUtilities::BasisKey bkey2 = m_base[2]->GetBasisKey();
753
754 return tmp->GetStdMatrix(mkey);
755}
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< StdPyrExp > StdPyrExpSharedPtr
Definition StdPyrExp.h:178

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and Nektar::StdRegions::StdExpansion::m_base.

◆ v_DropLocMatrix()

void Nektar::LocalRegions::PyrExp::v_DropLocMatrix ( const MatrixKey mkey)
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 762 of file PyrExp.cpp.

763{
764 m_matrixManager.DeleteObject(mkey);
765}

References m_matrixManager.

◆ v_DropLocStaticCondMatrix()

void Nektar::LocalRegions::PyrExp::v_DropLocStaticCondMatrix ( const MatrixKey mkey)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 772 of file PyrExp.cpp.

773{
774 m_staticCondMatrixManager.DeleteObject(mkey);
775}

References m_staticCondMatrixManager.

◆ v_ExtractDataToCoeffs()

void Nektar::LocalRegions::PyrExp::v_ExtractDataToCoeffs ( const NekDouble data,
const std::vector< unsigned int > &  nummodes,
const int  mode_offset,
NekDouble coeffs,
std::vector< LibUtilities::BasisType > &  fromType 
)
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 250 of file PyrExp.cpp.

254{
255 int data_order0 = nummodes[mode_offset];
256 int fillorder0 = min(m_base[0]->GetNumModes(), data_order0);
257 int data_order1 = nummodes[mode_offset + 1];
258 int order1 = m_base[1]->GetNumModes();
259 int fillorder1 = min(order1, data_order1);
260 int data_order2 = nummodes[mode_offset + 2];
261 int order2 = m_base[2]->GetNumModes();
262 int fillorder2 = min(order2, data_order2);
263
264 // Check if not same order or basis and if not make temp
265 // element to read in data
266 if (fromType[0] != m_base[0]->GetBasisType() ||
267 fromType[1] != m_base[1]->GetBasisType() ||
268 fromType[2] != m_base[2]->GetBasisType() || data_order0 != fillorder0 ||
269 data_order1 != fillorder1 || data_order2 != fillorder2)
270 {
271 // Construct a pyr with the appropriate basis type at our
272 // quadrature points, and one more to do a forwards
273 // transform. We can then copy the output to coeffs.
274 StdRegions::StdPyrExp tmpPyr(
275 LibUtilities::BasisKey(fromType[0], data_order0,
276 m_base[0]->GetPointsKey()),
277 LibUtilities::BasisKey(fromType[1], data_order1,
278 m_base[1]->GetPointsKey()),
279 LibUtilities::BasisKey(fromType[2], data_order2,
280 m_base[2]->GetPointsKey()));
281
282 StdRegions::StdPyrExp tmpPyr2(m_base[0]->GetBasisKey(),
283 m_base[1]->GetBasisKey(),
284 m_base[2]->GetBasisKey());
285
286 Array<OneD, const NekDouble> tmpData(tmpPyr.GetNcoeffs(), data);
287 Array<OneD, NekDouble> tmpBwd(tmpPyr2.GetTotPoints());
288 Array<OneD, NekDouble> tmpOut(tmpPyr2.GetNcoeffs());
289
290 tmpPyr.BwdTrans(tmpData, tmpBwd);
291 tmpPyr2.FwdTrans(tmpBwd, tmpOut);
292 Vmath::Vcopy(tmpOut.size(), &tmpOut[0], 1, coeffs, 1);
293 }
294 else
295 {
296 Vmath::Vcopy(m_ncoeffs, &data[0], 1, coeffs, 1);
297 }
298}
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
scalarT< T > min(scalarT< T > lhs, scalarT< T > rhs)
Definition scalar.hpp:300

References Nektar::StdRegions::StdExpansion::BwdTrans(), Nektar::StdRegions::StdExpansion::FwdTrans(), Nektar::StdRegions::StdExpansion::GetBasisType(), Nektar::StdRegions::StdExpansion::GetNcoeffs(), Nektar::StdRegions::StdExpansion::GetTotPoints(), Nektar::StdRegions::StdExpansion::m_base, Nektar::StdRegions::StdExpansion::m_ncoeffs, tinysimd::min(), and Vmath::Vcopy().

◆ v_GenMatrix()

DNekMatSharedPtr Nektar::LocalRegions::PyrExp::v_GenMatrix ( const StdRegions::StdMatrixKey mkey)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 725 of file PyrExp.cpp.

726{
727 DNekMatSharedPtr returnval;
728
729 switch (mkey.GetMatrixType())
730 {
737 returnval = Expansion3D::v_GenMatrix(mkey);
738 break;
739 default:
740 returnval = StdPyrExp::v_GenMatrix(mkey);
741 }
742
743 return returnval;
744}
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
std::shared_ptr< DNekMat > DNekMatSharedPtr

References Nektar::StdRegions::eHybridDGHelmBndLam, Nektar::StdRegions::eHybridDGHelmholtz, Nektar::StdRegions::eHybridDGLamToQ0, Nektar::StdRegions::eHybridDGLamToQ1, Nektar::StdRegions::eHybridDGLamToQ2, Nektar::StdRegions::eHybridDGLamToU, Nektar::StdRegions::StdMatrixKey::GetMatrixType(), and Nektar::LocalRegions::Expansion3D::v_GenMatrix().

◆ v_GetCoord()

void Nektar::LocalRegions::PyrExp::v_GetCoord ( const Array< OneD, const NekDouble > &  Lcoords,
Array< OneD, NekDouble > &  coords 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 226 of file PyrExp.cpp.

228{
229 int i;
230
231 ASSERTL1(Lcoords[0] <= -1.0 && Lcoords[0] >= 1.0 && Lcoords[1] <= -1.0 &&
232 Lcoords[1] >= 1.0 && Lcoords[2] <= -1.0 && Lcoords[2] >= 1.0,
233 "Local coordinates are not in region [-1,1]");
234
235 // m_geom->FillGeom(); // TODO: implement FillGeom()
236
237 for (i = 0; i < m_geom->GetCoordim(); ++i)
238 {
239 coords[i] = m_geom->GetCoord(i, Lcoords);
240 }
241}
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
SpatialDomains::Geometry * m_geom
Definition Expansion.h:306
NekDouble GetCoord(const int i, const Array< OneD, const NekDouble > &Lcoord)
Given local collapsed coordinate Lcoord, return the value of physical coordinate in direction i.
Definition Geometry.h:559
int GetCoordim() const
Return the coordinate dimension of this object (i.e. the dimension of the space in which this object ...
Definition Geometry.h:277

References ASSERTL1, Nektar::SpatialDomains::Geometry::GetCoord(), Nektar::SpatialDomains::Geometry::GetCoordim(), and Nektar::LocalRegions::Expansion::m_geom.

◆ v_GetCoords()

void Nektar::LocalRegions::PyrExp::v_GetCoords ( Array< OneD, NekDouble > &  coords_1,
Array< OneD, NekDouble > &  coords_2,
Array< OneD, NekDouble > &  coords_3 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 243 of file PyrExp.cpp.

246{
247 Expansion::v_GetCoords(coords_1, coords_2, coords_3);
248}
void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override

References Nektar::LocalRegions::Expansion::v_GetCoords().

◆ v_GetLinStdExp()

StdRegions::StdExpansionSharedPtr Nektar::LocalRegions::PyrExp::v_GetLinStdExp ( void  ) const
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 209 of file PyrExp.cpp.

210{
211 LibUtilities::BasisKey bkey0(m_base[0]->GetBasisType(), 2,
212 m_base[0]->GetPointsKey());
213 LibUtilities::BasisKey bkey1(m_base[1]->GetBasisType(), 2,
214 m_base[1]->GetPointsKey());
215 LibUtilities::BasisKey bkey2(m_base[2]->GetBasisType(), 2,
216 m_base[2]->GetPointsKey());
217
219 bkey2);
220}

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::StdRegions::StdExpansion::GetBasisType(), and Nektar::StdRegions::StdExpansion::m_base.

◆ v_GetLocMatrix()

DNekScalMatSharedPtr Nektar::LocalRegions::PyrExp::v_GetLocMatrix ( const MatrixKey mkey)
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 757 of file PyrExp.cpp.

758{
759 return m_matrixManager[mkey];
760}

References m_matrixManager.

◆ v_GetLocStaticCondMatrix()

DNekScalBlkMatSharedPtr Nektar::LocalRegions::PyrExp::v_GetLocStaticCondMatrix ( const MatrixKey mkey)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 767 of file PyrExp.cpp.

768{
769 return m_staticCondMatrixManager[mkey];
770}

References m_staticCondMatrixManager.

◆ v_GetStdExp()

StdRegions::StdExpansionSharedPtr Nektar::LocalRegions::PyrExp::v_GetStdExp ( void  ) const
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 202 of file PyrExp.cpp.

203{
205 m_base[0]->GetBasisKey(), m_base[1]->GetBasisKey(),
206 m_base[2]->GetBasisKey());
207}

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and Nektar::StdRegions::StdExpansion::m_base.

◆ v_GetTracePhysMap()

void Nektar::LocalRegions::PyrExp::v_GetTracePhysMap ( const int  face,
Array< OneD, int > &  outarray 
)
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 315 of file PyrExp.cpp.

316{
317 int nquad0 = m_base[0]->GetNumPoints();
318 int nquad1 = m_base[1]->GetNumPoints();
319 int nquad2 = m_base[2]->GetNumPoints();
320
321 int nq0 = 0;
322 int nq1 = 0;
323
324 switch (face)
325 {
326 case 0:
327 nq0 = nquad0;
328 nq1 = nquad1;
329 if (outarray.size() != nq0 * nq1)
330 {
331 outarray = Array<OneD, int>(nq0 * nq1);
332 }
333
334 // Directions A and B positive
335 for (int i = 0; i < nquad0 * nquad1; ++i)
336 {
337 outarray[i] = i;
338 }
339
340 break;
341 case 1:
342 nq0 = nquad0;
343 nq1 = nquad2;
344 if (outarray.size() != nq0 * nq1)
345 {
346 outarray = Array<OneD, int>(nq0 * nq1);
347 }
348
349 // Direction A and B positive
350 for (int k = 0; k < nquad2; k++)
351 {
352 for (int i = 0; i < nquad0; ++i)
353 {
354 outarray[k * nquad0 + i] = (nquad0 * nquad1 * k) + i;
355 }
356 }
357
358 break;
359 case 2:
360 nq0 = nquad1;
361 nq1 = nquad2;
362 if (outarray.size() != nq0 * nq1)
363 {
364 outarray = Array<OneD, int>(nq0 * nq1);
365 }
366
367 // Directions A and B positive
368 for (int j = 0; j < nquad1 * nquad2; ++j)
369 {
370 outarray[j] = nquad0 - 1 + j * nquad0;
371 }
372 break;
373 case 3:
374
375 nq0 = nquad0;
376 nq1 = nquad2;
377 if (outarray.size() != nq0 * nq1)
378 {
379 outarray = Array<OneD, int>(nq0 * nq1);
380 }
381
382 // Direction A and B positive
383 for (int k = 0; k < nquad2; k++)
384 {
385 for (int i = 0; i < nquad0; ++i)
386 {
387 outarray[k * nquad0 + i] =
388 nquad0 * (nquad1 - 1) + (nquad0 * nquad1 * k) + i;
389 }
390 }
391 break;
392 case 4:
393 nq0 = nquad1;
394 nq1 = nquad2;
395
396 if (outarray.size() != nq0 * nq1)
397 {
398 outarray = Array<OneD, int>(nq0 * nq1);
399 }
400
401 // Directions A and B positive
402 for (int j = 0; j < nquad1 * nquad2; ++j)
403 {
404 outarray[j] = j * nquad0;
405 }
406 break;
407 default:
408 ASSERTL0(false, "face value (> 4) is out of range");
409 break;
410 }
411}

References ASSERTL0, and Nektar::StdRegions::StdExpansion::m_base.

◆ v_IProductWRTDerivBase()

void Nektar::LocalRegions::PyrExp::v_IProductWRTDerivBase ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
overrideprotectedvirtual

Calculates the inner product \( I_{pqr} = (u, \partial_{x_i} \phi_{pqr}) \).

The derivative of the basis functions is performed using the chain rule in order to incorporate the geometric factors. Assuming that the basis functions are a tensor product \(\phi_{pqr}(\eta_1,\eta_2,\eta_3) = \phi_1(\eta_1)\phi_2(\eta_2)\phi_3(\eta_3)\), this yields the result

\[ I_{pqr} = \sum_{j=1}^3 \left(u, \frac{\partial u}{\partial \eta_j} \frac{\partial \eta_j}{\partial x_i}\right) \]

In the pyramid element, we must also incorporate a second set of geometric factors which incorporate the collapsed co-ordinate system, so that

\[ \frac{\partial\eta_j}{\partial x_i} = \sum_{k=1}^3 \frac{\partial\eta_j}{\partial\xi_k}\frac{\partial\xi_k}{\partial x_i} \]

These derivatives can be found on p152 of Sherwin & Karniadakis.

Parameters
dirDirection in which to take the derivative.
inarrayThe function \( u \).
outarrayValue of the inner product.

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 101 of file PyrExp.cpp.

104{
105 const int nquad0 = m_base[0]->GetNumPoints();
106 const int nquad1 = m_base[1]->GetNumPoints();
107 const int nquad2 = m_base[2]->GetNumPoints();
108 const int nqtot = nquad0 * nquad1 * nquad2;
109
110 Array<OneD, NekDouble> tmp2(nqtot);
111 Array<OneD, NekDouble> tmp3(nqtot);
112 Array<OneD, NekDouble> tmp4(nqtot);
113 Array<OneD, NekDouble> tmp6(m_ncoeffs);
114
115 Array<OneD, Array<OneD, NekDouble>> tmp2D{3};
116 tmp2D[0] = tmp2;
117 tmp2D[1] = tmp3;
118 tmp2D[2] = tmp4;
119
120 const Array<OneD, const NekDouble> &jac = m_geomFactors->GetJac();
121 bool Deformed = (m_geomFactors->GetGtype() == SpatialDomains::eDeformed);
122
123 v_AlignVectorToCollapsedDir(dir, inarray, tmp2D);
124
125 v_IProductWRTBaseKernel(m_base[0]->GetDbdata(), m_base[1]->GetBdata(),
126 m_base[2]->GetBdata(), tmp2, outarray, jac,
127 Deformed);
128
129 v_IProductWRTBaseKernel(m_base[0]->GetBdata(), m_base[1]->GetDbdata(),
130 m_base[2]->GetBdata(), tmp3, tmp6, jac, Deformed);
131 Vmath::Vadd(m_ncoeffs, tmp6, 1, outarray, 1, outarray, 1);
132
133 v_IProductWRTBaseKernel(m_base[0]->GetBdata(), m_base[1]->GetBdata(),
134 m_base[2]->GetDbdata(), tmp4, tmp6, jac, Deformed);
135 Vmath::Vadd(m_ncoeffs, tmp6, 1, outarray, 1, outarray, 1);
136}
void v_AlignVectorToCollapsedDir(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
Definition PyrExp.cpp:138
void v_IProductWRTBaseKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, NekDouble > &jac, const bool Deformed, bool CollDir0=false, bool CollDir1=false, bool CollDir2=false) override
Inner product of inarray over region with respect to the expansion basis (this)->m_base[0] and return...
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
Definition Vmath.hpp:180

References Nektar::SpatialDomains::eDeformed, Nektar::StdRegions::StdExpansion::GetNumPoints(), Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion::m_geomFactors, Nektar::StdRegions::StdExpansion::m_ncoeffs, v_AlignVectorToCollapsedDir(), Nektar::StdRegions::StdPyrExp::v_IProductWRTBaseKernel(), and Vmath::Vadd().

◆ v_LaplacianMatrixOp_MatFree_Kernel()

void Nektar::LocalRegions::PyrExp::v_LaplacianMatrixOp_MatFree_Kernel ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
Array< OneD, NekDouble > &  wsp 
)
overrideprivatevirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 943 of file PyrExp.cpp.

946{
947 // This implementation is only valid when there are no coefficients
948 // associated to the Laplacian operator
949 if (m_metrics.count(eMetricLaplacian00) == 0)
950 {
952 }
953
954 int nquad0 = m_base[0]->GetNumPoints();
955 int nquad1 = m_base[1]->GetNumPoints();
956 int nq2 = m_base[2]->GetNumPoints();
957 int nqtot = nquad0 * nquad1 * nq2;
958
959 ASSERTL1(wsp.size() >= 6 * nqtot, "Insufficient workspace size.");
960 ASSERTL1(m_ncoeffs <= nqtot, "Workspace not set up for ncoeffs > nqtot");
961
962 const Array<OneD, const NekDouble> &base0 = m_base[0]->GetBdata();
963 const Array<OneD, const NekDouble> &base1 = m_base[1]->GetBdata();
964 const Array<OneD, const NekDouble> &base2 = m_base[2]->GetBdata();
965 const Array<OneD, const NekDouble> &dbase0 = m_base[0]->GetDbdata();
966 const Array<OneD, const NekDouble> &dbase1 = m_base[1]->GetDbdata();
967 const Array<OneD, const NekDouble> &dbase2 = m_base[2]->GetDbdata();
968 const Array<OneD, const NekDouble> &metric00 =
969 m_metrics[eMetricLaplacian00];
970 const Array<OneD, const NekDouble> &metric01 =
971 m_metrics[eMetricLaplacian01];
972 const Array<OneD, const NekDouble> &metric02 =
973 m_metrics[eMetricLaplacian02];
974 const Array<OneD, const NekDouble> &metric11 =
975 m_metrics[eMetricLaplacian11];
976 const Array<OneD, const NekDouble> &metric12 =
977 m_metrics[eMetricLaplacian12];
978 const Array<OneD, const NekDouble> &metric22 =
979 m_metrics[eMetricLaplacian22];
980
981 // Allocate temporary storage
982 Array<OneD, NekDouble> wsp0(2 * nqtot, wsp);
983 Array<OneD, NekDouble> wsp1(nqtot, wsp + 1 * nqtot);
984 Array<OneD, NekDouble> wsp2(nqtot, wsp + 2 * nqtot);
985 Array<OneD, NekDouble> wsp3(nqtot, wsp + 3 * nqtot);
986 Array<OneD, NekDouble> wsp4(nqtot, wsp + 4 * nqtot);
987 Array<OneD, NekDouble> wsp5(nqtot, wsp + 5 * nqtot);
988
989 // LAPLACIAN MATRIX OPERATION
990 // wsp1 = du_dxi1 = D_xi1 * inarray = D_xi1 * u
991 // wsp2 = du_dxi2 = D_xi2 * inarray = D_xi2 * u
992 // wsp2 = du_dxi3 = D_xi3 * inarray = D_xi3 * u
993 PhysTensorDeriv(inarray, wsp0, wsp1, wsp2);
994
995 // wsp0 = k = g0 * wsp1 + g1 * wsp2 = g0 * du_dxi1 + g1 * du_dxi2
996 // wsp2 = l = g1 * wsp1 + g2 * wsp2 = g0 * du_dxi1 + g1 * du_dxi2
997 // where g0, g1 and g2 are the metric terms set up in the GeomFactors class
998 // especially for this purpose
999 Vmath::Vvtvvtp(nqtot, &metric00[0], 1, &wsp0[0], 1, &metric01[0], 1,
1000 &wsp1[0], 1, &wsp3[0], 1);
1001 Vmath::Vvtvp(nqtot, &metric02[0], 1, &wsp2[0], 1, &wsp3[0], 1, &wsp3[0], 1);
1002 Vmath::Vvtvvtp(nqtot, &metric01[0], 1, &wsp0[0], 1, &metric11[0], 1,
1003 &wsp1[0], 1, &wsp4[0], 1);
1004 Vmath::Vvtvp(nqtot, &metric12[0], 1, &wsp2[0], 1, &wsp4[0], 1, &wsp4[0], 1);
1005 Vmath::Vvtvvtp(nqtot, &metric02[0], 1, &wsp0[0], 1, &metric12[0], 1,
1006 &wsp1[0], 1, &wsp5[0], 1);
1007 Vmath::Vvtvp(nqtot, &metric22[0], 1, &wsp2[0], 1, &wsp5[0], 1, &wsp5[0], 1);
1008
1009 const Array<OneD, const NekDouble> &jac = m_geomFactors->GetJac();
1010 bool Deformed = (m_geomFactors->GetGtype() == SpatialDomains::eDeformed);
1011
1012 v_IProductWRTBaseKernel(dbase0, base1, base2, wsp3, outarray, jac,
1013 Deformed);
1014 v_IProductWRTBaseKernel(base0, dbase1, base2, wsp4, wsp2, jac, Deformed);
1015 Vmath::Vadd(m_ncoeffs, wsp2.data(), 1, outarray.data(), 1, outarray.data(),
1016 1);
1017 v_IProductWRTBaseKernel(base0, base1, dbase2, wsp5, wsp2, jac, Deformed);
1018 Vmath::Vadd(m_ncoeffs, wsp2.data(), 1, outarray.data(), 1, outarray.data(),
1019 1);
1020}

References ASSERTL1, Nektar::LocalRegions::Expansion::ComputeLaplacianMetric(), Nektar::LocalRegions::eMetricLaplacian00, Nektar::StdRegions::StdExpansion::m_base, and Nektar::LocalRegions::Expansion::m_metrics.

◆ v_PhysEvalFirstDeriv()

NekDouble Nektar::LocalRegions::PyrExp::v_PhysEvalFirstDeriv ( const Array< OneD, NekDouble > &  coord,
const Array< OneD, const NekDouble > &  inarray,
std::array< NekDouble, 3 > &  firstOrderDerivs 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 300 of file PyrExp.cpp.

304{
305 Array<OneD, NekDouble> Lcoord(3);
306 ASSERTL0(m_geom, "m_geom not defined");
307 m_geom->GetLocCoords(coord, Lcoord);
308 return StdPyrExp::v_PhysEvalFirstDeriv(Lcoord, inarray, firstOrderDerivs);
309}
NekDouble GetLocCoords(const Array< OneD, const NekDouble > &coords, Array< OneD, NekDouble > &Lcoords)
Determine the local collapsed coordinates that correspond to a given Cartesian coordinate for this ge...
Definition Geometry.h:549

References ASSERTL0, Nektar::SpatialDomains::Geometry::GetLocCoords(), and Nektar::LocalRegions::Expansion::m_geom.

◆ v_SVVLaplacianFilter()

void Nektar::LocalRegions::PyrExp::v_SVVLaplacianFilter ( Array< OneD, NekDouble > &  array,
const StdRegions::StdMatrixKey mkey 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 694 of file PyrExp.cpp.

696{
697 int nq = GetTotPoints();
698
699 // Calculate sqrt of the Jacobian
700 Array<OneD, const NekDouble> jac = m_geomFactors->GetJac();
701 Array<OneD, NekDouble> sqrt_jac(nq);
702 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
703 {
704 Vmath::Vsqrt(nq, jac, 1, sqrt_jac, 1);
705 }
706 else
707 {
708 Vmath::Fill(nq, sqrt(jac[0]), sqrt_jac, 1);
709 }
710
711 // Multiply array by sqrt(Jac)
712 Vmath::Vmul(nq, sqrt_jac, 1, array, 1, array, 1);
713
714 // Apply std region filter
715 StdPyrExp::v_SVVLaplacianFilter(array, mkey);
716
717 // Divide by sqrt(Jac)
718 Vmath::Vdiv(nq, array, 1, sqrt_jac, 1, array, 1);
719}
void Vdiv(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x/y.
Definition Vmath.hpp:126

References Nektar::SpatialDomains::eDeformed, Vmath::Fill(), Nektar::StdRegions::StdExpansion::GetTotPoints(), Nektar::LocalRegions::Expansion::m_geomFactors, tinysimd::sqrt(), Vmath::Vdiv(), Vmath::Vmul(), and Vmath::Vsqrt().

Member Data Documentation

◆ m_matrixManager

LibUtilities::NekManager<MatrixKey, DNekScalMat, MatrixKey::opLess> Nektar::LocalRegions::PyrExp::m_matrixManager
private

Definition at line 130 of file PyrExp.h.

Referenced by v_DropLocMatrix(), and v_GetLocMatrix().

◆ m_staticCondMatrixManager

LibUtilities::NekManager<MatrixKey, DNekScalBlkMat, MatrixKey::opLess> Nektar::LocalRegions::PyrExp::m_staticCondMatrixManager
private

Definition at line 132 of file PyrExp.h.

Referenced by v_DropLocStaticCondMatrix(), and v_GetLocStaticCondMatrix().