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

#include <SegExp.h>

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

Public Member Functions

 SegExp (const LibUtilities::BasisKey &Ba, SpatialDomains::Geometry1D *geom)
 Constructor using BasisKey class for quadrature points and order definition.
 
 SegExp (const SegExp &S)
 Copy Constructor.
 
 ~SegExp () override=default
 
- Public Member Functions inherited from Nektar::StdRegions::StdSegExp
 StdSegExp (const LibUtilities::BasisKey &Ba)
 Constructor using BasisKey class for quadrature points and order definition.
 
 StdSegExp (const StdSegExp &T)=default
 
 ~StdSegExp () override=default
 
- Public Member Functions inherited from Nektar::StdRegions::StdExpansion1D
 StdExpansion1D (int numcoeffs, const LibUtilities::BasisKey &Ba)
 
 StdExpansion1D ()=default
 
 StdExpansion1D (const StdExpansion1D &T)=default
 
 ~StdExpansion1D () override=default
 
NekDouble BaryTensorDeriv (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs)
 
NekDouble BaryTensorDeriv (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs, std::array< NekDouble, 6 > &secondOrderDerivs)
 
void IProductWRTBaseKernel (const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, const NekDouble > &jac, const bool Deformed)
 
- 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, const Array< OneD, const NekDouble > &Fz, Array< OneD, NekDouble > &outarray)
 
NekDouble Linf (const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &sol=NullNekDouble1DArray)
 Function to evaluate the discrete \( L_\infty\) error \( |\epsilon|_\infty = \max |u - u_{exact}|\) where \( u_{exact}\) is given by the array sol.
 
NekDouble L2 (const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &sol=NullNekDouble1DArray)
 Function to evaluate the discrete \( L_2\) error, \( | \epsilon |_{2} = \left [ \int^1_{-1} [u - u_{exact}]^2 dx \right]^{1/2} d\xi_1 \) where \( u_{exact}\) is given by the array sol.
 
NekDouble H1 (const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &sol=NullNekDouble1DArray)
 Function to evaluate the discrete \( H^1\) error, \( | \epsilon |^1_{2} = \left [ \int^1_{-1} [u - u_{exact}]^2 + \nabla(u - u_{exact})\cdot\nabla(u - u_{exact})\cdot dx \right]^{1/2} d\xi_1 \) where \( u_{exact}\) is given by the array sol.
 
const LibUtilities::PointsKeyVector GetPointsKeys () const
 
DNekMatSharedPtr BuildInverseTransformationMatrix (const DNekScalMatSharedPtr &m_transformationmatrix)
 
void PhysInterpToSimplexEquiSpaced (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, int npset=-1)
 This function performs an interpolation from the physical space points provided at input into an array of equispaced points which are not the collapsed coordinate. So for a tetrahedron you will only get a tetrahedral number of values.
 
void PhysInterpToGLL (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, int npset=-1)
 
void PhysInterpToPoints (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, int npset, MatrixType distrib)
 
void GetSimplexEquiSpacedConnectivity (Array< OneD, int > &conn, bool standard=true)
 This function provides the connectivity of local simplices (triangles or tets) to connect the equispaced data points provided by PhysInterpToSimplexEquiSpaced.
 
void EquiSpacedToCoeffs (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function performs a projection/interpolation from the equispaced points sometimes used in post-processing onto the coefficient space.
 
void EquiSpacedToPhys (const int nequi, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
template<class T >
std::shared_ptr< T > as ()
 
void GenStdMatBwdDeriv (const int dir, DNekMatSharedPtr &mat)
 
- Public Member Functions inherited from Nektar::LocalRegions::Expansion1D
 Expansion1D (SpatialDomains::Geometry1D *pGeom)
 
 ~Expansion1D () override=default
 
void AddNormTraceInt (const int dir, Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void AddHDGHelmholtzTraceTerms (const NekDouble tau, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
SpatialDomains::Geometry1DGetGeom1D () const
 
- 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_NormVectorIProductWRTBase (const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray) override
 
void v_NormVectorIProductWRTBase (const Array< OneD, const Array< OneD, NekDouble > > &Fvec, Array< OneD, NekDouble > &outarray) override
 
NekDouble v_PhysEvalFirstDeriv (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) override
 
NekDouble v_PhysEvalFirstSecondDeriv (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs, std::array< NekDouble, 6 > &secondOrderDerivs) override
 
void v_GetCoord (const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords) override
 
void v_GetCoords (Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
 
void v_GetVertexPhysVals (const int vertex, const Array< OneD, const NekDouble > &inarray, NekDouble &outarray) override
 
void v_GetTracePhysVals (const int edge, const StdRegions::StdExpansionSharedPtr &EdgeExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient) override
 
void v_GetTracePhysMap (const int vertex, Array< OneD, int > &map) override
 
StdRegions::StdExpansionSharedPtr v_GetStdExp (void) const override
 
StdRegions::StdExpansionSharedPtr v_GetLinStdExp (void) const override
 
void v_SetCoeffsToOrientation (StdRegions::Orientation dir, Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
int v_NumBndryCoeffs () const override
 
int v_NumDGBndryCoeffs () const override
 
void v_ComputeTraceNormal (const int vertex) 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
 Unpack data from input file assuming it comes from.
 
const Array< OneD, const NekDouble > & v_GetPhysNormals () 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_HelmholtzMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
DNekMatSharedPtr v_GenMatrix (const StdRegions::StdMatrixKey &mkey) override
 
DNekScalMatSharedPtr CreateMatrix (const MatrixKey &mkey)
 
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
 
- Protected Member Functions inherited from Nektar::StdRegions::StdSegExp
void v_StdPhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1=NullNekDouble1DArray, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray) override
 Evaluate the derivative \( d/d{\xi_1} \) at the physical quadrature points given by inarray and return in outarray.
 
void v_BwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 Backward transform from coefficient space given in inarray and evaluate at the physical quadrature points outarray.
 
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 > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, const NekDouble > &jac, const bool Deformed) 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
 
NekDouble v_PhysEvaluateBasis (const Array< OneD, const NekDouble > &coords, int mode) final
 
NekDouble v_PhysEvalFirstDeriv (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) override
 
NekDouble v_PhysEvalFirstSecondDeriv (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs, std::array< NekDouble, 6 > &secondOrderDerivs) 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_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_FillMode (const int mode, Array< OneD, NekDouble > &outarray) override
 
void v_GetCoords (Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2) 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
 
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 override
 
int v_NumDGBndryCoeffs () const override
 
bool v_IsBoundaryInteriorExpansion () const override
 
int v_CalcNumberOfCoefficients (const std::vector< unsigned int > &nummodes, int &modes_offset) override
 
LibUtilities::ShapeType v_DetShapeType () const override
 Return Shape of region, using ShapeType enum list. i.e. Segment.
 
DNekMatSharedPtr v_GenMatrix (const StdMatrixKey &mkey) override
 
DNekMatSharedPtr v_CreateStdMatrix (const StdMatrixKey &mkey) override
 
void v_GetSimplexEquiSpacedConnectivity (Array< OneD, int > &conn, bool standard=true) override
 
void v_ReduceOrderCoeffs (int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) 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_GetElmtTraceToTraceMap (const unsigned int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation edgeOrient, int P, int Q) override
 
void v_GetTraceToElementMap (const int tid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation edgeOrient, int P, int Q) override
 
- Protected Member Functions inherited from Nektar::StdRegions::StdExpansion1D
void PhysTensorDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 Evaluate the derivative \( d/d{\xi_1} \) at the physical quadrature points given by inarray and return in outarray.
 
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
 
void v_IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 Inner product of inarray over region with respect to the expansion basis (this)->m_base[0] and return in outarray.
 
void v_PhysInterp (std::shared_ptr< StdExpansion > fromExp, const Array< OneD, const NekDouble > &fromData, Array< OneD, NekDouble > &toData, bool Transpose) override
 
void v_MultiplyByStdQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) 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)
 
virtual void v_GenStdMatBwdDeriv (const int dir, DNekMatSharedPtr &mat)
 
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 const LibUtilities::BasisKey v_GetTraceBasisKey (const int i, const int k, bool UseGLL=false) const
 
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 void v_PhysDirectionalDeriv (const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &direction, Array< OneD, NekDouble > &outarray)
 Physical derivative along a direction vector.
 
virtual NekDouble v_PhysEvaluateInterp (const Array< OneD, DNekMatSharedPtr > &I, const Array< OneD, const NekDouble > &physvals)
 
virtual void v_GetTraceInteriorToElementMap (const int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation traceOrient=eForwards)
 
virtual void v_GetTraceNumModes (const int fid, int &numModes0, int &numModes1, Orientation traceOrient=eDir1FwdDir1_Dir2FwdDir2)
 
virtual void v_MassMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_WeakDerivMatrixOp (const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_WeakDirectionalDerivMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_MassLevelCurvatureMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_LinearAdvectionMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_LinearAdvectionDiffusionReactionMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey, bool addDiffusionTerm=true)
 
virtual void v_LaplacianMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_LaplacianMatrixOp_MatFree_Kernel (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
 
virtual void v_HelmholtzMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual DNekMatSharedPtr v_BuildInverseTransformationMatrix (const DNekScalMatSharedPtr &m_transformationmatrix)
 
- Protected Member Functions inherited from Nektar::LocalRegions::Expansion1D
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=NullNekDouble1DArray, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray) override
 Evaluate the derivative \( d/d{\xi_1} \) at the physical quadrature points given by inarray and return in outarray.
 
void v_IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 Inner product of inarray over region with respect to expansion basis base and return in outarray.
 
void v_AddRobinMassMatrix (const int vert, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat) override
 
void v_AddRobinTraceContribution (const int vert, const Array< OneD, const NekDouble > &primCoeffs, const Array< OneD, NekDouble > &incoeffs, Array< OneD, NekDouble > &coeffs) override
 
NekDouble v_VectorFlux (const Array< OneD, Array< OneD, NekDouble > > &vec) override
 
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 stabilisation and involves the product of the normal and geometric factors along the element trace.
 
void v_ReOrientTracePhysMap (const StdRegions::Orientation orient, Array< OneD, int > &idmap, const int nq0, const int nq1, bool Forwards) 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)
 
virtual void v_ComputeLaplacianMetric ()
 
int v_GetCoordim () const override
 
virtual DNekMatSharedPtr v_BuildTransformationMatrix (const DNekScalMatSharedPtr &r_bnd, const StdRegions::MatrixType matrixType)
 
virtual DNekMatSharedPtr v_BuildVertexMatrix (const DNekScalMatSharedPtr &r_bnd)
 
virtual void v_AddEdgeNormBoundaryInt (const int edge, const std::shared_ptr< Expansion > &EdgeExp, const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
 
virtual void v_AddEdgeNormBoundaryInt (const int edge, const std::shared_ptr< Expansion > &EdgeExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
 
virtual void v_AddFaceNormBoundaryInt (const int face, const std::shared_ptr< Expansion > &FaceExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
 
virtual void v_DGDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, Array< OneD, NekDouble > > &coeffs, Array< OneD, NekDouble > &outarray)
 
virtual void v_AlignVectorToCollapsedDir (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
 
virtual StdRegions::Orientation v_GetTraceOrient (int trace)
 
virtual void v_GetTraceQFactors (const int trace, Array< OneD, NekDouble > &outarray)
 
virtual void v_GetLocTracePhysVals (const int trace, const StdRegions::StdExpansionSharedPtr &TraceExp, const NekDouble *inarray, Array< OneD, NekDouble > &outarray)
 
virtual 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)
 
virtual void v_SetPhysNormals (Array< OneD, const NekDouble > &normal)
 
virtual void v_SetUpPhysNormals (const int id)
 
virtual void v_GenTraceExp (const int traceid, ExpansionSharedPtr &exp)
 

Private Member Functions

void ReverseCoeffsAndSign (const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 Reverse the coefficients in a boundary interior expansion this routine is of use when we need the segment coefficients corresponding to a expansion in the reverse coordinate direction.
 
void MultiplyByElmtInvMass (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 

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::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

Defines a Segment local expansion.

Definition at line 49 of file SegExp.h.

Constructor & Destructor Documentation

◆ SegExp() [1/2]

Nektar::LocalRegions::SegExp::SegExp ( const LibUtilities::BasisKey Ba,
SpatialDomains::Geometry1D geom 
)

Constructor using BasisKey class for quadrature points and order definition.

Parameters
BaBasis key of segment expansion.
geomDescription of geometry.

Definition at line 55 of file SegExp.cpp.

57 : StdExpansion(Ba.GetNumModes(), 1, Ba),
58 StdExpansion1D(Ba.GetNumModes(), Ba), StdRegions::StdSegExp(Ba),
59 Expansion(geom), Expansion1D(geom),
61 std::bind(&SegExp::CreateMatrix, this, std::placeholders::_1)),
63 this, std::placeholders::_1))
64{
65}
Expansion1D(SpatialDomains::Geometry1D *pGeom)
Definition Expansion1D.h:58
Expansion(SpatialDomains::Geometry *pGeom)
Definition Expansion.cpp:43
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
Definition SegExp.cpp:752
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition SegExp.h:195
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition SegExp.h:193
StdExpansion()
Default Constructor.

◆ SegExp() [2/2]

Nektar::LocalRegions::SegExp::SegExp ( const SegExp S)

Copy Constructor.

Parameters
SExisting segment to duplicate.

Definition at line 71 of file SegExp.cpp.

72 : StdExpansion(S), StdExpansion1D(S), StdRegions::StdSegExp(S),
73 Expansion(S), Expansion1D(S), m_matrixManager(S.m_matrixManager),
74 m_staticCondMatrixManager(S.m_staticCondMatrixManager)
75{
76}

◆ ~SegExp()

Nektar::LocalRegions::SegExp::~SegExp ( )
overridedefault

Member Function Documentation

◆ CreateMatrix()

DNekScalMatSharedPtr Nektar::LocalRegions::SegExp::CreateMatrix ( const MatrixKey mkey)
protected

Definition at line 752 of file SegExp.cpp.

753{
754 DNekScalMatSharedPtr returnval;
755 NekDouble fac;
757
759 "Geometric information is not set up");
760
761 switch (mkey.GetMatrixType())
762 {
764 {
765 if ((m_geomFactors->GetGtype() == SpatialDomains::eDeformed) ||
766 (mkey.GetNVarCoeff()))
767 {
768 fac = 1.0;
769 goto UseLocRegionsMatrix;
770 }
771 else
772 {
773 fac = (m_geomFactors->GetJac())[0];
774 goto UseStdRegionsMatrix;
775 }
776 }
777 break;
779 {
780 if ((m_geomFactors->GetGtype() == SpatialDomains::eDeformed) ||
781 (mkey.GetNVarCoeff()))
782 {
783 NekDouble one = 1.0;
784 StdRegions::StdMatrixKey masskey(StdRegions::eMass,
785 DetShapeType(), *this);
786 DNekMatSharedPtr mat = GenMatrix(masskey);
787 mat->Invert();
788
789 returnval =
791 }
792 else
793 {
794 fac = 1.0 / (m_geomFactors->GetJac())[0];
795 goto UseStdRegionsMatrix;
796 }
797 }
798 break;
802 {
803 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed ||
804 mkey.GetNVarCoeff())
805 {
806 fac = 1.0;
807 goto UseLocRegionsMatrix;
808 }
809 else
810 {
811 int dir = 0;
812 switch (mkey.GetMatrixType())
813 {
815 dir = 0;
816 break;
818 ASSERTL1(m_geom->GetCoordim() >= 2,
819 "Cannot call eWeakDeriv2 in a "
820 "coordinate system which is not at "
821 "least two-dimensional");
822 dir = 1;
823 break;
825 ASSERTL1(m_geom->GetCoordim() == 3,
826 "Cannot call eWeakDeriv2 in a "
827 "coordinate system which is not "
828 "three-dimensional");
829 dir = 2;
830 break;
831 default:
832 break;
833 }
834
835 MatrixKey deriv0key(StdRegions::eWeakDeriv0,
836 mkey.GetShapeType(), *this);
837
838 DNekMatSharedPtr WeakDerivStd = GetStdMatrix(deriv0key);
839 fac = m_geomFactors->GetDerivFactors()[dir][0] *
840 m_geomFactors->GetJac()[0];
841
843 fac, WeakDerivStd);
844 }
845 }
846 break;
848 {
849 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
850 {
851 fac = 1.0;
852 goto UseLocRegionsMatrix;
853 }
854 else
855 {
856 int coordim = m_geom->GetCoordim();
857 fac = 0.0;
858 for (int i = 0; i < coordim; ++i)
859 {
860 fac += m_geomFactors->GetDerivFactors()[i][0] *
861 m_geomFactors->GetDerivFactors()[i][0];
862 }
863 fac *= m_geomFactors->GetJac()[0];
864 goto UseStdRegionsMatrix;
865 }
866 }
867 break;
869 {
870 if ((m_geomFactors->GetGtype() == SpatialDomains::eDeformed) ||
871 (mkey.GetNVarCoeff()))
872 {
873 fac = 1.0;
874 goto UseLocRegionsMatrix;
875 }
876 else
877 {
878 fac = (m_geomFactors->GetJac())[0];
879 goto UseStdRegionsMatrix;
880 }
881 }
882 break;
884 {
885 NekDouble factor = mkey.GetConstFactor(StdRegions::eFactorLambda);
886 MatrixKey masskey(StdRegions::eMass, mkey.GetShapeType(), *this);
887 DNekScalMat &MassMat = *(this->m_matrixManager[masskey]);
888 MatrixKey lapkey(StdRegions::eLaplacian, mkey.GetShapeType(), *this,
889 mkey.GetConstFactors(), mkey.GetVarCoeffs());
890 DNekScalMat &LapMat = *(this->m_matrixManager[lapkey]);
891
892 int rows = LapMat.GetRows();
893 int cols = LapMat.GetColumns();
894
895 DNekMatSharedPtr helm =
897
898 NekDouble one = 1.0;
899 (*helm) = LapMat + factor * MassMat;
900
901 returnval =
903 }
904 break;
906 {
907 NekDouble lambda = mkey.GetConstFactor(StdRegions::eFactorLambda);
908
909 // Construct mass matrix
910 // Check for mass-specific varcoeffs to avoid unncessary
911 // re-computation of the elemental matrix every time step
913 if (mkey.HasVarCoeff(StdRegions::eVarCoeffMass))
914 {
915 massVarcoeffs[StdRegions::eVarCoeffMass] =
916 mkey.GetVarCoeff(StdRegions::eVarCoeffMass);
917 }
918 MatrixKey masskey(StdRegions::eMass, mkey.GetShapeType(), *this,
919 mkey.GetConstFactors(), massVarcoeffs);
920 DNekScalMat &MassMat = *GetLocMatrix(masskey);
921
922 // Construct advection matrix
923 // Check for varcoeffs not required;
924 // assume advection velocity is always time-dependent
925 MatrixKey advkey(mkey, StdRegions::eLinearAdvection);
926 DNekScalMat &AdvMat = *GetLocMatrix(advkey);
927
928 int rows = MassMat.GetRows();
929 int cols = MassMat.GetColumns();
930
931 DNekMatSharedPtr adr =
933
934 NekDouble one = 1.0;
935 (*adr) = -lambda * MassMat + AdvMat;
936
938
939 // Clear memory for time-dependent matrices
940 DropLocMatrix(advkey);
941 if (!massVarcoeffs.empty())
942 {
943 DropLocMatrix(masskey);
944 }
945 }
946 break;
948 {
949 NekDouble lambda = mkey.GetConstFactor(StdRegions::eFactorLambda);
950
951 // Construct mass matrix
952 // Check for mass-specific varcoeffs to avoid unncessary
953 // re-computation of the elemental matrix every time step
955 if (mkey.HasVarCoeff(StdRegions::eVarCoeffMass))
956 {
957 massVarcoeffs[StdRegions::eVarCoeffMass] =
958 mkey.GetVarCoeff(StdRegions::eVarCoeffMass);
959 }
960 MatrixKey masskey(StdRegions::eMass, mkey.GetShapeType(), *this,
961 mkey.GetConstFactors(), massVarcoeffs);
962 DNekScalMat &MassMat = *GetLocMatrix(masskey);
963
964 // Construct laplacian matrix (Check for varcoeffs)
965 // Take all varcoeffs if one or more are detected
966 // TODO We might want to have a map
967 // from MatrixType to Vector of Varcoeffs and vice-versa
969 if ((mkey.HasVarCoeff(StdRegions::eVarCoeffLaplacian)) ||
970 (mkey.HasVarCoeff(StdRegions::eVarCoeffD00)) ||
971 (mkey.HasVarCoeff(StdRegions::eVarCoeffD01)) ||
972 (mkey.HasVarCoeff(StdRegions::eVarCoeffD10)) ||
973 (mkey.HasVarCoeff(StdRegions::eVarCoeffD02)) ||
974 (mkey.HasVarCoeff(StdRegions::eVarCoeffD20)) ||
975 (mkey.HasVarCoeff(StdRegions::eVarCoeffD11)) ||
976 (mkey.HasVarCoeff(StdRegions::eVarCoeffD12)) ||
977 (mkey.HasVarCoeff(StdRegions::eVarCoeffD21)) ||
978 (mkey.HasVarCoeff(StdRegions::eVarCoeffD22)))
979 {
980 lapVarcoeffs = mkey.GetVarCoeffs();
981 }
982 MatrixKey lapkey(StdRegions::eLaplacian, mkey.GetShapeType(), *this,
983 mkey.GetConstFactors(), lapVarcoeffs);
984 DNekScalMat &LapMat = *GetLocMatrix(lapkey);
985
986 // Construct advection matrix
987 // Check for varcoeffs not required;
988 // assume advection velocity is always time-dependent
989 MatrixKey advkey(mkey, StdRegions::eLinearAdvection);
990 DNekScalMat &AdvMat = *GetLocMatrix(advkey);
991
992 int rows = LapMat.GetRows();
993 int cols = LapMat.GetColumns();
994
995 DNekMatSharedPtr adr =
997
998 NekDouble one = 1.0;
999 (*adr) = LapMat - lambda * MassMat + AdvMat;
1000
1002
1003 // Clear memory for time-dependent matrices
1004 DropLocMatrix(advkey);
1005 if (!massVarcoeffs.empty())
1006 {
1007 DropLocMatrix(masskey);
1008 }
1009 if (!lapVarcoeffs.empty())
1010 {
1011 DropLocMatrix(lapkey);
1012 }
1013 }
1014 break;
1019 {
1020 NekDouble one = 1.0;
1021
1022 DNekMatSharedPtr mat = GenMatrix(mkey);
1024 }
1025 break;
1027 {
1028 NekDouble one = 1.0;
1029
1030 // StdRegions::StdMatrixKey
1031 // hkey(StdRegions::eHybridDGHelmholtz,
1032 // DetShapeType(),*this,
1033 // mkey.GetConstant(0),
1034 // mkey.GetConstant(1));
1036 *this, mkey.GetConstFactors(), mkey.GetVarCoeffs());
1037 DNekMatSharedPtr mat = GenMatrix(hkey);
1038
1039 mat->Invert();
1041 }
1042 break;
1044 {
1045 DNekMatSharedPtr m_Ix;
1046 Array<OneD, NekDouble> coords(1, 0.0);
1047 StdRegions::ConstFactorMap factors = mkey.GetConstFactors();
1048 int vertex = (int)factors[StdRegions::eFactorGaussVertex];
1049
1050 coords[0] = (vertex == 0) ? -1.0 : 1.0;
1051
1052 m_Ix = m_base[0]->GetI(coords);
1053 returnval =
1055 }
1056 break;
1057
1058 UseLocRegionsMatrix:
1059 {
1060 DNekMatSharedPtr mat = GenMatrix(mkey);
1062 }
1063 break;
1064 UseStdRegionsMatrix:
1065 {
1066 DNekMatSharedPtr mat = GetStdMatrix(mkey);
1068 }
1069 break;
1070 default:
1071 {
1072 NekDouble one = 1.0;
1073 DNekMatSharedPtr mat = GenMatrix(mkey);
1074
1076 }
1077 break;
1078 }
1079
1080 return returnval;
1081}
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed to...
void DropLocMatrix(const LocalRegions::MatrixKey &mkey)
Definition Expansion.cpp:94
SpatialDomains::Geometry * m_geom
Definition Expansion.h:306
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
Definition Expansion.cpp:88
SpatialDomains::GeomFactorsUniquePtr m_geomFactors
Definition Expansion.h:307
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
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
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
const LibUtilities::PointsKeyVector GetPointsKeys() const
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
DNekMatSharedPtr GenMatrix(const StdMatrixKey &mkey)
Array< OneD, LibUtilities::BasisSharedPtr > m_base
std::vector< PointsKey > PointsKeyVector
Definition Points.h:313
@ eNoGeomType
No type defined.
@ eDeformed
Geometry is curved or has non-constant factors.
std::map< ConstFactorType, NekDouble > ConstFactorMap
static VarCoeffMap NullVarCoeffMap
std::map< StdRegions::VarCoeffType, VarCoeffEntry > VarCoeffMap
StdRegions::ConstFactorMap factors
NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag > DNekScalMat
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekMat > DNekMatSharedPtr

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL1, ASSERTL2, Nektar::StdRegions::StdExpansion::DetShapeType(), Nektar::LocalRegions::Expansion::DropLocMatrix(), Nektar::SpatialDomains::eDeformed, Nektar::StdRegions::eFactorGaussVertex, Nektar::StdRegions::eFactorLambda, Nektar::StdRegions::eHelmholtz, Nektar::StdRegions::eHybridDGHelmBndLam, Nektar::StdRegions::eHybridDGHelmholtz, Nektar::StdRegions::eHybridDGLamToQ0, Nektar::StdRegions::eHybridDGLamToU, Nektar::StdRegions::eInterpGauss, Nektar::StdRegions::eInvHybridDGHelmholtz, Nektar::StdRegions::eInvMass, Nektar::StdRegions::eLaplacian, Nektar::StdRegions::eLinearAdvection, Nektar::StdRegions::eLinearAdvectionDiffusionReaction, Nektar::StdRegions::eLinearAdvectionReaction, Nektar::StdRegions::eMass, Nektar::SpatialDomains::eNoGeomType, Nektar::StdRegions::eVarCoeffD00, Nektar::StdRegions::eVarCoeffD01, Nektar::StdRegions::eVarCoeffD02, Nektar::StdRegions::eVarCoeffD10, Nektar::StdRegions::eVarCoeffD11, Nektar::StdRegions::eVarCoeffD12, Nektar::StdRegions::eVarCoeffD20, Nektar::StdRegions::eVarCoeffD21, Nektar::StdRegions::eVarCoeffD22, Nektar::StdRegions::eVarCoeffLaplacian, Nektar::StdRegions::eVarCoeffMass, Nektar::StdRegions::eWeakDeriv0, Nektar::StdRegions::eWeakDeriv1, Nektar::StdRegions::eWeakDeriv2, Nektar::StdRegions::StdExpansion::GenMatrix(), Nektar::StdRegions::StdMatrixKey::GetConstFactor(), Nektar::StdRegions::StdMatrixKey::GetConstFactors(), Nektar::SpatialDomains::Geometry::GetCoordim(), Nektar::LocalRegions::Expansion::GetLocMatrix(), Nektar::StdRegions::StdMatrixKey::GetMatrixType(), Nektar::StdRegions::StdMatrixKey::GetNVarCoeff(), Nektar::StdRegions::StdExpansion::GetPointsKeys(), Nektar::StdRegions::StdMatrixKey::GetShapeType(), Nektar::StdRegions::StdExpansion::GetStdMatrix(), Nektar::StdRegions::StdMatrixKey::GetVarCoeff(), Nektar::StdRegions::StdMatrixKey::GetVarCoeffs(), Nektar::StdRegions::StdMatrixKey::HasVarCoeff(), Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion::m_geom, Nektar::LocalRegions::Expansion::m_geomFactors, m_matrixManager, and Nektar::StdRegions::NullVarCoeffMap.

◆ MultiplyByElmtInvMass()

void Nektar::LocalRegions::SegExp::MultiplyByElmtInvMass ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
private
Todo:
Same method exists in ExpList and everyone references ExpList::MultiplyByElmtInvMass. Remove this one?

Definition at line 1154 of file SegExp.cpp.

1156{
1157 // get Mass matrix inverse
1158 MatrixKey masskey(StdRegions::eInvMass, DetShapeType(), *this);
1159 DNekScalMatSharedPtr matsys = m_matrixManager[masskey];
1160
1161 NekVector<NekDouble> in(m_ncoeffs, inarray, eCopy);
1162 NekVector<NekDouble> out(m_ncoeffs, outarray, eWrapper);
1163
1164 out = (*matsys) * in;
1165}

References Nektar::StdRegions::StdExpansion::DetShapeType(), Nektar::eCopy, Nektar::StdRegions::eInvMass, Nektar::eWrapper, m_matrixManager, and Nektar::StdRegions::StdExpansion::m_ncoeffs.

◆ ReverseCoeffsAndSign()

void Nektar::LocalRegions::SegExp::ReverseCoeffsAndSign ( const Array< OneD, NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
private

Reverse the coefficients in a boundary interior expansion this routine is of use when we need the segment coefficients corresponding to a expansion in the reverse coordinate direction.

Definition at line 1113 of file SegExp.cpp.

1115{
1116
1117 int m;
1118 NekDouble sgn = 1;
1119
1120 ASSERTL1(&inarray[0] != &outarray[0],
1121 "inarray and outarray can not be the same");
1122 switch (GetBasisType(0))
1123 {
1125 // Swap vertices
1126 outarray[0] = inarray[1];
1127 outarray[1] = inarray[0];
1128 // negate odd modes
1129 for (m = 2; m < m_ncoeffs; ++m)
1130 {
1131 outarray[m] = sgn * inarray[m];
1132 sgn = -sgn;
1133 }
1134 break;
1137 for (m = 0; m < m_ncoeffs; ++m)
1138 {
1139 outarray[m_ncoeffs - 1 - m] = inarray[m];
1140 }
1141 break;
1142 default:
1143 ASSERTL0(false, "This basis is not allowed in this method");
1144 break;
1145 }
1146}
#define ASSERTL0(condition, msg)
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
@ 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

References ASSERTL0, ASSERTL1, Nektar::LibUtilities::eGauss_Lagrange, Nektar::LibUtilities::eGLL_Lagrange, Nektar::LibUtilities::eModified_A, Nektar::StdRegions::StdExpansion::GetBasisType(), and Nektar::StdRegions::StdExpansion::m_ncoeffs.

Referenced by v_SetCoeffsToOrientation().

◆ v_ComputeTraceNormal()

void Nektar::LocalRegions::SegExp::v_ComputeTraceNormal ( const int  vertex)
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 454 of file SegExp.cpp.

455{
456 int i;
457 SpatialDomains::GeomType type = m_geomFactors->GetGtype();
458 const Array<TwoD, const NekDouble> &gmat = m_geomFactors->GetDerivFactors();
459 int nqe = 1;
460 int vCoordDim = GetCoordim();
461
462 m_traceNormals[vertex] = Array<OneD, Array<OneD, NekDouble>>(vCoordDim);
463 Array<OneD, Array<OneD, NekDouble>> &normal = m_traceNormals[vertex];
464 for (i = 0; i < vCoordDim; ++i)
465 {
466 normal[i] = Array<OneD, NekDouble>(nqe);
467 }
468
469 size_t nqb = nqe;
470 size_t nbnd = vertex;
471 m_elmtBndNormDirElmtLen[nbnd] = Array<OneD, NekDouble>{nqb, 0.0};
472 Array<OneD, NekDouble> &length = m_elmtBndNormDirElmtLen[nbnd];
473
474 // Regular geometry case
475 if ((type == SpatialDomains::eRegular) ||
477 {
478 NekDouble vert;
479 // Set up normals
480 switch (vertex)
481 {
482 case 0:
483 for (i = 0; i < vCoordDim; ++i)
484 {
485 Vmath::Fill(nqe, -gmat[i][0], normal[i], 1);
486 }
487 break;
488 case 1:
489 for (i = 0; i < vCoordDim; ++i)
490 {
491 Vmath::Fill(nqe, gmat[i][0], normal[i], 1);
492 }
493 break;
494 default:
495 ASSERTL0(false, "point is out of range (point < 2)");
496 }
497
498 // normalise
499 vert = 0.0;
500 for (i = 0; i < vCoordDim; ++i)
501 {
502 vert += normal[i][0] * normal[i][0];
503 }
504 vert = 1.0 / sqrt(vert);
505
506 Vmath::Fill(nqb, vert, length, 1);
507
508 for (i = 0; i < vCoordDim; ++i)
509 {
510 Vmath::Smul(nqe, vert, normal[i], 1, normal[i], 1);
511 }
512 }
513}
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
GeomType
Indicates the type of element geometry.
@ eRegular
Geometry is straight-sided with constant geometric factors.
@ eMovingRegular
Currently unused.
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
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition Vmath.hpp:54
scalarT< T > sqrt(scalarT< T > in)
Definition scalar.hpp:290

References ASSERTL0, Nektar::SpatialDomains::eMovingRegular, Nektar::SpatialDomains::eRegular, Vmath::Fill(), Nektar::StdRegions::StdExpansion::GetCoordim(), Nektar::LocalRegions::Expansion::m_elmtBndNormDirElmtLen, Nektar::LocalRegions::Expansion::m_geomFactors, Nektar::LocalRegions::Expansion::m_traceNormals, Vmath::Smul(), and tinysimd::sqrt().

◆ v_CreateStdMatrix()

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 743 of file SegExp.cpp.

744{
745 LibUtilities::BasisKey bkey = m_base[0]->GetBasisKey();
748
749 return tmp->GetStdMatrix(mkey);
750}
std::shared_ptr< StdSegExp > StdSegExpSharedPtr
Definition StdSegExp.h:182

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

◆ v_DropLocMatrix()

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

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 738 of file SegExp.cpp.

739{
740 m_matrixManager.DeleteObject(mkey);
741}

References m_matrixManager.

◆ v_DropLocStaticCondMatrix()

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 728 of file SegExp.cpp.

729{
730 m_staticCondMatrixManager.DeleteObject(mkey);
731}

References m_staticCondMatrixManager.

◆ v_ExtractDataToCoeffs()

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

Unpack data from input file assuming it comes from.

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 412 of file SegExp.cpp.

416{
417 switch (m_base[0]->GetBasisType())
418 {
420 {
421 int fillorder = min((int)nummodes[mode_offset], m_ncoeffs);
422
423 Vmath::Zero(m_ncoeffs, coeffs, 1);
424 Vmath::Vcopy(fillorder, &data[0], 1, &coeffs[0], 1);
425 }
426 break;
428 {
429 // Assume that input is also Gll_Lagrange
430 // but no way to check;
431 LibUtilities::PointsKey f0(nummodes[mode_offset],
433 LibUtilities::PointsKey t0(m_base[0]->GetNumModes(),
435 LibUtilities::Interp1D(f0, data, t0, coeffs);
436 }
437 break;
439 {
440 // Assume that input is also Gauss_Lagrange
441 // but no way to check;
442 LibUtilities::PointsKey f0(nummodes[mode_offset],
444 LibUtilities::PointsKey t0(m_base[0]->GetNumModes(),
446 LibUtilities::Interp1D(f0, data, t0, coeffs);
447 }
448 break;
449 default:
450 ASSERTL0(false, "basis is either not set up or not hierarchicial");
451 }
452}
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
@ eGaussLobattoLegendre
1D Gauss-Lobatto-Legendre quadrature points
Definition PointsType.h:51
@ eGaussGaussLegendre
1D Gauss-Gauss-Legendre quadrature points
Definition PointsType.h:46
void Zero(int n, T *x, const int incx)
Zero vector.
Definition Vmath.hpp:273
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition Vmath.hpp:825
scalarT< T > min(scalarT< T > lhs, scalarT< T > rhs)
Definition scalar.hpp:300

References ASSERTL0, Nektar::LibUtilities::eGauss_Lagrange, Nektar::LibUtilities::eGaussGaussLegendre, Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eGLL_Lagrange, Nektar::LibUtilities::eModified_A, Nektar::StdRegions::StdExpansion::GetBasisType(), Nektar::LibUtilities::Interp1D(), Nektar::StdRegions::StdExpansion::m_base, Nektar::StdRegions::StdExpansion::m_ncoeffs, tinysimd::min(), Vmath::Vcopy(), and Vmath::Zero().

◆ v_FwdTransBndConstrained()

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 81 of file SegExp.cpp.

84{
85 if (m_base[0]->Collocation())
86 {
87 Vmath::Vcopy(m_ncoeffs, inarray, 1, outarray, 1);
88 }
89 else
90 {
91 int nInteriorDofs = m_ncoeffs - 2;
92 int offset = 0;
93 bool hasEndPoints = true;
94 bool hasEndModes = true;
95
96 switch (m_base[0]->GetBasisType())
97 {
99 {
100 nInteriorDofs = m_ncoeffs - 2;
101 offset = 1;
102 hasEndModes = true;
103 }
104 break;
107 {
108 nInteriorDofs = m_ncoeffs;
109 offset = 0;
110 hasEndModes = false;
111 }
112 break;
115 {
116 nInteriorDofs = m_ncoeffs - 2;
117 offset = 2;
118 hasEndModes = true;
119 }
120 break;
121 default:
122 ASSERTL0(false, "This type of FwdTrans is not defined"
123 "for this expansion type");
124 }
125
126 switch (m_base[0]->GetPointsType())
127 {
130 case LibUtilities::eGaussKronrodLegendre:
131 {
132 hasEndPoints = false;
133 }
134 break;
141 {
142 hasEndPoints = true;
143 }
144 break;
145 default:
146 ASSERTL0(false, "FwdTransBndConstrained cannot be used "
147 "with this point type");
148 }
149
150 fill(outarray.data(), outarray.data() + m_ncoeffs, 0.0);
151
152 if (hasEndPoints && hasEndModes)
153 {
154
155 outarray[GetVertexMap(0)] = inarray[0];
156 outarray[GetVertexMap(1)] = inarray[m_base[0]->GetNumPoints() - 1];
157
158 if (m_ncoeffs > 2)
159 {
160 // ideally, we would like to have tmp0 to be replaced
161 // by outarray (currently MassMatrixOp does not allow
162 // aliasing)
163 Array<OneD, NekDouble> tmp0(m_ncoeffs);
164 Array<OneD, NekDouble> tmp1(m_ncoeffs);
165
166 StdRegions::StdMatrixKey stdmasskey(StdRegions::eMass,
167 DetShapeType(), *this);
168 MassMatrixOp(outarray, tmp0, stdmasskey);
169 v_IProductWRTBase(inarray, tmp1);
170
171 Vmath::Vsub(m_ncoeffs, tmp1, 1, tmp0, 1, tmp1, 1);
172
173 // get Mass matrix inverse (only of interior DOF)
174 MatrixKey masskey(StdRegions::eMass, DetShapeType(), *this);
175 DNekScalMatSharedPtr matsys =
176 (m_staticCondMatrixManager[masskey])->GetBlock(1, 1);
177
178 Blas::Dgemv('N', nInteriorDofs, nInteriorDofs, matsys->Scale(),
179 &((matsys->GetOwnedMatrix())->GetPtr())[0],
180 nInteriorDofs, tmp1.data() + offset, 1, 0.0,
181 outarray.data() + offset, 1);
182 }
183 }
184 else
185 {
186 v_FwdTrans(inarray, outarray);
187 }
188 }
189}
void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
Inner product of inarray over region with respect to expansion basis base and return in outarray.
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 coeffic...
void MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
int GetVertexMap(const int localVertexId, bool useCoeffPacking=false)
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
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
@ eGaussLegendreWithMP
1D Gauss-Legendre quadrature points with additional x=-1 and x=1 end points
Definition PointsType.h:95
@ eGaussLobattoChebyshev
1D Gauss-Lobatto-Legendre quadrature points
Definition PointsType.h:57
@ eFourierEvenlySpaced
1D Evenly-spaced points using Fourier Fit
Definition PointsType.h:74
@ eGaussGaussChebyshev
1D Gauss-Gauss-Chebyshev quadrature points
Definition PointsType.h:52
@ ePolyEvenlySpaced
1D Evenly-spaced points using Lagrange polynomial
Definition PointsType.h:73
@ eGaussLobattoKronrodLegendre
1D Lobatto Kronrod quadrature points
Definition PointsType.h:72
@ eModified_B
Principle Modified Functions .
Definition BasisType.h:49
@ eOrtho_A
Principle Orthogonal Functions .
Definition BasisType.h:42
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 ASSERTL0, Nektar::StdRegions::StdExpansion::DetShapeType(), Blas::Dgemv(), Nektar::LibUtilities::eFourierEvenlySpaced, Nektar::LibUtilities::eGauss_Lagrange, Nektar::LibUtilities::eGaussGaussChebyshev, Nektar::LibUtilities::eGaussGaussLegendre, Nektar::LibUtilities::eGaussLegendreWithMP, Nektar::LibUtilities::eGaussLobattoChebyshev, Nektar::LibUtilities::eGaussLobattoKronrodLegendre, Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eGLL_Lagrange, Nektar::StdRegions::eMass, Nektar::LibUtilities::eModified_A, Nektar::LibUtilities::eModified_B, Nektar::LibUtilities::eOrtho_A, Nektar::LibUtilities::ePolyEvenlySpaced, Nektar::StdRegions::StdExpansion::GetBasisType(), Nektar::StdRegions::StdExpansion::GetPointsType(), Nektar::StdRegions::StdExpansion::GetVertexMap(), Nektar::StdRegions::StdExpansion::m_base, Nektar::StdRegions::StdExpansion::m_ncoeffs, m_staticCondMatrixManager, Nektar::StdRegions::StdExpansion::MassMatrixOp(), Nektar::LocalRegions::Expansion::v_FwdTrans(), Nektar::LocalRegions::Expansion1D::v_IProductWRTBase(), Vmath::Vcopy(), and Vmath::Vsub().

◆ v_GenMatrix()

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1083 of file SegExp.cpp.

1084{
1085 DNekMatSharedPtr returnval;
1086
1087 switch (mkey.GetMatrixType())
1088 {
1095 returnval = Expansion1D::v_GenMatrix(mkey);
1096 break;
1097 default:
1098 returnval = StdSegExp::v_GenMatrix(mkey);
1099 break;
1100 }
1101
1102 return returnval;
1103}
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override

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

◆ v_GetCoord()

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 275 of file SegExp.cpp.

277{
278 int i;
279
280 ASSERTL1(Lcoords[0] >= -1.0 && Lcoords[0] <= 1.0,
281 "Local coordinates are not in region [-1,1]");
282
283 m_geom->FillGeom();
284 for (i = 0; i < m_geom->GetCoordim(); ++i)
285 {
286 coords[i] = m_geom->GetCoord(i, Lcoords);
287 }
288}
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::SegExp::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 290 of file SegExp.cpp.

293{
294 Expansion::v_GetCoords(coords_0, coords_1, coords_2);
295}
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::SegExp::v_GetLinStdExp ( void  ) const
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 386 of file SegExp.cpp.

387{
388 LibUtilities::BasisKey bkey0(m_base[0]->GetBasisType(), 2,
389 m_base[0]->GetPointsKey());
390
392}

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

◆ v_GetLocMatrix()

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

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 733 of file SegExp.cpp.

734{
735 return m_matrixManager[mkey];
736}

References m_matrixManager.

◆ v_GetLocStaticCondMatrix()

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 723 of file SegExp.cpp.

724{
725 return m_staticCondMatrixManager[mkey];
726}

References m_staticCondMatrixManager.

◆ v_GetPhysNormals()

const Array< OneD, const NekDouble > & Nektar::LocalRegions::SegExp::v_GetPhysNormals ( void  )
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 394 of file SegExp.cpp.

395{
396 NEKERROR(ErrorUtil::efatal, "Got to SegExp");
398}
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
static Array< OneD, NekDouble > NullNekDouble1DArray

References Nektar::ErrorUtil::efatal, NEKERROR, and Nektar::NullNekDouble1DArray.

◆ v_GetStdExp()

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

◆ v_GetTracePhysMap()

void Nektar::LocalRegions::SegExp::v_GetTracePhysMap ( const int  vertex,
Array< OneD, int > &  map 
)
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 346 of file SegExp.cpp.

347{
348 int nquad = m_base[0]->GetNumPoints();
349
350 ASSERTL1(vertex == 0 || vertex == 1, "Vertex value should be 0 or 1");
351
352 map = Array<OneD, int>(1);
353
354 map[0] = vertex == 0 ? 0 : nquad - 1;
355}

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

◆ v_GetTracePhysVals()

void Nektar::LocalRegions::SegExp::v_GetTracePhysVals ( const int  edge,
const StdRegions::StdExpansionSharedPtr EdgeExp,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
StdRegions::Orientation  orient 
)
overrideprotectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 333 of file SegExp.cpp.

339{
340 NekDouble result;
341 v_GetVertexPhysVals(edge, inarray, result);
342 outarray[0] = result;
343}
void v_GetVertexPhysVals(const int vertex, const Array< OneD, const NekDouble > &inarray, NekDouble &outarray) override
Definition SegExp.cpp:298

References v_GetVertexPhysVals().

◆ v_GetVertexPhysVals()

void Nektar::LocalRegions::SegExp::v_GetVertexPhysVals ( const int  vertex,
const Array< OneD, const NekDouble > &  inarray,
NekDouble outarray 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 298 of file SegExp.cpp.

301{
302 int nquad = m_base[0]->GetNumPoints();
303
305 {
306 switch (vertex)
307 {
308 case 0:
309 outarray = inarray[0];
310 break;
311 case 1:
312 outarray = inarray[nquad - 1];
313 break;
314 }
315 }
316 else
317 {
320
321 StdRegions::StdMatrixKey key(StdRegions::eInterpGauss, DetShapeType(),
322 *this, factors);
323
324 DNekScalMatSharedPtr mat_gauss = m_matrixManager[key];
325
326 outarray =
327 Vmath::Dot(nquad, mat_gauss->GetOwnedMatrix()->GetPtr().data(), 1,
328 &inarray[0], 1);
329 }
330}
T Dot(int n, const T *w, const T *x)
dot product
Definition Vmath.hpp:761

References Nektar::StdRegions::StdExpansion::DetShapeType(), Vmath::Dot(), Nektar::StdRegions::eFactorGaussVertex, Nektar::LibUtilities::eGaussGaussLegendre, Nektar::StdRegions::eInterpGauss, Nektar::StdRegions::StdExpansion::GetPointsType(), Nektar::StdRegions::StdExpansion::m_base, and m_matrixManager.

Referenced by v_GetTracePhysVals().

◆ v_HelmholtzMatrixOp()

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

624{
625 int nquad = m_base[0]->GetNumPoints();
626 const Array<TwoD, const NekDouble> &gmat = m_geomFactors->GetDerivFactors();
627 const NekDouble lambda = mkey.GetConstFactor(StdRegions::eFactorLambda);
628
629 Array<OneD, NekDouble> physValues(nquad);
630 Array<OneD, NekDouble> dPhysValuesdx(nquad);
631 Array<OneD, NekDouble> wsp(m_ncoeffs);
632
633 BwdTrans(inarray, physValues);
634
635 // mass matrix operation
636 v_IProductWRTBase(physValues, wsp);
637
638 // Laplacian matrix operation
639 switch (m_geom->GetCoordim())
640 {
641 case 1:
642 {
643 PhysDeriv(physValues, dPhysValuesdx);
644
645 // multiply with the proper geometric factors
646 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
647 {
648 Vmath::Vmul(nquad, &gmat[0][0], 1, dPhysValuesdx.data(), 1,
649 dPhysValuesdx.data(), 1);
650 }
651 else
652 {
653 Blas::Dscal(nquad, gmat[0][0], dPhysValuesdx.data(), 1);
654 }
655 }
656 break;
657 case 2:
658 {
659 Array<OneD, NekDouble> dPhysValuesdy(nquad);
660
661 PhysDeriv(physValues, dPhysValuesdx, dPhysValuesdy);
662
663 // multiply with the proper geometric factors
664 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
665 {
666 Vmath::Vmul(nquad, &gmat[0][0], 1, dPhysValuesdx.data(), 1,
667 dPhysValuesdx.data(), 1);
668 Vmath::Vvtvp(nquad, &gmat[1][0], 1, dPhysValuesdy.data(), 1,
669 dPhysValuesdx.data(), 1, dPhysValuesdx.data(), 1);
670 }
671 else
672 {
673 Blas::Dscal(nquad, gmat[0][0], dPhysValuesdx.data(), 1);
674 Blas::Daxpy(nquad, gmat[1][0], dPhysValuesdy.data(), 1,
675 dPhysValuesdx.data(), 1);
676 }
677 }
678 break;
679 case 3:
680 {
681 Array<OneD, NekDouble> dPhysValuesdy(nquad);
682 Array<OneD, NekDouble> dPhysValuesdz(nquad);
683
684 PhysDeriv(physValues, dPhysValuesdx, dPhysValuesdy, dPhysValuesdz);
685
686 // multiply with the proper geometric factors
687 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
688 {
689 Vmath::Vmul(nquad, &gmat[0][0], 1, dPhysValuesdx.data(), 1,
690 dPhysValuesdx.data(), 1);
691 Vmath::Vvtvp(nquad, &gmat[1][0], 1, dPhysValuesdy.data(), 1,
692 dPhysValuesdx.data(), 1, dPhysValuesdx.data(), 1);
693 Vmath::Vvtvp(nquad, &gmat[2][0], 1, dPhysValuesdz.data(), 1,
694 dPhysValuesdx.data(), 1, dPhysValuesdx.data(), 1);
695 }
696 else
697 {
698 Blas::Dscal(nquad, gmat[0][0], dPhysValuesdx.data(), 1);
699 Blas::Daxpy(nquad, gmat[1][0], dPhysValuesdy.data(), 1,
700 dPhysValuesdx.data(), 1);
701 Blas::Daxpy(nquad, gmat[2][0], dPhysValuesdz.data(), 1,
702 dPhysValuesdx.data(), 1);
703 }
704 }
705 break;
706 default:
707 ASSERTL0(false, "Wrong number of dimensions");
708 break;
709 }
710
711 const Array<OneD, const NekDouble> &jac = m_geomFactors->GetJac();
712 const bool Deformed =
714 v_IProductWRTBaseKernel(m_base[0]->GetDbdata(), dPhysValuesdx, outarray,
715 jac, Deformed);
716 Blas::Daxpy(m_ncoeffs, lambda, wsp.data(), 1, outarray.data(), 1);
717}
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 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 v_IProductWRTBaseKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const Array< OneD, const NekDouble > &jac, const bool Deformed) override
Inner product of inarray over region with respect to the expansion basis (this)->m_base[0] and return...
static void Dscal(const int &n, const double &alpha, double *x, const int &incx)
BLAS level 1: x = alpha x.
Definition Blas.hpp:124
static void Daxpy(const int &n, const double &alpha, const double *x, const int &incx, const double *y, const int &incy)
BLAS level 1: y = alpha x plus y.
Definition Blas.hpp:117
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 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

References ASSERTL0, Nektar::StdRegions::StdExpansion::BwdTrans(), Blas::Daxpy(), Blas::Dscal(), Nektar::SpatialDomains::eDeformed, Nektar::StdRegions::eFactorLambda, Nektar::StdRegions::StdMatrixKey::GetConstFactor(), Nektar::SpatialDomains::Geometry::GetCoordim(), Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion::m_geom, Nektar::LocalRegions::Expansion::m_geomFactors, Nektar::StdRegions::StdExpansion::m_ncoeffs, Nektar::StdRegions::StdExpansion::PhysDeriv(), Nektar::LocalRegions::Expansion1D::v_IProductWRTBase(), Nektar::StdRegions::StdSegExp::v_IProductWRTBaseKernel(), Vmath::Vmul(), and Vmath::Vvtvp().

◆ v_IProductWRTDerivBase()

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 194 of file SegExp.cpp.

197{
198 ASSERTL1(dir < 3, "input dir is out of range");
199 ASSERTL1((dir == 2) ? m_geom->GetCoordim() == 3 : true,
200 "input dir is out of range");
201
202 int nquad = m_base[0]->GetNumPoints();
203 const Array<TwoD, const NekDouble> &gmat = m_geomFactors->GetDerivFactors();
204
205 Array<OneD, NekDouble> tmp1(nquad);
206 const bool Deformed =
208
209 if (Deformed)
210 {
211 Vmath::Vmul(nquad, gmat[dir], 1, inarray, 1, tmp1, 1);
212 }
213 else
214 {
215 Vmath::Smul(nquad, gmat[dir][0], inarray, 1, tmp1, 1);
216 }
217
218 const Array<OneD, const NekDouble> &jac = m_geomFactors->GetJac();
219 v_IProductWRTBaseKernel(m_base[0]->GetDbdata(), tmp1, outarray, jac,
220 Deformed);
221}

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(), Nektar::StdRegions::StdSegExp::v_IProductWRTBaseKernel(), and Vmath::Vmul().

◆ v_LaplacianMatrixOp() [1/2]

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

523{
524 int nquad = m_base[0]->GetNumPoints();
525 const Array<TwoD, const NekDouble> &gmat = m_geomFactors->GetDerivFactors();
526
527 Array<OneD, NekDouble> physValues(nquad);
528 Array<OneD, NekDouble> dPhysValuesdx(nquad);
529
530 BwdTrans(inarray, physValues);
531
532 // Laplacian matrix operation
533 switch (m_geom->GetCoordim())
534 {
535 case 1:
536 {
537 v_PhysDeriv(physValues, dPhysValuesdx, NullNekDouble1DArray,
539
540 // multiply with the proper geometric factors
541 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
542 {
543 Vmath::Vmul(nquad, &gmat[0][0], 1, dPhysValuesdx.data(), 1,
544 dPhysValuesdx.data(), 1);
545 }
546 else
547 {
548 Blas::Dscal(nquad, gmat[0][0], dPhysValuesdx.data(), 1);
549 }
550 }
551 break;
552 case 2:
553 {
554 Array<OneD, NekDouble> dPhysValuesdy(nquad);
555
556 PhysDeriv(physValues, dPhysValuesdx, dPhysValuesdy);
557
558 // multiply with the proper geometric factors
559 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
560 {
561 Vmath::Vmul(nquad, &gmat[0][0], 1, dPhysValuesdx.data(), 1,
562 dPhysValuesdx.data(), 1);
563 Vmath::Vvtvp(nquad, &gmat[1][0], 1, dPhysValuesdy.data(), 1,
564 dPhysValuesdx.data(), 1, dPhysValuesdx.data(), 1);
565 }
566 else
567 {
568 Blas::Dscal(nquad, gmat[0][0], dPhysValuesdx.data(), 1);
569 Blas::Daxpy(nquad, gmat[1][0], dPhysValuesdy.data(), 1,
570 dPhysValuesdx.data(), 1);
571 }
572 }
573 break;
574 case 3:
575 {
576 Array<OneD, NekDouble> dPhysValuesdy(nquad);
577 Array<OneD, NekDouble> dPhysValuesdz(nquad);
578
579 PhysDeriv(physValues, dPhysValuesdx, dPhysValuesdy, dPhysValuesdz);
580
581 // multiply with the proper geometric factors
582 if (m_geomFactors->GetGtype() == SpatialDomains::eDeformed)
583 {
584 Vmath::Vmul(nquad, &gmat[0][0], 1, dPhysValuesdx.data(), 1,
585 dPhysValuesdx.data(), 1);
586 Vmath::Vvtvp(nquad, &gmat[1][0], 1, dPhysValuesdy.data(), 1,
587 dPhysValuesdx.data(), 1, dPhysValuesdx.data(), 1);
588 Vmath::Vvtvp(nquad, &gmat[2][0], 1, dPhysValuesdz.data(), 1,
589 dPhysValuesdx.data(), 1, dPhysValuesdx.data(), 1);
590 }
591 else
592 {
593 Blas::Dscal(nquad, gmat[0][0], dPhysValuesdx.data(), 1);
594 Blas::Daxpy(nquad, gmat[1][0], dPhysValuesdy.data(), 1,
595 dPhysValuesdx.data(), 1);
596 Blas::Daxpy(nquad, gmat[2][0], dPhysValuesdz.data(), 1,
597 dPhysValuesdx.data(), 1);
598 }
599 }
600 break;
601 default:
602 ASSERTL0(false, "Wrong number of dimensions");
603 break;
604 }
605
606 const Array<OneD, const NekDouble> &jac = m_geomFactors->GetJac();
607 const bool Deformed =
609 v_IProductWRTBaseKernel(m_base[0]->GetDbdata(), dPhysValuesdx, outarray,
610 jac, Deformed);
611}
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.

References ASSERTL0, Nektar::StdRegions::StdExpansion::BwdTrans(), Blas::Daxpy(), Blas::Dscal(), Nektar::SpatialDomains::eDeformed, Nektar::SpatialDomains::Geometry::GetCoordim(), Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion::m_geom, Nektar::LocalRegions::Expansion::m_geomFactors, Nektar::NullNekDouble1DArray, Nektar::StdRegions::StdExpansion::PhysDeriv(), Nektar::StdRegions::StdSegExp::v_IProductWRTBaseKernel(), Nektar::LocalRegions::Expansion1D::v_PhysDeriv(), Vmath::Vmul(), and Vmath::Vvtvp().

◆ v_LaplacianMatrixOp() [2/2]

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

617{
618 StdExpansion::LaplacianMatrixOp_MatFree(k1, k2, inarray, outarray, mkey);
619}

◆ v_NormVectorIProductWRTBase() [1/2]

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 241 of file SegExp.cpp.

244{
245 NormVectorIProductWRTBase(Fvec[0], Fvec[1], outarray);
246}
void NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, Array< OneD, NekDouble > &outarray)

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

◆ v_NormVectorIProductWRTBase() [2/2]

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 223 of file SegExp.cpp.

226{
227 int nq = m_base[0]->GetNumPoints();
228 Array<OneD, NekDouble> Fn(nq);
229
230 // @TODO: This routine no longer makes sense as a normal is not unique to an
231 // edge
232 const Array<OneD, const Array<OneD, NekDouble>> &normals =
233 GetLeftAdjacentElementExp()->GetTraceNormal(
235 Vmath::Vmul(nq, &Fx[0], 1, &normals[0][0], 1, &Fn[0], 1);
236 Vmath::Vvtvp(nq, &Fy[0], 1, &normals[1][0], 1, &Fn[0], 1, &Fn[0], 1);
237
238 v_IProductWRTBase(Fn, outarray);
239}
ExpansionSharedPtr GetLeftAdjacentElementExp() const
Definition Expansion.h:531
int GetLeftAdjacentElementTrace() const
Definition Expansion.h:544

References Nektar::LocalRegions::Expansion::GetLeftAdjacentElementExp(), Nektar::LocalRegions::Expansion::GetLeftAdjacentElementTrace(), Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion1D::v_IProductWRTBase(), Vmath::Vmul(), and Vmath::Vvtvp().

◆ v_NumBndryCoeffs()

int Nektar::LocalRegions::SegExp::v_NumBndryCoeffs ( ) const
overrideprotectedvirtual

Implements Nektar::StdRegions::StdExpansion.

Definition at line 400 of file SegExp.cpp.

401{
402 return 2;
403}

◆ v_NumDGBndryCoeffs()

int Nektar::LocalRegions::SegExp::v_NumDGBndryCoeffs ( ) const
overrideprotectedvirtual

Implements Nektar::StdRegions::StdExpansion.

Definition at line 405 of file SegExp.cpp.

406{
407 return 2;
408}

◆ v_PhysEvalFirstDeriv()

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

255{
256 Array<OneD, NekDouble> Lcoord(1);
257 ASSERTL0(m_geom, "m_geom not defined");
258 m_geom->GetLocCoords(coord, Lcoord);
259 return StdSegExp::v_PhysEvalFirstDeriv(Lcoord, inarray, firstOrderDerivs);
260}
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_PhysEvalFirstSecondDeriv()

NekDouble Nektar::LocalRegions::SegExp::v_PhysEvalFirstSecondDeriv ( const Array< OneD, NekDouble > &  coord,
const Array< OneD, const NekDouble > &  inarray,
std::array< NekDouble, 3 > &  firstOrderDerivs,
std::array< NekDouble, 6 > &  secondOrderDerivs 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 262 of file SegExp.cpp.

267{
268 Array<OneD, NekDouble> Lcoord(1);
269 ASSERTL0(m_geom, "m_geom not defined");
270 m_geom->GetLocCoords(coord, Lcoord);
271 return StdSegExp::v_PhysEvalFirstSecondDeriv(
272 Lcoord, inarray, firstOrderDerivs, secondOrderDerivs);
273}

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

◆ v_SetCoeffsToOrientation()

void Nektar::LocalRegions::SegExp::v_SetCoeffsToOrientation ( StdRegions::Orientation  dir,
Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
overrideprotectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 361 of file SegExp.cpp.

364{
365
366 if (dir == StdRegions::eBackwards)
367 {
368 if (&inarray[0] != &outarray[0])
369 {
370 Array<OneD, NekDouble> intmp(inarray);
371 ReverseCoeffsAndSign(intmp, outarray);
372 }
373 else
374 {
375 ReverseCoeffsAndSign(inarray, outarray);
376 }
377 }
378}
void ReverseCoeffsAndSign(const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Reverse the coefficients in a boundary interior expansion this routine is of use when we need the seg...
Definition SegExp.cpp:1113

References Nektar::StdRegions::eBackwards, and ReverseCoeffsAndSign().

Member Data Documentation

◆ m_matrixManager

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

◆ m_staticCondMatrixManager

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