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

#include <PrismExp.h>

Inheritance diagram for Nektar::LocalRegions::PrismExp:
Inheritance graph
[legend]
Collaboration diagram for Nektar::LocalRegions::PrismExp:
Collaboration graph
[legend]

Public Member Functions

 PrismExp (const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc, const SpatialDomains::PrismGeomSharedPtr &geom)
 Constructor using BasisKey class for quadrature points and order definition. More...
 
 PrismExp (const PrismExp &T)
 
 ~PrismExp ()
 
- Public Member Functions inherited from Nektar::StdRegions::StdPrismExp
 StdPrismExp ()
 
 StdPrismExp (const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc)
 
 StdPrismExp (const LibUtilities::BasisKey &Ba, const LibUtilities::BasisKey &Bb, const LibUtilities::BasisKey &Bc, NekDouble *coeffs, NekDouble *phys)
 
 StdPrismExp (const StdPrismExp &T)
 
 ~StdPrismExp ()
 
- 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. More...
 
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. 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 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 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)
 
- Public Member Functions inherited from Nektar::LocalRegions::Expansion3D
 Expansion3D (SpatialDomains::Geometry3DSharedPtr pGeom)
 
virtual ~Expansion3D ()
 
void SetFaceExp (const int face, Expansion2DSharedPtr &f)
 
Expansion2DSharedPtr GetFaceExp (const int face)
 
void SetTraceToGeomOrientation (Array< OneD, NekDouble > &inout)
 Align trace orientation with the geometry orientation. More...
 
void SetFaceToGeomOrientation (const int face, Array< OneD, NekDouble > &inout)
 Align face orientation with the geometry orientation. More...
 
void AddHDGHelmholtzFaceTerms (const NekDouble tau, const int edge, Array< OneD, NekDouble > &facePhys, const StdRegions::VarCoeffMap &dirForcing, Array< OneD, NekDouble > &outarray)
 
void AddNormTraceInt (const int dir, Array< OneD, ExpansionSharedPtr > &FaceExp, Array< OneD, Array< OneD, NekDouble > > &faceCoeffs, Array< OneD, NekDouble > &outarray)
 
void AddNormTraceInt (const int dir, Array< OneD, const NekDouble > &inarray, Array< OneD, ExpansionSharedPtr > &FaceExp, Array< OneD, NekDouble > &outarray, const StdRegions::VarCoeffMap &varcoeffs)
 
void AddFaceBoundaryInt (const int face, ExpansionSharedPtr &FaceExp, Array< OneD, NekDouble > &facePhys, Array< OneD, NekDouble > &outarray, const StdRegions::VarCoeffMap &varcoeffs=StdRegions::NullVarCoeffMap)
 
SpatialDomains::Geometry3DSharedPtr GetGeom3D () const
 
void ReOrientFacePhysMap (const int nvert, const StdRegions::Orientation orient, const int nq0, const int nq1, Array< OneD, int > &idmap)
 
void v_NormVectorIProductWRTBase (const Array< OneD, const Array< OneD, NekDouble > > &Fvec, Array< OneD, NekDouble > &outarray)
 
- Public Member Functions inherited from Nektar::LocalRegions::Expansion
 Expansion (SpatialDomains::GeometrySharedPtr pGeom)
 
 Expansion (const Expansion &pSrc)
 
virtual ~Expansion ()
 
DNekScalMatSharedPtr GetLocMatrix (const LocalRegions::MatrixKey &mkey)
 
DNekScalMatSharedPtr GetLocMatrix (const StdRegions::MatrixType mtype, const StdRegions::ConstFactorMap &factors=StdRegions::NullConstFactorMap, const StdRegions::VarCoeffMap &varcoeffs=StdRegions::NullVarCoeffMap)
 
SpatialDomains::GeometrySharedPtr GetGeom () const
 
void Reset ()
 
virtual const
SpatialDomains::GeomFactorsSharedPtr
v_GetMetricInfo () const
 
DNekMatSharedPtr BuildTransformationMatrix (const DNekScalMatSharedPtr &r_bnd, const StdRegions::MatrixType matrixType)
 
DNekMatSharedPtr BuildVertexMatrix (const DNekScalMatSharedPtr &r_bnd)
 
void AddEdgeNormBoundaryInt (const int edge, const boost::shared_ptr< Expansion > &EdgeExp, const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
 
void AddEdgeNormBoundaryInt (const int edge, const boost::shared_ptr< Expansion > &EdgeExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
 
void AddFaceNormBoundaryInt (const int face, const boost::shared_ptr< Expansion > &FaceExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
 
void DGDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, ExpansionSharedPtr > &EdgeExp, Array< OneD, Array< OneD, NekDouble > > &coeffs, Array< OneD, NekDouble > &outarray)
 

Protected Member Functions

virtual NekDouble v_Integral (const Array< OneD, const NekDouble > &inarray)
 Integrate the physical point list inarray over prismatic region and return the value. More...
 
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)
 Calculate the derivative of the physical points. More...
 
virtual void v_FwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 Forward transform from physical quadrature space stored in inarray and evaluate the expansion coefficients and store in (this)->m_coeffs. More...
 
virtual void v_IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 Calculate the inner product of inarray with respect to the basis B=base0*base1*base2 and put into outarray: More...
 
virtual void v_IProductWRTBase_SumFac (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
 
void v_IProductWRTDerivBase (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 Calculates the inner product $ I_{pqr} = (u, \partial_{x_i} \phi_{pqr}) $. More...
 
void v_IProductWRTDerivBase_SumFac (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_GetCoord (const Array< OneD, const NekDouble > &Lcoords, Array< OneD, NekDouble > &coords)
 Get the coordinates #coords at the local coordinates #Lcoords. More...
 
virtual void v_GetCoords (Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
 
virtual NekDouble v_StdPhysEvaluate (const Array< OneD, const NekDouble > &Lcoord, const Array< OneD, const NekDouble > &physvals)
 
virtual NekDouble v_PhysEvaluate (const Array< OneD, const NekDouble > &coord, const Array< OneD, const NekDouble > &physvals)
 This function evaluates the expansion at a single (arbitrary) point of the domain. More...
 
virtual
StdRegions::StdExpansionSharedPtr 
v_GetStdExp (void) const
 
virtual int v_GetCoordim ()
 
virtual void v_ExtractDataToCoeffs (const NekDouble *data, const std::vector< unsigned int > &nummodes, const int mode_offset, NekDouble *coeffs)
 Unpack data from input file assuming it comes from the same expansion type. More...
 
virtual void v_GetFacePhysMap (const int face, Array< OneD, int > &outarray)
 
void v_ComputeFaceNormal (const int face)
 Get the normals along specficied face Get the face normals interplated to a points0 x points 0 type distribution. More...
 
virtual void v_MassMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
 
virtual void v_LaplacianMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
 
virtual void v_LaplacianMatrixOp (const int k1, const int k2, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
 
virtual void v_HelmholtzMatrixOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
 
virtual void v_GeneralMatrixOp_MatOp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
 
virtual void v_SVVLaplacianFilter (Array< OneD, NekDouble > &array, const StdRegions::StdMatrixKey &mkey)
 
virtual DNekMatSharedPtr v_GenMatrix (const StdRegions::StdMatrixKey &mkey)
 
virtual DNekMatSharedPtr v_CreateStdMatrix (const StdRegions::StdMatrixKey &mkey)
 
virtual DNekScalMatSharedPtr v_GetLocMatrix (const MatrixKey &mkey)
 
virtual DNekScalBlkMatSharedPtr v_GetLocStaticCondMatrix (const MatrixKey &mkey)
 
void v_DropLocStaticCondMatrix (const MatrixKey &mkey)
 
DNekScalMatSharedPtr CreateMatrix (const MatrixKey &mkey)
 
DNekScalBlkMatSharedPtr CreateStaticCondMatrix (const MatrixKey &mkey)
 
virtual void v_GetSimplexEquiSpacedConnectivity (Array< OneD, int > &conn, bool standard=true)
 
- Protected Member Functions inherited from Nektar::StdRegions::StdPrismExp
virtual void v_PhysDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 Calculate the derivative of the physical points in a given direction. More...
 
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_IProductWRTBase_MatOp (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_MatOp (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
 Return Shape of region, using ShapeType enum list; i.e. prism. More...
 
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_GetFaceNumPoints (const int i) const
 
virtual LibUtilities::PointsKey v_GetFacePointsKey (const int i, const int j) const
 
virtual const
LibUtilities::BasisKey 
v_DetFaceBasisKey (const int i, const int k) const
 
virtual int v_GetFaceIntNcoeffs (const int i) const
 
virtual int v_GetTotalFaceIntNcoeffs () const
 
virtual int v_CalcNumberOfCoefficients (const std::vector< unsigned int > &nummodes, int &modes_offset)
 
virtual LibUtilities::BasisType v_GetEdgeBasisType (const int i) const
 
virtual bool v_IsBoundaryInteriorExpansion ()
 
virtual void v_GetFaceToElementMap (const int fid, const Orientation faceOrient, Array< OneD, unsigned int > &maparray, Array< OneD, int > &signarray, int P=-1, int Q=-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 void v_MultiplyByStdQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_ReduceOrderCoeffs (int numMin, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
- Protected Member Functions inherited from Nektar::StdRegions::StdExpansion3D
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 void v_NegateFaceNormal (const int face)
 
virtual bool v_FaceNormalNegated (const int face)
 
virtual int v_GetTraceNcoeffs (const int i) const
 
- Protected Member Functions inherited from Nektar::StdRegions::StdExpansion
DNekMatSharedPtr CreateStdMatrix (const StdMatrixKey &mkey)
 
DNekBlkMatSharedPtr CreateStdStaticCondMatrix (const StdMatrixKey &mkey)
 Create the static condensation of a matrix when using a boundary interior decomposition. More...
 
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)
 
- Protected Member Functions inherited from Nektar::LocalRegions::Expansion3D
virtual void v_DGDeriv (const int dir, const Array< OneD, const NekDouble > &incoeffs, Array< OneD, ExpansionSharedPtr > &FaceExp, Array< OneD, Array< OneD, NekDouble > > &faceCoeffs, Array< OneD, NekDouble > &out_d)
 Evaluate coefficients of weak deriviative in the direction dir given the input coefficicents incoeffs and the imposed boundary values in EdgeExp (which will have its phys space updated). More...
 
virtual void v_AddFaceNormBoundaryInt (const int face, const ExpansionSharedPtr &FaceExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
 
virtual void v_AddRobinMassMatrix (const int face, const Array< OneD, const NekDouble > &primCoeffs, DNekMatSharedPtr &inoutmat)
 
virtual StdRegions::Orientation v_GetForient (int face)
 
virtual void v_GetTracePhysVals (const int face, const StdRegions::StdExpansionSharedPtr &FaceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient)
 Returns the physical values at the quadrature points of a face Wrapper function to v_GetFacePhysVals. More...
 
virtual void v_GetFacePhysVals (const int face, const StdRegions::StdExpansionSharedPtr &FaceExp, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, StdRegions::Orientation orient)
 
virtual Array< OneD, unsigned int > v_GetEdgeInverseBoundaryMap (int eid)
 
virtual Array< OneD, unsigned int > v_GetFaceInverseBoundaryMap (int fid, StdRegions::Orientation faceOrient=StdRegions::eNoOrientation)
 
virtual DNekMatSharedPtr v_BuildTransformationMatrix (const DNekScalMatSharedPtr &r_bnd, const StdRegions::MatrixType matrixType)
 
virtual DNekMatSharedPtr v_BuildInverseTransformationMatrix (const DNekScalMatSharedPtr &m_transformationmatrix)
 Build inverse and inverse transposed transformation matrix: $\mathbf{R^{-1}}$ and $\mathbf{R^{-T}}$. More...
 
virtual DNekMatSharedPtr v_BuildVertexMatrix (const DNekScalMatSharedPtr &r_bnd)
 
void ReOrientTriFacePhysMap (const StdRegions::Orientation orient, const int nq0, const int nq1, Array< OneD, int > &idmap)
 
void ReOrientQuadFacePhysMap (const StdRegions::Orientation orient, const int nq0, const int nq1, Array< OneD, int > &idmap)
 
- Protected Member Functions inherited from Nektar::LocalRegions::Expansion
void ComputeLaplacianMetric ()
 
void ComputeQuadratureMetric ()
 
virtual void v_MultiplyByQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_ComputeLaplacianMetric ()
 
virtual void v_AddEdgeNormBoundaryInt (const int edge, const boost::shared_ptr< Expansion > &EdgeExp, const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
 
virtual void v_AddEdgeNormBoundaryInt (const int edge, const boost::shared_ptr< Expansion > &EdgeExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
 
virtual void v_AddFaceNormBoundaryInt (const int face, const boost::shared_ptr< Expansion > &FaceExp, const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
 

Private Member Functions

virtual void v_LaplacianMatrixOp_MatFree_Kernel (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, Array< OneD, NekDouble > &wsp)
 Calculate the Laplacian multiplication in a matrix-free manner. More...
 

Private Attributes

LibUtilities::NekManager
< MatrixKey, DNekScalMat,
MatrixKey::opLess
m_matrixManager
 
LibUtilities::NekManager
< MatrixKey, DNekScalBlkMat,
MatrixKey::opLess
m_staticCondMatrixManager
 

Additional Inherited Members

- Protected Attributes inherited from Nektar::StdRegions::StdExpansion3D
std::map< int, NormalVectorm_faceNormals
 
std::map< int, bool > m_negatedNormals
 
- Protected Attributes inherited from Nektar::StdRegions::StdExpansion
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
 
- Protected Attributes inherited from Nektar::LocalRegions::Expansion
SpatialDomains::GeometrySharedPtr m_geom
 
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
 
MetricMap m_metrics
 

Detailed Description

Definition at line 50 of file PrismExp.h.

Constructor & Destructor Documentation

Nektar::LocalRegions::PrismExp::PrismExp ( const LibUtilities::BasisKey Ba,
const LibUtilities::BasisKey Bb,
const LibUtilities::BasisKey Bc,
const SpatialDomains::PrismGeomSharedPtr geom 
)

Constructor using BasisKey class for quadrature points and order definition.

Definition at line 47 of file PrismExp.cpp.

50  :
52  Ba.GetNumModes(), Bb.GetNumModes(), Bc.GetNumModes()),
53  3, Ba, Bb, Bc),
55  Ba.GetNumModes(), Bb.GetNumModes(), Bc.GetNumModes()),
56  Ba, Bb, Bc),
57  StdPrismExp (Ba, Bb, Bc),
58  Expansion (geom),
59  Expansion3D (geom),
61  boost::bind(&PrismExp::CreateMatrix, this, _1),
62  std::string("PrismExpMatrix")),
64  boost::bind(&PrismExp::CreateStaticCondMatrix, this, _1),
65  std::string("PrismExpStaticCondMatrix"))
66  {
67  }
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: PrismExp.h:206
int getNumberOfCoefficients(int Na, int Nb, int Nc)
Definition: ShapeType.hpp:286
DNekScalMatSharedPtr CreateMatrix(const MatrixKey &mkey)
Definition: PrismExp.cpp:1095
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: PrismExp.h:208
Expansion(SpatialDomains::GeometrySharedPtr pGeom)
Definition: Expansion.cpp:46
StdExpansion()
Default Constructor.
Expansion3D(SpatialDomains::Geometry3DSharedPtr pGeom)
Definition: Expansion3D.h:63
DNekScalBlkMatSharedPtr CreateStaticCondMatrix(const MatrixKey &mkey)
Definition: PrismExp.cpp:1412
Nektar::LocalRegions::PrismExp::PrismExp ( const PrismExp T)

Definition at line 69 of file PrismExp.cpp.

69  :
70  StdExpansion(T),
71  StdExpansion3D(T),
72  StdRegions::StdPrismExp(T),
73  Expansion(T),
74  Expansion3D(T),
75  m_matrixManager(T.m_matrixManager),
76  m_staticCondMatrixManager(T.m_staticCondMatrixManager)
77  {
78  }
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: PrismExp.h:206
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: PrismExp.h:208
Expansion(SpatialDomains::GeometrySharedPtr pGeom)
Definition: Expansion.cpp:46
StdExpansion()
Default Constructor.
Expansion3D(SpatialDomains::Geometry3DSharedPtr pGeom)
Definition: Expansion3D.h:63
Nektar::LocalRegions::PrismExp::~PrismExp ( )

Definition at line 80 of file PrismExp.cpp.

81  {
82  }

Member Function Documentation

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

Definition at line 1095 of file PrismExp.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL2, Nektar::LocalRegions::Expansion::BuildTransformationMatrix(), Nektar::LocalRegions::Expansion::BuildVertexMatrix(), Nektar::StdRegions::StdMatrixKey::ConstFactorExists(), Nektar::StdRegions::StdExpansion::DetShapeType(), Nektar::SpatialDomains::eDeformed, Nektar::StdRegions::eFactorLambda, Nektar::StdRegions::eFactorSVVCutoffRatio, Nektar::StdRegions::eHelmholtz, Nektar::StdRegions::eHybridDGHelmBndLam, Nektar::StdRegions::eHybridDGHelmholtz, Nektar::StdRegions::eHybridDGLamToQ0, Nektar::StdRegions::eHybridDGLamToQ1, Nektar::StdRegions::eHybridDGLamToU, Nektar::StdRegions::eInvHybridDGHelmholtz, Nektar::StdRegions::eInvLaplacianWithUnityMean, Nektar::StdRegions::eInvMass, Nektar::StdRegions::eIProductWRTBase, Nektar::StdRegions::eLaplacian, Nektar::StdRegions::eLaplacian00, Nektar::StdRegions::eLaplacian01, Nektar::StdRegions::eLaplacian02, Nektar::StdRegions::eLaplacian11, Nektar::StdRegions::eLaplacian12, Nektar::StdRegions::eLaplacian22, Nektar::StdRegions::eMass, Nektar::SpatialDomains::eNoGeomType, Nektar::StdRegions::ePreconLinearSpace, Nektar::StdRegions::ePreconLinearSpaceMass, Nektar::StdRegions::ePreconR, Nektar::StdRegions::ePreconRMass, Nektar::StdRegions::ePreconRT, Nektar::StdRegions::ePreconRTMass, Nektar::StdRegions::eWeakDeriv0, Nektar::StdRegions::eWeakDeriv1, Nektar::StdRegions::eWeakDeriv2, Nektar::StdRegions::StdExpansion::GenMatrix(), Nektar::StdRegions::StdMatrixKey::GetConstFactor(), Nektar::StdRegions::StdMatrixKey::GetConstFactors(), Nektar::StdRegions::StdExpansion::GetLocStaticCondMatrix(), Nektar::StdRegions::StdMatrixKey::GetMatrixType(), Nektar::StdRegions::StdMatrixKey::GetNVarCoeff(), Nektar::StdRegions::StdExpansion::GetPointsKeys(), Nektar::StdRegions::StdMatrixKey::GetShapeType(), Nektar::StdRegions::StdExpansion::GetStdMatrix(), Nektar::StdRegions::StdMatrixKey::GetVarCoeffs(), m_matrixManager, Nektar::LocalRegions::Expansion::m_metricinfo, and Nektar::Transpose().

1096  {
1097  DNekScalMatSharedPtr returnval;
1099 
1101  "Geometric information is not set up");
1102 
1103  switch(mkey.GetMatrixType())
1104  {
1105  case StdRegions::eMass:
1106  {
1107  if(m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
1108  {
1109  NekDouble one = 1.0;
1110  DNekMatSharedPtr mat = GenMatrix(mkey);
1111  returnval = MemoryManager<DNekScalMat>::AllocateSharedPtr(one,mat);
1112  }
1113  else
1114  {
1115  NekDouble jac = (m_metricinfo->GetJac(ptsKeys))[0];
1116  DNekMatSharedPtr mat = GetStdMatrix(mkey);
1117  returnval = MemoryManager<DNekScalMat>::AllocateSharedPtr(jac,mat);
1118  }
1119  break;
1120  }
1121 
1122  case StdRegions::eInvMass:
1123  {
1124  if(m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
1125  {
1126  NekDouble one = 1.0;
1127  StdRegions::StdMatrixKey masskey(StdRegions::eMass,DetShapeType(),*this);
1128  DNekMatSharedPtr mat = GenMatrix(masskey);
1129  mat->Invert();
1130 
1131  returnval = MemoryManager<DNekScalMat>::AllocateSharedPtr(one,mat);
1132  }
1133  else
1134  {
1135  NekDouble fac = 1.0/(m_metricinfo->GetJac(ptsKeys))[0];
1136  DNekMatSharedPtr mat = GetStdMatrix(mkey);
1137  returnval = MemoryManager<DNekScalMat>::AllocateSharedPtr(fac,mat);
1138  }
1139  break;
1140  }
1141 
1145  {
1146  if(m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
1147  {
1148  NekDouble one = 1.0;
1149  DNekMatSharedPtr mat = GenMatrix(mkey);
1150 
1151  returnval = MemoryManager<DNekScalMat>::AllocateSharedPtr(one,mat);
1152  }
1153  else
1154  {
1155  NekDouble jac = (m_metricinfo->GetJac(ptsKeys))[0];
1156  Array<TwoD, const NekDouble> df =
1157  m_metricinfo->GetDerivFactors(ptsKeys);
1158  int dir = 0;
1159 
1160  switch(mkey.GetMatrixType())
1161  {
1163  dir = 0;
1164  break;
1166  dir = 1;
1167  break;
1169  dir = 2;
1170  break;
1171  default:
1172  break;
1173  }
1174 
1175  MatrixKey deriv0key(StdRegions::eWeakDeriv0,
1176  mkey.GetShapeType(), *this);
1177  MatrixKey deriv1key(StdRegions::eWeakDeriv1,
1178  mkey.GetShapeType(), *this);
1179  MatrixKey deriv2key(StdRegions::eWeakDeriv2,
1180  mkey.GetShapeType(), *this);
1181 
1182  DNekMat &deriv0 = *GetStdMatrix(deriv0key);
1183  DNekMat &deriv1 = *GetStdMatrix(deriv1key);
1184  DNekMat &deriv2 = *GetStdMatrix(deriv2key);
1185 
1186  int rows = deriv0.GetRows();
1187  int cols = deriv1.GetColumns();
1188 
1190  ::AllocateSharedPtr(rows,cols);
1191 
1192  (*WeakDeriv) = df[3*dir ][0]*deriv0
1193  + df[3*dir+1][0]*deriv1
1194  + df[3*dir+2][0]*deriv2;
1195 
1196  returnval = MemoryManager<DNekScalMat>
1197  ::AllocateSharedPtr(jac,WeakDeriv);
1198  }
1199  break;
1200  }
1201 
1203  {
1204  if (m_metricinfo->GetGtype() == SpatialDomains::eDeformed ||
1205  mkey.GetNVarCoeff() > 0 ||
1206  mkey.ConstFactorExists(
1208  {
1209  NekDouble one = 1.0;
1210  DNekMatSharedPtr mat = GenMatrix(mkey);
1211  returnval = MemoryManager<DNekScalMat>::AllocateSharedPtr(one,mat);
1212  }
1213  else
1214  {
1215  MatrixKey lap00key(StdRegions::eLaplacian00,
1216  mkey.GetShapeType(), *this);
1217  MatrixKey lap01key(StdRegions::eLaplacian01,
1218  mkey.GetShapeType(), *this);
1219  MatrixKey lap02key(StdRegions::eLaplacian02,
1220  mkey.GetShapeType(), *this);
1221  MatrixKey lap11key(StdRegions::eLaplacian11,
1222  mkey.GetShapeType(), *this);
1223  MatrixKey lap12key(StdRegions::eLaplacian12,
1224  mkey.GetShapeType(), *this);
1225  MatrixKey lap22key(StdRegions::eLaplacian22,
1226  mkey.GetShapeType(), *this);
1227 
1228  DNekMat &lap00 = *GetStdMatrix(lap00key);
1229  DNekMat &lap01 = *GetStdMatrix(lap01key);
1230  DNekMat &lap02 = *GetStdMatrix(lap02key);
1231  DNekMat &lap11 = *GetStdMatrix(lap11key);
1232  DNekMat &lap12 = *GetStdMatrix(lap12key);
1233  DNekMat &lap22 = *GetStdMatrix(lap22key);
1234 
1235  NekDouble jac = (m_metricinfo->GetJac(ptsKeys))[0];
1236  Array<TwoD, const NekDouble> gmat
1237  = m_metricinfo->GetGmat(ptsKeys);
1238 
1239  int rows = lap00.GetRows();
1240  int cols = lap00.GetColumns();
1241 
1243  ::AllocateSharedPtr(rows,cols);
1244 
1245  (*lap) = gmat[0][0]*lap00
1246  + gmat[4][0]*lap11
1247  + gmat[8][0]*lap22
1248  + gmat[3][0]*(lap01 + Transpose(lap01))
1249  + gmat[6][0]*(lap02 + Transpose(lap02))
1250  + gmat[7][0]*(lap12 + Transpose(lap12));
1251 
1252  returnval = MemoryManager<DNekScalMat>
1253  ::AllocateSharedPtr(jac,lap);
1254  }
1255  break;
1256  }
1257 
1259  {
1260  NekDouble factor = mkey.GetConstFactor(StdRegions::eFactorLambda);
1261  MatrixKey masskey(StdRegions::eMass,
1262  mkey.GetShapeType(), *this);
1263  DNekScalMat &MassMat = *(this->m_matrixManager[masskey]);
1264  MatrixKey lapkey(StdRegions::eLaplacian,
1265  mkey.GetShapeType(), *this, mkey.GetConstFactors(), mkey.GetVarCoeffs());
1266  DNekScalMat &LapMat = *(this->m_matrixManager[lapkey]);
1267 
1268  int rows = LapMat.GetRows();
1269  int cols = LapMat.GetColumns();
1270 
1272 
1273  NekDouble one = 1.0;
1274  (*helm) = LapMat + factor*MassMat;
1275 
1276  returnval = MemoryManager<DNekScalMat>::AllocateSharedPtr(one,helm);
1277  break;
1278  }
1285  {
1286  NekDouble one = 1.0;
1287 
1288  DNekMatSharedPtr mat = GenMatrix(mkey);
1289  returnval = MemoryManager<DNekScalMat>::AllocateSharedPtr(one,mat);
1290 
1291  break;
1292  }
1293 
1295  {
1296  NekDouble one = 1.0;
1297 
1298  MatrixKey hkey(StdRegions::eHybridDGHelmholtz, DetShapeType(), *this, mkey.GetConstFactors(), mkey.GetVarCoeffs());
1299 // StdRegions::StdMatrixKey hkey(StdRegions::eHybridDGHelmholtz,
1300 // DetExpansionType(),*this,
1301 // mkey.GetConstant(0),
1302 // mkey.GetConstant(1));
1303  DNekMatSharedPtr mat = GenMatrix(hkey);
1304 
1305  mat->Invert();
1306  returnval = MemoryManager<DNekScalMat>::AllocateSharedPtr(one,mat);
1307  break;
1308  }
1309 
1311  {
1312  if(m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
1313  {
1314  NekDouble one = 1.0;
1315  DNekMatSharedPtr mat = GenMatrix(mkey);
1316  returnval = MemoryManager<DNekScalMat>::AllocateSharedPtr(one,mat);
1317  }
1318  else
1319  {
1320  NekDouble jac = (m_metricinfo->GetJac(ptsKeys))[0];
1321  DNekMatSharedPtr mat = GetStdMatrix(mkey);
1322  returnval = MemoryManager<DNekScalMat>::AllocateSharedPtr(jac,mat);
1323  }
1324  break;
1325  }
1327  {
1328  NekDouble one = 1.0;
1329  MatrixKey helmkey(StdRegions::eHelmholtz, mkey.GetShapeType(), *this, mkey.GetConstFactors(), mkey.GetVarCoeffs());
1330  DNekScalBlkMatSharedPtr helmStatCond = GetLocStaticCondMatrix(helmkey);
1331  DNekScalMatSharedPtr A =helmStatCond->GetBlock(0,0);
1333 
1335  }
1336  break;
1338  {
1339  NekDouble one = 1.0;
1340  MatrixKey masskey(StdRegions::eMass, mkey.GetShapeType(), *this);
1341  DNekScalBlkMatSharedPtr massStatCond = GetLocStaticCondMatrix(masskey);
1342  DNekScalMatSharedPtr A =massStatCond->GetBlock(0,0);
1344 
1346  }
1347  break;
1348  case StdRegions::ePreconR:
1349  {
1350  NekDouble one = 1.0;
1351  MatrixKey helmkey(StdRegions::eHelmholtz, mkey.GetShapeType(), *this,mkey.GetConstFactors(), mkey.GetVarCoeffs());
1352  DNekScalBlkMatSharedPtr helmStatCond = GetLocStaticCondMatrix(helmkey);
1353  DNekScalMatSharedPtr A =helmStatCond->GetBlock(0,0);
1354 
1355  DNekScalMatSharedPtr Atmp;
1356  DNekMatSharedPtr R=BuildTransformationMatrix(A,mkey.GetMatrixType());
1357 
1359  }
1360  break;
1361  case StdRegions::ePreconRT:
1362  {
1363  NekDouble one = 1.0;
1364  MatrixKey helmkey(StdRegions::eHelmholtz, mkey.GetShapeType(), *this,mkey.GetConstFactors(), mkey.GetVarCoeffs());
1365  DNekScalBlkMatSharedPtr helmStatCond = GetLocStaticCondMatrix(helmkey);
1366  DNekScalMatSharedPtr A =helmStatCond->GetBlock(0,0);
1367 
1368  DNekScalMatSharedPtr Atmp;
1369  DNekMatSharedPtr R=BuildTransformationMatrix(A,mkey.GetMatrixType());
1370 
1372  }
1373  break;
1375  {
1376  NekDouble one = 1.0;
1377  MatrixKey masskey(StdRegions::eMass, mkey.GetShapeType(), *this);
1378  DNekScalBlkMatSharedPtr massStatCond = GetLocStaticCondMatrix(masskey);
1379  DNekScalMatSharedPtr A =massStatCond->GetBlock(0,0);
1380 
1381  DNekScalMatSharedPtr Atmp;
1382  DNekMatSharedPtr R=BuildTransformationMatrix(A,mkey.GetMatrixType());
1383 
1385  }
1386  break;
1388  {
1389  NekDouble one = 1.0;
1390  MatrixKey masskey(StdRegions::eMass, mkey.GetShapeType(), *this);
1391  DNekScalBlkMatSharedPtr massStatCond = GetLocStaticCondMatrix(masskey);
1392  DNekScalMatSharedPtr A =massStatCond->GetBlock(0,0);
1393 
1394  DNekScalMatSharedPtr Atmp;
1395  DNekMatSharedPtr R=BuildTransformationMatrix(A,mkey.GetMatrixType());
1396 
1398  }
1399  break;
1400  default:
1401  {
1402  NekDouble one = 1.0;
1403  DNekMatSharedPtr mat = GenMatrix(mkey);
1404 
1405  returnval = MemoryManager<DNekScalMat>::AllocateSharedPtr(one,mat);
1406  }
1407  }
1408 
1409  return returnval;
1410  }
const LibUtilities::PointsKeyVector GetPointsKeys() const
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
Definition: StdExpansion.h:470
DNekMatSharedPtr GenMatrix(const StdMatrixKey &mkey)
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: PrismExp.h:206
std::vector< PointsKey > PointsKeyVector
Definition: Points.h:220
DNekMatSharedPtr BuildTransformationMatrix(const DNekScalMatSharedPtr &r_bnd, const StdRegions::MatrixType matrixType)
Definition: Expansion.cpp:88
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
Definition: Expansion.h:126
DNekMatSharedPtr BuildVertexMatrix(const DNekScalMatSharedPtr &r_bnd)
Definition: Expansion.cpp:96
DNekScalBlkMatSharedPtr GetLocStaticCondMatrix(const LocalRegions::MatrixKey &mkey)
Definition: StdExpansion.h:747
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
DNekMatSharedPtr GetStdMatrix(const StdMatrixKey &mkey)
Definition: StdExpansion.h:700
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:74
NekMatrix< InnerMatrixType, BlockMatrixTag > Transpose(NekMatrix< InnerMatrixType, BlockMatrixTag > &rhs)
NekMatrix< NekDouble, StandardMatrixTag > DNekMat
Definition: NekTypeDefs.hpp:52
double NekDouble
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed t...
Definition: ErrorUtil.hpp:213
Geometry is curved or has non-constant factors.
NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag > DNekScalMat
DNekScalBlkMatSharedPtr Nektar::LocalRegions::PrismExp::CreateStaticCondMatrix ( const MatrixKey mkey)
protected

Definition at line 1412 of file PrismExp.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL2, Nektar::SpatialDomains::eDeformed, Nektar::StdRegions::eHelmholtz, Nektar::StdRegions::eLaplacian, Nektar::SpatialDomains::eNoGeomType, Nektar::StdRegions::StdExpansion::GetBoundaryMap(), Nektar::StdRegions::StdExpansion::GetInteriorMap(), Nektar::LocalRegions::Expansion::GetLocMatrix(), Nektar::StdRegions::StdMatrixKey::GetMatrixType(), Nektar::StdRegions::StdExpansion::GetStdStaticCondMatrix(), Nektar::LocalRegions::Expansion::m_metricinfo, Nektar::StdRegions::StdExpansion::m_ncoeffs, and Nektar::StdRegions::StdExpansion::NumBndryCoeffs().

1413  {
1414  DNekScalBlkMatSharedPtr returnval;
1415 
1416  ASSERTL2(m_metricinfo->GetGtype() != SpatialDomains::eNoGeomType,"Geometric information is not set up");
1417 
1418  // set up block matrix system
1419  unsigned int nbdry = NumBndryCoeffs();
1420  unsigned int nint = (unsigned int)(m_ncoeffs - nbdry);
1421  unsigned int exp_size[] = {nbdry, nint};
1422  unsigned int nblks=2;
1423  returnval = MemoryManager<DNekScalBlkMat>::AllocateSharedPtr(nblks, nblks, exp_size, exp_size);
1424  NekDouble factor = 1.0;
1425 
1426  switch(mkey.GetMatrixType())
1427  {
1429  case StdRegions::eHelmholtz: // special case since Helmholtz not defined in StdRegions
1430  // use Deformed case for both regular and deformed geometries
1431  factor = 1.0;
1432  goto UseLocRegionsMatrix;
1433  break;
1434  default:
1435  if(m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
1436  {
1437  factor = 1.0;
1438  goto UseLocRegionsMatrix;
1439  }
1440  else
1441  {
1442  DNekScalMatSharedPtr mat = GetLocMatrix(mkey);
1443  factor = mat->Scale();
1444  goto UseStdRegionsMatrix;
1445  }
1446  break;
1447  UseStdRegionsMatrix:
1448  {
1449  NekDouble invfactor = 1.0/factor;
1450  NekDouble one = 1.0;
1452  DNekScalMatSharedPtr Atmp;
1453  DNekMatSharedPtr Asubmat;
1454 
1455  //TODO: check below
1456  returnval->SetBlock(0,0,Atmp = MemoryManager<DNekScalMat>::AllocateSharedPtr(factor,Asubmat = mat->GetBlock(0,0)));
1457  returnval->SetBlock(0,1,Atmp = MemoryManager<DNekScalMat>::AllocateSharedPtr(one,Asubmat = mat->GetBlock(0,1)));
1458  returnval->SetBlock(1,0,Atmp = MemoryManager<DNekScalMat>::AllocateSharedPtr(factor,Asubmat = mat->GetBlock(1,0)));
1459  returnval->SetBlock(1,1,Atmp = MemoryManager<DNekScalMat>::AllocateSharedPtr(invfactor,Asubmat = mat->GetBlock(1,1)));
1460  }
1461  break;
1462  UseLocRegionsMatrix:
1463  {
1464  int i,j;
1465  NekDouble invfactor = 1.0/factor;
1466  NekDouble one = 1.0;
1467  DNekScalMat &mat = *GetLocMatrix(mkey);
1472 
1473  Array<OneD,unsigned int> bmap(nbdry);
1474  Array<OneD,unsigned int> imap(nint);
1475  GetBoundaryMap(bmap);
1476  GetInteriorMap(imap);
1477 
1478  for(i = 0; i < nbdry; ++i)
1479  {
1480  for(j = 0; j < nbdry; ++j)
1481  {
1482  (*A)(i,j) = mat(bmap[i],bmap[j]);
1483  }
1484 
1485  for(j = 0; j < nint; ++j)
1486  {
1487  (*B)(i,j) = mat(bmap[i],imap[j]);
1488  }
1489  }
1490 
1491  for(i = 0; i < nint; ++i)
1492  {
1493  for(j = 0; j < nbdry; ++j)
1494  {
1495  (*C)(i,j) = mat(imap[i],bmap[j]);
1496  }
1497 
1498  for(j = 0; j < nint; ++j)
1499  {
1500  (*D)(i,j) = mat(imap[i],imap[j]);
1501  }
1502  }
1503 
1504  // Calculate static condensed system
1505  if(nint)
1506  {
1507  D->Invert();
1508  (*B) = (*B)*(*D);
1509  (*A) = (*A) - (*B)*(*C);
1510  }
1511 
1512  DNekScalMatSharedPtr Atmp;
1513 
1514  returnval->SetBlock(0,0,Atmp = MemoryManager<DNekScalMat>::AllocateSharedPtr(factor,A));
1515  returnval->SetBlock(0,1,Atmp = MemoryManager<DNekScalMat>::AllocateSharedPtr(one,B));
1516  returnval->SetBlock(1,0,Atmp = MemoryManager<DNekScalMat>::AllocateSharedPtr(factor,C));
1517  returnval->SetBlock(1,1,Atmp = MemoryManager<DNekScalMat>::AllocateSharedPtr(invfactor,D));
1518 
1519  }
1520  break;
1521  }
1522  return returnval;
1523  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
Definition: Expansion.h:126
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
DNekBlkMatSharedPtr GetStdStaticCondMatrix(const StdMatrixKey &mkey)
Definition: StdExpansion.h:705
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:74
void GetInteriorMap(Array< OneD, unsigned int > &outarray)
Definition: StdExpansion.h:821
double NekDouble
boost::shared_ptr< DNekBlkMat > DNekBlkMatSharedPtr
Definition: NekTypeDefs.hpp:72
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
Definition: Expansion.cpp:83
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed t...
Definition: ErrorUtil.hpp:213
Geometry is curved or has non-constant factors.
NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag > DNekScalMat
void GetBoundaryMap(Array< OneD, unsigned int > &outarray)
Definition: StdExpansion.h:816
void Nektar::LocalRegions::PrismExp::v_ComputeFaceNormal ( const int  face)
protectedvirtual

Get the normals along specficied face Get the face normals interplated to a points0 x points 0 type distribution.

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 686 of file PrismExp.cpp.

References ASSERTL0, Nektar::StdRegions::StdExpansion::DetFaceBasisKey(), Nektar::SpatialDomains::eMovingRegular, Nektar::SpatialDomains::eRegular, Vmath::Fill(), Nektar::StdRegions::StdExpansion::GetCoordim(), Nektar::LocalRegions::Expansion::GetGeom(), Nektar::LibUtilities::BasisKey::GetNumPoints(), Nektar::LibUtilities::BasisKey::GetPointsKey(), Nektar::StdRegions::StdExpansion::GetPointsKeys(), Nektar::LibUtilities::Interp2D(), Nektar::StdRegions::StdExpansion3D::m_faceNormals, Vmath::Sdiv(), Vmath::Vmul(), Vmath::Vsqrt(), Vmath::Vvtvp(), and Vmath::Zero().

687  {
688  const SpatialDomains::GeomFactorsSharedPtr &geomFactors =
689  GetGeom()->GetMetricInfo();
691  SpatialDomains::GeomType type = geomFactors->GetGtype();
692  const Array<TwoD, const NekDouble> &df = geomFactors->GetDerivFactors(ptsKeys);
693  const Array<OneD, const NekDouble> &jac = geomFactors->GetJac(ptsKeys);
694 
695  int nq0 = ptsKeys[0].GetNumPoints();
696  int nq1 = ptsKeys[1].GetNumPoints();
697  int nq2 = ptsKeys[2].GetNumPoints();
698  int nq01 = nq0*nq1;
699  int nqtot;
700 
701 
702  LibUtilities::BasisKey tobasis0 = DetFaceBasisKey(face,0);
703  LibUtilities::BasisKey tobasis1 = DetFaceBasisKey(face,1);
704 
705  // Number of quadrature points in face expansion.
706  int nq_face = tobasis0.GetNumPoints()*tobasis1.GetNumPoints();
707 
708  int vCoordDim = GetCoordim();
709  int i;
710 
711  m_faceNormals[face] = Array<OneD, Array<OneD, NekDouble> >(vCoordDim);
712  Array<OneD, Array<OneD, NekDouble> > &normal = m_faceNormals[face];
713  for (i = 0; i < vCoordDim; ++i)
714  {
715  normal[i] = Array<OneD, NekDouble>(nq_face);
716  }
717 
718  // Regular geometry case
719  if (type == SpatialDomains::eRegular ||
721  {
722  NekDouble fac;
723  // Set up normals
724  switch(face)
725  {
726  case 0:
727  {
728  for(i = 0; i < vCoordDim; ++i)
729  {
730  normal[i][0] = -df[3*i+2][0];;
731  }
732  break;
733  }
734  case 1:
735  {
736  for(i = 0; i < vCoordDim; ++i)
737  {
738  normal[i][0] = -df[3*i+1][0];
739  }
740  break;
741  }
742  case 2:
743  {
744  for(i = 0; i < vCoordDim; ++i)
745  {
746  normal[i][0] = df[3*i][0]+df[3*i+2][0];
747  }
748  break;
749  }
750  case 3:
751  {
752  for(i = 0; i < vCoordDim; ++i)
753  {
754  normal[i][0] = df[3*i+1][0];
755  }
756  break;
757  }
758  case 4:
759  {
760  for(i = 0; i < vCoordDim; ++i)
761  {
762  normal[i][0] = -df[3*i][0];
763  }
764  break;
765  }
766  default:
767  ASSERTL0(false,"face is out of range (face < 4)");
768  }
769 
770  // Normalise resulting vector.
771  fac = 0.0;
772  for(i = 0; i < vCoordDim; ++i)
773  {
774  fac += normal[i][0]*normal[i][0];
775  }
776  fac = 1.0/sqrt(fac);
777  for (i = 0; i < vCoordDim; ++i)
778  {
779  Vmath::Fill(nq_face,fac*normal[i][0],normal[i],1);
780  }
781  }
782  else
783  {
784  // Set up deformed normals.
785  int j, k;
786 
787  // Determine number of quadrature points on the face of 3D elmt
788  if (face == 0)
789  {
790  nqtot = nq0*nq1;
791  }
792  else if (face == 1 || face == 3)
793  {
794  nqtot = nq0*nq2;
795  }
796  else
797  {
798  nqtot = nq1*nq2;
799  }
800 
801  LibUtilities::PointsKey points0;
802  LibUtilities::PointsKey points1;
803 
804  Array<OneD, NekDouble> faceJac(nqtot);
805  Array<OneD, NekDouble> normals(vCoordDim*nqtot,0.0);
806 
807  // Extract Jacobian along face and recover local derivatives
808  // (dx/dr) for polynomial interpolation by multiplying m_gmat by
809  // jacobian
810  switch(face)
811  {
812  case 0:
813  {
814  for(j = 0; j < nq01; ++j)
815  {
816  normals[j] = -df[2][j]*jac[j];
817  normals[nqtot+j] = -df[5][j]*jac[j];
818  normals[2*nqtot+j] = -df[8][j]*jac[j];
819  faceJac[j] = jac[j];
820  }
821 
822  points0 = ptsKeys[0];
823  points1 = ptsKeys[1];
824  break;
825  }
826 
827  case 1:
828  {
829  for (j = 0; j < nq0; ++j)
830  {
831  for(k = 0; k < nq2; ++k)
832  {
833  int tmp = j+nq01*k;
834  normals[j+k*nq0] =
835  -df[1][tmp]*jac[tmp];
836  normals[nqtot+j+k*nq0] =
837  -df[4][tmp]*jac[tmp];
838  normals[2*nqtot+j+k*nq0] =
839  -df[7][tmp]*jac[tmp];
840  faceJac[j+k*nq0] = jac[tmp];
841  }
842  }
843 
844  points0 = ptsKeys[0];
845  points1 = ptsKeys[2];
846  break;
847  }
848 
849  case 2:
850  {
851  for (j = 0; j < nq1; ++j)
852  {
853  for(k = 0; k < nq2; ++k)
854  {
855  int tmp = nq0-1+nq0*j+nq01*k;
856  normals[j+k*nq1] =
857  (df[0][tmp]+df[2][tmp])*jac[tmp];
858  normals[nqtot+j+k*nq1] =
859  (df[3][tmp]+df[5][tmp])*jac[tmp];
860  normals[2*nqtot+j+k*nq1] =
861  (df[6][tmp]+df[8][tmp])*jac[tmp];
862  faceJac[j+k*nq1] = jac[tmp];
863  }
864  }
865 
866  points0 = ptsKeys[1];
867  points1 = ptsKeys[2];
868  break;
869  }
870 
871  case 3:
872  {
873  for (j = 0; j < nq0; ++j)
874  {
875  for(k = 0; k < nq2; ++k)
876  {
877  int tmp = nq0*(nq1-1) + j + nq01*k;
878  normals[j+k*nq0] =
879  df[1][tmp]*jac[tmp];
880  normals[nqtot+j+k*nq0] =
881  df[4][tmp]*jac[tmp];
882  normals[2*nqtot+j+k*nq0] =
883  df[7][tmp]*jac[tmp];
884  faceJac[j+k*nq0] = jac[tmp];
885  }
886  }
887 
888  points0 = ptsKeys[0];
889  points1 = ptsKeys[2];
890  break;
891  }
892 
893  case 4:
894  {
895  for (j = 0; j < nq1; ++j)
896  {
897  for(k = 0; k < nq2; ++k)
898  {
899  int tmp = j*nq0+nq01*k;
900  normals[j+k*nq1] =
901  -df[0][tmp]*jac[tmp];
902  normals[nqtot+j+k*nq1] =
903  -df[3][tmp]*jac[tmp];
904  normals[2*nqtot+j+k*nq1] =
905  -df[6][tmp]*jac[tmp];
906  faceJac[j+k*nq1] = jac[tmp];
907  }
908  }
909 
910  points0 = ptsKeys[1];
911  points1 = ptsKeys[2];
912  break;
913  }
914 
915  default:
916  ASSERTL0(false,"face is out of range (face < 4)");
917  }
918 
919 
920  Array<OneD, NekDouble> work (nq_face, 0.0);
921  // Interpolate Jacobian and invert
922  LibUtilities::Interp2D(points0, points1, faceJac,
923  tobasis0.GetPointsKey(),
924  tobasis1.GetPointsKey(),
925  work);
926  Vmath::Sdiv(nq_face, 1.0, &work[0], 1, &work[0], 1);
927 
928  // Interpolate normal and multiply by inverse Jacobian.
929  for(i = 0; i < vCoordDim; ++i)
930  {
931  LibUtilities::Interp2D(points0, points1,
932  &normals[i*nqtot],
933  tobasis0.GetPointsKey(),
934  tobasis1.GetPointsKey(),
935  &normal[i][0]);
936  Vmath::Vmul(nq_face,work,1,normal[i],1,normal[i],1);
937  }
938 
939  // Normalise to obtain unit normals.
940  Vmath::Zero(nq_face,work,1);
941  for(i = 0; i < GetCoordim(); ++i)
942  {
943  Vmath::Vvtvp(nq_face,normal[i],1,normal[i],1,work,1,work,1);
944  }
945 
946  Vmath::Vsqrt(nq_face,work,1,work,1);
947  Vmath::Sdiv (nq_face,1.0,work,1,work,1);
948 
949  for(i = 0; i < GetCoordim(); ++i)
950  {
951  Vmath::Vmul(nq_face,normal[i],1,work,1,normal[i],1);
952  }
953  }
954  }
const LibUtilities::PointsKeyVector GetPointsKeys() const
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
std::vector< PointsKey > PointsKeyVector
Definition: Points.h:220
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
Definition: Vmath.cpp:394
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition: Vmath.cpp:46
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
void Sdiv(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha/y.
Definition: Vmath.cpp:257
void Interp2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
this function interpolates a 2D function evaluated at the quadrature points of the 2D basis...
Definition: Interp.cpp:116
double NekDouble
std::map< int, NormalVector > m_faceNormals
SpatialDomains::GeometrySharedPtr GetGeom() const
Definition: Expansion.cpp:148
boost::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
Definition: GeomFactors.h:62
Geometry is straight-sided with constant geometric factors.
const LibUtilities::BasisKey DetFaceBasisKey(const int i, const int k) const
Definition: StdExpansion.h:324
GeomType
Indicates the type of element geometry.
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:359
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
DNekMatSharedPtr Nektar::LocalRegions::PrismExp::v_CreateStdMatrix ( const StdRegions::StdMatrixKey mkey)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdPrismExp.

Definition at line 1069 of file PrismExp.cpp.

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

1070  {
1071  LibUtilities::BasisKey bkey0 = m_base[0]->GetBasisKey();
1072  LibUtilities::BasisKey bkey1 = m_base[1]->GetBasisKey();
1073  LibUtilities::BasisKey bkey2 = m_base[2]->GetBasisKey();
1075  MemoryManager<StdPrismExp>::AllocateSharedPtr(bkey0, bkey1, bkey2);
1076 
1077  return tmp->GetStdMatrix(mkey);
1078  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
boost::shared_ptr< StdPrismExp > StdPrismExpSharedPtr
Definition: StdPrismExp.h:253
Array< OneD, LibUtilities::BasisSharedPtr > m_base
void Nektar::LocalRegions::PrismExp::v_DropLocStaticCondMatrix ( const MatrixKey mkey)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1090 of file PrismExp.cpp.

References m_staticCondMatrixManager.

1091  {
1092  m_staticCondMatrixManager.DeleteObject(mkey);
1093  }
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: PrismExp.h:208
void Nektar::LocalRegions::PrismExp::v_ExtractDataToCoeffs ( const NekDouble data,
const std::vector< unsigned int > &  nummodes,
const int  nmode_offset,
NekDouble coeffs 
)
protectedvirtual

Unpack data from input file assuming it comes from the same expansion type.

See also
StdExpansion::ExtractDataToCoeffs

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 522 of file PrismExp.cpp.

References ASSERTL0, ASSERTL1, Nektar::LibUtilities::eModified_A, Nektar::LibUtilities::eModified_B, Nektar::StdRegions::StdExpansion::GetBasisType(), Nektar::StdRegions::StdExpansion::m_base, Nektar::StdRegions::StdExpansion::m_ncoeffs, Vmath::Vcopy(), and Vmath::Zero().

527  {
528  int data_order0 = nummodes[mode_offset];
529  int fillorder0 = min(m_base[0]->GetNumModes(),data_order0);
530  int data_order1 = nummodes[mode_offset+1];
531  int order1 = m_base[1]->GetNumModes();
532  int fillorder1 = min(order1,data_order1);
533  int data_order2 = nummodes[mode_offset+2];
534  int order2 = m_base[2]->GetNumModes();
535  int fillorder2 = min(order2,data_order2);
536 
537  switch(m_base[0]->GetBasisType())
538  {
540  {
541  int i,j;
542  int cnt = 0;
543  int cnt1 = 0;
544 
545  ASSERTL1(m_base[1]->GetBasisType() ==
547  "Extraction routine not set up for this basis");
548  ASSERTL1(m_base[2]->GetBasisType() ==
550  "Extraction routine not set up for this basis");
551 
552  Vmath::Zero(m_ncoeffs,coeffs,1);
553  for(j = 0; j < fillorder0; ++j)
554  {
555  for(i = 0; i < fillorder1; ++i)
556  {
557  Vmath::Vcopy(fillorder2-j, &data[cnt], 1,
558  &coeffs[cnt1], 1);
559  cnt += data_order2-j;
560  cnt1 += order2-j;
561  }
562 
563  // count out data for j iteration
564  for(i = fillorder1; i < data_order1; ++i)
565  {
566  cnt += data_order2-j;
567  }
568 
569  for(i = fillorder1; i < order1; ++i)
570  {
571  cnt1 += order2-j;
572  }
573  }
574  }
575  break;
576  default:
577  ASSERTL0(false, "basis is either not set up or not "
578  "hierarchicial");
579  }
580  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
Principle Modified Functions .
Definition: BasisType.h:49
Principle Modified Functions .
Definition: BasisType.h:50
LibUtilities::BasisType GetBasisType(const int dir) const
This function returns the type of basis used in the dir direction.
Definition: StdExpansion.h:165
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:191
Array< OneD, LibUtilities::BasisSharedPtr > m_base
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
void Nektar::LocalRegions::PrismExp::v_FwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

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

Inputs:

  • inarray: array of physical quadrature points to be transformed

Outputs:

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

Reimplemented from Nektar::StdRegions::StdPrismExp.

Definition at line 215 of file PrismExp.cpp.

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

217  {
218  if(m_base[0]->Collocation() &&
219  m_base[1]->Collocation() &&
220  m_base[2]->Collocation())
221  {
222  Vmath::Vcopy(GetNcoeffs(),&inarray[0],1,&outarray[0],1);
223  }
224  else
225  {
226  v_IProductWRTBase(inarray, outarray);
227 
228  // get Mass matrix inverse
229  MatrixKey masskey(StdRegions::eInvMass,
230  DetShapeType(),*this);
231  DNekScalMatSharedPtr matsys = m_matrixManager[masskey];
232 
233  // copy inarray in case inarray == outarray
234  DNekVec in (m_ncoeffs,outarray);
235  DNekVec out(m_ncoeffs,outarray,eWrapper);
236 
237  out = (*matsys)*in;
238  }
239  }
LibUtilities::ShapeType DetShapeType() const
This function returns the shape of the expansion domain.
Definition: StdExpansion.h:470
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: PrismExp.h:206
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Calculate the inner product of inarray with respect to the basis B=base0*base1*base2 and put into out...
Definition: PrismExp.cpp:270
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
NekVector< NekDouble > DNekVec
Definition: NekTypeDefs.hpp:49
int GetNcoeffs(void) const
This function returns the total number of coefficients used in the expansion.
Definition: StdExpansion.h:131
Array< OneD, LibUtilities::BasisSharedPtr > m_base
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
void Nektar::LocalRegions::PrismExp::v_GeneralMatrixOp_MatOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
protectedvirtual

Definition at line 990 of file PrismExp.cpp.

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

994  {
996 
997  if(inarray.get() == outarray.get())
998  {
999  Array<OneD,NekDouble> tmp(m_ncoeffs);
1000  Vmath::Vcopy(m_ncoeffs,inarray.get(),1,tmp.get(),1);
1001 
1002  Blas::Dgemv('N',m_ncoeffs,m_ncoeffs,mat->Scale(),(mat->GetOwnedMatrix())->GetPtr().get(),
1003  m_ncoeffs, tmp.get(), 1, 0.0, outarray.get(), 1);
1004  }
1005  else
1006  {
1007  Blas::Dgemv('N',m_ncoeffs,m_ncoeffs,mat->Scale(),(mat->GetOwnedMatrix())->GetPtr().get(),
1008  m_ncoeffs, inarray.get(), 1, 0.0, outarray.get(), 1);
1009  }
1010  }
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
DNekScalMatSharedPtr GetLocMatrix(const LocalRegions::MatrixKey &mkey)
Definition: Expansion.cpp:83
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
DNekMatSharedPtr Nektar::LocalRegions::PrismExp::v_GenMatrix ( const StdRegions::StdMatrixKey mkey)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdPrismExp.

Definition at line 1046 of file PrismExp.cpp.

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

1047  {
1048  DNekMatSharedPtr returnval;
1049 
1050  switch(mkey.GetMatrixType())
1051  {
1059  returnval = Expansion3D::v_GenMatrix(mkey);
1060  break;
1061  default:
1062  returnval = StdPrismExp::v_GenMatrix(mkey);
1063  break;
1064  }
1065 
1066  return returnval;
1067  }
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
virtual DNekMatSharedPtr v_GenMatrix(const StdRegions::StdMatrixKey &mkey)
void Nektar::LocalRegions::PrismExp::v_GetCoord ( const Array< OneD, const NekDouble > &  Lcoords,
Array< OneD, NekDouble > &  coords 
)
protectedvirtual

Get the coordinates #coords at the local coordinates #Lcoords.

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 461 of file PrismExp.cpp.

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

463  {
464  int i;
465 
466  ASSERTL1(Lcoords[0] <= -1.0 && Lcoords[0] >= 1.0 &&
467  Lcoords[1] <= -1.0 && Lcoords[1] >= 1.0 &&
468  Lcoords[2] <= -1.0 && Lcoords[2] >= 1.0,
469  "Local coordinates are not in region [-1,1]");
470 
471  m_geom->FillGeom();
472 
473  for(i = 0; i < m_geom->GetCoordim(); ++i)
474  {
475  coords[i] = m_geom->GetCoord(i,Lcoords);
476  }
477  }
SpatialDomains::GeometrySharedPtr m_geom
Definition: Expansion.h:125
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
int Nektar::LocalRegions::PrismExp::v_GetCoordim ( void  )
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion3D.

Definition at line 517 of file PrismExp.cpp.

References Nektar::LocalRegions::Expansion::m_geom.

518  {
519  return m_geom->GetCoordim();
520  }
SpatialDomains::GeometrySharedPtr m_geom
Definition: Expansion.h:125
void Nektar::LocalRegions::PrismExp::v_GetCoords ( Array< OneD, NekDouble > &  coords_1,
Array< OneD, NekDouble > &  coords_2,
Array< OneD, NekDouble > &  coords_3 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdPrismExp.

Definition at line 479 of file PrismExp.cpp.

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

483  {
484  Expansion::v_GetCoords(coords_0, coords_1, coords_2);
485  }
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2, Array< OneD, NekDouble > &coords_3)
Definition: Expansion.cpp:211
void Nektar::LocalRegions::PrismExp::v_GetFacePhysMap ( const int  face,
Array< OneD, int > &  outarray 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 582 of file PrismExp.cpp.

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

584  {
585  int nquad0 = m_base[0]->GetNumPoints();
586  int nquad1 = m_base[1]->GetNumPoints();
587  int nquad2 = m_base[2]->GetNumPoints();
588  int nq0 = 0;
589  int nq1 = 0;
590 
591  switch(face)
592  {
593  case 0:
594  nq0 = nquad0;
595  nq1 = nquad1;
596  if(outarray.num_elements()!=nq0*nq1)
597  {
598  outarray = Array<OneD, int>(nq0*nq1);
599  }
600 
601  //Directions A and B positive
602  for(int i = 0; i < nquad0*nquad1; ++i)
603  {
604  outarray[i] = i;
605  }
606  break;
607  case 1:
608 
609  nq0 = nquad0;
610  nq1 = nquad2;
611  if(outarray.num_elements()!=nq0*nq1)
612  {
613  outarray = Array<OneD, int>(nq0*nq1);
614  }
615 
616  //Direction A and B positive
617  for (int k=0; k<nquad2; k++)
618  {
619  for(int i = 0; i < nquad0; ++i)
620  {
621  outarray[k*nquad0+i] = (nquad0*nquad1*k)+i;
622  }
623  }
624 
625  break;
626  case 2:
627 
628  nq0 = nquad1;
629  nq1 = nquad2;
630  if(outarray.num_elements()!=nq0*nq1)
631  {
632  outarray = Array<OneD, int>(nq0*nq1);
633  }
634 
635  //Directions A and B positive
636  for(int j = 0; j < nquad1*nquad2; ++j)
637  {
638  outarray[j] = nquad0-1 + j*nquad0;
639 
640  }
641  break;
642  case 3:
643  nq0 = nquad0;
644  nq1 = nquad2;
645  if(outarray.num_elements()!=nq0*nq1)
646  {
647  outarray = Array<OneD, int>(nq0*nq1);
648  }
649 
650  //Direction A and B positive
651  for (int k=0; k<nquad2; k++)
652  {
653  for(int i = 0; i < nquad0; ++i)
654  {
655  outarray[k*nquad0+i] = nquad0*(nquad1-1) + (nquad0*nquad1*k)+i;
656  }
657  }
658  break;
659  case 4:
660 
661  nq0 = nquad1;
662  nq1 = nquad2;
663  if(outarray.num_elements()!=nq0*nq1)
664  {
665  outarray = Array<OneD, int>(nq0*nq1);
666  }
667 
668  //Directions A and B positive
669  for(int j = 0; j < nquad1*nquad2; ++j)
670  {
671  outarray[j] = j*nquad0;
672 
673  }
674  break;
675  default:
676  ASSERTL0(false,"face value (> 4) is out of range");
677  break;
678  }
679 
680  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
Array< OneD, LibUtilities::BasisSharedPtr > m_base
DNekScalMatSharedPtr Nektar::LocalRegions::PrismExp::v_GetLocMatrix ( const MatrixKey mkey)
protectedvirtual

Reimplemented from Nektar::LocalRegions::Expansion.

Definition at line 1080 of file PrismExp.cpp.

References m_matrixManager.

1081  {
1082  return m_matrixManager[mkey];
1083  }
LibUtilities::NekManager< MatrixKey, DNekScalMat, MatrixKey::opLess > m_matrixManager
Definition: PrismExp.h:206
DNekScalBlkMatSharedPtr Nektar::LocalRegions::PrismExp::v_GetLocStaticCondMatrix ( const MatrixKey mkey)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1085 of file PrismExp.cpp.

References m_staticCondMatrixManager.

1086  {
1087  return m_staticCondMatrixManager[mkey];
1088  }
LibUtilities::NekManager< MatrixKey, DNekScalBlkMat, MatrixKey::opLess > m_staticCondMatrixManager
Definition: PrismExp.h:208
void Nektar::LocalRegions::PrismExp::v_GetSimplexEquiSpacedConnectivity ( Array< OneD, int > &  conn,
bool  standard = true 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1700 of file PrismExp.cpp.

References Nektar::StdRegions::StdExpansion::m_base, and Nektar::LocalRegions::Expansion::m_geom.

1703  {
1704  int np0 = m_base[0]->GetNumPoints();
1705  int np1 = m_base[1]->GetNumPoints();
1706  int np2 = m_base[2]->GetNumPoints();
1707  int np = max(np0,max(np1,np2));
1708  Array<OneD, int> prismpt(6);
1709  bool standard = true;
1710 
1711  int vid0 = m_geom->GetVid(0);
1712  int vid1 = m_geom->GetVid(1);
1713  int vid2 = m_geom->GetVid(4);
1714  int rotate = 0;
1715 
1716  // sort out prism rotation according to
1717  if((vid2 < vid1)&&(vid2 < vid0)) // top triangle vertex is lowest id
1718  {
1719  rotate = 0;
1720  if(vid0 > vid1)
1721  {
1722  standard = false;// reverse base direction
1723  }
1724  }
1725  else if((vid1 < vid2)&&(vid1 < vid0))
1726  {
1727  rotate = 1;
1728  if(vid2 > vid0)
1729  {
1730  standard = false;// reverse base direction
1731  }
1732  }
1733  else if ((vid0 < vid2)&&(vid0 < vid1))
1734  {
1735  rotate = 2;
1736  if(vid1 > vid2)
1737  {
1738  standard = false; // reverse base direction
1739  }
1740  }
1741 
1742  conn = Array<OneD, int>(12*(np-1)*(np-1)*(np-1));
1743 
1744  int row = 0;
1745  int rowp1 = 0;
1746  int plane = 0;
1747  int row1 = 0;
1748  int row1p1 = 0;
1749  int planep1 = 0;
1750  int cnt = 0;
1751 
1752 
1753  Array<OneD, int> rot(3);
1754 
1755  rot[0] = (0+rotate)%3;
1756  rot[1] = (1+rotate)%3;
1757  rot[2] = (2+rotate)%3;
1758 
1759  // lower diagonal along 1-3 on base
1760  for(int i = 0; i < np-1; ++i)
1761  {
1762  planep1 += (np-i)*np;
1763  row = 0; // current plane row offset
1764  rowp1 = 0; // current plane row plus one offset
1765  row1 = 0; // next plane row offset
1766  row1p1 = 0; // nex plane row plus one offset
1767  if(standard == false)
1768  {
1769  for(int j = 0; j < np-1; ++j)
1770  {
1771  rowp1 += np-i;
1772  row1p1 += np-i-1;
1773  for(int k = 0; k < np-i-2; ++k)
1774  {
1775  // bottom prism block
1776  prismpt[rot[0]] = plane + row + k;
1777  prismpt[rot[1]] = plane + row + k+1;
1778  prismpt[rot[2]] = planep1 + row1 + k;
1779 
1780  prismpt[3+rot[0]] = plane + rowp1 + k;
1781  prismpt[3+rot[1]] = plane + rowp1 + k+1;
1782  prismpt[3+rot[2]] = planep1 + row1p1 + k;
1783 
1784  conn[cnt++] = prismpt[0];
1785  conn[cnt++] = prismpt[1];
1786  conn[cnt++] = prismpt[3];
1787  conn[cnt++] = prismpt[2];
1788 
1789  conn[cnt++] = prismpt[5];
1790  conn[cnt++] = prismpt[2];
1791  conn[cnt++] = prismpt[3];
1792  conn[cnt++] = prismpt[4];
1793 
1794  conn[cnt++] = prismpt[3];
1795  conn[cnt++] = prismpt[1];
1796  conn[cnt++] = prismpt[4];
1797  conn[cnt++] = prismpt[2];
1798 
1799  // upper prism block.
1800  prismpt[rot[0]] = planep1 + row1 + k+1;
1801  prismpt[rot[1]] = planep1 + row1 + k;
1802  prismpt[rot[2]] = plane + row + k+1;
1803 
1804  prismpt[3+rot[0]] = planep1 + row1p1 + k+1;
1805  prismpt[3+rot[1]] = planep1 + row1p1 + k;
1806  prismpt[3+rot[2]] = plane + rowp1 + k+1;
1807 
1808 
1809  conn[cnt++] = prismpt[0];
1810  conn[cnt++] = prismpt[1];
1811  conn[cnt++] = prismpt[2];
1812  conn[cnt++] = prismpt[5];
1813 
1814  conn[cnt++] = prismpt[5];
1815  conn[cnt++] = prismpt[0];
1816  conn[cnt++] = prismpt[4];
1817  conn[cnt++] = prismpt[1];
1818 
1819  conn[cnt++] = prismpt[3];
1820  conn[cnt++] = prismpt[4];
1821  conn[cnt++] = prismpt[0];
1822  conn[cnt++] = prismpt[5];
1823 
1824  }
1825 
1826  // bottom prism block
1827  prismpt[rot[0]] = plane + row + np-i-2;
1828  prismpt[rot[1]] = plane + row + np-i-1;
1829  prismpt[rot[2]] = planep1 + row1 + np-i-2;
1830 
1831  prismpt[3+rot[0]] = plane + rowp1 + np-i-2;
1832  prismpt[3+rot[1]] = plane + rowp1 + np-i-1;
1833  prismpt[3+rot[2]] = planep1 + row1p1 + np-i-2;
1834 
1835  conn[cnt++] = prismpt[0];
1836  conn[cnt++] = prismpt[1];
1837  conn[cnt++] = prismpt[3];
1838  conn[cnt++] = prismpt[2];
1839 
1840  conn[cnt++] = prismpt[5];
1841  conn[cnt++] = prismpt[2];
1842  conn[cnt++] = prismpt[3];
1843  conn[cnt++] = prismpt[4];
1844 
1845  conn[cnt++] = prismpt[3];
1846  conn[cnt++] = prismpt[1];
1847  conn[cnt++] = prismpt[4];
1848  conn[cnt++] = prismpt[2];
1849 
1850  row += np-i;
1851  row1 += np-i-1;
1852  }
1853 
1854  }
1855  else
1856  { // lower diagonal along 0-4 on base
1857  for(int j = 0; j < np-1; ++j)
1858  {
1859  rowp1 += np-i;
1860  row1p1 += np-i-1;
1861  for(int k = 0; k < np-i-2; ++k)
1862  {
1863  // bottom prism block
1864  prismpt[rot[0]] = plane + row + k;
1865  prismpt[rot[1]] = plane + row + k+1;
1866  prismpt[rot[2]] = planep1 + row1 + k;
1867 
1868  prismpt[3+rot[0]] = plane + rowp1 + k;
1869  prismpt[3+rot[1]] = plane + rowp1 + k+1;
1870  prismpt[3+rot[2]] = planep1 + row1p1 + k;
1871 
1872  conn[cnt++] = prismpt[0];
1873  conn[cnt++] = prismpt[1];
1874  conn[cnt++] = prismpt[4];
1875  conn[cnt++] = prismpt[2];
1876 
1877  conn[cnt++] = prismpt[4];
1878  conn[cnt++] = prismpt[3];
1879  conn[cnt++] = prismpt[0];
1880  conn[cnt++] = prismpt[2];
1881 
1882  conn[cnt++] = prismpt[3];
1883  conn[cnt++] = prismpt[4];
1884  conn[cnt++] = prismpt[5];
1885  conn[cnt++] = prismpt[2];
1886 
1887  // upper prism block.
1888  prismpt[rot[0]] = planep1 + row1 + k+1;
1889  prismpt[rot[1]] = planep1 + row1 + k;
1890  prismpt[rot[2]] = plane + row + k+1;
1891 
1892  prismpt[3+rot[0]] = planep1 + row1p1 + k+1;
1893  prismpt[3+rot[1]] = planep1 + row1p1 + k;
1894  prismpt[3+rot[2]] = plane + rowp1 + k+1;
1895 
1896  conn[cnt++] = prismpt[0];
1897  conn[cnt++] = prismpt[2];
1898  conn[cnt++] = prismpt[1];
1899  conn[cnt++] = prismpt[5];
1900 
1901  conn[cnt++] = prismpt[3];
1902  conn[cnt++] = prismpt[5];
1903  conn[cnt++] = prismpt[0];
1904  conn[cnt++] = prismpt[1];
1905 
1906  conn[cnt++] = prismpt[5];
1907  conn[cnt++] = prismpt[3];
1908  conn[cnt++] = prismpt[4];
1909  conn[cnt++] = prismpt[1];
1910  }
1911 
1912  // bottom prism block
1913  prismpt[rot[0]] = plane + row + np-i-2;
1914  prismpt[rot[1]] = plane + row + np-i-1;
1915  prismpt[rot[2]] = planep1 + row1 + np-i-2;
1916 
1917  prismpt[3+rot[0]] = plane + rowp1 + np-i-2;
1918  prismpt[3+rot[1]] = plane + rowp1 + np-i-1;
1919  prismpt[3+rot[2]] = planep1 + row1p1 + np-i-2;
1920 
1921  conn[cnt++] = prismpt[0];
1922  conn[cnt++] = prismpt[1];
1923  conn[cnt++] = prismpt[4];
1924  conn[cnt++] = prismpt[2];
1925 
1926  conn[cnt++] = prismpt[4];
1927  conn[cnt++] = prismpt[3];
1928  conn[cnt++] = prismpt[0];
1929  conn[cnt++] = prismpt[2];
1930 
1931  conn[cnt++] = prismpt[3];
1932  conn[cnt++] = prismpt[4];
1933  conn[cnt++] = prismpt[5];
1934  conn[cnt++] = prismpt[2];
1935 
1936  row += np-i;
1937  row1 += np-i-1;
1938  }
1939 
1940  }
1941  plane += (np-i)*np;
1942  }
1943  }
SpatialDomains::GeometrySharedPtr m_geom
Definition: Expansion.h:125
Array< OneD, LibUtilities::BasisSharedPtr > m_base
StdRegions::StdExpansionSharedPtr Nektar::LocalRegions::PrismExp::v_GetStdExp ( void  ) const
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 449 of file PrismExp.cpp.

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

450  {
452  ::AllocateSharedPtr(m_base[0]->GetBasisKey(),
453  m_base[1]->GetBasisKey(),
454  m_base[2]->GetBasisKey());
455  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
Array< OneD, LibUtilities::BasisSharedPtr > m_base
void Nektar::LocalRegions::PrismExp::v_HelmholtzMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 982 of file PrismExp.cpp.

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

986  {
987  PrismExp::v_HelmholtzMatrixOp_MatFree(inarray,outarray,mkey);
988  }
virtual void v_HelmholtzMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::StdMatrixKey &mkey)
NekDouble Nektar::LocalRegions::PrismExp::v_Integral ( const Array< OneD, const NekDouble > &  inarray)
protectedvirtual

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

Inputs:

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

Outputs:

  • returns $\int^1_{-1}\int^1_{-1}\int^1_{-1} u(\bar \eta_1, \xi_2, \xi_3) J[i,j,k] d \bar \eta_1 d \xi_2 d \xi_3 $
    $ = \sum_{i=0}^{Q_1 - 1} \sum_{j=0}^{Q_2 - 1} \sum_{k=0}^{Q_3 - 1} u(\bar \eta_{1i}^{0,0}, \xi_{2j}^{0,0},\xi_{3k}^{1,0})w_{i}^{0,0} w_{j}^{0,0} \hat w_{k}^{1,0} $
    where $ inarray[i,j, k] = u(\bar \eta_{1i}^{0,0}, \xi_{2j}^{0,0},\xi_{3k}^{1,0}) $,
    $\hat w_{i}^{1,0} = \frac {w_{j}^{1,0}} {2} $
    and $ J[i,j,k] $ is the Jacobian evaluated at the quadrature point.

Reimplemented from Nektar::StdRegions::StdExpansion3D.

Definition at line 109 of file PrismExp.cpp.

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

110  {
111  int nquad0 = m_base[0]->GetNumPoints();
112  int nquad1 = m_base[1]->GetNumPoints();
113  int nquad2 = m_base[2]->GetNumPoints();
114  Array<OneD, const NekDouble> jac = m_metricinfo->GetJac(GetPointsKeys());
115  Array<OneD, NekDouble> tmp(nquad0*nquad1*nquad2);
116 
117  // Multiply inarray with Jacobian
118  if(m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
119  {
120  Vmath::Vmul(nquad0*nquad1*nquad2,&jac[0],1,(NekDouble*)&inarray[0],1,&tmp[0],1);
121  }
122  else
123  {
124  Vmath::Smul(nquad0*nquad1*nquad2,(NekDouble)jac[0],(NekDouble*)&inarray[0],1,&tmp[0],1);
125  }
126 
127  // Call StdPrismExp version.
128  return StdPrismExp::v_Integral(tmp);
129  }
const LibUtilities::PointsKeyVector GetPointsKeys() const
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
Definition: Expansion.h:126
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
Definition: Vmath.cpp:199
double NekDouble
Array< OneD, LibUtilities::BasisSharedPtr > m_base
Geometry is curved or has non-constant factors.
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:169
void Nektar::LocalRegions::PrismExp::v_IProductWRTBase ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Calculate the inner product of inarray with respect to the basis B=base0*base1*base2 and put into outarray:

$ \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} (\bar \eta_{1i}) \psi_{q}^{a} (\xi_{2j}) \psi_{pr}^{b} (\xi_{3k}) w_i w_j w_k u(\bar \eta_{1,i} \xi_{2,j} \xi_{3,k}) J_{i,j,k}\\ & = & \sum_{i=0}^{nq_0} \psi_p^a(\bar \eta_{1,i}) \sum_{j=0}^{nq_1} \psi_{q}^a(\xi_{2,j}) \sum_{k=0}^{nq_2} \psi_{pr}^b u(\bar \eta_{1i},\xi_{2j},\xi_{3k}) J_{i,j,k} \end{array} $
where

$ \phi_{pqr} (\xi_1 , \xi_2 , \xi_3) = \psi_p^a (\bar \eta_1) \psi_{q}^a (\xi_2) \psi_{pr}^b (\xi_3) $
which can be implemented as
$f_{pr} (\xi_{3k}) = \sum_{k=0}^{nq_3} \psi_{pr}^b u(\bar \eta_{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_{pr} (\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} $

Reimplemented from Nektar::StdRegions::StdPrismExp.

Definition at line 270 of file PrismExp.cpp.

References v_IProductWRTBase_SumFac().

Referenced by v_FwdTrans().

273  {
274  v_IProductWRTBase_SumFac(inarray, outarray);
275  }
virtual void v_IProductWRTBase_SumFac(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool multiplybyweights=true)
Definition: PrismExp.cpp:277
void Nektar::LocalRegions::PrismExp::v_IProductWRTBase_SumFac ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
bool  multiplybyweights = true 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdPrismExp.

Definition at line 277 of file PrismExp.cpp.

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

Referenced by v_IProductWRTBase().

281  {
282  const int nquad0 = m_base[0]->GetNumPoints();
283  const int nquad1 = m_base[1]->GetNumPoints();
284  const int nquad2 = m_base[2]->GetNumPoints();
285  const int order0 = m_base[0]->GetNumModes();
286  const int order1 = m_base[1]->GetNumModes();
287 
288  Array<OneD, NekDouble> wsp(order0*nquad2*(nquad1+order1));
289 
290  if(multiplybyweights)
291  {
292  Array<OneD, NekDouble> tmp(nquad0*nquad1*nquad2);
293 
294  MultiplyByQuadratureMetric(inarray, tmp);
295 
296  IProductWRTBase_SumFacKernel(m_base[0]->GetBdata(),
297  m_base[1]->GetBdata(),
298  m_base[2]->GetBdata(),
299  tmp,outarray,wsp,
300  true,true,true);
301  }
302  else
303  {
304  IProductWRTBase_SumFacKernel(m_base[0]->GetBdata(),
305  m_base[1]->GetBdata(),
306  m_base[2]->GetBdata(),
307  inarray,outarray,wsp,
308  true,true,true);
309  }
310  }
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdExpansion.h:942
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)
Array< OneD, LibUtilities::BasisSharedPtr > m_base
void Nektar::LocalRegions::PrismExp::v_IProductWRTDerivBase ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Calculates the inner product $ I_{pqr} = (u, \partial_{x_i} \phi_{pqr}) $.

The derivative of the basis functions is performed using the chain rule in order to incorporate the geometric factors. Assuming that the basis functions are a tensor product $\phi_{pqr}(\eta_1,\eta_2,\eta_3) = \phi_1(\eta_1)\phi_2(\eta_2)\phi_3(\eta_3)$, this yields the result

\[ I_{pqr} = \sum_{j=1}^3 \left(u, \frac{\partial u}{\partial \eta_j} \frac{\partial \eta_j}{\partial x_i}\right) \]

In the tetrahedral element, we must also incorporate a second set of geometric factors which incorporate the collapsed co-ordinate system, so that

\[ \frac{\partial\eta_j}{\partial x_i} = \sum_{k=1}^3 \frac{\partial\eta_j}{\partial\xi_k}\frac{\partial\xi_k}{\partial x_i} \]

These derivatives can be found on p152 of Sherwin & Karniadakis.

Parameters
dirDirection in which to take the derivative.
inarrayThe function $ u $.
outarrayValue of the inner product.

Reimplemented from Nektar::StdRegions::StdPrismExp.

Definition at line 342 of file PrismExp.cpp.

References v_IProductWRTDerivBase_SumFac().

346  {
347  v_IProductWRTDerivBase_SumFac(dir, inarray, outarray);
348  }
void v_IProductWRTDerivBase_SumFac(const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: PrismExp.cpp:350
void Nektar::LocalRegions::PrismExp::v_IProductWRTDerivBase_SumFac ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdPrismExp.

Definition at line 350 of file PrismExp.cpp.

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

Referenced by v_IProductWRTDerivBase().

354  {
355  const int nquad0 = m_base[0]->GetNumPoints();
356  const int nquad1 = m_base[1]->GetNumPoints();
357  const int nquad2 = m_base[2]->GetNumPoints();
358  const int order0 = m_base[0]->GetNumModes ();
359  const int order1 = m_base[1]->GetNumModes ();
360  const int nqtot = nquad0*nquad1*nquad2;
361  int i;
362 
363  const Array<OneD, const NekDouble> &z0 = m_base[0]->GetZ();
364  const Array<OneD, const NekDouble> &z2 = m_base[2]->GetZ();
365 
366  Array<OneD, NekDouble> gfac0(nquad0 );
367  Array<OneD, NekDouble> gfac2(nquad2 );
368  Array<OneD, NekDouble> tmp1 (nqtot );
369  Array<OneD, NekDouble> tmp2 (nqtot );
370  Array<OneD, NekDouble> tmp3 (nqtot );
371  Array<OneD, NekDouble> tmp4 (nqtot );
372  Array<OneD, NekDouble> tmp5 (nqtot );
373  Array<OneD, NekDouble> tmp6 (m_ncoeffs);
374  Array<OneD, NekDouble> wsp (order0*nquad2*(nquad1+order1));
375 
376  const Array<TwoD, const NekDouble>& df =
377  m_metricinfo->GetDerivFactors(GetPointsKeys());
378 
379  MultiplyByQuadratureMetric(inarray, tmp1);
380 
381  if(m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
382  {
383  Vmath::Vmul(nqtot,&df[3*dir][0], 1,tmp1.get(),1,tmp2.get(),1);
384  Vmath::Vmul(nqtot,&df[3*dir+1][0],1,tmp1.get(),1,tmp3.get(),1);
385  Vmath::Vmul(nqtot,&df[3*dir+2][0],1,tmp1.get(),1,tmp4.get(),1);
386  }
387  else
388  {
389  Vmath::Smul(nqtot, df[3*dir][0], tmp1.get(),1,tmp2.get(), 1);
390  Vmath::Smul(nqtot, df[3*dir+1][0],tmp1.get(),1,tmp3.get(), 1);
391  Vmath::Smul(nqtot, df[3*dir+2][0],tmp1.get(),1,tmp4.get(), 1);
392  }
393 
394  // set up geometric factor: (1+z0)/2
395  for (i = 0; i < nquad0; ++i)
396  {
397  gfac0[i] = 0.5*(1+z0[i]);
398  }
399 
400  // Set up geometric factor: 2/(1-z2)
401  for (i = 0; i < nquad2; ++i)
402  {
403  gfac2[i] = 2.0/(1-z2[i]);
404  }
405 
406  const int nq01 = nquad0*nquad1;
407 
408  for (i = 0; i < nquad2; ++i)
409  {
410  Vmath::Smul(nq01,gfac2[i],&tmp2[0]+i*nq01,1,&tmp2[0]+i*nq01,1);
411  Vmath::Smul(nq01,gfac2[i],&tmp4[0]+i*nq01,1,&tmp5[0]+i*nq01,1);
412  }
413 
414  for(i = 0; i < nquad1*nquad2; ++i)
415  {
416  Vmath::Vmul(nquad0,&gfac0[0],1,&tmp5[0]+i*nquad0,1,
417  &tmp5[0]+i*nquad0,1);
418  }
419 
420  Vmath::Vadd(nqtot, &tmp2[0], 1, &tmp5[0], 1, &tmp2[0], 1);
421 
422  IProductWRTBase_SumFacKernel(m_base[0]->GetDbdata(),
423  m_base[1]->GetBdata (),
424  m_base[2]->GetBdata (),
425  tmp2,outarray,wsp,
426  true,true,true);
427 
428  IProductWRTBase_SumFacKernel(m_base[0]->GetBdata (),
429  m_base[1]->GetDbdata(),
430  m_base[2]->GetBdata (),
431  tmp3,tmp6,wsp,
432  true,true,true);
433 
434  Vmath::Vadd(m_ncoeffs, tmp6, 1, outarray, 1, outarray, 1);
435 
436  IProductWRTBase_SumFacKernel(m_base[0]->GetBdata (),
437  m_base[1]->GetBdata (),
438  m_base[2]->GetDbdata(),
439  tmp4,tmp6,wsp,
440  true,true,true);
441 
442  Vmath::Vadd(m_ncoeffs, tmp6, 1, outarray, 1, outarray, 1);
443  }
const LibUtilities::PointsKeyVector GetPointsKeys() const
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdExpansion.h:942
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
Definition: Expansion.h:126
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)
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
Definition: Vmath.cpp:199
Array< OneD, LibUtilities::BasisSharedPtr > m_base
Geometry is curved or has non-constant factors.
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::LocalRegions::PrismExp::v_LaplacianMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 964 of file PrismExp.cpp.

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

968  {
969  PrismExp::LaplacianMatrixOp_MatFree(inarray,outarray,mkey);
970  }
void LaplacianMatrixOp_MatFree(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdMatrixKey &mkey)
void Nektar::LocalRegions::PrismExp::v_LaplacianMatrixOp ( const int  k1,
const int  k2,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 972 of file PrismExp.cpp.

978  {
979  StdExpansion::LaplacianMatrixOp_MatFree(k1,k2,inarray,outarray,mkey);
980  }
void Nektar::LocalRegions::PrismExp::v_LaplacianMatrixOp_MatFree_Kernel ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
Array< OneD, NekDouble > &  wsp 
)
privatevirtual

Calculate the Laplacian multiplication in a matrix-free manner.

This function is the kernel of the Laplacian matrix-free operator, and is used in v_HelmholtzMatrixOp_MatFree to determine the effect of the Helmholtz operator in a similar fashion.

The majority of the calculation is precisely the same as in the hexahedral expansion; however the collapsed co-ordinate system must be taken into account when constructing the geometric factors. How this is done is detailed more exactly in the tetrahedral expansion. On entry to this function, the input #inarray must be in its backwards-transformed state (i.e. $\mathbf{u} = \mathbf{B}\hat{\mathbf{u}}$). The output is in coefficient space.

See also
TetExp::v_HelmholtzMatrixOp_MatFree

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 1544 of file PrismExp.cpp.

References Nektar::SpatialDomains::eDeformed, Vmath::Fill(), Nektar::StdRegions::StdExpansion::GetPointsKeys(), Nektar::StdRegions::StdExpansion3D::IProductWRTBase_SumFacKernel(), Nektar::StdRegions::StdExpansion::m_base, Nektar::LocalRegions::Expansion::m_metricinfo, Nektar::StdRegions::StdExpansion::m_ncoeffs, Nektar::StdRegions::StdExpansion::MultiplyByQuadratureMetric(), Vmath::Svtsvtp(), Vmath::Svtvp(), Vmath::Vadd(), Vmath::Vvtvp(), and Vmath::Vvtvvtp().

1548  {
1549  int nquad0 = m_base[0]->GetNumPoints();
1550  int nquad1 = m_base[1]->GetNumPoints();
1551  int nquad2 = m_base[2]->GetNumPoints();
1552  int nqtot = nquad0*nquad1*nquad2;
1553  int i;
1554 
1555  // Set up temporary storage.
1556  Array<OneD,NekDouble> alloc(11*nqtot,0.0);
1557  Array<OneD,NekDouble> wsp1 (alloc ); // TensorDeriv 1
1558  Array<OneD,NekDouble> wsp2 (alloc+ 1*nqtot); // TensorDeriv 2
1559  Array<OneD,NekDouble> wsp3 (alloc+ 2*nqtot); // TensorDeriv 3
1560  Array<OneD,NekDouble> g0 (alloc+ 3*nqtot); // g0
1561  Array<OneD,NekDouble> g1 (alloc+ 4*nqtot); // g1
1562  Array<OneD,NekDouble> g2 (alloc+ 5*nqtot); // g2
1563  Array<OneD,NekDouble> g3 (alloc+ 6*nqtot); // g3
1564  Array<OneD,NekDouble> g4 (alloc+ 7*nqtot); // g4
1565  Array<OneD,NekDouble> g5 (alloc+ 8*nqtot); // g5
1566  Array<OneD,NekDouble> h0 (alloc+ 3*nqtot); // h0 == g0
1567  Array<OneD,NekDouble> h1 (alloc+ 6*nqtot); // h1 == g3
1568  Array<OneD,NekDouble> wsp4 (alloc+ 4*nqtot); // wsp4 == g1
1569  Array<OneD,NekDouble> wsp5 (alloc+ 5*nqtot); // wsp5 == g2
1570  Array<OneD,NekDouble> wsp6 (alloc+ 8*nqtot); // wsp6 == g5
1571  Array<OneD,NekDouble> wsp7 (alloc+ 3*nqtot); // wsp7 == g0
1572  Array<OneD,NekDouble> wsp8 (alloc+ 9*nqtot); // wsp8
1573  Array<OneD,NekDouble> wsp9 (alloc+10*nqtot); // wsp9
1574 
1575  const Array<OneD, const NekDouble>& base0 = m_base[0]->GetBdata();
1576  const Array<OneD, const NekDouble>& base1 = m_base[1]->GetBdata();
1577  const Array<OneD, const NekDouble>& base2 = m_base[2]->GetBdata();
1578  const Array<OneD, const NekDouble>& dbase0 = m_base[0]->GetDbdata();
1579  const Array<OneD, const NekDouble>& dbase1 = m_base[1]->GetDbdata();
1580  const Array<OneD, const NekDouble>& dbase2 = m_base[2]->GetDbdata();
1581 
1582  // Step 1. LAPLACIAN MATRIX OPERATION
1583  // wsp1 = du_dxi1 = D_xi1 * wsp0 = D_xi1 * u
1584  // wsp2 = du_dxi2 = D_xi2 * wsp0 = D_xi2 * u
1585  // wsp3 = du_dxi3 = D_xi3 * wsp0 = D_xi3 * u
1586  StdExpansion3D::PhysTensorDeriv(inarray,wsp1,wsp2,wsp3);
1587 
1588  const Array<TwoD, const NekDouble>& df =
1589  m_metricinfo->GetDerivFactors(GetPointsKeys());
1590  const Array<OneD, const NekDouble>& z0 = m_base[0]->GetZ();
1591  const Array<OneD, const NekDouble>& z2 = m_base[2]->GetZ();
1592 
1593  // Step 2. Calculate the metric terms of the collapsed
1594  // coordinate transformation (Spencer's book P152)
1595  for (i = 0; i < nquad2; ++i)
1596  {
1597  Vmath::Fill(nquad0*nquad1, 2.0/(1.0-z2[i]), &h0[0]+i*nquad0*nquad1,1);
1598  Vmath::Fill(nquad0*nquad1, 2.0/(1.0-z2[i]), &h1[0]+i*nquad0*nquad1,1);
1599  }
1600  for (i = 0; i < nquad0; i++)
1601  {
1602  Blas::Dscal(nquad1*nquad2, 0.5*(1+z0[i]), &h1[0]+i, nquad0);
1603  }
1604 
1605  // Step 3. Construct combined metric terms for physical space to
1606  // collapsed coordinate system. Order of construction optimised
1607  // to minimise temporary storage
1608  if (m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
1609  {
1610  // wsp4 = d eta_1/d x_1
1611  Vmath::Vvtvvtp(nqtot, &df[0][0], 1, &h0[0], 1, &df[2][0], 1, &h1[0], 1, &wsp4[0], 1);
1612  // wsp5 = d eta_2/d x_1
1613  Vmath::Vvtvvtp(nqtot, &df[3][0], 1, &h0[0], 1, &df[5][0], 1, &h1[0], 1, &wsp5[0], 1);
1614  // wsp6 = d eta_3/d x_1d
1615  Vmath::Vvtvvtp(nqtot, &df[6][0], 1, &h0[0], 1, &df[8][0], 1, &h1[0], 1, &wsp6[0], 1);
1616 
1617  // g0 (overwrites h0)
1618  Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0], 1, &g0[0], 1);
1619  Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1620 
1621  // g3 (overwrites h1)
1622  Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &wsp4[0], 1, &df[4][0], 1, &wsp5[0], 1, &g3[0], 1);
1623  Vmath::Vvtvp (nqtot, &df[7][0], 1, &wsp6[0], 1, &g3[0], 1, &g3[0], 1);
1624 
1625  // g4
1626  Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &wsp4[0], 1, &df[5][0], 1, &wsp5[0], 1, &g4[0], 1);
1627  Vmath::Vvtvp (nqtot, &df[8][0], 1, &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1628 
1629  // Overwrite wsp4/5/6 with g1/2/5
1630  // g1
1631  Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &df[1][0], 1, &df[4][0], 1, &df[4][0], 1, &g1[0], 1);
1632  Vmath::Vvtvp (nqtot, &df[7][0], 1, &df[7][0], 1, &g1[0], 1, &g1[0], 1);
1633 
1634  // g2
1635  Vmath::Vvtvvtp(nqtot, &df[2][0], 1, &df[2][0], 1, &df[5][0], 1, &df[5][0], 1, &g2[0], 1);
1636  Vmath::Vvtvp (nqtot, &df[8][0], 1, &df[8][0], 1, &g2[0], 1, &g2[0], 1);
1637 
1638  // g5
1639  Vmath::Vvtvvtp(nqtot, &df[1][0], 1, &df[2][0], 1, &df[4][0], 1, &df[5][0], 1, &g5[0], 1);
1640  Vmath::Vvtvp (nqtot, &df[7][0], 1, &df[8][0], 1, &g5[0], 1, &g5[0], 1);
1641  }
1642  else
1643  {
1644  // wsp4 = d eta_1/d x_1
1645  Vmath::Svtsvtp(nqtot, df[0][0], &h0[0], 1, df[2][0], &h1[0], 1, &wsp4[0], 1);
1646  // wsp5 = d eta_2/d x_1
1647  Vmath::Svtsvtp(nqtot, df[3][0], &h0[0], 1, df[5][0], &h1[0], 1, &wsp5[0], 1);
1648  // wsp6 = d eta_3/d x_1
1649  Vmath::Svtsvtp(nqtot, df[6][0], &h0[0], 1, df[8][0], &h1[0], 1, &wsp6[0], 1);
1650 
1651  // g0 (overwrites h0)
1652  Vmath::Vvtvvtp(nqtot, &wsp4[0], 1, &wsp4[0], 1, &wsp5[0], 1, &wsp5[0], 1, &g0[0], 1);
1653  Vmath::Vvtvp (nqtot, &wsp6[0], 1, &wsp6[0], 1, &g0[0], 1, &g0[0], 1);
1654 
1655  // g3 (overwrites h1)
1656  Vmath::Svtsvtp(nqtot, df[1][0], &wsp4[0], 1, df[4][0], &wsp5[0], 1, &g3[0], 1);
1657  Vmath::Svtvp (nqtot, df[7][0], &wsp6[0], 1, &g3[0], 1, &g3[0], 1);
1658 
1659  // g4
1660  Vmath::Svtsvtp(nqtot, df[2][0], &wsp4[0], 1, df[5][0], &wsp5[0], 1, &g4[0], 1);
1661  Vmath::Svtvp (nqtot, df[8][0], &wsp6[0], 1, &g4[0], 1, &g4[0], 1);
1662 
1663  // Overwrite wsp4/5/6 with g1/2/5
1664  // g1
1665  Vmath::Fill(nqtot, df[1][0]*df[1][0] + df[4][0]*df[4][0] + df[7][0]*df[7][0], &g1[0], 1);
1666 
1667  // g2
1668  Vmath::Fill(nqtot, df[2][0]*df[2][0] + df[5][0]*df[5][0] + df[8][0]*df[8][0], &g2[0], 1);
1669 
1670  // g5
1671  Vmath::Fill(nqtot, df[1][0]*df[2][0] + df[4][0]*df[5][0] + df[7][0]*df[8][0], &g5[0], 1);
1672  }
1673  // Compute component derivatives into wsp7, 8, 9 (wsp7 overwrites
1674  // g0).
1675  Vmath::Vvtvvtp(nqtot,&g0[0],1,&wsp1[0],1,&g3[0],1,&wsp2[0],1,&wsp7[0],1);
1676  Vmath::Vvtvp (nqtot,&g4[0],1,&wsp3[0],1,&wsp7[0],1,&wsp7[0],1);
1677  Vmath::Vvtvvtp(nqtot,&g1[0],1,&wsp2[0],1,&g3[0],1,&wsp1[0],1,&wsp8[0],1);
1678  Vmath::Vvtvp (nqtot,&g5[0],1,&wsp3[0],1,&wsp8[0],1,&wsp8[0],1);
1679  Vmath::Vvtvvtp(nqtot,&g2[0],1,&wsp3[0],1,&g4[0],1,&wsp1[0],1,&wsp9[0],1);
1680  Vmath::Vvtvp (nqtot,&g5[0],1,&wsp2[0],1,&wsp9[0],1,&wsp9[0],1);
1681 
1682  // Step 4.
1683  // Multiply by quadrature metric
1684  MultiplyByQuadratureMetric(wsp7,wsp7);
1685  MultiplyByQuadratureMetric(wsp8,wsp8);
1686  MultiplyByQuadratureMetric(wsp9,wsp9);
1687 
1688  // Perform inner product w.r.t derivative bases.
1689  IProductWRTBase_SumFacKernel(dbase0,base1,base2,wsp7,wsp1, wsp,false,true,true);
1690  IProductWRTBase_SumFacKernel(base0,dbase1,base2,wsp8,wsp2, wsp,true,false,true);
1691  IProductWRTBase_SumFacKernel(base0,base1,dbase2,wsp9,outarray,wsp,true,true,false);
1692 
1693  // Step 5.
1694  // Sum contributions from wsp1, wsp2 and outarray.
1695  Vmath::Vadd(m_ncoeffs,wsp1.get(),1,outarray.get(),1,outarray.get(),1);
1696  Vmath::Vadd(m_ncoeffs,wsp2.get(),1,outarray.get(),1,outarray.get(),1);
1697  }
const LibUtilities::PointsKeyVector GetPointsKeys() const
void MultiplyByQuadratureMetric(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: StdExpansion.h:942
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition: Vmath.cpp:46
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
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
Definition: Expansion.h:126
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)
void Vvtvvtp(int n, const T *v, int incv, const T *w, int incw, const T *x, int incx, const T *y, int incy, T *z, int incz)
vvtvvtp (vector times vector plus vector times vector):
Definition: Vmath.cpp:523
void Svtsvtp(int n, const T alpha, const T *x, int incx, const T beta, const T *y, int incy, T *z, int incz)
vvtvvtp (scalar times vector plus scalar times vector):
Definition: Vmath.cpp:577
Array< OneD, LibUtilities::BasisSharedPtr > m_base
Geometry is curved or has non-constant factors.
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::LocalRegions::PrismExp::v_MassMatrixOp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const StdRegions::StdMatrixKey mkey 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 956 of file PrismExp.cpp.

960  {
961  StdExpansion::MassMatrixOp_MatFree(inarray,outarray,mkey);
962  }
void Nektar::LocalRegions::PrismExp::v_PhysDeriv ( const Array< OneD, const NekDouble > &  u_physical,
Array< OneD, NekDouble > &  out_dxi1,
Array< OneD, NekDouble > &  out_dxi2,
Array< OneD, NekDouble > &  out_dxi3 
)
protectedvirtual

Calculate the derivative of the physical points.

The derivative is evaluated at the nodal physical points. Derivatives with respect to the local Cartesian coordinates.

$\begin{Bmatrix} \frac {\partial} {\partial \xi_1} \\ \frac {\partial} {\partial \xi_2} \\ \frac {\partial} {\partial \xi_3} \end{Bmatrix} = \begin{Bmatrix} \frac 2 {(1-\eta_3)} \frac \partial {\partial \bar \eta_1} \\ \frac {\partial} {\partial \xi_2} \ \ \frac {(1 + \bar \eta_1)} {(1 - \eta_3)} \frac \partial {\partial \bar \eta_1} + \frac {\partial} {\partial \eta_3} \end{Bmatrix}$

Reimplemented from Nektar::StdRegions::StdPrismExp.

Definition at line 135 of file PrismExp.cpp.

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

139  {
140  int nqtot = GetTotPoints();
141 
142  Array<TwoD, const NekDouble> df =
143  m_metricinfo->GetDerivFactors(GetPointsKeys());
144  Array<OneD, NekDouble> diff0(nqtot);
145  Array<OneD, NekDouble> diff1(nqtot);
146  Array<OneD, NekDouble> diff2(nqtot);
147 
148  StdPrismExp::v_PhysDeriv(inarray, diff0, diff1, diff2);
149 
150  if(m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
151  {
152  if(out_d0.num_elements())
153  {
154  Vmath::Vmul (nqtot,&df[0][0],1,&diff0[0],1,&out_d0[0],1);
155  Vmath::Vvtvp (nqtot,&df[1][0],1,&diff1[0],1,&out_d0[0],1,&out_d0[0],1);
156  Vmath::Vvtvp (nqtot,&df[2][0],1,&diff2[0],1,&out_d0[0],1,&out_d0[0],1);
157  }
158 
159  if(out_d1.num_elements())
160  {
161  Vmath::Vmul (nqtot,&df[3][0],1,&diff0[0],1,&out_d1[0],1);
162  Vmath::Vvtvp (nqtot,&df[4][0],1,&diff1[0],1,&out_d1[0],1,&out_d1[0],1);
163  Vmath::Vvtvp (nqtot,&df[5][0],1,&diff2[0],1,&out_d1[0],1,&out_d1[0],1);
164  }
165 
166  if(out_d2.num_elements())
167  {
168  Vmath::Vmul (nqtot,&df[6][0],1,&diff0[0],1,&out_d2[0],1);
169  Vmath::Vvtvp (nqtot,&df[7][0],1,&diff1[0],1,&out_d2[0],1,&out_d2[0],1);
170  Vmath::Vvtvp (nqtot,&df[8][0],1,&diff2[0],1,&out_d2[0],1,&out_d2[0],1);
171  }
172  }
173  else // regular geometry
174  {
175  if(out_d0.num_elements())
176  {
177  Vmath::Smul (nqtot,df[0][0],&diff0[0],1,&out_d0[0],1);
178  Blas::Daxpy (nqtot,df[1][0],&diff1[0],1,&out_d0[0],1);
179  Blas::Daxpy (nqtot,df[2][0],&diff2[0],1,&out_d0[0],1);
180  }
181 
182  if(out_d1.num_elements())
183  {
184  Vmath::Smul (nqtot,df[3][0],&diff0[0],1,&out_d1[0],1);
185  Blas::Daxpy (nqtot,df[4][0],&diff1[0],1,&out_d1[0],1);
186  Blas::Daxpy (nqtot,df[5][0],&diff2[0],1,&out_d1[0],1);
187  }
188 
189  if(out_d2.num_elements())
190  {
191  Vmath::Smul (nqtot,df[6][0],&diff0[0],1,&out_d2[0],1);
192  Blas::Daxpy (nqtot,df[7][0],&diff1[0],1,&out_d2[0],1);
193  Blas::Daxpy (nqtot,df[8][0],&diff2[0],1,&out_d2[0],1);
194  }
195  }
196  }
const LibUtilities::PointsKeyVector GetPointsKeys() const
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
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
Definition: Expansion.h:126
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
Definition: StdExpansion.h:141
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
Definition: Vmath.cpp:199
Geometry is curved or has non-constant factors.
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:169
NekDouble Nektar::LocalRegions::PrismExp::v_PhysEvaluate ( const Array< OneD, const NekDouble > &  coords,
const Array< OneD, const NekDouble > &  physvals 
)
protectedvirtual

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

Based on the value of the expansion at the quadrature points, 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\]

This function requires that the physical value array $\mathbf{u}$ (implemented as the attribute #phys) is set.

Parameters
coordsthe coordinates of the single point
Returns
returns the value of the expansion at the single point

Reimplemented from Nektar::StdRegions::StdExpansion3D.

Definition at line 500 of file PrismExp.cpp.

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

502  {
503  Array<OneD, NekDouble> Lcoord(3);
504 
505  ASSERTL0(m_geom,"m_geom not defined");
506 
507  m_geom->GetLocCoords(coord, Lcoord);
508 
509  return StdPrismExp::v_PhysEvaluate(Lcoord, physvals);
510  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
SpatialDomains::GeometrySharedPtr m_geom
Definition: Expansion.h:125
NekDouble Nektar::LocalRegions::PrismExp::v_StdPhysEvaluate ( const Array< OneD, const NekDouble > &  Lcoord,
const Array< OneD, const NekDouble > &  physvals 
)
protectedvirtual

Given the local cartesian coordinate Lcoord evaluate the value of physvals at this point by calling through to the StdExpansion method

Reimplemented from Nektar::StdRegions::StdExpansion.

Definition at line 492 of file PrismExp.cpp.

495  {
496  // Evaluate point in local (eta) coordinates.
497  return StdPrismExp::v_PhysEvaluate(Lcoord,physvals);
498  }
void Nektar::LocalRegions::PrismExp::v_SVVLaplacianFilter ( Array< OneD, NekDouble > &  array,
const StdRegions::StdMatrixKey mkey 
)
protectedvirtual

Reimplemented from Nektar::StdRegions::StdPrismExp.

Definition at line 1012 of file PrismExp.cpp.

References Nektar::SpatialDomains::eDeformed, Vmath::Fill(), Nektar::StdRegions::StdExpansion::GetPointsKeys(), Nektar::StdRegions::StdExpansion::GetTotPoints(), Nektar::LocalRegions::Expansion::m_metricinfo, Vmath::Vdiv(), Vmath::Vmul(), and Vmath::Vsqrt().

1015  {
1016  int nq = GetTotPoints();
1017 
1018  // Calculate sqrt of the Jacobian
1019  Array<OneD, const NekDouble> jac =
1020  m_metricinfo->GetJac(GetPointsKeys());
1021  Array<OneD, NekDouble> sqrt_jac(nq);
1022  if (m_metricinfo->GetGtype() == SpatialDomains::eDeformed)
1023  {
1024  Vmath::Vsqrt(nq,jac,1,sqrt_jac,1);
1025  }
1026  else
1027  {
1028  Vmath::Fill(nq,sqrt(jac[0]),sqrt_jac,1);
1029  }
1030 
1031  // Multiply array by sqrt(Jac)
1032  Vmath::Vmul(nq,sqrt_jac,1,array,1,array,1);
1033 
1034  // Apply std region filter
1035  StdPrismExp::v_SVVLaplacianFilter( array, mkey);
1036 
1037  // Divide by sqrt(Jac)
1038  Vmath::Vdiv(nq,array,1,sqrt_jac,1,array,1);
1039  }
const LibUtilities::PointsKeyVector GetPointsKeys() const
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
Definition: Vmath.cpp:394
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.
Definition: Vmath.cpp:46
SpatialDomains::GeomFactorsSharedPtr m_metricinfo
Definition: Expansion.h:126
void Vdiv(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x/y.
Definition: Vmath.cpp:227
int GetTotPoints() const
This function returns the total number of quadrature points used in the element.
Definition: StdExpansion.h:141
Geometry is curved or has non-constant factors.
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Definition: Vmath.cpp:169

Member Data Documentation

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

Definition at line 206 of file PrismExp.h.

Referenced by CreateMatrix(), v_FwdTrans(), and v_GetLocMatrix().

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

Definition at line 208 of file PrismExp.h.

Referenced by v_DropLocStaticCondMatrix(), and v_GetLocStaticCondMatrix().