Nektar++
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
Nektar::LocalRegions::NodalTriExp Class Referencefinal

#include <NodalTriExp.h>

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

Public Member Functions

 NodalTriExp (const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::PointsType Ntype, const SpatialDomains::TriGeomSharedPtr &geom)
 Constructor using BasisKey class for quadrature points and order definition. More...
 
 NodalTriExp (const NodalTriExp &T)
 Copy Constructor. More...
 
 ~NodalTriExp () override=default
 Destructor. More...
 
void GetCoords (Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3=NullNekDouble1DArray)
 
void GetCoord (const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords)
 
NekDouble Integral (const Array< OneD, const NekDouble > &inarray)
 Integrate the physical point list inarray over region. More...
 
void IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 Inner product of inarray over region with respect to the expansion basis (this)->_Base[0] and return in outarray. More...
 
void IProductWRTDerivBase (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void PhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
 Differentiation Methods. More...
 
void FwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 Forward transform from physical quadrature space stored in inarray and evaluate the expansion coefficients and store in (this)->_coeffs
More...
 
NekDouble PhysEvaluate (const Array< OneD, const NekDouble > &coord, const Array< OneD, const NekDouble > &physvals)
 
void MassMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
 
NekDouble v_PhysEvaluate (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) final
 
void LaplacianMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
 
void LaplacianMatrixOp (const int k1, const int k2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
 
void WeakDerivMatrixOp (const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
 
void HelmholtzMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
 
- Public Member Functions inherited from Nektar::StdRegions::StdNodalTriExp
 StdNodalTriExp (const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::PointsType Ntype)
 
 StdNodalTriExp ()=default
 
 StdNodalTriExp (const StdNodalTriExp &T)=default
 
 ~StdNodalTriExp () override=default
 
void NodalToModal (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void NodalToModalTranspose (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void ModalToNodal (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void GetNodalPoints (Array< OneD, const NekDouble > &x, Array< OneD, const NekDouble > &y)
 
DNekMatSharedPtr GenNBasisTransMatrix ()
 
- Public Member Functions inherited from Nektar::StdRegions::StdTriExp
 StdTriExp (const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb)
 
 StdTriExp ()=default
 
 StdTriExp (const StdTriExp &T)=default
 
 ~StdTriExp () override=default
 
- Public Member Functions inherited from Nektar::StdRegions::StdExpansion2D
 StdExpansion2D (int numcoeffs, const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb)
 
 StdExpansion2D ()=default
 
 StdExpansion2D (const StdExpansion2D &T)=default
 
 ~StdExpansion2D () override=default
 
void PhysTensorDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray_d0, Array< OneD, NekDouble > &outarray_d1)
 Calculate the 2D derivative in the local tensor/collapsed coordinate at the physical points. More...
 
NekDouble Integral (const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &w0, const Array< OneD, const NekDouble > &w1)
 
NekDouble BaryTensorDeriv (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs)
 
void BwdTrans_SumFacKernel (const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0=true, bool doCheckCollDir1=true)
 
void IProductWRTBase_SumFacKernel (const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0=true, bool doCheckCollDir1=true)
 
- Public Member Functions inherited from Nektar::StdRegions::StdExpansion
 StdExpansion ()
 Default Constructor. More...
 
 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. More...
 
 StdExpansion (const StdExpansion &T)
 Copy Constructor. More...
 
virtual ~StdExpansion ()
 Destructor. More...
 
int GetNumBases () const
 This function returns the number of 1D bases used in the expansion. More...
 
const Array< OneD, const LibUtilities::BasisSharedPtr > & GetBase () const
 This function gets the shared point to basis. More...
 
const LibUtilities::BasisSharedPtrGetBasis (int dir) const
 This function gets the shared point to basis in the dir direction. More...
 
int GetNcoeffs (void) const
 This function returns the total number of coefficients used in the expansion. More...
 
int GetTotPoints () const
 This function returns the total number of quadrature points used in the element. More...
 
LibUtilities::BasisType GetBasisType (const int dir) const
 This function returns the type of basis used in the dir direction. More...
 
int GetBasisNumModes (const int dir) const
 This function returns the number of expansion modes in the dir direction. More...
 
int EvalBasisNumModesMax (void) const
 This function returns the maximum number of expansion modes over all local directions. More...
 
LibUtilities::PointsType GetPointsType (const int dir) const
 This function returns the type of quadrature points used in the dir direction. More...
 
int GetNumPoints (const int dir) const
 This function returns the number of quadrature points in the dir direction. More...
 
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. More...
 
int GetNverts () const
 This function returns the number of vertices of the expansion domain. More...
 
int GetTraceNcoeffs (const int i) const
 This function returns the number of expansion coefficients belonging to the i-th trace. More...
 
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. More...
 
const LibUtilities::BasisKey GetTraceBasisKey (const int i, int k=-1) const
 This function returns the basis key belonging to the i-th trace. More...
 
LibUtilities::PointsKey GetTracePointsKey (const int i, int k=-1) const
 This function returns the basis key belonging to the i-th trace. More...
 
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. More...
 
int GetNtraces () const
 Returns the number of trace elements connected to this element. More...
 
LibUtilities::ShapeType DetShapeType () const
 This function returns the shape of the expansion domain. More...
 
std::shared_ptr< StdExpansionGetStdExp () const
 
std::shared_ptr< StdExpansionGetLinStdExp (void) const
 
int GetShapeDimension () const
 
bool IsBoundaryInteriorExpansion () const
 
bool IsNodalNonTensorialExp ()
 
void BwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function performs the Backward transformation from coefficient space to physical space. More...
 
void FwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function performs the Forward transformation from physical space to coefficient space. More...
 
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. More...
 
void FillMode (const int mode, Array< OneD, NekDouble > &outarray)
 This function fills the array outarray with the mode-th mode of the expansion. More...
 
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 More...
 
void IProductWRTBase (const Array< OneD, const NekDouble > &base, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, int coll_check)
 
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. More...
 
void SetElmtId (const int id)
 Set the element id of this expansion when used in a list by returning value of m_elmt_id. More...
 
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 More...
 
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 More...
 
DNekMatSharedPtr GetStdMatrix (const StdMatrixKey &mkey)
 
DNekBlkMatSharedPtr GetStdStaticCondMatrix (const StdMatrixKey &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}\) More...
 
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 PhysDeriv_s (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_ds)
 
void PhysDeriv_n (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_dn)
 
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)
 
void StdPhysDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
void LocCoordToLocCollapsed (const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
 Convert local cartesian coordinate xi into local collapsed coordinates eta. More...
 
void LocCollapsedToLocCoord (const Array< OneD, const NekDouble > &eta, Array< OneD, NekDouble > &xi)
 Convert local collapsed coordinates eta into local cartesian coordinate xi. More...
 
virtual int v_CalcNumberOfCoefficients (const std::vector< unsigned int > &nummodes, int &modes_offset)
 
virtual void v_NormVectorIProductWRTBase (const Array< OneD, const NekDouble > &Fx, Array< OneD, NekDouble > &outarray)
 
virtual void v_NormVectorIProductWRTBase (const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
 
virtual void v_NormVectorIProductWRTBase (const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, const Array< OneD, const NekDouble > &Fz, Array< OneD, NekDouble > &outarray)
 
virtual void v_NormVectorIProductWRTBase (const Array< OneD, const Array< OneD, NekDouble > > &Fvec, Array< OneD, NekDouble > &outarray)
 
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix (const LocalRegions::MatrixKey &mkey)
 
virtual void v_DropLocStaticCondMatrix (const LocalRegions::MatrixKey &mkey)
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
template<class T >
std::shared_ptr< T > as ()
 
void IProductWRTBase_SumFac (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
 
void GenStdMatBwdDeriv (const int dir, DNekMatSharedPtr &mat)
 
- Public Member Functions inherited from Nektar::LocalRegions::Expansion2D
 Expansion2D (SpatialDomains::Geometry2DSharedPtr pGeom)
 
 ~Expansion2D () override=default
 
DNekScalMatSharedPtr CreateMatrix (const MatrixKey &mkey)
 
void SetTraceToGeomOrientation (Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, NekDouble > &inout)
 
Array< OneD, unsigned int > GetTraceInverseBoundaryMap (int eid)
 
void AddNormTraceInt (const int dir, Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, Array< OneD, NekDouble > > &edgeCoeffs, Array< OneD, NekDouble > &outarray)
 
void AddNormTraceInt (const int dir, Array< OneD, const NekDouble > &inarray, Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, NekDouble > &outarray, const StdRegions::VarCoeffMap &varcoeffs)
 
void AddEdgeBoundaryInt (const int edge, ExpansionSharedPtr &EdgeExp, Array< OneD, NekDouble > &edgePhys, Array< OneD, NekDouble > &outarray, const StdRegions::VarCoeffMap &varcoeffs=StdRegions::NullVarCoeffMap)
 
void AddHDGHelmholtzEdgeTerms (const NekDouble tau, const int edge, Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, NekDouble > &edgePhys, const StdRegions::VarCoeffMap &dirForcing, Array< OneD, NekDouble > &outarray)
 
void AddHDGHelmholtzTraceTerms (const NekDouble tau, const Array< OneD, const NekDouble > &inarray, Array< OneD, ExpansionSharedPtr > &EdgeExp, const StdRegions::VarCoeffMap &dirForcing, Array< OneD, NekDouble > &outarray)
 
SpatialDomains::Geometry2DSharedPtr GetGeom2D () const
 
void ReOrientEdgePhysMap (const int nvert, const StdRegions::Orientation orient, const int nq0, Array< OneD, int > &idmap)
 
DNekMatSharedPtr v_GenMatrix (const StdRegions::StdMatrixKey &mkey) override
 
void v_GenTraceExp (const int traceid, ExpansionSharedPtr &exp) override
 
- Public Member Functions inherited from Nektar::LocalRegions::Expansion
 Expansion (SpatialDomains::GeometrySharedPtr pGeom)
 
 Expansion (const Expansion &pSrc)
 
 ~Expansion () override
 
void SetTraceExp (const int traceid, ExpansionSharedPtr &f)
 
ExpansionSharedPtr GetTraceExp (const int traceid)
 
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::GeometrySharedPtr GetGeom () const
 
void Reset ()
 
IndexMapValuesSharedPtr CreateIndexMap (const IndexMapKey &ikey)
 
DNekScalBlkMatSharedPtr CreateStaticCondMatrix (const MatrixKey &mkey)
 
const SpatialDomains::GeomFactorsSharedPtrGetMetricInfo () const
 
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. More...
 
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). More...
 
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 GetTracePhysMap (const int edge, Array< OneD, int > &outarray)
 
void ReOrientTracePhysMap (const StdRegions::Orientation orient, Array< OneD, int > &idmap, const int nq0, const int nq1)
 
const NormalVectorGetTraceNormal (const int id)
 
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)
 

Protected Member Functions

DNekMatSharedPtr CreateStdMatrix (const StdRegions::StdMatrixKey &mkey)
 
void IProductWRTBase_SumFac (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
 
void IProductWRTBase_MatOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void IProductWRTDerivBase_SumFac (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void IProductWRTDerivBase_MatOp (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void GeneralMatrixOp_MatOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
 
StdRegions::StdExpansionSharedPtr v_GetStdExp (void) const override
 
StdRegions::StdExpansionSharedPtr v_GetLinStdExp (void) const override
 
DNekMatSharedPtr v_GenMatrix (const StdRegions::StdMatrixKey &mkey) override
 
- Protected Member Functions inherited from Nektar::StdRegions::StdNodalTriExp
const LibUtilities::PointsKey v_GetNodalPointsKey () const override
 
bool v_IsNodalNonTensorialExp () override
 
void v_BwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_BwdTrans_SumFac (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_FwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 Transform a given function from physical quadrature space to coefficient space. More...
 
void v_IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 Calculates the inner product of a given function f with the different modes of the expansion. More...
 
void v_IProductWRTBase_SumFac (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true) override
 
void v_IProductWRTDerivBase (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_IProductWRTDerivBase_SumFac (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_FillMode (const int mode, Array< OneD, NekDouble > &outarray) override
 
int v_NumBndryCoeffs () const override
 
int v_GetVertexMap (int localVertexId, bool useCoeffPacking=false) override
 
void v_GetTraceToElementMap (const int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation edgeOrient=eForwards, int P=-1, int Q=-1) override
 
void v_GetTraceInteriorToElementMap (const int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation edgeOrient=eForwards) override
 
void v_GetInteriorMap (Array< OneD, unsigned int > &outarray) override
 
void v_GetBoundaryMap (Array< OneD, unsigned int > &outarray) override
 
void v_MassMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
 
void v_LaplacianMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
 
void v_LaplacianMatrixOp (const int k1, const int k2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
 
void v_WeakDerivMatrixOp (const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
 
void v_HelmholtzMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
 
DNekMatSharedPtr v_GenMatrix (const StdMatrixKey &mkey) override
 
DNekMatSharedPtr v_CreateStdMatrix (const StdMatrixKey &mkey) override
 
- Protected Member Functions inherited from Nektar::StdRegions::StdTriExp
NekDouble v_Integral (const Array< OneD, const NekDouble > &inarray) override
 Integrates the specified function over the domain. More...
 
void v_PhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray) override
 Calculate the derivative of the physical points. More...
 
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. More...
 
void v_StdPhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray) override
 
void v_StdPhysDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_BwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 Backward tranform for triangular elements. More...
 
void v_BwdTrans_SumFac (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_BwdTrans_SumFacKernel (const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1) override
 
void v_FwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 Transform a given function from physical quadrature space to coefficient space. More...
 
void v_FwdTransBndConstrained (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 Calculate the inner product of inarray with respect to the basis B=base0[p]*base1[pq] and put into outarray. More...
 
void v_IProductWRTBase_SumFac (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true) override
 
void v_IProductWRTBase_SumFacKernel (const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1) override
 
void v_IProductWRTDerivBase (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_IProductWRTDerivBase_SumFac (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_LocCoordToLocCollapsed (const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta) override
 
void v_LocCollapsedToLocCoord (const Array< OneD, const NekDouble > &eta, Array< OneD, NekDouble > &xi) override
 
void v_FillMode (const int mode, Array< OneD, NekDouble > &outarray) override
 
NekDouble v_PhysEvaluateBasis (const Array< OneD, const NekDouble > &coords, int mode) final
 
NekDouble v_PhysEvaluate (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) override
 
int v_GetNverts () const final
 
int v_GetNtraces () const final
 
LibUtilities::ShapeType v_DetShapeType () const final
 
int v_NumBndryCoeffs () const override
 
int v_NumDGBndryCoeffs () const override
 
int v_GetTraceNcoeffs (const int i) const override
 
int v_GetTraceIntNcoeffs (const int i) const override
 
int v_GetTraceNumPoints (const int i) const override
 
int v_CalcNumberOfCoefficients (const std::vector< unsigned int > &nummodes, int &modes_offset) override
 
void v_GetCoords (Array< OneD, NekDouble > &coords_x, Array< OneD, NekDouble > &coords_y, Array< OneD, NekDouble > &coords_z) override
 
bool v_IsBoundaryInteriorExpansion () const override
 
const LibUtilities::BasisKey v_GetTraceBasisKey (const int i, const int j) const override
 
int v_GetVertexMap (int localVertexId, bool useCoeffPacking=false) override
 
void v_GetInteriorMap (Array< OneD, unsigned int > &outarray) override
 
void v_GetBoundaryMap (Array< OneD, unsigned int > &outarray) override
 
void v_GetTraceCoeffMap (const unsigned int traceid, Array< OneD, unsigned int > &maparray) override
 
void v_GetTraceInteriorToElementMap (const int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, const Orientation edgeOrient=eForwards) override
 
DNekMatSharedPtr v_GenMatrix (const StdMatrixKey &mkey) override
 
DNekMatSharedPtr v_CreateStdMatrix (const StdMatrixKey &mkey) override
 
void v_MassMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
 
void v_LaplacianMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
 
void v_SVVLaplacianFilter (Array< OneD, NekDouble > &array, const StdMatrixKey &mkey) override
 
void v_ReduceOrderCoeffs (int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_LaplacianMatrixOp (const int k1, const int k2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
 
void v_WeakDerivMatrixOp (const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
 
void v_HelmholtzMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey) override
 
void v_MultiplyByStdQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_GetSimplexEquiSpacedConnectivity (Array< OneD, int > &conn, bool standard=true) override
 
- Protected Member Functions inherited from Nektar::StdRegions::StdExpansion2D
NekDouble v_PhysEvaluate (const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &physvals) override
 This function evaluates the expansion at a single (arbitrary) point of the domain. More...
 
NekDouble v_PhysEvaluate (const Array< OneD, DNekMatSharedPtr > &I, const Array< OneD, const NekDouble > &physvals) override
 
NekDouble v_PhysEvaluate (const Array< OneD, NekDouble > &coord, const Array< OneD, const NekDouble > &inarray, std::array< NekDouble, 3 > &firstOrderDerivs) override
 
virtual void v_BwdTrans_SumFacKernel (const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1)=0
 
virtual void v_IProductWRTBase_SumFacKernel (const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1)=0
 
void v_LaplacianMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
void v_HelmholtzMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
void v_GetTraceCoeffMap (const unsigned int traceid, Array< OneD, unsigned int > &maparray) override
 
void v_GetElmtTraceToTraceMap (const unsigned int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation edgeOrient, int P, int Q) override
 Determine the mapping to re-orientate the coefficients along the element trace (assumed to align with the standard element) into the orientation of the local trace given by edgeOrient. More...
 
void v_GetTraceToElementMap (const int eid, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, Orientation edgeOrient=eForwards, int P=-1, int Q=-1) override
 
void v_GenStdMatBwdDeriv (const int dir, DNekMatSharedPtr &mat) override
 
- Protected Member Functions inherited from Nektar::StdRegions::StdExpansion
DNekMatSharedPtr CreateStdMatrix (const StdMatrixKey &mkey)
 
DNekBlkMatSharedPtr CreateStdStaticCondMatrix (const StdMatrixKey &mkey)
 Create the static condensation of a matrix when using a boundary interior decomposition. More...
 
void BwdTrans_SumFac (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void IProductWRTDerivBase_SumFac (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void IProductWRTDirectionalDerivBase_SumFac (const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
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_SetCoeffsToOrientation (StdRegions::Orientation dir, Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_SetCoeffsToOrientation (Array< OneD, NekDouble > &coeffs, StdRegions::Orientation dir)
 
virtual NekDouble v_StdPhysEvaluate (const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals)
 
virtual void v_GenStdMatBwdDeriv (const int dir, DNekMatSharedPtr &mat)
 
virtual void v_MultiplyByStdQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
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. More...
 
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. More...
 
template<int DIR, bool DERIV = false, bool DERIV2 = false>
NekDouble BaryEvaluate (const NekDouble &coord, const NekDouble *physvals, NekDouble &deriv)
 
- Protected Member Functions inherited from Nektar::LocalRegions::Expansion2D
void v_DGDeriv (const int dir, const Array< OneD, const NekDouble > &incoeffs, Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, Array< OneD, NekDouble > > &edgeCoeffs, Array< OneD, NekDouble > &out_d) override
 
void v_AddEdgeNormBoundaryInt (const int edge, const ExpansionSharedPtr &EdgeExp, const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray) override
 
void v_AddEdgeNormBoundaryInt (const int edge, const ExpansionSharedPtr &EdgeExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray) override
 
void v_AddRobinMassMatrix (const int edgeid, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat) override
 
void v_AddRobinTraceContribution (const int traceid, const Array< OneD, const NekDouble > &primCoeffs, const Array< OneD, NekDouble > &incoeffs, Array< OneD, NekDouble > &coeffs) override
 
DNekMatSharedPtr v_BuildVertexMatrix (const DNekScalMatSharedPtr &r_bnd) override
 
void v_ReOrientTracePhysMap (const StdRegions::Orientation orient, Array< OneD, int > &idmap, const int nq0, const int nq1) override
 
void v_SetUpPhysNormals (const int edge) override
 
NekDouble v_VectorFlux (const Array< OneD, Array< OneD, NekDouble > > &vec) override
 
void v_TraceNormLen (const int traceid, NekDouble &h, NekDouble &p) override
 
- Protected Member Functions inherited from Nektar::LocalRegions::Expansion
void ComputeLaplacianMetric ()
 
void ComputeQuadratureMetric ()
 
void ComputeGmatcdotMF (const Array< TwoD, const NekDouble > &df, const Array< OneD, const NekDouble > &direction, Array< OneD, Array< OneD, NekDouble > > &dfdir)
 
Array< OneD, NekDoubleGetMF (const int dir, const int shapedim, const StdRegions::VarCoeffMap &varcoeffs)
 
Array< OneD, NekDoubleGetMFDiv (const int dir, const StdRegions::VarCoeffMap &varcoeffs)
 
Array< OneD, NekDoubleGetMFMag (const int dir, const StdRegions::VarCoeffMap &varcoeffs)
 
void v_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
 
void v_GetCoords (Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
 
virtual DNekScalMatSharedPtr v_GetLocMatrix (const LocalRegions::MatrixKey &mkey)
 
virtual void v_DropLocMatrix (const LocalRegions::MatrixKey &mkey)
 
virtual DNekMatSharedPtr v_BuildTransformationMatrix (const DNekScalMatSharedPtr &r_bnd, const StdRegions::MatrixType matrixType)
 
virtual DNekMatSharedPtr v_BuildVertexMatrix (const DNekScalMatSharedPtr &r_bnd)
 
virtual void v_ExtractDataToCoeffs (const NekDouble *data, const std::vector< unsigned int > &nummodes, const int nmodes_offset, NekDouble *coeffs, std::vector< LibUtilities::BasisType > &fromType)
 
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 NekDouble v_VectorFlux (const Array< OneD, Array< OneD, NekDouble > > &vec)
 
virtual void v_NormalTraceDerivFactors (Array< OneD, Array< OneD, NekDouble > > &factors, Array< OneD, Array< OneD, NekDouble > > &d0factors, Array< OneD, Array< OneD, NekDouble > > &d1factors)
 
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)
 
void v_SetCoeffsToOrientation (StdRegions::Orientation dir, Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
virtual void v_GetTraceQFactors (const int trace, Array< OneD, NekDouble > &outarray)
 
virtual void v_GetTracePhysVals (const int trace, const StdRegions::StdExpansionSharedPtr &TraceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient)
 
virtual void v_GetTracePhysMap (const int edge, Array< OneD, int > &outarray)
 
virtual void v_ReOrientTracePhysMap (const StdRegions::Orientation orient, Array< OneD, int > &idmap, const int nq0, const int nq1=-1)
 
virtual void v_ComputeTraceNormal (const int id)
 
virtual const Array< OneD, const NekDouble > & v_GetPhysNormals ()
 
virtual void v_SetPhysNormals (Array< OneD, const NekDouble > &normal)
 
virtual void v_SetUpPhysNormals (const int id)
 
virtual void v_AddRobinMassMatrix (const int face, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat)
 
virtual void v_AddRobinTraceContribution (const int traceid, const Array< OneD, const NekDouble > &primCoeffs, const Array< OneD, NekDouble > &incoeffs, Array< OneD, NekDouble > &coeffs)
 
virtual void v_TraceNormLen (const int traceid, NekDouble &h, NekDouble &p)
 
virtual void v_GenTraceExp (const int traceid, ExpansionSharedPtr &exp)
 

Private Member Functions

void v_GetCoords (Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1=NullNekDouble1DArray, Array< OneD, NekDouble > &coords_2=NullNekDouble1DArray) override
 
void v_GetCoord (const Array< OneD, const NekDouble > &lcoord, Array< OneD, NekDouble > &coord) override
 
NekDouble v_Integral (const Array< OneD, const NekDouble > &inarray) override
 Virtual call to integrate the physical point list inarray over region (see SegExp::Integral) More...
 
void v_IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 Virtual call to TriExp::IProduct_WRT_B. More...
 
void v_IProductWRTDerivBase (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_StdPhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray) override
 
void v_PhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray) override
 Calculate the derivative of the physical points. More...
 
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. More...
 
void v_FwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 Virtual call to SegExp::FwdTrans. More...
 
NekDouble v_PhysEvaluate (const Array< OneD, const NekDouble > &coord, const Array< OneD, const NekDouble > &physvals) override
 Virtual call to TriExp::Evaluate. More...
 
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_BwdTrans_SumFac (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_IProductWRTBase_SumFac (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true) override
 
void v_IProductWRTDerivBase_SumFac (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray) override
 
void v_AlignVectorToCollapsedDir (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
 
void v_MassMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
void v_LaplacianMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
void v_LaplacianMatrixOp (const int k1, const int k2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
void v_WeakDerivMatrixOp (const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
void v_HelmholtzMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey) override
 
void v_ComputeTraceNormal (const int edge) override
 

Private Attributes

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

Additional Inherited Members

- Protected Attributes inherited from Nektar::StdRegions::StdNodalTriExp
LibUtilities::PointsKey m_nodalPointsKey
 
- Protected Attributes inherited from Nektar::StdRegions::StdExpansion
Array< OneD, LibUtilities::BasisSharedPtrm_base
 
int m_elmt_id
 
int m_ncoeffs
 
LibUtilities::NekManager< StdMatrixKey, DNekMat, StdMatrixKey::opLessm_stdMatrixManager
 
LibUtilities::NekManager< StdMatrixKey, DNekBlkMat, StdMatrixKey::opLessm_stdStaticCondMatrixManager
 
- Protected Attributes inherited from Nektar::LocalRegions::Expansion2D
std::vector< bool > m_requireNeg
 
- Protected Attributes inherited from Nektar::LocalRegions::Expansion
LibUtilities::NekManager< IndexMapKey, IndexMapValues, IndexMapKey::opLessm_indexMapManager
 
std::map< int, ExpansionWeakPtrm_traceExp
 
SpatialDomains::GeometrySharedPtr m_geom
 
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
 
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_metricinfo times the standard element length (which is 2.0) More...
 

Detailed Description

Definition at line 48 of file NodalTriExp.h.

Constructor & Destructor Documentation

◆ NodalTriExp() [1/2]

Nektar::LocalRegions::NodalTriExp::NodalTriExp ( const LibUtilities::BasisKey Ba,
const LibUtilities::BasisKey Bb,
const LibUtilities::PointsType  Ntype,
const SpatialDomains::TriGeomSharedPtr geom 
)

Constructor using BasisKey class for quadrature points and order definition.

Definition at line 42 of file NodalTriExp.cpp.

47 Ba.GetNumModes(), (Bb.GetNumModes())),
48 2, Ba, Bb),
50 Ba.GetNumModes(), (Bb.GetNumModes())),
51 Ba, Bb),
52 StdNodalTriExp(Ba, Bb, Ntype), Expansion(geom), Expansion2D(geom),
54 std::bind(&Expansion2D::CreateMatrix, this, std::placeholders::_1),
55 std::string("NodalTriExpMatrix")),
57 this, std::placeholders::_1),
58 std::string("NodalTriExpStaticCondMatrix"))
59{
60}
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
Definition: Expansion2D.cpp:55
Expansion2D(SpatialDomains::Geometry2DSharedPtr pGeom)
Definition: Expansion2D.cpp:50
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
Definition: Expansion.cpp:272
Expansion(SpatialDomains::GeometrySharedPtr pGeom)
Definition: Expansion.cpp:43
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: NodalTriExp.h:192
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: NodalTriExp.h:194
StdExpansion()
Default Constructor.
int getNumberOfCoefficients(int Na, int Nb)
Definition: ShapeType.hpp:109

◆ NodalTriExp() [2/2]

Nektar::LocalRegions::NodalTriExp::NodalTriExp ( const NodalTriExp T)

Copy Constructor.

Definition at line 62 of file NodalTriExp.cpp.

63 : StdExpansion(T), StdExpansion2D(T), StdRegions::StdTriExp(T),
64 StdRegions::StdNodalTriExp(T), Expansion(T), Expansion2D(T),
65 m_matrixManager(T.m_matrixManager),
66 m_staticCondMatrixManager(T.m_staticCondMatrixManager)
67{
68}

◆ ~NodalTriExp()

Nektar::LocalRegions::NodalTriExp::~NodalTriExp ( )
overridedefault

Destructor.

Member Function Documentation

◆ CreateStdMatrix()

DNekMatSharedPtr Nektar::LocalRegions::NodalTriExp::CreateStdMatrix ( const StdRegions::StdMatrixKey mkey)
protected

Definition at line 435 of file NodalTriExp.cpp.

437{
438 LibUtilities::BasisKey bkey0 = m_base[0]->GetBasisKey();
439 LibUtilities::BasisKey bkey1 = m_base[1]->GetBasisKey();
443
444 return tmp->GetStdMatrix(mkey);
445}
PointsType GetPointsType() const
Definition: Points.h:90
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
Array< OneD, LibUtilities::BasisSharedPtr > m_base
LibUtilities::PointsKey m_nodalPointsKey
std::shared_ptr< StdNodalTriExp > StdNodalTriExpSharedPtr

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::LibUtilities::PointsKey::GetPointsType(), Nektar::StdRegions::StdExpansion::m_base, and Nektar::StdRegions::StdNodalTriExp::m_nodalPointsKey.

Referenced by v_CreateStdMatrix().

◆ FwdTrans()

void Nektar::LocalRegions::NodalTriExp::FwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

Forward transform from physical quadrature space stored in inarray and evaluate the expansion coefficients and store in (this)->_coeffs

Forward transform from physical quadrature space stored in inarray and evaluate the expansion coefficients and store in (this)->m_coeffs.

Inputs:

  • inarray: array of physical quadrature points to be transformed

Outputs:

  • (this)->_coeffs: updated array of expansion coefficients.

Definition at line 368 of file NodalTriExp.cpp.

370{
371 IProductWRTBase(inarray, outarray);
372
373 // get Mass matrix inverse
374 MatrixKey masskey(StdRegions::eInvMass, DetShapeType(), *this,
378 DNekScalMatSharedPtr matsys = m_matrixManager[masskey];
379
380 // copy inarray in case inarray == outarray
381 NekVector<NekDouble> in(m_ncoeffs, outarray, eCopy);
382 NekVector<NekDouble> out(m_ncoeffs, outarray, eWrapper);
383
384 out = (*matsys) * in;
385}
void IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Inner product of inarray over region with respect to the expansion basis (this)->_Base[0] and return ...
Definition: NodalTriExp.h:82
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
Definition: StdExpansion.h:367
static ConstFactorMap NullConstFactorMap
Definition: StdRegions.hpp:431
static VarCoeffMap NullVarCoeffMap
Definition: StdRegions.hpp:376
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr

References Nektar::StdRegions::StdExpansion::DetShapeType(), Nektar::eCopy, Nektar::StdRegions::eInvMass, Nektar::eWrapper, Nektar::LibUtilities::PointsKey::GetPointsType(), IProductWRTBase(), m_matrixManager, Nektar::StdRegions::StdExpansion::m_ncoeffs, Nektar::StdRegions::StdNodalTriExp::m_nodalPointsKey, Nektar::StdRegions::NullConstFactorMap, and Nektar::StdRegions::NullVarCoeffMap.

Referenced by v_FwdTrans().

◆ GeneralMatrixOp_MatOp()

void Nektar::LocalRegions::NodalTriExp::GeneralMatrixOp_MatOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
protected

Definition at line 387 of file NodalTriExp.cpp.

390{
392
393 if (inarray.get() == outarray.get())
394 {
395 Array<OneD, NekDouble> tmp(m_ncoeffs);
396 Vmath::Vcopy(m_ncoeffs, inarray.get(), 1, tmp.get(), 1);
397
398 Blas::Dgemv('N', m_ncoeffs, m_ncoeffs, mat->Scale(),
399 (mat->GetOwnedMatrix())->GetPtr().get(), m_ncoeffs,
400 tmp.get(), 1, 0.0, outarray.get(), 1);
401 }
402 else
403 {
404 Blas::Dgemv('N', m_ncoeffs, m_ncoeffs, mat->Scale(),
405 (mat->GetOwnedMatrix())->GetPtr().get(), m_ncoeffs,
406 inarray.get(), 1, 0.0, outarray.get(), 1);
407 }
408}
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
Definition: Expansion.cpp:84
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:211
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.hpp:825

References Blas::Dgemv(), Nektar::LocalRegions::Expansion::GetLocMatrix(), Nektar::StdRegions::StdExpansion::m_ncoeffs, and Vmath::Vcopy().

◆ GetCoord()

void Nektar::LocalRegions::NodalTriExp::GetCoord ( const Array< OneD, const NekDouble > &  Lcoords,
Array< OneD, NekDouble > &  coords 
)

Definition at line 418 of file NodalTriExp.cpp.

420{
421 int i;
422
423 ASSERTL1(Lcoords[0] >= -1.0 && Lcoords[1] <= 1.0 && Lcoords[1] >= -1.0 &&
424 Lcoords[1] <= 1.0,
425 "Local coordinates are not in region [-1,1]");
426
427 m_geom->FillGeom();
428
429 for (i = 0; i < m_geom->GetCoordim(); ++i)
430 {
431 coords[i] = m_geom->GetCoord(i, Lcoords);
432 }
433}
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Definition: ErrorUtil.hpp:242
SpatialDomains::GeometrySharedPtr m_geom
Definition: Expansion.h:273

References ASSERTL1, and Nektar::LocalRegions::Expansion::m_geom.

Referenced by v_GetCoord().

◆ GetCoords()

void Nektar::LocalRegions::NodalTriExp::GetCoords ( Array< OneD, NekDouble > &  coords_1,
Array< OneD, NekDouble > &  coords_2,
Array< OneD, NekDouble > &  coords_3 = NullNekDouble1DArray 
)

Definition at line 410 of file NodalTriExp.cpp.

413{
414 Expansion::v_GetCoords(coords_0, coords_1, coords_2);
415}
void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3) override
Definition: Expansion.cpp:530

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

Referenced by v_GetCoords().

◆ HelmholtzMatrixOp()

void Nektar::LocalRegions::NodalTriExp::HelmholtzMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
inline

Definition at line 156 of file NodalTriExp.h.

159 {
160 StdExpansion::HelmholtzMatrixOp_MatFree_GenericImpl(inarray, outarray,
161 mkey);
162 }

Referenced by v_HelmholtzMatrixOp().

◆ Integral()

NekDouble Nektar::LocalRegions::NodalTriExp::Integral ( const Array< OneD, const NekDouble > &  inarray)

Integrate the physical point list inarray over region.

Integrate the physical point list inarray over region and return the value.

Inputs:

  • inarray: definition of function to be returned at quadrature point of expansion.

Outputs:

  • returns \(\int^1_{-1}\int^1_{-1} u(\xi_1, \xi_2) J[i,j] d \xi_1 d \xi_2 \) where \(inarray[i,j] = u(\xi_{1i},\xi_{2j}) \) and \( J[i,j] \) is the Jacobian evaluated at the quadrature point.

Definition at line 90 of file NodalTriExp.cpp.

91{
92 int nquad0 = m_base[0]->GetNumPoints();
93 int nquad1 = m_base[1]->GetNumPoints();
94 Array<OneD, const NekDouble> jac = m_metricinfo->GetJac(GetPointsKeys());
95 NekDouble ival;
96 Array<OneD, NekDouble> tmp(nquad0 * nquad1);
97
98 // multiply inarray with Jacobian
99 if (m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
100 {
101 Vmath::Vmul(nquad0 * nquad1, jac, 1, inarray, 1, tmp, 1);
102 }
103 else
104 {
105 Vmath::Smul(nquad0 * nquad1, jac[0], inarray, 1, tmp, 1);
106 }
107
108 // call StdQuadExp version;
109 ival = StdNodalTriExp::v_Integral(tmp);
110 return ival;
111}
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
Definition: Expansion.h:274
const LibUtilities::PointsKeyVector GetPointsKeys() const
@ eDeformed
Geometry is curved or has non-constant factors.
double NekDouble
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.hpp:72
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
Definition: Vmath.hpp:100

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

Referenced by v_Integral().

◆ IProductWRTBase()

void Nektar::LocalRegions::NodalTriExp::IProductWRTBase ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Inner product of inarray over region with respect to the expansion basis (this)->_Base[0] and return in outarray.

Definition at line 82 of file NodalTriExp.h.

84 {
85 NodalTriExp::IProductWRTBase_SumFac(inarray, outarray);
86 }
void IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)

References IProductWRTBase_SumFac().

Referenced by FwdTrans(), and v_IProductWRTBase().

◆ IProductWRTBase_MatOp()

void Nektar::LocalRegions::NodalTriExp::IProductWRTBase_MatOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protected

Definition at line 142 of file NodalTriExp.cpp.

145{
146 int nq = GetTotPoints();
147 MatrixKey iprodmatkey(StdRegions::eIProductWRTBase, DetShapeType(), *this);
148 DNekScalMatSharedPtr iprodmat = m_matrixManager[iprodmatkey];
149
150 Blas::Dgemv('N', m_ncoeffs, nq, iprodmat->Scale(),
151 (iprodmat->GetOwnedMatrix())->GetPtr().get(), m_ncoeffs,
152 inarray.get(), 1, 0.0, outarray.get(), 1);
153}
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
Definition: StdExpansion.h:134

References Nektar::StdRegions::StdExpansion::DetShapeType(), Blas::Dgemv(), Nektar::StdRegions::eIProductWRTBase, Nektar::StdRegions::StdExpansion::GetTotPoints(), m_matrixManager, and Nektar::StdRegions::StdExpansion::m_ncoeffs.

◆ IProductWRTBase_SumFac()

void Nektar::LocalRegions::NodalTriExp::IProductWRTBase_SumFac ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
bool  multiplybyweights = true 
)
protected

Definition at line 113 of file NodalTriExp.cpp.

116{
117 int nquad0 = m_base[0]->GetNumPoints();
118 int nquad1 = m_base[1]->GetNumPoints();
119 int order1 = m_base[1]->GetNumModes();
120
121 if (multiplybyweights)
122 {
123 Array<OneD, NekDouble> tmp(nquad0 * nquad1 + nquad0 * order1);
124 Array<OneD, NekDouble> wsp(tmp + nquad0 * nquad1);
125
126 MultiplyByQuadratureMetric(inarray, tmp);
127 StdTriExp::IProductWRTBase_SumFacKernel(
128 m_base[0]->GetBdata(), m_base[1]->GetBdata(), tmp, outarray, wsp);
129 NodalToModalTranspose(outarray, outarray);
130 }
131 else
132 {
133 Array<OneD, NekDouble> wsp(nquad0 * order1);
134
135 StdTriExp::IProductWRTBase_SumFacKernel(m_base[0]->GetBdata(),
136 m_base[1]->GetBdata(), inarray,
137 outarray, wsp);
138 NodalToModalTranspose(outarray, outarray);
139 }
140}
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdExpansion.h:723
void NodalToModalTranspose(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)

References Nektar::StdRegions::StdExpansion::m_base, Nektar::StdRegions::StdExpansion::MultiplyByQuadratureMetric(), and Nektar::StdRegions::StdNodalTriExp::NodalToModalTranspose().

Referenced by IProductWRTBase(), and v_IProductWRTBase_SumFac().

◆ IProductWRTDerivBase()

void Nektar::LocalRegions::NodalTriExp::IProductWRTDerivBase ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 88 of file NodalTriExp.h.

91 {
92 NodalTriExp::IProductWRTDerivBase_SumFac(dir, inarray, outarray);
93 }
void IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)

References IProductWRTDerivBase_SumFac().

Referenced by v_IProductWRTDerivBase().

◆ IProductWRTDerivBase_MatOp()

void Nektar::LocalRegions::NodalTriExp::IProductWRTDerivBase_MatOp ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protected

Definition at line 251 of file NodalTriExp.cpp.

254{
255 int nq = GetTotPoints();
257
258 switch (dir)
259 {
260 case 0:
261 {
263 }
264 break;
265 case 1:
266 {
268 }
269 break;
270 case 2:
271 {
273 }
274 break;
275 default:
276 {
277 ASSERTL1(false, "input dir is out of range");
278 }
279 break;
280 }
281
282 MatrixKey iprodmatkey(mtype, DetShapeType(), *this);
283 DNekScalMatSharedPtr iprodmat = m_matrixManager[iprodmatkey];
284
285 Blas::Dgemv('N', m_ncoeffs, nq, iprodmat->Scale(),
286 (iprodmat->GetOwnedMatrix())->GetPtr().get(), m_ncoeffs,
287 inarray.get(), 1, 0.0, outarray.get(), 1);
288}

References ASSERTL1, Nektar::StdRegions::StdExpansion::DetShapeType(), Blas::Dgemv(), Nektar::StdRegions::eIProductWRTDerivBase0, Nektar::StdRegions::eIProductWRTDerivBase1, Nektar::StdRegions::eIProductWRTDerivBase2, Nektar::StdRegions::StdExpansion::GetTotPoints(), m_matrixManager, and Nektar::StdRegions::StdExpansion::m_ncoeffs.

◆ IProductWRTDerivBase_SumFac()

void Nektar::LocalRegions::NodalTriExp::IProductWRTDerivBase_SumFac ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protected

Definition at line 155 of file NodalTriExp.cpp.

158{
159 int nquad0 = m_base[0]->GetNumPoints();
160 int nquad1 = m_base[1]->GetNumPoints();
161 int nqtot = nquad0 * nquad1;
162 int wspsize = max(nqtot, m_ncoeffs);
163
164 Array<OneD, NekDouble> tmp0(4 * wspsize);
165 Array<OneD, NekDouble> tmp1(tmp0 + wspsize);
166 Array<OneD, NekDouble> tmp2(tmp0 + 2 * wspsize);
167 Array<OneD, NekDouble> tmp3(tmp0 + 3 * wspsize);
168
169 Array<OneD, Array<OneD, NekDouble>> tmp2D{2};
170 tmp2D[0] = tmp1;
171 tmp2D[1] = tmp2;
172
173 AlignVectorToCollapsedDir(dir, inarray, tmp2D);
174
175 MultiplyByQuadratureMetric(tmp1, tmp1);
176 MultiplyByQuadratureMetric(tmp2, tmp2);
177
178 IProductWRTBase_SumFacKernel(m_base[0]->GetDbdata(), m_base[1]->GetBdata(),
179 tmp1, tmp3, tmp0);
180 IProductWRTBase_SumFacKernel(m_base[0]->GetBdata(), m_base[1]->GetDbdata(),
181 tmp2, outarray, tmp0);
182 Vmath::Vadd(m_ncoeffs, tmp3, 1, outarray, 1, outarray, 1);
183
184 NodalToModalTranspose(outarray, outarray);
185}
void AlignVectorToCollapsedDir(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
Definition: Expansion.h:151
void IProductWRTBase_SumFacKernel(const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0=true, bool doCheckCollDir1=true)
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
Definition: Vmath.hpp:180

References Nektar::LocalRegions::Expansion::AlignVectorToCollapsedDir(), Nektar::StdRegions::StdExpansion2D::IProductWRTBase_SumFacKernel(), Nektar::StdRegions::StdExpansion::m_base, Nektar::StdRegions::StdExpansion::m_ncoeffs, Nektar::StdRegions::StdExpansion::MultiplyByQuadratureMetric(), Nektar::StdRegions::StdNodalTriExp::NodalToModalTranspose(), and Vmath::Vadd().

Referenced by IProductWRTDerivBase(), and v_IProductWRTDerivBase_SumFac().

◆ LaplacianMatrixOp() [1/2]

void Nektar::LocalRegions::NodalTriExp::LaplacianMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
inline

Definition at line 131 of file NodalTriExp.h.

134 {
135 StdExpansion::LaplacianMatrixOp_MatFree_GenericImpl(inarray, outarray,
136 mkey);
137 }

Referenced by v_LaplacianMatrixOp().

◆ LaplacianMatrixOp() [2/2]

void Nektar::LocalRegions::NodalTriExp::LaplacianMatrixOp ( const int  k1,
const int  k2,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
inline

Definition at line 139 of file NodalTriExp.h.

143 {
144 StdExpansion::LaplacianMatrixOp_MatFree(k1, k2, inarray, outarray,
145 mkey);
146 }

◆ MassMatrixOp()

void Nektar::LocalRegions::NodalTriExp::MassMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
inline

Definition at line 119 of file NodalTriExp.h.

122 {
123 StdExpansion::MassMatrixOp_MatFree(inarray, outarray, mkey);
124 }

Referenced by v_MassMatrixOp().

◆ PhysDeriv()

void Nektar::LocalRegions::NodalTriExp::PhysDeriv ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d0,
Array< OneD, NekDouble > &  out_d1,
Array< OneD, NekDouble > &  out_d2 = NullNekDouble1DArray 
)

Differentiation Methods.

Calculate the deritive of the physical points

Definition at line 297 of file NodalTriExp.cpp.

301{
302 int nquad0 = m_base[0]->GetNumPoints();
303 int nquad1 = m_base[1]->GetNumPoints();
304 int nqtot = nquad0 * nquad1;
305 const Array<TwoD, const NekDouble> &df =
306 m_metricinfo->GetDerivFactors(GetPointsKeys());
307
308 Array<OneD, NekDouble> diff0(2 * nqtot);
309 Array<OneD, NekDouble> diff1(diff0 + nqtot);
310
311 StdNodalTriExp::v_PhysDeriv(inarray, diff0, diff1);
312
313 if (m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
314 {
315 if (out_d0.size())
316 {
317 Vmath::Vmul(nqtot, df[0], 1, diff0, 1, out_d0, 1);
318 Vmath::Vvtvp(nqtot, df[1], 1, diff1, 1, out_d0, 1, out_d0, 1);
319 }
320
321 if (out_d1.size())
322 {
323 Vmath::Vmul(nqtot, df[2], 1, diff0, 1, out_d1, 1);
324 Vmath::Vvtvp(nqtot, df[3], 1, diff1, 1, out_d1, 1, out_d1, 1);
325 }
326
327 if (out_d2.size())
328 {
329 Vmath::Vmul(nqtot, df[4], 1, diff0, 1, out_d2, 1);
330 Vmath::Vvtvp(nqtot, df[5], 1, diff1, 1, out_d2, 1, out_d2, 1);
331 }
332 }
333 else // regular geometry
334 {
335 if (out_d0.size())
336 {
337 Vmath::Smul(nqtot, df[0][0], diff0, 1, out_d0, 1);
338 Blas::Daxpy(nqtot, df[1][0], diff1, 1, out_d0, 1);
339 }
340
341 if (out_d1.size())
342 {
343 Vmath::Smul(nqtot, df[2][0], diff0, 1, out_d1, 1);
344 Blas::Daxpy(nqtot, df[3][0], diff1, 1, out_d1, 1);
345 }
346
347 if (out_d2.size())
348 {
349 Vmath::Smul(nqtot, df[4][0], diff0, 1, out_d2, 1);
350 Blas::Daxpy(nqtot, df[5][0], diff1, 1, out_d2, 1);
351 }
352 }
353}
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:135
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 Blas::Daxpy(), Nektar::SpatialDomains::eDeformed, Nektar::StdRegions::StdExpansion::GetPointsKeys(), Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion::m_metricinfo, Vmath::Smul(), Vmath::Vmul(), and Vmath::Vvtvp().

Referenced by v_PhysDeriv().

◆ PhysEvaluate()

NekDouble Nektar::LocalRegions::NodalTriExp::PhysEvaluate ( const Array< OneD, const NekDouble > &  coord,
const Array< OneD, const NekDouble > &  physvals 
)

Definition at line 447 of file NodalTriExp.cpp.

451{
452 Array<OneD, NekDouble> Lcoord = Array<OneD, NekDouble>(2);
453
454 ASSERTL0(m_geom, "m_geom not defined");
455 m_geom->GetLocCoords(coord, Lcoord);
456
457 return StdExpansion2D::v_PhysEvaluate(Lcoord, physvals);
458}
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:208

References ASSERTL0, and Nektar::LocalRegions::Expansion::m_geom.

Referenced by v_PhysEvaluate().

◆ v_AlignVectorToCollapsedDir()

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

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 187 of file NodalTriExp.cpp.

190{
191 ASSERTL1((dir == 0) || (dir == 1) || (dir == 2), "Invalid direction.");
192 ASSERTL1((dir == 2) ? (m_geom->GetCoordim() == 3) : true,
193 "Invalid direction.");
194
195 int nquad0 = m_base[0]->GetNumPoints();
196 int nquad1 = m_base[1]->GetNumPoints();
197 int nqtot = nquad0 * nquad1;
198 int wspsize = max(nqtot, m_ncoeffs);
199
200 const Array<TwoD, const NekDouble> &df =
201 m_metricinfo->GetDerivFactors(GetPointsKeys());
202
203 Array<OneD, NekDouble> tmp0(4 * wspsize);
204 Array<OneD, NekDouble> tmp3(tmp0 + wspsize);
205 Array<OneD, NekDouble> gfac0(tmp0 + 2 * wspsize);
206 Array<OneD, NekDouble> gfac1(tmp0 + 3 * wspsize);
207
208 Array<OneD, NekDouble> tmp1 = outarray[0];
209 Array<OneD, NekDouble> tmp2 = outarray[1];
210
211 const Array<OneD, const NekDouble> &z0 = m_base[0]->GetZ();
212 const Array<OneD, const NekDouble> &z1 = m_base[1]->GetZ();
213
214 // set up geometric factor: 2/(1-z1)
215 for (int i = 0; i < nquad1; ++i)
216 {
217 gfac0[i] = 2.0 / (1 - z1[i]);
218 }
219 for (int i = 0; i < nquad0; ++i)
220 {
221 gfac1[i] = 0.5 * (1 + z0[i]);
222 }
223
224 for (int i = 0; i < nquad1; ++i)
225 {
226 Vmath::Smul(nquad0, gfac0[i], &inarray[0] + i * nquad0, 1,
227 &tmp0[0] + i * nquad0, 1);
228 }
229
230 for (int i = 0; i < nquad1; ++i)
231 {
232 Vmath::Vmul(nquad0, &gfac1[0], 1, &tmp0[0] + i * nquad0, 1,
233 &tmp1[0] + i * nquad0, 1);
234 }
235
236 if (m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
237 {
238 Vmath::Vmul(nqtot, &df[2 * dir][0], 1, &tmp0[0], 1, &tmp0[0], 1);
239 Vmath::Vmul(nqtot, &df[2 * dir + 1][0], 1, &tmp1[0], 1, &tmp1[0], 1);
240 Vmath::Vmul(nqtot, &df[2 * dir + 1][0], 1, &inarray[0], 1, &tmp2[0], 1);
241 }
242 else
243 {
244 Vmath::Smul(nqtot, df[2 * dir][0], tmp0, 1, tmp0, 1);
245 Vmath::Smul(nqtot, df[2 * dir + 1][0], tmp1, 1, tmp1, 1);
246 Vmath::Smul(nqtot, df[2 * dir + 1][0], inarray, 1, tmp2, 1);
247 }
248 Vmath::Vadd(nqtot, tmp0, 1, tmp1, 1, tmp1, 1);
249}

References ASSERTL1, Nektar::SpatialDomains::eDeformed, Nektar::StdRegions::StdExpansion::GetPointsKeys(), Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion::m_geom, Nektar::LocalRegions::Expansion::m_metricinfo, Nektar::StdRegions::StdExpansion::m_ncoeffs, Vmath::Smul(), Vmath::Vadd(), and Vmath::Vmul().

◆ v_BwdTrans_SumFac()

void Nektar::LocalRegions::NodalTriExp::v_BwdTrans_SumFac ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inlineoverrideprivatevirtual

Reimplemented from Nektar::StdRegions::StdNodalTriExp.

Definition at line 309 of file NodalTriExp.h.

311 {
312 StdNodalTriExp::v_BwdTrans_SumFac(inarray, outarray);
313 }

◆ v_ComputeTraceNormal()

void Nektar::LocalRegions::NodalTriExp::v_ComputeTraceNormal ( const int  edge)
overrideprivatevirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 511 of file NodalTriExp.cpp.

512{
513 int i;
514 const SpatialDomains::GeomFactorsSharedPtr &geomFactors =
515 GetGeom()->GetMetricInfo();
516 const SpatialDomains::GeomType type = geomFactors->GetGtype();
517
519 const Array<TwoD, const NekDouble> &df =
520 geomFactors->GetDerivFactors(ptsKeys);
521 const Array<OneD, const NekDouble> &jac = geomFactors->GetJac(ptsKeys);
522 int nqe = m_base[0]->GetNumPoints();
523 int dim = GetCoordim();
524
525 m_traceNormals[edge] = Array<OneD, Array<OneD, NekDouble>>(dim);
526 Array<OneD, Array<OneD, NekDouble>> &normal = m_traceNormals[edge];
527 for (i = 0; i < dim; ++i)
528 {
529 normal[i] = Array<OneD, NekDouble>(nqe);
530 }
531
532 size_t nqb = nqe;
533 size_t nbnd = edge;
534 m_elmtBndNormDirElmtLen[nbnd] = Array<OneD, NekDouble>{nqb, 0.0};
535 Array<OneD, NekDouble> &length = m_elmtBndNormDirElmtLen[nbnd];
536
537 // Regular geometry case
538 if ((type == SpatialDomains::eRegular) ||
540 {
541 NekDouble fac;
542 // Set up normals
543 switch (edge)
544 {
545 case 0:
546 for (i = 0; i < GetCoordim(); ++i)
547 {
548 Vmath::Fill(nqe, -df[2 * i + 1][0], normal[i], 1);
549 }
550 break;
551 case 1:
552 for (i = 0; i < GetCoordim(); ++i)
553 {
554 Vmath::Fill(nqe, df[2 * i + 1][0] + df[2 * i][0], normal[i],
555 1);
556 }
557 break;
558 case 2:
559 for (i = 0; i < GetCoordim(); ++i)
560 {
561 Vmath::Fill(nqe, -df[2 * i][0], normal[i], 1);
562 }
563 break;
564 default:
565 ASSERTL0(false, "Edge is out of range (edge < 3)");
566 }
567
568 // normalise
569 fac = 0.0;
570 for (i = 0; i < GetCoordim(); ++i)
571 {
572 fac += normal[i][0] * normal[i][0];
573 }
574 fac = 1.0 / sqrt(fac);
575
576 Vmath::Fill(nqb, fac, length, 1);
577
578 for (i = 0; i < GetCoordim(); ++i)
579 {
580 Vmath::Smul(nqe, fac, normal[i], 1, normal[i], 1);
581 }
582 }
583 else // Set up deformed normals
584 {
585 int j;
586
587 int nquad0 = ptsKeys[0].GetNumPoints();
588 int nquad1 = ptsKeys[1].GetNumPoints();
589
590 LibUtilities::PointsKey from_key;
591
592 Array<OneD, NekDouble> normals(GetCoordim() * max(nquad0, nquad1), 0.0);
593 Array<OneD, NekDouble> edgejac(GetCoordim() * max(nquad0, nquad1), 0.0);
594
595 // Extract Jacobian along edges and recover local
596 // derivates (dx/dr) for polynomial interpolation by
597 // multiplying m_gmat by jacobian
598 switch (edge)
599 {
600 case 0:
601 for (j = 0; j < nquad0; ++j)
602 {
603 edgejac[j] = jac[j];
604 for (i = 0; i < GetCoordim(); ++i)
605 {
606 normals[i * nquad0 + j] =
607 -df[2 * i + 1][j] * edgejac[j];
608 }
609 }
610 from_key = ptsKeys[0];
611 break;
612 case 1:
613 for (j = 0; j < nquad1; ++j)
614 {
615 edgejac[j] = jac[nquad0 * j + nquad0 - 1];
616 for (i = 0; i < GetCoordim(); ++i)
617 {
618 normals[i * nquad1 + j] =
619 (df[2 * i][nquad0 * j + nquad0 - 1] +
620 df[2 * i + 1][nquad0 * j + nquad0 - 1]) *
621 edgejac[j];
622 }
623 }
624 from_key = ptsKeys[1];
625 break;
626 case 2:
627 for (j = 0; j < nquad1; ++j)
628 {
629 edgejac[j] = jac[nquad0 * j];
630 for (i = 0; i < GetCoordim(); ++i)
631 {
632 normals[i * nquad1 + j] =
633 -df[2 * i][nquad0 * j] * edgejac[j];
634 }
635 }
636 from_key = ptsKeys[1];
637 break;
638 default:
639 ASSERTL0(false, "edge is out of range (edge < 3)");
640 }
641
642 int nq = from_key.GetNumPoints();
643 Array<OneD, NekDouble> work(nqe, 0.0);
644
645 // interpolate Jacobian and invert
646 LibUtilities::Interp1D(from_key, jac, m_base[0]->GetPointsKey(), work);
647 Vmath::Sdiv(nq, 1.0, &work[0], 1, &work[0], 1);
648
649 // interpolate
650 for (i = 0; i < GetCoordim(); ++i)
651 {
652 LibUtilities::Interp1D(from_key, &normals[i * nq],
653 m_base[0]->GetPointsKey(), &normal[i][0]);
654 Vmath::Vmul(nqe, work, 1, normal[i], 1, normal[i], 1);
655 }
656
657 // normalise normal vectors
658 Vmath::Zero(nqe, work, 1);
659 for (i = 0; i < GetCoordim(); ++i)
660 {
661 Vmath::Vvtvp(nqe, normal[i], 1, normal[i], 1, work, 1, work, 1);
662 }
663
664 Vmath::Vsqrt(nqe, work, 1, work, 1);
665 Vmath::Sdiv(nqe, 1.0, work, 1, work, 1);
666
667 Vmath::Vcopy(nqb, work, 1, length, 1);
668
669 for (i = 0; i < GetCoordim(); ++i)
670 {
671 Vmath::Vmul(nqe, normal[i], 1, work, 1, normal[i], 1);
672 }
673
674 // Reverse direction so that points are in
675 // anticlockwise direction if edge >=2
676 if (edge >= 2)
677 {
678 for (i = 0; i < GetCoordim(); ++i)
679 {
680 Vmath::Reverse(nqe, normal[i], 1, normal[i], 1);
681 }
682 }
683 }
684}
std::map< int, NormalVector > m_traceNormals
Definition: Expansion.h:276
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:286
SpatialDomains::GeometrySharedPtr GetGeom() const
Definition: Expansion.cpp:167
void Interp1D(const BasisKey &fbasis0, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, Array< OneD, NekDouble > &to)
this function interpolates a 1D function evaluated at the quadrature points of the basis fbasis0 to ...
Definition: Interp.cpp:47
std::vector< PointsKey > PointsKeyVector
Definition: Points.h:231
std::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
Definition: GeomFactors.h:60
GeomType
Indicates the type of element geometry.
@ eRegular
Geometry is straight-sided with constant geometric factors.
@ eMovingRegular
Currently unused.
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
Definition: Vmath.hpp:340
void Sdiv(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha/x.
Definition: Vmath.hpp:154
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.hpp:273
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition: Vmath.hpp:54
void Reverse(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.hpp:844
scalarT< T > sqrt(scalarT< T > in)
Definition: scalar.hpp:294

References ASSERTL0, Nektar::SpatialDomains::eMovingRegular, Nektar::SpatialDomains::eRegular, Vmath::Fill(), Nektar::StdRegions::StdExpansion::GetCoordim(), Nektar::LocalRegions::Expansion::GetGeom(), Nektar::LibUtilities::PointsKey::GetNumPoints(), Nektar::StdRegions::StdExpansion::GetPointsKeys(), Nektar::LibUtilities::Interp1D(), Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion::m_elmtBndNormDirElmtLen, Nektar::LocalRegions::Expansion::m_traceNormals, Vmath::Reverse(), Vmath::Sdiv(), Vmath::Smul(), tinysimd::sqrt(), Vmath::Vcopy(), Vmath::Vmul(), Vmath::Vsqrt(), Vmath::Vvtvp(), and Vmath::Zero().

◆ v_CreateStdMatrix()

DNekMatSharedPtr Nektar::LocalRegions::NodalTriExp::v_CreateStdMatrix ( const StdRegions::StdMatrixKey mkey)
inlineoverrideprivatevirtual

Reimplemented from Nektar::StdRegions::StdNodalTriExp.

Definition at line 287 of file NodalTriExp.h.

289 {
290 return CreateStdMatrix(mkey);
291 }
DNekMatSharedPtr CreateStdMatrix(const StdRegions::StdMatrixKey &mkey)

References CreateStdMatrix().

◆ v_DropLocMatrix()

void Nektar::LocalRegions::NodalTriExp::v_DropLocMatrix ( const MatrixKey mkey)
inlineoverrideprivatevirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 298 of file NodalTriExp.h.

299 {
300 m_matrixManager.DeleteObject(mkey);
301 }

References m_matrixManager.

◆ v_FwdTrans()

void Nektar::LocalRegions::NodalTriExp::v_FwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inlineoverrideprivatevirtual

Virtual call to SegExp::FwdTrans.

Reimplemented from Nektar::StdRegions::StdNodalTriExp.

Definition at line 273 of file NodalTriExp.h.

275 {
276 FwdTrans(inarray, outarray);
277 }
void FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Forward transform from physical quadrature space stored in inarray and evaluate the expansion coeffic...

References FwdTrans().

◆ v_GenMatrix()

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

Reimplemented from Nektar::StdRegions::StdNodalTriExp.

Definition at line 490 of file NodalTriExp.cpp.

491{
492 DNekMatSharedPtr returnval;
493
494 switch (mkey.GetMatrixType())
495 {
502 returnval = Expansion2D::v_GenMatrix(mkey);
503 break;
504 default:
505 returnval = StdNodalTriExp::v_GenMatrix(mkey);
506 break;
507 }
508 return returnval;
509}
DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey) override
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:75

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::Expansion2D::v_GenMatrix().

◆ v_GetCoord()

void Nektar::LocalRegions::NodalTriExp::v_GetCoord ( const Array< OneD, const NekDouble > &  lcoord,
Array< OneD, NekDouble > &  coord 
)
inlineoverrideprivatevirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 204 of file NodalTriExp.h.

206 {
207 GetCoord(lcoord, coord);
208 }
void GetCoord(const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords)

References GetCoord().

◆ v_GetCoords()

void Nektar::LocalRegions::NodalTriExp::v_GetCoords ( Array< OneD, NekDouble > &  coords_0,
Array< OneD, NekDouble > &  coords_1 = NullNekDouble1DArray,
Array< OneD, NekDouble > &  coords_2 = NullNekDouble1DArray 
)
inlineoverrideprivatevirtual

Reimplemented from Nektar::StdRegions::StdTriExp.

Definition at line 196 of file NodalTriExp.h.

200 {
201 GetCoords(coords_0, coords_1, coords_2);
202 }
void GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3=NullNekDouble1DArray)

References GetCoords().

◆ v_GetLinStdExp()

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

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 479 of file NodalTriExp.cpp.

480{
481 LibUtilities::BasisKey bkey0(m_base[0]->GetBasisType(), 2,
482 m_base[0]->GetPointsKey());
483 LibUtilities::BasisKey bkey1(m_base[1]->GetBasisType(), 2,
484 m_base[1]->GetPointsKey());
485
487 bkey0, bkey1, m_nodalPointsKey.GetPointsType());
488}
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
Definition: StdExpansion.h:156

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::StdRegions::StdExpansion::GetBasisType(), Nektar::LibUtilities::PointsKey::GetPointsType(), Nektar::StdRegions::StdExpansion::m_base, and Nektar::StdRegions::StdNodalTriExp::m_nodalPointsKey.

◆ v_GetLocMatrix()

DNekScalMatSharedPtr Nektar::LocalRegions::NodalTriExp::v_GetLocMatrix ( const MatrixKey mkey)
inlineoverrideprivatevirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 293 of file NodalTriExp.h.

294 {
295 return m_matrixManager[mkey];
296 }

References m_matrixManager.

◆ v_GetLocStaticCondMatrix()

DNekScalBlkMatSharedPtr Nektar::LocalRegions::NodalTriExp::v_GetLocStaticCondMatrix ( const MatrixKey mkey)
inlineoverrideprivatevirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 303 of file NodalTriExp.h.

305 {
306 return m_staticCondMatrixManager[mkey];
307 }

References m_staticCondMatrixManager.

◆ v_GetStdExp()

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

◆ v_HelmholtzMatrixOp()

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

Reimplemented from Nektar::StdRegions::StdNodalTriExp.

Definition at line 364 of file NodalTriExp.h.

367 {
368 HelmholtzMatrixOp(inarray, outarray, mkey);
369 }
void HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition: NodalTriExp.h:156

References HelmholtzMatrixOp().

◆ v_Integral()

NekDouble Nektar::LocalRegions::NodalTriExp::v_Integral ( const Array< OneD, const NekDouble > &  inarray)
inlineoverrideprivatevirtual

Virtual call to integrate the physical point list inarray over region (see SegExp::Integral)

Reimplemented from Nektar::StdRegions::StdTriExp.

Definition at line 212 of file NodalTriExp.h.

213 {
214 return Integral(inarray);
215 }
NekDouble Integral(const Array< OneD, const NekDouble > &inarray)
Integrate the physical point list inarray over region.
Definition: NodalTriExp.cpp:90

References Integral().

◆ v_IProductWRTBase()

void Nektar::LocalRegions::NodalTriExp::v_IProductWRTBase ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inlineoverrideprivatevirtual

Virtual call to TriExp::IProduct_WRT_B.

Reimplemented from Nektar::StdRegions::StdNodalTriExp.

Definition at line 218 of file NodalTriExp.h.

220 {
221 IProductWRTBase(inarray, outarray);
222 }

References IProductWRTBase().

◆ v_IProductWRTBase_SumFac()

void Nektar::LocalRegions::NodalTriExp::v_IProductWRTBase_SumFac ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
bool  multiplybyweights = true 
)
inlineoverrideprivatevirtual

Reimplemented from Nektar::StdRegions::StdNodalTriExp.

Definition at line 315 of file NodalTriExp.h.

319 {
320 IProductWRTBase_SumFac(inarray, outarray);
321 }

References IProductWRTBase_SumFac().

◆ v_IProductWRTDerivBase()

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

Reimplemented from Nektar::StdRegions::StdNodalTriExp.

Definition at line 224 of file NodalTriExp.h.

227 {
228 IProductWRTDerivBase(dir, inarray, outarray);
229 }
void IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: NodalTriExp.h:88

References IProductWRTDerivBase().

◆ v_IProductWRTDerivBase_SumFac()

void Nektar::LocalRegions::NodalTriExp::v_IProductWRTDerivBase_SumFac ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inlineoverrideprivatevirtual

Reimplemented from Nektar::StdRegions::StdNodalTriExp.

Definition at line 323 of file NodalTriExp.h.

326 {
327 IProductWRTDerivBase_SumFac(dir, inarray, outarray);
328 }

References IProductWRTDerivBase_SumFac().

◆ v_LaplacianMatrixOp() [1/2]

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

Reimplemented from Nektar::StdRegions::StdNodalTriExp.

Definition at line 341 of file NodalTriExp.h.

344 {
345 LaplacianMatrixOp(inarray, outarray, mkey);
346 }
void LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition: NodalTriExp.h:131

References LaplacianMatrixOp().

◆ v_LaplacianMatrixOp() [2/2]

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

Reimplemented from Nektar::StdRegions::StdNodalTriExp.

Definition at line 348 of file NodalTriExp.h.

352 {
353 LaplacianMatrixOp(k1, k2, inarray, outarray, mkey);
354 }

References LaplacianMatrixOp().

◆ v_MassMatrixOp()

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

Reimplemented from Nektar::StdRegions::StdNodalTriExp.

Definition at line 334 of file NodalTriExp.h.

337 {
338 MassMatrixOp(inarray, outarray, mkey);
339 }
void MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition: NodalTriExp.h:119

References MassMatrixOp().

◆ v_PhysDeriv() [1/2]

void Nektar::LocalRegions::NodalTriExp::v_PhysDeriv ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d0,
Array< OneD, NekDouble > &  out_d1,
Array< OneD, NekDouble > &  out_d2 = NullNekDouble1DArray 
)
inlineoverrideprivatevirtual

Calculate the derivative of the physical points.

\( \frac{\partial u}{\partial x_1} = \left . \frac{2.0}{1-\eta_2} \frac{\partial u}{\partial d\eta_1} \right |_{\eta_2}\)

\( \frac{\partial u}{\partial x_2} = \left . \frac{1+\eta_1}{1-\eta_2} \frac{\partial u}{\partial d\eta_1} \right |_{\eta_2} + \left . \frac{\partial u}{\partial d\eta_2} \right |_{\eta_1} \)

Reimplemented from Nektar::StdRegions::StdTriExp.

Definition at line 239 of file NodalTriExp.h.

244 {
245 PhysDeriv(inarray, out_d0, out_d1);
246 }
void PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
Differentiation Methods.

References PhysDeriv().

◆ v_PhysDeriv() [2/2]

void Nektar::LocalRegions::NodalTriExp::v_PhysDeriv ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d0 
)
inlineoverrideprivatevirtual

Calculate the derivative of the physical points in a given direction.

See also
StdRegions::StdExpansion::PhysDeriv

Reimplemented from Nektar::StdRegions::StdTriExp.

Definition at line 248 of file NodalTriExp.h.

250 {
251 Array<OneD, NekDouble> tmp;
252 switch (dir)
253 {
254 case 0:
255 {
256 PhysDeriv(inarray, outarray, tmp);
257 }
258 break;
259 case 1:
260 {
261 PhysDeriv(inarray, tmp, outarray);
262 }
263 break;
264 default:
265 {
266 ASSERTL1(dir >= 0 && dir < 2, "input dir is out of range");
267 }
268 break;
269 }
270 }

References ASSERTL1, and PhysDeriv().

◆ v_PhysEvaluate() [1/2]

NekDouble Nektar::LocalRegions::NodalTriExp::v_PhysEvaluate ( const Array< OneD, const NekDouble > &  coord,
const Array< OneD, const NekDouble > &  physvals 
)
inlineoverrideprivatevirtual

Virtual call to TriExp::Evaluate.

Reimplemented from Nektar::StdRegions::StdExpansion2D.

Definition at line 280 of file NodalTriExp.h.

283 {
284 return PhysEvaluate(coord, physvals);
285 }
NekDouble PhysEvaluate(const Array< OneD, const NekDouble > &coord, const Array< OneD, const NekDouble > &physvals)

References PhysEvaluate().

◆ v_PhysEvaluate() [2/2]

NekDouble Nektar::LocalRegions::NodalTriExp::v_PhysEvaluate ( const Array< OneD, NekDouble > &  coord,
const Array< OneD, const NekDouble > &  inarray,
std::array< NekDouble, 3 > &  firstOrderDerivs 
)
finalvirtual

Reimplemented from Nektar::StdRegions::StdExpansion2D.

Definition at line 460 of file NodalTriExp.cpp.

464{
465 Array<OneD, NekDouble> Lcoord(2);
466 ASSERTL0(m_geom, "m_geom not defined");
467 m_geom->GetLocCoords(coord, Lcoord);
468 return StdExpansion2D::v_PhysEvaluate(Lcoord, inarray, firstOrderDerivs);
469}

References ASSERTL0, and Nektar::LocalRegions::Expansion::m_geom.

◆ v_StdPhysDeriv()

void Nektar::LocalRegions::NodalTriExp::v_StdPhysDeriv ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d0,
Array< OneD, NekDouble > &  out_d1,
Array< OneD, NekDouble > &  out_d2 = NullNekDouble1DArray 
)
inlineoverrideprivatevirtual

Reimplemented from Nektar::StdRegions::StdTriExp.

Definition at line 231 of file NodalTriExp.h.

235 {
236 StdTriExp::v_PhysDeriv(inarray, out_d0, out_d1, out_d2);
237 }

◆ v_WeakDerivMatrixOp()

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

Reimplemented from Nektar::StdRegions::StdNodalTriExp.

Definition at line 356 of file NodalTriExp.h.

360 {
361 WeakDerivMatrixOp(i, inarray, outarray, mkey);
362 }
void WeakDerivMatrixOp(const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
Definition: NodalTriExp.h:148

References WeakDerivMatrixOp().

◆ WeakDerivMatrixOp()

void Nektar::LocalRegions::NodalTriExp::WeakDerivMatrixOp ( const int  i,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
inline

Definition at line 148 of file NodalTriExp.h.

152 {
153 StdExpansion::WeakDerivMatrixOp_MatFree(i, inarray, outarray, mkey);
154 }

Referenced by v_WeakDerivMatrixOp().

Member Data Documentation

◆ m_matrixManager

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

◆ m_staticCondMatrixManager

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

Definition at line 194 of file NodalTriExp.h.

Referenced by v_GetLocStaticCondMatrix().