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

Class representing a hexehedral element in reference space. More...

#include <StdHexExp.h>

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

Public Member Functions

 StdHexExp ()
 StdHexExp (const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc)
 StdHexExp (const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc, NekDouble *coeffs, NekDouble *phys)
 StdHexExp (const StdHexExp &T)
 ~StdHexExp ()
- Public Member Functions inherited from Nektar::StdRegions::StdExpansion3D
 StdExpansion3D ()
 StdExpansion3D (int numcoeffs, const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc)
 StdExpansion3D (const StdExpansion3D &T)
virtual ~StdExpansion3D ()
void PhysTensorDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray_d1, Array< OneD, NekDouble > &outarray_d2, Array< OneD, NekDouble > &outarray_d3)
 Calculate the 3D derivative in the local tensor/collapsed coordinate at the physical points.
void BwdTrans_SumFacKernel (const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)
void IProductWRTBase_SumFacKernel (const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)
- Public Member Functions inherited from Nektar::StdRegions::StdExpansion
 StdExpansion ()
 Default Constructor.
 StdExpansion (const int numcoeffs, const int numbases, const LibUtilities::BasisKey &Ba=LibUtilities::NullBasisKey, const LibUtilities::BasisKey &Bb=LibUtilities::NullBasisKey, const LibUtilities::BasisKey &Bc=LibUtilities::NullBasisKey)
 Constructor.
 StdExpansion (const StdExpansion &T)
 Copy Constructor.
virtual ~StdExpansion ()
 Destructor.
int GetNumBases () const
 This function returns the number of 1D bases used in the expansion.
const Array< OneD, const
LibUtilities::BasisSharedPtr > & 
GetBase () const
 This function gets the shared point to basis.
const
LibUtilities::BasisSharedPtr
GetBasis (int dir) const
 This function gets the shared point to basis in the dir direction.
int GetNcoeffs (void) const
 This function returns the total number of coefficients used in the expansion.
int GetTotPoints () const
 This function returns the total number of quadrature points used in the element.
LibUtilities::BasisType GetBasisType (const int dir) const
 This function returns the type of basis used in the dir direction.
int GetBasisNumModes (const int dir) const
 This function returns the number of expansion modes in the dir direction.
int EvalBasisNumModesMax (void) const
 This function returns the maximum number of expansion modes over all local directions.
LibUtilities::PointsType GetPointsType (const int dir) const
 This function returns the type of quadrature points used in the dir direction.
int GetNumPoints (const int dir) const
 This function returns the number of quadrature points in the dir direction.
const Array< OneD, const
NekDouble > & 
GetPoints (const int dir) const
 This function returns a pointer to the array containing the quadrature points in dir direction.
int GetNverts () const
 This function returns the number of vertices of the expansion domain.
int GetNedges () const
 This function returns the number of edges of the expansion domain.
int GetEdgeNcoeffs (const int i) const
 This function returns the number of expansion coefficients belonging to the i-th edge.
int GetTotalEdgeIntNcoeffs () const
int GetEdgeNumPoints (const int i) const
 This function returns the number of quadrature points belonging to the i-th edge.
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.
int GetFaceNcoeffs (const int i) const
 This function returns the number of expansion coefficients belonging to the i-th face.
int GetFaceIntNcoeffs (const int i) const
int GetTotalFaceIntNcoeffs () const
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.
int GetNfaces () const
 This function returns the number of faces of the expansion domain.
LibUtilities::ShapeType DetShapeType () const
 This function returns the shape of the expansion domain.
int GetShapeDimension () const
bool IsBoundaryInteriorExpansion ()
void BwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function performs the Backward transformation from coefficient space to physical space.
void FwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function performs the Forward transformation from physical space to coefficient space.
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.
void FillMode (const int mode, Array< OneD, NekDouble > &outarray)
 This function fills the array outarray with the mode-th mode of the expansion.
void IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 this function calculates the inner product of a given function f with the different modes of the expansion
void 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.
void SetElmtId (const int id)
 Set the element id of this expansion when used in a list by returning value of m_elmt_id.
void GetCoords (Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2=NullNekDouble1DArray, Array< OneD, NekDouble > &coords_3=NullNekDouble1DArray)
 this function returns the physical coordinates of the quadrature points of the expansion
void GetCoord (const Array< OneD, const NekDouble > &Lcoord, Array< OneD, NekDouble > &coord)
 given the coordinates of a point of the element in the local collapsed coordinate system, this function calculates the physical coordinates of the point
DNekMatSharedPtr GetStdMatrix (const StdMatrixKey &mkey)
DNekBlkMatSharedPtr GetStdStaticCondMatrix (const StdMatrixKey &mkey)
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, const Array< OneD, const 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)
DNekScalBlkMatSharedPtr GetLocStaticCondMatrix (const LocalRegions::MatrixKey &mkey)
void DropLocStaticCondMatrix (const LocalRegions::MatrixKey &mkey)
StdRegions::Orientation GetFaceOrient (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)
void AddEdgeNormBoundaryInt (const int edge, boost::shared_ptr< StdExpansion > &EdgeExp, const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
void AddEdgeNormBoundaryInt (const int edge, boost::shared_ptr< StdExpansion > &EdgeExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
void AddEdgeNormBoundaryBiInt (const int edge, boost::shared_ptr< StdExpansion > &EdgeExp, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
void AddFaceNormBoundaryInt (const int face, boost::shared_ptr< StdExpansion > &FaceExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
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)
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.
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).
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 MultiplyByQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void MultiplyByStdQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
DNekMatSharedPtr CreateGeneralMatrix (const StdMatrixKey &mkey)
 this function generates the mass matrix $\mathbf{M}[i][j] = \int \phi_i(\mathbf{x}) \phi_j(\mathbf{x}) d\mathbf{x}$
void GeneralMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void MassMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void LaplacianMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void ReduceOrderCoeffs (int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
void SVVLaplacianFilter (Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
void 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)
void DGDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, boost::shared_ptr< StdExpansion > > &EdgeExp, Array< OneD, Array< OneD, NekDouble > > &coeffs, Array< OneD, NekDouble > &outarray)
NekDouble PhysEvaluate (const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &physvals)
 This function evaluates the expansion at a single (arbitrary) point of the domain.
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.
void LocCoordToLocCollapsed (const Array< OneD, const NekDouble > &xi, Array< OneD, NekDouble > &eta)
 Convert local cartesian coordinate xi into local collapsed coordinates eta.
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.
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 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.
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 DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix (const LocalRegions::MatrixKey &mkey)
virtual void v_DropLocStaticCondMatrix (const LocalRegions::MatrixKey &mkey)
virtual StdRegions::Orientation v_GetFaceOrient (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.
NekDouble L2 (const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &sol=NullNekDouble1DArray)
 Function to evaluate the discrete $ L_2$ error, $ | \epsilon |_{2} = \left [ \int^1_{-1} [u - u_{exact}]^2 dx \right]^{1/2} d\xi_1 $ where $ u_{exact}$ is given by the array sol.
NekDouble H1 (const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &sol=NullNekDouble1DArray)
 Function to evaluate the discrete $ H^1$ error, $ | \epsilon |^1_{2} = \left [ \int^1_{-1} [u - u_{exact}]^2 + \nabla(u - u_{exact})\cdot\nabla(u - u_{exact})\cdot dx \right]^{1/2} d\xi_1 $ where $ u_{exact}$ is given by the array sol.
const 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)
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)
template<class T >
boost::shared_ptr< T > as ()

Protected Member Functions

virtual void v_PhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2)
 Differentiation Methods ////////////////////////////.
virtual void v_PhysDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_StdPhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2)
virtual void v_StdPhysDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_BwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_BwdTrans_SumFac (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_BwdTrans_SumFacKernel (const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)
virtual void v_FwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_IProductWRTBase_MatOp (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)
virtual void v_IProductWRTBase_SumFacKernel (const Array< OneD, const NekDouble > &base0, const Array< OneD, const NekDouble > &base1, const Array< OneD, const NekDouble > &base2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp, bool doCheckCollDir0, bool doCheckCollDir1, bool doCheckCollDir2)
virtual void v_IProductWRTDerivBase (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_IProductWRTDerivBase_MatOp (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_IProductWRTDerivBase_SumFac (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
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 int v_GetNverts () const
virtual int v_GetNedges () const
virtual int v_GetNfaces () const
virtual LibUtilities::ShapeType v_DetShapeType () 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_GetFaceNcoeffs (const int i) const
virtual int v_GetFaceIntNcoeffs (const int i) const
virtual int v_GetTotalFaceIntNcoeffs () const
virtual int v_GetFaceNumPoints (const int i) const
virtual LibUtilities::PointsKey v_GetFacePointsKey (const int i, const int j) const
virtual int v_CalcNumberOfCoefficients (const std::vector< unsigned int > &nummodes, int &modes_offset)
virtual const
LibUtilities::BasisKey 
v_DetFaceBasisKey (const int i, const int k) const
virtual LibUtilities::BasisType v_GetEdgeBasisType (const int i) const
virtual bool v_IsBoundaryInteriorExpansion ()
virtual void v_GetCoords (Array< OneD, NekDouble > &coords_x, Array< OneD, NekDouble > &coords_y, Array< OneD, NekDouble > &coords_z)
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 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_GetInteriorMap (Array< OneD, unsigned int > &outarray)
virtual void v_GetBoundaryMap (Array< OneD, unsigned int > &outarray)
virtual DNekMatSharedPtr v_GenMatrix (const StdMatrixKey &mkey)
virtual DNekMatSharedPtr v_CreateStdMatrix (const StdMatrixKey &mkey)
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_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_HelmholtzMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual void v_GeneralMatrixOp_MatOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
virtual void v_MultiplyByStdQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
virtual void v_SVVLaplacianFilter (Array< OneD, NekDouble > &array, const StdMatrixKey &mkey)
- Protected Member Functions inherited from Nektar::StdRegions::StdExpansion3D
virtual NekDouble v_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.
virtual NekDouble v_PhysEvaluate (const Array< OneD, DNekMatSharedPtr > &I, const Array< OneD, const NekDouble > &physvals)
virtual void v_LaplacianMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual void v_HelmholtzMatrixOp_MatFree (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
virtual NekDouble v_Integral (const Array< OneD, const NekDouble > &inarray)
 Integrates the specified function over the domain.
virtual void v_NegateFaceNormal (const int face)
- Protected Member Functions inherited from Nektar::StdRegions::StdExpansion
DNekMatSharedPtr CreateStdMatrix (const StdMatrixKey &mkey)
DNekBlkMatSharedPtr CreateStdStaticCondMatrix (const StdMatrixKey &mkey)
 Create the static condensation of a matrix when using a boundary interior decomposition.
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.
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 IProductWRTBase_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)
virtual void v_AddEdgeNormBoundaryInt (const int edge, boost::shared_ptr< StdExpansion > &EdgeExp, const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
virtual void v_AddEdgeNormBoundaryInt (const int edge, boost::shared_ptr< StdExpansion > &EdgeExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
virtual void v_AddFaceNormBoundaryInt (const int face, boost::shared_ptr< StdExpansion > &FaceExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)

Additional Inherited Members

- Protected Attributes inherited from Nektar::StdRegions::StdExpansion3D
std::map< int, NormalVectorm_faceNormals
std::map< int, bool > m_negatedNormals

Detailed Description

Class representing a hexehedral element in reference space.

Definition at line 48 of file StdHexExp.h.

Constructor & Destructor Documentation

Nektar::StdRegions::StdHexExp::StdHexExp ( )

Definition at line 47 of file StdHexExp.cpp.

{
}
Nektar::StdRegions::StdHexExp::StdHexExp ( const LibUtilities::BasisKey Ba,
const LibUtilities::BasisKey Bb,
const LibUtilities::BasisKey Bc 
)

Definition at line 52 of file StdHexExp.cpp.

:
StdExpansion(Ba.GetNumModes()*Bb.GetNumModes()*Bc.GetNumModes(), 3,
Ba, Bb, Bc),
StdExpansion3D(Ba.GetNumModes()*Bb.GetNumModes()*Bc.GetNumModes(),
Ba, Bb, Bc)
{
}
Nektar::StdRegions::StdHexExp::StdHexExp ( const LibUtilities::BasisKey Ba,
const LibUtilities::BasisKey Bb,
const LibUtilities::BasisKey Bc,
NekDouble coeffs,
NekDouble phys 
)

Definition at line 63 of file StdHexExp.cpp.

{
}
Nektar::StdRegions::StdHexExp::StdHexExp ( const StdHexExp T)

Definition at line 72 of file StdHexExp.cpp.

Nektar::StdRegions::StdHexExp::~StdHexExp ( )

Definition at line 79 of file StdHexExp.cpp.

{
}

Member Function Documentation

void Nektar::StdRegions::StdHexExp::v_BwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Backward transformation is three dimensional tensorial expansion $ u (\xi_{1i}, \xi_{2j}, \xi_{3k}) = \sum_{p=0}^{Q_x} \psi_p^a (\xi_{1i}) \lbrace { \sum_{q=0}^{Q_y} \psi_{q}^a (\xi_{2j}) \lbrace { \sum_{r=0}^{Q_z} \hat u_{pqr} \psi_{r}^a (\xi_{3k}) \rbrace} \rbrace}. $ And sumfactorizing step of the form is as:\ $ f_{r} (\xi_{3k}) = \sum_{r=0}^{Q_z} \hat u_{pqr} \psi_{r}^a (\xi_{3k}),\\ g_{p} (\xi_{2j}, \xi_{3k}) = \sum_{r=0}^{Q_y} \psi_{p}^a (\xi_{2j}) f_{r} (\xi_{3k}),\\ u(\xi_{1i}, \xi_{2j}, \xi_{3k}) = \sum_{p=0}^{Q_x} \psi_{p}^a (\xi_{1i}) g_{p} (\xi_{2j}, \xi_{3k}). $

Parameters
inarray?
outarray?

Implements Nektar::StdRegions::StdExpansion.

Definition at line 182 of file StdHexExp.cpp.

References ASSERTL1, Nektar::StdRegions::StdExpansion::BwdTrans_SumFac(), Nektar::LibUtilities::eModified_B, Nektar::LibUtilities::eModified_C, Nektar::LibUtilities::eOrtho_B, Nektar::LibUtilities::eOrtho_C, Nektar::StdRegions::StdExpansion::GetBasisType(), Nektar::StdRegions::StdExpansion::GetNumPoints(), Nektar::StdRegions::StdExpansion::m_base, and Vmath::Vcopy().

{
"Basis[1] is not a general tensor type");
"Basis[2] is not a general tensor type");
if(m_base[0]->Collocation() && m_base[1]->Collocation()
&& m_base[2]->Collocation())
{
inarray, 1, outarray, 1);
}
else
{
StdHexExp::BwdTrans_SumFac(inarray,outarray);
}
}
void Nektar::StdRegions::StdHexExp::v_BwdTrans_SumFac ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 212 of file StdHexExp.cpp.

References Nektar::StdRegions::StdExpansion3D::BwdTrans_SumFacKernel(), Nektar::StdRegions::StdExpansion::GetNumPoints(), and Nektar::StdRegions::StdExpansion::m_base.

{
Array<OneD, NekDouble> wsp(m_base[0]->GetNumPoints()*
m_base[2]->GetNumModes()*
(m_base[1]->GetNumModes() + m_base[1]->GetNumPoints())); // FIX THIS
BwdTrans_SumFacKernel(m_base[0]->GetBdata(),
m_base[1]->GetBdata(),
m_base[2]->GetBdata(),
inarray,outarray,wsp,true,true,true);
}
void Nektar::StdRegions::StdHexExp::v_BwdTrans_SumFacKernel ( const Array< OneD, const NekDouble > &  base0,
const Array< OneD, const NekDouble > &  base1,
const Array< OneD, const NekDouble > &  base2,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
Array< OneD, NekDouble > &  wsp,
bool  doCheckCollDir0,
bool  doCheckCollDir1,
bool  doCheckCollDir2 
)
protectedvirtual
Parameters
base0x-dirn basis matrix
base1y-dirn basis matrix
base2z-dirn basis matrix
inarrayInput vector of modes.
outarrayOutput vector of physical space data.
wspWorkspace of size Q_x*P_z*(P_y+Q_y)
doCheckCollDir0Check for collocation of basis.
doCheckCollDir1Check for collocation of basis.
doCheckCollDir2Check for collocation of basis.
Todo:
Account for some directions being collocated. See StdQuadExp as an example.

Implements Nektar::StdRegions::StdExpansion3D.

Definition at line 239 of file StdHexExp.cpp.

References ASSERTL1, Nektar::StdRegions::StdExpansion::m_base, Nektar::StdRegions::StdExpansion::m_ncoeffs, and Vmath::Vcopy().

{
int nquad0 = m_base[0]->GetNumPoints();
int nquad1 = m_base[1]->GetNumPoints();
int nquad2 = m_base[2]->GetNumPoints();
int nmodes0 = m_base[0]->GetNumModes();
int nmodes1 = m_base[1]->GetNumModes();
int nmodes2 = m_base[2]->GetNumModes();
// Check if using collocation, if requested.
bool colldir0 = doCheckCollDir0?(m_base[0]->Collocation()):false;
bool colldir1 = doCheckCollDir1?(m_base[1]->Collocation()):false;
bool colldir2 = doCheckCollDir2?(m_base[2]->Collocation()):false;
// If collocation in all directions, Physical values at quadrature
// points is just a copy of the modes.
if(colldir0 && colldir1 && colldir2)
{
Vmath::Vcopy(m_ncoeffs,inarray.get(),1,outarray.get(),1);
}
else
{
// Check sufficiently large workspace.
ASSERTL1(wsp.num_elements()>=nquad0*nmodes2*(nmodes1+nquad1),
"Workspace size is not sufficient");
// Assign second half of workspace for 2nd DGEMM operation.
Array<OneD, NekDouble> wsp2 = wsp + nquad0*nmodes1*nmodes2;
// BwdTrans in each direction using DGEMM
Blas::Dgemm('T','T', nmodes1*nmodes2, nquad0, nmodes0,
1.0, &inarray[0], nmodes0,
base0.get(), nquad0,
0.0, &wsp[0], nmodes1*nmodes2);
Blas::Dgemm('T','T', nquad0*nmodes2, nquad1, nmodes1,
1.0, &wsp[0], nmodes1,
base1.get(), nquad1,
0.0, &wsp2[0], nquad0*nmodes2);
Blas::Dgemm('T','T', nquad0*nquad1, nquad2, nmodes2,
1.0, &wsp2[0], nmodes2,
base2.get(), nquad2,
0.0, &outarray[0], nquad0*nquad1);
}
}
int Nektar::StdRegions::StdHexExp::v_CalcNumberOfCoefficients ( const std::vector< unsigned int > &  nummodes,
int &  modes_offset 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 835 of file StdHexExp.cpp.

{
int nmodes = nummodes[modes_offset]*nummodes[modes_offset+1]*nummodes[modes_offset+2];
modes_offset += 3;
return nmodes;
}
DNekMatSharedPtr Nektar::StdRegions::StdHexExp::v_CreateStdMatrix ( const StdMatrixKey mkey)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Reimplemented in Nektar::LocalRegions::HexExp.

Definition at line 2193 of file StdHexExp.cpp.

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

const LibUtilities::BasisKey Nektar::StdRegions::StdHexExp::v_DetFaceBasisKey ( const int  i,
const int  k 
) const
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 844 of file StdHexExp.cpp.

References ASSERTL2, Nektar::StdRegions::StdExpansion::GetBasis(), and Nektar::LibUtilities::NullBasisKey().

{
ASSERTL2(i >= 0 && i <= 5, "face id is out of range");
ASSERTL2(k >= 0 && k <= 1, "basis key id is out of range");
//temporary solution, need to add conditions based on face id
//also need to add check of the points type
switch(i)
{
case 0:
case 5:
switch(k)
{
case 0:
return GetBasis(0)->GetBasisKey();
break;
case 1:
return GetBasis(1)->GetBasisKey();
break;
}
break;
case 1:
case 3:
switch(k)
{
case 0:
return GetBasis(0)->GetBasisKey();
break;
case 1:
return GetBasis(2)->GetBasisKey();
break;
}
break;
case 2:
case 4:
switch(k)
{
case 0:
return GetBasis(1)->GetBasisKey();
break;
case 1:
return GetBasis(2)->GetBasisKey();
break;
}
break;
}
// Should never get here.
}
LibUtilities::ShapeType Nektar::StdRegions::StdHexExp::v_DetShapeType ( ) const
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Reimplemented in Nektar::LocalRegions::HexExp.

Definition at line 680 of file StdHexExp.cpp.

References Nektar::LibUtilities::eHexahedron.

void Nektar::StdRegions::StdHexExp::v_FillMode ( const int  mode,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual
Note
for hexahedral expansions _base0 modes run fastest.

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 611 of file StdHexExp.cpp.

References ASSERTL2, Nektar::StdRegions::StdExpansion::m_base, Nektar::StdRegions::StdExpansion::m_ncoeffs, Vmath::Vcopy(), and Vmath::Vmul().

{
int i,j;
int nquad0 = m_base[0]->GetNumPoints();
int nquad1 = m_base[1]->GetNumPoints();
int nquad2 = m_base[2]->GetNumPoints();
Array<OneD, const NekDouble> base0 = m_base[0]->GetBdata();
Array<OneD, const NekDouble> base1 = m_base[1]->GetBdata();
Array<OneD, const NekDouble> base2 = m_base[2]->GetBdata();
int btmp0 = m_base[0]->GetNumModes();
int btmp1 = m_base[1]->GetNumModes();
int mode2 = mode/(btmp0*btmp1);
int mode1 = (mode-mode2*btmp0*btmp1)/btmp0;
int mode0 = (mode-mode2*btmp0*btmp1)%btmp0;
ASSERTL2(mode2 == (int)floor((1.0*mode)/(btmp0*btmp1)),
"Integer Truncation not Equiv to Floor");
ASSERTL2(mode1 == (int)floor((1.0*mode-mode2*btmp0*btmp1)
/(btmp0*btmp1)),
"Integer Truncation not Equiv to Floor");
"calling argument mode is larger than total expansion "
"order");
for(i = 0; i < nquad1*nquad2; ++i)
{
Vmath::Vcopy(nquad0,(NekDouble *)(base0.get() + mode0*nquad0),1,
&outarray[0]+i*nquad0, 1);
}
for(j = 0; j < nquad2; ++j)
{
for(i = 0; i < nquad0; ++i)
{
Vmath::Vmul(nquad1,(NekDouble *)(base1.get() + mode1*nquad1),1,
&outarray[0]+i+j*nquad0*nquad1, nquad0,
&outarray[0]+i+j*nquad0*nquad1, nquad0);
}
}
for(i = 0; i < nquad2; i++)
{
Blas::Dscal(nquad0*nquad1,base2[mode2*nquad2+i],
&outarray[0]+i*nquad0*nquad1,1);
}
}
void Nektar::StdRegions::StdHexExp::v_FwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Solves the system $ \mathbf{B^{\top}WB\hat{u}}=\mathbf{B^{\top}Wu^{\delta}} $

Parameters
inarrayarray of physical quadrature points to be transformed, $ \mathbf{u^{\delta}} $.
outarrayarray of expansion coefficients, $ \mathbf{\hat{u}} $.

Implements Nektar::StdRegions::StdExpansion.

Reimplemented in Nektar::LocalRegions::HexExp.

Definition at line 303 of file StdHexExp.cpp.

References Nektar::StdRegions::StdExpansion::DetShapeType(), Nektar::StdRegions::eInvMass, Nektar::eWrapper, Nektar::StdRegions::StdExpansion::GetNcoeffs(), Nektar::StdRegions::StdExpansion::GetStdMatrix(), Nektar::StdRegions::StdExpansion::IProductWRTBase(), Nektar::StdRegions::StdExpansion::m_base, Nektar::StdRegions::StdExpansion::m_ncoeffs, and Vmath::Vcopy().

{
// If using collocation expansion, coefficients match physical
// data points so just do a direct copy.
if( (m_base[0]->Collocation())
&&(m_base[1]->Collocation())
&&(m_base[2]->Collocation()) )
{
Vmath::Vcopy(GetNcoeffs(), &inarray[0], 1, &outarray[0], 1);
}
else
{
// Compute B^TWu
IProductWRTBase(inarray,outarray);
// get Mass matrix inverse
StdMatrixKey masskey(eInvMass,DetShapeType(),*this);
DNekMatSharedPtr matsys = GetStdMatrix(masskey);
// copy inarray in case inarray == outarray
DNekVec in (m_ncoeffs,outarray);
DNekVec out(m_ncoeffs,outarray,eWrapper);
// Solve for coefficients.
out = (*matsys)*in;
}
}
void Nektar::StdRegions::StdHexExp::v_GeneralMatrixOp_MatOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
protectedvirtual

Reimplemented in Nektar::LocalRegions::HexExp.

Definition at line 2245 of file StdHexExp.cpp.

References Nektar::StdRegions::StdExpansion::m_ncoeffs, Nektar::StdRegions::StdExpansion::m_stdMatrixManager, and Vmath::Vcopy().

{
if(inarray.get() == outarray.get())
{
Array<OneD,NekDouble> tmp(m_ncoeffs);
Vmath::Vcopy(m_ncoeffs,inarray.get(),1,tmp.get(),1);
Blas::Dgemv('N', m_ncoeffs, m_ncoeffs, 1.0, mat->GetPtr().get(),
m_ncoeffs, tmp.get(), 1, 0.0, outarray.get(), 1);
}
else
{
Blas::Dgemv('N', m_ncoeffs, m_ncoeffs, 1.0, mat->GetPtr().get(),
m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
}
}
DNekMatSharedPtr Nektar::StdRegions::StdHexExp::v_GenMatrix ( const StdMatrixKey mkey)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Reimplemented in Nektar::LocalRegions::HexExp.

Definition at line 2187 of file StdHexExp.cpp.

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

void Nektar::StdRegions::StdHexExp::v_GetBoundaryMap ( Array< OneD, unsigned int > &  outarray)
protectedvirtual
Parameters
outarrayStorage for computed map.

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 2096 of file StdHexExp.cpp.

References ASSERTL1, Nektar::LibUtilities::eGLL_Lagrange, Nektar::LibUtilities::eModified_A, Nektar::StdRegions::StdExpansion::GetBasisType(), Nektar::StdRegions::StdExpansion::m_base, and Nektar::StdRegions::StdExpansion::NumBndryCoeffs().

{
"BasisType is not a boundary interior form");
"BasisType is not a boundary interior form");
"BasisType is not a boundary interior form");
int i;
int nummodes [3] = {m_base[0]->GetNumModes(),
m_base[1]->GetNumModes(),
m_base[2]->GetNumModes()};
int nBndCoeffs = NumBndryCoeffs();
if(outarray.num_elements()!=nBndCoeffs)
{
outarray = Array<OneD, unsigned int>(nBndCoeffs);
}
const LibUtilities::BasisType Btype [3] = {GetBasisType(0),
int p,q,r;
int cnt = 0;
int BndIdx [3][2];
int IntIdx [3][2];
for(i = 0; i < 3; i++)
{
BndIdx[i][0] = 0;
if( Btype[i] == LibUtilities::eModified_A)
{
BndIdx[i][1] = 1;
IntIdx[i][0] = 2;
IntIdx[i][1] = nummodes[i];
}
else
{
BndIdx[i][1] = nummodes[i]-1;
IntIdx[i][0] = 1;
IntIdx[i][1] = nummodes[i]-1;
}
}
for(i = 0; i < 2; i++)
{
r = BndIdx[2][i];
for( q = 0; q < nummodes[1]; q++)
{
for( p = 0; p < nummodes[0]; p++)
{
outarray[cnt++] = r*nummodes[0]*nummodes[1]+q*nummodes[0] + p;
}
}
}
for(r = IntIdx[2][0]; r < IntIdx[2][1]; r++)
{
for( i = 0; i < 2; i++)
{
q = BndIdx[1][i];
for( p = 0; p < nummodes[0]; p++)
{
outarray[cnt++] = r*nummodes[0]*nummodes[1] +
q*nummodes[0] + p;
}
}
for( q = IntIdx[1][0]; q < IntIdx[1][1]; q++)
{
for( i = 0; i < 2; i++)
{
p = BndIdx[0][i];
outarray[cnt++] = r*nummodes[0]*nummodes[1] +
q*nummodes[0] + p;
}
}
}
sort(outarray.get(), outarray.get() + nBndCoeffs);
}
void Nektar::StdRegions::StdHexExp::v_GetCoords ( Array< OneD, NekDouble > &  coords_x,
Array< OneD, NekDouble > &  coords_y,
Array< OneD, NekDouble > &  coords_z 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Reimplemented in Nektar::LocalRegions::HexExp.

Definition at line 914 of file StdHexExp.cpp.

References Nektar::StdRegions::StdExpansion::GetNumPoints(), and Nektar::StdRegions::StdExpansion::m_base.

{
Array<OneD, const NekDouble> eta_x = m_base[0]->GetZ();
Array<OneD, const NekDouble> eta_y = m_base[1]->GetZ();
Array<OneD, const NekDouble> eta_z = m_base[2]->GetZ();
int Qx = GetNumPoints(0);
int Qy = GetNumPoints(1);
int Qz = GetNumPoints(2);
// Convert collapsed coordinates into cartesian coordinates:
// eta --> xi
for( int k = 0; k < Qz; ++k ) {
for( int j = 0; j < Qy; ++j ) {
for( int i = 0; i < Qx; ++i ) {
int s = i + Qx*(j + Qy*k);
xi_x[s] = eta_x[i];
xi_y[s] = eta_y[j];
xi_z[s] = eta_z[k];
}
}
}
}
LibUtilities::BasisType Nektar::StdRegions::StdHexExp::v_GetEdgeBasisType ( const int  i) const
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 896 of file StdHexExp.cpp.

References ASSERTL2, and Nektar::StdRegions::StdExpansion::GetBasisType().

{
ASSERTL2((i >= 0)&&(i <= 11),"edge id is out of range");
if((i == 0)||(i == 2)||(i==8)||(i==10))
{
return GetBasisType(0);
}
else if((i == 1)||(i == 3)||(i == 9)||(i == 11))
{
return GetBasisType(1);
}
else
{
return GetBasisType(2);
}
}
void Nektar::StdRegions::StdHexExp::v_GetEdgeInteriorMap ( const int  eid,
const Orientation  edgeOrient,
Array< OneD, unsigned int > &  maparray,
Array< OneD, int > &  signarray 
)
protectedvirtual
Parameters
eidThe edge to compute the numbering for.
edgeOrientOrientation of the edge.
maparrayStorage for computed mapping array.
signarray?

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1394 of file StdHexExp.cpp.

References ASSERTL1, Nektar::StdRegions::eBackwards, Nektar::StdRegions::eForwards, Nektar::LibUtilities::eGLL_Lagrange, Nektar::LibUtilities::eModified_A, Nektar::StdRegions::StdExpansion::GetBasisType(), Nektar::StdRegions::StdExpansion::GetEdgeNcoeffs(), and Nektar::StdRegions::StdExpansion::m_base.

{
"BasisType is not a boundary interior form");
"BasisType is not a boundary interior form");
"BasisType is not a boundary interior form");
ASSERTL1((eid>=0)&&(eid<12),
"local edge id must be between 0 and 11");
int nEdgeIntCoeffs = GetEdgeNcoeffs(eid)-2;
if(maparray.num_elements()!=nEdgeIntCoeffs)
{
maparray = Array<OneD, unsigned int>(nEdgeIntCoeffs);
}
if(signarray.num_elements() != nEdgeIntCoeffs)
{
signarray = Array<OneD, int>(nEdgeIntCoeffs,1);
}
else
{
fill( signarray.get() , signarray.get()+nEdgeIntCoeffs, 1 );
}
int nummodes [3] = {m_base[0]->GetNumModes(),
m_base[1]->GetNumModes(),
m_base[2]->GetNumModes()};
const LibUtilities::BasisType bType [3] = {GetBasisType(0),
bool reverseOrdering = false;
bool signChange = false;
int IdxRange [3][2] = {{0,0},{0,0},{0,0}};
switch(eid)
{
case 0:
case 1:
case 2:
case 3:
{
IdxRange[2][0] = 0;
IdxRange[2][1] = 1;
}
break;
case 8:
case 9:
case 10:
case 11:
{
if( bType[2] == LibUtilities::eGLL_Lagrange)
{
IdxRange[2][0] = nummodes[2] - 1;
IdxRange[2][1] = nummodes[2];
}
else
{
IdxRange[2][0] = 1;
IdxRange[2][1] = 2;
}
}
break;
case 4:
case 5:
case 6:
case 7:
{
if( bType[2] == LibUtilities::eGLL_Lagrange)
{
IdxRange[2][0] = 1;
IdxRange[2][1] = nummodes[2] - 1;
if(edgeOrient==eBackwards)
{
reverseOrdering = true;
}
}
else
{
IdxRange[2][0] = 2;
IdxRange[2][1] = nummodes[2];
if(edgeOrient==eBackwards)
{
signChange = true;
}
}
}
break;
}
switch(eid)
{
case 0:
case 4:
case 5:
case 8:
{
IdxRange[1][0] = 0;
IdxRange[1][1] = 1;
}
break;
case 2:
case 6:
case 7:
case 10:
{
if( bType[1] == LibUtilities::eGLL_Lagrange)
{
IdxRange[1][0] = nummodes[1] - 1;
IdxRange[1][1] = nummodes[1];
}
else
{
IdxRange[1][0] = 1;
IdxRange[1][1] = 2;
}
}
break;
case 1:
case 9:
{
if( bType[1] == LibUtilities::eGLL_Lagrange)
{
IdxRange[1][0] = 1;
IdxRange[1][1] = nummodes[1] - 1;
if(edgeOrient==eBackwards)
{
reverseOrdering = true;
}
}
else
{
IdxRange[1][0] = 2;
IdxRange[1][1] = nummodes[1];
if(edgeOrient==eBackwards)
{
signChange = true;
}
}
}
break;
case 3:
case 11:
{
if( bType[1] == LibUtilities::eGLL_Lagrange)
{
IdxRange[1][0] = 1;
IdxRange[1][1] = nummodes[1] - 1;
if(edgeOrient==eForwards)
{
reverseOrdering = true;
}
}
else
{
IdxRange[1][0] = 2;
IdxRange[1][1] = nummodes[1];
if(edgeOrient==eForwards)
{
signChange = true;
}
}
}
break;
}
switch(eid)
{
case 3:
case 4:
case 7:
case 11:
{
IdxRange[0][0] = 0;
IdxRange[0][1] = 1;
}
break;
case 1:
case 5:
case 6:
case 9:
{
if( bType[0] == LibUtilities::eGLL_Lagrange)
{
IdxRange[0][0] = nummodes[0] - 1;
IdxRange[0][1] = nummodes[0];
}
else
{
IdxRange[0][0] = 1;
IdxRange[0][1] = 2;
}
}
break;
case 0:
case 8:
{
if( bType[0] == LibUtilities::eGLL_Lagrange)
{
IdxRange[0][0] = 1;
IdxRange[0][1] = nummodes[0] - 1;
if(edgeOrient==eBackwards)
{
reverseOrdering = true;
}
}
else
{
IdxRange[0][0] = 2;
IdxRange[0][1] = nummodes[0];
if(edgeOrient==eBackwards)
{
signChange = true;
}
}
}
break;
case 2:
case 10:
{
if( bType[0] == LibUtilities::eGLL_Lagrange)
{
IdxRange[0][0] = 1;
IdxRange[0][1] = nummodes[0] - 1;
if(edgeOrient==eForwards)
{
reverseOrdering = true;
}
}
else
{
IdxRange[0][0] = 2;
IdxRange[0][1] = nummodes[0];
if(edgeOrient==eForwards)
{
signChange = true;
}
}
}
break;
}
int p,q,r;
int cnt = 0;
for(r = IdxRange[2][0]; r < IdxRange[2][1]; r++)
{
for(q = IdxRange[1][0]; q < IdxRange[1][1]; q++)
{
for(p = IdxRange[0][0]; p < IdxRange[0][1]; p++)
{
maparray[cnt++]
= r*nummodes[0]*nummodes[1] + q*nummodes[0] + p;
}
}
}
if( reverseOrdering )
{
reverse( maparray.get() , maparray.get()+nEdgeIntCoeffs );
}
if( signChange )
{
for(p = 1; p < nEdgeIntCoeffs; p+=2)
{
signarray[p] = -1;
}
}
}
int Nektar::StdRegions::StdHexExp::v_GetEdgeNcoeffs ( const int  i) const
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 727 of file StdHexExp.cpp.

References ASSERTL2, and Nektar::StdRegions::StdExpansion::GetBasisNumModes().

{
ASSERTL2((i >= 0)&&(i <= 11),"edge id is out of range");
if((i == 0)||(i == 2)||(i == 8)||(i == 10))
{
return GetBasisNumModes(0);
}
else if((i == 1)||(i == 3)||(i == 9)||(i == 11))
{
return GetBasisNumModes(1);
}
else
{
return GetBasisNumModes(2);
}
}
void Nektar::StdRegions::StdHexExp::v_GetFaceInteriorMap ( const int  fid,
const Orientation  faceOrient,
Array< OneD, unsigned int > &  maparray,
Array< OneD, int > &  signarray 
)
protectedvirtual

Generate mapping describing which elemental modes lie on the interior of a given face. Accounts for face orientation.

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1692 of file StdHexExp.cpp.

References ASSERTL1, Nektar::LibUtilities::eGLL_Lagrange, Nektar::LibUtilities::eModified_A, Nektar::StdRegions::StdExpansion::GetBasisType(), Nektar::StdRegions::StdExpansion::GetFaceIntNcoeffs(), and Nektar::StdRegions::StdExpansion::m_base.

{
"BasisType is not a boundary interior form");
"BasisType is not a boundary interior form");
"BasisType is not a boundary interior form");
ASSERTL1((fid>=0)&&(fid<6),
"local face id must be between 0 and 5");
int nFaceIntCoeffs = GetFaceIntNcoeffs(fid);
if(maparray.num_elements()!=nFaceIntCoeffs)
{
maparray = Array<OneD, unsigned int>(nFaceIntCoeffs);
}
if(signarray.num_elements() != nFaceIntCoeffs)
{
signarray = Array<OneD, int>(nFaceIntCoeffs,1);
}
else
{
fill( signarray.get() , signarray.get()+nFaceIntCoeffs, 1 );
}
int nummodes [3] = {m_base[0]->GetNumModes(),
m_base[1]->GetNumModes(),
m_base[2]->GetNumModes()};
const LibUtilities::BasisType bType [3] = {GetBasisType(0),
int nummodesA = 0;
int nummodesB = 0;
// Determine the number of modes in face directions A & B based
// on the face index given.
switch(fid)
{
case 0:
case 5:
{
nummodesA = nummodes[0];
nummodesB = nummodes[1];
}
break;
case 1:
case 3:
{
nummodesA = nummodes[0];
nummodesB = nummodes[2];
}
break;
case 2:
case 4:
{
nummodesA = nummodes[1];
nummodesB = nummodes[2];
}
}
int i,j;
Array<OneD, int> arrayindx(nFaceIntCoeffs);
// Create a mapping array to account for transposition of the
// coordinates due to face orientation.
for(i = 0; i < (nummodesB-2); i++)
{
for(j = 0; j < (nummodesA-2); j++)
{
if( faceOrient < 9 )
{
arrayindx[i*(nummodesA-2)+j] = i*(nummodesA-2)+j;
}
else
{
arrayindx[i*(nummodesA-2)+j] = j*(nummodesB-2)+i;
}
}
}
int IdxRange [3][2];
int Incr[3];
Array<OneD, int> sign0(nummodes[0], 1);
Array<OneD, int> sign1(nummodes[1], 1);
Array<OneD, int> sign2(nummodes[2], 1);
// Set the upper and lower bounds, and increment for the faces
// involving the first coordinate direction.
switch(fid)
{
case 0: // bottom face
{
IdxRange[2][0] = 0;
IdxRange[2][1] = 1;
Incr[2] = 1;
}
break;
case 5: // top face
{
if( bType[2] == LibUtilities::eGLL_Lagrange)
{
IdxRange[2][0] = nummodes[2] - 1;
IdxRange[2][1] = nummodes[2];
Incr[2] = 1;
}
else
{
IdxRange[2][0] = 1;
IdxRange[2][1] = 2;
Incr[2] = 1;
}
}
break;
default: // all other faces
{
if( bType[2] == LibUtilities::eGLL_Lagrange)
{
if( (((int) faceOrient)-5) % 2 )
{
IdxRange[2][0] = nummodes[2] - 2;
IdxRange[2][1] = 0;
Incr[2] = -1;
}
else
{
IdxRange[2][0] = 1;
IdxRange[2][1] = nummodes[2] - 1;
Incr[2] = 1;
}
}
else
{
IdxRange[2][0] = 2;
IdxRange[2][1] = nummodes[2];
Incr[2] = 1;
if( (((int) faceOrient)-5) % 2 )
{
for(i = 3; i < nummodes[2]; i+=2)
{
sign2[i] = -1;
}
}
}
}
}
// Set the upper and lower bounds, and increment for the faces
// involving the second coordinate direction.
switch(fid)
{
case 1:
{
IdxRange[1][0] = 0;
IdxRange[1][1] = 1;
Incr[1] = 1;
}
break;
case 3:
{
if( bType[1] == LibUtilities::eGLL_Lagrange)
{
IdxRange[1][0] = nummodes[1] - 1;
IdxRange[1][1] = nummodes[1];
Incr[1] = 1;
}
else
{
IdxRange[1][0] = 1;
IdxRange[1][1] = 2;
Incr[1] = 1;
}
}
break;
case 0:
case 5:
{
if( bType[1] == LibUtilities::eGLL_Lagrange)
{
if( (((int) faceOrient)-5) % 2 )
{
IdxRange[1][0] = nummodes[1] - 2;
IdxRange[1][1] = 0;
Incr[1] = -1;
}
else
{
IdxRange[1][0] = 1;
IdxRange[1][1] = nummodes[1] - 1;
Incr[1] = 1;
}
}
else
{
IdxRange[1][0] = 2;
IdxRange[1][1] = nummodes[1];
Incr[1] = 1;
if( (((int) faceOrient)-5) % 2 )
{
for(i = 3; i < nummodes[1]; i+=2)
{
sign1[i] = -1;
}
}
}
}
break;
default: // case2: case4:
{
if( bType[1] == LibUtilities::eGLL_Lagrange)
{
if( (((int) faceOrient)-5) % 4 > 1 )
{
IdxRange[1][0] = nummodes[1] - 2;
IdxRange[1][1] = 0;
Incr[1] = -1;
}
else
{
IdxRange[1][0] = 1;
IdxRange[1][1] = nummodes[1] - 1;
Incr[1] = 1;
}
}
else
{
IdxRange[1][0] = 2;
IdxRange[1][1] = nummodes[1];
Incr[1] = 1;
if( (((int) faceOrient)-5) % 4 > 1 )
{
for(i = 3; i < nummodes[1]; i+=2)
{
sign1[i] = -1;
}
}
}
}
}
switch(fid)
{
case 4:
{
IdxRange[0][0] = 0;
IdxRange[0][1] = 1;
Incr[0] = 1;
}
break;
case 2:
{
if( bType[0] == LibUtilities::eGLL_Lagrange)
{
IdxRange[0][0] = nummodes[0] - 1;
IdxRange[0][1] = nummodes[0];
Incr[0] = 1;
}
else
{
IdxRange[0][0] = 1;
IdxRange[0][1] = 2;
Incr[0] = 1;
}
}
break;
default:
{
if( bType[0] == LibUtilities::eGLL_Lagrange)
{
if( (((int) faceOrient)-5) % 4 > 1 )
{
IdxRange[0][0] = nummodes[0] - 2;
IdxRange[0][1] = 0;
Incr[0] = -1;
}
else
{
IdxRange[0][0] = 1;
IdxRange[0][1] = nummodes[0] - 1;
Incr[0] = 1;
}
}
else
{
IdxRange[0][0] = 2;
IdxRange[0][1] = nummodes[0];
Incr[0] = 1;
if( (((int) faceOrient)-5) % 4 > 1 )
{
for(i = 3; i < nummodes[0]; i+=2)
{
sign0[i] = -1;
}
}
}
}
}
int p,q,r;
int cnt = 0;
for(r = IdxRange[2][0]; r != IdxRange[2][1]; r+=Incr[2])
{
for(q = IdxRange[1][0]; q != IdxRange[1][1]; q+=Incr[1])
{
for(p = IdxRange[0][0]; p != IdxRange[0][1]; p+=Incr[0])
{
maparray [ arrayindx[cnt ] ]
= r*nummodes[0]*nummodes[1] + q*nummodes[0] + p;
signarray[ arrayindx[cnt++] ]
= sign0[p] * sign1[q] * sign2[r];
}
}
}
}
int Nektar::StdRegions::StdHexExp::v_GetFaceIntNcoeffs ( const int  i) const
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 769 of file StdHexExp.cpp.

References ASSERTL2, and Nektar::StdRegions::StdExpansion::GetBasisNumModes().

{
ASSERTL2((i >= 0) && (i <= 5), "face id is out of range");
if((i == 0) || (i == 5))
{
return (GetBasisNumModes(0)-2)*(GetBasisNumModes(1)-2);
}
else if((i == 1) || (i == 3))
{
return (GetBasisNumModes(0)-2)*(GetBasisNumModes(2)-2);
}
else
{
return (GetBasisNumModes(1)-2)*(GetBasisNumModes(2)-2);
}
}
int Nektar::StdRegions::StdHexExp::v_GetFaceNcoeffs ( const int  i) const
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 751 of file StdHexExp.cpp.

References ASSERTL2, and Nektar::StdRegions::StdExpansion::GetBasisNumModes().

{
ASSERTL2((i >= 0) && (i <= 5), "face id is out of range");
if((i == 0) || (i == 5))
{
}
else if((i == 1) || (i == 3))
{
}
else
{
}
}
int Nektar::StdRegions::StdHexExp::v_GetFaceNumPoints ( const int  i) const
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 794 of file StdHexExp.cpp.

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

{
ASSERTL2(i >= 0 && i <= 5, "face id is out of range");
if (i == 0 || i == 5)
{
return m_base[0]->GetNumPoints()*
m_base[1]->GetNumPoints();
}
else if (i == 1 || i == 3)
{
return m_base[0]->GetNumPoints()*
m_base[2]->GetNumPoints();
}
else
{
return m_base[1]->GetNumPoints()*
m_base[2]->GetNumPoints();
}
}
LibUtilities::PointsKey Nektar::StdRegions::StdHexExp::v_GetFacePointsKey ( const int  i,
const int  j 
) const
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 815 of file StdHexExp.cpp.

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

{
ASSERTL2(i >= 0 && i <= 5, "face id is out of range");
ASSERTL2(j == 0 || j == 1, "face direction is out of range");
if (i == 0 || i == 5)
{
return m_base[j]->GetPointsKey();
}
else if (i == 1 || i == 3)
{
return m_base[2*j]->GetPointsKey();
}
else
{
return m_base[j+1]->GetPointsKey();
}
}
void Nektar::StdRegions::StdHexExp::v_GetFaceToElementMap ( const int  fid,
const Orientation  faceOrient,
Array< OneD, unsigned int > &  maparray,
Array< OneD, int > &  signarray,
int  nummodesA = -1,
int  nummodesB = -1 
)
protectedvirtual

Only for basis type Modified_A or GLL_LAGRANGE in all directions.

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 944 of file StdHexExp.cpp.

References ASSERTL0, ASSERTL1, Nektar::LibUtilities::eGLL_Lagrange, Nektar::LibUtilities::eModified_A, Nektar::StdRegions::StdExpansion::GetEdgeBasisType(), and Nektar::StdRegions::StdExpansion::m_base.

{
int i,j;
const int nummodes0 = m_base[0]->GetNumModes();
const int nummodes1 = m_base[1]->GetNumModes();
const int nummodes2 = m_base[2]->GetNumModes();
"Method only implemented if BasisType is indentical in "
"all directions");
"Method only implemented for Modified_A or GLL_Lagrange BasisType");
if (nummodesA == -1)
{
switch(fid)
{
case 0:
case 5:
nummodesA = nummodes0;
nummodesB = nummodes1;
break;
case 1:
case 3:
nummodesA = nummodes0;
nummodesB = nummodes2;
break;
case 2:
case 4:
nummodesA = nummodes1;
nummodesB = nummodes2;
break;
}
}
int nFaceCoeffs = nummodesA*nummodesB;
if(maparray.num_elements() != nFaceCoeffs)
{
maparray = Array<OneD, unsigned int>(nFaceCoeffs);
}
if(signarray.num_elements() != nFaceCoeffs)
{
signarray = Array<OneD, int>(nFaceCoeffs,1);
}
else
{
fill( signarray.get() , signarray.get()+nFaceCoeffs, 1 );
}
Array<OneD, int> arrayindx(nFaceCoeffs);
for(i = 0; i < nummodesB; i++)
{
for(j = 0; j < nummodesA; j++)
{
if( faceOrient < 9 )
{
arrayindx[i*nummodesA+j] = i*nummodesA+j;
}
else
{
arrayindx[i*nummodesA+j] = j*nummodesB+i;
}
}
}
int offset = 0;
int jump1 = 1;
int jump2 = 1;
switch(fid)
{
case 5:
{
if (modified)
{
offset = nummodes0*nummodes1;
}
else
{
offset = (nummodes2-1)*nummodes0*nummodes1;
jump1 = nummodes0;
}
}
case 0:
{
jump1 = nummodes0;
}
break;
case 3:
{
if (modified)
{
offset = nummodes0;
}
else
{
offset = nummodes0*(nummodes1-1);
jump1 = nummodes0*nummodes1;
}
}
case 1:
{
jump1 = nummodes0*nummodes1;
}
break;
case 2:
{
if (modified)
{
offset = 1;
}
else
{
offset = nummodes0-1;
jump1 = nummodes0*nummodes1;
jump2 = nummodes0;
}
}
case 4:
{
jump1 = nummodes0*nummodes1;
jump2 = nummodes0;
}
break;
default:
ASSERTL0(false,"fid must be between 0 and 5");
}
for(i = 0; i < nummodesB; i++)
{
for(j = 0; j < nummodesA; j++)
{
maparray[ arrayindx[i*nummodesA+j] ]
= i*jump1 + j*jump2 + offset;
}
}
if( (faceOrient==6) || (faceOrient==8) ||
(faceOrient==11) || (faceOrient==12) )
{
if(faceOrient<9)
{
if (modified)
{
for(i = 3; i < nummodesB; i+=2)
{
for(j = 0; j < nummodesA; j++)
{
signarray[ arrayindx[i*nummodesA+j] ] *= -1;
}
}
for(i = 0; i < nummodesA; i++)
{
swap( maparray[i] , maparray[i+nummodesA] );
swap( signarray[i] , signarray[i+nummodesA] );
}
}
else
{
for(i = 0; i < nummodesA; i++)
{
for(j = 0; j < nummodesB/2; j++)
{
swap( maparray[i + j*nummodesA],
maparray[i+nummodesA*nummodesB
-nummodesA -j*nummodesA] );
swap( signarray[i + j*nummodesA],
signarray[i+nummodesA*nummodesB
-nummodesA -j*nummodesA]);
}
}
}
}
else
{
if (modified)
{
for(i = 0; i < nummodesB; i++)
{
for(j = 3; j < nummodesA; j+=2)
{
signarray[ arrayindx[i*nummodesA+j] ] *= -1;
}
}
for(i = 0; i < nummodesB; i++)
{
swap( maparray[i] , maparray[i+nummodesB] );
swap( signarray[i] , signarray[i+nummodesB] );
}
}
else
{
for(i = 0; i < nummodesA; i++)
{
for(j = 0; j < nummodesB/2; j++)
{
swap( maparray[i*nummodesB + j],
maparray[i*nummodesB + nummodesB -1 -j]);
swap( signarray[i*nummodesB + j],
signarray[i*nummodesB + nummodesB -1 -j]);
}
}
}
}
}
if( (faceOrient==7) || (faceOrient==8) ||
(faceOrient==10) || (faceOrient==12) )
{
if(faceOrient<9)
{
if (modified)
{
for(i = 0; i < nummodesB; i++)
{
for(j = 3; j < nummodesA; j+=2)
{
signarray[ arrayindx[i*nummodesA+j] ] *= -1;
}
}
for(i = 0; i < nummodesB; i++)
{
swap( maparray[i*nummodesA],
maparray[i*nummodesA+1]);
swap( signarray[i*nummodesA],
signarray[i*nummodesA+1]);
}
}
else
{
for(i = 0; i < nummodesB; i++)
{
for(j = 0; j < nummodesA/2; j++)
{
swap( maparray[i*nummodesA + j],
maparray[i*nummodesA + nummodesA -1 -j]);
swap( signarray[i*nummodesA + j],
signarray[i*nummodesA + nummodesA -1 -j]);
}
}
}
}
else
{
if (modified)
{
for(i = 3; i < nummodesB; i+=2)
{
for(j = 0; j < nummodesA; j++)
{
signarray[ arrayindx[i*nummodesA+j] ] *= -1;
}
}
for(i = 0; i < nummodesA; i++)
{
swap( maparray[i*nummodesB],
maparray[i*nummodesB+1]);
swap( signarray[i*nummodesB],
signarray[i*nummodesB+1]);
}
}
else
{
for(i = 0; i < nummodesB; i++)
{
for(j = 0; j < nummodesA/2; j++)
{
swap( maparray[i + j*nummodesB] ,
maparray[i+nummodesA*nummodesB -
nummodesB -j*nummodesB] );
swap( signarray[i + j*nummodesB] ,
signarray[i+nummodesA*nummodesB -
nummodesB -j*nummodesB] );
}
}
}
}
}
}
void Nektar::StdRegions::StdHexExp::v_GetInteriorMap ( Array< OneD, unsigned int > &  outarray)
protectedvirtual
Parameters
outarrayStorage area for computed map.

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 2032 of file StdHexExp.cpp.

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

{
"BasisType is not a boundary interior form");
"BasisType is not a boundary interior form");
"BasisType is not a boundary interior form");
int i;
int nummodes [3] = {m_base[0]->GetNumModes(),
m_base[1]->GetNumModes(),
m_base[2]->GetNumModes()};
int nIntCoeffs = m_ncoeffs - NumBndryCoeffs();
if(outarray.num_elements() != nIntCoeffs)
{
outarray = Array<OneD, unsigned int>(nIntCoeffs);
}
const LibUtilities::BasisType Btype [3] = {GetBasisType(0),
int p,q,r;
int cnt = 0;
int IntIdx [3][2];
for(i = 0; i < 3; i++)
{
if( Btype[i] == LibUtilities::eModified_A)
{
IntIdx[i][0] = 2;
IntIdx[i][1] = nummodes[i];
}
else
{
IntIdx[i][0] = 1;
IntIdx[i][1] = nummodes[i]-1;
}
}
for(r = IntIdx[2][0]; r < IntIdx[2][1]; r++)
{
for( q = IntIdx[1][0]; q < IntIdx[1][1]; q++)
{
for( p = IntIdx[0][0]; p < IntIdx[0][1]; p++)
{
outarray[cnt++] = r*nummodes[0]*nummodes[1] +
q*nummodes[0] + p;
}
}
}
}
int Nektar::StdRegions::StdHexExp::v_GetNedges ( ) const
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 668 of file StdHexExp.cpp.

{
return 12;
}
int Nektar::StdRegions::StdHexExp::v_GetNfaces ( ) const
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 674 of file StdHexExp.cpp.

{
return 6;
}
int Nektar::StdRegions::StdHexExp::v_GetNverts ( ) const
protectedvirtual

Implements Nektar::StdRegions::StdExpansion.

Definition at line 662 of file StdHexExp.cpp.

{
return 8;
}
int Nektar::StdRegions::StdHexExp::v_GetTotalEdgeIntNcoeffs ( ) const
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 745 of file StdHexExp.cpp.

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

int Nektar::StdRegions::StdHexExp::v_GetTotalFaceIntNcoeffs ( ) const
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 787 of file StdHexExp.cpp.

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

{
return 2*((GetBasisNumModes(0)-2)*(GetBasisNumModes(1)-2)+
}
int Nektar::StdRegions::StdHexExp::v_GetVertexMap ( int  localVertexId,
bool  useCoeffPacking = false 
)
protectedvirtual

Expansions in each of the three dimensions must be of type LibUtilities::eModified_A or LibUtilities::eGLL_Lagrange.

Parameters
localVertexIdID of vertex (0..7)
Returns
Position of vertex in local numbering scheme.

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1260 of file StdHexExp.cpp.

References ASSERTL1, Nektar::LibUtilities::eGLL_Lagrange, Nektar::LibUtilities::eModified_A, Nektar::StdRegions::StdExpansion::GetBasisType(), and Nektar::StdRegions::StdExpansion::m_base.

{
"BasisType is not a boundary interior form");
"BasisType is not a boundary interior form");
"BasisType is not a boundary interior form");
ASSERTL1((localVertexId>=0)&&(localVertexId<8),
"local vertex id must be between 0 and 7");
int p = 0;
int q = 0;
int r = 0;
// Retrieve the number of modes in each dimension.
int nummodes [3] = {m_base[0]->GetNumModes(),
m_base[1]->GetNumModes(),
m_base[2]->GetNumModes()};
if(useCoeffPacking == true) // follow packing of coefficients i.e q,r,p
{
if(localVertexId > 3)
{
{
r = nummodes[2]-1;
}
else
{
r = 1;
}
}
switch(localVertexId % 4)
{
case 0:
break;
case 1:
{
{
p = nummodes[0]-1;
}
else
{
p = 1;
}
}
break;
case 2:
{
{
q = nummodes[1]-1;
}
else
{
q = 1;
}
}
break;
case 3:
{
{
p = nummodes[0]-1;
q = nummodes[1]-1;
}
else
{
p = 1;
q = 1;
}
}
break;
}
}
else
{
// Right face (vertices 1,2,5,6)
if( (localVertexId % 4) % 3 > 0 )
{
{
p = nummodes[0]-1;
}
else
{
p = 1;
}
}
// Back face (vertices 2,3,6,7)
if( localVertexId % 4 > 1 )
{
{
q = nummodes[1]-1;
}
else
{
q = 1;
}
}
// Top face (vertices 4,5,6,7)
if( localVertexId > 3)
{
{
r = nummodes[2]-1;
}
else
{
r = 1;
}
}
}
// Compute the local number.
return r*nummodes[0]*nummodes[1] + q*nummodes[0] + p;
}
void Nektar::StdRegions::StdHexExp::v_HelmholtzMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Reimplemented in Nektar::LocalRegions::HexExp.

Definition at line 2236 of file StdHexExp.cpp.

References Nektar::StdRegions::StdExpansion3D::v_HelmholtzMatrixOp_MatFree().

{
}
void Nektar::StdRegions::StdHexExp::v_IProductWRTBase ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

$ \begin{array}{rcl} I_{pqr} = (\phi_{pqr}, u)_{\delta} & = & \sum_{i=0}^{nq_0} \sum_{j=0}^{nq_1} \sum_{k=0}^{nq_2} \psi_{p}^{a}(\xi_{1i}) \psi_{q}^{a}(\xi_{2j}) \psi_{r}^{a}(\xi_{3k}) w_i w_j w_k u(\xi_{1,i} \xi_{2,j} \xi_{3,k}) J_{i,j,k}\\ & = & \sum_{i=0}^{nq_0} \psi_p^a(\xi_{1,i}) \sum_{j=0}^{nq_1} \psi_{q}^a(\xi_{2,j}) \sum_{k=0}^{nq_2} \psi_{r}^a u(\xi_{1i},\xi_{2j},\xi_{3k}) J_{i,j,k} \end{array} $
where $ \phi_{pqr} (\xi_1 , \xi_2 , \xi_3) = \psi_p^a( \xi_1) \psi_{q}^a(\xi_2) \psi_{r}^a(\xi_3) $
which can be implemented as
$f_{r} (\xi_{3k}) = \sum_{k=0}^{nq_3} \psi_{r}^a u(\xi_{1i},\xi_{2j}, \xi_{3k}) J_{i,j,k} = {\bf B_3 U} $
$ g_{q} (\xi_{3k}) = \sum_{j=0}^{nq_1} \psi_{q}^a(\xi_{2j}) f_{r}(\xi_{3k}) = {\bf B_2 F} $
$ (\phi_{pqr}, u)_{\delta} = \sum_{k=0}^{nq_0} \psi_{p}^a (\xi_{3k}) g_{q} (\xi_{3k}) = {\bf B_1 G} $

Parameters
inarray?
outarray?

Implements Nektar::StdRegions::StdExpansion.

Reimplemented in Nektar::LocalRegions::HexExp.

Definition at line 364 of file StdHexExp.cpp.

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

{
if(m_base[0]->Collocation() &&
m_base[1]->Collocation() &&
m_base[2]->Collocation())
{
MultiplyByQuadratureMetric(inarray,outarray);
}
else
{
}
}
void Nektar::StdRegions::StdHexExp::v_IProductWRTBase_MatOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Implementation of the local matrix inner product operation.

Definition at line 383 of file StdHexExp.cpp.

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

{
int nq = GetTotPoints();
StdMatrixKey iprodmatkey(eIProductWRTBase,DetShapeType(),*this);
DNekMatSharedPtr iprodmat = GetStdMatrix(iprodmatkey);
Blas::Dgemv('N',m_ncoeffs,nq,1.0,iprodmat->GetPtr().get(),
m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
}
void Nektar::StdRegions::StdHexExp::v_IProductWRTBase_SumFac ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Implementation of the sum-factorization inner product operation.

Reimplemented from Nektar::StdRegions::StdExpansion.

Reimplemented in Nektar::LocalRegions::HexExp.

Definition at line 397 of file StdHexExp.cpp.

References Nektar::StdRegions::StdExpansion3D::IProductWRTBase_SumFacKernel(), Nektar::StdRegions::StdExpansion::m_base, and Nektar::StdRegions::StdExpansion::MultiplyByQuadratureMetric().

Referenced by v_IProductWRTBase().

{
int nquad0 = m_base[0]->GetNumPoints();
int nquad1 = m_base[1]->GetNumPoints();
int nquad2 = m_base[2]->GetNumPoints();
int order0 = m_base[0]->GetNumModes();
int order1 = m_base[1]->GetNumModes();
Array<OneD, NekDouble> tmp(inarray.num_elements());
Array<OneD, NekDouble> wsp(nquad0*nquad1*(nquad2+order0) +
order0*order1*nquad2);
m_base[1]->GetBdata(),
m_base[2]->GetBdata(),
tmp,outarray,wsp,true,true,true);
}
void Nektar::StdRegions::StdHexExp::v_IProductWRTBase_SumFacKernel ( const Array< OneD, const NekDouble > &  base0,
const Array< OneD, const NekDouble > &  base1,
const Array< OneD, const NekDouble > &  base2,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
Array< OneD, NekDouble > &  wsp,
bool  doCheckCollDir0,
bool  doCheckCollDir1,
bool  doCheckCollDir2 
)
protectedvirtual

Implementation of the sum-factorisation inner product operation.

Todo:
Implement cases where only some directions are collocated.

Implements Nektar::StdRegions::StdExpansion3D.

Definition at line 424 of file StdHexExp.cpp.

References ASSERTL1, Nektar::StdRegions::StdExpansion::m_base, Nektar::StdRegions::StdExpansion::m_ncoeffs, and Vmath::Vcopy().

{
int nquad0 = m_base[0]->GetNumPoints();
int nquad1 = m_base[1]->GetNumPoints();
int nquad2 = m_base[2]->GetNumPoints();
int nmodes0 = m_base[0]->GetNumModes();
int nmodes1 = m_base[1]->GetNumModes();
int nmodes2 = m_base[2]->GetNumModes();
bool colldir0 = doCheckCollDir0?(m_base[0]->Collocation()):false;
bool colldir1 = doCheckCollDir1?(m_base[1]->Collocation()):false;
bool colldir2 = doCheckCollDir2?(m_base[2]->Collocation()):false;
if(colldir0 && colldir1 && colldir2)
{
Vmath::Vcopy(m_ncoeffs,inarray.get(),1,outarray.get(),1);
}
else
{
ASSERTL1(wsp.num_elements() >= nmodes0*nquad2*(nquad1+nmodes1),
"Insufficient workspace size");
Array<OneD, NekDouble> tmp0 = wsp;
Array<OneD, NekDouble> tmp1 = wsp + nmodes0*nquad1*nquad2;
if(colldir0)
{
// reshuffle data for next operation.
for(int n = 0; n < nmodes0; ++n)
{
Vmath::Vcopy(nquad1*nquad2,inarray.get()+n,nquad0,
tmp0.get()+nquad1*nquad2*n,1);
}
}
else
{
Blas::Dgemm('T', 'N', nquad1*nquad2, nmodes0, nquad0,
1.0, inarray.get(), nquad0,
base0.get(), nquad0,
0.0, tmp0.get(), nquad1*nquad2);
}
if(colldir1)
{
// reshuffle data for next operation.
for(int n = 0; n < nmodes1; ++n)
{
Vmath::Vcopy(nquad2*nmodes0,tmp0.get()+n,nquad1,
tmp1.get()+nquad2*nmodes0*n,1);
}
}
else
{
Blas::Dgemm('T', 'N', nquad2*nmodes0, nmodes1, nquad1,
1.0, tmp0.get(), nquad1,
base1.get(), nquad1,
0.0, tmp1.get(), nquad2*nmodes0);
}
if(colldir2)
{
// reshuffle data for next operation.
for(int n = 0; n < nmodes2; ++n)
{
Vmath::Vcopy(nmodes0*nmodes1,tmp1.get()+n,nquad2,
outarray.get()+nmodes0*nmodes1*n,1);
}
}
else
{
Blas::Dgemm('T', 'N', nmodes0*nmodes1, nmodes2, nquad2,
1.0, tmp1.get(), nquad2,
base2.get(), nquad2,
0.0, outarray.get(), nmodes0*nmodes1);
}
}
}
void Nektar::StdRegions::StdHexExp::v_IProductWRTDerivBase ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Reimplemented in Nektar::LocalRegions::HexExp.

Definition at line 511 of file StdHexExp.cpp.

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

{
}
void Nektar::StdRegions::StdHexExp::v_IProductWRTDerivBase_MatOp ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Definition at line 519 of file StdHexExp.cpp.

References ASSERTL0, Nektar::StdRegions::StdExpansion::DetShapeType(), Nektar::StdRegions::eIProductWRTDerivBase0, Nektar::StdRegions::eIProductWRTDerivBase1, Nektar::StdRegions::eIProductWRTDerivBase2, Nektar::StdRegions::StdExpansion::GetStdMatrix(), Nektar::StdRegions::StdExpansion::GetTotPoints(), and Nektar::StdRegions::StdExpansion::m_ncoeffs.

{
ASSERTL0((dir==0)||(dir==1)||(dir==2),"input dir is out of range");
int nq = GetTotPoints();
MatrixType mtype;
switch (dir)
{
case 0:
break;
case 1:
break;
case 2:
break;
}
StdMatrixKey iprodmatkey(mtype,DetShapeType(),*this);
DNekMatSharedPtr iprodmat = GetStdMatrix(iprodmatkey);
Blas::Dgemv('N',m_ncoeffs,nq,1.0,iprodmat->GetPtr().get(),
m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
}
void Nektar::StdRegions::StdHexExp::v_IProductWRTDerivBase_SumFac ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 549 of file StdHexExp.cpp.

References ASSERTL0, Nektar::StdRegions::StdExpansion3D::IProductWRTBase_SumFacKernel(), Nektar::StdRegions::StdExpansion::m_base, and Nektar::StdRegions::StdExpansion::MultiplyByQuadratureMetric().

{
ASSERTL0((dir==0)||(dir==1)||(dir==2),"input dir is out of range");
int nquad1 = m_base[1]->GetNumPoints();
int nquad2 = m_base[2]->GetNumPoints();
int order0 = m_base[0]->GetNumModes();
int order1 = m_base[1]->GetNumModes();
// If outarray > inarray then no need for temporary storage.
Array<OneD, NekDouble> tmp = outarray;
if (outarray.num_elements() < inarray.num_elements())
{
tmp = Array<OneD, NekDouble>(inarray.num_elements());
}
// Need workspace for sumfackernel though
Array<OneD, NekDouble> wsp(order0*nquad2*(nquad1+order1));
// multiply by integration constants
// perform sum-factorisation
switch (dir)
{
case 0:
m_base[1]->GetBdata(),
m_base[2]->GetBdata(),
tmp,outarray,wsp,
false,true,true);
break;
case 1:
m_base[1]->GetDbdata(),
m_base[2]->GetBdata(),
tmp,outarray,wsp,
true,false,true);
break;
case 2:
m_base[1]->GetBdata(),
m_base[2]->GetDbdata(),
tmp,outarray,wsp,
true,true,false);
break;
}
}
bool Nektar::StdRegions::StdHexExp::v_IsBoundaryInteriorExpansion ( )
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 83 of file StdHexExp.cpp.

References Nektar::LibUtilities::eModified_A, Nektar::StdRegions::StdExpansion::GetBasisType(), and Nektar::StdRegions::StdExpansion::m_base.

void Nektar::StdRegions::StdHexExp::v_LaplacianMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Reimplemented in Nektar::LocalRegions::HexExp.

Definition at line 2208 of file StdHexExp.cpp.

References Nektar::StdRegions::StdExpansion3D::v_LaplacianMatrixOp_MatFree().

{
}
void Nektar::StdRegions::StdHexExp::v_LaplacianMatrixOp ( const int  k1,
const int  k2,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Reimplemented in Nektar::LocalRegions::HexExp.

Definition at line 2217 of file StdHexExp.cpp.

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

{
mkey);
}
void Nektar::StdRegions::StdHexExp::v_LocCoordToLocCollapsed ( const Array< OneD, const NekDouble > &  xi,
Array< OneD, NekDouble > &  eta 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 600 of file StdHexExp.cpp.

{
eta[0] = xi[0];
eta[1] = xi[1];
eta[2] = xi[2];
}
void Nektar::StdRegions::StdHexExp::v_MassMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Reimplemented in Nektar::LocalRegions::HexExp.

Definition at line 2199 of file StdHexExp.cpp.

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

{
StdExpansion::MassMatrixOp_MatFree(inarray,outarray,mkey);
}
void Nektar::StdRegions::StdHexExp::v_MultiplyByStdQuadratureMetric ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 2268 of file StdHexExp.cpp.

References Nektar::StdRegions::StdExpansion::m_base, Vmath::Smul(), and Vmath::Vmul().

{
int i;
int nquad0 = m_base[0]->GetNumPoints();
int nquad1 = m_base[1]->GetNumPoints();
int nquad2 = m_base[2]->GetNumPoints();
int nq01 = nquad0*nquad1;
int nq12 = nquad1*nquad2;
const Array<OneD, const NekDouble>& w0 = m_base[0]->GetW();
const Array<OneD, const NekDouble>& w1 = m_base[1]->GetW();
const Array<OneD, const NekDouble>& w2 = m_base[2]->GetW();
for(i = 0; i < nq12; ++i)
{
Vmath::Vmul(nquad0, inarray.get()+i*nquad0, 1,
w0.get(), 1, outarray.get()+i*nquad0,1);
}
for(i = 0; i < nq12; ++i)
{
Vmath::Smul(nquad0, w1[i%nquad1], outarray.get()+i*nquad0, 1,
outarray.get()+i*nquad0, 1);
}
for(i = 0; i < nquad2; ++i)
{
Vmath::Smul(nq01, w2[i], outarray.get()+i*nq01, 1,
outarray.get()+i*nq01, 1);
}
}
int Nektar::StdRegions::StdHexExp::v_NumBndryCoeffs ( ) const
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 686 of file StdHexExp.cpp.

References ASSERTL1, Nektar::LibUtilities::eGLL_Lagrange, Nektar::LibUtilities::eModified_A, Nektar::StdRegions::StdExpansion::GetBasisType(), and Nektar::StdRegions::StdExpansion::m_base.

{
"BasisType is not a boundary interior form");
"BasisType is not a boundary interior form");
"BasisType is not a boundary interior form");
int nmodes0 = m_base[0]->GetNumModes();
int nmodes1 = m_base[1]->GetNumModes();
int nmodes2 = m_base[2]->GetNumModes();
return ( 2*( nmodes0*nmodes1 + nmodes0*nmodes2
+ nmodes1*nmodes2)
- 4*( nmodes0 + nmodes1 + nmodes2 ) + 8 );
}
int Nektar::StdRegions::StdHexExp::v_NumDGBndryCoeffs ( ) const
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 707 of file StdHexExp.cpp.

References ASSERTL1, Nektar::LibUtilities::eGLL_Lagrange, Nektar::LibUtilities::eModified_A, Nektar::StdRegions::StdExpansion::GetBasisType(), and Nektar::StdRegions::StdExpansion::m_base.

{
"BasisType is not a boundary interior form");
"BasisType is not a boundary interior form");
"BasisType is not a boundary interior form");
int nmodes0 = m_base[0]->GetNumModes();
int nmodes1 = m_base[1]->GetNumModes();
int nmodes2 = m_base[2]->GetNumModes();
return 2*( nmodes0*nmodes1 + nmodes0*nmodes2
+ nmodes1*nmodes2 );
}
void Nektar::StdRegions::StdHexExp::v_PhysDeriv ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d0,
Array< OneD, NekDouble > &  out_d1,
Array< OneD, NekDouble > &  out_d2 
)
protectedvirtual

Differentiation Methods ////////////////////////////.

For Hexahedral region can use the PhysTensorDeriv function defined under StdExpansion. Following tenserproduct:

Reimplemented from Nektar::StdRegions::StdExpansion.

Reimplemented in Nektar::LocalRegions::HexExp.

Definition at line 98 of file StdHexExp.cpp.

References Nektar::StdRegions::StdExpansion3D::PhysTensorDeriv().

Referenced by v_StdPhysDeriv().

{
PhysTensorDeriv(inarray, out_d0, out_d1, out_d2);
}
void Nektar::StdRegions::StdHexExp::v_PhysDeriv ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual
Parameters
dirDirection in which to compute derivative. Valid values are 0, 1, 2.
inarrayInput array.
outarrayOutput array.

Reimplemented from Nektar::StdRegions::StdExpansion.

Reimplemented in Nektar::LocalRegions::HexExp.

Definition at line 113 of file StdHexExp.cpp.

References ASSERTL1, Nektar::NullNekDouble1DArray, and Nektar::StdRegions::StdExpansion::PhysDeriv().

{
switch(dir)
{
case 0:
{
PhysDeriv(inarray, outarray, NullNekDouble1DArray,
}
break;
case 1:
{
PhysDeriv(inarray, NullNekDouble1DArray, outarray,
}
break;
case 2:
{
}
break;
default:
{
ASSERTL1(false,"input dir is out of range");
}
break;
}
}
void Nektar::StdRegions::StdHexExp::v_StdPhysDeriv ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d0,
Array< OneD, NekDouble > &  out_d1,
Array< OneD, NekDouble > &  out_d2 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 145 of file StdHexExp.cpp.

References v_PhysDeriv().

{
StdHexExp::v_PhysDeriv(inarray, out_d0, out_d1, out_d2);
}
void Nektar::StdRegions::StdHexExp::v_StdPhysDeriv ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 155 of file StdHexExp.cpp.

References v_PhysDeriv().

{
StdHexExp::v_PhysDeriv(dir, inarray, outarray);
}
void Nektar::StdRegions::StdHexExp::v_SVVLaplacianFilter ( Array< OneD, NekDouble > &  array,
const StdMatrixKey mkey 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 2301 of file StdHexExp.cpp.

References Nektar::StdRegions::StdExpansion::BwdTrans(), Nektar::StdRegions::eFactorSVVCutoffRatio, Nektar::StdRegions::eFactorSVVDiffCoeff, Nektar::LibUtilities::eOrtho_A, Nektar::StdRegions::StdExpansion::FwdTrans(), Nektar::StdRegions::StdMatrixKey::GetConstFactor(), Nektar::StdRegions::StdExpansion::GetNcoeffs(), Nektar::StdRegions::StdExpansion::GetPointsType(), and Nektar::StdRegions::StdExpansion::m_base.

{
// Generate an orthonogal expansion
int qa = m_base[0]->GetNumPoints();
int qb = m_base[1]->GetNumPoints();
int qc = m_base[2]->GetNumPoints();
int nmodes_a = m_base[0]->GetNumModes();
int nmodes_b = m_base[1]->GetNumModes();
int nmodes_c = m_base[2]->GetNumModes();
// Declare orthogonal basis.
LibUtilities::PointsKey pa(qa,m_base[0]->GetPointsType());
LibUtilities::PointsKey pb(qb,m_base[1]->GetPointsType());
LibUtilities::PointsKey pc(qc,m_base[2]->GetPointsType());
LibUtilities::BasisKey Ba(LibUtilities::eOrtho_A,nmodes_a,pa);
LibUtilities::BasisKey Bb(LibUtilities::eOrtho_A,nmodes_b,pb);
LibUtilities::BasisKey Bc(LibUtilities::eOrtho_A,nmodes_c,pc);
StdHexExp OrthoExp(Ba,Bb,Bc);
Array<OneD, NekDouble> orthocoeffs(OrthoExp.GetNcoeffs());
int i,j,k;
int cutoff = (int) (mkey.GetConstFactor(eFactorSVVCutoffRatio)*min(nmodes_a,nmodes_b));
NekDouble SvvDiffCoeff = mkey.GetConstFactor(eFactorSVVDiffCoeff);
// project onto modal space.
OrthoExp.FwdTrans(array,orthocoeffs);
// Filter just trilinear space
int nmodes = max(nmodes_a,nmodes_b);
nmodes = max(nmodes,nmodes_c);
Array<OneD, NekDouble> fac(nmodes,1.0);
for(j = cutoff; j < nmodes; ++j)
{
fac[j] = fabs((j-nmodes)/((NekDouble) (j-cutoff+1.0)));
fac[j] *= fac[j]; //added this line to conform with equation
}
for(i = 0; i < nmodes_a; ++i)
{
for(j = 0; j < nmodes_b; ++j)
{
for(k = 0; k < nmodes_c; ++k)
{
if((i >= cutoff)||(j >= cutoff)||(k >= cutoff))
{
orthocoeffs[i*nmodes_a*nmodes_b + j*nmodes_c + k] *= (1.0+SvvDiffCoeff*exp(-fac[i]+fac[j]+fac[k]));
}
}
}
}
// backward transform to physical space
OrthoExp.BwdTrans(orthocoeffs,array);
}
void Nektar::StdRegions::StdHexExp::v_WeakDerivMatrixOp ( const int  i,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdMatrixKey mkey 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Reimplemented in Nektar::LocalRegions::HexExp.

Definition at line 2227 of file StdHexExp.cpp.

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

{
mkey);
}