Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
Nektar::StdRegions::StdExpansion Class Referenceabstract

The base class for all shapes. More...

#include <StdExpansion.h>

Inheritance diagram for Nektar::StdRegions::StdExpansion:
Inheritance graph
[legend]
Collaboration diagram for Nektar::StdRegions::StdExpansion:
Collaboration graph
[legend]

Public Member Functions

 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::BasisSharedPtr
GetBasis (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 GetNedges () const
 This function returns the number of edges of the expansion domain. More...
 
int GetEdgeNcoeffs (const int i) const
 This function returns the number of expansion coefficients belonging to the i-th edge. More...
 
int GetTotalEdgeIntNcoeffs () const
 
int GetEdgeNumPoints (const int i) const
 This function returns the number of quadrature points belonging to the i-th edge. More...
 
int DetCartesianDirOfEdge (const int edge)
 
const LibUtilities::BasisKey DetEdgeBasisKey (const int i) const
 
const LibUtilities::BasisKey DetFaceBasisKey (const int i, const int k) const
 
int GetFaceNumPoints (const int i) const
 This function returns the number of quadrature points belonging to the i-th face. More...
 
int GetFaceNcoeffs (const int i) const
 This function returns the number of expansion coefficients belonging to the i-th face. More...
 
int GetFaceIntNcoeffs (const int i) const
 
int GetTotalFaceIntNcoeffs () const
 
int GetTraceNcoeffs (const int i) const
 This function returns the number of expansion coefficients belonging to the i-th edge/face. More...
 
LibUtilities::PointsKey GetFacePointsKey (const int i, const int j) const
 
int NumBndryCoeffs (void) const
 
int NumDGBndryCoeffs (void) const
 
LibUtilities::BasisType GetEdgeBasisType (const int i) const
 This function returns the type of expansion basis on the i-th edge. More...
 
const LibUtilities::PointsKey GetNodalPointsKey () const
 This function returns the type of expansion Nodal point type if defined. More...
 
int GetNfaces () const
 This function returns the number of faces of the expansion domain. More...
 
int GetNtrace () 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...
 
boost::shared_ptr< StdExpansionGetStdExp (void) const
 
int GetShapeDimension () const
 
bool IsBoundaryInteriorExpansion ()
 
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 FwdTrans_BndConstrained (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)
 
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)
 
IndexMapValuesSharedPtr GetIndexMap (const IndexMapKey &ikey)
 
const Array< OneD, const
NekDouble > & 
GetPhysNormals (void)
 
void SetPhysNormals (Array< OneD, const NekDouble > &normal)
 
virtual void SetUpPhysNormals (const int edge)
 
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)
 
StdRegions::Orientation GetForient (int face)
 
StdRegions::Orientation GetEorient (int edge)
 
StdRegions::Orientation GetPorient (int point)
 
StdRegions::Orientation GetCartesianEorient (int edge)
 
void SetCoeffsToOrientation (Array< OneD, NekDouble > &coeffs, StdRegions::Orientation dir)
 
void SetCoeffsToOrientation (StdRegions::Orientation dir, Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
int CalcNumberOfCoefficients (const std::vector< unsigned int > &nummodes, int &modes_offset)
 
void ExtractDataToCoeffs (const NekDouble *data, const std::vector< unsigned int > &nummodes, const int nmodes_offset, NekDouble *coeffs)
 
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 GetEdgeInteriorMap (const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
 
void GetFaceInteriorMap (const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
 
void GetEdgeToElementMap (const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int P=-1)
 
void GetFaceToElementMap (const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int nummodesA=-1, int nummodesB=-1)
 
void GetEdgePhysVals (const int edge, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 Extract the physical values along edge edge from inarray into outarray following the local edge orientation and point distribution defined by defined in EdgeExp. More...
 
void GetEdgePhysVals (const int edge, const boost::shared_ptr< StdExpansion > &EdgeExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void GetTracePhysVals (const int edge, const boost::shared_ptr< StdExpansion > &EdgeExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void GetVertexPhysVals (const int vertex, const Array< OneD, const NekDouble > &inarray, NekDouble &outarray)
 
void GetEdgeInterpVals (const int edge, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void GetEdgeQFactors (const int edge, 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 GetFacePhysVals (const int face, const boost::shared_ptr< StdExpansion > &FaceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient=eNoOrientation)
 
void GetEdgePhysMap (const int edge, Array< OneD, int > &outarray)
 
void GetFacePhysMap (const int face, Array< OneD, int > &outarray)
 
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 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 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)
 
void AddRobinMassMatrix (const int edgeid, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat)
 
void AddRobinEdgeContribution (const int edgeid, const Array< OneD, const NekDouble > &primCoeffs, Array< OneD, NekDouble > &coeffs)
 
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, DNekMatSharedPtr > &I, const Array< OneD, const NekDouble > &physvals)
 This function evaluates the expansion at a single (arbitrary) point 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...
 
const boost::shared_ptr
< SpatialDomains::GeomFactors > & 
GetMetricInfo (void) const
 
virtual int v_GetElmtId ()
 Get the element id of this expansion when used in a list by returning value of m_elmt_id. More...
 
virtual const Array< OneD,
const NekDouble > & 
v_GetPhysNormals (void)
 
virtual void v_SetPhysNormals (Array< OneD, const NekDouble > &normal)
 
virtual void v_SetUpPhysNormals (const int edge)
 
virtual int v_CalcNumberOfCoefficients (const std::vector< unsigned int > &nummodes, int &modes_offset)
 
virtual void v_ExtractDataToCoeffs (const NekDouble *data, const std::vector< unsigned int > &nummodes, const int nmode_offset, NekDouble *coeffs)
 Unpack data from input file assuming it comes from the same expansion type. More...
 
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)
 
virtual StdRegions::Orientation v_GetForient (int face)
 
virtual StdRegions::Orientation v_GetEorient (int edge)
 
virtual StdRegions::Orientation v_GetCartesianEorient (int edge)
 
virtual StdRegions::Orientation v_GetPorient (int point)
 
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 NormalVectorGetEdgeNormal (const int edge) const
 
void ComputeEdgeNormal (const int edge)
 
void NegateEdgeNormal (const int edge)
 
bool EdgeNormalNegated (const int edge)
 
void ComputeFaceNormal (const int face)
 
void NegateFaceNormal (const int face)
 
bool FaceNormalNegated (const int face)
 
void ComputeVertexNormal (const int vertex)
 
const NormalVectorGetFaceNormal (const int face) const
 
const NormalVectorGetVertexNormal (const int vertex) const
 
const NormalVectorGetSurfaceNormal (const int id) const
 
const LibUtilities::PointsKeyVector GetPointsKeys () const
 
Array< OneD, unsigned int > GetEdgeInverseBoundaryMap (int eid)
 
Array< OneD, unsigned int > GetFaceInverseBoundaryMap (int fid, StdRegions::Orientation faceOrient=eNoOrientation)
 
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 >
boost::shared_ptr< T > as ()
 
void IProductWRTBase_SumFac (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
 

Protected Member Functions

DNekMatSharedPtr CreateStdMatrix (const StdMatrixKey &mkey)
 
DNekBlkMatSharedPtr CreateStdStaticCondMatrix (const StdMatrixKey &mkey)
 Create the static condensation of a matrix when using a boundary interior decomposition. More...
 
IndexMapValuesSharedPtr CreateIndexMap (const IndexMapKey &ikey)
 Create an IndexMap which contains mapping information linking any specific element shape with either its boundaries, edges, faces, verteces, etc. More...
 
void BwdTrans_MatOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
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 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 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)
 

Protected Attributes

Array< OneD,
LibUtilities::BasisSharedPtr
m_base
 
int m_elmt_id
 
int m_ncoeffs
 
LibUtilities::NekManager
< StdMatrixKey, DNekMat,
StdMatrixKey::opLess
m_stdMatrixManager
 
LibUtilities::NekManager
< StdMatrixKey, DNekBlkMat,
StdMatrixKey::opLess
m_stdStaticCondMatrixManager
 
LibUtilities::NekManager
< IndexMapKey, IndexMapValues,
IndexMapKey::opLess
m_IndexMapManager
 

Private Member Functions

virtual int v_GetNverts () const =0
 
virtual int v_GetNedges () const
 
virtual int v_GetNfaces () const
 
virtual int v_NumBndryCoeffs () const
 
virtual int v_NumDGBndryCoeffs () const
 
virtual int v_GetEdgeNcoeffs (const int i) const
 
virtual int v_GetTotalEdgeIntNcoeffs () const
 
virtual int v_GetEdgeNumPoints (const int i) const
 
virtual int v_DetCartesianDirOfEdge (const int edge)
 
virtual const
LibUtilities::BasisKey 
v_DetEdgeBasisKey (const int i) const
 
virtual const
LibUtilities::BasisKey 
v_DetFaceBasisKey (const int i, const int k) const
 
virtual int v_GetFaceNumPoints (const int i) const
 
virtual int v_GetFaceNcoeffs (const int i) const
 
virtual int v_GetFaceIntNcoeffs (const int i) const
 
virtual int v_GetTotalFaceIntNcoeffs () const
 
virtual int v_GetTraceNcoeffs (const int i) const
 
virtual LibUtilities::PointsKey v_GetFacePointsKey (const int i, const int j) const
 
virtual LibUtilities::BasisType v_GetEdgeBasisType (const int i) const
 
virtual const
LibUtilities::PointsKey 
v_GetNodalPointsKey () const
 
virtual LibUtilities::ShapeType v_DetShapeType () const
 
virtual boost::shared_ptr
< StdExpansion
v_GetStdExp (void) const
 
virtual int v_GetShapeDimension () const
 
virtual bool v_IsBoundaryInteriorExpansion ()
 
virtual bool v_IsNodalNonTensorialExp ()
 
virtual void v_BwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)=0
 
virtual void v_FwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)=0
 Transform a given function from physical quadrature space to coefficient space. More...
 
virtual void v_IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)=0
 Calculates the inner product of a given function f with the different modes of the expansion. More...
 
virtual void v_IProductWRTBase (const Array< OneD, const NekDouble > &base, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, int coll_check)
 
virtual void v_IProductWRTDerivBase (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_FwdTrans_BndConstrained (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual NekDouble v_Integral (const Array< OneD, const NekDouble > &inarray)
 Integrates the specified function over the domain. More...
 
virtual void v_PhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2, Array< OneD, NekDouble > &out_d3)
 Calculate the derivative of the physical points. More...
 
virtual void v_PhysDeriv_s (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_ds)
 
virtual void v_PhysDeriv_n (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_dn)
 
virtual void v_PhysDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0)
 Calculate the derivative of the physical points in a given direction. More...
 
virtual void v_PhysDirectionalDeriv (const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &direction, Array< OneD, NekDouble > &outarray)
 Physical derivative along a direction vector. More...
 
virtual void v_StdPhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2, Array< OneD, NekDouble > &out_d3)
 
virtual void v_StdPhysDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_AddRobinMassMatrix (const int edgeid, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat)
 
virtual void v_AddRobinEdgeContribution (const int edgeid, const Array< OneD, const NekDouble > &primCoeffs, Array< OneD, NekDouble > &coeffs)
 
virtual NekDouble v_PhysEvaluate (const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &physvals)
 
virtual NekDouble v_PhysEvaluate (const Array< OneD, DNekMatSharedPtr > &I, const Array< OneD, const NekDouble > &physvals)
 
virtual void v_LocCoordToLocCollapsed (const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
 
virtual void v_FillMode (const int mode, Array< OneD, NekDouble > &outarray)
 
virtual DNekMatSharedPtr v_GenMatrix (const StdMatrixKey &mkey)
 
virtual DNekMatSharedPtr v_CreateStdMatrix (const StdMatrixKey &mkey)
 
virtual void v_GetCoords (Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2)
 
virtual void v_GetCoord (const Array< OneD, const NekDouble > &Lcoord, Array< OneD, NekDouble > &coord)
 
virtual int v_GetCoordim (void)
 
virtual void v_GetBoundaryMap (Array< OneD, unsigned int > &outarray)
 
virtual void v_GetInteriorMap (Array< OneD, unsigned int > &outarray)
 
virtual int v_GetVertexMap (int localVertexId, bool useCoeffPacking=false)
 
virtual void v_GetEdgeInteriorMap (const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
 
virtual void v_GetFaceInteriorMap (const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
 
virtual void v_GetEdgeToElementMap (const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int P=-1)
 
virtual void v_GetFaceToElementMap (const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int nummodesA=-1, int nummodesB=-1)
 
virtual void v_GetEdgePhysVals (const int edge, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 Extract the physical values along edge edge from inarray into outarray following the local edge orientation and point distribution defined by defined in EdgeExp. More...
 
virtual void v_GetEdgePhysVals (const int edge, const boost::shared_ptr< StdExpansion > &EdgeExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_GetTracePhysVals (const int edge, const boost::shared_ptr< StdExpansion > &EdgeExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient=eNoOrientation)
 
virtual void v_GetVertexPhysVals (const int vertex, const Array< OneD, const NekDouble > &inarray, NekDouble &outarray)
 
virtual void v_GetEdgeInterpVals (const int edge, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_GetEdgeQFactors (const int edge, Array< OneD, NekDouble > &outarray)
 
virtual void v_GetFacePhysVals (const int face, const boost::shared_ptr< StdExpansion > &FaceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient)
 
virtual void v_GetEdgePhysMap (const int edge, Array< OneD, int > &outarray)
 
virtual void v_GetFacePhysMap (const int face, Array< OneD, int > &outarray)
 
virtual void v_MultiplyByQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_MultiplyByStdQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual const
boost::shared_ptr
< SpatialDomains::GeomFactors > & 
v_GetMetricInfo () const
 
virtual void v_BwdTrans_SumFac (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_IProductWRTBase_SumFac (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
 
virtual void v_IProductWRTDerivBase_SumFac (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_MassMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_LaplacianMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_SVVLaplacianFilter (Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
 
virtual void v_ReduceOrderCoeffs (int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_LaplacianMatrixOp (const int k1, const int k2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_WeakDerivMatrixOp (const int i, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_WeakDirectionalDerivMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_MassLevelCurvatureMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_LinearAdvectionDiffusionReactionMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey, bool addDiffusionTerm=true)
 
virtual void v_HelmholtzMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_LaplacianMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual void v_LaplacianMatrixOp_MatFree_Kernel (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
 
virtual void v_HelmholtzMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
 
virtual const NormalVectorv_GetEdgeNormal (const int edge) const
 
virtual void v_ComputeEdgeNormal (const int edge)
 
virtual void v_NegateEdgeNormal (const int edge)
 
virtual bool v_EdgeNormalNegated (const int edge)
 
virtual void v_ComputeFaceNormal (const int face)
 
virtual void v_NegateFaceNormal (const int face)
 
virtual bool v_FaceNormalNegated (const int face)
 
virtual const NormalVectorv_GetVertexNormal (const int vertex) const
 
virtual void v_ComputeVertexNormal (const int vertex)
 
virtual const NormalVectorv_GetFaceNormal (const int face) const
 
virtual const NormalVectorv_GetSurfaceNormal (const int id) const
 
virtual Array< OneD, unsigned int > v_GetEdgeInverseBoundaryMap (int eid)
 
virtual Array< OneD, unsigned int > v_GetFaceInverseBoundaryMap (int fid, StdRegions::Orientation faceOrient=eNoOrientation)
 
virtual DNekMatSharedPtr v_BuildInverseTransformationMatrix (const DNekScalMatSharedPtr &m_transformationmatrix)
 
virtual void v_GetSimplexEquiSpacedConnectivity (Array< OneD, int > &conn, bool standard=true)
 

Detailed Description

The base class for all shapes.

This is the lowest level basic class for all shapes and so contains the definition of common data and common routine to all elements

Definition at line 69 of file StdExpansion.h.

Constructor & Destructor Documentation

Nektar::StdRegions::StdExpansion::StdExpansion ( void  )

Default Constructor.

Definition at line 44 of file StdExpansion.cpp.

Nektar::StdRegions::StdExpansion::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.

Definition at line 50 of file StdExpansion.cpp.

References ASSERTL2, Nektar::LibUtilities::BasisManager(), m_base, and Nektar::LibUtilities::NullBasisKey().

53  :
54  m_base(numbases),
55  m_elmt_id(0),
56  m_ncoeffs(numcoeffs),
58  boost::bind(&StdExpansion::CreateStdMatrix, this, _1),
59  std::string("StdExpansionStdMatrix")),
61  boost::bind(&StdExpansion::CreateStdStaticCondMatrix, this, _1),
62  std::string("StdExpansionStdStaticCondMatrix")),
64  boost::bind(&StdExpansion::CreateIndexMap,this, _1),
65  std::string("StdExpansionIndexMap"))
66  {
67  switch(m_base.num_elements())
68  {
69  case 3:
71  "NULL Basis attempting to be used.");
73 
74  case 2:
76  "NULL Basis attempting to be used.");
77 
79  case 1:
81  "NULL Basis attempting to be used.");
83  break;
84  default:
85  break;
86 // ASSERTL0(false, "numbases incorrectly specified");
87  };
88 
89  } //end constructor
DNekMatSharedPtr CreateStdMatrix(const StdMatrixKey &mkey)
LibUtilities::NekManager< IndexMapKey, IndexMapValues, IndexMapKey::opLess > m_IndexMapManager
LibUtilities::NekManager< StdMatrixKey, DNekBlkMat, StdMatrixKey::opLess > m_stdStaticCondMatrixManager
BasisManagerT & BasisManager(void)
IndexMapValuesSharedPtr CreateIndexMap(const IndexMapKey &ikey)
Create an IndexMap which contains mapping information linking any specific element shape with either ...
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed t...
Definition: ErrorUtil.hpp:240
DNekBlkMatSharedPtr CreateStdStaticCondMatrix(const StdMatrixKey &mkey)
Create the static condensation of a matrix when using a boundary interior decomposition.
static const BasisKey NullBasisKey(eNoBasisType, 0, NullPointsKey)
Defines a null basis with no type or points.
LibUtilities::NekManager< StdMatrixKey, DNekMat, StdMatrixKey::opLess > m_stdMatrixManager
Array< OneD, LibUtilities::BasisSharedPtr > m_base
Nektar::StdRegions::StdExpansion::StdExpansion ( const StdExpansion T)

Copy Constructor.

Definition at line 92 of file StdExpansion.cpp.

92  :
93  m_base(T.m_base),
94  m_elmt_id(T.m_elmt_id),
95  m_ncoeffs(T.m_ncoeffs),
96  m_stdMatrixManager(T.m_stdMatrixManager),
97  m_stdStaticCondMatrixManager(T.m_stdStaticCondMatrixManager),
98  m_IndexMapManager(T.m_IndexMapManager)
99  {
100  }
LibUtilities::NekManager< IndexMapKey, IndexMapValues, IndexMapKey::opLess > m_IndexMapManager
LibUtilities::NekManager< StdMatrixKey, DNekBlkMat, StdMatrixKey::opLess > m_stdStaticCondMatrixManager
LibUtilities::NekManager< StdMatrixKey, DNekMat, StdMatrixKey::opLess > m_stdMatrixManager
Array< OneD, LibUtilities::BasisSharedPtr > m_base
Nektar::StdRegions::StdExpansion::~StdExpansion ( )
virtual

Destructor.

Definition at line 102 of file StdExpansion.cpp.

103  {
104  }

Member Function Documentation

void Nektar::StdRegions::StdExpansion::AddRobinEdgeContribution ( const int  edgeid,
const Array< OneD, const NekDouble > &  primCoeffs,
Array< OneD, NekDouble > &  coeffs 
)
inline

Definition at line 1108 of file StdExpansion.h.

References v_AddRobinEdgeContribution().

1109  {
1110  v_AddRobinEdgeContribution(edgeid, primCoeffs, coeffs);
1111  }
virtual void v_AddRobinEdgeContribution(const int edgeid, const Array< OneD, const NekDouble > &primCoeffs, Array< OneD, NekDouble > &coeffs)
void Nektar::StdRegions::StdExpansion::AddRobinMassMatrix ( const int  edgeid,
const Array< OneD, const NekDouble > &  primCoeffs,
DNekMatSharedPtr inoutmat 
)
inline

Definition at line 1103 of file StdExpansion.h.

References v_AddRobinMassMatrix().

1104  {
1105  v_AddRobinMassMatrix(edgeid,primCoeffs,inoutmat);
1106  }
virtual void v_AddRobinMassMatrix(const int edgeid, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat)
template<class T >
boost::shared_ptr<T> Nektar::StdRegions::StdExpansion::as ( )
inline

Definition at line 1402 of file StdExpansion.h.

References ASSERTL1.

Referenced by Nektar::MultiRegions::PreconditionerLowEnergy::v_BuildPreconditioner().

1403  {
1404 #if defined __INTEL_COMPILER && BOOST_VERSION > 105200
1405  typedef typename boost::shared_ptr<T>::element_type E;
1406  E * p = dynamic_cast< E* >( shared_from_this().get() );
1407  ASSERTL1(p, "Cannot perform cast");
1408  return boost::shared_ptr<T>( shared_from_this(), p );
1409 #else
1410  return boost::dynamic_pointer_cast<T>( shared_from_this() );
1411 #endif
1412  }
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
DNekMatSharedPtr Nektar::StdRegions::StdExpansion::BuildInverseTransformationMatrix ( const DNekScalMatSharedPtr m_transformationmatrix)
inline

Definition at line 1350 of file StdExpansion.h.

References v_BuildInverseTransformationMatrix().

1352  {
1354  m_transformationmatrix);
1355  }
virtual DNekMatSharedPtr v_BuildInverseTransformationMatrix(const DNekScalMatSharedPtr &m_transformationmatrix)
void Nektar::StdRegions::StdExpansion::BwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

This function performs the Backward transformation from coefficient space to physical space.

This function is a wrapper around the virtual function v_BwdTrans()

Based on the expansion coefficients, this function evaluates the expansion at the quadrature points. This is equivalent to the operation

\[ u(\xi_{1i}) = \sum_{p=0}^{P-1} \hat{u}_p \phi_p(\xi_{1i}) \]

which can be evaluated as $ {\bf u} = {\bf B}^T {\bf \hat{u}} $ with ${\bf B}[i][j] = \phi_i(\xi_{j})$

This function requires that the coefficient array $\mathbf{\hat{u}}$ provided as inarray.

The resulting array $\mathbf{u}[m]=u(\mathbf{\xi}_m)$ containing the expansion evaluated at the quadrature points, is stored in the outarray.

Parameters
inarraycontains the values of the expansion coefficients (input of the function)
outarraycontains the values of the expansion evaluated at the quadrature points (output of the function)

Definition at line 525 of file StdExpansion.h.

References v_BwdTrans().

Referenced by Extractlayerdata(), Nektar::LocalRegions::SegExp::v_HelmholtzMatrixOp(), Nektar::LocalRegions::SegExp::v_LaplacianMatrixOp(), Nektar::StdRegions::StdPrismExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdTetExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdTriExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdPrismExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdQuadExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdTetExp::v_SVVLaplacianFilter(), and Nektar::StdRegions::StdHexExp::v_SVVLaplacianFilter().

527  {
528  v_BwdTrans (inarray, outarray);
529  }
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)=0
void Nektar::StdRegions::StdExpansion::BwdTrans_MatOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protected

Definition at line 951 of file StdExpansion.cpp.

References DetShapeType(), Nektar::StdRegions::eBwdTrans, GetStdMatrix(), GetTotPoints(), and m_ncoeffs.

953  {
954  int nq = GetTotPoints();
955  StdMatrixKey bwdtransmatkey(eBwdTrans,DetShapeType(),*this);
956  DNekMatSharedPtr bwdtransmat = GetStdMatrix(bwdtransmatkey);
957 
958  Blas::Dgemv('N',nq,m_ncoeffs,1.0,bwdtransmat->GetPtr().get(),
959  nq, inarray.get(), 1, 0.0, outarray.get(), 1);
960  }
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
Definition: StdExpansion.h:470
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
Definition: StdExpansion.h:700
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
Definition: StdExpansion.h:141
void Nektar::StdRegions::StdExpansion::BwdTrans_SumFac ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inlineprotected

Definition at line 1460 of file StdExpansion.h.

References v_BwdTrans_SumFac().

Referenced by CreateGeneralMatrix(), and Nektar::StdRegions::StdHexExp::v_BwdTrans().

1462  {
1463  v_BwdTrans_SumFac(inarray,outarray);
1464  }
virtual void v_BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
int Nektar::StdRegions::StdExpansion::CalcNumberOfCoefficients ( const std::vector< unsigned int > &  nummodes,
int &  modes_offset 
)
inline

Definition at line 792 of file StdExpansion.h.

References v_CalcNumberOfCoefficients().

793  {
794  return v_CalcNumberOfCoefficients(nummodes,modes_offset);
795  }
virtual int v_CalcNumberOfCoefficients(const std::vector< unsigned int > &nummodes, int &modes_offset)
void Nektar::StdRegions::StdExpansion::ComputeEdgeNormal ( const int  edge)
inline

Definition at line 1278 of file StdExpansion.h.

References v_ComputeEdgeNormal().

Referenced by Nektar::LocalRegions::Expansion2D::v_SetUpPhysNormals().

1279  {
1280  v_ComputeEdgeNormal(edge);
1281  }
virtual void v_ComputeEdgeNormal(const int edge)
void Nektar::StdRegions::StdExpansion::ComputeFaceNormal ( const int  face)
inline

Definition at line 1293 of file StdExpansion.h.

References v_ComputeFaceNormal().

1294  {
1295  v_ComputeFaceNormal(face);
1296  }
virtual void v_ComputeFaceNormal(const int face)
void Nektar::StdRegions::StdExpansion::ComputeVertexNormal ( const int  vertex)
inline

Definition at line 1308 of file StdExpansion.h.

References v_ComputeVertexNormal().

Referenced by Nektar::StdRegions::StdExpansion1D::v_SetUpPhysNormals().

1309  {
1310  v_ComputeVertexNormal(vertex);
1311  }
virtual void v_ComputeVertexNormal(const int vertex)
DNekMatSharedPtr Nektar::StdRegions::StdExpansion::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}$

Returns
returns the mass matrix

Definition at line 322 of file StdExpansion.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, BwdTrans_SumFac(), Nektar::StdRegions::eBwdTrans, Nektar::StdRegions::eEquiSpacedToCoeffs, ErrorUtil::efatal, Nektar::StdRegions::eHelmholtz, Nektar::StdRegions::eInvMass, Nektar::StdRegions::eInvNBasisTrans, Nektar::StdRegions::eIProductWRTBase, Nektar::StdRegions::eIProductWRTDerivBase0, Nektar::StdRegions::eIProductWRTDerivBase1, Nektar::StdRegions::eIProductWRTDerivBase2, Nektar::StdRegions::eLaplacian, Nektar::StdRegions::eLaplacian00, Nektar::StdRegions::eLaplacian01, Nektar::StdRegions::eLaplacian02, Nektar::StdRegions::eLaplacian11, Nektar::StdRegions::eLaplacian12, Nektar::StdRegions::eLaplacian22, Nektar::StdRegions::eLinearAdvectionDiffusionReaction, Nektar::StdRegions::eLinearAdvectionReaction, Nektar::StdRegions::eMass, Nektar::StdRegions::eMassLevelCurvature, Nektar::StdRegions::eNBasisTrans, Nektar::StdRegions::eWeakDeriv0, Nektar::StdRegions::eWeakDeriv1, Nektar::StdRegions::eWeakDeriv2, Nektar::StdRegions::eWeakDirectionalDeriv, FillMode(), GeneralMatrixOp_MatFree(), Nektar::StdRegions::StdMatrixKey::GetMatrixType(), Nektar::StdRegions::StdMatrixKey::GetNodalPointsType(), Nektar::StdRegions::StdMatrixKey::GetShapeType(), GetStdMatrix(), GetTotPoints(), IProductWRTBase_SumFac(), IProductWRTDerivBase_SumFac(), m_base, m_ncoeffs, NEKERROR, Nektar::StdRegions::NullConstFactorMap, Nektar::StdRegions::NullVarCoeffMap, PhysInterpToSimplexEquiSpaced(), Vmath::Vcopy(), and Vmath::Zero().

Referenced by Nektar::StdRegions::StdHexExp::v_CreateStdMatrix(), Nektar::StdRegions::StdPointExp::v_GenMatrix(), Nektar::StdRegions::StdNodalTetExp::v_GenMatrix(), Nektar::StdRegions::StdNodalPrismExp::v_GenMatrix(), Nektar::StdRegions::StdNodalTriExp::v_GenMatrix(), Nektar::StdRegions::StdQuadExp::v_GenMatrix(), Nektar::StdRegions::StdSegExp::v_GenMatrix(), Nektar::StdRegions::StdTriExp::v_GenMatrix(), Nektar::StdRegions::StdPrismExp::v_GenMatrix(), Nektar::StdRegions::StdTetExp::v_GenMatrix(), Nektar::StdRegions::StdHexExp::v_GenMatrix(), and Nektar::StdRegions::StdPyrExp::v_GenMatrix().

323  {
324  int i;
325  DNekMatSharedPtr returnval;
326 
327  switch(mkey.GetMatrixType())
328  {
329  case eInvMass:
330  {
331  StdMatrixKey masskey(eMass,mkey.GetShapeType(),*this,NullConstFactorMap,NullVarCoeffMap,mkey.GetNodalPointsType());
332  DNekMatSharedPtr mmat = GetStdMatrix(masskey);
333 
334  returnval = MemoryManager<DNekMat>::AllocateSharedPtr(*mmat); //Populate standard mass matrix.
335  returnval->Invert();
336  }
337  break;
338  case eInvNBasisTrans:
339  {
340  StdMatrixKey tmpkey(eNBasisTrans,mkey.GetShapeType(),*this,NullConstFactorMap,NullVarCoeffMap,mkey.GetNodalPointsType());
341  DNekMatSharedPtr tmpmat = GetStdMatrix(tmpkey);
342  returnval = MemoryManager<DNekMat>::AllocateSharedPtr(*tmpmat); //Populate matrix.
343  returnval->Invert();
344  }
345  break;
346  case eBwdTrans:
347  {
348  int nq = GetTotPoints();
349  Array<OneD, NekDouble> tmpin(m_ncoeffs);
350  Array<OneD, NekDouble> tmpout(nq);
351 
353 
354  for(int i=0; i<m_ncoeffs; ++i)
355  {
356  Vmath::Zero(m_ncoeffs, tmpin, 1);
357  tmpin[i] = 1.0;
358 
359  BwdTrans_SumFac(tmpin,tmpout);
360 
361  Vmath::Vcopy(nq,tmpout.get(),1,
362  returnval->GetRawPtr()+i*nq,1);
363  }
364  }
365  break;
366  case eIProductWRTBase:
367  {
368  int nq = GetTotPoints();
369  Array<OneD, NekDouble> tmpin(nq);
370  Array<OneD, NekDouble> tmpout(m_ncoeffs);
371 
372  returnval = MemoryManager<DNekMat>::AllocateSharedPtr(m_ncoeffs,nq);
373 
374  for(i=0; i < nq; ++i)
375  {
376  Vmath::Zero(nq, tmpin, 1);
377  tmpin[i] = 1.0;
378 
379  IProductWRTBase_SumFac(tmpin,tmpout);
380 
381  Vmath::Vcopy(m_ncoeffs,tmpout.get(),1,
382  returnval->GetRawPtr()+i*m_ncoeffs,1);
383  }
384  }
385  break;
387  {
388  int nq = GetTotPoints();
389  Array<OneD, NekDouble> tmpin(nq);
390  Array<OneD, NekDouble> tmpout(m_ncoeffs);
391 
392  returnval = MemoryManager<DNekMat>::AllocateSharedPtr(nq,m_ncoeffs);
393 
394  for(i=0; i < nq; ++i)
395  {
396  Vmath::Zero(nq, tmpin, 1);
397  tmpin[i] = 1.0;
398 
399  IProductWRTDerivBase_SumFac(0,tmpin,tmpout);
400 
401  Vmath::Vcopy(m_ncoeffs,tmpout.get(),1,
402  returnval->GetRawPtr()+i*m_ncoeffs,1);
403  }
404  }
405  break;
407  {
408  int nq = GetTotPoints();
409  Array<OneD, NekDouble> tmpin(nq);
410  Array<OneD, NekDouble> tmpout(m_ncoeffs);
411 
412  returnval = MemoryManager<DNekMat>::AllocateSharedPtr(nq,m_ncoeffs);
413 
414  for(i=0; i < nq; ++i)
415  {
416  Vmath::Zero(nq, tmpin, 1);
417  tmpin[i] = 1.0;
418 
419  IProductWRTDerivBase_SumFac(1,tmpin,tmpout);
420 
421  Vmath::Vcopy(m_ncoeffs,tmpout.get(),1,
422  returnval->GetRawPtr()+i*m_ncoeffs,1);
423  }
424  }
425  break;
427  {
428  int nq = GetTotPoints();
429  Array<OneD, NekDouble> tmpin(nq);
430  Array<OneD, NekDouble> tmpout(m_ncoeffs);
431 
432  returnval = MemoryManager<DNekMat>::AllocateSharedPtr(nq,m_ncoeffs);
433 
434  for(i=0; i < nq; ++i)
435  {
436  Vmath::Zero(nq, tmpin, 1);
437  tmpin[i] = 1.0;
438 
439  IProductWRTDerivBase_SumFac(2,tmpin,tmpout);
440 
441  Vmath::Vcopy(m_ncoeffs,tmpout.get(),1,
442  returnval->GetRawPtr()+i*m_ncoeffs,1);
443  }
444  }
445  break;
446  case eEquiSpacedToCoeffs:
447  {
448  // check to see if equispaced basis
449  int nummodes = m_base[0]->GetNumModes();
450  bool equispaced = true;
451  for(int i = 1; i < m_base.num_elements(); ++i)
452  {
453  if(m_base[i]->GetNumModes() != nummodes)
454  {
455  equispaced = false;
456  }
457  }
458 
459  ASSERTL0(equispaced,
460  "Currently need to have same num modes in all "
461  "directionmodes to use EquiSpacedToCoeff method");
462 
463  int ntot = GetTotPoints();
464  Array<OneD, NekDouble> qmode(ntot);
465  Array<OneD, NekDouble> emode(m_ncoeffs);
466 
468  m_ncoeffs,m_ncoeffs);
469  int cnt = 0;
470  for(int i = 0; i < m_ncoeffs; ++i)
471  {
472  // Get mode at quadrature points
473  FillMode(i,qmode);
474 
475  // interpolate to equi spaced
476  PhysInterpToSimplexEquiSpaced(qmode,emode,nummodes);
477 
478  // fill matrix
479  Vmath::Vcopy(m_ncoeffs, &emode[0], 1,
480  returnval->GetRawPtr() + i*m_ncoeffs, 1);
481  }
482  // invert matrix
483  returnval->Invert();
484 
485  }
486  break;
487  case eMass:
488  case eHelmholtz:
489  case eLaplacian:
490  case eLaplacian00:
491  case eLaplacian01:
492  case eLaplacian02:
493  case eLaplacian11:
494  case eLaplacian12:
495  case eLaplacian22:
496  case eWeakDeriv0:
497  case eWeakDeriv1:
498  case eWeakDeriv2:
500  case eMassLevelCurvature:
503  {
504  Array<OneD, NekDouble> tmp(m_ncoeffs);
505  returnval = MemoryManager<DNekMat>::AllocateSharedPtr(m_ncoeffs,m_ncoeffs);
506  DNekMat &Mat = *returnval;
507 
508  for(i=0; i < m_ncoeffs; ++i)
509  {
510  Vmath::Zero(m_ncoeffs, tmp, 1);
511  tmp[i] = 1.0;
512 
513  GeneralMatrixOp_MatFree(tmp,tmp,mkey);
514 
515  Vmath::Vcopy(m_ncoeffs,&tmp[0],1,
516  &(Mat.GetPtr())[0]+i*m_ncoeffs,1);
517  }
518  }
519  break;
520  default:
521  {
522  NEKERROR(ErrorUtil::efatal, "This type of matrix can not be created using a general approach");
523  }
524  break;
525  }
526 
527  return returnval;
528  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:185
void FillMode(const int mode, Array< OneD, NekDouble > &outarray)
This function fills the array outarray with the mode-th mode of the expansion.
Definition: StdExpansion.h:592
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
void IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
Definition: StdExpansion.h:700
void IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
Definition: StdExpansion.h:141
NekMatrix< NekDouble, StandardMatrixTag > DNekMat
Definition: NekTypeDefs.hpp:52
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:359
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 arra...
Array< OneD, LibUtilities::BasisSharedPtr > m_base
void GeneralMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
void BwdTrans_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
static VarCoeffMap NullVarCoeffMap
Definition: StdRegions.hpp:227
static ConstFactorMap NullConstFactorMap
Definition: StdRegions.hpp:252
IndexMapValuesSharedPtr Nektar::StdRegions::StdExpansion::CreateIndexMap ( const IndexMapKey ikey)
protected

Create an IndexMap which contains mapping information linking any specific element shape with either its boundaries, edges, faces, verteces, etc.

The index member of the IndexMapValue struct gives back an integer associated with an entity index The sign member of the same struct gives back a sign to algebrically apply entities orientation

Definition at line 260 of file StdExpansion.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, Nektar::StdRegions::eBoundary, Nektar::StdRegions::eEdgeInterior, Nektar::StdRegions::eEdgeToElement, Nektar::StdRegions::eFaceInterior, Nektar::StdRegions::eFaceToElement, Nektar::StdRegions::eVertex, Nektar::StdRegions::IndexMapKey::GetIndexEntity(), Nektar::StdRegions::IndexMapKey::GetIndexMapType(), Nektar::StdRegions::IndexMapKey::GetIndexOrientation(), sign, v_GetEdgeInteriorMap(), v_GetEdgeToElementMap(), v_GetFaceInteriorMap(), and v_GetFaceToElementMap().

261  {
262  IndexMapValuesSharedPtr returnval;
263 
264  IndexMapType itype = ikey.GetIndexMapType();
265 
266  int entity = ikey.GetIndexEntity();
267 
268  Orientation orient = ikey.GetIndexOrientation();
269 
270  Array<OneD,unsigned int> map;
271  Array<OneD,int> sign;
272 
273  switch(itype)
274  {
275  case eEdgeToElement:
276  {
277  v_GetEdgeToElementMap(entity,orient,map,sign);
278  }
279  break;
280  case eFaceToElement:
281  {
282  v_GetFaceToElementMap(entity,orient,map,sign);
283  }
284  break;
285  case eEdgeInterior:
286  {
287  v_GetEdgeInteriorMap(entity,orient,map,sign);
288  }
289  break;
290  case eFaceInterior:
291  {
292  v_GetFaceInteriorMap(entity,orient,map,sign);
293  }
294  break;
295  case eBoundary:
296  {
297  ASSERTL0(false,"Boundary Index Map not implemented yet.");
298  }
299  break;
300  case eVertex:
301  {
302  ASSERTL0(false,"Vertex Index Map not implemented yet.");
303  }
304  break;
305  default:
306  {
307  ASSERTL0(false,"The Index Map you are requiring is not between the possible options.");
308  }
309  }
310 
311  returnval = MemoryManager<IndexMapValues>::AllocateSharedPtr(map.num_elements());
312 
313  for(int i = 0; i < map.num_elements(); i++)
314  {
315  (*returnval)[i].index = map[i];
316  (*returnval)[i].sign = sign[i];
317  }
318 
319  return returnval;
320  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
boost::shared_ptr< IndexMapValues > IndexMapValuesSharedPtr
Definition: IndexMapKey.h:126
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
#define sign(a, b)
return the sign(b)*a
Definition: Polylib.cpp:22
virtual void v_GetFaceInteriorMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
virtual void v_GetEdgeToElementMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int P=-1)
virtual void v_GetEdgeInteriorMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
virtual void v_GetFaceToElementMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int nummodesA=-1, int nummodesB=-1)
DNekMatSharedPtr Nektar::StdRegions::StdExpansion::CreateStdMatrix ( const StdMatrixKey mkey)
inlineprotected

Definition at line 1429 of file StdExpansion.h.

References v_CreateStdMatrix().

1430  {
1431  return v_CreateStdMatrix(mkey);
1432  }
virtual DNekMatSharedPtr v_CreateStdMatrix(const StdMatrixKey &mkey)
DNekBlkMatSharedPtr Nektar::StdRegions::StdExpansion::CreateStdStaticCondMatrix ( const StdMatrixKey mkey)
protected

Create the static condensation of a matrix when using a boundary interior decomposition.

If a matrix system can be represented by $ Mat = \left [ \begin{array}{cc} A & B \\ C & D \end{array} \right ] $ This routine creates a matrix containing the statically condense system of the form $ Mat = \left [ \begin{array}{cc} A - B D^{-1} C & B D^{-1} \\ D^{-1} C & D^{-1} \end{array} \right ] $

Definition at line 193 of file StdExpansion.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), GetBoundaryMap(), GetInteriorMap(), GetStdMatrix(), m_ncoeffs, and NumBndryCoeffs().

194  {
195  DNekBlkMatSharedPtr returnval;
196 
197  DNekMatSharedPtr mat = GetStdMatrix(mkey);
198  int nbdry = NumBndryCoeffs(); // also checks to see if this is a boundary interior decomposed expansion
199  int nint = m_ncoeffs - nbdry;
204 
205  int i,j;
206 
207  Array<OneD,unsigned int> bmap(nbdry);
208  Array<OneD,unsigned int> imap(nint);
209  GetBoundaryMap(bmap);
210  GetInteriorMap(imap);
211 
212  for(i = 0; i < nbdry; ++i)
213  {
214  for(j = 0; j < nbdry; ++j)
215  {
216  (*A)(i,j) = (*mat)(bmap[i],bmap[j]);
217  }
218 
219  for(j = 0; j < nint; ++j)
220  {
221  (*B)(i,j) = (*mat)(bmap[i],imap[j]);
222  }
223  }
224 
225  for(i = 0; i < nint; ++i)
226  {
227  for(j = 0; j < nbdry; ++j)
228  {
229  (*C)(i,j) = (*mat)(imap[i],bmap[j]);
230  }
231 
232  for(j = 0; j < nint; ++j)
233  {
234  (*D)(i,j) = (*mat)(imap[i],imap[j]);
235  }
236  }
237 
238  // Calculate static condensed system
239  if(nint)
240  {
241  D->Invert();
242  (*B) = (*B)*(*D);
243  (*A) = (*A) - (*B)*(*C);
244  }
245 
246  // set up block matrix system
247  Array<OneD, unsigned int> exp_size(2);
248  exp_size[0] = nbdry;
249  exp_size[1] = nint;
250  returnval = MemoryManager<DNekBlkMat>::AllocateSharedPtr(exp_size,exp_size);
251 
252  returnval->SetBlock(0,0,A);
253  returnval->SetBlock(0,1,B);
254  returnval->SetBlock(1,0,C);
255  returnval->SetBlock(1,1,D);
256 
257  return returnval;
258  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
Definition: StdExpansion.h:700
void GetInteriorMap(Array< OneD, unsigned int > &outarray)
Definition: StdExpansion.h:821
boost::shared_ptr< DNekBlkMat > DNekBlkMatSharedPtr
Definition: NekTypeDefs.hpp:72
void GetBoundaryMap(Array< OneD, unsigned int > &outarray)
Definition: StdExpansion.h:816
int Nektar::StdRegions::StdExpansion::DetCartesianDirOfEdge ( const int  edge)
inline

Definition at line 314 of file StdExpansion.h.

References v_DetCartesianDirOfEdge().

315  {
316  return v_DetCartesianDirOfEdge(edge);
317  }
virtual int v_DetCartesianDirOfEdge(const int edge)
const LibUtilities::BasisKey Nektar::StdRegions::StdExpansion::DetEdgeBasisKey ( const int  i) const
inline

Definition at line 319 of file StdExpansion.h.

References v_DetEdgeBasisKey().

320  {
321  return v_DetEdgeBasisKey(i);
322  }
virtual const LibUtilities::BasisKey v_DetEdgeBasisKey(const int i) const
const LibUtilities::BasisKey Nektar::StdRegions::StdExpansion::DetFaceBasisKey ( const int  i,
const int  k 
) const
inline
LibUtilities::ShapeType Nektar::StdRegions::StdExpansion::DetShapeType ( ) const
inline

This function returns the shape of the expansion domain.

This function is a wrapper around the virtual function v_DetShapeType()

The different shape types implemented in the code are defined in the ::ShapeType enumeration list. As a result, the function will return one of the types of this enumeration list.

Returns
returns the shape of the expansion domain

Definition at line 470 of file StdExpansion.h.

References v_DetShapeType().

Referenced by Nektar::LocalRegions::Expansion2D::AddHDGHelmholtzEdgeTerms(), BwdTrans_MatOp(), Nektar::LocalRegions::PyrExp::CreateMatrix(), Nektar::LocalRegions::NodalTriExp::CreateMatrix(), Nektar::LocalRegions::PrismExp::CreateMatrix(), Nektar::LocalRegions::QuadExp::CreateMatrix(), Nektar::LocalRegions::TriExp::CreateMatrix(), Nektar::LocalRegions::SegExp::CreateMatrix(), Nektar::LocalRegions::HexExp::CreateMatrix(), EquiSpacedToCoeffs(), Nektar::LocalRegions::NodalTriExp::FwdTrans(), Nektar::LinearisedAdvection::GetFloquetBlockMatrix(), Nektar::AdjointAdvection::GetFloquetBlockMatrix(), Nektar::LocalRegions::Expansion::GetLocMatrix(), HelmholtzMatrixOp_MatFree_GenericImpl(), Nektar::LocalRegions::NodalTriExp::IProductWRTBase_MatOp(), Nektar::LocalRegions::HexExp::IProductWRTDerivBase_MatOp(), Nektar::LocalRegions::NodalTriExp::IProductWRTDerivBase_MatOp(), LinearAdvectionDiffusionReactionMatrixOp_MatFree(), Nektar::StdRegions::StdNodalPrismExp::ModalToNodal(), Nektar::StdRegions::StdNodalTriExp::ModalToNodal(), Nektar::LocalRegions::SegExp::MultiplyByElmtInvMass(), Nektar::StdRegions::StdNodalPrismExp::NodalToModal(), Nektar::StdRegions::StdNodalTriExp::NodalToModal(), Nektar::StdRegions::StdNodalPrismExp::NodalToModalTranspose(), Nektar::StdRegions::StdNodalTriExp::NodalToModalTranspose(), PhysInterpToSimplexEquiSpaced(), Nektar::LocalRegions::Expansion2D::v_AddEdgeNormBoundaryInt(), Nektar::LocalRegions::PrismExp::v_FwdTrans(), Nektar::LocalRegions::PyrExp::v_FwdTrans(), Nektar::StdRegions::StdNodalPrismExp::v_FwdTrans(), Nektar::StdRegions::StdNodalTriExp::v_FwdTrans(), Nektar::LocalRegions::SegExp::v_FwdTrans(), Nektar::LocalRegions::TriExp::v_FwdTrans(), Nektar::LocalRegions::QuadExp::v_FwdTrans(), Nektar::LocalRegions::HexExp::v_FwdTrans(), Nektar::StdRegions::StdTriExp::v_FwdTrans(), Nektar::StdRegions::StdHexExp::v_FwdTrans(), Nektar::StdRegions::StdPrismExp::v_FwdTrans(), Nektar::StdRegions::StdQuadExp::v_FwdTrans(), Nektar::StdRegions::StdPyrExp::v_FwdTrans(), Nektar::StdRegions::StdQuadExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::SegExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::TriExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::QuadExp::v_FwdTrans_BndConstrained(), Nektar::StdRegions::StdTriExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::StdRegions::StdQuadExp::v_GenMatrix(), Nektar::LocalRegions::QuadExp::v_GetEdgeInterpVals(), Nektar::LocalRegions::SegExp::v_GetVertexPhysVals(), Nektar::LocalRegions::TriExp::v_IProductWRTBase_MatOp(), Nektar::LocalRegions::QuadExp::v_IProductWRTBase_MatOp(), Nektar::StdRegions::StdTriExp::v_IProductWRTBase_MatOp(), Nektar::StdRegions::StdPrismExp::v_IProductWRTBase_MatOp(), Nektar::StdRegions::StdHexExp::v_IProductWRTBase_MatOp(), Nektar::StdRegions::StdQuadExp::v_IProductWRTBase_MatOp(), Nektar::LocalRegions::TriExp::v_IProductWRTDerivBase_MatOp(), Nektar::LocalRegions::QuadExp::v_IProductWRTDerivBase_MatOp(), Nektar::StdRegions::StdTriExp::v_IProductWRTDerivBase_MatOp(), Nektar::StdRegions::StdPrismExp::v_IProductWRTDerivBase_MatOp(), Nektar::StdRegions::StdQuadExp::v_IProductWRTDerivBase_MatOp(), and Nektar::StdRegions::StdHexExp::v_IProductWRTDerivBase_MatOp().

471  {
472  return v_DetShapeType();
473  }
virtual LibUtilities::ShapeType v_DetShapeType() const
void Nektar::StdRegions::StdExpansion::DropLocStaticCondMatrix ( const LocalRegions::MatrixKey mkey)
inline

Definition at line 752 of file StdExpansion.h.

References v_DropLocStaticCondMatrix().

753  {
754  return v_DropLocStaticCondMatrix(mkey);
755  }
virtual void v_DropLocStaticCondMatrix(const LocalRegions::MatrixKey &mkey)
bool Nektar::StdRegions::StdExpansion::EdgeNormalNegated ( const int  edge)
inline

Definition at line 1288 of file StdExpansion.h.

References v_EdgeNormalNegated().

1289  {
1290  return v_EdgeNormalNegated(edge);
1291  }
virtual bool v_EdgeNormalNegated(const int edge)
void Nektar::StdRegions::StdExpansion::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.

This is primarily used for output purposes to use a more even distribution of points more suitable for alot of postprocessing

Definition at line 1806 of file StdExpansion.cpp.

References DetShapeType(), Nektar::StdRegions::eEquiSpacedToCoeffs, Nektar::StdRegions::eFactorConst, Nektar::eWrapper, GetStdMatrix(), m_base, and m_ncoeffs.

1809  {
1811 
1812  // inarray has to be consistent with NumModes definition
1813  // There is also a check in GetStdMatrix to see if all
1814  // modes are of the same size
1815  ConstFactorMap cmap;
1816 
1817  cmap[eFactorConst] = m_base[0]->GetNumModes();
1818  StdMatrixKey Ikey(eEquiSpacedToCoeffs, shape, *this,cmap);
1819  DNekMatSharedPtr intmat = GetStdMatrix(Ikey);
1820 
1821  NekVector<NekDouble> in (m_ncoeffs, inarray, eWrapper);
1822  NekVector<NekDouble> out(m_ncoeffs, outarray,eWrapper);
1823  out = (*intmat) * in;
1824  }
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
Definition: StdExpansion.h:470
std::map< ConstFactorType, NekDouble > ConstFactorMap
Definition: StdRegions.hpp:251
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
Definition: StdExpansion.h:700
Array< OneD, LibUtilities::BasisSharedPtr > m_base
int Nektar::StdRegions::StdExpansion::EvalBasisNumModesMax ( void  ) const
inline

This function returns the maximum number of expansion modes over all local directions.

Returns
returns the maximum number of expansion modes over all local directions

Definition at line 191 of file StdExpansion.h.

References m_base.

192  {
193  int i;
194  int returnval = 0;
195 
196  for(i = 0; i < m_base.num_elements(); ++i)
197  {
198  returnval = std::max(returnval, m_base[i]->GetNumModes());
199  }
200 
201  return returnval;
202  }
Array< OneD, LibUtilities::BasisSharedPtr > m_base
void Nektar::StdRegions::StdExpansion::ExtractDataToCoeffs ( const NekDouble data,
const std::vector< unsigned int > &  nummodes,
const int  nmodes_offset,
NekDouble coeffs 
)
inline

Definition at line 797 of file StdExpansion.h.

References v_ExtractDataToCoeffs().

801  {
802  v_ExtractDataToCoeffs(data,nummodes,nmodes_offset,coeffs);
803  }
virtual void v_ExtractDataToCoeffs(const NekDouble *data, const std::vector< unsigned int > &nummodes, const int nmode_offset, NekDouble *coeffs)
Unpack data from input file assuming it comes from the same expansion type.
bool Nektar::StdRegions::StdExpansion::FaceNormalNegated ( const int  face)
inline

Definition at line 1303 of file StdExpansion.h.

References v_FaceNormalNegated().

1304  {
1305  return v_FaceNormalNegated(face);
1306  }
virtual bool v_FaceNormalNegated(const int face)
void Nektar::StdRegions::StdExpansion::FillMode ( const int  mode,
Array< OneD, NekDouble > &  outarray 
)
inline

This function fills the array outarray with the mode-th mode of the expansion.

This function is a wrapper around the virtual function v_FillMode()

The requested mode is evaluated at the quadrature points

Parameters
modethe mode that should be filled
outarraycontains the values of the mode-th mode of the expansion evaluated at the quadrature points (output of the function)

Definition at line 592 of file StdExpansion.h.

References v_FillMode().

Referenced by CreateGeneralMatrix().

593  {
594  v_FillMode(mode, outarray);
595  }
virtual void v_FillMode(const int mode, Array< OneD, NekDouble > &outarray)
void Nektar::StdRegions::StdExpansion::FwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

This function performs the Forward transformation from physical space to coefficient space.

This function is a wrapper around the virtual function v_FwdTrans()

Given a function evaluated at the quadrature points, this function calculates the expansion coefficients such that the resulting expansion approximates the original function.

The calculation of the expansion coefficients is done using a Galerkin projection. This is equivalent to the operation:

\[ \mathbf{\hat{u}} = \mathbf{M}^{-1} \mathbf{I}\]

where

  • $\mathbf{M}[p][q]= \int\phi_p(\mathbf{\xi})\phi_q( \mathbf{\xi}) d\mathbf{\xi}$ is the Mass matrix
  • $\mathbf{I}[p] = \int\phi_p(\mathbf{\xi}) u(\mathbf{\xi}) d\mathbf{\xi}$

This function takes the array inarray as the values of the function evaluated at the quadrature points (i.e. $\mathbf{u}$), and stores the resulting coefficients $\mathbf{\hat{u}}$ in the outarray

Parameters
inarrayarray of the function discretely evaluated at the quadrature points
outarrayarray of the function coefficieints

Definition at line 1905 of file StdExpansion.h.

References v_FwdTrans().

Referenced by Nektar::Utilities::ProcessEquiSpacedOutput::GenOrthoModes(), Nektar::LocalRegions::Expansion2D::GetPhysEdgeVarCoeffsFromElement(), Nektar::SolverUtils::UpdateGeometry(), Nektar::StdRegions::StdPrismExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdTetExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdTriExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdPrismExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdQuadExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdTetExp::v_SVVLaplacianFilter(), and Nektar::StdRegions::StdHexExp::v_SVVLaplacianFilter().

1907  {
1908  v_FwdTrans(inarray,outarray);
1909  }
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)=0
Transform a given function from physical quadrature space to coefficient space.
void Nektar::StdRegions::StdExpansion::FwdTrans_BndConstrained ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 538 of file StdExpansion.h.

References v_FwdTrans_BndConstrained().

540  {
541  v_FwdTrans_BndConstrained(inarray,outarray);
542  }
virtual void v_FwdTrans_BndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void Nektar::StdRegions::StdExpansion::GeneralMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)

Definition at line 530 of file StdExpansion.cpp.

References ErrorUtil::efatal, Nektar::StdRegions::eHelmholtz, Nektar::StdRegions::eLaplacian, Nektar::StdRegions::eLaplacian00, Nektar::StdRegions::eLaplacian01, Nektar::StdRegions::eLaplacian02, Nektar::StdRegions::eLaplacian10, Nektar::StdRegions::eLaplacian11, Nektar::StdRegions::eLaplacian12, Nektar::StdRegions::eLaplacian20, Nektar::StdRegions::eLaplacian21, Nektar::StdRegions::eLaplacian22, Nektar::StdRegions::eLinearAdvectionDiffusionReaction, Nektar::StdRegions::eLinearAdvectionReaction, Nektar::StdRegions::eMass, Nektar::StdRegions::eMassLevelCurvature, Nektar::StdRegions::eWeakDeriv0, Nektar::StdRegions::eWeakDeriv1, Nektar::StdRegions::eWeakDeriv2, Nektar::StdRegions::eWeakDirectionalDeriv, Nektar::StdRegions::StdMatrixKey::GetMatrixType(), HelmholtzMatrixOp(), LaplacianMatrixOp(), LinearAdvectionDiffusionReactionMatrixOp(), MassLevelCurvatureMatrixOp(), MassMatrixOp(), NEKERROR, WeakDerivMatrixOp(), and WeakDirectionalDerivMatrixOp().

533  {
534  switch(mkey.GetMatrixType())
535  {
536  case eMass:
537  MassMatrixOp(inarray,outarray,mkey);
538  break;
539  case eWeakDeriv0:
540  WeakDerivMatrixOp(0,inarray,outarray,mkey);
541  break;
542  case eWeakDeriv1:
543  WeakDerivMatrixOp(1,inarray,outarray,mkey);
544  break;
545  case eWeakDeriv2:
546  WeakDerivMatrixOp(2,inarray,outarray,mkey);
547  break;
549  WeakDirectionalDerivMatrixOp(inarray,outarray,mkey);
550  break;
551  case eMassLevelCurvature:
552  MassLevelCurvatureMatrixOp(inarray,outarray,mkey);
553  break;
555  LinearAdvectionDiffusionReactionMatrixOp(inarray,outarray,mkey,false);
556  break;
558  LinearAdvectionDiffusionReactionMatrixOp(inarray,outarray,mkey);
559  break;
560  case eLaplacian:
561  LaplacianMatrixOp(inarray,outarray,mkey);
562  break;
563  case eLaplacian00:
564  LaplacianMatrixOp(0,0,inarray,outarray,mkey);
565  break;
566  case eLaplacian01:
567  LaplacianMatrixOp(0,1,inarray,outarray,mkey);
568  break;
569  case eLaplacian02:
570  LaplacianMatrixOp(0,2,inarray,outarray,mkey);
571  break;
572  case eLaplacian10:
573  LaplacianMatrixOp(1,0,inarray,outarray,mkey);
574  break;
575  case eLaplacian11:
576  LaplacianMatrixOp(1,1,inarray,outarray,mkey);
577  break;
578  case eLaplacian12:
579  LaplacianMatrixOp(1,2,inarray,outarray,mkey);
580  break;
581  case eLaplacian20:
582  LaplacianMatrixOp(2,0,inarray,outarray,mkey);
583  break;
584  case eLaplacian21:
585  LaplacianMatrixOp(2,1,inarray,outarray,mkey);
586  break;
587  case eLaplacian22:
588  LaplacianMatrixOp(2,2,inarray,outarray,mkey);
589  break;
590  case eHelmholtz:
591  HelmholtzMatrixOp(inarray,outarray,mkey);
592  break;
593  default:
594  NEKERROR(ErrorUtil::efatal, "This matrix does not have an operator");
595  break;
596  }
597  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:185
void MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdExpansion.h:971
void WeakDerivMatrixOp(const int i, 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 HelmholtzMatrixOp(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)
Definition: StdExpansion.h:978
void WeakDirectionalDerivMatrixOp(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 Nektar::StdRegions::StdExpansion::GeneralMatrixOp_MatFree ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
protected

Definition at line 599 of file StdExpansion.cpp.

References ErrorUtil::efatal, Nektar::StdRegions::eHelmholtz, Nektar::StdRegions::eLaplacian, Nektar::StdRegions::eLaplacian00, Nektar::StdRegions::eLaplacian01, Nektar::StdRegions::eLaplacian02, Nektar::StdRegions::eLaplacian10, Nektar::StdRegions::eLaplacian11, Nektar::StdRegions::eLaplacian12, Nektar::StdRegions::eLaplacian20, Nektar::StdRegions::eLaplacian21, Nektar::StdRegions::eLaplacian22, Nektar::StdRegions::eLinearAdvectionDiffusionReaction, Nektar::StdRegions::eLinearAdvectionReaction, Nektar::StdRegions::eMass, Nektar::StdRegions::eMassLevelCurvature, Nektar::StdRegions::eWeakDeriv0, Nektar::StdRegions::eWeakDeriv1, Nektar::StdRegions::eWeakDeriv2, Nektar::StdRegions::eWeakDirectionalDeriv, Nektar::StdRegions::StdMatrixKey::GetMatrixType(), HelmholtzMatrixOp_MatFree(), LaplacianMatrixOp_MatFree(), LinearAdvectionDiffusionReactionMatrixOp_MatFree(), MassLevelCurvatureMatrixOp_MatFree(), MassMatrixOp_MatFree(), NEKERROR, WeakDerivMatrixOp_MatFree(), and WeakDirectionalDerivMatrixOp_MatFree().

Referenced by CreateGeneralMatrix().

602  {
603  switch(mkey.GetMatrixType())
604  {
605  case eMass:
606  MassMatrixOp_MatFree(inarray,outarray,mkey);
607  break;
608  case eWeakDeriv0:
609  WeakDerivMatrixOp_MatFree(0,inarray,outarray,mkey);
610  break;
611  case eWeakDeriv1:
612  WeakDerivMatrixOp_MatFree(1,inarray,outarray,mkey);
613  break;
614  case eWeakDeriv2:
615  WeakDerivMatrixOp_MatFree(2,inarray,outarray,mkey);
616  break;
618  WeakDirectionalDerivMatrixOp_MatFree(inarray,outarray,mkey);
619  break;
620  case eMassLevelCurvature:
621  MassLevelCurvatureMatrixOp_MatFree(inarray,outarray,mkey);
622  break;
624  LinearAdvectionDiffusionReactionMatrixOp_MatFree(inarray,outarray,mkey,false);
625  break;
628  break;
629  case eLaplacian:
630  LaplacianMatrixOp_MatFree(inarray,outarray,mkey);
631  break;
632  case eLaplacian00:
633  LaplacianMatrixOp_MatFree(0,0,inarray,outarray,mkey);
634  break;
635  case eLaplacian01:
636  LaplacianMatrixOp_MatFree(0,1,inarray,outarray,mkey);
637  break;
638  case eLaplacian02:
639  LaplacianMatrixOp_MatFree(0,2,inarray,outarray,mkey);
640  break;
641  case eLaplacian10:
642  LaplacianMatrixOp_MatFree(1,0,inarray,outarray,mkey);
643  break;
644  case eLaplacian11:
645  LaplacianMatrixOp_MatFree(1,1,inarray,outarray,mkey);
646  break;
647  case eLaplacian12:
648  LaplacianMatrixOp_MatFree(1,2,inarray,outarray,mkey);
649  break;
650  case eLaplacian20:
651  LaplacianMatrixOp_MatFree(2,0,inarray,outarray,mkey);
652  break;
653  case eLaplacian21:
654  LaplacianMatrixOp_MatFree(2,1,inarray,outarray,mkey);
655  break;
656  case eLaplacian22:
657  LaplacianMatrixOp_MatFree(2,2,inarray,outarray,mkey);
658  break;
659  case eHelmholtz:
660  HelmholtzMatrixOp_MatFree(inarray,outarray,mkey);
661  break;
662  default:
663  NEKERROR(ErrorUtil::efatal, "This matrix does not have an operator");
664  break;
665  }
666  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:185
void WeakDirectionalDerivMatrixOp_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 LinearAdvectionDiffusionReactionMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey, bool addDiffusionTerm=true)
void WeakDerivMatrixOp_MatFree(const int i, 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 MassMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
DNekMatSharedPtr Nektar::StdRegions::StdExpansion::GenMatrix ( const StdMatrixKey mkey)
inline
const Array<OneD, const LibUtilities::BasisSharedPtr>& Nektar::StdRegions::StdExpansion::GetBase ( ) const
inline

This function gets the shared point to basis.

Returns
returns the shared pointer to the bases

Definition at line 107 of file StdExpansion.h.

References m_base.

108  {
109  return(m_base);
110  }
Array< OneD, LibUtilities::BasisSharedPtr > m_base
const LibUtilities::BasisSharedPtr& Nektar::StdRegions::StdExpansion::GetBasis ( int  dir) const
inline

This function gets the shared point to basis in the dir direction.

Returns
returns the shared pointer to the basis in directin dir

Definition at line 118 of file StdExpansion.h.

References ASSERTL1, and m_base.

Referenced by Nektar::StdRegions::StdQuadExp::v_DetEdgeBasisKey(), Nektar::StdRegions::StdTriExp::v_DetEdgeBasisKey(), and Nektar::LocalRegions::SegExp::v_GetBasis().

119  {
120  ASSERTL1(dir < m_base.num_elements(),
121  "dir is larger than number of bases");
122  return(m_base[dir]);
123  }
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
Array< OneD, LibUtilities::BasisSharedPtr > m_base
int Nektar::StdRegions::StdExpansion::GetBasisNumModes ( const int  dir) const
inline

This function returns the number of expansion modes in the dir direction.

Parameters
dirthe direction
Returns
returns the number of expansion modes in the dir direction

Definition at line 178 of file StdExpansion.h.

References ASSERTL1, and m_base.

Referenced by Nektar::LocalRegions::Expansion2D::v_AddEdgeNormBoundaryInt(), Nektar::StdRegions::StdQuadExp::v_GenMatrix(), Nektar::StdRegions::StdQuadExp::v_GetEdgeNcoeffs(), Nektar::StdRegions::StdTriExp::v_GetEdgeNcoeffs(), Nektar::StdRegions::StdPrismExp::v_GetEdgeNcoeffs(), Nektar::StdRegions::StdHexExp::v_GetEdgeNcoeffs(), Nektar::StdRegions::StdPyrExp::v_GetEdgeNcoeffs(), Nektar::StdRegions::StdHexExp::v_GetFaceIntNcoeffs(), Nektar::StdRegions::StdPrismExp::v_GetFaceIntNcoeffs(), Nektar::StdRegions::StdPrismExp::v_GetFaceNcoeffs(), Nektar::StdRegions::StdHexExp::v_GetFaceNcoeffs(), Nektar::StdRegions::StdTetExp::v_GetFaceNcoeffs(), Nektar::StdRegions::StdPyrExp::v_GetFaceNcoeffs(), Nektar::StdRegions::StdPrismExp::v_GetTotalEdgeIntNcoeffs(), Nektar::StdRegions::StdHexExp::v_GetTotalEdgeIntNcoeffs(), Nektar::StdRegions::StdHexExp::v_GetTotalFaceIntNcoeffs(), Nektar::StdRegions::StdPrismExp::v_GetTotalFaceIntNcoeffs(), Nektar::StdRegions::StdNodalTriExp::v_NumBndryCoeffs(), Nektar::StdRegions::StdTriExp::v_NumBndryCoeffs(), Nektar::StdRegions::StdQuadExp::v_NumBndryCoeffs(), Nektar::StdRegions::StdTriExp::v_NumDGBndryCoeffs(), and Nektar::StdRegions::StdQuadExp::v_NumDGBndryCoeffs().

179  {
180  ASSERTL1(dir < m_base.num_elements(),"dir is larger than m_numbases");
181  return(m_base[dir]->GetNumModes());
182  }
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
Array< OneD, LibUtilities::BasisSharedPtr > m_base
LibUtilities::BasisType Nektar::StdRegions::StdExpansion::GetBasisType ( const int  dir) const
inline

This function returns the type of basis used in the dir direction.

The different types of bases implemented in the code are defined in the LibUtilities::BasisType enumeration list. As a result, the function will return one of the types of this enumeration list.

Parameters
dirthe direction
Returns
returns the type of basis used in the dir direction

Definition at line 165 of file StdExpansion.h.

References ASSERTL1, and m_base.

Referenced by Nektar::LocalRegions::SegExp::ReverseCoeffsAndSign(), Nektar::StdRegions::StdHexExp::v_BwdTrans(), Nektar::StdRegions::StdPrismExp::v_BwdTrans(), Nektar::StdRegions::StdTetExp::v_BwdTrans(), Nektar::StdRegions::StdTriExp::v_BwdTrans_SumFacKernel(), Nektar::StdRegions::StdPrismExp::v_BwdTrans_SumFacKernel(), Nektar::StdRegions::StdTetExp::v_BwdTrans_SumFacKernel(), Nektar::StdRegions::StdTriExp::v_DetEdgeBasisKey(), Nektar::StdRegions::StdPrismExp::v_DetFaceBasisKey(), Nektar::StdRegions::StdHexExp::v_DetFaceBasisKey(), Nektar::StdRegions::StdTetExp::v_DetFaceBasisKey(), Nektar::StdRegions::StdPyrExp::v_DetFaceBasisKey(), Nektar::LocalRegions::TetExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::PrismExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::HexExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::TriExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::QuadExp::v_ExtractDataToCoeffs(), Nektar::LocalRegions::SegExp::v_ExtractDataToCoeffs(), Nektar::StdRegions::StdTriExp::v_FillMode(), Nektar::StdRegions::StdPointExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::SegExp::v_FwdTrans_BndConstrained(), Nektar::StdRegions::StdSegExp::v_FwdTrans_BndConstrained(), Nektar::StdRegions::StdQuadExp::v_GenMatrix(), Nektar::StdRegions::StdSegExp::v_GenMatrix(), Nektar::StdRegions::StdSegExp::v_GetBoundaryMap(), Nektar::StdRegions::StdQuadExp::v_GetBoundaryMap(), Nektar::StdRegions::StdTriExp::v_GetBoundaryMap(), Nektar::StdRegions::StdPrismExp::v_GetBoundaryMap(), Nektar::StdRegions::StdTetExp::v_GetBoundaryMap(), Nektar::StdRegions::StdHexExp::v_GetBoundaryMap(), Nektar::StdRegions::StdPyrExp::v_GetBoundaryMap(), Nektar::StdRegions::StdQuadExp::v_GetEdgeBasisType(), Nektar::StdRegions::StdTriExp::v_GetEdgeBasisType(), Nektar::StdRegions::StdPrismExp::v_GetEdgeBasisType(), Nektar::StdRegions::StdHexExp::v_GetEdgeBasisType(), Nektar::StdRegions::StdTetExp::v_GetEdgeBasisType(), Nektar::StdRegions::StdPyrExp::v_GetEdgeBasisType(), Nektar::StdRegions::StdHexExp::v_GetEdgeInteriorMap(), Nektar::StdRegions::StdHexExp::v_GetFaceInteriorMap(), Nektar::StdRegions::StdSegExp::v_GetInteriorMap(), Nektar::StdRegions::StdQuadExp::v_GetInteriorMap(), Nektar::StdRegions::StdTriExp::v_GetInteriorMap(), Nektar::StdRegions::StdPrismExp::v_GetInteriorMap(), Nektar::StdRegions::StdTetExp::v_GetInteriorMap(), Nektar::StdRegions::StdHexExp::v_GetInteriorMap(), Nektar::StdRegions::StdPyrExp::v_GetInteriorMap(), Nektar::StdRegions::StdSegExp::v_GetVertexMap(), Nektar::StdRegions::StdQuadExp::v_GetVertexMap(), Nektar::StdRegions::StdHexExp::v_GetVertexMap(), Nektar::StdRegions::StdPrismExp::v_IProductWRTBase(), Nektar::StdRegions::StdTetExp::v_IProductWRTBase(), Nektar::StdRegions::StdTriExp::v_IProductWRTBase_SumFacKernel(), Nektar::StdRegions::StdPrismExp::v_IProductWRTBase_SumFacKernel(), Nektar::StdRegions::StdTetExp::v_IProductWRTBase_SumFacKernel(), Nektar::StdRegions::StdQuadExp::v_IsBoundaryInteriorExpansion(), Nektar::StdRegions::StdPrismExp::v_IsBoundaryInteriorExpansion(), Nektar::StdRegions::StdHexExp::v_IsBoundaryInteriorExpansion(), Nektar::StdRegions::StdSegExp::v_IsBoundaryInteriorExpansion(), Nektar::StdRegions::StdTetExp::v_IsBoundaryInteriorExpansion(), Nektar::StdRegions::StdTriExp::v_NumBndryCoeffs(), Nektar::StdRegions::StdQuadExp::v_NumBndryCoeffs(), Nektar::StdRegions::StdPrismExp::v_NumBndryCoeffs(), Nektar::StdRegions::StdHexExp::v_NumBndryCoeffs(), Nektar::StdRegions::StdTetExp::v_NumBndryCoeffs(), Nektar::StdRegions::StdPyrExp::v_NumBndryCoeffs(), Nektar::StdRegions::StdTriExp::v_NumDGBndryCoeffs(), Nektar::StdRegions::StdQuadExp::v_NumDGBndryCoeffs(), Nektar::StdRegions::StdPrismExp::v_NumDGBndryCoeffs(), Nektar::StdRegions::StdHexExp::v_NumDGBndryCoeffs(), Nektar::StdRegions::StdTetExp::v_NumDGBndryCoeffs(), Nektar::LocalRegions::HexExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdTriExp::v_ReduceOrderCoeffs(), Nektar::StdRegions::StdQuadExp::v_ReduceOrderCoeffs(), Nektar::LocalRegions::TriExp::v_ReduceOrderCoeffs(), and Nektar::LocalRegions::QuadExp::v_ReduceOrderCoeffs().

166  {
167  ASSERTL1(dir < m_base.num_elements(), "dir is larger than m_numbases");
168  return(m_base[dir]->GetBasisType());
169  }
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
Definition: StdExpansion.h:165
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
Array< OneD, LibUtilities::BasisSharedPtr > m_base
void Nektar::StdRegions::StdExpansion::GetBoundaryMap ( Array< OneD, unsigned int > &  outarray)
inline
StdRegions::Orientation Nektar::StdRegions::StdExpansion::GetCartesianEorient ( int  edge)
inline

Definition at line 772 of file StdExpansion.h.

References v_GetCartesianEorient().

Referenced by Nektar::LocalRegions::QuadExp::v_GetEdgePhysVals(), and Nektar::LocalRegions::TriExp::v_GetEdgePhysVals().

773  {
774  return v_GetCartesianEorient(edge);
775  }
virtual StdRegions::Orientation v_GetCartesianEorient(int edge)
void Nektar::StdRegions::StdExpansion::GetCoord ( const Array< OneD, const NekDouble > &  Lcoord,
Array< OneD, NekDouble > &  coord 
)
inline

given the coordinates of a point of the element in the local collapsed coordinate system, this function calculates the physical coordinates of the point

This function is a wrapper around the virtual function v_GetCoord()

Parameters
Lcoordsthe coordinates in the local collapsed coordinate system
coordsthe physical coordinates (output of the function)

Definition at line 694 of file StdExpansion.h.

References v_GetCoord().

696  {
697  v_GetCoord(Lcoord, coord);
698  }
virtual void v_GetCoord(const Array< OneD, const NekDouble > &Lcoord, Array< OneD, NekDouble > &coord)
int Nektar::StdRegions::StdExpansion::GetCoordim ( )
inline
void Nektar::StdRegions::StdExpansion::GetCoords ( Array< OneD, NekDouble > &  coords_1,
Array< OneD, NekDouble > &  coords_2 = NullNekDouble1DArray,
Array< OneD, NekDouble > &  coords_3 = NullNekDouble1DArray 
)
inline

this function returns the physical coordinates of the quadrature points of the expansion

This function is a wrapper around the virtual function v_GetCoords()

Parameters
coordsan array containing the coordinates of the quadrature points (output of the function)

Definition at line 676 of file StdExpansion.h.

References v_GetCoords().

Referenced by main().

679  {
680  v_GetCoords(coords_1,coords_2,coords_3);
681  }
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2)
LibUtilities::BasisType Nektar::StdRegions::StdExpansion::GetEdgeBasisType ( const int  i) const
inline

This function returns the type of expansion basis on the i-th edge.

This function is a wrapper around the virtual function v_GetEdgeBasisType()

The different types of bases implemented in the code are defined in the LibUtilities::BasisType enumeration list. As a result, the function will return one of the types of this enumeration list.

Parameters
ispecifies which edge
Returns
returns the expansion basis on the i-th edge

Definition at line 413 of file StdExpansion.h.

References v_GetEdgeBasisType().

Referenced by Nektar::StdRegions::StdQuadExp::v_GetEdgeInteriorMap(), Nektar::StdRegions::StdTriExp::v_GetEdgeInteriorMap(), Nektar::StdRegions::StdTriExp::v_GetEdgeToElementMap(), Nektar::StdRegions::StdQuadExp::v_GetEdgeToElementMap(), Nektar::StdRegions::StdPrismExp::v_GetFaceToElementMap(), Nektar::StdRegions::StdHexExp::v_GetFaceToElementMap(), Nektar::StdRegions::StdPyrExp::v_GetFaceToElementMap(), Nektar::StdRegions::StdTriExp::v_GetVertexMap(), Nektar::StdRegions::StdPrismExp::v_GetVertexMap(), Nektar::StdRegions::StdTetExp::v_GetVertexMap(), and Nektar::StdRegions::StdPyrExp::v_GetVertexMap().

414  {
415  return v_GetEdgeBasisType(i);
416  }
virtual LibUtilities::BasisType v_GetEdgeBasisType(const int i) const
void Nektar::StdRegions::StdExpansion::GetEdgeInteriorMap ( const int  eid,
const Orientation  edgeOrient,
Array< OneD, unsigned int > &  maparray,
Array< OneD, int > &  signarray 
)
inline

Definition at line 832 of file StdExpansion.h.

References v_GetEdgeInteriorMap().

Referenced by Nektar::LocalRegions::Expansion2D::v_GetEdgeInverseBoundaryMap().

835  {
836  v_GetEdgeInteriorMap(eid,edgeOrient,maparray,signarray);
837  }
virtual void v_GetEdgeInteriorMap(const int eid, const Orientation edgeOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
void Nektar::StdRegions::StdExpansion::GetEdgeInterpVals ( const int  edge,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 898 of file StdExpansion.h.

References v_GetEdgeInterpVals().

901  {
902  v_GetEdgeInterpVals(edge, inarray, outarray);
903  }
virtual void v_GetEdgeInterpVals(const int edge, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Array<OneD, unsigned int> Nektar::StdRegions::StdExpansion::GetEdgeInverseBoundaryMap ( int  eid)
inline

Definition at line 1339 of file StdExpansion.h.

References v_GetEdgeInverseBoundaryMap().

1340  {
1341  return v_GetEdgeInverseBoundaryMap(eid);
1342  }
virtual Array< OneD, unsigned int > v_GetEdgeInverseBoundaryMap(int eid)
int Nektar::StdRegions::StdExpansion::GetEdgeNcoeffs ( const int  i) const
inline
const NormalVector& Nektar::StdRegions::StdExpansion::GetEdgeNormal ( const int  edge) const
inline
int Nektar::StdRegions::StdExpansion::GetEdgeNumPoints ( const int  i) const
inline

This function returns the number of quadrature points belonging to the i-th edge.

This function is a wrapper around the virtual function v_GetEdgeNumPoints()

Parameters
ispecifies which edge
Returns
returns the number of expansion coefficients belonging to the i-th edge

Definition at line 308 of file StdExpansion.h.

References v_GetEdgeNumPoints().

309  {
310  return v_GetEdgeNumPoints(i);
311  }
virtual int v_GetEdgeNumPoints(const int i) const
void Nektar::StdRegions::StdExpansion::GetEdgePhysMap ( const int  edge,
Array< OneD, int > &  outarray 
)
inline

Definition at line 928 of file StdExpansion.h.

References v_GetEdgePhysMap().

931  {
932  v_GetEdgePhysMap(edge, outarray);
933  }
virtual void v_GetEdgePhysMap(const int edge, Array< OneD, int > &outarray)
void Nektar::StdRegions::StdExpansion::GetEdgePhysVals ( const int  edge,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Extract the physical values along edge edge from inarray into outarray following the local edge orientation and point distribution defined by defined in EdgeExp.

Definition at line 871 of file StdExpansion.h.

References v_GetEdgePhysVals().

Referenced by Nektar::MultiRegions::DisContField3DHomogeneous1D::GetBCValues().

874  {
875  v_GetEdgePhysVals(edge,inarray,outarray);
876  }
virtual void v_GetEdgePhysVals(const int edge, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Extract the physical values along edge edge from inarray into outarray following the local edge orien...
void Nektar::StdRegions::StdExpansion::GetEdgePhysVals ( const int  edge,
const boost::shared_ptr< StdExpansion > &  EdgeExp,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 878 of file StdExpansion.h.

References v_GetEdgePhysVals().

882  {
883  v_GetEdgePhysVals(edge,EdgeExp,inarray,outarray);
884  }
virtual void v_GetEdgePhysVals(const int edge, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Extract the physical values along edge edge from inarray into outarray following the local edge orien...
void Nektar::StdRegions::StdExpansion::GetEdgeQFactors ( const int  edge,
Array< OneD, NekDouble > &  outarray 
)
inline

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).

Definition at line 911 of file StdExpansion.h.

References v_GetEdgeQFactors().

914  {
915  v_GetEdgeQFactors(edge, outarray);
916  }
virtual void v_GetEdgeQFactors(const int edge, Array< OneD, NekDouble > &outarray)
void Nektar::StdRegions::StdExpansion::GetEdgeToElementMap ( const int  eid,
const Orientation  edgeOrient,
Array< OneD, unsigned int > &  maparray,
Array< OneD, int > &  signarray,
int  P = -1 
)
inline
int Nektar::StdRegions::StdExpansion::GetElmtId ( )
inline

Get the element id of this expansion when used in a list by returning value of m_elmt_id.

Definition at line 654 of file StdExpansion.h.

References m_elmt_id.

655  {
656  return m_elmt_id;
657  }
StdRegions::Orientation Nektar::StdRegions::StdExpansion::GetEorient ( int  edge)
inline
void Nektar::StdRegions::StdExpansion::GetFaceInteriorMap ( const int  fid,
const Orientation  faceOrient,
Array< OneD, unsigned int > &  maparray,
Array< OneD, int > &  signarray 
)
inline

Definition at line 839 of file StdExpansion.h.

References v_GetFaceInteriorMap().

842  {
843  v_GetFaceInteriorMap(fid,faceOrient,maparray,signarray);
844  }
virtual void v_GetFaceInteriorMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray)
int Nektar::StdRegions::StdExpansion::GetFaceIntNcoeffs ( const int  i) const
inline
Array<OneD, unsigned int> Nektar::StdRegions::StdExpansion::GetFaceInverseBoundaryMap ( int  fid,
StdRegions::Orientation  faceOrient = eNoOrientation 
)
inline

Definition at line 1345 of file StdExpansion.h.

References v_GetFaceInverseBoundaryMap().

1346  {
1347  return v_GetFaceInverseBoundaryMap(fid,faceOrient);
1348  }
virtual Array< OneD, unsigned int > v_GetFaceInverseBoundaryMap(int fid, StdRegions::Orientation faceOrient=eNoOrientation)
int Nektar::StdRegions::StdExpansion::GetFaceNcoeffs ( const int  i) const
inline

This function returns the number of expansion coefficients belonging to the i-th face.

This function is a wrapper around the virtual function v_GetFaceNcoeffs()

Parameters
ispecifies which face
Returns
returns the number of expansion coefficients belonging to the i-th face

Definition at line 354 of file StdExpansion.h.

References v_GetFaceNcoeffs().

Referenced by Nektar::StdRegions::StdPrismExp::v_GetFaceToElementMap(), Nektar::StdRegions::StdPyrExp::v_GetFaceToElementMap(), and Nektar::StdRegions::StdExpansion3D::v_GetTraceNcoeffs().

355  {
356  return v_GetFaceNcoeffs(i);
357  }
virtual int v_GetFaceNcoeffs(const int i) const
const NormalVector& Nektar::StdRegions::StdExpansion::GetFaceNormal ( const int  face) const
inline

Definition at line 1313 of file StdExpansion.h.

References v_GetFaceNormal().

1314  {
1315  return v_GetFaceNormal(face);
1316  }
virtual const NormalVector & v_GetFaceNormal(const int face) const
int Nektar::StdRegions::StdExpansion::GetFaceNumPoints ( const int  i) const
inline

This function returns the number of quadrature points belonging to the i-th face.

This function is a wrapper around the virtual function v_GetFaceNumPoints()

Parameters
ispecifies which face
Returns
returns the number of expansion coefficients belonging to the i-th face

Definition at line 339 of file StdExpansion.h.

References v_GetFaceNumPoints().

340  {
341  return v_GetFaceNumPoints(i);
342  }
virtual int v_GetFaceNumPoints(const int i) const
void Nektar::StdRegions::StdExpansion::GetFacePhysMap ( const int  face,
Array< OneD, int > &  outarray 
)
inline

Definition at line 935 of file StdExpansion.h.

References v_GetFacePhysMap().

938  {
939  v_GetFacePhysMap(face, outarray);
940  }
virtual void v_GetFacePhysMap(const int face, Array< OneD, int > &outarray)
void Nektar::StdRegions::StdExpansion::GetFacePhysVals ( const int  face,
const boost::shared_ptr< StdExpansion > &  FaceExp,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
StdRegions::Orientation  orient = eNoOrientation 
)
inline

Definition at line 918 of file StdExpansion.h.

References v_GetFacePhysVals().

924  {
925  v_GetFacePhysVals(face, FaceExp, inarray, outarray, orient);
926  }
virtual void v_GetFacePhysVals(const int face, const boost::shared_ptr< StdExpansion > &FaceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient)
LibUtilities::PointsKey Nektar::StdRegions::StdExpansion::GetFacePointsKey ( const int  i,
const int  j 
) const
inline

Definition at line 385 of file StdExpansion.h.

References v_GetFacePointsKey().

386  {
387  return v_GetFacePointsKey(i, j);
388  }
virtual LibUtilities::PointsKey v_GetFacePointsKey(const int i, const int j) const
void Nektar::StdRegions::StdExpansion::GetFaceToElementMap ( const int  fid,
const Orientation  faceOrient,
Array< OneD, unsigned int > &  maparray,
Array< OneD, int > &  signarray,
int  nummodesA = -1,
int  nummodesB = -1 
)
inline

Definition at line 855 of file StdExpansion.h.

References v_GetFaceToElementMap().

859  {
860  v_GetFaceToElementMap(fid,faceOrient,maparray,signarray,
861  nummodesA,nummodesB);
862  }
virtual void v_GetFaceToElementMap(const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int nummodesA=-1, int nummodesB=-1)
StdRegions::Orientation Nektar::StdRegions::StdExpansion::GetForient ( int  face)
inline

Definition at line 757 of file StdExpansion.h.

References v_GetForient().

758  {
759  return v_GetForient(face);
760  }
virtual StdRegions::Orientation v_GetForient(int face)
IndexMapValuesSharedPtr Nektar::StdRegions::StdExpansion::GetIndexMap ( const IndexMapKey ikey)
inline

Definition at line 710 of file StdExpansion.h.

References m_IndexMapManager.

711  {
712  return m_IndexMapManager[ikey];
713  }
LibUtilities::NekManager< IndexMapKey, IndexMapValues, IndexMapKey::opLess > m_IndexMapManager
void Nektar::StdRegions::StdExpansion::GetInteriorMap ( Array< OneD, unsigned int > &  outarray)
inline
DNekScalBlkMatSharedPtr Nektar::StdRegions::StdExpansion::GetLocStaticCondMatrix ( const LocalRegions::MatrixKey mkey)
inline
const boost::shared_ptr<SpatialDomains::GeomFactors>& Nektar::StdRegions::StdExpansion::GetMetricInfo ( void  ) const
inline
int Nektar::StdRegions::StdExpansion::GetNcoeffs ( void  ) const
inline

This function returns the total number of coefficients used in the expansion.

Returns
returns the total number of coefficients (which is equivalent to the total number of modes) used in the expansion

Definition at line 131 of file StdExpansion.h.

References m_ncoeffs.

Referenced by Nektar::LocalRegions::Expansion2D::AddHDGHelmholtzEdgeTerms(), Nektar::CoupledLocalToGlobalC0ContMap::CoupledLocalToGlobalC0ContMap(), Nektar::LocalRegions::Expansion2D::GetPhysEdgeVarCoeffsFromElement(), LaplacianMatrixOp_MatFree(), Nektar::LocalRegions::Expansion2D::v_AddRobinEdgeContribution(), Nektar::LocalRegions::Expansion2D::v_AddRobinMassMatrix(), Nektar::LocalRegions::Expansion2D::v_DGDeriv(), Nektar::LocalRegions::TetExp::v_FwdTrans(), Nektar::LocalRegions::PrismExp::v_FwdTrans(), Nektar::LocalRegions::PyrExp::v_FwdTrans(), Nektar::LocalRegions::HexExp::v_FwdTrans(), Nektar::StdRegions::StdHexExp::v_FwdTrans(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::StdRegions::StdQuadExp::v_GetBoundaryMap(), Nektar::StdRegions::StdNodalTriExp::v_GetInteriorMap(), Nektar::StdRegions::StdSegExp::v_GetInteriorMap(), Nektar::StdRegions::StdQuadExp::v_GetInteriorMap(), Nektar::StdRegions::StdTriExp::v_GetInteriorMap(), Nektar::StdRegions::StdTriExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdPrismExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdQuadExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdTetExp::v_SVVLaplacianFilter(), and Nektar::StdRegions::StdHexExp::v_SVVLaplacianFilter().

132  {
133  return(m_ncoeffs);
134  }
int Nektar::StdRegions::StdExpansion::GetNedges ( ) const
inline
int Nektar::StdRegions::StdExpansion::GetNfaces ( ) const
inline

This function returns the number of faces of the expansion domain.

This function is a wrapper around the virtual function v_GetNFaces()

Returns
returns the number of faces of the expansion domain

Definition at line 438 of file StdExpansion.h.

References v_GetNfaces().

Referenced by Nektar::MultiRegions::ExpList2D::ExpList2D(), and GetNtrace().

439  {
440  return v_GetNfaces();
441  }
virtual int v_GetNfaces() const
const LibUtilities::PointsKey Nektar::StdRegions::StdExpansion::GetNodalPointsKey ( ) const
inline

This function returns the type of expansion Nodal point type if defined.

This function is a wrapper around the virtual function v_GetNodalPointsKey()

Definition at line 425 of file StdExpansion.h.

References v_GetNodalPointsKey().

426  {
427  return v_GetNodalPointsKey();
428  };
virtual const LibUtilities::PointsKey v_GetNodalPointsKey() const
int Nektar::StdRegions::StdExpansion::GetNtrace ( ) const
inline

Returns the number of trace elements connected to this element.

For example, a quadrilateral has four edges, so this function would return 4.

Definition at line 450 of file StdExpansion.h.

References GetNedges(), GetNfaces(), and m_base.

451  {
452  const int nBase = m_base.num_elements();
453  return
454  nBase == 1 ? 2 :
455  nBase == 2 ? GetNedges() :
456  nBase == 3 ? GetNfaces() : 0;
457  }
int GetNfaces() const
This function returns the number of faces of the expansion domain.
Definition: StdExpansion.h:438
Array< OneD, LibUtilities::BasisSharedPtr > m_base
int GetNedges() const
This function returns the number of edges of the expansion domain.
Definition: StdExpansion.h:272
int Nektar::StdRegions::StdExpansion::GetNumBases ( ) const
inline

This function returns the number of 1D bases used in the expansion.

Returns
returns the number of 1D bases used in the expansion, which is equal to number dimension of the expansion

Definition at line 98 of file StdExpansion.h.

References m_base.

99  {
100  return m_base.num_elements();
101  }
Array< OneD, LibUtilities::BasisSharedPtr > m_base
int Nektar::StdRegions::StdExpansion::GetNumPoints ( const int  dir) const
inline

This function returns the number of quadrature points in the dir direction.

Parameters
dirthe direction
Returns
returns the number of quadrature points in the dir direction

Definition at line 229 of file StdExpansion.h.

References ASSERTL1, and m_base.

Referenced by Nektar::StdRegions::StdHexExp::v_BwdTrans(), Nektar::StdRegions::StdQuadExp::v_BwdTrans(), Nektar::StdRegions::StdPrismExp::v_BwdTrans(), Nektar::StdRegions::StdTetExp::v_BwdTrans(), Nektar::StdRegions::StdPyrExp::v_BwdTrans(), Nektar::StdRegions::StdHexExp::v_BwdTrans_SumFac(), Nektar::StdRegions::StdTriExp::v_BwdTrans_SumFac(), Nektar::StdRegions::StdQuadExp::v_BwdTrans_SumFac(), Nektar::StdRegions::StdTriExp::v_DetEdgeBasisKey(), Nektar::StdRegions::StdPrismExp::v_DetFaceBasisKey(), Nektar::StdRegions::StdHexExp::v_DetFaceBasisKey(), Nektar::StdRegions::StdTetExp::v_DetFaceBasisKey(), Nektar::StdRegions::StdPyrExp::v_DetFaceBasisKey(), Nektar::StdRegions::StdPointExp::v_GetCoords(), Nektar::StdRegions::StdPrismExp::v_GetCoords(), Nektar::StdRegions::StdTetExp::v_GetCoords(), Nektar::StdRegions::StdSegExp::v_GetCoords(), Nektar::StdRegions::StdTriExp::v_GetCoords(), Nektar::StdRegions::StdQuadExp::v_GetCoords(), Nektar::StdRegions::StdPyrExp::v_GetCoords(), Nektar::StdRegions::StdHexExp::v_GetCoords(), Nektar::StdRegions::StdQuadExp::v_GetEdgeNumPoints(), Nektar::StdRegions::StdTriExp::v_GetEdgeNumPoints(), Nektar::LocalRegions::SegExp::v_GetNumPoints(), Nektar::LocalRegions::TriExp::v_GetNumPoints(), and Nektar::LocalRegions::QuadExp::v_GetNumPoints().

230  {
231  ASSERTL1(dir < m_base.num_elements() || dir == 0,
232  "dir is larger than m_numbases");
233  return(m_base.num_elements() > 0 ? m_base[dir]->GetNumPoints() : 1);
234  }
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
Array< OneD, LibUtilities::BasisSharedPtr > m_base
int Nektar::StdRegions::StdExpansion::GetNverts ( ) const
inline

This function returns the number of vertices of the expansion domain.

This function is a wrapper around the virtual function v_GetNverts()

Returns
returns the number of vertices of the expansion domain

Definition at line 259 of file StdExpansion.h.

References v_GetNverts().

Referenced by Nektar::LocalRegions::Expansion2D::v_BuildVertexMatrix().

260  {
261  return v_GetNverts();
262  }
virtual int v_GetNverts() const =0
const Array<OneD, const NekDouble>& Nektar::StdRegions::StdExpansion::GetPhysNormals ( void  )
inline

Definition at line 715 of file StdExpansion.h.

References v_GetPhysNormals().

716  {
717  return v_GetPhysNormals();
718  }
virtual const Array< OneD, const NekDouble > & v_GetPhysNormals(void)
const Array<OneD, const NekDouble>& Nektar::StdRegions::StdExpansion::GetPoints ( const int  dir) const
inline

This function returns a pointer to the array containing the quadrature points in dir direction.

Parameters
dirthe direction
Returns
returns a pointer to the array containing the quadrature points in dir direction

Definition at line 243 of file StdExpansion.h.

References m_base.

244  {
245  return m_base[dir]->GetZ();
246  }
Array< OneD, LibUtilities::BasisSharedPtr > m_base
const LibUtilities::PointsKeyVector Nektar::StdRegions::StdExpansion::GetPointsKeys ( ) const
inline

Definition at line 1328 of file StdExpansion.h.

References m_base.

Referenced by Nektar::LocalRegions::Expansion::ComputeQuadratureMetric(), Nektar::LocalRegions::PyrExp::CreateMatrix(), Nektar::LocalRegions::NodalTriExp::CreateMatrix(), Nektar::LocalRegions::TetExp::CreateMatrix(), Nektar::LocalRegions::PrismExp::CreateMatrix(), Nektar::LocalRegions::QuadExp::CreateMatrix(), Nektar::LocalRegions::TriExp::CreateMatrix(), Nektar::LocalRegions::SegExp::CreateMatrix(), Nektar::LocalRegions::HexExp::CreateMatrix(), Nektar::LocalRegions::QuadExp::CreateStaticCondMatrix(), Nektar::LocalRegions::TriExp::CreateStaticCondMatrix(), Nektar::LocalRegions::NodalTriExp::Integral(), Nektar::LocalRegions::HexExp::IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::NodalTriExp::IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::NodalTriExp::PhysDeriv(), Nektar::LocalRegions::QuadExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::TriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::NodalTriExp::v_ComputeEdgeNormal(), Nektar::LocalRegions::PyrExp::v_ComputeFaceNormal(), Nektar::LocalRegions::TetExp::v_ComputeFaceNormal(), Nektar::LocalRegions::PrismExp::v_ComputeFaceNormal(), Nektar::LocalRegions::HexExp::v_ComputeFaceNormal(), Nektar::LocalRegions::PyrExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::TetExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::HexExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::TriExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::QuadExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::SegExp::v_ComputeVertexNormal(), Nektar::LocalRegions::QuadExp::v_GetEdgeQFactors(), Nektar::LocalRegions::SegExp::v_HelmholtzMatrixOp(), Nektar::LocalRegions::SegExp::v_Integral(), Nektar::LocalRegions::PrismExp::v_Integral(), Nektar::LocalRegions::TetExp::v_Integral(), Nektar::LocalRegions::PyrExp::v_Integral(), Nektar::LocalRegions::TriExp::v_Integral(), Nektar::LocalRegions::QuadExp::v_Integral(), Nektar::LocalRegions::HexExp::v_Integral(), Nektar::LocalRegions::PyrExp::v_IProductWRTBase(), Nektar::LocalRegions::SegExp::v_IProductWRTBase(), Nektar::LocalRegions::TetExp::v_IProductWRTDerivBase(), Nektar::LocalRegions::SegExp::v_IProductWRTDerivBase(), Nektar::LocalRegions::PrismExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::TriExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::QuadExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::SegExp::v_LaplacianMatrixOp(), Nektar::LocalRegions::PrismExp::v_LaplacianMatrixOp_MatFree_Kernel(), Nektar::LocalRegions::SegExp::v_PhysDeriv(), Nektar::LocalRegions::TetExp::v_PhysDeriv(), Nektar::LocalRegions::PrismExp::v_PhysDeriv(), Nektar::LocalRegions::PyrExp::v_PhysDeriv(), Nektar::LocalRegions::TriExp::v_PhysDeriv(), Nektar::LocalRegions::QuadExp::v_PhysDeriv(), Nektar::LocalRegions::HexExp::v_PhysDeriv(), Nektar::LocalRegions::SegExp::v_PhysDeriv_n(), Nektar::LocalRegions::SegExp::v_PhysDeriv_s(), Nektar::LocalRegions::TriExp::v_PhysDirectionalDeriv(), Nektar::LocalRegions::QuadExp::v_PhysDirectionalDeriv(), Nektar::LocalRegions::TetExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::PrismExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::HexExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::TriExp::v_SVVLaplacianFilter(), and Nektar::LocalRegions::QuadExp::v_SVVLaplacianFilter().

1329  {
1331  for (int i = 0; i < m_base.num_elements(); ++i)
1332  {
1333  p.push_back(m_base[i]->GetPointsKey());
1334  }
1335  return p;
1336  }
std::vector< PointsKey > PointsKeyVector
Definition: Points.h:220
Array< OneD, LibUtilities::BasisSharedPtr > m_base
LibUtilities::PointsType Nektar::StdRegions::StdExpansion::GetPointsType ( const int  dir) const
inline

This function returns the type of quadrature points used in the dir direction.

The different types of quadrature points implemented in the code are defined in the LibUtilities::PointsType enumeration list. As a result, the function will return one of the types of this enumeration list.

Parameters
dirthe direction
Returns
returns the type of quadrature points used in the dir direction

Definition at line 216 of file StdExpansion.h.

References ASSERTL1, and m_base.

Referenced by Nektar::LocalRegions::QuadExp::v_ComputeEdgeNormal(), Nektar::StdRegions::StdTriExp::v_DetEdgeBasisKey(), Nektar::LocalRegions::SegExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::TriExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::QuadExp::v_GetEdgePhysVals(), Nektar::LocalRegions::QuadExp::v_GetEdgeQFactors(), Nektar::LocalRegions::SegExp::v_GetVertexPhysVals(), Nektar::StdRegions::StdTriExp::v_Integral(), Nektar::StdRegions::StdPyrExp::v_MultiplyByStdQuadratureMetric(), Nektar::StdRegions::StdPrismExp::v_MultiplyByStdQuadratureMetric(), Nektar::StdRegions::StdTetExp::v_MultiplyByStdQuadratureMetric(), Nektar::StdRegions::StdTriExp::v_MultiplyByStdQuadratureMetric(), Nektar::StdRegions::StdTriExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdPrismExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdQuadExp::v_SVVLaplacianFilter(), Nektar::StdRegions::StdTetExp::v_SVVLaplacianFilter(), and Nektar::StdRegions::StdHexExp::v_SVVLaplacianFilter().

217  {
218  ASSERTL1(dir < m_base.num_elements(), "dir is larger than m_numbases");
219  return(m_base[dir]->GetPointsType());
220  }
LibUtilities::PointsType GetPointsType(const int dir) const
This function returns the type of quadrature points used in the dir direction.
Definition: StdExpansion.h:216
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
Array< OneD, LibUtilities::BasisSharedPtr > m_base
StdRegions::Orientation Nektar::StdRegions::StdExpansion::GetPorient ( int  point)
inline

Definition at line 767 of file StdExpansion.h.

References v_GetPorient().

768  {
769  return v_GetPorient(point);
770  }
virtual StdRegions::Orientation v_GetPorient(int point)
int Nektar::StdRegions::StdExpansion::GetShapeDimension ( ) const
inline

Definition at line 481 of file StdExpansion.h.

References v_GetShapeDimension().

482  {
483  return v_GetShapeDimension();
484  }
virtual int v_GetShapeDimension() const
void Nektar::StdRegions::StdExpansion::GetSimplexEquiSpacedConnectivity ( Array< OneD, int > &  conn,
bool  standard = true 
)
inline

This function provides the connectivity of local simplices (triangles or tets) to connect the equispaced data points provided by PhysInterpToSimplexEquiSpaced.

This is a virtual call to the function v_GetSimplexEquiSpaceConnectivity

Definition at line 1381 of file StdExpansion.h.

References v_GetSimplexEquiSpacedConnectivity().

1384  {
1385  v_GetSimplexEquiSpacedConnectivity(conn,standard);
1386  }
virtual void v_GetSimplexEquiSpacedConnectivity(Array< OneD, int > &conn, bool standard=true)
boost::shared_ptr<StdExpansion> Nektar::StdRegions::StdExpansion::GetStdExp ( void  ) const
inline

Definition at line 475 of file StdExpansion.h.

References v_GetStdExp().

476  {
477  return v_GetStdExp();
478  }
virtual boost::shared_ptr< StdExpansion > v_GetStdExp(void) const
DNekMatSharedPtr Nektar::StdRegions::StdExpansion::GetStdMatrix ( const StdMatrixKey mkey)
inline

Definition at line 700 of file StdExpansion.h.

References m_stdMatrixManager.

Referenced by BwdTrans_MatOp(), CreateGeneralMatrix(), Nektar::LocalRegions::PyrExp::CreateMatrix(), Nektar::LocalRegions::NodalTriExp::CreateMatrix(), Nektar::LocalRegions::TetExp::CreateMatrix(), Nektar::LocalRegions::PrismExp::CreateMatrix(), Nektar::LocalRegions::TriExp::CreateMatrix(), Nektar::LocalRegions::QuadExp::CreateMatrix(), Nektar::LocalRegions::SegExp::CreateMatrix(), Nektar::LocalRegions::HexExp::CreateMatrix(), CreateStdStaticCondMatrix(), EquiSpacedToCoeffs(), Nektar::LinearisedAdvection::GetFloquetBlockMatrix(), Nektar::AdjointAdvection::GetFloquetBlockMatrix(), Nektar::StdRegions::StdNodalPrismExp::ModalToNodal(), Nektar::StdRegions::StdNodalTetExp::ModalToNodal(), Nektar::StdRegions::StdNodalTriExp::ModalToNodal(), Nektar::StdRegions::StdNodalPrismExp::NodalToModal(), Nektar::StdRegions::StdNodalTetExp::NodalToModal(), Nektar::StdRegions::StdNodalTriExp::NodalToModal(), Nektar::StdRegions::StdNodalPrismExp::NodalToModalTranspose(), Nektar::StdRegions::StdNodalTetExp::NodalToModalTranspose(), Nektar::StdRegions::StdNodalTriExp::NodalToModalTranspose(), PhysInterpToSimplexEquiSpaced(), Nektar::StdRegions::StdPointExp::v_FwdTrans(), Nektar::StdRegions::StdNodalTetExp::v_FwdTrans(), Nektar::StdRegions::StdNodalPrismExp::v_FwdTrans(), Nektar::StdRegions::StdNodalTriExp::v_FwdTrans(), Nektar::StdRegions::StdTriExp::v_FwdTrans(), Nektar::StdRegions::StdSegExp::v_FwdTrans(), Nektar::StdRegions::StdHexExp::v_FwdTrans(), Nektar::StdRegions::StdQuadExp::v_FwdTrans(), Nektar::StdRegions::StdPrismExp::v_FwdTrans(), Nektar::StdRegions::StdTetExp::v_FwdTrans(), Nektar::StdRegions::StdPyrExp::v_FwdTrans(), Nektar::StdRegions::StdPointExp::v_GenMatrix(), Nektar::StdRegions::StdQuadExp::v_GenMatrix(), Nektar::StdRegions::StdSegExp::v_GenMatrix(), Nektar::StdRegions::StdTriExp::v_IProductWRTBase_MatOp(), Nektar::StdRegions::StdPrismExp::v_IProductWRTBase_MatOp(), Nektar::StdRegions::StdHexExp::v_IProductWRTBase_MatOp(), Nektar::StdRegions::StdQuadExp::v_IProductWRTBase_MatOp(), Nektar::StdRegions::StdTetExp::v_IProductWRTBase_MatOp(), Nektar::StdRegions::StdTriExp::v_IProductWRTDerivBase_MatOp(), Nektar::StdRegions::StdPrismExp::v_IProductWRTDerivBase_MatOp(), Nektar::StdRegions::StdQuadExp::v_IProductWRTDerivBase_MatOp(), Nektar::StdRegions::StdHexExp::v_IProductWRTDerivBase_MatOp(), and Nektar::StdRegions::StdTetExp::v_IProductWRTDerivBase_MatOp().

701  {
702  return m_stdMatrixManager[mkey];
703  }
LibUtilities::NekManager< StdMatrixKey, DNekMat, StdMatrixKey::opLess > m_stdMatrixManager
DNekBlkMatSharedPtr Nektar::StdRegions::StdExpansion::GetStdStaticCondMatrix ( const StdMatrixKey mkey)
inline
const NormalVector& Nektar::StdRegions::StdExpansion::GetSurfaceNormal ( const int  id) const
inline

Definition at line 1323 of file StdExpansion.h.

References v_GetSurfaceNormal().

1324  {
1325  return v_GetSurfaceNormal(id);
1326  }
virtual const NormalVector & v_GetSurfaceNormal(const int id) const
int Nektar::StdRegions::StdExpansion::GetTotalEdgeIntNcoeffs ( ) const
inline

Definition at line 293 of file StdExpansion.h.

References v_GetTotalEdgeIntNcoeffs().

294  {
295  return v_GetTotalEdgeIntNcoeffs();
296  }
virtual int v_GetTotalEdgeIntNcoeffs() const
int Nektar::StdRegions::StdExpansion::GetTotalFaceIntNcoeffs ( ) const
inline

Definition at line 364 of file StdExpansion.h.

References v_GetTotalFaceIntNcoeffs().

365  {
366  return v_GetTotalFaceIntNcoeffs();
367  }
virtual int v_GetTotalFaceIntNcoeffs() const
int Nektar::StdRegions::StdExpansion::GetTotPoints ( ) const
inline

This function returns the total number of quadrature points used in the element.

Returns
returns the total number of quadrature points

Definition at line 141 of file StdExpansion.h.

References m_base.

Referenced by Nektar::LocalRegions::Expansion2D::AddHDGHelmholtzTraceTerms(), BwdTrans_MatOp(), Nektar::LocalRegions::Expansion::ComputeQuadratureMetric(), CreateGeneralMatrix(), Nektar::StdRegions::StdNodalPrismExp::GenNBasisTransMatrix(), Nektar::StdRegions::StdNodalTetExp::GenNBasisTransMatrix(), Nektar::StdRegions::StdNodalTriExp::GenNBasisTransMatrix(), Nektar::CFLtester::GetStdVelocity(), H1(), Nektar::LocalRegions::NodalTriExp::IProductWRTBase_MatOp(), Nektar::LocalRegions::HexExp::IProductWRTDerivBase_MatOp(), Nektar::LocalRegions::NodalTriExp::IProductWRTDerivBase_MatOp(), L2(), LaplacianMatrixOp_MatFree(), LinearAdvectionDiffusionReactionMatrixOp_MatFree(), Linf(), main(), MassMatrixOp_MatFree(), PhysInterpToSimplexEquiSpaced(), Nektar::StdRegions::StdExpansion0D::PhysTensorDeriv(), Nektar::StdRegions::StdExpansion1D::PhysTensorDeriv(), Nektar::Utilities::ProcessDisplacement::Process(), Nektar::Utilities::ProcessScalGrad::Process(), Nektar::StdRegions::StdMatrixKey::StdMatrixKey(), Nektar::FilterMovingBody::UpdateForce(), Nektar::LocalRegions::PyrExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::TetExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::HexExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::TriExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::QuadExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::StdRegions::StdExpansion3D::v_Integral(), Nektar::LocalRegions::TriExp::v_IProductWRTBase_MatOp(), Nektar::LocalRegions::QuadExp::v_IProductWRTBase_MatOp(), Nektar::StdRegions::StdTriExp::v_IProductWRTBase_MatOp(), Nektar::StdRegions::StdHexExp::v_IProductWRTBase_MatOp(), Nektar::StdRegions::StdPrismExp::v_IProductWRTBase_MatOp(), Nektar::StdRegions::StdQuadExp::v_IProductWRTBase_MatOp(), Nektar::StdRegions::StdTetExp::v_IProductWRTBase_MatOp(), Nektar::LocalRegions::TriExp::v_IProductWRTDerivBase_MatOp(), Nektar::LocalRegions::QuadExp::v_IProductWRTDerivBase_MatOp(), Nektar::StdRegions::StdTriExp::v_IProductWRTDerivBase_MatOp(), Nektar::StdRegions::StdPrismExp::v_IProductWRTDerivBase_MatOp(), Nektar::StdRegions::StdQuadExp::v_IProductWRTDerivBase_MatOp(), Nektar::StdRegions::StdHexExp::v_IProductWRTDerivBase_MatOp(), Nektar::StdRegions::StdTetExp::v_IProductWRTDerivBase_MatOp(), Nektar::StdRegions::StdExpansion3D::v_LaplacianMatrixOp_MatFree(), Nektar::LocalRegions::Expansion::v_MultiplyByQuadratureMetric(), Nektar::LocalRegions::PrismExp::v_PhysDeriv(), Nektar::StdRegions::StdExpansion0D::v_PhysEvaluate(), Nektar::StdRegions::StdExpansion1D::v_PhysEvaluate(), Nektar::LocalRegions::TetExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::PrismExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::HexExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::TriExp::v_SVVLaplacianFilter(), Nektar::LocalRegions::QuadExp::v_SVVLaplacianFilter(), WeakDerivMatrixOp_MatFree(), and WeakDirectionalDerivMatrixOp_MatFree().

142  {
143  int i;
144  int nqtot = 1;
145 
146  for(i=0; i < m_base.num_elements(); ++i)
147  {
148  nqtot *= m_base[i]->GetNumPoints();
149  }
150 
151  return nqtot;
152  }
Array< OneD, LibUtilities::BasisSharedPtr > m_base
int Nektar::StdRegions::StdExpansion::GetTraceNcoeffs ( const int  i) const
inline

This function returns the number of expansion coefficients belonging to the i-th edge/face.

This function is a wrapper around the virtual function v_GetTraceNcoeffs()

Parameters
ispecifies which edge/face
Returns
returns the number of expansion coefficients belonging to the i-th edge/face

Definition at line 379 of file StdExpansion.h.

References v_GetTraceNcoeffs().

380  {
381  return v_GetTraceNcoeffs(i);
382  }
virtual int v_GetTraceNcoeffs(const int i) const
void Nektar::StdRegions::StdExpansion::GetTracePhysVals ( const int  edge,
const boost::shared_ptr< StdExpansion > &  EdgeExp,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 886 of file StdExpansion.h.

References v_GetTracePhysVals().

887  {
888  v_GetTracePhysVals(edge,EdgeExp,inarray,outarray);
889  }
virtual void v_GetTracePhysVals(const int edge, const boost::shared_ptr< StdExpansion > &EdgeExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient=eNoOrientation)
int Nektar::StdRegions::StdExpansion::GetVertexMap ( const int  localVertexId,
bool  useCoeffPacking = false 
)
inline
const NormalVector& Nektar::StdRegions::StdExpansion::GetVertexNormal ( const int  vertex) const
inline

Definition at line 1318 of file StdExpansion.h.

References v_GetVertexNormal().

Referenced by Nektar::LocalRegions::PointExp::v_NormVectorIProductWRTBase().

1319  {
1320  return v_GetVertexNormal(vertex);
1321  }
virtual const NormalVector & v_GetVertexNormal(const int vertex) const
void Nektar::StdRegions::StdExpansion::GetVertexPhysVals ( const int  vertex,
const Array< OneD, const NekDouble > &  inarray,
NekDouble outarray 
)
inline

Definition at line 891 of file StdExpansion.h.

References v_GetVertexPhysVals().

894  {
895  v_GetVertexPhysVals(vertex, inarray, outarray);
896  }
virtual void v_GetVertexPhysVals(const int vertex, const Array< OneD, const NekDouble > &inarray, NekDouble &outarray)
NekDouble Nektar::StdRegions::StdExpansion::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.

This function takes the physical value space array m_phys as approximate solution

Parameters
solarray of solution function at physical quadrature points
Returns
returns the $ H_1 $ error as a double.

Definition at line 158 of file StdExpansion.cpp.

References GetTotPoints(), Nektar::NullNekDouble1DArray, v_GetCoordim(), v_Integral(), v_PhysDeriv(), Vmath::Vcopy(), Vmath::Vmul(), Vmath::Vsub(), and Vmath::Vvtvp().

160  {
161  int i;
162  NekDouble val;
163  int ntot = GetTotPoints();
164  int coordim = v_GetCoordim();
165  Array<OneD, NekDouble> wsp(3*ntot);
166  Array<OneD, NekDouble> wsp_deriv = wsp + ntot;
167  Array<OneD, NekDouble> sum = wsp_deriv + ntot;
168 
169  if(sol == NullNekDouble1DArray)
170  {
171  Vmath::Vcopy(ntot,phys, 1, wsp, 1);
172  Vmath::Vmul(ntot, phys, 1, phys, 1, sum, 1);
173  }
174  else
175  {
176  Vmath::Vsub(ntot, sol, 1, phys, 1, wsp, 1);
177  Vmath::Vmul(ntot, wsp, 1, wsp, 1, sum, 1);
178  }
179 
180 
181  for(i = 0; i < coordim; ++i)
182  {
183  v_PhysDeriv(i,wsp,wsp_deriv);
184  Vmath::Vvtvp(ntot,wsp_deriv,1,wsp_deriv,1,sum,1,sum,1);
185  }
186 
187  val = sqrt(v_Integral(sum));
188 
189  return val;
190  }
static Array< OneD, NekDouble > NullNekDouble1DArray
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.cpp:428
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2, Array< OneD, NekDouble > &out_d3)
Calculate the derivative of the physical points.
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
Definition: StdExpansion.h:141
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrates the specified function over the domain.
double NekDouble
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
Definition: Vmath.cpp:329
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
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.cpp:169
void Nektar::StdRegions::StdExpansion::HelmholtzMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
inline
Parameters
inarrayInput array $ \mathbf{u} $.
outarrayOutput array $ \boldsymbol{\nabla^2u} + \lambda \boldsymbol{u} $.
mkey

Definition at line 1042 of file StdExpansion.h.

References v_HelmholtzMatrixOp().

Referenced by GeneralMatrixOp().

1045  {
1046  v_HelmholtzMatrixOp(inarray,outarray,mkey);
1047  }
virtual void v_HelmholtzMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void Nektar::StdRegions::StdExpansion::HelmholtzMatrixOp_MatFree ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
inlineprotected

Definition at line 1531 of file StdExpansion.h.

References v_HelmholtzMatrixOp_MatFree().

Referenced by GeneralMatrixOp_MatFree(), Nektar::LocalRegions::TriExp::v_HelmholtzMatrixOp(), Nektar::LocalRegions::QuadExp::v_HelmholtzMatrixOp(), and v_HelmholtzMatrixOp().

1534  {
1535  v_HelmholtzMatrixOp_MatFree(inarray,outarray,mkey);
1536  }
virtual void v_HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void Nektar::StdRegions::StdExpansion::HelmholtzMatrixOp_MatFree_GenericImpl ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
protected

Definition at line 936 of file StdExpansion.cpp.

References DetShapeType(), Nektar::StdRegions::eFactorLambda, Nektar::StdRegions::eLaplacian, Nektar::StdRegions::eMass, Nektar::StdRegions::StdMatrixKey::GetConstFactor(), LaplacianMatrixOp(), m_ncoeffs, and MassMatrixOp().

Referenced by Nektar::StdRegions::StdNodalTriExp::v_HelmholtzMatrixOp(), Nektar::StdRegions::StdExpansion2D::v_HelmholtzMatrixOp_MatFree(), Nektar::StdRegions::StdExpansion3D::v_HelmholtzMatrixOp_MatFree(), and v_HelmholtzMatrixOp_MatFree().

939  {
940  NekDouble lambda = mkey.GetConstFactor(eFactorLambda);
941  Array<OneD,NekDouble> tmp(m_ncoeffs);
942  StdMatrixKey mkeymass(eMass,DetShapeType(),*this);
943  StdMatrixKey mkeylap(eLaplacian,DetShapeType(),*this);
944 
945  MassMatrixOp(inarray,tmp,mkeymass);
946  LaplacianMatrixOp(inarray,outarray,mkeylap);
947 
948  Blas::Daxpy(m_ncoeffs, lambda, tmp, 1, outarray, 1);
949  }
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
Definition: StdExpansion.h:470
void MassMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdExpansion.h:971
double NekDouble
void LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdExpansion.h:978
NekDouble Nektar::StdRegions::StdExpansion::Integral ( const Array< OneD, const NekDouble > &  inarray)
inline

This function integrates the specified function over the domain.

This function is a wrapper around the virtual function v_Integral()

Based on the values of the function evaluated at the quadrature points (which are stored in inarray), this function calculates the integral of this function over the domain. This is equivalent to the numerical evaluation of the operation

\[ I=\int u(\mathbf{\xi})d \mathbf{\xi}\]

Parameters
inarrayvalues of the function to be integrated evaluated at the quadrature points (i.e. inarray[m]= $u(\mathbf{\xi}_m)$)
Returns
returns the value of the calculated integral
        Inputs:\n
  • 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 574 of file StdExpansion.h.

References v_Integral().

575  {
576  return v_Integral(inarray);
577  }
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrates the specified function over the domain.
void Nektar::StdRegions::StdExpansion::IProductWRTBase ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

this function calculates the inner product of a given function f with the different modes of the expansion

This function is a wrapper around the virtual function v_IProductWRTBase()

This is equivalent to the numerical evaluation of

\[ I[p] = \int \phi_p(\mathbf{x}) f(\mathbf{x}) d\mathbf{x}\]

$ \begin{array}{rcl} I_{pq} = (\phi_q \phi_q, u) & = & \sum_{i=0}^{nq_0} \sum_{j=0}^{nq_1} \phi_p(\xi_{0,i}) \phi_q(\xi_{1,j}) w^0_i w^1_j u(\xi_{0,i} \xi_{1,j}) J_{i,j}\\ & = & \sum_{i=0}^{nq_0} \phi_p(\xi_{0,i}) \sum_{j=0}^{nq_1} \phi_q(\xi_{1,j}) \tilde{u}_{i,j} J_{i,j} \end{array} $

where

$ \tilde{u}_{i,j} = w^0_i w^1_j u(\xi_{0,i},\xi_{1,j}) $

which can be implemented as

$ f_{qi} = \sum_{j=0}^{nq_1} \phi_q(\xi_{1,j}) \tilde{u}_{i,j} = {\bf B_1 U} $ $ I_{pq} = \sum_{i=0}^{nq_0} \phi_p(\xi_{0,i}) f_{qi} = {\bf B_0 F} $

Parameters
inarraycontains the values of the function f evaluated at the quadrature points
outarraycontains the values of the inner product of f with the different modes, i.e. $ outarray[p] = I[p]$ (output of the function)

Definition at line 629 of file StdExpansion.h.

References v_IProductWRTBase().

Referenced by Nektar::LocalRegions::TetExp::v_FwdTrans(), Nektar::LocalRegions::TriExp::v_FwdTrans(), Nektar::LocalRegions::QuadExp::v_FwdTrans(), Nektar::LocalRegions::HexExp::v_FwdTrans(), Nektar::StdRegions::StdHexExp::v_FwdTrans(), Nektar::StdRegions::StdQuadExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::TriExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::QuadExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::Expansion2D::v_GenMatrix(), Nektar::LocalRegions::TriExp::v_NormVectorIProductWRTBase(), and Nektar::LocalRegions::QuadExp::v_NormVectorIProductWRTBase().

631  {
632  v_IProductWRTBase(inarray, outarray);
633  }
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)=0
Calculates the inner product of a given function f with the different modes of the expansion...
void Nektar::StdRegions::StdExpansion::IProductWRTBase ( const Array< OneD, const NekDouble > &  base,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
int  coll_check 
)
inline

Definition at line 635 of file StdExpansion.h.

References v_IProductWRTBase().

640  {
641  v_IProductWRTBase(base, inarray, outarray, coll_check);
642  }
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)=0
Calculates the inner product of a given function f with the different modes of the expansion...
void Nektar::StdRegions::StdExpansion::IProductWRTBase_SumFac ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
bool  multiplybyweights = true 
)
inline

Definition at line 1414 of file StdExpansion.h.

References v_IProductWRTBase_SumFac().

Referenced by CreateGeneralMatrix(), Nektar::LocalRegions::TriExp::v_IProductWRTBase(), and Nektar::LocalRegions::QuadExp::v_IProductWRTBase().

1417  {
1418  v_IProductWRTBase_SumFac(inarray,outarray,multiplybyweights);
1419  }
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
void Nektar::StdRegions::StdExpansion::IProductWRTDerivBase ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 645 of file StdExpansion.h.

References v_IProductWRTDerivBase().

648  {
649  v_IProductWRTDerivBase(dir,inarray, outarray);
650  }
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void Nektar::StdRegions::StdExpansion::IProductWRTDerivBase_SumFac ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inlineprotected

Definition at line 1467 of file StdExpansion.h.

References v_IProductWRTDerivBase_SumFac().

Referenced by CreateGeneralMatrix(), Nektar::LocalRegions::TriExp::v_IProductWRTDerivBase(), Nektar::LocalRegions::QuadExp::v_IProductWRTDerivBase(), Nektar::StdRegions::StdQuadExp::v_IProductWRTDerivBase(), and Nektar::StdRegions::StdHexExp::v_IProductWRTDerivBase().

1470  {
1471  v_IProductWRTDerivBase_SumFac(dir,inarray,outarray);
1472  }
virtual void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
bool Nektar::StdRegions::StdExpansion::IsBoundaryInteriorExpansion ( )
inline
bool Nektar::StdRegions::StdExpansion::IsNodalNonTensorialExp ( )
inline

Definition at line 492 of file StdExpansion.h.

References v_IsNodalNonTensorialExp().

493  {
494  return v_IsNodalNonTensorialExp();
495  }
NekDouble Nektar::StdRegions::StdExpansion::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.

This function takes the physical value space array m_phys as approximate solution

Parameters
solarray of solution function at physical quadrature points
Returns
returns the $ L_2 $ error as a double.

Definition at line 128 of file StdExpansion.cpp.

References GetTotPoints(), Nektar::NekConstants::kNekSqrtTol, v_Integral(), Vmath::Vmul(), and Vmath::Vsub().

130  {
131  NekDouble val;
132  int ntot = GetTotPoints();
133  Array<OneD, NekDouble> wsp(ntot);
134 
135  if (sol.num_elements() == 0)
136  {
137  Vmath::Vmul(ntot, phys, 1, phys, 1, wsp, 1);
138  }
139  else
140  {
141  Vmath::Vsub(ntot, sol, 1, phys, 1, wsp, 1);
142  Vmath::Vmul(ntot, wsp, 1, wsp, 1, wsp, 1);
143  }
144 
145  val = v_Integral(wsp);
146 
147  // if val too small, sqrt returns nan.
149  {
150  return 0.0;
151  }
152  else
153  {
154  return sqrt(val);
155  }
156  }
static const NekDouble kNekSqrtTol
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
Definition: StdExpansion.h:141
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Integrates the specified function over the domain.
double NekDouble
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
Definition: Vmath.cpp:329
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.cpp:169
void Nektar::StdRegions::StdExpansion::LaplacianMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
inline

Definition at line 978 of file StdExpansion.h.

References v_LaplacianMatrixOp().

Referenced by GeneralMatrixOp(), HelmholtzMatrixOp_MatFree_GenericImpl(), LaplacianMatrixOp_MatFree_GenericImpl(), and LinearAdvectionDiffusionReactionMatrixOp_MatFree().

981  {
982  v_LaplacianMatrixOp(inarray,outarray,mkey);
983  }
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void Nektar::StdRegions::StdExpansion::LaplacianMatrixOp ( const int  k1,
const int  k2,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
inline

Definition at line 998 of file StdExpansion.h.

References v_LaplacianMatrixOp().

1002  {
1003  v_LaplacianMatrixOp(k1,k2,inarray,outarray,mkey);
1004  }
virtual void v_LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
inlineprotected
void Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree ( const int  k1,
const int  k2,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
protected

Definition at line 685 of file StdExpansion.cpp.

References ASSERTL1, Nektar::StdRegions::StdMatrixKey::ConstFactorExists(), Nektar::StdRegions::eFactorSVVDiffCoeff, Nektar::StdRegions::eVarCoeffD00, Nektar::StdRegions::eVarCoeffD01, Nektar::StdRegions::eVarCoeffD02, Nektar::StdRegions::eVarCoeffD11, Nektar::StdRegions::eVarCoeffD12, Nektar::StdRegions::eVarCoeffD22, GetCoordim(), GetNcoeffs(), Nektar::StdRegions::StdMatrixKey::GetNVarCoeff(), GetTotPoints(), Nektar::StdRegions::StdMatrixKey::GetVarCoeff(), Nektar::StdRegions::StdMatrixKey::HasVarCoeff(), SVVLaplacianFilter(), v_BwdTrans(), v_IProductWRTDerivBase(), v_PhysDeriv(), Vmath::Vadd(), Vmath::Vcopy(), Vmath::Vmul(), and Vmath::Zero().

689  {
690  ASSERTL1(k1 >= 0 && k1 < GetCoordim(),"invalid first argument");
691  ASSERTL1(k2 >= 0 && k2 < GetCoordim(),"invalid second argument");
692 
693  int nq = GetTotPoints();
694  Array<OneD, NekDouble> tmp(nq);
695  Array<OneD, NekDouble> dtmp(nq);
696  VarCoeffType varcoefftypes[3][3]
700  };
701 
702  v_BwdTrans(inarray,tmp);
703  v_PhysDeriv(k2,tmp,dtmp);
704  if (mkey.GetNVarCoeff()&&
705  (!mkey.ConstFactorExists(eFactorSVVDiffCoeff)))
706  {
707  if (k1 == k2)
708  {
709  // By default, k1 == k2 has \sigma = 1 (diagonal entries)
710  if(mkey.HasVarCoeff(varcoefftypes[k1][k1]))
711  {
712  Vmath::Vmul(nq, mkey.GetVarCoeff(varcoefftypes[k1][k1]), 1, dtmp, 1, dtmp, 1);
713  }
714  v_IProductWRTDerivBase(k1, dtmp, outarray);
715  }
716  else
717  {
718  // By default, k1 != k2 has \sigma = 0 (off-diagonal entries)
719  if(mkey.HasVarCoeff(varcoefftypes[k1][k2]))
720  {
721  Vmath::Vmul(nq, mkey.GetVarCoeff(varcoefftypes[k1][k2]), 1, dtmp, 1, dtmp, 1);
722  v_IProductWRTDerivBase(k1, dtmp, outarray);
723  }
724  else
725  {
726  Vmath::Zero(GetNcoeffs(), outarray, 1);
727  }
728  }
729  }
730  else
731  {
732  // Multiply by svv tensor
733  if(mkey.ConstFactorExists(eFactorSVVDiffCoeff))
734  {
735  Vmath::Vcopy(nq, dtmp, 1, tmp, 1);
736  SVVLaplacianFilter(dtmp,mkey);
737  Vmath::Vadd(nq, tmp, 1, dtmp, 1, dtmp, 1);
738  }
739  v_IProductWRTDerivBase(k1, dtmp, outarray);
740  }
741  }
void SVVLaplacianFilter(Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
Definition: StdExpansion.h:992
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2, Array< OneD, NekDouble > &out_d3)
Calculate the derivative of the physical points.
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
Definition: StdExpansion.h:141
virtual void v_IProductWRTDerivBase(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
Definition: StdExpansion.h:131
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:359
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)=0
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.cpp:285
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.cpp:169
void Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree_GenericImpl ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
protected

Definition at line 743 of file StdExpansion.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::StdRegions::StdMatrixKey::ConstFactorExists(), Nektar::StdRegions::eFactorSVVDiffCoeff, Nektar::StdRegions::eLaplacian00, Nektar::StdRegions::eLaplacian01, Nektar::StdRegions::eLaplacian02, Nektar::StdRegions::eLaplacian11, Nektar::StdRegions::eLaplacian12, Nektar::StdRegions::eLaplacian22, GetCoordim(), Nektar::StdRegions::StdMatrixKey::GetNVarCoeff(), LaplacianMatrixOp(), m_ncoeffs, Vmath::Vadd(), and Vmath::Vcopy().

Referenced by Nektar::StdRegions::StdNodalTriExp::v_LaplacianMatrixOp(), Nektar::StdRegions::StdExpansion2D::v_LaplacianMatrixOp_MatFree(), Nektar::StdRegions::StdExpansion3D::v_LaplacianMatrixOp_MatFree(), and v_LaplacianMatrixOp_MatFree().

746  {
747  const int dim = GetCoordim();
748 
749  int i,j;
750 
751  Array<OneD,NekDouble> store(m_ncoeffs);
752  Array<OneD,NekDouble> store2(m_ncoeffs,0.0);
753 
754  if(mkey.GetNVarCoeff() == 0||mkey.ConstFactorExists(eFactorSVVDiffCoeff))
755  {
756  // just call diagonal matrix form of laplcian operator
757  for(i = 0; i < dim; ++i)
758  {
759  LaplacianMatrixOp(i,i,inarray,store,mkey);
760  Vmath::Vadd(m_ncoeffs, store, 1, store2, 1, store2, 1);
761  }
762  }
763  else
764  {
765  const MatrixType mtype[3][3]
769  StdMatrixKeySharedPtr mkeyij;
770 
771  for(i = 0; i < dim; i++)
772  {
773  for(j = 0; j < dim; j++)
774  {
775  mkeyij = MemoryManager<StdMatrixKey>::AllocateSharedPtr(mkey,mtype[i][j]);
776  LaplacianMatrixOp(i,j,inarray,store,*mkeyij);
777  Vmath::Vadd(m_ncoeffs, store, 1, store2, 1, store2, 1);
778  }
779  }
780  }
781 
782  Vmath::Vcopy(m_ncoeffs,store2.get(),1,outarray.get(),1);
783  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
void LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdExpansion.h:978
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
boost::shared_ptr< StdMatrixKey > StdMatrixKeySharedPtr
Definition: StdMatrixKey.h:196
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.cpp:285
void Nektar::StdRegions::StdExpansion::LaplacianMatrixOp_MatFree_Kernel ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
Array< OneD, NekDouble > &  wsp 
)
inlineprotected

Definition at line 1496 of file StdExpansion.h.

References v_LaplacianMatrixOp_MatFree_Kernel().

Referenced by Nektar::StdRegions::StdExpansion2D::v_HelmholtzMatrixOp_MatFree(), Nektar::StdRegions::StdExpansion3D::v_HelmholtzMatrixOp_MatFree(), Nektar::StdRegions::StdExpansion2D::v_LaplacianMatrixOp_MatFree(), and Nektar::StdRegions::StdExpansion3D::v_LaplacianMatrixOp_MatFree().

1500  {
1501  v_LaplacianMatrixOp_MatFree_Kernel(inarray, outarray, wsp);
1502  }
virtual void v_LaplacianMatrixOp_MatFree_Kernel(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
void Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey,
bool  addDiffusionTerm = true 
)
inline

Definition at line 1028 of file StdExpansion.h.

References v_LinearAdvectionDiffusionReactionMatrixOp().

Referenced by GeneralMatrixOp().

1032  {
1033  v_LinearAdvectionDiffusionReactionMatrixOp(inarray,outarray,mkey,addDiffusionTerm);
1034  }
virtual void v_LinearAdvectionDiffusionReactionMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey, bool addDiffusionTerm=true)
void Nektar::StdRegions::StdExpansion::LinearAdvectionDiffusionReactionMatrixOp_MatFree ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey,
bool  addDiffusionTerm = true 
)
protected

Definition at line 880 of file StdExpansion.cpp.

References ASSERTL0, ASSERTL1, DetShapeType(), Nektar::StdRegions::eFactorLambda, Nektar::StdRegions::eLaplacian, Nektar::StdRegions::eVarCoeffVelX, Nektar::StdRegions::eVarCoeffVelY, Nektar::StdRegions::StdMatrixKey::GetConstFactor(), GetCoordim(), Nektar::StdRegions::StdMatrixKey::GetNVarCoeff(), GetTotPoints(), Nektar::StdRegions::StdMatrixKey::GetVarCoeff(), LaplacianMatrixOp(), m_ncoeffs, Vmath::Svtvp(), v_BwdTrans(), v_IProductWRTBase(), v_PhysDeriv(), Vmath::Vadd(), Vmath::Vvtvp(), and Vmath::Zero().

Referenced by GeneralMatrixOp_MatFree(), and v_LinearAdvectionDiffusionReactionMatrixOp().

884  {
885 
886  int i;
887  int ndir = mkey.GetNVarCoeff(); // assume num.r consts corresponds to directions
888  ASSERTL0(ndir,"Must define at least one advection velocity");
889 
890  NekDouble lambda = mkey.GetConstFactor(eFactorLambda);
891  int totpts = GetTotPoints();
892  Array<OneD, NekDouble> tmp(3*totpts);
893  Array<OneD, NekDouble> tmp_deriv = tmp + totpts;
894  Array<OneD, NekDouble> tmp_adv = tmp_deriv + totpts;
895 
896 
897  ASSERTL1(ndir <= GetCoordim(),"Number of constants is larger than coordinate dimensions");
898 
899  v_BwdTrans(inarray,tmp);
900 
901  VarCoeffType varcoefftypes[] = {eVarCoeffVelX, eVarCoeffVelY};
902 
903  //calculate u dx + v dy + ..
904  Vmath::Zero(totpts,tmp_adv,1);
905  for(i = 0; i < ndir; ++i)
906  {
907  v_PhysDeriv(i,tmp,tmp_deriv);
908  Vmath::Vvtvp(totpts,mkey.GetVarCoeff(varcoefftypes[i]),1,tmp_deriv,1,tmp_adv,1,tmp_adv,1);
909  }
910 
911  if(lambda) // add -lambda*u
912  {
913  Vmath::Svtvp(totpts,-lambda,tmp,1,tmp_adv,1,tmp_adv,1);
914  }
915 
916 
917  if(addDiffusionTerm)
918  {
919  Array<OneD, NekDouble> lap(m_ncoeffs);
920  StdMatrixKey mkeylap(eLaplacian,DetShapeType(),*this);
921  LaplacianMatrixOp(inarray,lap,mkeylap);
922 
923  v_IProductWRTBase(tmp_adv, outarray);
924  // Lap v - u.grad v + lambda*u
925  // => (grad u, grad v) + u.grad v - lambda*u
926  Vmath::Vadd(m_ncoeffs,lap,1,outarray,1,outarray,1);
927  }
928  else
929  {
930  v_IProductWRTBase(tmp_adv, outarray);
931  }
932 
933  }
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
Definition: StdExpansion.h:470
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
void Svtvp(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
svtvp (scalar times vector plus vector): z = alpha*x + y
Definition: Vmath.cpp:471
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.cpp:428
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2, Array< OneD, NekDouble > &out_d3)
Calculate the derivative of the physical points.
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
Definition: StdExpansion.h:141
double NekDouble
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)=0
Calculates the inner product of a given function f with the different modes of the expansion...
void LaplacianMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
Definition: StdExpansion.h:978
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:359
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)=0
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.cpp:285
NekDouble Nektar::StdRegions::StdExpansion::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.

This function takes the physical value space array m_phys as approximate solution

Parameters
solarray of solution function at physical quadrature points
Returns
returns the $ L_\infty $ error as a NekDouble.

Definition at line 106 of file StdExpansion.cpp.

References GetTotPoints(), Nektar::NullNekDouble1DArray, Vmath::Vabs(), Vmath::Vamax(), and Vmath::Vsub().

108  {
109  NekDouble val;
110  int ntot = GetTotPoints();
111  Array<OneD, NekDouble> wsp(ntot);
112 
113  if(sol == NullNekDouble1DArray)
114  {
115  Vmath::Vabs(ntot, phys, 1, wsp, 1);
116  }
117  else
118  {
119  Vmath::Vsub(ntot, sol, 1, phys, 1, wsp, 1);
120  Vmath::Vabs(ntot, wsp, 1, wsp, 1);
121  }
122 
123  val = Vmath::Vamax(ntot, wsp, 1);
124 
125  return val;
126  }
static Array< OneD, NekDouble > NullNekDouble1DArray
void Vabs(int n, const T *x, const int incx, T *y, const int incy)
vabs: y = |x|
Definition: Vmath.cpp:410
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
Definition: StdExpansion.h:141
double NekDouble
T Vamax(int n, const T *x, const int incx)
Return the maximum absolute element in x called vamax to avoid conflict with max. ...
Definition: Vmath.cpp:811
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
Definition: Vmath.cpp:329
void Nektar::StdRegions::StdExpansion::LocCoordToLocCollapsed ( const Array< OneD, const NekDouble > &  xi,
Array< OneD, NekDouble > &  eta 
)
inline

Convert local cartesian coordinate xi into local collapsed coordinates eta.

Definition at line 1173 of file StdExpansion.h.

References v_LocCoordToLocCollapsed().

Referenced by Nektar::StdRegions::StdQuadExp::v_GenMatrix(), Nektar::StdRegions::StdTriExp::v_GenMatrix(), Nektar::StdRegions::StdPrismExp::v_GenMatrix(), Nektar::StdRegions::StdTetExp::v_GenMatrix(), Nektar::StdRegions::StdExpansion2D::v_PhysEvaluate(), and Nektar::StdRegions::StdExpansion3D::v_PhysEvaluate().

1175  {
1176  v_LocCoordToLocCollapsed(xi,eta);
1177  }
virtual void v_LocCoordToLocCollapsed(const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
void Nektar::StdRegions::StdExpansion::MassLevelCurvatureMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
inline

Definition at line 1021 of file StdExpansion.h.

References v_MassLevelCurvatureMatrixOp().

Referenced by GeneralMatrixOp().

1024  {
1025  v_MassLevelCurvatureMatrixOp(inarray,outarray,mkey);
1026  }
virtual void v_MassLevelCurvatureMatrixOp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void Nektar::StdRegions::StdExpansion::MassLevelCurvatureMatrixOp_MatFree ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
protected
Todo:
fix this

Definition at line 829 of file StdExpansion.cpp.

Referenced by GeneralMatrixOp_MatFree(), and v_MassLevelCurvatureMatrixOp().

832  {
833  ///@todo fix this
834  // int nqtot = GetTotPoints();
835  // int matrixid = mkey.GetMatrixID();
836  //
837  // NekDouble checkweight=0.0;
838  // Array<OneD, NekDouble> tmp(nqtot), tan(nqtot), dtan0(nqtot), dtan1(nqtot), weight(nqtot,0.0);
839  //
840  // int gmatnumber = (mkey.GetVariableCoefficient(1)).num_elements();
841  //
842  // v_BwdTrans(inarray,tmp);
843  //
844  // // weight = \grad \cdot tanvec
845  // for(int k = 0; k < GetCoordim(); ++k)
846  // {
847  // Vmath::Vcopy(nqtot, &(mkey.GetVariableCoefficient(0))[k*nqtot],
848  // 1, &tan[0], 1);
849  //
850  // // For Regular mesh ...
851  // if(gmatnumber==1)
852  // {
853  // // D_{/xi} and D_{/eta}
854  // v_PhysDeriv(0,tan,dtan0);
855  // v_PhysDeriv(1,tan,dtan1);
856  //
857  // // d v / d x_i = (d \xi / d x_i)*( d v / d \xi ) + (d \eta / d x_i)*( d v / d \eta )
858  // Vmath::Svtvp(nqtot,(mkey.GetVariableCoefficient(2*k+1))[0],&dtan0[0],1,&weight[0],1,&weight[0],1);
859  // Vmath::Svtvp(nqtot,(mkey.GetVariableCoefficient(2*k+2))[0],&dtan1[0],1,&weight[0],1,&weight[0],1);
860  // }
861  //
862  // // For Curved mesh ...
863  // else if(gmatnumber==nqtot)
864  // {
865  // // D_{x} and D_{y}
866  // v_PhysDeriv(k,tan,dtan0);
867  // Vmath::Vadd(nqtot,&dtan0[0],1,&weight[0],1,&weight[0],1);
868  // }
869  //
870  // else
871  // {
872  // ASSERTL1( ((gmatnumber=1) || (gmatnumber==nqtot) ), "Gmat is not in a right size");
873  // }
874  // }
875  //
876  // Vmath::Vmul(nqtot, &weight[0], 1, &tmp[0], 1, &tmp[0], 1);
877  // v_IProductWRTBase(tmp, outarray);
878  }
void Nektar::StdRegions::StdExpansion::MassMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
inline
void Nektar::StdRegions::StdExpansion::MassMatrixOp_MatFree ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
protected

Definition at line 668 of file StdExpansion.cpp.

References Nektar::StdRegions::eVarCoeffMass, GetTotPoints(), Nektar::StdRegions::StdMatrixKey::GetVarCoeff(), Nektar::StdRegions::StdMatrixKey::HasVarCoeff(), v_BwdTrans(), v_IProductWRTBase(), and Vmath::Vmul().

Referenced by GeneralMatrixOp_MatFree(), Nektar::StdRegions::StdNodalTriExp::v_MassMatrixOp(), Nektar::StdRegions::StdQuadExp::v_MassMatrixOp(), Nektar::StdRegions::StdTriExp::v_MassMatrixOp(), Nektar::StdRegions::StdHexExp::v_MassMatrixOp(), and v_MassMatrixOp().

671  {
672  int nq = GetTotPoints();
673  Array<OneD, NekDouble> tmp(nq);
674 
675  v_BwdTrans(inarray,tmp);
676 
677  if(mkey.HasVarCoeff(eVarCoeffMass))
678  {
679  Vmath::Vmul(nq, mkey.GetVarCoeff(eVarCoeffMass), 1, tmp, 1, tmp, 1);
680  }
681 
682  v_IProductWRTBase(tmp, outarray);
683  }
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
Definition: StdExpansion.h:141
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)=0
Calculates the inner product of a given function f with the different modes of the expansion...
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)=0
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.cpp:169
void Nektar::StdRegions::StdExpansion::MultiplyByQuadratureMetric ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 942 of file StdExpansion.h.

References v_MultiplyByQuadratureMetric().

Referenced by Nektar::LocalRegions::NodalTriExp::IProductWRTBase_SumFac(), Nektar::LocalRegions::HexExp::IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::NodalTriExp::IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::PyrExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::TetExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::HexExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::TriExp::v_ComputeLaplacianMetric(), Nektar::LocalRegions::QuadExp::v_ComputeLaplacianMetric(), Nektar::StdRegions::StdExpansion2D::v_HelmholtzMatrixOp_MatFree(), Nektar::StdRegions::StdExpansion3D::v_HelmholtzMatrixOp_MatFree(), Nektar::LocalRegions::QuadExp::v_IProductWRTBase(), Nektar::StdRegions::StdHexExp::v_IProductWRTBase(), Nektar::StdRegions::StdQuadExp::v_IProductWRTBase(), Nektar::StdRegions::StdPrismExp::v_IProductWRTBase(), Nektar::StdRegions::StdTetExp::v_IProductWRTBase(), Nektar::LocalRegions::TetExp::v_IProductWRTBase_SumFac(), Nektar::LocalRegions::PrismExp::v_IProductWRTBase_SumFac(), Nektar::LocalRegions::TriExp::v_IProductWRTBase_SumFac(), Nektar::LocalRegions::HexExp::v_IProductWRTBase_SumFac(), Nektar::LocalRegions::QuadExp::v_IProductWRTBase_SumFac(), Nektar::StdRegions::StdQuadExp::v_IProductWRTBase_SumFac(), Nektar::StdRegions::StdTriExp::v_IProductWRTBase_SumFac(), Nektar::StdRegions::StdPrismExp::v_IProductWRTBase_SumFac(), Nektar::StdRegions::StdHexExp::v_IProductWRTBase_SumFac(), Nektar::StdRegions::StdTetExp::v_IProductWRTBase_SumFac(), Nektar::LocalRegions::TetExp::v_IProductWRTDerivBase(), Nektar::LocalRegions::PrismExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::TriExp::v_IProductWRTDerivBase_SumFac(), Nektar::LocalRegions::QuadExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdQuadExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdTriExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdPrismExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdHexExp::v_IProductWRTDerivBase_SumFac(), Nektar::StdRegions::StdTetExp::v_IProductWRTDerivBase_SumFac(), and Nektar::LocalRegions::PrismExp::v_LaplacianMatrixOp_MatFree_Kernel().

945  {
946  v_MultiplyByQuadratureMetric(inarray, outarray);
947  }
virtual void v_MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void Nektar::StdRegions::StdExpansion::MultiplyByStdQuadratureMetric ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline
void Nektar::StdRegions::StdExpansion::NegateEdgeNormal ( const int  edge)
inline

Definition at line 1283 of file StdExpansion.h.

References v_NegateEdgeNormal().

1284  {
1285  v_NegateEdgeNormal(edge);
1286  }
virtual void v_NegateEdgeNormal(const int edge)
void Nektar::StdRegions::StdExpansion::NegateFaceNormal ( const int  face)
inline

Definition at line 1298 of file StdExpansion.h.

References v_NegateFaceNormal().

1299  {
1300  v_NegateFaceNormal(face);
1301  }
virtual void v_NegateFaceNormal(const int face)
void Nektar::StdRegions::StdExpansion::NormVectorIProductWRTBase ( const Array< OneD, const NekDouble > &  Fx,
Array< OneD, NekDouble > &  outarray 
)
inline
void Nektar::StdRegions::StdExpansion::NormVectorIProductWRTBase ( const Array< OneD, const NekDouble > &  Fx,
const Array< OneD, NekDouble > &  Fy,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 732 of file StdExpansion.h.

References v_NormVectorIProductWRTBase().

733  {
734  v_NormVectorIProductWRTBase(Fx,Fy,outarray);
735  }
virtual void v_NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, Array< OneD, NekDouble > &outarray)
void Nektar::StdRegions::StdExpansion::NormVectorIProductWRTBase ( const Array< OneD, const NekDouble > &  Fx,
const Array< OneD, const NekDouble > &  Fy,
const Array< OneD, const NekDouble > &  Fz,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 737 of file StdExpansion.h.

References v_NormVectorIProductWRTBase().

738  {
739  v_NormVectorIProductWRTBase(Fx,Fy,Fz,outarray);
740  }
virtual void v_NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, Array< OneD, NekDouble > &outarray)
void Nektar::StdRegions::StdExpansion::NormVectorIProductWRTBase ( const Array< OneD, const Array< OneD, NekDouble > > &  Fvec,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 742 of file StdExpansion.h.

References v_NormVectorIProductWRTBase().

743  {
744  v_NormVectorIProductWRTBase(Fvec, outarray);
745  }
virtual void v_NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, Array< OneD, NekDouble > &outarray)
int Nektar::StdRegions::StdExpansion::NumBndryCoeffs ( void  ) const
inline

Definition at line 390 of file StdExpansion.h.

References v_NumBndryCoeffs().

Referenced by Nektar::CoupledLocalToGlobalC0ContMap::CoupledLocalToGlobalC0ContMap(), Nektar::LocalRegions::PyrExp::CreateStaticCondMatrix(), Nektar::LocalRegions::NodalTriExp::CreateStaticCondMatrix(), Nektar::LocalRegions::TetExp::CreateStaticCondMatrix(), Nektar::LocalRegions::PrismExp::CreateStaticCondMatrix(), Nektar::LocalRegions::QuadExp::CreateStaticCondMatrix(), Nektar::LocalRegions::TriExp::CreateStaticCondMatrix(), Nektar::LocalRegions::SegExp::CreateStaticCondMatrix(), Nektar::LocalRegions::HexExp::CreateStaticCondMatrix(), CreateStdStaticCondMatrix(), Nektar::LocalRegions::Expansion2D::v_AddRobinMassMatrix(), Nektar::StdRegions::StdQuadExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::TriExp::v_FwdTrans_BndConstrained(), Nektar::LocalRegions::QuadExp::v_FwdTrans_BndConstrained(), Nektar::StdRegions::StdNodalTetExp::v_GetBoundaryMap(), Nektar::StdRegions::StdNodalPrismExp::v_GetBoundaryMap(), Nektar::StdRegions::StdNodalTriExp::v_GetBoundaryMap(), Nektar::StdRegions::StdSegExp::v_GetBoundaryMap(), Nektar::StdRegions::StdQuadExp::v_GetBoundaryMap(), Nektar::StdRegions::StdTriExp::v_GetBoundaryMap(), Nektar::StdRegions::StdPrismExp::v_GetBoundaryMap(), Nektar::StdRegions::StdTetExp::v_GetBoundaryMap(), Nektar::StdRegions::StdHexExp::v_GetBoundaryMap(), Nektar::LocalRegions::Expansion2D::v_GetEdgeInverseBoundaryMap(), Nektar::StdRegions::StdNodalTetExp::v_GetInteriorMap(), Nektar::StdRegions::StdNodalPrismExp::v_GetInteriorMap(), Nektar::StdRegions::StdNodalTriExp::v_GetInteriorMap(), Nektar::StdRegions::StdSegExp::v_GetInteriorMap(), Nektar::StdRegions::StdQuadExp::v_GetInteriorMap(), Nektar::StdRegions::StdTriExp::v_GetInteriorMap(), Nektar::StdRegions::StdPrismExp::v_GetInteriorMap(), Nektar::StdRegions::StdTetExp::v_GetInteriorMap(), Nektar::StdRegions::StdHexExp::v_GetInteriorMap(), and Nektar::StdRegions::StdPyrExp::v_GetInteriorMap().

391  {
392  return v_NumBndryCoeffs();
393  }
virtual int v_NumBndryCoeffs() const
int Nektar::StdRegions::StdExpansion::NumDGBndryCoeffs ( void  ) const
inline
void Nektar::StdRegions::StdExpansion::PhysDeriv ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d0,
Array< OneD, NekDouble > &  out_d1 = NullNekDouble1DArray,
Array< OneD, NekDouble > &  out_d2 = NullNekDouble1DArray 
)
inline

Definition at line 1054 of file StdExpansion.h.

References v_PhysDeriv().

Referenced by Nektar::LocalRegions::SegExp::v_HelmholtzMatrixOp(), Nektar::LocalRegions::SegExp::v_LaplacianMatrixOp(), Nektar::StdRegions::StdHexExp::v_PhysDeriv(), Nektar::LocalRegions::SegExp::v_PhysDeriv(), Nektar::LocalRegions::TriExp::v_PhysDeriv(), and Nektar::LocalRegions::HexExp::v_PhysDeriv().

1058  {
1059  v_PhysDeriv (inarray, out_d0, out_d1, out_d2);
1060  }
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2, Array< OneD, NekDouble > &out_d3)
Calculate the derivative of the physical points.
void Nektar::StdRegions::StdExpansion::PhysDeriv ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 1062 of file StdExpansion.h.

References v_PhysDeriv().

1065  {
1066  v_PhysDeriv (dir, inarray, outarray);
1067  }
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2, Array< OneD, NekDouble > &out_d3)
Calculate the derivative of the physical points.
void Nektar::StdRegions::StdExpansion::PhysDeriv_n ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_dn 
)
inline

Definition at line 1075 of file StdExpansion.h.

References v_PhysDeriv_n().

1077  {
1078  v_PhysDeriv_n(inarray,out_dn);
1079  }
virtual void v_PhysDeriv_n(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_dn)
void Nektar::StdRegions::StdExpansion::PhysDeriv_s ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_ds 
)
inline

Definition at line 1069 of file StdExpansion.h.

References v_PhysDeriv_s().

1071  {
1072  v_PhysDeriv_s(inarray,out_ds);
1073  }
virtual void v_PhysDeriv_s(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_ds)
void Nektar::StdRegions::StdExpansion::PhysDirectionalDeriv ( const Array< OneD, const NekDouble > &  inarray,
const Array< OneD, const NekDouble > &  direction,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 1081 of file StdExpansion.h.

References v_PhysDirectionalDeriv().

1084  {
1085  v_PhysDirectionalDeriv (inarray, direction, outarray);
1086  }
virtual void v_PhysDirectionalDeriv(const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &direction, Array< OneD, NekDouble > &outarray)
Physical derivative along a direction vector.
NekDouble Nektar::StdRegions::StdExpansion::PhysEvaluate ( const Array< OneD, const NekDouble > &  coords,
const Array< OneD, const NekDouble > &  physvals 
)
inline

This function evaluates the expansion at a single (arbitrary) point of the domain.

This function is a wrapper around the virtual function v_PhysEvaluate()

Based on the value of the expansion at the quadrature points provided in physvals, this function calculates the value of the expansion at an arbitrary single points (with coordinates $ \mathbf{x_c}$ given by the pointer coords). This operation, equivalent to

\[ u(\mathbf{x_c}) = \sum_p \phi_p(\mathbf{x_c}) \hat{u}_p \]

is evaluated using Lagrangian interpolants through the quadrature points:

\[ u(\mathbf{x_c}) = \sum_p h_p(\mathbf{x_c}) u_p\]

Parameters
coordsthe coordinates of the single point
physvalsthe interpolated field at the quadrature points
Returns
returns the value of the expansion at the single point

Definition at line 1135 of file StdExpansion.h.

References v_PhysEvaluate().

1137  {
1138  return v_PhysEvaluate(coords,physvals);
1139  }
virtual NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &physvals)
NekDouble Nektar::StdRegions::StdExpansion::PhysEvaluate ( const Array< OneD, DNekMatSharedPtr > &  I,
const Array< OneD, const NekDouble > &  physvals 
)
inline

This function evaluates the expansion at a single (arbitrary) point of the domain.

This function is a wrapper around the virtual function v_PhysEvaluate()

Based on the value of the expansion at the quadrature points provided in physvals, this function calculates the value of the expansion at an arbitrary single points associated with the interpolation matrices provided in $ I $.

Parameters
Ian Array of lagrange interpolantes evaluated at the coordinate and going through the local physical quadrature
physvalsthe interpolated field at the quadrature points
Returns
returns the value of the expansion at the single point

Definition at line 1162 of file StdExpansion.h.

References v_PhysEvaluate().

1164  {
1165  return v_PhysEvaluate(I,physvals);
1166  }
virtual NekDouble v_PhysEvaluate(const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &physvals)
void Nektar::StdRegions::StdExpansion::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.

This is primarily used for output purposes to get a better distribution of points more suitable for most postprocessing

Definition at line 1761 of file StdExpansion.cpp.

References DetShapeType(), Nektar::StdRegions::eFactorConst, Nektar::StdRegions::ePhysInterpToEquiSpaced, Nektar::eWrapper, Nektar::LibUtilities::GetNumberOfCoefficients(), GetStdMatrix(), GetTotPoints(), and m_base.

Referenced by CreateGeneralMatrix().

1765  {
1767  DNekMatSharedPtr intmat;
1768 
1769  int nqtot = GetTotPoints();
1770  int np = 0;
1771  if(npset == -1) // use values from basis num points()
1772  {
1773  int nqbase;
1774  for(int i = 0; i < m_base.num_elements(); ++i)
1775  {
1776  nqbase = m_base[i]->GetNumPoints();
1777  np = std::max(np,nqbase);
1778  }
1779 
1780  StdMatrixKey Ikey(ePhysInterpToEquiSpaced, shape, *this);
1781  intmat = GetStdMatrix(Ikey);
1782  }
1783  else
1784  {
1785  np = npset;
1786 
1787  ConstFactorMap cmap;
1788  cmap[eFactorConst] = np;
1789  StdMatrixKey Ikey(ePhysInterpToEquiSpaced, shape, *this, cmap);
1790  intmat = GetStdMatrix(Ikey);
1791 
1792  }
1793 
1794  NekVector<NekDouble> in (nqtot,inarray,eWrapper);
1795  NekVector<NekDouble> out(LibUtilities::GetNumberOfCoefficients(shape,np,np,np),outarray,eWrapper);
1796  out = (*intmat) * in;
1797  }
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
Definition: StdExpansion.h:470
std::map< ConstFactorType, NekDouble > ConstFactorMap
Definition: StdRegions.hpp:251
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
Definition: StdExpansion.h:700
int GetNumberOfCoefficients(ShapeType shape, std::vector< unsigned int > &modes, int offset)
Definition: ShapeType.hpp:312
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
Definition: StdExpansion.h:141
Array< OneD, LibUtilities::BasisSharedPtr > m_base
void Nektar::StdRegions::StdExpansion::ReduceOrderCoeffs ( int  numMin,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 985 of file StdExpansion.h.

References v_ReduceOrderCoeffs().

988  {
989  v_ReduceOrderCoeffs(numMin,inarray,outarray);
990  }
virtual void v_ReduceOrderCoeffs(int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void Nektar::StdRegions::StdExpansion::SetCoeffsToOrientation ( Array< OneD, NekDouble > &  coeffs,
StdRegions::Orientation  dir 
)
inline

Definition at line 777 of file StdExpansion.h.

References v_SetCoeffsToOrientation().

780  {
781  v_SetCoeffsToOrientation(coeffs, dir);
782  }
virtual void v_SetCoeffsToOrientation(StdRegions::Orientation dir, Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void Nektar::StdRegions::StdExpansion::SetCoeffsToOrientation ( StdRegions::Orientation  dir,
Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 784 of file StdExpansion.h.

References v_SetCoeffsToOrientation().

788  {
789  v_SetCoeffsToOrientation(dir,inarray,outarray);
790  }
virtual void v_SetCoeffsToOrientation(StdRegions::Orientation dir, Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void Nektar::StdRegions::StdExpansion::SetElmtId ( const int  id)
inline

Set the element id of this expansion when used in a list by returning value of m_elmt_id.

Definition at line 662 of file StdExpansion.h.

References m_elmt_id.

663  {
664  m_elmt_id = id;
665  }
void Nektar::StdRegions::StdExpansion::SetPhysNormals ( Array< OneD, const NekDouble > &  normal)
inline

Definition at line 720 of file StdExpansion.h.

References v_SetPhysNormals().

721  {
722  v_SetPhysNormals(normal);
723  }
virtual void v_SetPhysNormals(Array< OneD, const NekDouble > &normal)
void Nektar::StdRegions::StdExpansion::SetUpPhysNormals ( const int  edge)
virtual

Definition at line 963 of file StdExpansion.cpp.

References v_SetUpPhysNormals().

964  {
965  v_SetUpPhysNormals(edge);
966  }
virtual void v_SetUpPhysNormals(const int edge)
void Nektar::StdRegions::StdExpansion::StdPhysDeriv ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d0,
Array< OneD, NekDouble > &  out_d1 = NullNekDouble1DArray,
Array< OneD, NekDouble > &  out_d2 = NullNekDouble1DArray 
)
inline

Definition at line 1088 of file StdExpansion.h.

References v_StdPhysDeriv().

1092  {
1093  v_StdPhysDeriv(inarray, out_d0, out_d1, out_d2);
1094  }
virtual void v_StdPhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2, Array< OneD, NekDouble > &out_d3)
void Nektar::StdRegions::StdExpansion::StdPhysDeriv ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 1096 of file StdExpansion.h.

References v_StdPhysDeriv().

1099  {
1100  v_StdPhysDeriv(dir,inarray,outarray);
1101  }
virtual void v_StdPhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2, Array< OneD, NekDouble > &out_d3)
NekDouble Nektar::StdRegions::StdExpansion::StdPhysEvaluate ( const Array< OneD, const NekDouble > &