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

#include <QuadExp.h>

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

Public Member Functions

 QuadExp (const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, SpatialDomains::Geometry2D *geom)
 Constructor using BasisKey class for quadrature points and order definition.
 
 QuadExp (const QuadExp &T)
 
 ~QuadExp () override=default
 
- Public Member Functions inherited from Nektar::StdRegions::StdQuadExp
 StdQuadExp (const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb)
 Constructor using BasisKey class for quadrature points and order definition.
 
 StdQuadExp (const StdQuadExp &T)=default
 
 ~StdQuadExp () override=default
 
- Public Member Functions inherited from Nektar::StdRegions::StdExpansion2D
 StdExpansion2D (int numcoeffs, const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb)
 
 StdExpansion2D ()=default
 
 StdExpansion2D (const StdExpansion2D &T)=default
 
 ~StdExpansion2D () override=default
 
NekDouble BaryTensorDeriv (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs)
 
void IProductWRTBaseKernel (const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, NekDouble > &jac, const bool Deformed, bool CollDir0=false, bool CollDir1=false)
 
- 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)
 
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::Expansion2D
 Expansion2D (SpatialDomains::Geometry2D *pGeom)
 
 ~Expansion2D () override=default
 
DNekScalMatSharedPtr CreateMatrix (const MatrixKey &mkey)
 
void SetTraceToGeomOrientation (Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, NekDouble > &inout)
 
Array< OneD, unsigned int > GetTraceInverseBoundaryMap (int eid)
 
void AddNormTraceInt (const int dir, Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, Array< OneD, NekDouble > > &edgeCoeffs, Array< OneD, NekDouble > &outarray)
 
void AddNormTraceInt (const int dir, Array< OneD, const NekDouble > &inarray, Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, NekDouble > &outarray, const StdRegions::VarCoeffMap &varcoeffs)
 
void AddEdgeBoundaryInt (const int edge, ExpansionSharedPtr &EdgeExp, Array< OneD, NekDouble > &edgePhys, Array< OneD, NekDouble > &outarray, const StdRegions::VarCoeffMap &varcoeffs=StdRegions::NullVarCoeffMap)
 
void AddHDGHelmholtzEdgeTerms (const NekDouble tau, const int edge, Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, NekDouble > &edgePhys, const StdRegions::VarCoeffMap &dirForcing, Array< OneD, NekDouble > &outarray)
 
void AddHDGHelmholtzTraceTerms (const NekDouble tau, const Array< OneD, const NekDouble > &inarray, Array< OneD, ExpansionSharedPtr > &EdgeExp, const StdRegions::VarCoeffMap &dirForcing, Array< OneD, NekDouble > &outarray)
 
SpatialDomains::Geometry2DGetGeom2D () const
 
void ReOrientEdgePhysMap (const int nvert, const StdRegions::Orientation orient, const int nq0, Array< OneD, int > &idmap)
 
void v_NormalTraceDerivFactors (Array< OneD, Array< OneD, NekDouble > > &factors, Array< OneD, Array< OneD, NekDouble > > &d0factors, Array< OneD, Array< OneD, NekDouble > > &d1factors) override
 : This method gets all of the factors which are required as part of the Gradient Jump Penalty (GJP) stabilisation and involves the product of the normal and geometric factors along the element trace.
 
- 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_FwdTransBndConstrained (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_IProductWRTDerivBase (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_AlignVectorToCollapsedDir (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
 
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) override
 
void v_NormVectorIProductWRTBase (const Array< OneD, const Array< OneD, NekDouble > > &Fvec, 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
 
NekDouble v_PhysEvalFirstDeriv (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) override
 
void v_GetTracePhysVals (const int trace, const StdRegions::StdExpansionSharedPtr &TraceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient) override
 
void v_GetLocTracePhysVals (const int edge, const StdRegions::StdExpansionSharedPtr &EdgeExp, const NekDouble *inarray, Array< OneD, NekDouble > &outarray) override
 
void v_GetTraceQFactors (const int edge, Array< OneD, NekDouble > &outarray) override
 
void v_ComputeTraceNormal (const int edge) 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
 
StdRegions::Orientation v_GetTraceOrient (int edge) override
 
void v_GetTracePhysMap (const int edge, Array< OneD, int > &outarray) override
 
DNekMatSharedPtr v_GenMatrix (const StdRegions::StdMatrixKey &mkey) override
 
DNekMatSharedPtr v_CreateStdMatrix (const StdRegions::StdMatrixKey &mkey) override
 
DNekScalMatSharedPtr v_GetLocMatrix (const MatrixKey &mkey) override
 
void v_DropLocMatrix (const MatrixKey &mkey) override
 
DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix (const MatrixKey &mkey) override
 
void v_DropLocStaticCondMatrix (const MatrixKey &mkey) override
 
void v_MassMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
void v_LaplacianMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
void v_LaplacianMatrixOp (const int k1, const int k2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
void v_WeakDerivMatrixOp (const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
void v_WeakDirectionalDerivMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
void v_MassLevelCurvatureMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
void v_HelmholtzMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
void v_LaplacianMatrixOp_MatFree_Kernel (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp) override
 
void v_ReduceOrderCoeffs (int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_ComputeLaplacianMetric () override
 
void v_SVVLaplacianFilter (Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey) override
 
void GetEdgeInterpVals (const int edge, const NekDouble *inarray, Array< OneD, NekDouble > &outarray)
 
- Protected Member Functions inherited from Nektar::StdRegions::StdQuadExp
void v_StdPhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray) override
 Calculate the derivative of the physical points.
 
void v_BwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_FwdTransBndConstrained (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_IProductWRTBaseKernel (const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, NekDouble > &jac, const bool Deformed, const bool CollDir0=false, const bool CollDir1=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_FillMode (const int mode, Array< OneD, NekDouble > &array) override
 Fill outarray with mode mode of expansion.
 
int v_GetNverts () const final
 
int v_GetNtraces () const final
 
int v_GetTraceNcoeffs (const int i) const final
 
int v_GetTraceIntNcoeffs (const int i) const final
 
int v_GetTraceNumPoints (const int i) const final
 
int v_NumBndryCoeffs () const final
 
int v_NumDGBndryCoeffs () const final
 
int v_CalcNumberOfCoefficients (const std::vector< unsigned int > &nummodes, int &modes_offset) override
 
const LibUtilities::BasisKey v_GetTraceBasisKey (const int i, const int j, bool UseGLL=false) const final
 
LibUtilities::ShapeType v_DetShapeType () const final
 
bool v_IsBoundaryInteriorExpansion () const override
 
void v_GetCoords (Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2) override
 
NekDouble v_PhysEvaluateBasis (const Array< OneD, const NekDouble > &coords, int mode) override
 This function evaluates the basis function mode mode at a point coords of the domain.
 
NekDouble v_PhysEvalFirstDeriv (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) override
 
void v_GetBoundaryMap (Array< OneD, unsigned int > &outarray) override
 
void v_GetInteriorMap (Array< OneD, unsigned int > &outarray) override
 
int v_GetVertexMap (int localVertexId, bool useCoeffPacking=false) override
 
void v_GetTraceCoeffMap (const unsigned int traceid, Array< OneD, unsigned int > &maparray) override
 Get the map of the coefficient location to teh local trace coefficients.
 
void v_GetTraceInteriorToElementMap (const int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation edgeOrient=eForwards) override
 
DNekMatSharedPtr v_GenMatrix (const StdMatrixKey &mkey) override
 
DNekMatSharedPtr v_CreateStdMatrix (const StdMatrixKey &mkey) override
 
void v_MassMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
 
void v_LaplacianMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
 
void v_LaplacianMatrixOp (const int k1, const int k2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
 
void v_WeakDerivMatrixOp (const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
 
void v_HelmholtzMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
 
void v_SVVLaplacianFilter (Array< OneD, NekDouble > &array, const StdMatrixKey &mkey) override
 
void v_ExponentialFilter (Array< OneD, NekDouble > &array, const NekDouble alpha, const NekDouble exponent, const NekDouble cutoff) override
 
void v_ReduceOrderCoeffs (int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_GetSimplexEquiSpacedConnectivity (Array< OneD, int > &conn, bool standard=true) override
 
- Protected Member Functions inherited from Nektar::StdRegions::StdExpansion2D
void PhysTensorDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray_d0, Array< OneD, NekDouble > &outarray_d1)
 Calculate the 2D 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
 Calculate the inner product of inarray with respect to the basis B=base0*base1 and put into outarray.
 
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
 
void v_GetElmtTraceToTraceMap (const unsigned int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation edgeOrient, int P, int Q) override
 Determine the mapping to re-orientate the coefficients along the element trace (assumed to align with the standard element) into the orientation of the local trace given by edgeOrient.
 
void v_GetTraceToElementMap (const int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation edgeOrient=eForwards, int P=-1, int Q=-1) 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
 
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_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 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_GetTraceNumModes (const int fid, int &numModes0, int &numModes1, Orientation traceOrient=eDir1FwdDir1_Dir2FwdDir2)
 
virtual void v_GetVertexPhysVals (const int vertex, const Array< OneD, const NekDouble > &inarray, NekDouble &outarray)
 
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 DNekMatSharedPtr v_BuildInverseTransformationMatrix (const DNekScalMatSharedPtr &m_transformationmatrix)
 
- Protected Member Functions inherited from Nektar::LocalRegions::Expansion2D
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.
 
void v_PhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray) 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
 Calculates the inner product of a given function f with the different modes of the expansion.
 
void v_DGDeriv (const int dir, const Array< OneD, const NekDouble > &incoeffs, Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, Array< OneD, NekDouble > > &edgeCoeffs, Array< OneD, NekDouble > &out_d) override
 
void v_GenTraceExp (const int traceid, ExpansionSharedPtr &exp) override
 
void v_AddEdgeNormBoundaryInt (const int edge, const ExpansionSharedPtr &EdgeExp, const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray) override
 
void v_AddEdgeNormBoundaryInt (const int edge, const ExpansionSharedPtr &EdgeExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray) override
 
void v_AddRobinMassMatrix (const int edgeid, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat) override
 
void v_AddRobinTraceContribution (const int traceid, const Array< OneD, const NekDouble > &primCoeffs, const Array< OneD, NekDouble > &incoeffs, Array< OneD, NekDouble > &coeffs) override
 
DNekMatSharedPtr v_BuildVertexMatrix (const DNekScalMatSharedPtr &r_bnd) override
 
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_SetUpPhysNormals (const int edge) override
 
NekDouble v_VectorFlux (const Array< OneD, Array< OneD, NekDouble > > &vec) override
 
void v_TraceNormLen (const int traceid, NekDouble &h, NekDouble &p) override
 
- 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 DNekMatSharedPtr v_BuildTransformationMatrix (const DNekScalMatSharedPtr &r_bnd, const StdRegions::MatrixType matrixType)
 
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)
 
void v_SetCoeffsToOrientation (StdRegions::Orientation dir, Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
virtual const Array< OneD, const NekDouble > & v_GetPhysNormals ()
 
virtual void v_SetPhysNormals (Array< OneD, const NekDouble > &normal)
 

Private Member Functions

void GetEdgeInterpVals (const int edge, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
 QuadExp ()
 

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::Expansion2D
std::vector< bool > m_requireNeg
 
- 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 QuadExp.h.

Constructor & Destructor Documentation

◆ QuadExp() [1/3]

Nektar::LocalRegions::QuadExp::QuadExp ( const LibUtilities::BasisKey Ba,
const LibUtilities::BasisKey Bb,
SpatialDomains::Geometry2D geom 
)

Constructor using BasisKey class for quadrature points and order definition.

Definition at line 47 of file QuadExp.cpp.

50 : StdExpansion(Ba.GetNumModes() * Bb.GetNumModes(), 2, Ba, Bb),
51 StdExpansion2D(Ba.GetNumModes() * Bb.GetNumModes(), Ba, Bb),
52 StdQuadExp(Ba, Bb), Expansion(geom), Expansion2D(geom),
54 std::bind(&Expansion2D::CreateMatrix, this, std::placeholders::_1)),
56 this, std::placeholders::_1))
57{
58}
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
Expansion2D(SpatialDomains::Geometry2D *pGeom)
Expansion(SpatialDomains::Geometry *pGeom)
Definition Expansion.cpp:43
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition QuadExp.h:206
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition QuadExp.h:208
StdExpansion()
Default Constructor.
StdQuadExp(const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb)
Constructor using BasisKey class for quadrature points and order definition.

◆ QuadExp() [2/3]

Nektar::LocalRegions::QuadExp::QuadExp ( const QuadExp T)

Definition at line 60 of file QuadExp.cpp.

62 Expansion2D(T), m_matrixManager(T.m_matrixManager),
63 m_staticCondMatrixManager(T.m_staticCondMatrixManager)
64{
65}

◆ ~QuadExp()

Nektar::LocalRegions::QuadExp::~QuadExp ( )
overridedefault

◆ QuadExp() [3/3]

Nektar::LocalRegions::QuadExp::QuadExp ( )
private

Member Function Documentation

◆ GetEdgeInterpVals() [1/2]

void Nektar::LocalRegions::QuadExp::GetEdgeInterpVals ( const int  edge,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
private

Definition at line 397 of file QuadExp.cpp.

400{
401 GetEdgeInterpVals(edge, inarray.data(), outarray);
402}
void GetEdgeInterpVals(const int edge, const NekDouble *inarray, Array< OneD, NekDouble > &outarray)
Definition QuadExp.cpp:404

References GetEdgeInterpVals().

◆ GetEdgeInterpVals() [2/2]

void Nektar::LocalRegions::QuadExp::GetEdgeInterpVals ( const int  edge,
const NekDouble inarray,
Array< OneD, NekDouble > &  outarray 
)
protected

Definition at line 404 of file QuadExp.cpp.

406{
407 int i;
408 int nq0 = m_base[0]->GetNumPoints();
409 int nq1 = m_base[1]->GetNumPoints();
410
413
414 StdRegions::StdMatrixKey key(StdRegions::eInterpGauss, DetShapeType(),
415 *this, factors);
416
417 DNekScalMatSharedPtr mat_gauss = m_matrixManager[key];
418
419 switch (edge)
420 {
421 case 0:
422 {
423 for (i = 0; i < nq0; i++)
424 {
425 outarray[i] = Vmath::Dot(
426 nq1, mat_gauss->GetOwnedMatrix()->GetPtr().data(), 1,
427 &inarray[i], nq0);
428 }
429 break;
430 }
431 case 1:
432 {
433 for (i = 0; i < nq1; i++)
434 {
435 outarray[i] = Vmath::Dot(
436 nq0, mat_gauss->GetOwnedMatrix()->GetPtr().data(), 1,
437 &inarray[i * nq0], 1);
438 }
439 break;
440 }
441 case 2:
442 {
443 for (i = 0; i < nq0; i++)
444 {
445 outarray[i] = Vmath::Dot(
446 nq1, mat_gauss->GetOwnedMatrix()->GetPtr().data(), 1,
447 &inarray[i], nq0);
448 }
449 break;
450 }
451 case 3:
452 {
453 for (i = 0; i < nq1; i++)
454 {
455 outarray[i] = Vmath::Dot(
456 nq0, mat_gauss->GetOwnedMatrix()->GetPtr().data(), 1,
457 &inarray[i * nq0], 1);
458 }
459 break;
460 }
461 default:
462 ASSERTL0(false, "edge value (< 3) is out of range");
463 break;
464 }
465}
#define ASSERTL0(condition, msg)
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
Array< OneD, LibUtilities::BasisSharedPtr > m_base
std::map< ConstFactorType, NekDouble > ConstFactorMap
StdRegions::ConstFactorMap factors
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
T Dot(int n, const T *w, const T *x)
dot product
Definition Vmath.hpp:761

References ASSERTL0, Nektar::StdRegions::StdExpansion::DetShapeType(), Vmath::Dot(), Nektar::StdRegions::eFactorGaussEdge, Nektar::StdRegions::eInterpGauss, Nektar::StdRegions::StdExpansion::m_base, and m_matrixManager.

Referenced by GetEdgeInterpVals(), v_ComputeTraceNormal(), v_GetLocTracePhysVals(), and v_GetTraceQFactors().

◆ v_AlignVectorToCollapsedDir()

void Nektar::LocalRegions::QuadExp::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 212 of file QuadExp.cpp.

215{
216 ASSERTL1((dir == 0) || (dir == 1) || (dir == 2), "Invalid direction.");
217 ASSERTL1((dir == 2) ? (m_geom->GetCoordim() == 3) : true,
218 "Invalid direction.");
219
220 int nqtot = m_base[0]->GetNumPoints() * m_base[1]->GetNumPoints();
221
222 const Array<TwoD, const NekDouble> &df = m_geomFactors->GetDerivFactors();
223
224 Array<OneD, NekDouble> tmp1 = outarray[0];
225 Array<OneD, NekDouble> tmp2 = outarray[1];
226
227 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
228 {
229 Vmath::Vmul(nqtot, &df[2 * dir][0], 1, inarray.data(), 1, tmp1.data(),
230 1);
231 Vmath::Vmul(nqtot, &df[2 * dir + 1][0], 1, inarray.data(), 1,
232 tmp2.data(), 1);
233 }
234 else
235 {
236 Vmath::Smul(nqtot, df[2 * dir][0], inarray.data(), 1, tmp1.data(), 1);
237 Vmath::Smul(nqtot, df[2 * dir + 1][0], inarray.data(), 1, tmp2.data(),
238 1);
239 }
240}
#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
SpatialDomains::GeomFactorsUniquePtr m_geomFactors
Definition Expansion.h:307
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
@ 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 ASSERTL1, Nektar::SpatialDomains::eDeformed, Nektar::SpatialDomains::Geometry::GetCoordim(), Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion::m_geom, Nektar::LocalRegions::Expansion::m_geomFactors, Vmath::Smul(), and Vmath::Vmul().

Referenced by v_IProductWRTDerivBase().

◆ v_ComputeLaplacianMetric()

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

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 1298 of file QuadExp.cpp.

1299{
1300 const SpatialDomains::GeomType type = m_geomFactors->GetGtype();
1301 const unsigned int nqtot = GetTotPoints();
1302 const unsigned int dim = 2;
1303 const MetricType m[3][3] = {
1307
1308 const Array<TwoD, const NekDouble> gmat =
1309 m_geomFactors->GetGmat(GetPointsKeys());
1310 for (unsigned int i = 0; i < dim; ++i)
1311 {
1312 for (unsigned int j = i; j < dim; ++j)
1313 {
1314 m_metrics[m[i][j]] = Array<OneD, NekDouble>(nqtot);
1315 if (type == SpatialDomains::eDeformed)
1316 {
1317 Vmath::Vcopy(nqtot, &gmat[i * dim + j][0], 1,
1318 &m_metrics[m[i][j]][0], 1);
1319 }
1320 else
1321 {
1322 Vmath::Fill(nqtot, gmat[i * dim + j][0], &m_metrics[m[i][j]][0],
1323 1);
1324 }
1325 }
1326 }
1327}
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
const LibUtilities::PointsKeyVector GetPointsKeys() const
GeomType
Indicates the type of element geometry.
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition Vmath.hpp:54
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition Vmath.hpp:825

References 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::GetPointsKeys(), Nektar::StdRegions::StdExpansion::GetTotPoints(), Nektar::LocalRegions::Expansion::m_geomFactors, Nektar::LocalRegions::Expansion::m_metrics, and Vmath::Vcopy().

◆ v_ComputeTraceNormal()

void Nektar::LocalRegions::QuadExp::v_ComputeTraceNormal ( const int  edge)
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 722 of file QuadExp.cpp.

723{
724 int i;
725 SpatialDomains::GeomType type = m_geomFactors->GetGtype();
726
728 for (i = 0; i < ptsKeys.size(); ++i)
729 {
730 // Need at least 2 points for computing normals
731 if (ptsKeys[i].GetNumPoints() == 1)
732 {
733 LibUtilities::PointsKey pKey(2, ptsKeys[i].GetPointsType());
734 ptsKeys[i] = pKey;
735 }
736 }
737
738 const Array<TwoD, const NekDouble> &df =
739 m_geomFactors->ComputeDerivFactors(ptsKeys);
740 const Array<OneD, const NekDouble> &jac =
741 m_geomFactors->ComputeJac(ptsKeys);
742
743 // The points of normals should follow trace basis, not local basis.
744 LibUtilities::BasisKey tobasis = GetTraceBasisKey(edge);
745
746 int nqe = tobasis.GetNumPoints();
747 int vCoordDim = GetCoordim();
748
749 m_traceNormals[edge] = Array<OneD, Array<OneD, NekDouble>>(vCoordDim);
750 Array<OneD, Array<OneD, NekDouble>> &normal = m_traceNormals[edge];
751 for (i = 0; i < vCoordDim; ++i)
752 {
753 normal[i] = Array<OneD, NekDouble>(nqe);
754 }
755
756 size_t nqb = nqe;
757 size_t nbnd = edge;
758 m_elmtBndNormDirElmtLen[nbnd] = Array<OneD, NekDouble>{nqb, 0.0};
759 Array<OneD, NekDouble> &length = m_elmtBndNormDirElmtLen[nbnd];
760
761 // Regular geometry case
762 if ((type == SpatialDomains::eRegular) ||
764 {
765 NekDouble fac;
766 // Set up normals
767 switch (edge)
768 {
769 case 0:
770 for (i = 0; i < vCoordDim; ++i)
771 {
772 Vmath::Fill(nqe, -df[2 * i + 1][0], normal[i], 1);
773 }
774 break;
775 case 1:
776 for (i = 0; i < vCoordDim; ++i)
777 {
778 Vmath::Fill(nqe, df[2 * i][0], normal[i], 1);
779 }
780 break;
781 case 2:
782 for (i = 0; i < vCoordDim; ++i)
783 {
784 Vmath::Fill(nqe, df[2 * i + 1][0], normal[i], 1);
785 }
786 break;
787 case 3:
788 for (i = 0; i < vCoordDim; ++i)
789 {
790 Vmath::Fill(nqe, -df[2 * i][0], normal[i], 1);
791 }
792 break;
793 default:
794 ASSERTL0(false, "edge is out of range (edge < 4)");
795 }
796
797 // normalise
798 fac = 0.0;
799 for (i = 0; i < vCoordDim; ++i)
800 {
801 fac += normal[i][0] * normal[i][0];
802 }
803 fac = 1.0 / sqrt(fac);
804
805 Vmath::Fill(nqb, fac, length, 1);
806
807 for (i = 0; i < vCoordDim; ++i)
808 {
809 Vmath::Smul(nqe, fac, normal[i], 1, normal[i], 1);
810 }
811 }
812 else // Set up deformed normals
813 {
814 int j;
815
816 int nquad0 = ptsKeys[0].GetNumPoints();
817 int nquad1 = ptsKeys[1].GetNumPoints();
818
819 LibUtilities::PointsKey from_key;
820
821 Array<OneD, NekDouble> normals(vCoordDim * max(nquad0, nquad1), 0.0);
822 Array<OneD, NekDouble> edgejac(vCoordDim * max(nquad0, nquad1), 0.0);
823
824 // Extract Jacobian along edges and recover local
825 // derivates (dx/dr) for polynomial interpolation by
826 // multiplying m_gmat by jacobian
827
828 // Implementation for all the basis except Gauss points
831 {
832 switch (edge)
833 {
834 case 0:
835 for (j = 0; j < nquad0; ++j)
836 {
837 edgejac[j] = jac[j];
838 for (i = 0; i < vCoordDim; ++i)
839 {
840 normals[i * nquad0 + j] =
841 -df[2 * i + 1][j] * edgejac[j];
842 }
843 }
844 from_key = ptsKeys[0];
845 break;
846 case 1:
847 for (j = 0; j < nquad1; ++j)
848 {
849 edgejac[j] = jac[nquad0 * j + nquad0 - 1];
850 for (i = 0; i < vCoordDim; ++i)
851 {
852 normals[i * nquad1 + j] =
853 df[2 * i][nquad0 * j + nquad0 - 1] * edgejac[j];
854 }
855 }
856 from_key = ptsKeys[1];
857 break;
858 case 2:
859 for (j = 0; j < nquad0; ++j)
860 {
861 edgejac[j] = jac[nquad0 * (nquad1 - 1) + j];
862 for (i = 0; i < vCoordDim; ++i)
863 {
864 normals[i * nquad0 + j] =
865 (df[2 * i + 1][nquad0 * (nquad1 - 1) + j]) *
866 edgejac[j];
867 }
868 }
869 from_key = ptsKeys[0];
870 break;
871 case 3:
872 for (j = 0; j < nquad1; ++j)
873 {
874 edgejac[j] = jac[nquad0 * j];
875 for (i = 0; i < vCoordDim; ++i)
876 {
877 normals[i * nquad1 + j] =
878 -df[2 * i][nquad0 * j] * edgejac[j];
879 }
880 }
881 from_key = ptsKeys[1];
882 break;
883 default:
884 ASSERTL0(false, "edge is out of range (edge < 3)");
885 }
886 }
887 else
888 {
889 int nqtot = nquad0 * nquad1;
890 Array<OneD, NekDouble> tmp_gmat(nqtot, 0.0);
891 Array<OneD, NekDouble> tmp_gmat_edge(nqe, 0.0);
892
893 switch (edge)
894 {
895 case 0:
896 for (j = 0; j < nquad0; ++j)
897 {
898 for (i = 0; i < vCoordDim; ++i)
899 {
900 Vmath::Vmul(nqtot, &(df[2 * i + 1][0]), 1, &jac[0],
901 1, &(tmp_gmat[0]), 1);
902 QuadExp::GetEdgeInterpVals(edge, tmp_gmat,
903 tmp_gmat_edge);
904 normals[i * nquad0 + j] = -tmp_gmat_edge[j];
905 }
906 }
907 from_key = ptsKeys[0];
908 break;
909 case 1:
910 for (j = 0; j < nquad1; ++j)
911 {
912 for (i = 0; i < vCoordDim; ++i)
913 {
914 Vmath::Vmul(nqtot, &(df[2 * i][0]), 1, &jac[0], 1,
915 &(tmp_gmat[0]), 1);
916 QuadExp::GetEdgeInterpVals(edge, tmp_gmat,
917 tmp_gmat_edge);
918 normals[i * nquad1 + j] = tmp_gmat_edge[j];
919 }
920 }
921 from_key = ptsKeys[1];
922 break;
923 case 2:
924 for (j = 0; j < nquad0; ++j)
925 {
926 for (i = 0; i < vCoordDim; ++i)
927 {
928 Vmath::Vmul(nqtot, &(df[2 * i + 1][0]), 1, &jac[0],
929 1, &(tmp_gmat[0]), 1);
930 QuadExp::GetEdgeInterpVals(edge, tmp_gmat,
931 tmp_gmat_edge);
932 normals[i * nquad0 + j] = tmp_gmat_edge[j];
933 }
934 }
935 from_key = ptsKeys[0];
936 break;
937 case 3:
938 for (j = 0; j < nquad1; ++j)
939 {
940 for (i = 0; i < vCoordDim; ++i)
941 {
942 Vmath::Vmul(nqtot, &(df[2 * i][0]), 1, &jac[0], 1,
943 &(tmp_gmat[0]), 1);
944 QuadExp::GetEdgeInterpVals(edge, tmp_gmat,
945 tmp_gmat_edge);
946 normals[i * nquad1 + j] = -tmp_gmat_edge[j];
947 }
948 }
949 from_key = ptsKeys[1];
950 break;
951 default:
952 ASSERTL0(false, "edge is out of range (edge < 3)");
953 }
954 }
955
956 int nq = from_key.GetNumPoints();
957 Array<OneD, NekDouble> work(nqe, 0.0);
958
959 // interpolate Jacobian and invert
960 LibUtilities::Interp1D(from_key, jac, tobasis.GetPointsKey(), work);
961 Vmath::Sdiv(nqe, 1.0, &work[0], 1, &work[0], 1);
962
963 // interpolate
964 for (i = 0; i < GetCoordim(); ++i)
965 {
966 LibUtilities::Interp1D(from_key, &normals[i * nq],
967 tobasis.GetPointsKey(), &normal[i][0]);
968 Vmath::Vmul(nqe, work, 1, normal[i], 1, normal[i], 1);
969 }
970
971 // normalise normal vectors
972 Vmath::Zero(nqe, work, 1);
973 for (i = 0; i < GetCoordim(); ++i)
974 {
975 Vmath::Vvtvp(nqe, normal[i], 1, normal[i], 1, work, 1, work, 1);
976 }
977
978 Vmath::Vsqrt(nqe, work, 1, work, 1);
979 Vmath::Sdiv(nqe, 1.0, work, 1, work, 1);
980
981 Vmath::Vcopy(nqb, work, 1, length, 1);
982
983 for (i = 0; i < GetCoordim(); ++i)
984 {
985 Vmath::Vmul(nqe, normal[i], 1, work, 1, normal[i], 1);
986 }
987 }
988 if (GetGeom()->GetEorient(edge) == StdRegions::eBackwards)
989 {
990 for (i = 0; i < vCoordDim; ++i)
991 {
992 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
993 {
994 Vmath::Reverse(nqe, normal[i], 1, normal[i], 1);
995 }
996 }
997 }
998}
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
SpatialDomains::Geometry * GetGeom() 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 Interp1D(const BasisKey &fbasis0, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, Array< OneD, NekDouble > &to)
this function interpolates a 1D function evaluated at the quadrature points of the basis fbasis0 to ...
Definition Interp.cpp:47
std::vector< PointsKey > PointsKeyVector
Definition Points.h:313
@ eGaussGaussLegendre
1D Gauss-Gauss-Legendre quadrature points
Definition PointsType.h:46
@ 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 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 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 Reverse(int n, const T *x, const int incx, T *y, const int incy)
Definition Vmath.hpp:844
scalarT< T > max(scalarT< T > lhs, scalarT< T > rhs)
Definition scalar.hpp:305
scalarT< T > sqrt(scalarT< T > in)
Definition scalar.hpp:290

References ASSERTL0, Nektar::StdRegions::eBackwards, Nektar::SpatialDomains::eDeformed, Nektar::LibUtilities::eGaussGaussLegendre, Nektar::SpatialDomains::eMovingRegular, Nektar::SpatialDomains::eRegular, Vmath::Fill(), Nektar::StdRegions::StdExpansion::GetCoordim(), GetEdgeInterpVals(), Nektar::LocalRegions::Expansion::GetGeom(), Nektar::LibUtilities::BasisKey::GetNumPoints(), Nektar::LibUtilities::PointsKey::GetNumPoints(), Nektar::StdRegions::StdExpansion::GetNumPoints(), Nektar::LibUtilities::BasisKey::GetPointsKey(), Nektar::StdRegions::StdExpansion::GetPointsKeys(), Nektar::StdRegions::StdExpansion::GetPointsType(), Nektar::StdRegions::StdExpansion::GetTraceBasisKey(), Nektar::LibUtilities::Interp1D(), Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion::m_elmtBndNormDirElmtLen, Nektar::LocalRegions::Expansion::m_geomFactors, Nektar::LocalRegions::Expansion::m_traceNormals, tinysimd::max(), Vmath::Reverse(), Vmath::Sdiv(), Vmath::Smul(), tinysimd::sqrt(), Vmath::Vcopy(), Vmath::Vmul(), Vmath::Vsqrt(), Vmath::Vvtvp(), and Vmath::Zero().

◆ v_CreateStdMatrix()

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1115 of file QuadExp.cpp.

1117{
1118 LibUtilities::BasisKey bkey0 = m_base[0]->GetBasisKey();
1119 LibUtilities::BasisKey bkey1 = m_base[1]->GetBasisKey();
1122 return tmp->GetStdMatrix(mkey);
1123}
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< StdQuadExp > StdQuadExpSharedPtr
Definition StdQuadExp.h:181

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

◆ v_DropLocMatrix()

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

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 1130 of file QuadExp.cpp.

1131{
1132 m_matrixManager.DeleteObject(mkey);
1133}

References m_matrixManager.

◆ v_DropLocStaticCondMatrix()

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1140 of file QuadExp.cpp.

1141{
1142 m_staticCondMatrixManager.DeleteObject(mkey);
1143}

References m_staticCondMatrixManager.

◆ v_ExtractDataToCoeffs()

void Nektar::LocalRegions::QuadExp::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 1000 of file QuadExp.cpp.

1004{
1005 int data_order0 = nummodes[mode_offset];
1006 int fillorder0 = std::min(m_base[0]->GetNumModes(), data_order0);
1007
1008 int data_order1 = nummodes[mode_offset + 1];
1009 int order1 = m_base[1]->GetNumModes();
1010 int fillorder1 = min(order1, data_order1);
1011
1012 // Check if same basis
1013 if (fromType[0] != m_base[0]->GetBasisType() ||
1014 fromType[1] != m_base[1]->GetBasisType())
1015 {
1016 // Construct a quad with the appropriate basis type at our
1017 // quadrature points, and one more to do a forwards
1018 // transform. We can then copy the output to coeffs.
1019 StdRegions::StdQuadExp tmpQuad(
1020 LibUtilities::BasisKey(fromType[0], data_order0,
1021 m_base[0]->GetPointsKey()),
1022 LibUtilities::BasisKey(fromType[1], data_order1,
1023 m_base[1]->GetPointsKey()));
1024 StdRegions::StdQuadExp tmpQuad2(m_base[0]->GetBasisKey(),
1025 m_base[1]->GetBasisKey());
1026
1027 Array<OneD, const NekDouble> tmpData(tmpQuad.GetNcoeffs(), data);
1028 Array<OneD, NekDouble> tmpBwd(tmpQuad2.GetTotPoints());
1029 Array<OneD, NekDouble> tmpOut(tmpQuad2.GetNcoeffs());
1030
1031 tmpQuad.BwdTrans(tmpData, tmpBwd);
1032 tmpQuad2.FwdTrans(tmpBwd, tmpOut);
1033 Vmath::Vcopy(tmpOut.size(), &tmpOut[0], 1, coeffs, 1);
1034
1035 return;
1036 }
1037
1038 switch (m_base[0]->GetBasisType())
1039 {
1041 {
1042 int i;
1043 int cnt = 0;
1044 int cnt1 = 0;
1045
1047 "Extraction routine not set up for this basis");
1048
1049 Vmath::Zero(m_ncoeffs, coeffs, 1);
1050 for (i = 0; i < fillorder0; ++i)
1051 {
1052 Vmath::Vcopy(fillorder1, data + cnt, 1, coeffs + cnt1, 1);
1053 cnt += data_order1;
1054 cnt1 += order1;
1055 }
1056 }
1057 break;
1059 {
1060 LibUtilities::PointsKey p0(nummodes[0],
1062 LibUtilities::PointsKey p1(nummodes[1],
1064 LibUtilities::PointsKey t0(m_base[0]->GetNumModes(),
1066 LibUtilities::PointsKey t1(m_base[1]->GetNumModes(),
1068 LibUtilities::Interp2D(p0, p1, data, t0, t1, coeffs);
1069 }
1070 break;
1072 {
1073 // Assume that input is also Gll_Lagrange but no way to check;
1074 LibUtilities::PointsKey p0(nummodes[0],
1076 LibUtilities::PointsKey p1(nummodes[1],
1078 LibUtilities::PointsKey t0(m_base[0]->GetNumModes(),
1080 LibUtilities::PointsKey t1(m_base[1]->GetNumModes(),
1082 LibUtilities::Interp2D(p0, p1, data, t0, t1, coeffs);
1083 }
1084 break;
1085 default:
1086 ASSERTL0(false, "basis is either not set up or not hierarchicial");
1087 }
1088}
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
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
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
Definition PointsType.h:51
@ eGauss_Lagrange
Lagrange Polynomials using the Gauss points.
Definition BasisType.h:57
@ eGLL_Lagrange
Lagrange for SEM basis .
Definition BasisType.h:56
@ eModified_A
Principle Modified Functions .
Definition BasisType.h:48
scalarT< T > min(scalarT< T > lhs, scalarT< T > rhs)
Definition scalar.hpp:300

References ASSERTL0, ASSERTL1, Nektar::StdRegions::StdExpansion::BwdTrans(), Nektar::LibUtilities::eGauss_Lagrange, Nektar::LibUtilities::eGaussGaussLegendre, Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eGLL_Lagrange, Nektar::LibUtilities::eModified_A, Nektar::StdRegions::StdExpansion::FwdTrans(), Nektar::StdRegions::StdExpansion::GetBasisType(), Nektar::StdRegions::StdExpansion::GetNcoeffs(), Nektar::StdRegions::StdExpansion::GetTotPoints(), Nektar::LibUtilities::Interp2D(), Nektar::StdRegions::StdExpansion::m_base, Nektar::StdRegions::StdExpansion::m_ncoeffs, tinysimd::min(), Vmath::Vcopy(), and Vmath::Zero().

◆ v_FwdTransBndConstrained()

void Nektar::LocalRegions::QuadExp::v_FwdTransBndConstrained ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 67 of file QuadExp.cpp.

70{
71 if ((m_base[0]->Collocation()) && (m_base[1]->Collocation()))
72 {
73 Vmath::Vcopy(m_ncoeffs, inarray, 1, outarray, 1);
74 }
75 else
76 {
77 int i, j;
78 int npoints[2] = {m_base[0]->GetNumPoints(), m_base[1]->GetNumPoints()};
79 int nmodes[2] = {m_base[0]->GetNumModes(), m_base[1]->GetNumModes()};
80
81 fill(outarray.data(), outarray.data() + m_ncoeffs, 0.0);
82
83 if (nmodes[0] == 1 && nmodes[1] == 1)
84 {
85 outarray[0] = inarray[0];
86 return;
87 }
88
89 Array<OneD, NekDouble> physEdge[4];
90 Array<OneD, NekDouble> coeffEdge[4];
91 for (i = 0; i < 4; i++)
92 {
93 physEdge[i] = Array<OneD, NekDouble>(npoints[i % 2]);
94 coeffEdge[i] = Array<OneD, NekDouble>(nmodes[i % 2]);
95 }
96
97 for (i = 0; i < npoints[0]; i++)
98 {
99 physEdge[0][i] = inarray[i];
100 physEdge[2][i] = inarray[npoints[0] * (npoints[1] - 1) + i];
101 }
102
103 for (i = 0; i < npoints[1]; i++)
104 {
105 physEdge[1][i] = inarray[npoints[0] - 1 + i * npoints[0]];
106 physEdge[3][i] = inarray[i * npoints[0]];
107 }
108
109 SegExpSharedPtr segexp[4];
110 for (i = 0; i < 4; i++)
111 {
113 m_base[i % 2]->GetBasisKey(), GetGeom2D()->GetEdge(i));
114 }
115
116 Array<OneD, unsigned int> mapArray;
117 Array<OneD, int> signArray;
119
120 for (i = 0; i < 4; i++)
121 {
122 segexp[i % 2]->FwdTransBndConstrained(physEdge[i], coeffEdge[i]);
123
124 GetTraceToElementMap(i, mapArray, signArray);
125 for (j = 0; j < nmodes[i % 2]; j++)
126 {
127 sign = (NekDouble)signArray[j];
128 outarray[mapArray[j]] = sign * coeffEdge[i][j];
129 }
130 }
131
132 int nBoundaryDofs = NumBndryCoeffs();
133 int nInteriorDofs = m_ncoeffs - nBoundaryDofs;
134
135 if (nInteriorDofs > 0)
136 {
137 Array<OneD, NekDouble> tmp0(m_ncoeffs);
138 Array<OneD, NekDouble> tmp1(m_ncoeffs);
139
140 StdRegions::StdMatrixKey stdmasskey(StdRegions::eMass,
141 DetShapeType(), *this);
142 MassMatrixOp(outarray, tmp0, stdmasskey);
143 v_IProductWRTBase(inarray, tmp1);
144
145 Vmath::Vsub(m_ncoeffs, tmp1, 1, tmp0, 1, tmp1, 1);
146
147 // get Mass matrix inverse (only of interior DOF)
148 // use block (1,1) of the static condensed system
149 // note: this block alreay contains the inverse matrix
150 MatrixKey masskey(StdRegions::eMass, DetShapeType(), *this);
151 DNekScalMatSharedPtr matsys =
152 (m_staticCondMatrixManager[masskey])->GetBlock(1, 1);
153
154 Array<OneD, NekDouble> rhs(nInteriorDofs);
155 Array<OneD, NekDouble> result(nInteriorDofs);
156
157 GetInteriorMap(mapArray);
158
159 for (i = 0; i < nInteriorDofs; i++)
160 {
161 rhs[i] = tmp1[mapArray[i]];
162 }
163
164 Blas::Dgemv('N', nInteriorDofs, nInteriorDofs, matsys->Scale(),
165 &((matsys->GetOwnedMatrix())->GetPtr())[0],
166 nInteriorDofs, rhs.data(), 1, 0.0, result.data(), 1);
167
168 for (i = 0; i < nInteriorDofs; i++)
169 {
170 outarray[mapArray[i]] = result[i];
171 }
172 }
173 }
174}
#define sign(a, b)
return the sign(b)*a
Definition Polylib.cpp:47
SpatialDomains::Geometry2D * GetGeom2D() const
void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Calculates the inner product of a given function f with the different modes of the expansion.
void MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void GetTraceToElementMap(const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation traceOrient=eForwards, int P=-1, int Q=-1)
void GetInteriorMap(Array< OneD, unsigned int > &outarray)
static void Dgemv(const char &trans, const int &m, const int &n, const double &alpha, const double *a, const int &lda, const double *x, const int &incx, const double &beta, double *y, const int &incy)
BLAS level 2: Matrix vector multiply y = alpha A x plus beta y where A[m x n].
Definition Blas.hpp:152
std::shared_ptr< SegExp > SegExpSharedPtr
Definition SegExp.h:208
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
Definition Vmath.hpp:220

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::StdRegions::StdExpansion::DetShapeType(), Blas::Dgemv(), Nektar::StdRegions::eMass, Nektar::LocalRegions::Expansion2D::GetGeom2D(), Nektar::StdRegions::StdExpansion::GetInteriorMap(), Nektar::StdRegions::StdExpansion::GetTraceToElementMap(), Nektar::StdRegions::StdExpansion::m_base, Nektar::StdRegions::StdExpansion::m_ncoeffs, m_staticCondMatrixManager, Nektar::StdRegions::StdExpansion::MassMatrixOp(), Nektar::StdRegions::StdExpansion::NumBndryCoeffs(), sign, Nektar::LocalRegions::Expansion2D::v_IProductWRTBase(), Vmath::Vcopy(), and Vmath::Vsub().

◆ v_GenMatrix()

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1095 of file QuadExp.cpp.

1096{
1097 DNekMatSharedPtr returnval;
1098 switch (mkey.GetMatrixType())
1099 {
1107 returnval = Expansion2D::v_GenMatrix(mkey);
1108 break;
1109 default:
1110 returnval = StdQuadExp::v_GenMatrix(mkey);
1111 }
1112 return returnval;
1113}
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::eInvLaplacianWithUnityMean, Nektar::StdRegions::StdMatrixKey::GetMatrixType(), and Nektar::LocalRegions::Expansion2D::v_GenMatrix().

◆ v_GetCoord()

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 301 of file QuadExp.cpp.

303{
304 int i;
305
306 ASSERTL1(Lcoords[0] >= -1.0 && Lcoords[1] <= 1.0 && Lcoords[1] >= -1.0 &&
307 Lcoords[1] <= 1.0,
308 "Local coordinates are not in region [-1,1]");
309
310 m_geom->FillGeom();
311 for (i = 0; i < m_geom->GetCoordim(); ++i)
312 {
313 coords[i] = m_geom->GetCoord(i, Lcoords);
314 }
315}
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
void FillGeom()
Populate the coordinate mapping Geometry::m_coeffs information from any children geometry elements.
Definition Geometry.h:461

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

◆ v_GetCoords()

void Nektar::LocalRegions::QuadExp::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 294 of file QuadExp.cpp.

297{
298 Expansion::v_GetCoords(coords_0, coords_1, coords_2);
299}
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::QuadExp::v_GetLinStdExp ( void  ) const
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 283 of file QuadExp.cpp.

284{
285 LibUtilities::BasisKey bkey0(m_base[0]->GetBasisType(), 2,
286 m_base[0]->GetPointsKey());
287 LibUtilities::BasisKey bkey1(m_base[1]->GetBasisType(), 2,
288 m_base[1]->GetPointsKey());
289
291 bkey1);
292}

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

◆ v_GetLocMatrix()

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

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 1125 of file QuadExp.cpp.

1126{
1127 return m_matrixManager[mkey];
1128}

References m_matrixManager.

◆ v_GetLocStaticCondMatrix()

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1135 of file QuadExp.cpp.

1136{
1137 return m_staticCondMatrixManager[mkey];
1138}

References m_staticCondMatrixManager.

◆ v_GetLocTracePhysVals()

void Nektar::LocalRegions::QuadExp::v_GetLocTracePhysVals ( const int  edge,
const StdRegions::StdExpansionSharedPtr EdgeExp,
const NekDouble inarray,
Array< OneD, NekDouble > &  outarray 
)
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 347 of file QuadExp.cpp.

350{
351 int nquad0 = m_base[0]->GetNumPoints();
352 int nquad1 = m_base[1]->GetNumPoints();
353
354 // Implementation for all the basis except Gauss points
357 {
358 switch (edge)
359 {
360 case 0:
361 Vmath::Vcopy(nquad0, &(inarray[0]), 1, &(outarray[0]), 1);
362 break;
363 case 1:
364 Vmath::Vcopy(nquad1, &(inarray[0]) + (nquad0 - 1), nquad0,
365 &(outarray[0]), 1);
366 break;
367 case 2:
368 Vmath::Vcopy(nquad0, &(inarray[0]) + nquad0 * (nquad1 - 1), 1,
369 &(outarray[0]), 1);
370 break;
371 case 3:
372 Vmath::Vcopy(nquad1, &(inarray[0]), nquad0, &(outarray[0]), 1);
373 break;
374 default:
375 ASSERTL0(false, "edge value (< 3) is out of range");
376 break;
377 }
378 }
379 else
380 {
381 QuadExp::GetEdgeInterpVals(edge, inarray, outarray);
382 }
383
384 // Interpolate if required
385 if (m_base[edge % 2]->GetPointsKey() !=
386 EdgeExp->GetBasis(0)->GetPointsKey())
387 {
388 Array<OneD, NekDouble> outtmp(max(nquad0, nquad1));
389
390 outtmp = outarray;
391
392 LibUtilities::Interp1D(m_base[edge % 2]->GetPointsKey(), outtmp,
393 EdgeExp->GetBasis(0)->GetPointsKey(), outarray);
394 }
395}

References ASSERTL0, Nektar::LibUtilities::eGaussGaussLegendre, GetEdgeInterpVals(), Nektar::StdRegions::StdExpansion::GetPointsType(), Nektar::LibUtilities::Interp1D(), Nektar::StdRegions::StdExpansion::m_base, tinysimd::max(), and Vmath::Vcopy().

Referenced by v_GetTracePhysVals().

◆ v_GetStdExp()

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

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 277 of file QuadExp.cpp.

278{
280 m_base[0]->GetBasisKey(), m_base[1]->GetBasisKey());
281}

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

◆ v_GetTraceOrient()

StdRegions::Orientation Nektar::LocalRegions::QuadExp::v_GetTraceOrient ( int  edge)
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 1090 of file QuadExp.cpp.

1091{
1092 return m_geom->GetEorient(edge);
1093}
StdRegions::Orientation GetEorient(const int i) const
Returns the orientation of edge i with respect to the ordering of edges in the standard element.
Definition Geometry.h:378

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

◆ v_GetTracePhysMap()

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

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 467 of file QuadExp.cpp.

468{
469 int nquad0 = m_base[0]->GetNumPoints();
470 int nquad1 = m_base[1]->GetNumPoints();
471
472 // Get points in Cartesian orientation
473 switch (edge)
474 {
475 case 0:
476 outarray = Array<OneD, int>(nquad0);
477 for (int i = 0; i < nquad0; ++i)
478 {
479 outarray[i] = i;
480 }
481 break;
482 case 1:
483 outarray = Array<OneD, int>(nquad1);
484 for (int i = 0; i < nquad1; ++i)
485 {
486 outarray[i] = (nquad0 - 1) + i * nquad0;
487 }
488 break;
489 case 2:
490 outarray = Array<OneD, int>(nquad0);
491 for (int i = 0; i < nquad0; ++i)
492 {
493 outarray[i] = i + nquad0 * (nquad1 - 1);
494 }
495 break;
496 case 3:
497 outarray = Array<OneD, int>(nquad1);
498 for (int i = 0; i < nquad1; ++i)
499 {
500 outarray[i] = i * nquad0;
501 }
502 break;
503 default:
504 ASSERTL0(false, "edge value (< 3) is out of range");
505 break;
506 }
507}

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

◆ v_GetTracePhysVals()

void Nektar::LocalRegions::QuadExp::v_GetTracePhysVals ( const int  trace,
const StdRegions::StdExpansionSharedPtr TraceExp,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
StdRegions::Orientation  orient 
)
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 328 of file QuadExp.cpp.

332{
333 v_GetLocTracePhysVals(edge, EdgeExp, inarray.data(), outarray);
334
335 if (orient == StdRegions::eNoOrientation)
336 {
337 orient = GetTraceOrient(edge);
338 }
339 // Reverse data if necessary
340 if (orient == StdRegions::eBackwards)
341 {
342 Vmath::Reverse(EdgeExp->GetNumPoints(0), &outarray[0], 1, &outarray[0],
343 1);
344 }
345}
StdRegions::Orientation GetTraceOrient(int trace)
Definition Expansion.h:181
void v_GetLocTracePhysVals(const int edge, const StdRegions::StdExpansionSharedPtr &EdgeExp, const NekDouble *inarray, Array< OneD, NekDouble > &outarray) override
Definition QuadExp.cpp:347

References Nektar::StdRegions::eBackwards, Nektar::StdRegions::eNoOrientation, Nektar::LocalRegions::Expansion::GetTraceOrient(), Vmath::Reverse(), and v_GetLocTracePhysVals().

◆ v_GetTraceQFactors()

void Nektar::LocalRegions::QuadExp::v_GetTraceQFactors ( const int  edge,
Array< OneD, NekDouble > &  outarray 
)
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 509 of file QuadExp.cpp.

511{
512 int i;
513 int nquad0 = m_base[0]->GetNumPoints();
514 int nquad1 = m_base[1]->GetNumPoints();
515
517 const Array<OneD, const NekDouble> &jac = m_geomFactors->GetJac();
518 const Array<TwoD, const NekDouble> &df = m_geomFactors->GetDerivFactors();
519
520 Array<OneD, NekDouble> j(max(nquad0, nquad1), 0.0);
521 Array<OneD, NekDouble> g0(max(nquad0, nquad1), 0.0);
522 Array<OneD, NekDouble> g1(max(nquad0, nquad1), 0.0);
523 Array<OneD, NekDouble> g2(max(nquad0, nquad1), 0.0);
524 Array<OneD, NekDouble> g3(max(nquad0, nquad1), 0.0);
525
526 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
527 {
528 // Implementation for all the basis except Gauss points
531 {
532 switch (edge)
533 {
534 case 0:
535 Vmath::Vcopy(nquad0, &(df[1][0]), 1, &(g1[0]), 1);
536 Vmath::Vcopy(nquad0, &(df[3][0]), 1, &(g3[0]), 1);
537 Vmath::Vcopy(nquad0, &(jac[0]), 1, &(j[0]), 1);
538
539 for (i = 0; i < nquad0; ++i)
540 {
541 outarray[i] =
542 j[i] * sqrt(g1[i] * g1[i] + g3[i] * g3[i]);
543 }
544 break;
545 case 1:
546 Vmath::Vcopy(nquad1, &(df[0][0]) + (nquad0 - 1), nquad0,
547 &(g0[0]), 1);
548
549 Vmath::Vcopy(nquad1, &(df[2][0]) + (nquad0 - 1), nquad0,
550 &(g2[0]), 1);
551
552 Vmath::Vcopy(nquad1, &(jac[0]) + (nquad0 - 1), nquad0,
553 &(j[0]), 1);
554
555 for (i = 0; i < nquad1; ++i)
556 {
557 outarray[i] =
558 j[i] * sqrt(g0[i] * g0[i] + g2[i] * g2[i]);
559 }
560 break;
561 case 2:
562
563 Vmath::Vcopy(nquad0, &(df[1][0]) + (nquad0 * (nquad1 - 1)),
564 1, &(g1[0]), 1);
565
566 Vmath::Vcopy(nquad0, &(df[3][0]) + (nquad0 * (nquad1 - 1)),
567 1, &(g3[0]), 1);
568
569 Vmath::Vcopy(nquad0, &(jac[0]) + (nquad0 * (nquad1 - 1)), 1,
570 &(j[0]), 1);
571
572 for (i = 0; i < nquad0; ++i)
573 {
574 outarray[i] =
575 j[i] * sqrt(g1[i] * g1[i] + g3[i] * g3[i]);
576 }
577 break;
578 case 3:
579
580 Vmath::Vcopy(nquad1, &(df[0][0]), nquad0, &(g0[0]), 1);
581 Vmath::Vcopy(nquad1, &(df[2][0]), nquad0, &(g2[0]), 1);
582 Vmath::Vcopy(nquad1, &(jac[0]), nquad0, &(j[0]), 1);
583
584 for (i = 0; i < nquad1; ++i)
585 {
586 outarray[i] =
587 j[i] * sqrt(g0[i] * g0[i] + g2[i] * g2[i]);
588 }
589 break;
590 default:
591 ASSERTL0(false, "edge value (< 3) is out of range");
592 break;
593 }
594 }
595 else
596 {
597 int nqtot = nquad0 * nquad1;
598 Array<OneD, NekDouble> tmp_gmat0(nqtot, 0.0);
599 Array<OneD, NekDouble> tmp_gmat1(nqtot, 0.0);
600 Array<OneD, NekDouble> tmp_gmat2(nqtot, 0.0);
601 Array<OneD, NekDouble> tmp_gmat3(nqtot, 0.0);
602 Array<OneD, NekDouble> g0_edge(max(nquad0, nquad1), 0.0);
603 Array<OneD, NekDouble> g1_edge(max(nquad0, nquad1), 0.0);
604 Array<OneD, NekDouble> g2_edge(max(nquad0, nquad1), 0.0);
605 Array<OneD, NekDouble> g3_edge(max(nquad0, nquad1), 0.0);
606 Array<OneD, NekDouble> jac_edge(max(nquad0, nquad1), 0.0);
607
608 switch (edge)
609 {
610 case 0:
611 Vmath::Vmul(nqtot, &(df[1][0]), 1, &jac[0], 1,
612 &(tmp_gmat1[0]), 1);
613 Vmath::Vmul(nqtot, &(df[3][0]), 1, &jac[0], 1,
614 &(tmp_gmat3[0]), 1);
615 QuadExp::GetEdgeInterpVals(edge, tmp_gmat1, g1_edge);
616 QuadExp::GetEdgeInterpVals(edge, tmp_gmat3, g3_edge);
617
618 for (i = 0; i < nquad0; ++i)
619 {
620 outarray[i] = sqrt(g1_edge[i] * g1_edge[i] +
621 g3_edge[i] * g3_edge[i]);
622 }
623 break;
624
625 case 1:
626 Vmath::Vmul(nqtot, &(df[0][0]), 1, &jac[0], 1,
627 &(tmp_gmat0[0]), 1);
628 Vmath::Vmul(nqtot, &(df[2][0]), 1, &jac[0], 1,
629 &(tmp_gmat2[0]), 1);
630 QuadExp::GetEdgeInterpVals(edge, tmp_gmat0, g0_edge);
631 QuadExp::GetEdgeInterpVals(edge, tmp_gmat2, g2_edge);
632
633 for (i = 0; i < nquad1; ++i)
634 {
635 outarray[i] = sqrt(g0_edge[i] * g0_edge[i] +
636 g2_edge[i] * g2_edge[i]);
637 }
638
639 break;
640 case 2:
641
642 Vmath::Vmul(nqtot, &(df[1][0]), 1, &jac[0], 1,
643 &(tmp_gmat1[0]), 1);
644 Vmath::Vmul(nqtot, &(df[3][0]), 1, &jac[0], 1,
645 &(tmp_gmat3[0]), 1);
646 QuadExp::GetEdgeInterpVals(edge, tmp_gmat1, g1_edge);
647 QuadExp::GetEdgeInterpVals(edge, tmp_gmat3, g3_edge);
648
649 for (i = 0; i < nquad0; ++i)
650 {
651 outarray[i] = sqrt(g1_edge[i] * g1_edge[i] +
652 g3_edge[i] * g3_edge[i]);
653 }
654
655 Vmath::Reverse(nquad0, &outarray[0], 1, &outarray[0], 1);
656
657 break;
658 case 3:
659 Vmath::Vmul(nqtot, &(df[0][0]), 1, &jac[0], 1,
660 &(tmp_gmat0[0]), 1);
661 Vmath::Vmul(nqtot, &(df[2][0]), 1, &jac[0], 1,
662 &(tmp_gmat2[0]), 1);
663 QuadExp::GetEdgeInterpVals(edge, tmp_gmat0, g0_edge);
664 QuadExp::GetEdgeInterpVals(edge, tmp_gmat2, g2_edge);
665
666 for (i = 0; i < nquad1; ++i)
667 {
668 outarray[i] = sqrt(g0_edge[i] * g0_edge[i] +
669 g2_edge[i] * g2_edge[i]);
670 }
671
672 Vmath::Reverse(nquad1, &outarray[0], 1, &outarray[0], 1);
673
674 break;
675 default:
676 ASSERTL0(false, "edge value (< 3) is out of range");
677 break;
678 }
679 }
680 }
681 else
682 {
683
684 switch (edge)
685 {
686 case 0:
687
688 for (i = 0; i < nquad0; ++i)
689 {
690 outarray[i] = jac[0] * sqrt(df[1][0] * df[1][0] +
691 df[3][0] * df[3][0]);
692 }
693 break;
694 case 1:
695 for (i = 0; i < nquad1; ++i)
696 {
697 outarray[i] = jac[0] * sqrt(df[0][0] * df[0][0] +
698 df[2][0] * df[2][0]);
699 }
700 break;
701 case 2:
702 for (i = 0; i < nquad0; ++i)
703 {
704 outarray[i] = jac[0] * sqrt(df[1][0] * df[1][0] +
705 df[3][0] * df[3][0]);
706 }
707 break;
708 case 3:
709 for (i = 0; i < nquad1; ++i)
710 {
711 outarray[i] = jac[0] * sqrt(df[0][0] * df[0][0] +
712 df[2][0] * df[2][0]);
713 }
714 break;
715 default:
716 ASSERTL0(false, "edge value (< 3) is out of range");
717 break;
718 }
719 }
720}

References ASSERTL0, Nektar::SpatialDomains::eDeformed, Nektar::LibUtilities::eGaussGaussLegendre, GetEdgeInterpVals(), Nektar::StdRegions::StdExpansion::GetPointsKeys(), Nektar::StdRegions::StdExpansion::GetPointsType(), Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion::m_geomFactors, tinysimd::max(), Vmath::Reverse(), tinysimd::sqrt(), Vmath::Vcopy(), and Vmath::Vmul().

◆ v_HelmholtzMatrixOp()

void Nektar::LocalRegions::QuadExp::v_HelmholtzMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1189 of file QuadExp.cpp.

1192{
1193 QuadExp::HelmholtzMatrixOp_MatFree(inarray, outarray, mkey);
1194}
void HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)

References Nektar::StdRegions::StdExpansion::HelmholtzMatrixOp_MatFree().

◆ v_IProductWRTDerivBase()

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 176 of file QuadExp.cpp.

179{
180 ASSERTL1((dir == 0) || (dir == 1) || (dir == 2), "Invalid direction.");
181 ASSERTL1((dir == 2) ? (m_geom->GetCoordim() == 3) : true,
182 "Invalid direction.");
183
184 int nquad0 = m_base[0]->GetNumPoints();
185 int nquad1 = m_base[1]->GetNumPoints();
186 int nqtot = nquad0 * nquad1;
187
188 Array<OneD, NekDouble> tmp1(nqtot);
189 Array<OneD, NekDouble> tmp2(nqtot);
190 Array<OneD, NekDouble> tmp3(m_ncoeffs);
191
192 Array<OneD, Array<OneD, NekDouble>> tmp2D{2};
193 tmp2D[0] = tmp1;
194 tmp2D[1] = tmp2;
195
196 QuadExp::v_AlignVectorToCollapsedDir(dir, inarray, tmp2D);
197
198 const Array<OneD, const NekDouble> &jac = m_geomFactors->GetJac();
199 bool Deformed = (m_geomFactors->GetGtype() == SpatialDomains::eDeformed);
200
201 v_IProductWRTBaseKernel(m_base[0]->GetDbdata(), m_base[1]->GetBdata(), tmp1,
202 tmp3, jac, Deformed, false,
203 m_base[1]->Collocation());
204
205 v_IProductWRTBaseKernel(m_base[0]->GetBdata(), m_base[1]->GetDbdata(), tmp2,
206 outarray, jac, Deformed, m_base[0]->Collocation(),
207 false);
208
209 Vmath::Vadd(m_ncoeffs, tmp3, 1, outarray, 1, outarray, 1);
210}
void v_AlignVectorToCollapsedDir(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
Definition QuadExp.cpp:212
void v_IProductWRTBaseKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, NekDouble > &jac, const bool Deformed, const bool CollDir0=false, const bool CollDir1=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 ASSERTL1, Nektar::SpatialDomains::eDeformed, Nektar::SpatialDomains::Geometry::GetCoordim(), Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion::m_geom, Nektar::LocalRegions::Expansion::m_geomFactors, Nektar::StdRegions::StdExpansion::m_ncoeffs, v_AlignVectorToCollapsedDir(), Nektar::StdRegions::StdQuadExp::v_IProductWRTBaseKernel(), and Vmath::Vadd().

◆ v_LaplacianMatrixOp() [1/2]

void Nektar::LocalRegions::QuadExp::v_LaplacianMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1152 of file QuadExp.cpp.

1155{
1156 QuadExp::LaplacianMatrixOp_MatFree(inarray, outarray, mkey);
1157}
void LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)

References Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree().

◆ v_LaplacianMatrixOp() [2/2]

void Nektar::LocalRegions::QuadExp::v_LaplacianMatrixOp ( const int  k1,
const int  k2,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1159 of file QuadExp.cpp.

1163{
1164 StdExpansion::LaplacianMatrixOp_MatFree(k1, k2, inarray, outarray, mkey);
1165}

◆ v_LaplacianMatrixOp_MatFree_Kernel()

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1236 of file QuadExp.cpp.

1239{
1240 if (m_metrics.count(eMetricLaplacian00) == 0)
1241 {
1243 }
1244
1245 int nquad0 = m_base[0]->GetNumPoints();
1246 int nquad1 = m_base[1]->GetNumPoints();
1247 int nqtot = nquad0 * nquad1;
1248 int nmodes0 = m_base[0]->GetNumModes();
1249 int nmodes1 = m_base[1]->GetNumModes();
1250 int wspsize =
1251 max(max(max(nqtot, m_ncoeffs), nquad1 * nmodes0), nquad0 * nmodes1);
1252
1253 ASSERTL1(wsp.size() >= 3 * wspsize, "Workspace is of insufficient size.");
1254
1255 const Array<OneD, const NekDouble> &base0 = m_base[0]->GetBdata();
1256 const Array<OneD, const NekDouble> &base1 = m_base[1]->GetBdata();
1257 const Array<OneD, const NekDouble> &dbase0 = m_base[0]->GetDbdata();
1258 const Array<OneD, const NekDouble> &dbase1 = m_base[1]->GetDbdata();
1259 const Array<OneD, const NekDouble> &metric00 =
1261 const Array<OneD, const NekDouble> &metric01 =
1263 const Array<OneD, const NekDouble> &metric11 =
1265
1266 // Allocate temporary storage
1267 Array<OneD, NekDouble> wsp0(wsp);
1268 Array<OneD, NekDouble> wsp1(wsp + wspsize);
1269 Array<OneD, NekDouble> wsp2(wsp + 2 * wspsize);
1270
1271 PhysTensorDeriv(inarray, wsp1, wsp2);
1272
1273 // wsp0 = k = g0 * wsp1 + g1 * wsp2 = g0 * du_dxi1 + g1 * du_dxi2
1274 // wsp2 = l = g1 * wsp1 + g2 * wsp2 = g0 * du_dxi1 + g1 * du_dxi2
1275 // where g0, g1 and g2 are the metric terms set up in the GeomFactors class
1276 // especially for this purpose
1277 Vmath::Vvtvvtp(nqtot, &metric00[0], 1, &wsp1[0], 1, &metric01[0], 1,
1278 &wsp2[0], 1, &wsp0[0], 1);
1279 Vmath::Vvtvvtp(nqtot, &metric01[0], 1, &wsp1[0], 1, &metric11[0], 1,
1280 &wsp2[0], 1, &wsp2[0], 1);
1281
1282 // outarray = m = (D_xi1 * B)^T * k
1283 // wsp1 = n = (D_xi2 * B)^T * l
1284 const Array<OneD, const NekDouble> &jac = m_geomFactors->GetJac();
1285 bool Deformed = (m_geomFactors->GetGtype() == SpatialDomains::eDeformed);
1286
1287 v_IProductWRTBaseKernel(dbase0, base1, wsp0, outarray, jac, Deformed, false,
1288 m_base[1]->Collocation());
1289 v_IProductWRTBaseKernel(base0, dbase1, wsp2, wsp1, jac, Deformed,
1290 m_base[1]->Collocation(), false);
1291
1292 // outarray = outarray + wsp1
1293 // = L * u_hat
1294 Vmath::Vadd(m_ncoeffs, wsp1.data(), 1, outarray.data(), 1, outarray.data(),
1295 1);
1296}
void PhysTensorDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray_d0, Array< OneD, NekDouble > &outarray_d1)
Calculate the 2D derivative in the local tensor/collapsed coordinate at the physical points.
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 ASSERTL1, Nektar::LocalRegions::Expansion::ComputeLaplacianMetric(), Nektar::SpatialDomains::eDeformed, Nektar::LocalRegions::eMetricLaplacian00, Nektar::LocalRegions::eMetricLaplacian01, Nektar::LocalRegions::eMetricLaplacian11, Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion::m_geomFactors, Nektar::LocalRegions::Expansion::m_metrics, Nektar::StdRegions::StdExpansion::m_ncoeffs, tinysimd::max(), Nektar::StdRegions::StdExpansion2D::PhysTensorDeriv(), Nektar::StdRegions::StdQuadExp::v_IProductWRTBaseKernel(), Vmath::Vadd(), and Vmath::Vvtvvtp().

◆ v_MassLevelCurvatureMatrixOp()

void Nektar::LocalRegions::QuadExp::v_MassLevelCurvatureMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1182 of file QuadExp.cpp.

1185{
1186 StdExpansion::MassLevelCurvatureMatrixOp_MatFree(inarray, outarray, mkey);
1187}

◆ v_MassMatrixOp()

void Nektar::LocalRegions::QuadExp::v_MassMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1145 of file QuadExp.cpp.

1148{
1149 StdExpansion::MassMatrixOp_MatFree(inarray, outarray, mkey);
1150}

◆ v_NormVectorIProductWRTBase() [1/2]

void Nektar::LocalRegions::QuadExp::v_NormVectorIProductWRTBase ( const Array< OneD, const Array< OneD, NekDouble > > &  Fvec,
Array< OneD, NekDouble > &  outarray 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 270 of file QuadExp.cpp.

273{
274 NormVectorIProductWRTBase(Fvec[0], Fvec[1], Fvec[2], outarray);
275}
void NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, Array< OneD, NekDouble > &outarray)

References Nektar::StdRegions::StdExpansion::NormVectorIProductWRTBase().

◆ v_NormVectorIProductWRTBase() [2/2]

void Nektar::LocalRegions::QuadExp::v_NormVectorIProductWRTBase ( const Array< OneD, const NekDouble > &  Fx,
const Array< OneD, const NekDouble > &  Fy,
const Array< OneD, const NekDouble > &  Fz,
Array< OneD, NekDouble > &  outarray 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 242 of file QuadExp.cpp.

246{
247 int nq = m_base[0]->GetNumPoints() * m_base[1]->GetNumPoints();
248 Array<OneD, NekDouble> Fn(nq);
249
250 const Array<OneD, const Array<OneD, NekDouble>> &normals =
251 GetLeftAdjacentElementExp()->GetTraceNormal(
253
254 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
255 {
256 Vmath::Vvtvvtp(nq, &normals[0][0], 1, &Fx[0], 1, &normals[1][0], 1,
257 &Fy[0], 1, &Fn[0], 1);
258 Vmath::Vvtvp(nq, &normals[2][0], 1, &Fz[0], 1, &Fn[0], 1, &Fn[0], 1);
259 }
260 else
261 {
262 Vmath::Svtsvtp(nq, normals[0][0], &Fx[0], 1, normals[1][0], &Fy[0], 1,
263 &Fn[0], 1);
264 Vmath::Svtvp(nq, normals[2][0], &Fz[0], 1, &Fn[0], 1, &Fn[0], 1);
265 }
266
267 IProductWRTBase(Fn, outarray);
268}
ExpansionSharedPtr GetLeftAdjacentElementExp() const
Definition Expansion.h:531
int GetLeftAdjacentElementTrace() const
Definition Expansion.h:544
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 expa...
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

References Nektar::SpatialDomains::eDeformed, Nektar::LocalRegions::Expansion::GetLeftAdjacentElementExp(), Nektar::LocalRegions::Expansion::GetLeftAdjacentElementTrace(), Nektar::StdRegions::StdExpansion::IProductWRTBase(), Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion::m_geomFactors, Vmath::Svtsvtp(), Vmath::Svtvp(), Vmath::Vvtvp(), and Vmath::Vvtvvtp().

◆ v_PhysEvalFirstDeriv()

NekDouble Nektar::LocalRegions::QuadExp::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 317 of file QuadExp.cpp.

321{
322 Array<OneD, NekDouble> Lcoord(2);
323 ASSERTL0(m_geom, "m_geom not defined");
324 m_geom->GetLocCoords(coord, Lcoord);
325 return StdQuadExp::v_PhysEvalFirstDeriv(Lcoord, inarray, firstOrderDerivs);
326}
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_ReduceOrderCoeffs()

void Nektar::LocalRegions::QuadExp::v_ReduceOrderCoeffs ( int  numMin,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1196 of file QuadExp.cpp.

1199{
1200 int n_coeffs = inarray.size();
1201
1202 Array<OneD, NekDouble> coeff(n_coeffs);
1203 Array<OneD, NekDouble> coeff_tmp(n_coeffs, 0.0);
1204 Array<OneD, NekDouble> tmp, tmp2;
1205
1206 int nmodes0 = m_base[0]->GetNumModes();
1207 int nmodes1 = m_base[1]->GetNumModes();
1208 int numMax = nmodes0;
1209
1210 Vmath::Vcopy(n_coeffs, inarray, 1, coeff_tmp, 1);
1211
1212 const LibUtilities::PointsKey Pkey0(nmodes0,
1214 const LibUtilities::PointsKey Pkey1(nmodes1,
1216 LibUtilities::BasisKey b0(m_base[0]->GetBasisType(), nmodes0, Pkey0);
1217 LibUtilities::BasisKey b1(m_base[1]->GetBasisType(), nmodes1, Pkey1);
1218 LibUtilities::BasisKey bortho0(LibUtilities::eOrtho_A, nmodes0, Pkey0);
1219 LibUtilities::BasisKey bortho1(LibUtilities::eOrtho_A, nmodes1, Pkey1);
1220
1221 LibUtilities::InterpCoeff2D(b0, b1, coeff_tmp, bortho0, bortho1, coeff);
1222
1223 Vmath::Zero(n_coeffs, coeff_tmp, 1);
1224
1225 int cnt = 0;
1226 for (int i = 0; i < numMin + 1; ++i)
1227 {
1228 Vmath::Vcopy(numMin, tmp = coeff + cnt, 1, tmp2 = coeff_tmp + cnt, 1);
1229
1230 cnt = i * numMax;
1231 }
1232
1233 LibUtilities::InterpCoeff2D(bortho0, bortho1, coeff_tmp, b0, b1, outarray);
1234}
void InterpCoeff2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
@ eOrtho_A
Principle Orthogonal Functions .
Definition BasisType.h:42

References Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eOrtho_A, Nektar::StdRegions::StdExpansion::GetBasisType(), Nektar::LibUtilities::InterpCoeff2D(), Nektar::StdRegions::StdExpansion::m_base, Vmath::Vcopy(), and Vmath::Zero().

◆ v_SVVLaplacianFilter()

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1329 of file QuadExp.cpp.

1331{
1332 int nq = GetTotPoints();
1333
1334 // Calculate sqrt of the Jacobian
1335 Array<OneD, const NekDouble> jac = m_geomFactors->GetJac();
1336 Array<OneD, NekDouble> sqrt_jac(nq);
1337 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
1338 {
1339 Vmath::Vsqrt(nq, jac, 1, sqrt_jac, 1);
1340 }
1341 else
1342 {
1343 Vmath::Fill(nq, sqrt(jac[0]), sqrt_jac, 1);
1344 }
1345
1346 // Multiply array by sqrt(Jac)
1347 Vmath::Vmul(nq, sqrt_jac, 1, array, 1, array, 1);
1348
1349 // Apply std region filter
1350 StdQuadExp::v_SVVLaplacianFilter(array, mkey);
1351
1352 // Divide by sqrt(Jac)
1353 Vmath::Vdiv(nq, array, 1, sqrt_jac, 1, array, 1);
1354}
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().

◆ v_WeakDerivMatrixOp()

void Nektar::LocalRegions::QuadExp::v_WeakDerivMatrixOp ( const int  i,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1167 of file QuadExp.cpp.

1171{
1172 StdExpansion::WeakDerivMatrixOp_MatFree(i, inarray, outarray, mkey);
1173}

◆ v_WeakDirectionalDerivMatrixOp()

void Nektar::LocalRegions::QuadExp::v_WeakDirectionalDerivMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1175 of file QuadExp.cpp.

1178{
1179 StdExpansion::WeakDirectionalDerivMatrixOp_MatFree(inarray, outarray, mkey);
1180}

Member Data Documentation

◆ m_matrixManager

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

Definition at line 206 of file QuadExp.h.

Referenced by GetEdgeInterpVals(), v_DropLocMatrix(), and v_GetLocMatrix().

◆ m_staticCondMatrixManager

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