Nektar++
Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
Nektar::MultiRegions::ExpList Class Reference

Base class for all multi-elemental spectral/hp expansions. More...

#include <ExpList.h>

Inheritance diagram for Nektar::MultiRegions::ExpList:
Inheritance graph
[legend]
Collaboration diagram for Nektar::MultiRegions::ExpList:
Collaboration graph
[legend]

Public Member Functions

 ExpList ()
 The default constructor. More...
 
 ExpList (const LibUtilities::SessionReaderSharedPtr &pSession)
 The default constructor. More...
 
 ExpList (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 The default constructor. More...
 
 ExpList (const ExpList &in, const bool DeclareCoeffPhysArrays=true)
 The copy constructor. More...
 
virtual ~ExpList ()
 The default destructor. More...
 
int GetNcoeffs (void) const
 Returns the total number of local degrees of freedom $N_{\mathrm{eof}}=\sum_{e=1}^{{N_{\mathrm{el}}}}N^{e}_m$. More...
 
int GetNcoeffs (const int eid) const
 Returns the total number of local degrees of freedom for element eid. More...
 
ExpansionType GetExpType (void)
 Returns the type of the expansion. More...
 
void SetExpType (ExpansionType Type)
 Returns the type of the expansion. More...
 
int EvalBasisNumModesMax (void) const
 Evaulates the maximum number of modes in the elemental basis order over all elements. More...
 
const Array< OneD, int > EvalBasisNumModesMaxPerExp (void) const
 Returns the vector of the number of modes in the elemental basis order over all elements. More...
 
int GetTotPoints (void) const
 Returns the total number of quadrature points m_npoints $=Q_{\mathrm{tot}}$. More...
 
int GetTotPoints (const int eid) const
 Returns the total number of quadrature points for eid's element $=Q_{\mathrm{tot}}$. More...
 
int GetNpoints (void) const
 Returns the total number of quadrature points m_npoints $=Q_{\mathrm{tot}}$. More...
 
int Get1DScaledTotPoints (const NekDouble scale) const
 Returns the total number of qudature points scaled by the factor scale on each 1D direction. More...
 
void SetWaveSpace (const bool wavespace)
 Sets the wave space to the one of the possible configuration true or false. More...
 
void SetModifiedBasis (const bool modbasis)
 Set Modified Basis for the stability analysis. More...
 
void SetPhys (int i, NekDouble val)
 Set the i th value of m_phys to value val. More...
 
bool GetWaveSpace (void) const
 This function returns the third direction expansion condition, which can be in wave space (coefficient) or not It is stored in the variable m_WaveSpace. More...
 
void SetPhys (const Array< OneD, const NekDouble > &inarray)
 Fills the array m_phys. More...
 
void SetPhysArray (Array< OneD, NekDouble > &inarray)
 Sets the array m_phys. More...
 
void SetPhysState (const bool physState)
 This function manually sets whether the array of physical values $\boldsymbol{u}_l$ (implemented as m_phys) is filled or not. More...
 
bool GetPhysState (void) const
 This function indicates whether the array of physical values $\boldsymbol{u}_l$ (implemented as m_phys) is filled or not. More...
 
NekDouble PhysIntegral (void)
 This function integrates a function $f(\boldsymbol{x})$ over the domain consisting of all the elements of the expansion. More...
 
NekDouble PhysIntegral (const Array< OneD, const NekDouble > &inarray)
 This function integrates a function $f(\boldsymbol{x})$ over the domain consisting of all the elements of the expansion. More...
 
void IProductWRTBase_IterPerExp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function calculates the inner product of a function $f(\boldsymbol{x})$ with respect to all {local} expansion modes $\phi_n^e(\boldsymbol{x})$. More...
 
void IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
 
void IProductWRTDerivBase (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function calculates the inner product of a function $f(\boldsymbol{x})$ with respect to the derivative (in direction. More...
 
void IProductWRTDerivBase (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, NekDouble > &outarray)
 This function calculates the inner product of a function $f(\boldsymbol{x})$ with respect to the derivative (in direction. More...
 
void FwdTrans_IterPerExp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function elementally evaluates the forward transformation of a function $u(\boldsymbol{x})$ onto the global spectral/hp expansion. More...
 
void FwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
 
void MultiplyByElmtInvMass (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function elementally mulplies the coefficient space of Sin my the elemental inverse of the mass matrix. More...
 
void MultiplyByInvMassMatrix (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
 
void SmoothField (Array< OneD, NekDouble > &field)
 Smooth a field across elements. More...
 
void HelmSolve (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const FlagList &flags, const StdRegions::ConstFactorMap &factors, const StdRegions::VarCoeffMap &varcoeff=StdRegions::NullVarCoeffMap, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
 Solve helmholtz problem. More...
 
void LinearAdvectionDiffusionReactionSolve (const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, CoeffState coeffstate=eLocal, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
 Solve Advection Diffusion Reaction. More...
 
void LinearAdvectionReactionSolve (const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, CoeffState coeffstate=eLocal, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
 Solve Advection Diffusion Reaction. More...
 
void FwdTrans_BndConstrained (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void BwdTrans_IterPerExp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function elementally evaluates the backward transformation of the global spectral/hp element expansion. More...
 
void BwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
 
void GetCoords (Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1=NullNekDouble1DArray, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
 This function calculates the coordinates of all the elemental quadrature points $\boldsymbol{x}_i$. More...
 
void HomogeneousFwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
 
void HomogeneousBwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
 
void DealiasedProd (const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
 
void GetBCValues (Array< OneD, NekDouble > &BndVals, const Array< OneD, NekDouble > &TotField, int BndID)
 
void NormVectorIProductWRTBase (Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
 
void ApplyGeomInfo ()
 Apply geometry information to each expansion. More...
 
void Reset ()
 Reset geometry information and reset matrices. More...
 
void WriteTecplotHeader (std::ostream &outfile, std::string var="")
 
void WriteTecplotZone (std::ostream &outfile, int expansion=-1)
 
void WriteTecplotField (std::ostream &outfile, int expansion=-1)
 
void WriteTecplotConnectivity (std::ostream &outfile, int expansion=-1)
 
void WriteVtkHeader (std::ostream &outfile)
 
void WriteVtkFooter (std::ostream &outfile)
 
void WriteVtkPieceHeader (std::ostream &outfile, int expansion, int istrip=0)
 
void WriteVtkPieceFooter (std::ostream &outfile, int expansion)
 
void WriteVtkPieceData (std::ostream &outfile, int expansion, std::string var="v")
 
int GetCoordim (int eid)
 This function returns the dimension of the coordinates of the element eid. More...
 
void SetCoeff (int i, NekDouble val)
 Set the i th coefficiient in m_coeffs to value val. More...
 
void SetCoeffs (int i, NekDouble val)
 Set the i th coefficiient in m_coeffs to value val. More...
 
void SetCoeffsArray (Array< OneD, NekDouble > &inarray)
 Set the m_coeffs array to inarray. More...
 
const Array< OneD, const NekDouble > & GetCoeffs () const
 This function returns (a reference to) the array $\boldsymbol{\hat{u}}_l$ (implemented as m_coeffs) containing all local expansion coefficients. More...
 
void ImposeDirichletConditions (Array< OneD, NekDouble > &outarray)
 Impose Dirichlet Boundary Conditions onto Array. More...
 
void FillBndCondFromField (void)
 Fill Bnd Condition expansion from the values stored in expansion. More...
 
void LocalToGlobal (void)
 Put the coefficients into global ordering using m_coeffs. More...
 
void GlobalToLocal (void)
 Put the coefficients into local ordering and place in m_coeffs. More...
 
NekDouble GetCoeff (int i)
 Get the i th value (coefficient) of m_coeffs. More...
 
NekDouble GetCoeffs (int i)
 Get the i th value (coefficient) of m_coeffs. More...
 
const Array< OneD, const NekDouble > & GetPhys () const
 This function returns (a reference to) the array $\boldsymbol{u}_l$ (implemented as m_phys) containing the function $u^{\delta}(\boldsymbol{x})$ evaluated at the quadrature points. More...
 
NekDouble Linf (const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
 This function calculates the $L_\infty$ error of the global spectral/hp element approximation. More...
 
NekDouble L2 (const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
 This function calculates the $L_2$ error with respect to soln of the global spectral/hp element approximation. More...
 
NekDouble H1 (const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
 Calculates the $H^1$ error of the global spectral/hp element approximation. More...
 
NekDouble Integral (const Array< OneD, const NekDouble > &inarray)
 
Array< OneD, const NekDoubleHomogeneousEnergy (void)
 This function calculates the energy associated with each one of the modesof a 3D homogeneous nD expansion. More...
 
void SetHomo1DSpecVanVisc (Array< OneD, NekDouble > visc)
 This function sets the Spectral Vanishing Viscosity in homogeneous1D expansion. More...
 
Array< OneD, const unsigned int > GetZIDs (void)
 This function returns a vector containing the wave numbers in z-direction associated with the 3D homogenous expansion. Required if a parellelisation is applied in the Fourier direction. More...
 
LibUtilities::TranspositionSharedPtr GetTransposition (void)
 This function returns the transposition class associaed with the homogeneous expansion. More...
 
NekDouble GetHomoLen (void)
 This function returns the Width of homogeneous direction associaed with the homogeneous expansion. More...
 
Array< OneD, const unsigned int > GetYIDs (void)
 This function returns a vector containing the wave numbers in y-direction associated with the 3D homogenous expansion. Required if a parellelisation is applied in the Fourier direction. More...
 
void PhysInterp1DScaled (const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function interpolates the physical space points in inarray to outarray using the same points defined in the expansion but where the number of points are rescaled by 1DScale. More...
 
void PhysGalerkinProjection1DScaled (const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function Galerkin projects the physical space points in inarray to outarray where inarray is assumed to be defined in the expansion but where the number of points are rescaled by 1DScale. More...
 
int GetExpSize (void)
 This function returns the number of elements in the expansion. More...
 
int GetNumElmts (void)
 This function returns the number of elements in the expansion which may be different for a homogeoenous extended expansionp. More...
 
const boost::shared_ptr< LocalRegions::ExpansionVectorGetExp () const
 This function returns the vector of elements in the expansion. More...
 
LocalRegions::ExpansionSharedPtrGetExp (int n) const
 This function returns (a shared pointer to) the local elemental expansion of the $n^{\mathrm{th}}$ element. More...
 
LocalRegions::ExpansionSharedPtrGetExp (const Array< OneD, const NekDouble > &gloCoord)
 This function returns (a shared pointer to) the local elemental expansion containing the arbitrary point given by gloCoord. More...
 
int GetExpIndex (const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false)
 
int GetExpIndex (const Array< OneD, const NekDouble > &gloCoords, Array< OneD, NekDouble > &locCoords, NekDouble tol=0.0, bool returnNearestElmt=false)
 
int GetCoeff_Offset (int n) const
 Get the start offset position for a global list of m_coeffs correspoinding to element n. More...
 
int GetPhys_Offset (int n) const
 Get the start offset position for a global list of m_phys correspoinding to element n. More...
 
int GetOffset_Elmt_Id (int n) const
 Get the element id associated with the n th consecutive block of data in m_phys and m_coeffs. More...
 
Array< OneD, NekDouble > & UpdateCoeffs ()
 This function returns (a reference to) the array $\boldsymbol{\hat{u}}_l$ (implemented as m_coeffs) containing all local expansion coefficients. More...
 
Array< OneD, NekDouble > & UpdatePhys ()
 This function returns (a reference to) the array $\boldsymbol{u}_l$ (implemented as m_phys) containing the function $u^{\delta}(\boldsymbol{x})$ evaluated at the quadrature points. More...
 
void PhysDeriv (Direction edir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d)
 
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)
 This function discretely evaluates the derivative of a function $f(\boldsymbol{x})$ on the domain consisting of all elements of the expansion. More...
 
void PhysDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d)
 
const Array< OneD, const boost::shared_ptr< ExpList > > & GetBndCondExpansions ()
 
boost::shared_ptr< ExpList > & UpdateBndCondExpansion (int i)
 
void Upwind (const Array< OneD, const Array< OneD, NekDouble > > &Vec, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
 
void Upwind (const Array< OneD, const NekDouble > &Vn, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
 
boost::shared_ptr< ExpList > & GetTrace ()
 
boost::shared_ptr< AssemblyMapDG > & GetTraceMap (void)
 
const Array< OneD, const int > & GetTraceBndMap (void)
 
void GetNormals (Array< OneD, Array< OneD, NekDouble > > &normals)
 
void AddTraceIntegral (const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
 
void AddTraceIntegral (const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
 
void AddFwdBwdTraceIntegral (const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
 
void GetFwdBwdTracePhys (Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
 
void GetFwdBwdTracePhys (const Array< OneD, const NekDouble > &field, Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
 
void ExtractTracePhys (Array< OneD, NekDouble > &outarray)
 
void ExtractTracePhys (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & GetBndConditions ()
 
Array< OneD, SpatialDomains::BoundaryConditionShPtr > & UpdateBndConditions ()
 
void EvaluateBoundaryConditions (const NekDouble time=0.0, const std::string varName="", const NekDouble=NekConstants::kNekUnsetDouble, const NekDouble=NekConstants::kNekUnsetDouble)
 
void GeneralMatrixOp (const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
 This function calculates the result of the multiplication of a matrix of type specified by mkey with a vector given by inarray. More...
 
void GeneralMatrixOp_IterPerExp (const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void SetUpPhysNormals ()
 
void GetBoundaryToElmtMap (Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
 
void GeneralGetFieldDefinitions (std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef, int NumHomoDir=0, int NumHomoStrip=1, Array< OneD, LibUtilities::BasisSharedPtr > &HomoBasis=LibUtilities::NullBasisSharedPtr1DArray, std::vector< NekDouble > &HomoLen=LibUtilities::NullNekDoubleVector, std::vector< unsigned int > &HomoZIDs=LibUtilities::NullUnsignedIntVector, std::vector< unsigned int > &HomoYIDs=LibUtilities::NullUnsignedIntVector)
 
const NekOptimize::GlobalOptParamSharedPtrGetGlobalOptParam (void)
 
map< int, RobinBCInfoSharedPtrGetRobinBCInfo ()
 
void GetPeriodicEntities (PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces=NullPeriodicMap)
 
std::vector< LibUtilities::FieldDefinitionsSharedPtrGetFieldDefinitions ()
 
void GetFieldDefinitions (std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef)
 
void AppendFieldData (LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
 Append the element data listed in elements fielddef->m_ElementIDs onto fielddata. More...
 
void AppendFieldData (LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, Array< OneD, NekDouble > &coeffs)
 Append the data in coeffs listed in elements fielddef->m_ElementIDs onto fielddata. More...
 
void ExtractElmtDataToCoeffs (LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, std::string &field, Array< OneD, NekDouble > &coeffs)
 Extract the data in fielddata into the coeffs using the basic ExpList Elemental expansions rather than planes in homogeneous case. More...
 
void ExtractCoeffsToCoeffs (const boost::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
 Extract the data from fromField using fromExpList the coeffs using the basic ExpList Elemental expansions rather than planes in homogeneous case. More...
 
void ExtractDataToCoeffs (LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, std::string &field, Array< OneD, NekDouble > &coeffs)
 Extract the data in fielddata into the coeffs. More...
 
boost::shared_ptr< ExpListGetSharedThisPtr ()
 Returns a shared pointer to the current object. More...
 
boost::shared_ptr< LibUtilities::SessionReaderGetSession ()
 Returns the session object. More...
 
boost::shared_ptr< LibUtilities::CommGetComm ()
 Returns the comm object. More...
 
SpatialDomains::MeshGraphSharedPtr GetGraph ()
 
LibUtilities::BasisSharedPtr GetHomogeneousBasis (void)
 
boost::shared_ptr< ExpList > & GetPlane (int n)
 
void CreateCollections (Collections::ImplementationType ImpType=Collections::eNoImpType)
 Construct collections of elements containing a single element type and polynomial order from the list of expansions. More...
 

Public Attributes

ExpansionType m_expType
 

Protected Member Functions

boost::shared_ptr< DNekMatGenGlobalMatrixFull (const GlobalLinSysKey &mkey, const boost::shared_ptr< AssemblyMapCG > &locToGloMap)
 
const DNekScalBlkMatSharedPtr GenBlockMatrix (const GlobalMatrixKey &gkey)
 This function assembles the block diagonal matrix of local matrices of the type mtype. More...
 
const DNekScalBlkMatSharedPtrGetBlockMatrix (const GlobalMatrixKey &gkey)
 
void MultiplyByBlockMatrix (const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
boost::shared_ptr< GlobalMatrixGenGlobalMatrix (const GlobalMatrixKey &mkey, const boost::shared_ptr< AssemblyMapCG > &locToGloMap)
 Generates a global matrix from the given key and map. More...
 
void GlobalEigenSystem (const boost::shared_ptr< DNekMat > &Gmat, Array< OneD, NekDouble > &EigValsReal, Array< OneD, NekDouble > &EigValsImag, Array< OneD, NekDouble > &EigVecs=NullNekDouble1DArray)
 
boost::shared_ptr< GlobalLinSysGenGlobalLinSys (const GlobalLinSysKey &mkey, const boost::shared_ptr< AssemblyMapCG > &locToGloMap)
 This operation constructs the global linear system of type mkey. More...
 
boost::shared_ptr< GlobalLinSysGenGlobalBndLinSys (const GlobalLinSysKey &mkey, const AssemblyMapSharedPtr &locToGloMap)
 Generate a GlobalLinSys from information provided by the key "mkey" and the mapping provided in LocToGloBaseMap. More...
 
void ReadGlobalOptimizationParameters ()
 
virtual int v_GetNumElmts (void)
 
virtual const Array< OneD, const boost::shared_ptr< ExpList > > & v_GetBndCondExpansions (void)
 
virtual boost::shared_ptr< ExpList > & v_UpdateBndCondExpansion (int i)
 
virtual void v_Upwind (const Array< OneD, const Array< OneD, NekDouble > > &Vec, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
 
virtual void v_Upwind (const Array< OneD, const NekDouble > &Vn, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
 
virtual boost::shared_ptr< ExpList > & v_GetTrace ()
 
virtual boost::shared_ptr< AssemblyMapDG > & v_GetTraceMap ()
 
virtual const Array< OneD, const int > & v_GetTraceBndMap ()
 
virtual void v_GetNormals (Array< OneD, Array< OneD, NekDouble > > &normals)
 
virtual void v_AddTraceIntegral (const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
 
virtual void v_AddTraceIntegral (const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
 
virtual void v_AddFwdBwdTraceIntegral (const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
 
virtual void v_GetFwdBwdTracePhys (Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
 
virtual void v_GetFwdBwdTracePhys (const Array< OneD, const NekDouble > &field, Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
 
virtual void v_ExtractTracePhys (Array< OneD, NekDouble > &outarray)
 
virtual void v_ExtractTracePhys (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_MultiplyByInvMassMatrix (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
 
virtual void v_HelmSolve (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const FlagList &flags, const StdRegions::ConstFactorMap &factors, const StdRegions::VarCoeffMap &varcoeff, const Array< OneD, const NekDouble > &dirForcing)
 
virtual void v_LinearAdvectionDiffusionReactionSolve (const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, CoeffState coeffstate=eLocal, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
 
virtual void v_LinearAdvectionReactionSolve (const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, CoeffState coeffstate=eLocal, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
 
virtual void v_ImposeDirichletConditions (Array< OneD, NekDouble > &outarray)
 
virtual void v_FillBndCondFromField ()
 
virtual void v_Reset ()
 Reset geometry information, metrics, matrix managers and geometry information. More...
 
virtual void v_LocalToGlobal (void)
 
virtual void v_GlobalToLocal (void)
 
virtual void v_BwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
 
virtual void v_BwdTrans_IterPerExp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_FwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
 
virtual void v_FwdTrans_IterPerExp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_SmoothField (Array< OneD, NekDouble > &field)
 
virtual void v_IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
 
virtual void v_IProductWRTBase_IterPerExp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_GeneralMatrixOp (const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
 
virtual void v_GetCoords (Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
 
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)
 
virtual void v_PhysDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d)
 
virtual void v_PhysDeriv (Direction edir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d)
 
virtual void v_HomogeneousFwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
 
virtual void v_HomogeneousBwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
 
virtual void v_DealiasedProd (const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
 
virtual void v_GetBCValues (Array< OneD, NekDouble > &BndVals, const Array< OneD, NekDouble > &TotField, int BndID)
 
virtual void v_NormVectorIProductWRTBase (Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
 
virtual void v_SetUpPhysNormals ()
 
virtual void v_GetBoundaryToElmtMap (Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
 
virtual void v_ReadGlobalOptimizationParameters ()
 
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtrv_GetFieldDefinitions (void)
 
virtual void v_GetFieldDefinitions (std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef)
 
virtual void v_AppendFieldData (LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
 
virtual void v_AppendFieldData (LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, Array< OneD, NekDouble > &coeffs)
 
virtual void v_ExtractDataToCoeffs (LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, std::string &field, Array< OneD, NekDouble > &coeffs)
 Extract data from raw field data into expansion list. More...
 
virtual void v_ExtractCoeffsToCoeffs (const boost::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
 
virtual void v_WriteTecplotHeader (std::ostream &outfile, std::string var="")
 
virtual void v_WriteTecplotZone (std::ostream &outfile, int expansion)
 
virtual void v_WriteTecplotField (std::ostream &outfile, int expansion)
 
virtual void v_WriteTecplotConnectivity (std::ostream &outfile, int expansion)
 
virtual void v_WriteVtkPieceHeader (std::ostream &outfile, int expansion, int istrip)
 
virtual void v_WriteVtkPieceData (std::ostream &outfile, int expansion, std::string var)
 
virtual NekDouble v_L2 (const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
 
virtual NekDouble v_Integral (const Array< OneD, const NekDouble > &inarray)
 
virtual Array< OneD, const NekDoublev_HomogeneousEnergy (void)
 
virtual LibUtilities::TranspositionSharedPtr v_GetTransposition (void)
 
virtual NekDouble v_GetHomoLen (void)
 
virtual Array< OneD, const unsigned int > v_GetZIDs (void)
 
virtual Array< OneD, const unsigned int > v_GetYIDs (void)
 
virtual void v_PhysInterp1DScaled (const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_PhysGalerkinProjection1DScaled (const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void ExtractFileBCs (const std::string &fileName, const std::string &varName, const boost::shared_ptr< ExpList > locExpList)
 

Static Protected Member Functions

static SpatialDomains::BoundaryConditionShPtr GetBoundaryCondition (const SpatialDomains::BoundaryConditionCollection &collection, unsigned int index, const std::string &variable)
 

Protected Attributes

LibUtilities::CommSharedPtr m_comm
 Communicator. More...
 
LibUtilities::SessionReaderSharedPtr m_session
 Session. More...
 
SpatialDomains::MeshGraphSharedPtr m_graph
 Mesh associated with this expansion list. More...
 
int m_ncoeffs
 The total number of local degrees of freedom. m_ncoeffs $=N_{\mathrm{eof}}=\sum_{e=1}^{{N_{\mathrm{el}}}}N^{e}_l$. More...
 
int m_npoints
 
Array< OneD, NekDoublem_coeffs
 Concatenation of all local expansion coefficients. More...
 
Array< OneD, NekDoublem_phys
 The global expansion evaluated at the quadrature points. More...
 
bool m_physState
 The state of the array m_phys. More...
 
boost::shared_ptr< LocalRegions::ExpansionVectorm_exp
 The list of local expansions. More...
 
Collections::CollectionVector m_collections
 
std::vector< int > m_coll_coeff_offset
 Offset of elemental data into the array m_coeffs. More...
 
std::vector< int > m_coll_phys_offset
 Offset of elemental data into the array m_phys. More...
 
Array< OneD, int > m_coeff_offset
 Offset of elemental data into the array m_coeffs. More...
 
Array< OneD, int > m_phys_offset
 Offset of elemental data into the array m_phys. More...
 
Array< OneD, int > m_offset_elmt_id
 Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coeffs and m_phys is associated, i.e. for an array of constant expansion size and single shape elements m_phys[n*m_npoints] is the data related to m_exp[m_offset_elmt_id[n]];. More...
 
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
 
BlockMatrixMapShPtr m_blockMat
 
bool m_WaveSpace
 

Private Member Functions

virtual const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & v_GetBndConditions ()
 
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions ()
 
virtual void v_EvaluateBoundaryConditions (const NekDouble time=0.0, const std::string varName="", const NekDouble x2_in=NekConstants::kNekUnsetDouble, const NekDouble x3_in=NekConstants::kNekUnsetDouble)
 
virtual map< int, RobinBCInfoSharedPtrv_GetRobinBCInfo (void)
 
virtual void v_GetPeriodicEntities (PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces)
 
virtual LibUtilities::BasisSharedPtr v_GetHomogeneousBasis (void)
 
virtual void v_SetHomo1DSpecVanVisc (Array< OneD, NekDouble > visc)
 
virtual boost::shared_ptr< ExpList > & v_GetPlane (int n)
 

Detailed Description

Base class for all multi-elemental spectral/hp expansions.

All multi-elemental expansions $u^{\delta}(\boldsymbol{x})$ can be considered as the assembly of the various elemental contributions. On a discrete level, this yields,

\[u^{\delta}(\boldsymbol{x}_i)=\sum_{e=1}^{{N_{\mathrm{el}}}} \sum_{n=0}^{N^{e}_m-1}\hat{u}_n^e\phi_n^e(\boldsymbol{x}_i).\]

where ${N_{\mathrm{el}}}$ is the number of elements and $N^{e}_m$ is the local elemental number of expansion modes. As it is the lowest level class, it contains the definition of the common data and common routines to all multi-elemental expansions.

The class stores a vector of expansions, m_exp, (each derived from StdRegions::StdExpansion) which define the constituent components of the domain. The coefficients from these expansions are concatenated in m_coeffs, while the expansion evaluated at the quadrature points is stored in m_phys.

Definition at line 101 of file ExpList.h.

Constructor & Destructor Documentation

Nektar::MultiRegions::ExpList::ExpList ( )

The default constructor.

Creates an empty expansion list. The expansion list will typically be populated by a derived class (namely one of MultiRegions::ExpList1D, MultiRegions::ExpList2D or MultiRegions::ExpList3D).

Definition at line 93 of file ExpList.cpp.

References Nektar::MultiRegions::eNoType, and SetExpType().

93  :
94  m_comm(),
95  m_session(),
96  m_graph(),
97  m_ncoeffs(0),
98  m_npoints(0),
99  m_coeffs(),
100  m_phys(),
101  m_physState(false),
103  ::AllocateSharedPtr()),
104  m_coeff_offset(),
105  m_phys_offset(),
108  m_WaveSpace(false)
109  {
111  }
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:973
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:926
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:909
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:958
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:935
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:887
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:969
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:883
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:880
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:877
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:211
Nektar::MultiRegions::ExpList::ExpList ( const LibUtilities::SessionReaderSharedPtr pSession)

The default constructor.

Creates an empty expansion list. The expansion list will typically be populated by a derived class (namely one of MultiRegions::ExpList1D, MultiRegions::ExpList2D or MultiRegions::ExpList3D).

Definition at line 119 of file ExpList.cpp.

References Nektar::MultiRegions::eNoType, and SetExpType().

120  :
121  m_comm(pSession->GetComm()),
122  m_session(pSession),
123  m_graph(),
124  m_ncoeffs(0),
125  m_npoints(0),
126  m_coeffs(),
127  m_phys(),
128  m_physState(false),
130  ::AllocateSharedPtr()),
131  m_coeff_offset(),
132  m_phys_offset(),
135  m_WaveSpace(false)
136  {
138  }
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:973
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:926
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:909
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:958
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:935
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:887
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:969
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:883
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:880
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:877
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:211
Nektar::MultiRegions::ExpList::ExpList ( const LibUtilities::SessionReaderSharedPtr pSession,
const SpatialDomains::MeshGraphSharedPtr pGraph 
)

The default constructor.

Creates an empty expansion list. The expansion list will typically be populated by a derived class (namely one of MultiRegions::ExpList1D, MultiRegions::ExpList2D or MultiRegions::ExpList3D).

Definition at line 146 of file ExpList.cpp.

References Nektar::MultiRegions::eNoType, and SetExpType().

148  :
149  m_comm(pSession->GetComm()),
150  m_session(pSession),
151  m_graph(pGraph),
152  m_ncoeffs(0),
153  m_npoints(0),
154  m_coeffs(),
155  m_phys(),
156  m_physState(false),
158  ::AllocateSharedPtr()),
159  m_coeff_offset(),
160  m_phys_offset(),
163  m_WaveSpace(false)
164  {
166  }
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:973
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:926
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:909
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:958
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:935
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:887
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:969
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:883
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:880
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:877
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:211
Nektar::MultiRegions::ExpList::ExpList ( const ExpList in,
const bool  DeclareCoeffPhysArrays = true 
)

The copy constructor.

Copies an existing expansion list.

Parameters
inSource expansion list.

Definition at line 173 of file ExpList.cpp.

References Nektar::MultiRegions::eNoType, m_coeffs, m_ncoeffs, m_npoints, m_phys, and SetExpType().

173  :
174  m_comm(in.m_comm),
175  m_session(in.m_session),
176  m_graph(in.m_graph),
177  m_ncoeffs(in.m_ncoeffs),
178  m_npoints(in.m_npoints),
179  m_physState(false),
180  m_exp(in.m_exp),
181  m_collections(in.m_collections),
182  m_coll_coeff_offset(in.m_coll_coeff_offset),
183  m_coll_phys_offset(in.m_coll_phys_offset),
184  m_coeff_offset(in.m_coeff_offset),
185  m_phys_offset(in.m_phys_offset),
186  m_offset_elmt_id(in.m_offset_elmt_id),
187  m_globalOptParam(in.m_globalOptParam),
188  m_blockMat(in.m_blockMat),
189  m_WaveSpace(false)
190  {
192 
193  if(DeclareCoeffPhysArrays)
194  {
197  }
198  }
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:971
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:973
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:926
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:909
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:958
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:935
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:887
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:969
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:883
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:880
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:877
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:955
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:211
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:952
Collections::CollectionVector m_collections
Definition: ExpList.h:949
Nektar::MultiRegions::ExpList::~ExpList ( )
virtual

The default destructor.

Definition at line 216 of file ExpList.cpp.

217  {
218  }

Member Function Documentation

void Nektar::MultiRegions::ExpList::AddFwdBwdTraceIntegral ( const Array< OneD, const NekDouble > &  Fwd,
const Array< OneD, const NekDouble > &  Bwd,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 1978 of file ExpList.h.

References v_AddFwdBwdTraceIntegral().

1982  {
1983  v_AddFwdBwdTraceIntegral(Fwd,Bwd,outarray);
1984  }
virtual void v_AddFwdBwdTraceIntegral(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2298
void Nektar::MultiRegions::ExpList::AddTraceIntegral ( const Array< OneD, const NekDouble > &  Fx,
const Array< OneD, const NekDouble > &  Fy,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 1963 of file ExpList.h.

References v_AddTraceIntegral().

1967  {
1968  v_AddTraceIntegral(Fx,Fy,outarray);
1969  }
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2281
void Nektar::MultiRegions::ExpList::AddTraceIntegral ( const Array< OneD, const NekDouble > &  Fn,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 1971 of file ExpList.h.

References v_AddTraceIntegral().

1974  {
1975  v_AddTraceIntegral(Fn,outarray);
1976  }
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2281
void Nektar::MultiRegions::ExpList::AppendFieldData ( LibUtilities::FieldDefinitionsSharedPtr fielddef,
std::vector< NekDouble > &  fielddata 
)
inline

Append the element data listed in elements fielddef->m_ElementIDs onto fielddata.

Definition at line 781 of file ExpList.h.

References v_AppendFieldData().

784  {
785  v_AppendFieldData(fielddef,fielddata);
786  }
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:2061
void Nektar::MultiRegions::ExpList::AppendFieldData ( LibUtilities::FieldDefinitionsSharedPtr fielddef,
std::vector< NekDouble > &  fielddata,
Array< OneD, NekDouble > &  coeffs 
)
inline

Append the data in coeffs listed in elements fielddef->m_ElementIDs onto fielddata.

Definition at line 791 of file ExpList.h.

References v_AppendFieldData().

795  {
796  v_AppendFieldData(fielddef,fielddata,coeffs);
797  }
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:2061
void Nektar::MultiRegions::ExpList::ApplyGeomInfo ( )

Apply geometry information to each expansion.

Configures geometric info, such as tangent direction, on each expansion.

Parameters
graph2DMesh

Definition at line 1381 of file ExpList.cpp.

Referenced by Nektar::MultiRegions::DisContField1D::DisContField1D(), and Nektar::MultiRegions::DisContField3D::DisContField3D().

1382  {
1383 
1384  }
void Nektar::MultiRegions::ExpList::BwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
inline

Definition at line 1557 of file ExpList.h.

References v_BwdTrans().

Referenced by Nektar::MultiRegions::DisContField2D::L2_DGDeriv(), and v_WriteTecplotField().

1561  {
1562  v_BwdTrans(inarray,outarray,coeffstate);
1563  }
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2451
void Nektar::MultiRegions::ExpList::BwdTrans_IterPerExp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

This function elementally evaluates the backward transformation of the global spectral/hp element expansion.

Definition at line 1568 of file ExpList.h.

References v_BwdTrans_IterPerExp().

Referenced by Nektar::MultiRegions::ContField1D::BwdTrans(), Nektar::MultiRegions::ContField2D::BwdTrans(), and Nektar::MultiRegions::ContField3D::v_BwdTrans().

1571  {
1572  v_BwdTrans_IterPerExp(inarray,outarray);
1573  }
virtual void v_BwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1189
void Nektar::MultiRegions::ExpList::CreateCollections ( Collections::ImplementationType  ImpType = Collections::eNoImpType)

Construct collections of elements containing a single element type and polynomial order from the list of expansions.

Definition at line 2723 of file ExpList.cpp.

References Nektar::iterator, m_coeff_offset, m_coll_coeff_offset, m_coll_phys_offset, m_collections, m_comm, m_exp, m_phys_offset, and m_session.

Referenced by Nektar::MultiRegions::ExpList1D::ExpList1D(), Nektar::MultiRegions::ExpList2D::ExpList2D(), and Nektar::MultiRegions::ExpList3D::ExpList3D().

2724  {
2726  vector<std::pair<LocalRegions::ExpansionSharedPtr,int> > > collections;
2728  vector<std::pair<LocalRegions::ExpansionSharedPtr,int> > >::iterator it;
2729 
2730  // Figure out optimisation parameters if provided in
2731  // session file or default given
2732  Collections::CollectionOptimisation colOpt(m_session, ImpType);
2733  ImpType = colOpt.GetDefaultImplementationType();
2734 
2735  bool autotuning = colOpt.IsUsingAutotuning();
2736  bool verbose = (m_session->DefinesCmdLineArgument("verbose")) &&
2737  (m_comm->GetRank() == 0);
2738  int collmax = (colOpt.GetMaxCollectionSize() > 0
2739  ? colOpt.GetMaxCollectionSize()
2740  : 2*m_exp->size());
2741 
2742  // clear vectors in case previously called
2743  m_collections.clear();
2744  m_coll_coeff_offset.clear();
2745  m_coll_phys_offset.clear();
2746 
2747  // Loop over expansions, and create collections for each element type
2748  for (int i = 0; i < m_exp->size(); ++i)
2749  {
2750  collections[(*m_exp)[i]->DetShapeType()].push_back(
2751  std::pair<LocalRegions::ExpansionSharedPtr,int> ((*m_exp)[i],i));
2752  }
2753 
2754  for (it = collections.begin(); it != collections.end(); ++it)
2755  {
2756  LocalRegions::ExpansionSharedPtr exp = it->second[0].first;
2757 
2758  Collections::OperatorImpMap impTypes = colOpt.GetOperatorImpMap(exp);
2759  vector<StdRegions::StdExpansionSharedPtr> collExp;
2760 
2761  int prevCoeffOffset = m_coeff_offset[it->second[0].second];
2762  int prevPhysOffset = m_phys_offset [it->second[0].second];
2763  int collcnt;
2764 
2765  m_coll_coeff_offset.push_back(prevCoeffOffset);
2766  m_coll_phys_offset .push_back(prevPhysOffset);
2767 
2768  if(it->second.size() == 1) // single element case
2769  {
2770  collExp.push_back(it->second[0].first);
2771 
2772  // if no Imp Type provided and No settign in xml file.
2773  // reset impTypes using timings
2774  if(autotuning)
2775  {
2776  impTypes = colOpt.SetWithTimings(collExp,
2777  impTypes, verbose);
2778  }
2779 
2780  Collections::Collection tmp(collExp, impTypes);
2781  m_collections.push_back(tmp);
2782  }
2783  else
2784  {
2785  // set up first geometry
2786  collExp.push_back(it->second[0].first);
2787  int prevnCoeff = it->second[0].first->GetNcoeffs();
2788  int prevnPhys = it->second[0].first->GetTotPoints();
2789  collcnt = 1;
2790 
2791  for (int i = 1; i < it->second.size(); ++i)
2792  {
2793  int nCoeffs = it->second[i].first->GetNcoeffs();
2794  int nPhys = it->second[i].first->GetTotPoints();
2795  int coeffOffset = m_coeff_offset[it->second[i].second];
2796  int physOffset = m_phys_offset [it->second[i].second];
2797 
2798  // check to see if next elmt is different or
2799  // collmax reached and if so end collection
2800  // and start new one
2801  if(prevCoeffOffset + nCoeffs != coeffOffset ||
2802  prevnCoeff != nCoeffs ||
2803  prevPhysOffset + nPhys != physOffset ||
2804  prevnPhys != nPhys || collcnt >= collmax)
2805  {
2806 
2807  // if no Imp Type provided and No
2808  // settign in xml file. reset
2809  // impTypes using timings
2810  if(autotuning)
2811  {
2812  impTypes = colOpt.SetWithTimings(collExp,
2813  impTypes,
2814  verbose);
2815  }
2816 
2817  Collections::Collection tmp(collExp, impTypes);
2818  m_collections.push_back(tmp);
2819 
2820 
2821  // start new geom list
2822  collExp.clear();
2823 
2824  m_coll_coeff_offset.push_back(coeffOffset);
2825  m_coll_phys_offset .push_back(physOffset);
2826  collExp.push_back(it->second[i].first);
2827  collcnt = 1;
2828  }
2829  else // add to list of collections
2830  {
2831  collExp.push_back(it->second[i].first);
2832  collcnt++;
2833  }
2834 
2835  // if end of list finish up collection
2836  if (i == it->second.size() - 1)
2837  {
2838  // if no Imp Type provided and No
2839  // settign in xml file.
2840  if(autotuning)
2841  {
2842  impTypes = colOpt.SetWithTimings(collExp,
2843  impTypes,verbose);
2844  }
2845 
2846  Collections::Collection tmp(collExp, impTypes);
2847  m_collections.push_back(tmp);
2848  collExp.clear();
2849  collcnt = 0;
2850 
2851  }
2852 
2853  prevCoeffOffset = coeffOffset;
2854  prevPhysOffset = physOffset;
2855  prevnCoeff = nCoeffs;
2856  prevnPhys = nPhys;
2857  }
2858  }
2859  }
2860  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:958
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:880
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:877
boost::shared_ptr< Expansion > ExpansionSharedPtr
Definition: Expansion.h:68
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:955
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:952
Collections::CollectionVector m_collections
Definition: ExpList.h:949
void Nektar::MultiRegions::ExpList::DealiasedProd ( const Array< OneD, NekDouble > &  inarray1,
const Array< OneD, NekDouble > &  inarray2,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
inline

Definition at line 1699 of file ExpList.h.

References v_DealiasedProd().

1704  {
1705  v_DealiasedProd(inarray1,inarray2,outarray,coeffstate);
1706  }
virtual void v_DealiasedProd(const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.cpp:2401
int Nektar::MultiRegions::ExpList::EvalBasisNumModesMax ( void  ) const
inline

Evaulates the maximum number of modes in the elemental basis order over all elements.

Evaulates the maximum number of modes in the elemental basis order over all elements

Definition at line 1365 of file ExpList.h.

References m_exp.

Referenced by EvalBasisNumModesMaxPerExp().

1366  {
1367  unsigned int i;
1368  int returnval = 0;
1369 
1370  for(i= 0; i < (*m_exp).size(); ++i)
1371  {
1372  returnval = max(returnval,
1373  (*m_exp)[i]->EvalBasisNumModesMax());
1374  }
1375 
1376  return returnval;
1377  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
int EvalBasisNumModesMax(void) const
Evaulates the maximum number of modes in the elemental basis order over all elements.
Definition: ExpList.h:1365
const Array< OneD, int > Nektar::MultiRegions::ExpList::EvalBasisNumModesMaxPerExp ( void  ) const
inline

Returns the vector of the number of modes in the elemental basis order over all elements.

Definition at line 1382 of file ExpList.h.

References EvalBasisNumModesMax(), and m_exp.

1384  {
1385  unsigned int i;
1386  Array<OneD,int> returnval((*m_exp).size(),0);
1387 
1388  for(i= 0; i < (*m_exp).size(); ++i)
1389  {
1390  returnval[i]
1391  = max(returnval[i],(*m_exp)[i]->EvalBasisNumModesMax());
1392  }
1393 
1394  return returnval;
1395  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
int EvalBasisNumModesMax(void) const
Evaulates the maximum number of modes in the elemental basis order over all elements.
Definition: ExpList.h:1365
void Nektar::MultiRegions::ExpList::EvaluateBoundaryConditions ( const NekDouble  time = 0.0,
const std::string  varName = "",
const NekDouble  x2_in = NekConstants::kNekUnsetDouble,
const NekDouble  x3_in = NekConstants::kNekUnsetDouble 
)
inline

Definition at line 2027 of file ExpList.h.

References v_EvaluateBoundaryConditions().

Referenced by Nektar::MultiRegions::DisContField1D::DisContField1D(), Nektar::MultiRegions::DisContField2D::DisContField2D(), and Nektar::MultiRegions::DisContField3D::DisContField3D().

2032  {
2033  v_EvaluateBoundaryConditions(time, varName, x2_in, x3_in);
2034  }
virtual void v_EvaluateBoundaryConditions(const NekDouble time=0.0, const std::string varName="", const NekDouble x2_in=NekConstants::kNekUnsetDouble, const NekDouble x3_in=NekConstants::kNekUnsetDouble)
Definition: ExpList.cpp:2600
void Nektar::MultiRegions::ExpList::ExtractCoeffsToCoeffs ( const boost::shared_ptr< ExpList > &  fromExpList,
const Array< OneD, const NekDouble > &  fromCoeffs,
Array< OneD, NekDouble > &  toCoeffs 
)

Extract the data from fromField using fromExpList the coeffs using the basic ExpList Elemental expansions rather than planes in homogeneous case.

Definition at line 2098 of file ExpList.cpp.

References v_ExtractCoeffsToCoeffs().

2099  {
2100  v_ExtractCoeffsToCoeffs(fromExpList,fromCoeffs,toCoeffs);
2101  }
virtual void v_ExtractCoeffsToCoeffs(const boost::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
Definition: ExpList.cpp:2186
void Nektar::MultiRegions::ExpList::ExtractDataToCoeffs ( LibUtilities::FieldDefinitionsSharedPtr fielddef,
std::vector< NekDouble > &  fielddata,
std::string &  field,
Array< OneD, NekDouble > &  coeffs 
)

Extract the data in fielddata into the coeffs.

Definition at line 2089 of file ExpList.cpp.

References v_ExtractDataToCoeffs().

2094  {
2095  v_ExtractDataToCoeffs(fielddef,fielddata,field,coeffs);
2096  }
virtual void v_ExtractDataToCoeffs(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, std::string &field, Array< OneD, NekDouble > &coeffs)
Extract data from raw field data into expansion list.
Definition: ExpList.cpp:2111
void Nektar::MultiRegions::ExpList::ExtractElmtDataToCoeffs ( LibUtilities::FieldDefinitionsSharedPtr fielddef,
std::vector< NekDouble > &  fielddata,
std::string &  field,
Array< OneD, NekDouble > &  coeffs 
)

Extract the data in fielddata into the coeffs using the basic ExpList Elemental expansions rather than planes in homogeneous case.

void Nektar::MultiRegions::ExpList::ExtractFileBCs ( const std::string &  fileName,
const std::string &  varName,
const boost::shared_ptr< ExpList locExpList 
)
protected

Definition at line 1862 of file ExpList.cpp.

References ASSERTL0, Nektar::LibUtilities::FieldIO::Import(), and m_session.

Referenced by Nektar::MultiRegions::DisContField3D::v_EvaluateBoundaryConditions(), and Nektar::MultiRegions::DisContField2D::v_EvaluateBoundaryConditions().

1866  {
1867  string varString = fileName.substr(0, fileName.find_last_of("."));
1868  int j, k, len = varString.length();
1869  varString = varString.substr(len-1, len);
1870 
1871  std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
1872  std::vector<std::vector<NekDouble> > FieldData;
1873 
1874  LibUtilities::FieldIO f(m_session->GetComm());
1875  f.Import(fileName, FieldDef, FieldData);
1876 
1877  bool found = false;
1878  for (j = 0; j < FieldDef.size(); ++j)
1879  {
1880  for (k = 0; k < FieldDef[j]->m_fields.size(); ++k)
1881  {
1882  if (FieldDef[j]->m_fields[k] == varName)
1883  {
1884  // Copy FieldData into locExpList
1885  locExpList->ExtractDataToCoeffs(
1886  FieldDef[j], FieldData[j],
1887  FieldDef[j]->m_fields[k],
1888  locExpList->UpdateCoeffs());
1889  found = true;
1890  }
1891  }
1892  }
1893 
1894  ASSERTL0(found, "Could not find variable '"+varName+
1895  "' in file boundary condition "+fileName);
1896  locExpList->BwdTrans_IterPerExp(
1897  locExpList->GetCoeffs(),
1898  locExpList->UpdatePhys());
1899  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Import(const std::string &infilename, std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata=NullVectorNekDoubleVector, FieldMetaDataMap &fieldinfomap=NullFieldMetaDataMap, const Array< OneD, int > ElementiDs=NullInt1DArray)
Imports an FLD file.
Definition: FieldIO.cpp:383
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:880
Class for operating on FLD files.
Definition: FieldIO.h:151
void Nektar::MultiRegions::ExpList::ExtractTracePhys ( Array< OneD, NekDouble > &  outarray)
inline

Definition at line 2001 of file ExpList.h.

References v_ExtractTracePhys().

2002  {
2003  v_ExtractTracePhys(outarray);
2004  }
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2323
void Nektar::MultiRegions::ExpList::ExtractTracePhys ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 2007 of file ExpList.h.

References v_ExtractTracePhys().

2010  {
2011  v_ExtractTracePhys(inarray,outarray);
2012  }
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2323
void Nektar::MultiRegions::ExpList::FillBndCondFromField ( void  )
inline

Fill Bnd Condition expansion from the values stored in expansion.

Definition at line 1786 of file ExpList.h.

References v_FillBndCondFromField().

1787  {
1789  }
virtual void v_FillBndCondFromField()
Definition: ExpList.cpp:2432
void Nektar::MultiRegions::ExpList::FwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
inline

Definition at line 1528 of file ExpList.h.

References v_FwdTrans().

1532  {
1533  v_FwdTrans(inarray,outarray,coeffstate);
1534  }
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2458
void Nektar::MultiRegions::ExpList::FwdTrans_BndConstrained ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

Definition at line 572 of file ExpList.cpp.

References m_coeff_offset, and m_phys_offset.

575  {
576  int i;
577 
578  Array<OneD,NekDouble> e_outarray;
579 
580  for(i= 0; i < (*m_exp).size(); ++i)
581  {
582  (*m_exp)[i]->FwdTrans_BndConstrained(inarray+m_phys_offset[i],
583  e_outarray = outarray+m_coeff_offset[i]);
584  }
585  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:958
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
void Nektar::MultiRegions::ExpList::FwdTrans_IterPerExp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

This function elementally evaluates the forward transformation of a function $u(\boldsymbol{x})$ onto the global spectral/hp expansion.

Definition at line 1539 of file ExpList.h.

References v_FwdTrans_IterPerExp().

1542  {
1543  v_FwdTrans_IterPerExp(inarray,outarray);
1544  }
virtual void v_FwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:562
const DNekScalBlkMatSharedPtr Nektar::MultiRegions::ExpList::GenBlockMatrix ( const GlobalMatrixKey gkey)
protected

This function assembles the block diagonal matrix of local matrices of the type mtype.

This function assembles the block diagonal matrix $\underline{\boldsymbol{M}}^e$, which is the concatenation of the local matrices $\boldsymbol{M}^e$ of the type mtype, that is

\[ \underline{\boldsymbol{M}}^e = \left[ \begin{array}{cccc} \boldsymbol{M}^1 & 0 & \hspace{3mm}0 \hspace{3mm}& 0 \\ 0 & \boldsymbol{M}^2 & 0 & 0 \\ 0 & 0 & \ddots & 0 \\ 0 & 0 & 0 & \boldsymbol{M}^{N_{\mathrm{el}}} \end{array}\right].\]

Parameters
mtypethe type of matrix to be assembled
scalaran optional parameter
constantan optional parameter

Definition at line 636 of file ExpList.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::StdRegions::eBwdTrans, Nektar::eDIAGONAL, ErrorUtil::efatal, Nektar::StdRegions::eHelmholtz, Nektar::StdRegions::eHybridDGHelmBndLam, Nektar::StdRegions::eHybridDGLamToU, Nektar::StdRegions::eInvHybridDGHelmholtz, Nektar::StdRegions::eInvMass, Nektar::StdRegions::eIProductWRTBase, Nektar::StdRegions::eLaplacian, Nektar::StdRegions::eMass, Nektar::LibUtilities::eNoShapeType, Nektar::MultiRegions::GlobalMatrixKey::GetConstFactors(), Nektar::MultiRegions::GlobalMatrixKey::GetMatrixType(), Nektar::MultiRegions::GlobalMatrixKey::GetNVarCoeffs(), Nektar::MultiRegions::GlobalMatrixKey::GetShapeType(), Nektar::MultiRegions::GlobalMatrixKey::GetVarCoeffs(), m_exp, m_offset_elmt_id, m_phys_offset, and NEKERROR.

Referenced by GetBlockMatrix().

638  {
639  int i,cnt1;
640  int n_exp = 0;
641  DNekScalMatSharedPtr loc_mat;
642  DNekScalBlkMatSharedPtr BlkMatrix;
643  map<int,int> elmt_id;
644  LibUtilities::ShapeType ShapeType = gkey.GetShapeType();
645 
646  if(ShapeType != LibUtilities::eNoShapeType)
647  {
648  for(i = 0 ; i < (*m_exp).size(); ++i)
649  {
650  if((*m_exp)[m_offset_elmt_id[i]]->DetShapeType()
651  == ShapeType)
652  {
653  elmt_id[n_exp++] = m_offset_elmt_id[i];
654  }
655  }
656  }
657  else
658  {
659  n_exp = (*m_exp).size();
660  for(i = 0; i < n_exp; ++i)
661  {
662  elmt_id[i] = m_offset_elmt_id[i];
663  }
664  }
665 
666  Array<OneD,unsigned int> nrows(n_exp);
667  Array<OneD,unsigned int> ncols(n_exp);
668 
669  switch(gkey.GetMatrixType())
670  {
672  {
673  // set up an array of integers for block matrix construction
674  for(i = 0; i < n_exp; ++i)
675  {
676  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
677  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
678  }
679  }
680  break;
682  {
683  // set up an array of integers for block matrix construction
684  for(i = 0; i < n_exp; ++i)
685  {
686  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
687  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
688  }
689  }
690  break;
691  case StdRegions::eMass:
696  {
697  // set up an array of integers for block matrix construction
698  for(i = 0; i < n_exp; ++i)
699  {
700  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
701  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
702  }
703  }
704  break;
705 
707  {
708  // set up an array of integers for block matrix construction
709  for(i = 0; i < n_exp; ++i)
710  {
711  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
712  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
713  }
714  }
715  break;
716 
718  {
719  // set up an array of integers for block matrix construction
720  for(i = 0; i < n_exp; ++i)
721  {
722  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
723  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
724  }
725  }
726  break;
727 
728  default:
729  {
731  "Global Matrix creation not defined for this type "
732  "of matrix");
733  }
734  }
735 
736  MatrixStorage blkmatStorage = eDIAGONAL;
738  ::AllocateSharedPtr(nrows,ncols,blkmatStorage);
739 
740  int nvarcoeffs = gkey.GetNVarCoeffs();
741  int eid;
742  Array<OneD, NekDouble> varcoeffs_wk;
743 
744  for(i = cnt1 = 0; i < n_exp; ++i)
745  {
746  // need to be initialised with zero size for non variable coefficient case
747  StdRegions::VarCoeffMap varcoeffs;
748 
749  eid = elmt_id[i];
750  if(nvarcoeffs>0)
751  {
752  StdRegions::VarCoeffMap::const_iterator x;
753  for (x = gkey.GetVarCoeffs().begin(); x != gkey.GetVarCoeffs().end(); ++x)
754  {
755  varcoeffs[x->first] = x->second + m_phys_offset[eid];
756  }
757  }
758 
759  LocalRegions::MatrixKey matkey(gkey.GetMatrixType(),
760  (*m_exp)[eid]->DetShapeType(),
761  *(*m_exp)[eid],
762  gkey.GetConstFactors(),
763  varcoeffs );
764 
765  loc_mat = boost::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[elmt_id.find(i)->second])->GetLocMatrix(matkey);
766  BlkMatrix->SetBlock(i,i,loc_mat);
767  }
768 
769  return BlkMatrix;
770  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:158
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:225
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:969
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:74
void Nektar::MultiRegions::ExpList::GeneralGetFieldDefinitions ( std::vector< LibUtilities::FieldDefinitionsSharedPtr > &  fielddef,
int  NumHomoDir = 0,
int  NumHomoStrip = 1,
Array< OneD, LibUtilities::BasisSharedPtr > &  HomoBasis = LibUtilities::NullBasisSharedPtr1DArray,
std::vector< NekDouble > &  HomoLen = LibUtilities::NullNekDoubleVector,
std::vector< unsigned int > &  HomoZIDs = LibUtilities::NullUnsignedIntVector,
std::vector< unsigned int > &  HomoYIDs = LibUtilities::NullUnsignedIntVector 
)

Definition at line 1937 of file ExpList.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, ASSERTL1, Nektar::LibUtilities::eHexahedron, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eSegment, Nektar::LibUtilities::eTetrahedron, Nektar::LibUtilities::eTriangle, and m_exp.

Referenced by v_GetFieldDefinitions().

1944  {
1945  int startenum = (int) LibUtilities::eSegment;
1946  int endenum = (int) LibUtilities::eHexahedron;
1947  int s = 0;
1949 
1950  ASSERTL1(NumHomoDir == HomoBasis.num_elements(),"Homogeneous basis is not the same length as NumHomoDir");
1951  ASSERTL1(NumHomoDir == HomoLen.size(),"Homogeneous length vector is not the same length as NumHomDir");
1952 
1953  // count number of shapes
1954  switch((*m_exp)[0]->GetShapeDimension())
1955  {
1956  case 1:
1957  startenum = (int) LibUtilities::eSegment;
1958  endenum = (int) LibUtilities::eSegment;
1959  break;
1960  case 2:
1961  startenum = (int) LibUtilities::eTriangle;
1962  endenum = (int) LibUtilities::eQuadrilateral;
1963  break;
1964  case 3:
1965  startenum = (int) LibUtilities::eTetrahedron;
1966  endenum = (int) LibUtilities::eHexahedron;
1967  break;
1968  }
1969 
1970  for(s = startenum; s <= endenum; ++s)
1971  {
1972  std::vector<unsigned int> elementIDs;
1973  std::vector<LibUtilities::BasisType> basis;
1974  std::vector<unsigned int> numModes;
1975  std::vector<std::string> fields;
1976 
1977  bool first = true;
1978  bool UniOrder = true;
1979  int n;
1980 
1981  shape = (LibUtilities::ShapeType) s;
1982 
1983  for(int i = 0; i < (*m_exp).size(); ++i)
1984  {
1985  if((*m_exp)[i]->GetGeom()->GetShapeType() == shape)
1986  {
1987  elementIDs.push_back((*m_exp)[i]->GetGeom()->GetGlobalID());
1988  if(first)
1989  {
1990  for(int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
1991  {
1992  basis.push_back((*m_exp)[i]->GetBasis(j)->GetBasisType());
1993  numModes.push_back((*m_exp)[i]->GetBasis(j)->GetNumModes());
1994  }
1995 
1996  // add homogeneous direction details if defined
1997  for(n = 0 ; n < NumHomoDir; ++n)
1998  {
1999  basis.push_back(HomoBasis[n]->GetBasisType());
2000  numModes.push_back(HomoBasis[n]->GetNumModes());
2001  }
2002 
2003  first = false;
2004  }
2005  else
2006  {
2007  ASSERTL0((*m_exp)[i]->GetBasis(0)->GetBasisType() == basis[0],"Routine is not set up for multiple bases definitions");
2008 
2009  for(int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2010  {
2011  numModes.push_back((*m_exp)[i]->GetBasis(j)->GetNumModes());
2012  if(numModes[j] != (*m_exp)[i]->GetBasis(j)->GetNumModes())
2013  {
2014  UniOrder = false;
2015  }
2016  }
2017  // add homogeneous direction details if defined
2018  for(n = 0 ; n < NumHomoDir; ++n)
2019  {
2020  numModes.push_back(HomoBasis[n]->GetNumModes());
2021  }
2022  }
2023  }
2024  }
2025 
2026 
2027  if(elementIDs.size() > 0)
2028  {
2029  for(int i = 0; i < NumHomoStrip; ++i)
2030  {
2033  AllocateSharedPtr(shape, elementIDs, basis,
2034  UniOrder, numModes,fields,
2035  NumHomoDir, HomoLen, HomoZIDs,
2036  HomoYIDs);
2037  fielddef.push_back(fdef);
2038  }
2039  }
2040  }
2041  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
boost::shared_ptr< FieldDefinitions > FieldDefinitionsSharedPtr
Definition: FieldIO.h:131
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
void Nektar::MultiRegions::ExpList::GeneralMatrixOp ( const GlobalMatrixKey gkey,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
inline

This function calculates the result of the multiplication of a matrix of type specified by mkey with a vector given by inarray.

This operation is equivalent to the evaluation of $\underline{\boldsymbol{M}}^e\boldsymbol{\hat{u}}_l$, that is,

\[ \left[ \begin{array}{cccc} \boldsymbol{M}^1 & 0 & \hspace{3mm}0 \hspace{3mm}& 0 \\ 0 & \boldsymbol{M}^2 & 0 & 0 \\ 0 & 0 & \ddots & 0 \\ 0 & 0 & 0 & \boldsymbol{M}^{N_{\mathrm{el}}} \end{array} \right] *\left [ \begin{array}{c} \boldsymbol{\hat{u}}^{1} \\ \boldsymbol{\hat{u}}^{2} \\ \vdots \\ \boldsymbol{\hat{u}}^{{{N_{\mathrm{el}}}}} \end{array} \right ]\]

where $\boldsymbol{M}^e$ are the local matrices of type specified by the key mkey. The decoupling of the local matrices allows for a local evaluation of the operation. However, rather than a local matrix-vector multiplication, the local operations are evaluated as implemented in the function StdRegions::StdExpansion::GeneralMatrixOp.

Parameters
mkeyThis key uniquely defines the type matrix required for the operation.
inarrayThe vector $\boldsymbol{\hat{u}}_l$ of size $N_{\mathrm{eof}}$.
outarrayThe resulting vector of size $N_{\mathrm{eof}}$.

Definition at line 2065 of file ExpList.h.

References v_GeneralMatrixOp().

Referenced by Nektar::MultiRegions::ContField3D::GenerateDirBndCondForcing().

2070  {
2071  v_GeneralMatrixOp(gkey,inarray,outarray,coeffstate);
2072  }
virtual void v_GeneralMatrixOp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2480
void Nektar::MultiRegions::ExpList::GeneralMatrixOp_IterPerExp ( const GlobalMatrixKey gkey,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

Definition at line 787 of file ExpList.cpp.

References Nektar::MultiRegions::GlobalMatrixKey::GetConstFactors(), Nektar::MultiRegions::GlobalMatrixKey::GetMatrixType(), Nektar::MultiRegions::GlobalMatrixKey::GetNVarCoeffs(), Nektar::MultiRegions::GlobalMatrixKey::GetVarCoeffs(), m_coeff_offset, m_globalOptParam, m_offset_elmt_id, m_phys_offset, and MultiplyByBlockMatrix().

Referenced by Nektar::MultiRegions::ContField3D::v_GeneralMatrixOp(), Nektar::MultiRegions::ContField1D::v_GeneralMatrixOp(), Nektar::MultiRegions::ContField2D::v_GeneralMatrixOp(), and v_GeneralMatrixOp().

791  {
792  const Array<OneD, const bool> doBlockMatOp
793  = m_globalOptParam->DoBlockMatOp(gkey.GetMatrixType());
794  const Array<OneD, const int> num_elmts
795  = m_globalOptParam->GetShapeNumElements();
796 
797  Array<OneD,NekDouble> tmp_outarray;
798  int cnt = 0;
799  int eid;
800  for(int n = 0; n < num_elmts.num_elements(); ++n)
801  {
802  if(doBlockMatOp[n])
803  {
804  const LibUtilities::ShapeType vType
805  = m_globalOptParam->GetShapeList()[n];
806  const MultiRegions::GlobalMatrixKey vKey(gkey, vType);
807  if (cnt < m_offset_elmt_id.num_elements())
808  {
809  eid = m_offset_elmt_id[cnt];
810  MultiplyByBlockMatrix(vKey,inarray + m_coeff_offset[eid],
811  tmp_outarray = outarray + m_coeff_offset[eid]);
812  cnt += num_elmts[n];
813  }
814  }
815  else
816  {
817  int i;
818  int nvarcoeffs = gkey.GetNVarCoeffs();
819 
820  for(i= 0; i < num_elmts[n]; ++i)
821  {
822  // need to be initialised with zero size for non variable coefficient case
823  StdRegions::VarCoeffMap varcoeffs;
824 
825  eid = m_offset_elmt_id[cnt++];
826  if(nvarcoeffs>0)
827  {
828  StdRegions::VarCoeffMap::const_iterator x;
829  for (x = gkey.GetVarCoeffs().begin(); x != gkey.GetVarCoeffs().end(); ++x)
830  {
831  varcoeffs[x->first] = x->second + m_phys_offset[eid];
832  }
833  }
834 
835  StdRegions::StdMatrixKey mkey(gkey.GetMatrixType(),
836  (*m_exp)[eid]->DetShapeType(),
837  *((*m_exp)[eid]),
838  gkey.GetConstFactors(),varcoeffs);
839 
840  (*m_exp)[eid]->GeneralMatrixOp(inarray + m_coeff_offset[eid],
841  tmp_outarray = outarray+m_coeff_offset[eid],
842  mkey);
843  }
844  }
845  }
846  }
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:971
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:958
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:225
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:969
Describes a matrix with ordering defined by a local to global map.
void MultiplyByBlockMatrix(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:284
GlobalLinSysSharedPtr Nektar::MultiRegions::ExpList::GenGlobalBndLinSys ( const GlobalLinSysKey mkey,
const AssemblyMapSharedPtr locToGloMap 
)
protected

Generate a GlobalLinSys from information provided by the key "mkey" and the mapping provided in LocToGloBaseMap.

Definition at line 1152 of file ExpList.cpp.

References ASSERTL0, Nektar::LibUtilities::NekFactory< tKey, tBase, >::CreateInstance(), Nektar::MultiRegions::eSIZE_GlobalSysSolnType, Nektar::MultiRegions::GetGlobalLinSysFactory(), Nektar::MultiRegions::GlobalLinSysKey::GetGlobalSysSolnType(), GetRobinBCInfo(), GetSharedThisPtr(), and Nektar::MultiRegions::GlobalSysSolnTypeMap.

Referenced by Nektar::MultiRegions::DisContField3D::GetGlobalBndLinSys(), Nektar::MultiRegions::DisContField2D::GetGlobalBndLinSys(), and Nektar::MultiRegions::DisContField1D::GetGlobalBndLinSys().

1155  {
1156  boost::shared_ptr<ExpList> vExpList = GetSharedThisPtr();
1157  const map<int,RobinBCInfoSharedPtr> vRobinBCInfo = GetRobinBCInfo();
1158 
1159  MultiRegions::GlobalSysSolnType vType = mkey.GetGlobalSysSolnType();
1160 
1161  if (vType >= eSIZE_GlobalSysSolnType)
1162  {
1163  ASSERTL0(false,"Matrix solution type not defined");
1164  }
1165  std::string vSolnType = MultiRegions::GlobalSysSolnTypeMap[vType];
1166 
1167  return GetGlobalLinSysFactory().CreateInstance(vSolnType,mkey,
1168  vExpList,locToGloMap);
1169  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:162
map< int, RobinBCInfoSharedPtr > GetRobinBCInfo()
Definition: ExpList.h:752
boost::shared_ptr< ExpList > GetSharedThisPtr()
Returns a shared pointer to the current object.
Definition: ExpList.h:831
const char *const GlobalSysSolnTypeMap[]
GlobalLinSysFactory & GetGlobalLinSysFactory()
GlobalLinSysSharedPtr Nektar::MultiRegions::ExpList::GenGlobalLinSys ( const GlobalLinSysKey mkey,
const boost::shared_ptr< AssemblyMapCG > &  locToGloMap 
)
protected

This operation constructs the global linear system of type mkey.

Consider a linear system $\boldsymbol{M\hat{u}}_g=\boldsymbol{f}$ to be solved. Dependent on the solution method, this function constructs

  • The full linear system
    A call to the function #GenGlobalLinSysFullDirect
  • The statically condensed linear system
    A call to the function #GenGlobalLinSysStaticCond
Parameters
mkeyA key which uniquely defines the global matrix to be constructed.
locToGloMapContains the mapping array and required information for the transformation from local to global degrees of freedom.
Returns
(A shared pointer to) the global linear system in required format.

Definition at line 1133 of file ExpList.cpp.

References ASSERTL0, Nektar::LibUtilities::NekFactory< tKey, tBase, >::CreateInstance(), Nektar::MultiRegions::eSIZE_GlobalSysSolnType, Nektar::MultiRegions::GetGlobalLinSysFactory(), Nektar::MultiRegions::GlobalLinSysKey::GetGlobalSysSolnType(), GetSharedThisPtr(), and Nektar::MultiRegions::GlobalSysSolnTypeMap.

Referenced by Nektar::MultiRegions::ContField3D::GenGlobalLinSys(), Nektar::MultiRegions::ContField1D::GenGlobalLinSys(), and Nektar::MultiRegions::ContField2D::GenGlobalLinSys().

1136  {
1137  GlobalLinSysSharedPtr returnlinsys;
1138  boost::shared_ptr<ExpList> vExpList = GetSharedThisPtr();
1139 
1140  MultiRegions::GlobalSysSolnType vType = mkey.GetGlobalSysSolnType();
1141 
1142  if (vType >= eSIZE_GlobalSysSolnType)
1143  {
1144  ASSERTL0(false,"Matrix solution type not defined");
1145  }
1146  std::string vSolnType = MultiRegions::GlobalSysSolnTypeMap[vType];
1147 
1148  return GetGlobalLinSysFactory().CreateInstance( vSolnType, mkey,
1149  vExpList, locToGloMap);
1150  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:162
boost::shared_ptr< ExpList > GetSharedThisPtr()
Returns a shared pointer to the current object.
Definition: ExpList.h:831
const char *const GlobalSysSolnTypeMap[]
boost::shared_ptr< GlobalLinSys > GlobalLinSysSharedPtr
Pointer to a GlobalLinSys object.
Definition: GlobalLinSys.h:51
GlobalLinSysFactory & GetGlobalLinSysFactory()
GlobalMatrixSharedPtr Nektar::MultiRegions::ExpList::GenGlobalMatrix ( const GlobalMatrixKey mkey,
const boost::shared_ptr< AssemblyMapCG > &  locToGloMap 
)
protected

Generates a global matrix from the given key and map.

Retrieves local matrices from each expansion in the expansion list and combines them together to generate a global matrix system.

Parameters
mkeyMatrix key for the matrix to be generated.
locToGloMapLocal to global mapping.
Returns
Shared pointer to the generated global matrix.

Definition at line 855 of file ExpList.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::StdRegions::eBwdTrans, ErrorUtil::efatal, Nektar::StdRegions::eHelmholtz, Nektar::StdRegions::eHybridDGHelmBndLam, Nektar::StdRegions::eIProductWRTBase, Nektar::StdRegions::eLaplacian, Nektar::StdRegions::eMass, Nektar::MultiRegions::GlobalMatrixKey::GetConstFactors(), Nektar::MultiRegions::GlobalMatrixKey::GetMatrixType(), Nektar::MultiRegions::GlobalMatrixKey::GetNVarCoeffs(), Nektar::MultiRegions::GlobalMatrixKey::GetVarCoeffs(), m_npoints, m_offset_elmt_id, m_phys_offset, m_session, and NEKERROR.

Referenced by Nektar::MultiRegions::ContField3D::GetGlobalMatrix(), and Nektar::MultiRegions::ContField2D::GetGlobalMatrix().

858  {
859  int i,j,n,gid1,gid2,cntdim1,cntdim2;
860  NekDouble sign1,sign2;
861  DNekScalMatSharedPtr loc_mat;
862 
863  unsigned int glob_rows;
864  unsigned int glob_cols;
865  unsigned int loc_rows;
866  unsigned int loc_cols;
867 
868  bool assembleFirstDim;
869  bool assembleSecondDim;
870 
871  switch(mkey.GetMatrixType())
872  {
874  {
875  glob_rows = m_npoints;
876  glob_cols = locToGloMap->GetNumGlobalCoeffs();
877 
878  assembleFirstDim = false;
879  assembleSecondDim = true;
880  }
881  break;
883  {
884  glob_rows = locToGloMap->GetNumGlobalCoeffs();
885  glob_cols = m_npoints;
886 
887  assembleFirstDim = true;
888  assembleSecondDim = false;
889  }
890  break;
891  case StdRegions::eMass:
895  {
896  glob_rows = locToGloMap->GetNumGlobalCoeffs();
897  glob_cols = locToGloMap->GetNumGlobalCoeffs();
898 
899  assembleFirstDim = true;
900  assembleSecondDim = true;
901  }
902  break;
903  default:
904  {
906  "Global Matrix creation not defined for this type "
907  "of matrix");
908  }
909  }
910 
911  COOMatType spcoomat;
912  CoordType coord;
913 
914  int nvarcoeffs = mkey.GetNVarCoeffs();
915  int eid;
916 
917  // fill global matrix
918  for(n = cntdim1 = cntdim2 = 0; n < (*m_exp).size(); ++n)
919  {
920  // need to be initialised with zero size for non variable coefficient case
921  StdRegions::VarCoeffMap varcoeffs;
922 
923  eid = m_offset_elmt_id[n];
924  if(nvarcoeffs>0)
925  {
926  StdRegions::VarCoeffMap::const_iterator x;
927  for (x = mkey.GetVarCoeffs().begin(); x != mkey.GetVarCoeffs().end(); ++x)
928  {
929  varcoeffs[x->first] = x->second + m_phys_offset[eid];
930  }
931  }
932 
933  LocalRegions::MatrixKey matkey(mkey.GetMatrixType(),
934  (*m_exp)[eid]->DetShapeType(),
935  *((*m_exp)[eid]),
936  mkey.GetConstFactors(),varcoeffs);
937 
938  loc_mat = boost::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[m_offset_elmt_id[n]])->GetLocMatrix(matkey);
939 
940  loc_rows = loc_mat->GetRows();
941  loc_cols = loc_mat->GetColumns();
942 
943  for(i = 0; i < loc_rows; ++i)
944  {
945  if(assembleFirstDim)
946  {
947  gid1 = locToGloMap->GetLocalToGlobalMap (cntdim1 + i);
948  sign1 = locToGloMap->GetLocalToGlobalSign(cntdim1 + i);
949  }
950  else
951  {
952  gid1 = cntdim1 + i;
953  sign1 = 1.0;
954  }
955 
956  for(j = 0; j < loc_cols; ++j)
957  {
958  if(assembleSecondDim)
959  {
960  gid2 = locToGloMap
961  ->GetLocalToGlobalMap(cntdim2 + j);
962  sign2 = locToGloMap
963  ->GetLocalToGlobalSign(cntdim2 + j);
964  }
965  else
966  {
967  gid2 = cntdim2 + j;
968  sign2 = 1.0;
969  }
970 
971  // sparse matrix fill
972  coord = make_pair(gid1,gid2);
973  if( spcoomat.count(coord) == 0 )
974  {
975  spcoomat[coord] = sign1*sign2*(*loc_mat)(i,j);
976  }
977  else
978  {
979  spcoomat[coord] += sign1*sign2*(*loc_mat)(i,j);
980  }
981  }
982  }
983  cntdim1 += loc_rows;
984  cntdim2 += loc_cols;
985  }
986 
988  ::AllocateSharedPtr(m_session,glob_rows,glob_cols,spcoomat);
989  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:158
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
std::map< CoordType, NekDouble > COOMatType
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:225
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:969
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:880
double NekDouble
std::pair< IndexType, IndexType > CoordType
DNekMatSharedPtr Nektar::MultiRegions::ExpList::GenGlobalMatrixFull ( const GlobalLinSysKey mkey,
const boost::shared_ptr< AssemblyMapCG > &  locToGloMap 
)
protected

Definition at line 992 of file ExpList.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::eFULL, Nektar::StdRegions::eHelmholtz, Nektar::StdRegions::eLaplacian, Nektar::ePOSITIVE_DEFINITE_SYMMETRIC, Nektar::ePOSITIVE_DEFINITE_SYMMETRIC_BANDED, Nektar::MultiRegions::GlobalMatrixKey::GetConstFactors(), Nektar::MultiRegions::GlobalMatrixKey::GetMatrixType(), Nektar::MultiRegions::GlobalMatrixKey::GetNVarCoeffs(), GetRobinBCInfo(), Nektar::MultiRegions::GlobalMatrixKey::GetVarCoeffs(), m_coeff_offset, m_offset_elmt_id, and m_phys_offset.

Referenced by Nektar::MultiRegions::ContField2D::LinearAdvectionEigs().

993  {
994  int i,j,n,gid1,gid2,loc_lda,eid;
995  NekDouble sign1,sign2,value;
996  DNekScalMatSharedPtr loc_mat;
997 
998  int totDofs = locToGloMap->GetNumGlobalCoeffs();
999  int NumDirBCs = locToGloMap->GetNumGlobalDirBndCoeffs();
1000 
1001  unsigned int rows = totDofs - NumDirBCs;
1002  unsigned int cols = totDofs - NumDirBCs;
1003  NekDouble zero = 0.0;
1004 
1005  DNekMatSharedPtr Gmat;
1006  int bwidth = locToGloMap->GetFullSystemBandWidth();
1007 
1008  int nvarcoeffs = mkey.GetNVarCoeffs();
1009  MatrixStorage matStorage;
1010 
1011  map<int, RobinBCInfoSharedPtr> RobinBCInfo = GetRobinBCInfo();
1012 
1013  switch(mkey.GetMatrixType())
1014  {
1015  // case for all symmetric matices
1018  if( (2*(bwidth+1)) < rows)
1019  {
1021  Gmat = MemoryManager<DNekMat>::AllocateSharedPtr(rows,cols,zero,matStorage,bwidth,bwidth);
1022  }
1023  else
1024  {
1025  matStorage = ePOSITIVE_DEFINITE_SYMMETRIC;
1026  Gmat = MemoryManager<DNekMat>::AllocateSharedPtr(rows,cols,zero,matStorage);
1027  }
1028 
1029  break;
1030  default: // Assume general matrix - currently only set up for full invert
1031  {
1032  matStorage = eFULL;
1033  Gmat = MemoryManager<DNekMat>::AllocateSharedPtr(rows,cols,zero,matStorage);
1034  }
1035  }
1036 
1037  // fill global symmetric matrix
1038  for(n = 0; n < (*m_exp).size(); ++n)
1039  {
1040  // need to be initialised with zero size for non variable coefficient case
1041  StdRegions::VarCoeffMap varcoeffs;
1042 
1043  eid = m_offset_elmt_id[n];
1044  if(nvarcoeffs>0)
1045  {
1046  StdRegions::VarCoeffMap::const_iterator x;
1047  for (x = mkey.GetVarCoeffs().begin(); x != mkey.GetVarCoeffs().end(); ++x)
1048  {
1049  varcoeffs[x->first] = x->second + m_phys_offset[eid];
1050  }
1051  }
1052 
1053  LocalRegions::MatrixKey matkey(mkey.GetMatrixType(),
1054  (*m_exp)[eid]->DetShapeType(),
1055  *((*m_exp)[eid]),
1056  mkey.GetConstFactors(),varcoeffs);
1057 
1058  loc_mat = boost::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[n])->GetLocMatrix(matkey);
1059 
1060 
1061  if(RobinBCInfo.count(n) != 0) // add robin mass matrix
1062  {
1064 
1065  // declare local matrix from scaled matrix.
1066  int rows = loc_mat->GetRows();
1067  int cols = loc_mat->GetColumns();
1068  const NekDouble *dat = loc_mat->GetRawPtr();
1070  Blas::Dscal(rows*cols,loc_mat->Scale(),new_mat->GetRawPtr(),1);
1071 
1072  // add local matrix contribution
1073  for(rBC = RobinBCInfo.find(n)->second;rBC; rBC = rBC->next)
1074  {
1075  (*m_exp)[n]->AddRobinMassMatrix(rBC->m_robinID,rBC->m_robinPrimitiveCoeffs,new_mat);
1076  }
1077 
1078  NekDouble one = 1.0;
1079  // redeclare loc_mat to point to new_mat plus the scalar.
1080  loc_mat = MemoryManager<DNekScalMat>::AllocateSharedPtr(one,new_mat);
1081  }
1082 
1083  loc_lda = loc_mat->GetColumns();
1084 
1085  for(i = 0; i < loc_lda; ++i)
1086  {
1087  gid1 = locToGloMap->GetLocalToGlobalMap(m_coeff_offset[n] + i) - NumDirBCs;
1088  sign1 = locToGloMap->GetLocalToGlobalSign(m_coeff_offset[n] + i);
1089  if(gid1 >= 0)
1090  {
1091  for(j = 0; j < loc_lda; ++j)
1092  {
1093  gid2 = locToGloMap->GetLocalToGlobalMap(m_coeff_offset[n] + j) - NumDirBCs;
1094  sign2 = locToGloMap->GetLocalToGlobalSign(m_coeff_offset[n] + j);
1095  if(gid2 >= 0)
1096  {
1097  // When global matrix is symmetric,
1098  // only add the value for the upper
1099  // triangular part in order to avoid
1100  // entries to be entered twice
1101  if((matStorage == eFULL)||(gid2 >= gid1))
1102  {
1103  value = Gmat->GetValue(gid1,gid2) + sign1*sign2*(*loc_mat)(i,j);
1104  Gmat->SetValue(gid1,gid2,value);
1105  }
1106  }
1107  }
1108  }
1109  }
1110  }
1111 
1112  return Gmat;
1113  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
boost::shared_ptr< RobinBCInfo > RobinBCInfoSharedPtr
map< int, RobinBCInfoSharedPtr > GetRobinBCInfo()
Definition: ExpList.h:752
boost::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:70
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:958
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:225
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:969
double NekDouble
int Nektar::MultiRegions::ExpList::Get1DScaledTotPoints ( const NekDouble  scale) const
inline

Returns the total number of qudature points scaled by the factor scale on each 1D direction.

Definition at line 1412 of file ExpList.h.

References m_exp.

1413  {
1414  int returnval = 0;
1415  int cnt;
1416  int nbase = (*m_exp)[0]->GetNumBases();
1417 
1418  for(int i = 0; i < (*m_exp).size(); ++i)
1419  {
1420  cnt = 1;
1421  for(int j = 0; j < nbase; ++j)
1422  {
1423  cnt *= (int)(scale*((*m_exp)[i]->GetNumPoints(j)));
1424  }
1425  returnval += cnt;
1426  }
1427  return returnval;
1428  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
void Nektar::MultiRegions::ExpList::GetBCValues ( Array< OneD, NekDouble > &  BndVals,
const Array< OneD, NekDouble > &  TotField,
int  BndID 
)
inline

Definition at line 1711 of file ExpList.h.

References v_GetBCValues().

1715  {
1716  v_GetBCValues(BndVals,TotField,BndID);
1717  }
virtual void v_GetBCValues(Array< OneD, NekDouble > &BndVals, const Array< OneD, NekDouble > &TotField, int BndID)
Definition: ExpList.cpp:2407
const DNekScalBlkMatSharedPtr & Nektar::MultiRegions::ExpList::GetBlockMatrix ( const GlobalMatrixKey gkey)
protected

Definition at line 772 of file ExpList.cpp.

References GenBlockMatrix(), Nektar::iterator, and m_blockMat.

Referenced by MultiplyByBlockMatrix(), MultiplyByElmtInvMass(), Nektar::MultiRegions::DisContField3D::v_GeneralMatrixOp(), Nektar::MultiRegions::DisContField2D::v_GeneralMatrixOp(), Nektar::MultiRegions::DisContField3D::v_HelmSolve(), Nektar::MultiRegions::DisContField2D::v_HelmSolve(), and Nektar::MultiRegions::DisContField1D::v_HelmSolve().

774  {
775  BlockMatrixMap::iterator matrixIter = m_blockMat->find(gkey);
776 
777  if(matrixIter == m_blockMat->end())
778  {
779  return ((*m_blockMat)[gkey] = GenBlockMatrix(gkey));
780  }
781  else
782  {
783  return matrixIter->second;
784  }
785  }
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:973
const DNekScalBlkMatSharedPtr GenBlockMatrix(const GlobalMatrixKey &gkey)
This function assembles the block diagonal matrix of local matrices of the type mtype.
Definition: ExpList.cpp:636
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
const Array< OneD, const boost::shared_ptr< ExpList > > & Nektar::MultiRegions::ExpList::GetBndCondExpansions ( )
inline

Definition at line 1914 of file ExpList.h.

References v_GetBndCondExpansions().

1915  {
1916  return v_GetBndCondExpansions();
1917  }
virtual const Array< OneD, const boost::shared_ptr< ExpList > > & v_GetBndCondExpansions(void)
Definition: ExpList.cpp:2217
const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::GetBndConditions ( )
inline

Definition at line 2015 of file ExpList.h.

References v_GetBndConditions().

2016  {
2017  return v_GetBndConditions();
2018  }
virtual const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & v_GetBndConditions()
Definition: ExpList.cpp:2579
SpatialDomains::BoundaryConditionShPtr Nektar::MultiRegions::ExpList::GetBoundaryCondition ( const SpatialDomains::BoundaryConditionCollection collection,
unsigned int  index,
const std::string &  variable 
)
staticprotected

Definition at line 2631 of file ExpList.cpp.

References ASSERTL1.

Referenced by Nektar::MultiRegions::DisContField2D::FindPeriodicEdges(), Nektar::MultiRegions::DisContField3D::FindPeriodicFaces(), Nektar::MultiRegions::DisContField1D::FindPeriodicVertices(), Nektar::MultiRegions::DisContField3D::GenerateBoundaryConditionExpansion(), Nektar::MultiRegions::DisContField1D::GenerateBoundaryConditionExpansion(), Nektar::MultiRegions::DisContField2D::GenerateBoundaryConditionExpansion(), Nektar::MultiRegions::DisContField1D::SetBoundaryConditionExpansion(), and Nektar::MultiRegions::DisContField3DHomogeneous1D::SetupBoundaryConditions().

2635  {
2636  SpatialDomains::BoundaryConditionCollection::const_iterator collectionIter = collection.find(regionId);
2637  ASSERTL1(collectionIter != collection.end(), "Unable to locate collection "+boost::lexical_cast<string>(regionId));
2638  const SpatialDomains::BoundaryConditionMapShPtr boundaryConditionMap = (*collectionIter).second;
2639  SpatialDomains::BoundaryConditionMap::const_iterator conditionMapIter = boundaryConditionMap->find(variable);
2640  ASSERTL1(conditionMapIter != boundaryConditionMap->end(), "Unable to locate condition map.");
2641  const SpatialDomains::BoundaryConditionShPtr boundaryCondition = (*conditionMapIter).second;
2642  return boundaryCondition;
2643  }
boost::shared_ptr< BoundaryConditionMap > BoundaryConditionMapShPtr
Definition: Conditions.h:212
boost::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
Definition: Conditions.h:206
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
void Nektar::MultiRegions::ExpList::GetBoundaryToElmtMap ( Array< OneD, int > &  ElmtID,
Array< OneD, int > &  EdgeID 
)
inline
NekDouble Nektar::MultiRegions::ExpList::GetCoeff ( int  i)
inline

Get the i th value (coefficient) of m_coeffs.

Parameters
iThe index of m_coeffs to be returned
Returns
The NekDouble held in m_coeffs[i].

Definition at line 1806 of file ExpList.h.

References m_coeffs.

Referenced by Nektar::MultiRegions::DisContField1D::v_EvaluateBoundaryConditions().

1807  {
1808  return m_coeffs[i];
1809  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:909
int Nektar::MultiRegions::ExpList::GetCoeff_Offset ( int  n) const
inline
const Array< OneD, const NekDouble > & Nektar::MultiRegions::ExpList::GetCoeffs ( void  ) const
inline

This function returns (a reference to) the array $\boldsymbol{\hat{u}}_l$ (implemented as m_coeffs) containing all local expansion coefficients.

As the function returns a constant reference to a const Array, it is not possible to modify the underlying data of the array m_coeffs. In order to do so, use the function UpdateCoeffs instead.

Returns
(A constant reference to) the array m_coeffs.

Definition at line 1775 of file ExpList.h.

References m_coeffs.

Referenced by Nektar::MultiRegions::DisContField3DHomogeneous2D::EvaluateBoundaryConditions(), Nektar::MultiRegions::DisContField3DHomogeneous1D::EvaluateBoundaryConditions(), Nektar::MultiRegions::ExpList1D::PostProcess(), and Nektar::MultiRegions::ExpList3DHomogeneous1D::v_HomogeneousEnergy().

1776  {
1777  return m_coeffs;
1778  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:909
NekDouble Nektar::MultiRegions::ExpList::GetCoeffs ( int  i)
inline

Get the i th value (coefficient) of m_coeffs.

Parameters
iThe index of m_coeffs to be returned
Returns
The NekDouble held in m_coeffs[i].

Definition at line 1815 of file ExpList.h.

References m_coeffs.

1816  {
1817  return m_coeffs[i];
1818  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:909
boost::shared_ptr<LibUtilities::Comm> Nektar::MultiRegions::ExpList::GetComm ( )
inline

Returns the comm object.

Definition at line 843 of file ExpList.h.

References m_comm.

844  {
845  return m_comm;
846  }
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:877
int Nektar::MultiRegions::ExpList::GetCoordim ( int  eid)
inline

This function returns the dimension of the coordinates of the element eid.

Parameters
eidThe index of the element to be checked.
Returns
The dimension of the coordinates of the specific element.

Definition at line 1735 of file ExpList.h.

References ASSERTL2, and m_exp.

Referenced by Nektar::MultiRegions::ExpList2DHomogeneous1D::GetCoords(), GetExp(), GetExpIndex(), IProductWRTDerivBase(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetCoords(), v_GetCoords(), Nektar::MultiRegions::ExpList2D::v_GetNormals(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetNormals(), Nektar::MultiRegions::ExpList1D::v_GetNormals(), Nektar::MultiRegions::ExpList1D::v_Upwind(), Nektar::MultiRegions::ExpList1DHomogeneous2D::v_WriteTecplotZone(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_WriteTecplotZone(), and v_WriteTecplotZone().

1736  {
1737  ASSERTL2(eid <= (*m_exp).size(),
1738  "eid is larger than number of elements");
1739  return (*m_exp)[eid]->GetCoordim();
1740  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed t...
Definition: ErrorUtil.hpp:213
void Nektar::MultiRegions::ExpList::GetCoords ( Array< OneD, NekDouble > &  coord_0,
Array< OneD, NekDouble > &  coord_1 = NullNekDouble1DArray,
Array< OneD, NekDouble > &  coord_2 = NullNekDouble1DArray 
)
inline

This function calculates the coordinates of all the elemental quadrature points $\boldsymbol{x}_i$.

Definition at line 1632 of file ExpList.h.

References v_GetCoords().

Referenced by v_WriteTecplotZone().

1636  {
1637  v_GetCoords(coord_0,coord_1,coord_2);
1638  }
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
Definition: ExpList.cpp:2500
const boost::shared_ptr< LocalRegions::ExpansionVector > Nektar::MultiRegions::ExpList::GetExp ( void  ) const
inline

This function returns the vector of elements in the expansion.

Returns
(A const shared pointer to) the local expansion vector m_exp

Definition at line 1858 of file ExpList.h.

References m_exp.

Referenced by Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG(), Nektar::MultiRegions::AssemblyMapDG::AssemblyMapDG(), Nektar::MultiRegions::ContField3DHomogeneous1D::ContField3DHomogeneous1D(), Nektar::MultiRegions::ContField3DHomogeneous2D::ContField3DHomogeneous2D(), Nektar::MultiRegions::AssemblyMapCG::CreateGraph(), Nektar::MultiRegions::DisContField3DHomogeneous1D::DisContField3DHomogeneous1D(), Nektar::MultiRegions::DisContField3DHomogeneous2D::DisContField3DHomogeneous2D(), Nektar::MultiRegions::ExpList2DHomogeneous1D::ExpList2DHomogeneous1D(), Nektar::MultiRegions::ExpList3DHomogeneous2D::ExpList3DHomogeneous2D(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GenExpList3DHomogeneous1D(), Nektar::MultiRegions::DisContField3DHomogeneous1D::GetBCValues(), GetExpIndex(), Nektar::MultiRegions::DisContField3DHomogeneous1D::NormVectorIProductWRTBase(), Nektar::MultiRegions::ExpList1D::PostProcess(), Nektar::MultiRegions::AssemblyMapCG::SetUpUniversalC0ContMap(), Nektar::MultiRegions::AssemblyMapDG::SetUpUniversalDGMap(), Nektar::MultiRegions::AssemblyMapDG::SetUpUniversalTraceMap(), v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_HomogeneousEnergy(), Nektar::MultiRegions::AssemblyMapCG::v_LinearSpaceMap(), and v_WriteTecplotHeader().

1859  {
1860  return m_exp;
1861  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
LocalRegions::ExpansionSharedPtr & Nektar::MultiRegions::ExpList::GetExp ( int  n) const
inline

This function returns (a shared pointer to) the local elemental expansion of the $n^{\mathrm{th}}$ element.

Parameters
nThe index of the element concerned.
Returns
(A shared pointer to) the local expansion of the $n^{\mathrm{th}}$ element.

Definition at line 1849 of file ExpList.h.

References m_exp.

1850  {
1851  return (*m_exp)[n];
1852  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
LocalRegions::ExpansionSharedPtr & Nektar::MultiRegions::ExpList::GetExp ( const Array< OneD, const NekDouble > &  gloCoord)

This function returns (a shared pointer to) the local elemental expansion containing the arbitrary point given by gloCoord.

Definition at line 1201 of file ExpList.cpp.

References ASSERTL0, GetCoordim(), and m_exp.

1203  {
1204  Array<OneD, NekDouble> stdCoord(GetCoordim(0),0.0);
1205  for (int i = 0; i < (*m_exp).size(); ++i)
1206  {
1207  if ((*m_exp)[i]->GetGeom()->ContainsPoint(gloCoord))
1208  {
1209  return (*m_exp)[i];
1210  }
1211  }
1212  ASSERTL0(false, "Cannot find element for this point.");
1213  return (*m_exp)[0]; // avoid warnings
1214  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1735
int Nektar::MultiRegions::ExpList::GetExpIndex ( const Array< OneD, const NekDouble > &  gloCoord,
NekDouble  tol = 0.0,
bool  returnNearestElmt = false 
)

This function returns the index of the local elemental expansion containing the arbitrary point given by gloCoord.

Todo:
need a smarter search here that first just looks at bounding vertices - suggest first seeing if point is within 10% of region defined by vertices. The do point search.

Definition at line 1222 of file ExpList.cpp.

1226  {
1227  Array<OneD, NekDouble> Lcoords(gloCoord.num_elements());
1228 
1229  return GetExpIndex(gloCoord,Lcoords,tol,returnNearestElmt);
1230  }
int GetExpIndex(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false)
Definition: ExpList.cpp:1222
int Nektar::MultiRegions::ExpList::GetExpIndex ( const Array< OneD, const NekDouble > &  gloCoords,
Array< OneD, NekDouble > &  locCoords,
NekDouble  tol = 0.0,
bool  returnNearestElmt = false 
)

This function returns the index and the Local Cartesian Coordinates locCoords of the local elemental expansion containing the arbitrary point given by gloCoords.

Definition at line 1233 of file ExpList.cpp.

References GetCoordim(), GetExp(), GetNumElmts(), m_exp, m_graph, Nektar::NekPoint< data_type >::SetX(), Nektar::NekPoint< data_type >::SetY(), Nektar::NekPoint< data_type >::SetZ(), Vmath::Vcopy(), and WARNINGL1.

1237  {
1238  NekDouble nearpt = 1e6;
1239 
1240  if (GetNumElmts() == 0)
1241  {
1242  return -1;
1243  }
1244  std::vector<std::pair<int,NekDouble> > elmtIdDist;
1245 
1246  // Manifold case (point may match multiple elements)
1247  if (GetExp(0)->GetCoordim() > GetExp(0)->GetShapeDimension())
1248  {
1251  NekDouble dist = 0.0;
1252 
1253  // Scan all elements and store those which may contain the point
1254  for (int i = 0; i < (*m_exp).size(); ++i)
1255  {
1256  if ((*m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1257  locCoords,
1258  tol, nearpt))
1259  {
1260  w.SetX(gloCoords[0]);
1261  w.SetY(gloCoords[1]);
1262  w.SetZ(gloCoords[2]);
1263 
1264  // Find closest vertex
1265  for (int j = 0; j < (*m_exp)[i]->GetNverts(); ++j) {
1266  v = m_graph->GetVertex(
1267  (*m_exp)[i]->GetGeom()->GetVid(j));
1268  if (j == 0 || dist > v->dist(w))
1269  {
1270  dist = v->dist(w);
1271  }
1272  }
1273  elmtIdDist.push_back(
1274  std::pair<int, NekDouble>(i, dist));
1275  }
1276  }
1277 
1278  // Find nearest element
1279  if (!elmtIdDist.empty())
1280  {
1281  int min_id = elmtIdDist[0].first;
1282  NekDouble min_d = elmtIdDist[0].second;
1283 
1284  for (int i = 1; i < elmtIdDist.size(); ++i)
1285  {
1286  if (elmtIdDist[i].second < min_d) {
1287  min_id = elmtIdDist[i].first;
1288  min_d = elmtIdDist[i].second;
1289  }
1290  }
1291 
1292  // retrieve local coordinate of point
1293  (*m_exp)[min_id]->GetGeom()->GetLocCoords(gloCoords,
1294  locCoords);
1295  return min_id;
1296  }
1297  else
1298  {
1299  return -1;
1300  }
1301  }
1302  // non-embedded mesh (point can only match one element)
1303  else
1304  {
1305  static int start = 0;
1306  int min_id = 0;
1307  NekDouble nearpt_min = 1e6;
1308  Array<OneD, NekDouble> savLocCoords(locCoords.num_elements());
1309 
1310  // restart search from last found value
1311  for (int i = start; i < (*m_exp).size(); ++i)
1312  {
1313  if ((*m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1314  locCoords,
1315  tol, nearpt))
1316  {
1317  start = i;
1318  return i;
1319  }
1320  else
1321  {
1322  if(nearpt < nearpt_min)
1323  {
1324  min_id = i;
1325  nearpt_min = nearpt;
1326  Vmath::Vcopy(locCoords.num_elements(),locCoords,1,savLocCoords,1);
1327  }
1328  }
1329  }
1330 
1331  for (int i = 0; i < start; ++i)
1332  {
1333  if ((*m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1334  locCoords,
1335  tol, nearpt))
1336  {
1337  start = i;
1338  return i;
1339  }
1340  else
1341  {
1342  if(nearpt < nearpt_min)
1343  {
1344  min_id = i;
1345  nearpt_min = nearpt;
1346  Vmath::Vcopy(locCoords.num_elements(),
1347  locCoords,1,savLocCoords,1);
1348  }
1349  }
1350  }
1351 
1352  std::string msg = "Failed to find point within element to tolerance of "
1353  + boost::lexical_cast<std::string>(tol)
1354  + " using local point ("
1355  + boost::lexical_cast<std::string>(locCoords[0]) +","
1356  + boost::lexical_cast<std::string>(locCoords[1]) +","
1357  + boost::lexical_cast<std::string>(locCoords[1])
1358  + ") in element: "
1359  + boost::lexical_cast<std::string>(min_id);
1360  WARNINGL1(false,msg.c_str());
1361 
1362  if(returnNearestElmt)
1363  {
1364  Vmath::Vcopy(locCoords.num_elements(),savLocCoords,1,locCoords,1);
1365  return min_id;
1366  }
1367  else
1368  {
1369  return -1;
1370  }
1371 
1372  }
1373  }
void SetY(typename boost::call_traits< DataType >::const_reference val)
Definition: NekPoint.hpp:224
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:1858
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Definition: ExpList.h:562
void SetZ(typename boost::call_traits< DataType >::const_reference val)
Definition: NekPoint.hpp:230
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:883
double NekDouble
#define WARNINGL1(condition, msg)
Definition: ErrorUtil.hpp:192
void SetX(typename boost::call_traits< DataType >::const_reference val)
Definition: NekPoint.hpp:218
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1735
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1038
boost::shared_ptr< PointGeom > PointGeomSharedPtr
Definition: Geometry.h:60
int Nektar::MultiRegions::ExpList::GetExpSize ( void  )
inline

This function returns the number of elements in the expansion.

Returns
$N_{\mathrm{el}}$, the number of elements in the expansion.

Definition at line 1837 of file ExpList.h.

Referenced by Nektar::MultiRegions::ContField3DHomogeneous1D::ContField3DHomogeneous1D(), Nektar::MultiRegions::ContField3DHomogeneous2D::ContField3DHomogeneous2D(), Nektar::MultiRegions::DisContField3DHomogeneous1D::DisContField3DHomogeneous1D(), Nektar::MultiRegions::DisContField3DHomogeneous2D::DisContField3DHomogeneous2D(), Nektar::MultiRegions::DisContField3D::EvaluateHDGPostProcessing(), Nektar::MultiRegions::DisContField2D::EvaluateHDGPostProcessing(), Nektar::MultiRegions::ExpList0D::ExpList0D(), Nektar::MultiRegions::ExpList1D::ExpList1D(), Nektar::MultiRegions::ExpList2D::ExpList2D(), Nektar::MultiRegions::ExpList2DHomogeneous1D::ExpList2DHomogeneous1D(), Nektar::MultiRegions::ExpList3D::ExpList3D(), Nektar::MultiRegions::ExpList3DHomogeneous2D::ExpList3DHomogeneous2D(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GenExpList3DHomogeneous1D(), Nektar::MultiRegions::DisContField1D::GetNegatedFluxNormal(), Nektar::MultiRegions::DisContField2D::L2_DGDeriv(), Nektar::MultiRegions::ExpList1D::PeriodicEval(), Nektar::MultiRegions::DisContField3D::SameTypeOfBoundaryConditions(), Nektar::MultiRegions::DisContField2D::SameTypeOfBoundaryConditions(), Nektar::MultiRegions::DisContField3D::v_AddFwdBwdTraceIntegral(), Nektar::MultiRegions::DisContField2D::v_AddFwdBwdTraceIntegral(), Nektar::MultiRegions::DisContField3D::v_AddTraceIntegral(), Nektar::MultiRegions::DisContField2D::v_AddTraceIntegral(), Nektar::MultiRegions::DisContField1D::v_AddTraceIntegral(), Nektar::MultiRegions::DisContField3D::v_ExtractTracePhys(), Nektar::MultiRegions::DisContField2D::v_ExtractTracePhys(), Nektar::MultiRegions::DisContField1D::v_ExtractTracePhys(), Nektar::MultiRegions::DisContField3D::v_GetBoundaryToElmtMap(), Nektar::MultiRegions::DisContField2D::v_GetBoundaryToElmtMap(), Nektar::MultiRegions::DisContField1D::v_GetBoundaryToElmtMap(), Nektar::MultiRegions::DisContField3D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField2D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField1D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField3D::v_HelmSolve(), Nektar::MultiRegions::DisContField2D::v_HelmSolve(), Nektar::MultiRegions::DisContField1D::v_HelmSolve(), Nektar::MultiRegions::ExpList3D::v_PhysGalerkinProjection1DScaled(), Nektar::MultiRegions::ExpList2D::v_PhysGalerkinProjection1DScaled(), Nektar::MultiRegions::ExpList3D::v_PhysInterp1DScaled(), Nektar::MultiRegions::ExpList2D::v_PhysInterp1DScaled(), Nektar::MultiRegions::ExpList3D::v_ReadGlobalOptimizationParameters(), and Nektar::MultiRegions::ExpList2D::v_ReadGlobalOptimizationParameters().

1838  {
1839  return (*m_exp).size();
1840  }
ExpansionType Nektar::MultiRegions::ExpList::GetExpType ( void  )

Returns the type of the expansion.

Definition at line 203 of file ExpList.cpp.

References m_expType.

204  {
205  return m_expType;
206  }
std::vector<LibUtilities::FieldDefinitionsSharedPtr> Nektar::MultiRegions::ExpList::GetFieldDefinitions ( )
inline

Definition at line 766 of file ExpList.h.

References v_GetFieldDefinitions().

767  {
768  return v_GetFieldDefinitions();
769  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2047
void Nektar::MultiRegions::ExpList::GetFieldDefinitions ( std::vector< LibUtilities::FieldDefinitionsSharedPtr > &  fielddef)
inline

Definition at line 772 of file ExpList.h.

References v_GetFieldDefinitions().

773  {
774  v_GetFieldDefinitions(fielddef);
775  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2047
void Nektar::MultiRegions::ExpList::GetFwdBwdTracePhys ( Array< OneD, NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd 
)
inline

Definition at line 1986 of file ExpList.h.

References v_GetFwdBwdTracePhys().

1989  {
1990  v_GetFwdBwdTracePhys(Fwd,Bwd);
1991  }
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
Definition: ExpList.cpp:2307
void Nektar::MultiRegions::ExpList::GetFwdBwdTracePhys ( const Array< OneD, const NekDouble > &  field,
Array< OneD, NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd 
)
inline

Definition at line 1993 of file ExpList.h.

References v_GetFwdBwdTracePhys().

1997  {
1998  v_GetFwdBwdTracePhys(field,Fwd,Bwd);
1999  }
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
Definition: ExpList.cpp:2307
const NekOptimize::GlobalOptParamSharedPtr& Nektar::MultiRegions::ExpList::GetGlobalOptParam ( void  )
inline

Definition at line 747 of file ExpList.h.

References m_globalOptParam.

748  {
749  return m_globalOptParam;
750  }
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:971
SpatialDomains::MeshGraphSharedPtr Nektar::MultiRegions::ExpList::GetGraph ( )
inline

Definition at line 848 of file ExpList.h.

References m_graph.

849  {
850  return m_graph;
851  }
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:883
LibUtilities::BasisSharedPtr Nektar::MultiRegions::ExpList::GetHomogeneousBasis ( void  )
inline

Definition at line 854 of file ExpList.h.

References v_GetHomogeneousBasis().

855  {
856  return v_GetHomogeneousBasis();
857  }
virtual LibUtilities::BasisSharedPtr v_GetHomogeneousBasis(void)
Definition: ExpList.h:1320
NekDouble Nektar::MultiRegions::ExpList::GetHomoLen ( void  )
inline

This function returns the Width of homogeneous direction associaed with the homogeneous expansion.

Definition at line 517 of file ExpList.h.

References v_GetHomoLen().

518  {
519  return v_GetHomoLen();
520  }
virtual NekDouble v_GetHomoLen(void)
Definition: ExpList.cpp:1826
int Nektar::MultiRegions::ExpList::GetNcoeffs ( void  ) const
inline
int Nektar::MultiRegions::ExpList::GetNcoeffs ( const int  eid) const
inline

Returns the total number of local degrees of freedom for element eid.

Definition at line 1356 of file ExpList.h.

References m_exp.

1357  {
1358  return (*m_exp)[eid]->GetNcoeffs();
1359  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
void Nektar::MultiRegions::ExpList::GetNormals ( Array< OneD, Array< OneD, NekDouble > > &  normals)
inline

Definition at line 1957 of file ExpList.h.

References v_GetNormals().

1959  {
1960  v_GetNormals(normals);
1961  }
virtual void v_GetNormals(Array< OneD, Array< OneD, NekDouble > > &normals)
Definition: ExpList.cpp:2274
int Nektar::MultiRegions::ExpList::GetNpoints ( void  ) const
inline

Returns the total number of quadrature points m_npoints $=Q_{\mathrm{tot}}$.

Definition at line 1433 of file ExpList.h.

References m_npoints.

1434  {
1435  return m_npoints;
1436  }
int Nektar::MultiRegions::ExpList::GetNumElmts ( void  )
inline

This function returns the number of elements in the expansion which may be different for a homogeoenous extended expansionp.

Definition at line 562 of file ExpList.h.

References v_GetNumElmts().

Referenced by GetExpIndex(), v_GetCoords(), and v_WriteTecplotHeader().

563  {
564  return v_GetNumElmts();
565  }
virtual int v_GetNumElmts(void)
Definition: ExpList.h:1026
int Nektar::MultiRegions::ExpList::GetOffset_Elmt_Id ( int  n) const
inline

Get the element id associated with the n th consecutive block of data in m_phys and m_coeffs.

Definition at line 1883 of file ExpList.h.

References m_offset_elmt_id.

Referenced by Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG(), Nektar::MultiRegions::AssemblyMapDG::AssemblyMapDG(), Nektar::MultiRegions::AssemblyMapCG::CreateGraph(), and Nektar::MultiRegions::AssemblyMapDG::SetUpUniversalDGMap().

1884  {
1885  return m_offset_elmt_id[n];
1886  }
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:969
void Nektar::MultiRegions::ExpList::GetPeriodicEntities ( PeriodicMap periodicVerts,
PeriodicMap periodicEdges,
PeriodicMap periodicFaces = NullPeriodicMap 
)
inline

Definition at line 757 of file ExpList.h.

References v_GetPeriodicEntities().

761  {
762  v_GetPeriodicEntities(periodicVerts, periodicEdges, periodicFaces);
763  }
virtual void v_GetPeriodicEntities(PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces)
Definition: ExpList.cpp:2622
const Array< OneD, const NekDouble > & Nektar::MultiRegions::ExpList::GetPhys ( void  ) const
inline

This function returns (a reference to) the array $\boldsymbol{u}_l$ (implemented as m_phys) containing the function $u^{\delta}(\boldsymbol{x})$ evaluated at the quadrature points.

As the function returns a constant reference to a const Array it is not possible to modify the underlying data of the array m_phys. In order to do so, use the function UpdatePhys instead.

Returns
(A constant reference to) the array m_phys.

Definition at line 1828 of file ExpList.h.

References m_phys.

Referenced by Nektar::MultiRegions::DisContField3D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField2D::v_GetFwdBwdTracePhys(), and Nektar::MultiRegions::DisContField1D::v_GetFwdBwdTracePhys().

1829  {
1830  return m_phys;
1831  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:926
int Nektar::MultiRegions::ExpList::GetPhys_Offset ( int  n) const
inline
bool Nektar::MultiRegions::ExpList::GetPhysState ( void  ) const
inline

This function indicates whether the array of physical values $\boldsymbol{u}_l$ (implemented as m_phys) is filled or not.

Returns
physState true (=filled) or false (=not filled).

Definition at line 1499 of file ExpList.h.

References m_physState.

1500  {
1501  return m_physState;
1502  }
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:935
boost::shared_ptr<ExpList>& Nektar::MultiRegions::ExpList::GetPlane ( int  n)
inline

Definition at line 859 of file ExpList.h.

References v_GetPlane().

860  {
861  return v_GetPlane(n);
862  }
virtual boost::shared_ptr< ExpList > & v_GetPlane(int n)
Definition: ExpList.cpp:2645
map<int, RobinBCInfoSharedPtr> Nektar::MultiRegions::ExpList::GetRobinBCInfo ( )
inline

Definition at line 752 of file ExpList.h.

References v_GetRobinBCInfo().

Referenced by GenGlobalBndLinSys(), and GenGlobalMatrixFull().

753  {
754  return v_GetRobinBCInfo();
755  }
virtual map< int, RobinBCInfoSharedPtr > v_GetRobinBCInfo(void)
Definition: ExpList.cpp:2612
boost::shared_ptr<LibUtilities::SessionReader> Nektar::MultiRegions::ExpList::GetSession ( )
inline

Returns the session object.

Definition at line 837 of file ExpList.h.

References m_session.

838  {
839  return m_session;
840  }
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:880
boost::shared_ptr<ExpList> Nektar::MultiRegions::ExpList::GetSharedThisPtr ( )
inline

Returns a shared pointer to the current object.

Definition at line 831 of file ExpList.h.

Referenced by GenGlobalBndLinSys(), and GenGlobalLinSys().

832  {
833  return shared_from_this();
834  }
int Nektar::MultiRegions::ExpList::GetTotPoints ( void  ) const
inline
int Nektar::MultiRegions::ExpList::GetTotPoints ( const int  eid) const
inline

Returns the total number of quadrature points for eid's element $=Q_{\mathrm{tot}}$.

Definition at line 1406 of file ExpList.h.

References m_exp.

1407  {
1408  return (*m_exp)[eid]->GetTotPoints();
1409  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
boost::shared_ptr< ExpList > & Nektar::MultiRegions::ExpList::GetTrace ( )
inline

Return a reference to the trace space associated with this expansion list.

Definition at line 1942 of file ExpList.h.

References v_GetTrace().

Referenced by Nektar::MultiRegions::DisContField2D::v_AddFwdBwdTraceIntegral(), Nektar::MultiRegions::DisContField1D::v_AddTraceIntegral(), and Nektar::MultiRegions::DisContField2D::v_AddTraceIntegral().

1943  {
1944  return v_GetTrace();
1945  }
virtual boost::shared_ptr< ExpList > & v_GetTrace()
Definition: ExpList.cpp:2253
const Array< OneD, const int > & Nektar::MultiRegions::ExpList::GetTraceBndMap ( void  )
inline

Definition at line 1952 of file ExpList.h.

References v_GetTraceBndMap().

1953  {
1954  return v_GetTraceBndMap();
1955  }
virtual const Array< OneD, const int > & v_GetTraceBndMap()
Definition: ExpList.cpp:2269
boost::shared_ptr< AssemblyMapDG > & Nektar::MultiRegions::ExpList::GetTraceMap ( void  )
inline

Definition at line 1947 of file ExpList.h.

References v_GetTraceMap().

Referenced by v_GetTraceBndMap().

1948  {
1949  return v_GetTraceMap();
1950  }
virtual boost::shared_ptr< AssemblyMapDG > & v_GetTraceMap()
Definition: ExpList.cpp:2261
LibUtilities::TranspositionSharedPtr Nektar::MultiRegions::ExpList::GetTransposition ( void  )
inline

This function returns the transposition class associaed with the homogeneous expansion.

Definition at line 510 of file ExpList.h.

References v_GetTransposition().

511  {
512  return v_GetTransposition();
513  }
virtual LibUtilities::TranspositionSharedPtr v_GetTransposition(void)
Definition: ExpList.cpp:1818
bool Nektar::MultiRegions::ExpList::GetWaveSpace ( void  ) const
inline

This function returns the third direction expansion condition, which can be in wave space (coefficient) or not It is stored in the variable m_WaveSpace.

Definition at line 1450 of file ExpList.h.

References m_WaveSpace.

1451  {
1452  return m_WaveSpace;
1453  }
Array<OneD, const unsigned int> Nektar::MultiRegions::ExpList::GetYIDs ( void  )
inline

This function returns a vector containing the wave numbers in y-direction associated with the 3D homogenous expansion. Required if a parellelisation is applied in the Fourier direction.

Definition at line 526 of file ExpList.h.

References v_GetYIDs().

527  {
528  return v_GetYIDs();
529  }
virtual Array< OneD, const unsigned int > v_GetYIDs(void)
Definition: ExpList.cpp:1842
Array<OneD, const unsigned int> Nektar::MultiRegions::ExpList::GetZIDs ( void  )
inline

This function returns a vector containing the wave numbers in z-direction associated with the 3D homogenous expansion. Required if a parellelisation is applied in the Fourier direction.

Definition at line 503 of file ExpList.h.

References v_GetZIDs().

Referenced by v_WriteTecplotZone().

504  {
505  return v_GetZIDs();
506  }
virtual Array< OneD, const unsigned int > v_GetZIDs(void)
Definition: ExpList.cpp:1834
void Nektar::MultiRegions::ExpList::GlobalEigenSystem ( const boost::shared_ptr< DNekMat > &  Gmat,
Array< OneD, NekDouble > &  EigValsReal,
Array< OneD, NekDouble > &  EigValsImag,
Array< OneD, NekDouble > &  EigVecs = NullNekDouble1DArray 
)
protected
void Nektar::MultiRegions::ExpList::GlobalToLocal ( void  )
inline
NekDouble Nektar::MultiRegions::ExpList::H1 ( const Array< OneD, const NekDouble > &  inarray,
const Array< OneD, const NekDouble > &  soln = NullNekDouble1DArray 
)

Calculates the $H^1$ error of the global spectral/hp element approximation.

Given a spectral/hp approximation $u^{\delta}(\boldsymbol{x})$ evaluated at the quadrature points (which should be contained in m_phys), this function calculates the $H^1_2$ error of this approximation with respect to an exact solution. The local distribution of the quadrature points allows an elemental evaluation of this operation through the functions StdRegions::StdExpansion::H1.

The exact solution, also evaluated at the quadrature points, should be contained in the variable m_phys of the ExpList object Sol.

Parameters
solnAn 1D array, containing the discrete evaluation of the exact solution at the quadrature points.
Returns
The $H^1_2$ error of the approximation.

Definition at line 1918 of file ExpList.cpp.

References m_comm, m_phys_offset, and Nektar::LibUtilities::ReduceSum.

1921  {
1922  NekDouble err = 0.0, errh1;
1923  int i;
1924 
1925  for (i = 0; i < (*m_exp).size(); ++i)
1926  {
1927  errh1 = (*m_exp)[i]->H1(inarray + m_phys_offset[i],
1928  soln + m_phys_offset[i]);
1929  err += errh1*errh1;
1930  }
1931 
1932  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
1933 
1934  return sqrt(err);
1935  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:877
void Nektar::MultiRegions::ExpList::HelmSolve ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const FlagList flags,
const StdRegions::ConstFactorMap factors,
const StdRegions::VarCoeffMap varcoeff = StdRegions::NullVarCoeffMap,
const Array< OneD, const NekDouble > &  dirForcing = NullNekDouble1DArray 
)
inline

Solve helmholtz problem.

Definition at line 1590 of file ExpList.h.

References v_HelmSolve().

1597  {
1598  v_HelmSolve(inarray, outarray, flags, factors, varcoeff, dirForcing);
1599  }
virtual void v_HelmSolve(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const FlagList &flags, const StdRegions::ConstFactorMap &factors, const StdRegions::VarCoeffMap &varcoeff, const Array< OneD, const NekDouble > &dirForcing)
Definition: ExpList.cpp:2346
void Nektar::MultiRegions::ExpList::HomogeneousBwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal,
bool  Shuff = true,
bool  UnShuff = true 
)
inline

Definition at line 1686 of file ExpList.h.

References v_HomogeneousBwdTrans().

1692  {
1693  v_HomogeneousBwdTrans(inarray,outarray,coeffstate,Shuff,UnShuff);
1694  }
virtual void v_HomogeneousBwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
Definition: ExpList.cpp:2391
Array<OneD, const NekDouble> Nektar::MultiRegions::ExpList::HomogeneousEnergy ( void  )
inline

This function calculates the energy associated with each one of the modesof a 3D homogeneous nD expansion.

Definition at line 487 of file ExpList.h.

References v_HomogeneousEnergy().

488  {
489  return v_HomogeneousEnergy();
490  }
virtual Array< OneD, const NekDouble > v_HomogeneousEnergy(void)
Definition: ExpList.cpp:1810
void Nektar::MultiRegions::ExpList::HomogeneousFwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal,
bool  Shuff = true,
bool  UnShuff = true 
)
inline

Definition at line 1673 of file ExpList.h.

References v_HomogeneousFwdTrans().

1679  {
1680  v_HomogeneousFwdTrans(inarray,outarray,coeffstate,Shuff,UnShuff);
1681  }
virtual void v_HomogeneousFwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
Definition: ExpList.cpp:2381
void Nektar::MultiRegions::ExpList::ImposeDirichletConditions ( Array< OneD, NekDouble > &  outarray)
inline

Impose Dirichlet Boundary Conditions onto Array.

Definition at line 1780 of file ExpList.h.

References v_ImposeDirichletConditions().

1782  {
1783  v_ImposeDirichletConditions(outarray);
1784  }
virtual void v_ImposeDirichletConditions(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2424
NekDouble Nektar::MultiRegions::ExpList::Integral ( const Array< OneD, const NekDouble > &  inarray)
inline

Definition at line 480 of file ExpList.h.

References v_Integral().

481  {
482  return v_Integral(inarray);
483  }
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Definition: ExpList.cpp:1796
void Nektar::MultiRegions::ExpList::IProductWRTBase ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
inline

Definition at line 1507 of file ExpList.h.

References v_IProductWRTBase().

Referenced by Nektar::MultiRegions::ContField3D::v_FwdTrans(), Nektar::MultiRegions::DisContField3D::v_HelmSolve(), Nektar::MultiRegions::ContField3D::v_HelmSolve(), Nektar::MultiRegions::DisContField2D::v_HelmSolve(), and Nektar::MultiRegions::DisContField1D::v_HelmSolve().

1511  {
1512  v_IProductWRTBase(inarray,outarray, coeffstate);
1513  }
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2465
void Nektar::MultiRegions::ExpList::IProductWRTBase_IterPerExp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

This function calculates the inner product of a function $f(\boldsymbol{x})$ with respect to all {local} expansion modes $\phi_n^e(\boldsymbol{x})$.

Definition at line 1518 of file ExpList.h.

References v_IProductWRTBase_IterPerExp().

Referenced by Nektar::MultiRegions::ContField2D::IProductWRTBase(), Nektar::MultiRegions::ContField1D::IProductWRTBase(), v_FwdTrans_IterPerExp(), and Nektar::MultiRegions::ContField3D::v_IProductWRTBase().

1521  {
1522  v_IProductWRTBase_IterPerExp(inarray,outarray);
1523  }
virtual void v_IProductWRTBase_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:314
void Nektar::MultiRegions::ExpList::IProductWRTDerivBase ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

This function calculates the inner product of a function $f(\boldsymbol{x})$ with respect to the derivative (in direction.

Parameters
dir)of all {local} expansion modes $\phi_n^e(\boldsymbol{x})$.

The operation is evaluated locally for every element by the function StdRegions::StdExpansion::IProductWRTDerivBase.

Parameters
dir{0,1} is the direction in which the derivative of the basis should be taken
inarrayAn array of size $Q_{\mathrm{tot}}$ containing the values of the function $f(\boldsymbol{x})$ at the quadrature points $\boldsymbol{x}_i$.
outarrayAn array of size $N_{\mathrm{eof}}$ used to store the result.

Definition at line 341 of file ExpList.cpp.

References m_coeff_offset, and m_phys_offset.

344  {
345  int i;
346 
347  Array<OneD,NekDouble> e_outarray;
348 
349  for(i = 0; i < (*m_exp).size(); ++i)
350  {
351  (*m_exp)[i]->IProductWRTDerivBase(dir,inarray+m_phys_offset[i],
352  e_outarray = outarray+m_coeff_offset[i]);
353  }
354  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:958
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
void Nektar::MultiRegions::ExpList::IProductWRTDerivBase ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

This function calculates the inner product of a function $f(\boldsymbol{x})$ with respect to the derivative (in direction.

Parameters
dir)of all {local} expansion modes $\phi_n^e(\boldsymbol{x})$.

The operation is evaluated locally for every element by the function StdRegions::StdExpansion::IProductWRTDerivBase.

Parameters
inarrayAn array of arrays of size $Q_{\mathrm{tot}}$ containing the values of the function $f(\boldsymbol{x})$ at the quadrature points $\boldsymbol{x}_i$ in dir directions.
outarrayAn array of size $N_{\mathrm{eof}}$ used to store the result.

Definition at line 368 of file ExpList.cpp.

References ASSERTL0, ASSERTL1, Nektar::NekOptimize::eIProductWRTDerivBase, GetCoordim(), m_coll_coeff_offset, m_coll_phys_offset, and m_collections.

370  {
371  Array<OneD, NekDouble> tmp0,tmp1,tmp2;
372  // assume coord dimension defines the size of Deriv Base
373  int dim = GetCoordim(0);
374 
375  ASSERTL1(inarray.num_elements() >= dim,"inarray is not of sufficient dimension");
376 
377  switch(dim)
378  {
379  case 1:
380  for (int i = 0; i < m_collections.size(); ++i)
381  {
382  m_collections[i].ApplyOperator(
384  inarray[0] + m_coll_phys_offset[i],
385  tmp0 = outarray + m_coll_coeff_offset[i]);
386  }
387  break;
388  case 2:
389  for (int i = 0; i < m_collections.size(); ++i)
390  {
391  m_collections[i].ApplyOperator(
393  inarray[0] + m_coll_phys_offset[i],
394  tmp0 = inarray[1] + m_coll_phys_offset[i],
395  tmp1 = outarray + m_coll_coeff_offset[i]);
396  }
397  break;
398  case 3:
399  for (int i = 0; i < m_collections.size(); ++i)
400  {
401  m_collections[i].ApplyOperator(
403  inarray[0] + m_coll_phys_offset[i],
404  tmp0 = inarray[1] + m_coll_phys_offset[i],
405  tmp1 = inarray[2] + m_coll_phys_offset[i],
406  tmp2 = outarray + m_coll_coeff_offset[i]);
407  }
408  break;
409  default:
410  ASSERTL0(false,"Dimension of inarray not correct");
411  break;
412  }
413  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:955
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1735
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:952
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
Collections::CollectionVector m_collections
Definition: ExpList.h:949
NekDouble Nektar::MultiRegions::ExpList::L2 ( const Array< OneD, const NekDouble > &  inarray,
const Array< OneD, const NekDouble > &  soln = NullNekDouble1DArray 
)
inline

This function calculates the $L_2$ error with respect to soln of the global spectral/hp element approximation.

Definition at line 467 of file ExpList.h.

References v_L2().

Referenced by Nektar::MultiRegions::DisContField2D::L2_DGDeriv(), and Nektar::MultiRegions::ExpList3DHomogeneous2D::v_L2().

470  {
471  return v_L2(inarray, soln);
472  }
virtual NekDouble v_L2(const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
Definition: ExpList.cpp:1766
void Nektar::MultiRegions::ExpList::LinearAdvectionDiffusionReactionSolve ( const Array< OneD, Array< OneD, NekDouble > > &  velocity,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const NekDouble  lambda,
CoeffState  coeffstate = eLocal,
const Array< OneD, const NekDouble > &  dirForcing = NullNekDouble1DArray 
)
inline

Solve Advection Diffusion Reaction.

Definition at line 1605 of file ExpList.h.

References v_LinearAdvectionDiffusionReactionSolve().

1612  {
1613  v_LinearAdvectionDiffusionReactionSolve(velocity,inarray, outarray,
1614  lambda, coeffstate,dirForcing);
1615  }
virtual void v_LinearAdvectionDiffusionReactionSolve(const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, CoeffState coeffstate=eLocal, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
Definition: ExpList.cpp:2357
void Nektar::MultiRegions::ExpList::LinearAdvectionReactionSolve ( const Array< OneD, Array< OneD, NekDouble > > &  velocity,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const NekDouble  lambda,
CoeffState  coeffstate = eLocal,
const Array< OneD, const NekDouble > &  dirForcing = NullNekDouble1DArray 
)
inline

Solve Advection Diffusion Reaction.

Definition at line 1617 of file ExpList.h.

References v_LinearAdvectionReactionSolve().

1624  {
1625  v_LinearAdvectionReactionSolve(velocity,inarray, outarray,
1626  lambda, coeffstate,dirForcing);
1627  }
virtual void v_LinearAdvectionReactionSolve(const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, CoeffState coeffstate=eLocal, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
Definition: ExpList.cpp:2369
NekDouble Nektar::MultiRegions::ExpList::Linf ( const Array< OneD, const NekDouble > &  inarray,
const Array< OneD, const NekDouble > &  soln = NullNekDouble1DArray 
)

This function calculates the $L_\infty$ error of the global spectral/hp element approximation.

Given a spectral/hp approximation $u^{\delta}(\boldsymbol{x})$ evaluated at the quadrature points (which should be contained in m_phys), this function calculates the $L_\infty$ error of this approximation with respect to an exact solution. The local distribution of the quadrature points allows an elemental evaluation of this operation through the functions StdRegions::StdExpansion::Linf.

The exact solution, also evaluated at the quadrature points, should be contained in the variable m_phys of the ExpList object Sol.

Parameters
solnA 1D array, containing the discrete evaluation of the exact solution at the quadrature points in its array m_phys.
Returns
The $L_\infty$ error of the approximation.

Definition at line 1727 of file ExpList.cpp.

References m_comm, m_npoints, Nektar::NullNekDouble1DArray, Nektar::LibUtilities::ReduceMax, and Vmath::Vmax().

1730  {
1731  NekDouble err = 0.0;
1732 
1733  if (soln == NullNekDouble1DArray)
1734  {
1735  err = Vmath::Vmax(m_npoints, inarray, 1);
1736  }
1737  else
1738  {
1739  for (int i = 0; i < m_npoints; ++i)
1740  {
1741  err = max(err, abs(inarray[i] - soln[i]));
1742  }
1743  }
1744 
1745  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceMax);
1746 
1747  return err;
1748  }
static Array< OneD, NekDouble > NullNekDouble1DArray
T Vmax(int n, const T *x, const int incx)
Return the maximum element in x – called vmax to avoid conflict with max.
Definition: Vmath.cpp:756
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:877
void Nektar::MultiRegions::ExpList::LocalToGlobal ( void  )
inline
void Nektar::MultiRegions::ExpList::MultiplyByBlockMatrix ( const GlobalMatrixKey gkey,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protected

Retrieves the block matrix specified by bkey, and computes $ y=Mx $.

Parameters
gkeyGlobalMatrixKey specifying the block matrix to use in the matrix-vector multiply.
inarrayInput vector $ x $.
outarrayOutput vector $ y $.

Definition at line 284 of file ExpList.cpp.

References Nektar::eWrapper, and GetBlockMatrix().

Referenced by GeneralMatrixOp_IterPerExp().

288  {
289  // Retrieve the block matrix using the given key.
290  const DNekScalBlkMatSharedPtr& blockmat = GetBlockMatrix(gkey);
291  int nrows = blockmat->GetRows();
292  int ncols = blockmat->GetColumns();
293 
294  // Create NekVectors from the given data arrays
295  NekVector<NekDouble> in (ncols,inarray, eWrapper);
296  NekVector< NekDouble> out(nrows,outarray,eWrapper);
297 
298  // Perform matrix-vector multiply.
299  out = (*blockmat)*in;
300  }
const DNekScalBlkMatSharedPtr & GetBlockMatrix(const GlobalMatrixKey &gkey)
Definition: ExpList.cpp:772
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:74
void Nektar::MultiRegions::ExpList::MultiplyByElmtInvMass ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

This function elementally mulplies the coefficient space of Sin my the elemental inverse of the mass matrix.

The coefficients of the function to be acted upon should be contained in the

Parameters
inarray.The resulting coefficients are stored in
outarray
inarrayAn array of size $N_{\mathrm{eof}}$ containing the inner product.

Definition at line 523 of file ExpList.cpp.

References Nektar::StdRegions::eInvMass, Nektar::eWrapper, GetBlockMatrix(), and m_ncoeffs.

Referenced by v_FwdTrans_IterPerExp().

526  {
527  GlobalMatrixKey mkey(StdRegions::eInvMass);
528  const DNekScalBlkMatSharedPtr& InvMass = GetBlockMatrix(mkey);
529 
530  // Inverse mass matrix
532  if(inarray.get() == outarray.get())
533  {
534  NekVector<NekDouble> in(m_ncoeffs,inarray); // copy data
535  out = (*InvMass)*in;
536  }
537  else
538  {
540  out = (*InvMass)*in;
541  }
542  }
const DNekScalBlkMatSharedPtr & GetBlockMatrix(const GlobalMatrixKey &gkey)
Definition: ExpList.cpp:772
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:887
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:74
void Nektar::MultiRegions::ExpList::MultiplyByInvMassMatrix ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
inline

Definition at line 1579 of file ExpList.h.

References v_MultiplyByInvMassMatrix().

1583  {
1584  v_MultiplyByInvMassMatrix(inarray,outarray,coeffstate);
1585  }
virtual void v_MultiplyByInvMassMatrix(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2337
void Nektar::MultiRegions::ExpList::NormVectorIProductWRTBase ( Array< OneD, const NekDouble > &  V1,
Array< OneD, const NekDouble > &  V2,
Array< OneD, NekDouble > &  outarray,
int  BndID 
)
inline

Definition at line 1722 of file ExpList.h.

References v_NormVectorIProductWRTBase().

1727  {
1728  v_NormVectorIProductWRTBase(V1,V2,outarray,BndID);
1729  }
virtual void v_NormVectorIProductWRTBase(Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
Definition: ExpList.cpp:2415
void Nektar::MultiRegions::ExpList::PhysDeriv ( Direction  edir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d 
)
inline

Definition at line 1662 of file ExpList.h.

References v_PhysDeriv().

1666  {
1667  v_PhysDeriv(edir, inarray,out_d);
1668  }
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)
Definition: ExpList.cpp:448
void Nektar::MultiRegions::ExpList::PhysDeriv ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d0,
Array< OneD, NekDouble > &  out_d1 = NullNekDouble1DArray,
Array< OneD, NekDouble > &  out_d2 = NullNekDouble1DArray 
)
inline

This function discretely evaluates the derivative of a function $f(\boldsymbol{x})$ on the domain consisting of all elements of the expansion.

Definition at line 1643 of file ExpList.h.

References v_PhysDeriv().

1647  {
1648  v_PhysDeriv(inarray,out_d0,out_d1,out_d2);
1649  }
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)
Definition: ExpList.cpp:448
void Nektar::MultiRegions::ExpList::PhysDeriv ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d 
)
inline

Definition at line 1654 of file ExpList.h.

References v_PhysDeriv().

1658  {
1659  v_PhysDeriv(dir,inarray,out_d);
1660  }
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)
Definition: ExpList.cpp:448
void Nektar::MultiRegions::ExpList::PhysGalerkinProjection1DScaled ( const NekDouble  scale,
const Array< OneD, NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

This function Galerkin projects the physical space points in inarray to outarray where inarray is assumed to be defined in the expansion but where the number of points are rescaled by 1DScale.

Definition at line 547 of file ExpList.h.

References v_PhysGalerkinProjection1DScaled().

551  {
552  v_PhysGalerkinProjection1DScaled(scale, inarray, outarray);
553  }
virtual void v_PhysGalerkinProjection1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1857
NekDouble Nektar::MultiRegions::ExpList::PhysIntegral ( void  )

This function integrates a function $f(\boldsymbol{x})$ over the domain consisting of all the elements of the expansion.

The integration is evaluated locally, that is

\[\int f(\boldsymbol{x})d\boldsymbol{x}=\sum_{e=1}^{{N_{\mathrm{el}}}} \left\{\int_{\Omega_e}f(\boldsymbol{x})d\boldsymbol{x}\right\}, \]

where the integration over the separate elements is done by the function StdRegions::StdExpansion::Integral, which discretely evaluates the integral using Gaussian quadrature.

Note that the array m_phys should be filled with the values of the function $f(\boldsymbol{x})$ at the quadrature points $\boldsymbol{x}_i$.

Returns
The value of the discretely evaluated integral $\int f(\boldsymbol{x})d\boldsymbol{x}$.

Definition at line 236 of file ExpList.cpp.

References ASSERTL1, m_phys, and m_physState.

237  {
238  ASSERTL1(m_physState == true,
239  "local physical space is not true ");
240 
241  return PhysIntegral(m_phys);
242  }
NekDouble PhysIntegral(void)
This function integrates a function over the domain consisting of all the elements of the expansion...
Definition: ExpList.cpp:236
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:926
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:935
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
NekDouble Nektar::MultiRegions::ExpList::PhysIntegral ( const Array< OneD, const NekDouble > &  inarray)

This function integrates a function $f(\boldsymbol{x})$ over the domain consisting of all the elements of the expansion.

The integration is evaluated locally, that is

\[\int f(\boldsymbol{x})d\boldsymbol{x}=\sum_{e=1}^{{N_{\mathrm{el}}}} \left\{\int_{\Omega_e}f(\boldsymbol{x})d\boldsymbol{x}\right\}, \]

where the integration over the separate elements is done by the function StdRegions::StdExpansion::Integral, which discretely evaluates the integral using Gaussian quadrature.

Parameters
inarrayAn array of size $Q_{\mathrm{tot}}$ containing the values of the function $f(\boldsymbol{x})$ at the quadrature points $\boldsymbol{x}_i$.
Returns
The value of the discretely evaluated integral $\int f(\boldsymbol{x})d\boldsymbol{x}$.

Definition at line 261 of file ExpList.cpp.

References m_phys_offset.

263  {
264  int i;
265  NekDouble sum = 0.0;
266 
267  for(i = 0; i < (*m_exp).size(); ++i)
268  {
269  sum += (*m_exp)[i]->Integral(inarray + m_phys_offset[i]);
270  }
271 
272  return sum;
273  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
double NekDouble
void Nektar::MultiRegions::ExpList::PhysInterp1DScaled ( const NekDouble  scale,
const Array< OneD, NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

This function interpolates the physical space points in inarray to outarray using the same points defined in the expansion but where the number of points are rescaled by 1DScale.

Definition at line 535 of file ExpList.h.

References v_PhysInterp1DScaled().

539  {
540  v_PhysInterp1DScaled(scale, inarray,outarray);
541  }
virtual void v_PhysInterp1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1851
void Nektar::MultiRegions::ExpList::ReadGlobalOptimizationParameters ( )
inlineprotected
void Nektar::MultiRegions::ExpList::Reset ( )
inline

Reset geometry information and reset matrices.

Definition at line 361 of file ExpList.h.

References v_Reset().

362  {
363  v_Reset();
364  }
virtual void v_Reset()
Reset geometry information, metrics, matrix managers and geometry information.
Definition: ExpList.cpp:1394
void Nektar::MultiRegions::ExpList::SetCoeff ( int  i,
NekDouble  val 
)
inline

Set the i th coefficiient in m_coeffs to value val.

Parameters
iThe index of m_coeffs to be set
valThe value which m_coeffs[i] is to be set to.

Definition at line 1746 of file ExpList.h.

References m_coeffs.

1747  {
1748  m_coeffs[i] = val;
1749  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:909
void Nektar::MultiRegions::ExpList::SetCoeffs ( int  i,
NekDouble  val 
)
inline

Set the i th coefficiient in m_coeffs to value val.

Parameters
iThe index of m_coeffs to be set.
valThe value which m_coeffs[i] is to be set to.

Definition at line 1756 of file ExpList.h.

References m_coeffs.

1757  {
1758  m_coeffs[i] = val;
1759  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:909
void Nektar::MultiRegions::ExpList::SetCoeffsArray ( Array< OneD, NekDouble > &  inarray)
inline

Set the m_coeffs array to inarray.

Definition at line 1762 of file ExpList.h.

References m_coeffs.

1763  {
1764  m_coeffs = inarray;
1765  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:909
void Nektar::MultiRegions::ExpList::SetExpType ( ExpansionType  Type)
void Nektar::MultiRegions::ExpList::SetHomo1DSpecVanVisc ( Array< OneD, NekDouble visc)
inline

This function sets the Spectral Vanishing Viscosity in homogeneous1D expansion.

Definition at line 494 of file ExpList.h.

References v_SetHomo1DSpecVanVisc().

495  {
497  }
virtual void v_SetHomo1DSpecVanVisc(Array< OneD, NekDouble > visc)
Definition: ExpList.h:1328
void Nektar::MultiRegions::ExpList::SetModifiedBasis ( const bool  modbasis)
inline

Set Modified Basis for the stability analysis.

void Nektar::MultiRegions::ExpList::SetPhys ( int  i,
NekDouble  val 
)
inline

Set the i th value of m_phys to value val.

Set the i th value ofm_phys to value val.

Definition at line 1456 of file ExpList.h.

References m_phys.

1457  {
1458  m_phys[i] = val;
1459  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:926
void Nektar::MultiRegions::ExpList::SetPhys ( const Array< OneD, const NekDouble > &  inarray)
inline

Fills the array m_phys.

This function fills the array $\boldsymbol{u}_l$, the evaluation of the expansion at the quadrature points (implemented as m_phys), with the values of the array inarray.

Parameters
inarrayThe array containing the values where m_phys should be filled with.

Definition at line 1470 of file ExpList.h.

References ASSERTL0, m_npoints, m_phys, m_physState, and Vmath::Vcopy().

1472  {
1473  ASSERTL0(inarray.num_elements() == m_npoints,
1474  "Input array does not have correct number of elements.");
1475 
1476  Vmath::Vcopy(m_npoints,&inarray[0],1,&m_phys[0],1);
1477  m_physState = true;
1478  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:926
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:935
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1038
void Nektar::MultiRegions::ExpList::SetPhysArray ( Array< OneD, NekDouble > &  inarray)
inline

Sets the array m_phys.

Definition at line 1481 of file ExpList.h.

References m_phys.

1482  {
1483  m_phys = inarray;
1484  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:926
void Nektar::MultiRegions::ExpList::SetPhysState ( const bool  physState)
inline

This function manually sets whether the array of physical values $\boldsymbol{u}_l$ (implemented as m_phys) is filled or not.

Parameters
physStatetrue (=filled) or false (=not filled).

Definition at line 1490 of file ExpList.h.

References m_physState.

1491  {
1492  m_physState = physState;
1493  }
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:935
void Nektar::MultiRegions::ExpList::SetUpPhysNormals ( )
inline
void Nektar::MultiRegions::ExpList::SetWaveSpace ( const bool  wavespace)
inline

Sets the wave space to the one of the possible configuration true or false.

Definition at line 1442 of file ExpList.h.

References m_WaveSpace.

1443  {
1444  m_WaveSpace = wavespace;
1445  }
void Nektar::MultiRegions::ExpList::SmoothField ( Array< OneD, NekDouble > &  field)
inline

Smooth a field across elements.

Definition at line 1549 of file ExpList.h.

References v_SmoothField().

1550  {
1551  v_SmoothField(field);
1552  }
virtual void v_SmoothField(Array< OneD, NekDouble > &field)
Definition: ExpList.cpp:594
boost::shared_ptr< ExpList > & Nektar::MultiRegions::ExpList::UpdateBndCondExpansion ( int  i)
inline

Definition at line 1919 of file ExpList.h.

References v_UpdateBndCondExpansion().

1920  {
1921  return v_UpdateBndCondExpansion(i);
1922  }
virtual boost::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
Definition: ExpList.cpp:2225
Array< OneD, SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::UpdateBndConditions ( )
inline

Definition at line 2022 of file ExpList.h.

References v_UpdateBndConditions().

2023  {
2024  return v_UpdateBndConditions();
2025  }
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
Definition: ExpList.cpp:2590
Array< OneD, NekDouble > & Nektar::MultiRegions::ExpList::UpdateCoeffs ( void  )
inline

This function returns (a reference to) the array $\boldsymbol{\hat{u}}_l$ (implemented as m_coeffs) containing all local expansion coefficients.

If one wants to get hold of the underlying data without modifying them, rather use the function GetCoeffs instead.

Returns
(A reference to) the array m_coeffs.

Definition at line 1894 of file ExpList.h.

References m_coeffs.

Referenced by Nektar::MultiRegions::DisContField3DHomogeneous2D::EvaluateBoundaryConditions(), and Nektar::MultiRegions::DisContField3DHomogeneous1D::EvaluateBoundaryConditions().

1895  {
1896  return m_coeffs;
1897  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:909
Array< OneD, NekDouble > & Nektar::MultiRegions::ExpList::UpdatePhys ( void  )
inline

This function returns (a reference to) the array $\boldsymbol{u}_l$ (implemented as m_phys) containing the function $u^{\delta}(\boldsymbol{x})$ evaluated at the quadrature points.

If one wants to get hold of the underlying data without modifying them, rather use the function GetPhys instead.

Returns
(A reference to) the array m_phys.

Definition at line 1905 of file ExpList.h.

References m_phys, and m_physState.

1906  {
1907  m_physState = true;
1908  return m_phys;
1909  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:926
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:935
void Nektar::MultiRegions::ExpList::Upwind ( const Array< OneD, const Array< OneD, NekDouble > > &  Vec,
const Array< OneD, const NekDouble > &  Fwd,
const Array< OneD, const NekDouble > &  Bwd,
Array< OneD, NekDouble > &  Upwind 
)
inline

Definition at line 1924 of file ExpList.h.

References v_Upwind().

1929  {
1930  v_Upwind(Vec, Fwd, Bwd, Upwind);
1931  }
virtual void v_Upwind(const Array< OneD, const Array< OneD, NekDouble > > &Vec, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
Definition: ExpList.cpp:2233
void Nektar::MultiRegions::ExpList::Upwind ( const Array< OneD, const NekDouble > &  Vn,
const Array< OneD, const NekDouble > &  Fwd,
const Array< OneD, const NekDouble > &  Bwd,
Array< OneD, NekDouble > &  Upwind 
)
inline

Definition at line 1933 of file ExpList.h.

References v_Upwind().

1938  {
1939  v_Upwind(Vn, Fwd, Bwd, Upwind);
1940  }
virtual void v_Upwind(const Array< OneD, const Array< OneD, NekDouble > > &Vec, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
Definition: ExpList.cpp:2233
void Nektar::MultiRegions::ExpList::v_AddFwdBwdTraceIntegral ( const Array< OneD, const NekDouble > &  Fwd,
const Array< OneD, const NekDouble > &  Bwd,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField2D, and Nektar::MultiRegions::DisContField3D.

Definition at line 2298 of file ExpList.cpp.

References ASSERTL0.

Referenced by AddFwdBwdTraceIntegral().

2302  {
2303  ASSERTL0(false,
2304  "This method is not defined or valid for this class type");
2305  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_AddTraceIntegral ( const Array< OneD, const NekDouble > &  Fx,
const Array< OneD, const NekDouble > &  Fy,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField2D.

Definition at line 2281 of file ExpList.cpp.

References ASSERTL0.

Referenced by AddTraceIntegral().

2285  {
2286  ASSERTL0(false,
2287  "This method is not defined or valid for this class type");
2288  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_AddTraceIntegral ( const Array< OneD, const NekDouble > &  Fn,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField2D, Nektar::MultiRegions::DisContField1D, and Nektar::MultiRegions::DisContField3D.

Definition at line 2290 of file ExpList.cpp.

References ASSERTL0.

2293  {
2294  ASSERTL0(false,
2295  "This method is not defined or valid for this class type");
2296  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_AppendFieldData ( LibUtilities::FieldDefinitionsSharedPtr fielddef,
std::vector< NekDouble > &  fielddata 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D, and Nektar::MultiRegions::ExpListHomogeneous2D.

Definition at line 2061 of file ExpList.cpp.

References m_coeffs.

Referenced by AppendFieldData().

2062  {
2063  v_AppendFieldData(fielddef,fielddata,m_coeffs);
2064  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:909
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:2061
void Nektar::MultiRegions::ExpList::v_AppendFieldData ( LibUtilities::FieldDefinitionsSharedPtr fielddef,
std::vector< NekDouble > &  fielddata,
Array< OneD, NekDouble > &  coeffs 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D, and Nektar::MultiRegions::ExpListHomogeneous2D.

Definition at line 2066 of file ExpList.cpp.

References m_coeff_offset.

2067  {
2068  int i;
2069  // Determine mapping from element ids to location in
2070  // expansion list
2071  // Determine mapping from element ids to location in
2072  // expansion list
2073  map<int, int> ElmtID_to_ExpID;
2074  for(i = 0; i < (*m_exp).size(); ++i)
2075  {
2076  ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2077  }
2078 
2079  for(i = 0; i < fielddef->m_elementIDs.size(); ++i)
2080  {
2081  int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
2082  int datalen = (*m_exp)[eid]->GetNcoeffs();
2083  fielddata.insert(fielddata.end(),&coeffs[m_coeff_offset[eid]],&coeffs[m_coeff_offset[eid]]+datalen);
2084  }
2085 
2086  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:958
void Nektar::MultiRegions::ExpList::v_BwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField2D, Nektar::MultiRegions::ContField1D, Nektar::MultiRegions::ExpListHomogeneous1D, Nektar::MultiRegions::ExpListHomogeneous2D, and Nektar::MultiRegions::ContField3D.

Definition at line 2451 of file ExpList.cpp.

References v_BwdTrans_IterPerExp().

Referenced by BwdTrans().

2454  {
2455  v_BwdTrans_IterPerExp(inarray,outarray);
2456  }
virtual void v_BwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1189
void Nektar::MultiRegions::ExpList::v_BwdTrans_IterPerExp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Given the elemental coefficients $\hat{u}_n^e$ of an expansion, this function evaluates the spectral/hp expansion $u^{\delta}(\boldsymbol{x})$ at the quadrature points $\boldsymbol{x}_i$. The operation is evaluated locally by the elemental function StdRegions::StdExpansion::BwdTrans.

Parameters
inarrayAn array of size $N_{\mathrm{eof}}$ containing the local coefficients $\hat{u}_n^e$.
outarrayThe resulting physical values at the quadrature points $u^{\delta}(\boldsymbol{x}_i)$ will be stored in this array of size $Q_{\mathrm{tot}}$.

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D, and Nektar::MultiRegions::ExpListHomogeneous2D.

Definition at line 1189 of file ExpList.cpp.

References Nektar::StdRegions::eBwdTrans, m_coll_coeff_offset, m_coll_phys_offset, and m_collections.

Referenced by BwdTrans_IterPerExp(), and v_BwdTrans().

1191  {
1193  for (int i = 0; i < m_collections.size(); ++i)
1194  {
1195  m_collections[i].ApplyOperator(Collections::eBwdTrans,
1196  inarray + m_coll_coeff_offset[i],
1197  tmp = outarray + m_coll_phys_offset[i]);
1198  }
1199  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:955
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:952
Collections::CollectionVector m_collections
Definition: ExpList.h:949
void Nektar::MultiRegions::ExpList::v_DealiasedProd ( const Array< OneD, NekDouble > &  inarray1,
const Array< OneD, NekDouble > &  inarray2,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D, and Nektar::MultiRegions::ExpListHomogeneous2D.

Definition at line 2401 of file ExpList.cpp.

References ASSERTL0.

Referenced by DealiasedProd().

2402  {
2403  ASSERTL0(false,
2404  "This method is not defined or valid for this class type");
2405  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_EvaluateBoundaryConditions ( const NekDouble  time = 0.0,
const std::string  varName = "",
const NekDouble  x2_in = NekConstants::kNekUnsetDouble,
const NekDouble  x3_in = NekConstants::kNekUnsetDouble 
)
privatevirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D, Nektar::MultiRegions::DisContField2D, Nektar::MultiRegions::DisContField1D, Nektar::MultiRegions::DisContField3D, and Nektar::MultiRegions::DisContField3DHomogeneous2D.

Definition at line 2600 of file ExpList.cpp.

References ASSERTL0.

Referenced by EvaluateBoundaryConditions().

2605  {
2606  ASSERTL0(false,
2607  "This method is not defined or valid for this class type");
2608  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_ExtractCoeffsToCoeffs ( const boost::shared_ptr< ExpList > &  fromExpList,
const Array< OneD, const NekDouble > &  fromCoeffs,
Array< OneD, NekDouble > &  toCoeffs 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 2186 of file ExpList.cpp.

References m_coeff_offset, m_ncoeffs, m_offset_elmt_id, and Vmath::Vcopy().

Referenced by ExtractCoeffsToCoeffs().

2187  {
2188  int i;
2189  int offset = 0;
2190 
2191  // check if the same and if so just copy over coeffs
2192  if(fromExpList->GetNcoeffs() == m_ncoeffs)
2193  {
2194  Vmath::Vcopy(m_ncoeffs,fromCoeffs,1,toCoeffs,1);
2195  }
2196  else
2197  {
2198  std::vector<unsigned int> nummodes;
2199  for(i = 0; i < (*m_exp).size(); ++i)
2200  {
2201  int eid = m_offset_elmt_id[i];
2202  for(int j= 0; j < fromExpList->GetExp(eid)->GetNumBases(); ++j)
2203  {
2204  nummodes.push_back(fromExpList->GetExp(eid)->GetBasisNumModes(j));
2205  }
2206 
2207  (*m_exp)[eid]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes,0,
2208  &toCoeffs[m_coeff_offset[eid]]);
2209 
2210  offset += fromExpList->GetExp(eid)->GetNcoeffs();
2211  }
2212  }
2213  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:958
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:887
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:969
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1038
void Nektar::MultiRegions::ExpList::v_ExtractDataToCoeffs ( LibUtilities::FieldDefinitionsSharedPtr fielddef,
std::vector< NekDouble > &  fielddata,
std::string &  field,
Array< OneD, NekDouble > &  coeffs 
)
protectedvirtual

Extract data from raw field data into expansion list.

Parameters
fielddefField definitions.
fielddataData for associated field.
fieldField variable name.
coeffsResulting coefficient array.

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D, and Nektar::MultiRegions::ExpListHomogeneous2D.

Definition at line 2111 of file ExpList.cpp.

References ASSERTL0, Nektar::LibUtilities::GetNumberOfCoefficients(), m_coeff_offset, m_exp, and Vmath::Vcopy().

Referenced by ExtractDataToCoeffs().

2116  {
2117  int i, expId;
2118  int offset = 0;
2119  int modes_offset = 0;
2120  int datalen = fielddata.size()/fielddef->m_fields.size();
2121 
2122  // Find data location according to field definition
2123  for(i = 0; i < fielddef->m_fields.size(); ++i)
2124  {
2125  if(fielddef->m_fields[i] == field)
2126  {
2127  break;
2128  }
2129  offset += datalen;
2130  }
2131 
2132  ASSERTL0(i != fielddef->m_fields.size(),
2133  "Field (" + field + ") not found in file.");
2134 
2135  // Determine mapping from element ids to location in expansion list
2136  map<int, int> elmtToExpId;
2137 
2138  // Loop in reverse order so that in case where using a Homogeneous
2139  // expansion it sets geometry ids to first part of m_exp
2140  // list. Otherwise will set to second (complex) expansion
2141  for(i = (*m_exp).size()-1; i >= 0; --i)
2142  {
2143  elmtToExpId[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2144  }
2145 
2146  for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
2147  {
2148  // Reset modes_offset in the case where all expansions of
2149  // the same order.
2150  if (fielddef->m_uniOrder == true)
2151  {
2152  modes_offset = 0;
2153  }
2154 
2155  datalen = LibUtilities::GetNumberOfCoefficients(fielddef->m_shapeType,
2156  fielddef->m_numModes, modes_offset);
2157 
2158  const int elmtId = fielddef->m_elementIDs[i];
2159  if (elmtToExpId.count(elmtId) == 0)
2160  {
2161  offset += datalen;
2162  continue;
2163  }
2164 
2165  expId = elmtToExpId[elmtId];
2166 
2167  if (datalen == (*m_exp)[expId]->GetNcoeffs())
2168  {
2169  Vmath::Vcopy(datalen, &fielddata[offset], 1,
2170  &coeffs[m_coeff_offset[expId]], 1);
2171  }
2172  else
2173  {
2174  (*m_exp)[expId]->ExtractDataToCoeffs(
2175  &fielddata[offset], fielddef->m_numModes,
2176  modes_offset, &coeffs[m_coeff_offset[expId]]);
2177  }
2178 
2179  offset += datalen;
2180  modes_offset += (*m_exp)[0]->GetNumBases();
2181  }
2182 
2183  return;
2184  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
int GetNumberOfCoefficients(ShapeType shape, std::vector< unsigned int > &modes, int offset)
Definition: ShapeType.hpp:312
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:958
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1038
void Nektar::MultiRegions::ExpList::v_ExtractTracePhys ( Array< OneD, NekDouble > &  outarray)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D, Nektar::MultiRegions::DisContField2D, Nektar::MultiRegions::DisContField1D, and Nektar::MultiRegions::DisContField3D.

Definition at line 2323 of file ExpList.cpp.

References ASSERTL0.

Referenced by ExtractTracePhys().

2324  {
2325  ASSERTL0(false,
2326  "This method is not defined or valid for this class type");
2327  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_ExtractTracePhys ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D, Nektar::MultiRegions::DisContField1D, Nektar::MultiRegions::DisContField2D, and Nektar::MultiRegions::DisContField3D.

Definition at line 2329 of file ExpList.cpp.

References ASSERTL0.

2332  {
2333  ASSERTL0(false,
2334  "This method is not defined or valid for this class type");
2335  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_FillBndCondFromField ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField2D, Nektar::MultiRegions::DisContField2D, and Nektar::MultiRegions::ContField3D.

Definition at line 2432 of file ExpList.cpp.

References ASSERTL0.

Referenced by FillBndCondFromField().

2433  {
2434  ASSERTL0(false,
2435  "This method is not defined or valid for this class type");
2436  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_FwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField2D, Nektar::MultiRegions::ExpListHomogeneous1D, Nektar::MultiRegions::ContField1D, Nektar::MultiRegions::ExpListHomogeneous2D, and Nektar::MultiRegions::ContField3D.

Definition at line 2458 of file ExpList.cpp.

References v_FwdTrans_IterPerExp().

Referenced by FwdTrans().

2461  {
2462  v_FwdTrans_IterPerExp(inarray,outarray);
2463  }
virtual void v_FwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:562
void Nektar::MultiRegions::ExpList::v_FwdTrans_IterPerExp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Given a function $u(\boldsymbol{x})$ defined at the quadrature points, this function determines the transformed elemental coefficients $\hat{u}_n^e$ employing a discrete elemental Galerkin projection from physical space to coefficient space. For each element, the operation is evaluated locally by the function StdRegions::StdExpansion::IproductWRTBase followed by a call to #MultiRegions#MultiplyByElmtInvMass.

Parameters
inarrayAn array of size $Q_{\mathrm{tot}}$ containing the values of the function $f(\boldsymbol{x})$ at the quadrature points $\boldsymbol{x}_i$.
outarrayThe resulting coefficients $\hat{u}_n^e$ will be stored in this array of size $N_{\mathrm{eof}}$.

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D, and Nektar::MultiRegions::ExpListHomogeneous2D.

Definition at line 562 of file ExpList.cpp.

References IProductWRTBase_IterPerExp(), m_ncoeffs, and MultiplyByElmtInvMass().

Referenced by FwdTrans_IterPerExp(), and v_FwdTrans().

564  {
566 
567  IProductWRTBase_IterPerExp(inarray,f);
568  MultiplyByElmtInvMass(f,outarray);
569 
570  }
void MultiplyByElmtInvMass(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function elementally mulplies the coefficient space of Sin my the elemental inverse of the mass ...
Definition: ExpList.cpp:523
void IProductWRTBase_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function calculates the inner product of a function with respect to all {local} expansion modes...
Definition: ExpList.h:1518
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:887
void Nektar::MultiRegions::ExpList::v_GeneralMatrixOp ( const GlobalMatrixKey gkey,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField2D, Nektar::MultiRegions::ContField1D, Nektar::MultiRegions::DisContField2D, Nektar::MultiRegions::ContField3D, and Nektar::MultiRegions::DisContField3D.

Definition at line 2480 of file ExpList.cpp.

References GeneralMatrixOp_IterPerExp().

Referenced by GeneralMatrixOp().

2485  {
2486  GeneralMatrixOp_IterPerExp(gkey,inarray,outarray);
2487  }
void GeneralMatrixOp_IterPerExp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:787
void Nektar::MultiRegions::ExpList::v_GetBCValues ( Array< OneD, NekDouble > &  BndVals,
const Array< OneD, NekDouble > &  TotField,
int  BndID 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D.

Definition at line 2407 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBCValues().

2410  {
2411  ASSERTL0(false,
2412  "This method is not defined or valid for this class type");
2413  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
const Array< OneD, const boost::shared_ptr< ExpList > > & Nektar::MultiRegions::ExpList::v_GetBndCondExpansions ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D, Nektar::MultiRegions::DisContField2D, Nektar::MultiRegions::DisContField1D, Nektar::MultiRegions::DisContField3D, and Nektar::MultiRegions::DisContField3DHomogeneous2D.

Definition at line 2217 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBndCondExpansions().

2218  {
2219  ASSERTL0(false,
2220  "This method is not defined or valid for this class type");
2222  return result;
2223  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::v_GetBndConditions ( void  )
privatevirtual

Reimplemented in Nektar::MultiRegions::ContField2D, Nektar::MultiRegions::DisContField3DHomogeneous1D, Nektar::MultiRegions::DisContField2D, Nektar::MultiRegions::DisContField1D, Nektar::MultiRegions::DisContField3D, Nektar::MultiRegions::ContField1D, and Nektar::MultiRegions::DisContField3DHomogeneous2D.

Definition at line 2579 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBndConditions().

2580  {
2581  ASSERTL0(false,
2582  "This method is not defined or valid for this class type");
2584  result;
2585  return result;
2586  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_GetBoundaryToElmtMap ( Array< OneD, int > &  ElmtID,
Array< OneD, int > &  EdgeID 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField1D, Nektar::MultiRegions::DisContField2D, Nektar::MultiRegions::DisContField3DHomogeneous1D, Nektar::MultiRegions::DisContField3D, and Nektar::MultiRegions::DisContField3DHomogeneous2D.

Definition at line 2561 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBoundaryToElmtMap().

2563  {
2564  ASSERTL0(false,
2565  "This method is not defined or valid for this class type");
2566  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_GetCoords ( Array< OneD, NekDouble > &  coord_0,
Array< OneD, NekDouble > &  coord_1,
Array< OneD, NekDouble > &  coord_2 = NullNekDouble1DArray 
)
protectedvirtual

The operation is evaluated locally by the elemental function StdRegions::StdExpansion::GetCoords.

Parameters
coord_0After calculation, the $x_1$ coordinate will be stored in this array.
coord_1After calculation, the $x_2$ coordinate will be stored in this array.
coord_2After calculation, the $x_3$ coordinate will be stored in this array.

Reimplemented in Nektar::MultiRegions::ExpList3DHomogeneous1D, Nektar::MultiRegions::ExpList2DHomogeneous1D, Nektar::MultiRegions::ExpList3DHomogeneous2D, and Nektar::MultiRegions::ExpList1DHomogeneous2D.

Definition at line 2500 of file ExpList.cpp.

References ASSERTL0, GetCoordim(), GetExp(), GetNumElmts(), and m_phys_offset.

Referenced by GetCoords().

2503  {
2504  if (GetNumElmts() == 0)
2505  {
2506  return;
2507  }
2508 
2509  int i;
2510  Array<OneD, NekDouble> e_coord_0;
2511  Array<OneD, NekDouble> e_coord_1;
2512  Array<OneD, NekDouble> e_coord_2;
2513 
2514  switch(GetExp(0)->GetCoordim())
2515  {
2516  case 1:
2517  for(i= 0; i < (*m_exp).size(); ++i)
2518  {
2519  e_coord_0 = coord_0 + m_phys_offset[i];
2520  (*m_exp)[i]->GetCoords(e_coord_0);
2521  }
2522  break;
2523  case 2:
2524  ASSERTL0(coord_1.num_elements() != 0,
2525  "output coord_1 is not defined");
2526 
2527  for(i= 0; i < (*m_exp).size(); ++i)
2528  {
2529  e_coord_0 = coord_0 + m_phys_offset[i];
2530  e_coord_1 = coord_1 + m_phys_offset[i];
2531  (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1);
2532  }
2533  break;
2534  case 3:
2535  ASSERTL0(coord_1.num_elements() != 0,
2536  "output coord_1 is not defined");
2537  ASSERTL0(coord_2.num_elements() != 0,
2538  "output coord_2 is not defined");
2539 
2540  for(i= 0; i < (*m_exp).size(); ++i)
2541  {
2542  e_coord_0 = coord_0 + m_phys_offset[i];
2543  e_coord_1 = coord_1 + m_phys_offset[i];
2544  e_coord_2 = coord_2 + m_phys_offset[i];
2545  (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1,e_coord_2);
2546  }
2547  break;
2548  }
2549  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:1858
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Definition: ExpList.h:562
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1735
std::vector< LibUtilities::FieldDefinitionsSharedPtr > Nektar::MultiRegions::ExpList::v_GetFieldDefinitions ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D, and Nektar::MultiRegions::ExpListHomogeneous2D.

Definition at line 2047 of file ExpList.cpp.

Referenced by GetFieldDefinitions().

2048  {
2049  std::vector<LibUtilities::FieldDefinitionsSharedPtr> returnval;
2050  v_GetFieldDefinitions(returnval);
2051  return returnval;
2052  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2047
void Nektar::MultiRegions::ExpList::v_GetFieldDefinitions ( std::vector< LibUtilities::FieldDefinitionsSharedPtr > &  fielddef)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D, and Nektar::MultiRegions::ExpListHomogeneous2D.

Definition at line 2054 of file ExpList.cpp.

References GeneralGetFieldDefinitions().

2055  {
2056  GeneralGetFieldDefinitions(fielddef);
2057  }
void GeneralGetFieldDefinitions(std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef, int NumHomoDir=0, int NumHomoStrip=1, Array< OneD, LibUtilities::BasisSharedPtr > &HomoBasis=LibUtilities::NullBasisSharedPtr1DArray, std::vector< NekDouble > &HomoLen=LibUtilities::NullNekDoubleVector, std::vector< unsigned int > &HomoZIDs=LibUtilities::NullUnsignedIntVector, std::vector< unsigned int > &HomoYIDs=LibUtilities::NullUnsignedIntVector)
Definition: ExpList.cpp:1937
void Nektar::MultiRegions::ExpList::v_GetFwdBwdTracePhys ( Array< OneD, NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField1D, Nektar::MultiRegions::DisContField2D, and Nektar::MultiRegions::DisContField3D.

Definition at line 2307 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetFwdBwdTracePhys().

2309  {
2310  ASSERTL0(false,
2311  "This method is not defined or valid for this class type");
2312  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_GetFwdBwdTracePhys ( const Array< OneD, const NekDouble > &  field,
Array< OneD, NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField1D, Nektar::MultiRegions::DisContField2D, and Nektar::MultiRegions::DisContField3D.

Definition at line 2314 of file ExpList.cpp.

References ASSERTL0.

2318  {
2319  ASSERTL0(false,
2320  "This method is not defined or valid for this class type");
2321  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
virtual LibUtilities::BasisSharedPtr Nektar::MultiRegions::ExpList::v_GetHomogeneousBasis ( void  )
inlineprivatevirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1320 of file ExpList.h.

References ASSERTL0, and Nektar::LibUtilities::NullBasisSharedPtr.

Referenced by GetHomogeneousBasis().

1321  {
1322  ASSERTL0(false,
1323  "This method is not defined or valid for this class type");
1325  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
static BasisSharedPtr NullBasisSharedPtr
Definition: Basis.h:358
NekDouble Nektar::MultiRegions::ExpList::v_GetHomoLen ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1826 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetHomoLen().

1827  {
1828  ASSERTL0(false,
1829  "This method is not defined or valid for this class type");
1830  NekDouble len = 0.0;
1831  return len;
1832  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
double NekDouble
void Nektar::MultiRegions::ExpList::v_GetNormals ( Array< OneD, Array< OneD, NekDouble > > &  normals)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpList1D, Nektar::MultiRegions::ExpList2DHomogeneous1D, Nektar::MultiRegions::ExpList2D, and Nektar::MultiRegions::ExpList0D.

Definition at line 2274 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetNormals().

2276  {
2277  ASSERTL0(false,
2278  "This method is not defined or valid for this class type");
2279  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
virtual int Nektar::MultiRegions::ExpList::v_GetNumElmts ( void  )
inlineprotectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D, and Nektar::MultiRegions::ExpListHomogeneous2D.

Definition at line 1026 of file ExpList.h.

Referenced by GetNumElmts().

1027  {
1028  return (*m_exp).size();
1029  }
void Nektar::MultiRegions::ExpList::v_GetPeriodicEntities ( PeriodicMap periodicVerts,
PeriodicMap periodicEdges,
PeriodicMap periodicFaces 
)
privatevirtual

Reimplemented in Nektar::MultiRegions::DisContField2D, Nektar::MultiRegions::DisContField3D, and Nektar::MultiRegions::ExpList3DHomogeneous1D.

Definition at line 2622 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetPeriodicEntities().

2626  {
2627  ASSERTL0(false,
2628  "This method is not defined or valid for this class type");
2629  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
ExpListSharedPtr & Nektar::MultiRegions::ExpList::v_GetPlane ( int  n)
privatevirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 2645 of file ExpList.cpp.

References ASSERTL0, and Nektar::MultiRegions::NullExpListSharedPtr.

Referenced by GetPlane().

2646  {
2647  ASSERTL0(false,
2648  "This method is not defined or valid for this class type");
2649  return NullExpListSharedPtr;
2650  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
static ExpListSharedPtr NullExpListSharedPtr
Definition: ExpList.h:1343
map< int, RobinBCInfoSharedPtr > Nektar::MultiRegions::ExpList::v_GetRobinBCInfo ( void  )
privatevirtual

Reimplemented in Nektar::MultiRegions::DisContField2D, Nektar::MultiRegions::DisContField3DHomogeneous1D, Nektar::MultiRegions::DisContField3D, Nektar::MultiRegions::DisContField1D, and Nektar::MultiRegions::DisContField3DHomogeneous2D.

Definition at line 2612 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetRobinBCInfo().

2613  {
2614  ASSERTL0(false,
2615  "This method is not defined or valid for this class type");
2616  static map<int,RobinBCInfoSharedPtr> result;
2617  return result;
2618  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
boost::shared_ptr< ExpList > & Nektar::MultiRegions::ExpList::v_GetTrace ( )
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D, Nektar::MultiRegions::DisContField3D, Nektar::MultiRegions::DisContField1D, and Nektar::MultiRegions::DisContField2D.

Definition at line 2253 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetTrace().

2254  {
2255  ASSERTL0(false,
2256  "This method is not defined or valid for this class type");
2257  static boost::shared_ptr<ExpList> returnVal;
2258  return returnVal;
2259  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
const Array< OneD, const int > & Nektar::MultiRegions::ExpList::v_GetTraceBndMap ( )
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D.

Definition at line 2269 of file ExpList.cpp.

References GetTraceMap().

Referenced by GetTraceBndMap().

2270  {
2271  return GetTraceMap()->GetBndCondTraceToGlobalTraceMap();
2272  }
boost::shared_ptr< AssemblyMapDG > & GetTraceMap(void)
Definition: ExpList.h:1947
boost::shared_ptr< AssemblyMapDG > & Nektar::MultiRegions::ExpList::v_GetTraceMap ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D, Nektar::MultiRegions::DisContField2D, Nektar::MultiRegions::DisContField3D, and Nektar::MultiRegions::DisContField1D.

Definition at line 2261 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetTraceMap().

2262  {
2263  ASSERTL0(false,
2264  "This method is not defined or valid for this class type");
2265  static boost::shared_ptr<AssemblyMapDG> result;
2266  return result;
2267  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
LibUtilities::TranspositionSharedPtr Nektar::MultiRegions::ExpList::v_GetTransposition ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1818 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetTransposition().

1819  {
1820  ASSERTL0(false,
1821  "This method is not defined or valid for this class type");
1823  return trans;
1824  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
boost::shared_ptr< Transposition > TranspositionSharedPtr
Array< OneD, const unsigned int > Nektar::MultiRegions::ExpList::v_GetYIDs ( void  )
protectedvirtual

Definition at line 1842 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetYIDs().

1843  {
1844  ASSERTL0(false,
1845  "This method is not defined or valid for this class type");
1846  Array<OneD, unsigned int> NoModes(1);
1847  return NoModes;
1848  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
Array< OneD, const unsigned int > Nektar::MultiRegions::ExpList::v_GetZIDs ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1834 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetZIDs().

1835  {
1836  ASSERTL0(false,
1837  "This method is not defined or valid for this class type");
1838  Array<OneD, unsigned int> NoModes(1);
1839  return NoModes;
1840  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_GlobalToLocal ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField2D, Nektar::MultiRegions::ContField1D, Nektar::MultiRegions::ContField3D, Nektar::MultiRegions::ContField3DHomogeneous2D, and Nektar::MultiRegions::ContField3DHomogeneous1D.

Definition at line 2444 of file ExpList.cpp.

References ASSERTL0.

Referenced by GlobalToLocal().

2445  {
2446  ASSERTL0(false,
2447  "This method is not defined or valid for this class type");
2448  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_HelmSolve ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const FlagList flags,
const StdRegions::ConstFactorMap factors,
const StdRegions::VarCoeffMap varcoeff,
const Array< OneD, const NekDouble > &  dirForcing 
)
protectedvirtual
void Nektar::MultiRegions::ExpList::v_HomogeneousBwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal,
bool  Shuff = true,
bool  UnShuff = true 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D, and Nektar::MultiRegions::ExpListHomogeneous2D.

Definition at line 2391 of file ExpList.cpp.

References ASSERTL0.

Referenced by HomogeneousBwdTrans().

2396  {
2397  ASSERTL0(false,
2398  "This method is not defined or valid for this class type");
2399  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
Array< OneD, const NekDouble > Nektar::MultiRegions::ExpList::v_HomogeneousEnergy ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpList3DHomogeneous1D.

Definition at line 1810 of file ExpList.cpp.

References ASSERTL0.

Referenced by HomogeneousEnergy().

1811  {
1812  ASSERTL0(false,
1813  "This method is not defined or valid for this class type");
1814  Array<OneD, NekDouble> NoEnergy(1,0.0);
1815  return NoEnergy;
1816  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_HomogeneousFwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal,
bool  Shuff = true,
bool  UnShuff = true 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D, and Nektar::MultiRegions::ExpListHomogeneous2D.

Definition at line 2381 of file ExpList.cpp.

References ASSERTL0.

Referenced by HomogeneousFwdTrans().

2386  {
2387  ASSERTL0(false,
2388  "This method is not defined or valid for this class type");
2389  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_ImposeDirichletConditions ( Array< OneD, NekDouble > &  outarray)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField2D, Nektar::MultiRegions::ContField1D, Nektar::MultiRegions::ContField3D, Nektar::MultiRegions::ContField3DHomogeneous1D, and Nektar::MultiRegions::ContField3DHomogeneous2D.

Definition at line 2424 of file ExpList.cpp.

References ASSERTL0.

Referenced by ImposeDirichletConditions().

2425  {
2426  ASSERTL0(false,
2427  "This method is not defined or valid for this class type");
2428  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
NekDouble Nektar::MultiRegions::ExpList::v_Integral ( const Array< OneD, const NekDouble > &  inarray)
protectedvirtual

Definition at line 1796 of file ExpList.cpp.

References m_comm, m_offset_elmt_id, m_phys_offset, and Nektar::LibUtilities::ReduceSum.

Referenced by Integral().

1797  {
1798  NekDouble err = 0.0;
1799  int i = 0;
1800 
1801  for (i = 0; i < (*m_exp).size(); ++i)
1802  {
1803  err += (*m_exp)[m_offset_elmt_id[i]]->Integral(inarray + m_phys_offset[i]);
1804  }
1805  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
1806 
1807  return err;
1808  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:969
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:877
void Nektar::MultiRegions::ExpList::v_IProductWRTBase ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField1D, Nektar::MultiRegions::ExpListHomogeneous1D, Nektar::MultiRegions::ExpListHomogeneous2D, and Nektar::MultiRegions::ContField3D.

Definition at line 2465 of file ExpList.cpp.

References Nektar::StdRegions::eIProductWRTBase, m_coll_coeff_offset, m_coll_phys_offset, and m_collections.

Referenced by IProductWRTBase().

2469  {
2471  for (int i = 0; i < m_collections.size(); ++i)
2472  {
2473 
2475  inarray + m_coll_phys_offset[i],
2476  tmp = outarray + m_coll_coeff_offset[i]);
2477  }
2478  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:955
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:952
Collections::CollectionVector m_collections
Definition: ExpList.h:949
void Nektar::MultiRegions::ExpList::v_IProductWRTBase_IterPerExp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

The operation is evaluated locally for every element by the function StdRegions::StdExpansion::IProductWRTBase.

Parameters
inarrayAn array of size $Q_{\mathrm{tot}}$ containing the values of the function $f(\boldsymbol{x})$ at the quadrature points $\boldsymbol{x}_i$.
outarrayAn array of size $N_{\mathrm{eof}}$ used to store the result.

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D, and Nektar::MultiRegions::ExpListHomogeneous2D.

Definition at line 314 of file ExpList.cpp.

References Nektar::StdRegions::eIProductWRTBase, m_coll_coeff_offset, m_coll_phys_offset, and m_collections.

Referenced by IProductWRTBase_IterPerExp().

317  {
319  for (int i = 0; i < m_collections.size(); ++i)
320  {
321 
323  inarray + m_coll_phys_offset[i],
324  tmp = outarray + m_coll_coeff_offset[i]);
325  }
326  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:955
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:952
Collections::CollectionVector m_collections
Definition: ExpList.h:949
NekDouble Nektar::MultiRegions::ExpList::v_L2 ( const Array< OneD, const NekDouble > &  inarray,
const Array< OneD, const NekDouble > &  soln = NullNekDouble1DArray 
)
protectedvirtual

Given a spectral/hp approximation $u^{\delta}(\boldsymbol{x})$ evaluated at the quadrature points (which should be contained in m_phys), this function calculates the $L_2$ error of this approximation with respect to an exact solution. The local distribution of the quadrature points allows an elemental evaluation of this operation through the functions StdRegions::StdExpansion::L2.

The exact solution, also evaluated at the quadrature points, should be contained in the variable m_phys of the ExpList object Sol.

Parameters
SolAn ExpList, containing the discrete evaluation of the exact solution at the quadrature points in its array m_phys.
Returns
The $L_2$ error of the approximation.

Reimplemented in Nektar::MultiRegions::ExpList3DHomogeneous1D, and Nektar::MultiRegions::ExpList3DHomogeneous2D.

Definition at line 1766 of file ExpList.cpp.

References m_comm, m_phys_offset, Nektar::NullNekDouble1DArray, and Nektar::LibUtilities::ReduceSum.

Referenced by L2().

1769  {
1770  NekDouble err = 0.0, errl2;
1771  int i;
1772 
1773  if (soln == NullNekDouble1DArray)
1774  {
1775  for (i = 0; i < (*m_exp).size(); ++i)
1776  {
1777  errl2 = (*m_exp)[i]->L2(inarray + m_phys_offset[i]);
1778  err += errl2*errl2;
1779  }
1780  }
1781  else
1782  {
1783  for (i = 0; i < (*m_exp).size(); ++i)
1784  {
1785  errl2 = (*m_exp)[i]->L2(inarray + m_phys_offset[i],
1786  soln + m_phys_offset[i]);
1787  err += errl2*errl2;
1788  }
1789  }
1790 
1791  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
1792 
1793  return sqrt(err);
1794  }
static Array< OneD, NekDouble > NullNekDouble1DArray
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:877
void Nektar::MultiRegions::ExpList::v_LinearAdvectionDiffusionReactionSolve ( const Array< OneD, Array< OneD, NekDouble > > &  velocity,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const NekDouble  lambda,
CoeffState  coeffstate = eLocal,
const Array< OneD, const NekDouble > &  dirForcing = NullNekDouble1DArray 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField2D.

Definition at line 2357 of file ExpList.cpp.

References ASSERTL0.

Referenced by LinearAdvectionDiffusionReactionSolve().

2364  {
2365  ASSERTL0(false,
2366  "This method is not defined or valid for this class type");
2367  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_LinearAdvectionReactionSolve ( const Array< OneD, Array< OneD, NekDouble > > &  velocity,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const NekDouble  lambda,
CoeffState  coeffstate = eLocal,
const Array< OneD, const NekDouble > &  dirForcing = NullNekDouble1DArray 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField2D.

Definition at line 2369 of file ExpList.cpp.

References ASSERTL0.

Referenced by LinearAdvectionReactionSolve().

2376  {
2377  ASSERTL0(false,
2378  "This method is not defined or valid for this class type");
2379  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_LocalToGlobal ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField2D, Nektar::MultiRegions::ContField1D, Nektar::MultiRegions::ContField3D, Nektar::MultiRegions::ContField3DHomogeneous2D, and Nektar::MultiRegions::ContField3DHomogeneous1D.

Definition at line 2438 of file ExpList.cpp.

References ASSERTL0.

Referenced by LocalToGlobal().

2439  {
2440  ASSERTL0(false,
2441  "This method is not defined or valid for this class type");
2442  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_MultiplyByInvMassMatrix ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField2D, Nektar::MultiRegions::ContField1D, and Nektar::MultiRegions::ContField3D.

Definition at line 2337 of file ExpList.cpp.

References ASSERTL0.

Referenced by MultiplyByInvMassMatrix().

2341  {
2342  ASSERTL0(false,
2343  "This method is not defined or valid for this class type");
2344  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_NormVectorIProductWRTBase ( Array< OneD, const NekDouble > &  V1,
Array< OneD, const NekDouble > &  V2,
Array< OneD, NekDouble > &  outarray,
int  BndID 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D.

Definition at line 2415 of file ExpList.cpp.

References ASSERTL0.

Referenced by NormVectorIProductWRTBase().

2419  {
2420  ASSERTL0(false,
2421  "This method is not defined or valid for this class type");
2422  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_PhysDeriv ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d0,
Array< OneD, NekDouble > &  out_d1,
Array< OneD, NekDouble > &  out_d2 
)
protectedvirtual

Given a function $f(\boldsymbol{x})$ evaluated at the quadrature points, this function calculates the derivatives $\frac{d}{dx_1}$, $\frac{d}{dx_2}$ and $\frac{d}{dx_3}$ of the function $f(\boldsymbol{x})$ at the same quadrature points. The local distribution of the quadrature points allows an elemental evaluation of the derivative. This is done by a call to the function StdRegions::StdExpansion::PhysDeriv.

Parameters
inarrayAn array of size $Q_{\mathrm{tot}}$ containing the values of the function $f(\boldsymbol{x})$ at the quadrature points $\boldsymbol{x}_i$.
out_d0The discrete evaluation of the derivative $\frac{d}{dx_1}$ will be stored in this array of size $Q_{\mathrm{tot}}$.
out_d1The discrete evaluation of the derivative $\frac{d}{dx_2}$ will be stored in this array of size $Q_{\mathrm{tot}}$. Note that if no memory is allocated for out_d1, the derivative $\frac{d}{dx_2}$ will not be calculated.
out_d2The discrete evaluation of the derivative $\frac{d}{dx_3}$ will be stored in this array of size $Q_{\mathrm{tot}}$. Note that if no memory is allocated for out_d2, the derivative $\frac{d}{dx_3}$ will not be calculated.

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D, and Nektar::MultiRegions::ExpListHomogeneous2D.

Definition at line 448 of file ExpList.cpp.

References m_coll_phys_offset, and m_collections.

Referenced by PhysDeriv(), and v_PhysDeriv().

452  {
453  Array<OneD, NekDouble> e_out_d0;
454  Array<OneD, NekDouble> e_out_d1;
455  Array<OneD, NekDouble> e_out_d2;
456  for (int i = 0; i < m_collections.size(); ++i)
457  {
458  int offset = m_coll_phys_offset[i];
459  e_out_d0 = out_d0 + offset;
460  e_out_d1 = out_d1 + offset;
461  e_out_d2 = out_d2 + offset;
462 
463  m_collections[i].ApplyOperator(Collections::ePhysDeriv,
464  inarray + offset,
465  e_out_d0,e_out_d1, e_out_d2);
466 
467  }
468  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:955
Collections::CollectionVector m_collections
Definition: ExpList.h:949
void Nektar::MultiRegions::ExpList::v_PhysDeriv ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d 
)
protectedvirtual

Definition at line 470 of file ExpList.cpp.

References Nektar::MultiRegions::DirCartesianMap, and v_PhysDeriv().

473  {
474  Direction edir = DirCartesianMap[dir];
475  v_PhysDeriv(edir, inarray,out_d);
476  }
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)
Definition: ExpList.cpp:448
MultiRegions::Direction const DirCartesianMap[]
Definition: ExpList.h:86
void Nektar::MultiRegions::ExpList::v_PhysDeriv ( Direction  edir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D, and Nektar::MultiRegions::ExpListHomogeneous2D.

Definition at line 478 of file ExpList.cpp.

References Nektar::MultiRegions::eN, Nektar::MultiRegions::eS, and m_phys_offset.

480  {
481  int i;
482  if(edir==MultiRegions::eS)
483  {
484  Array<OneD, NekDouble> e_out_ds;
485  for(i=0; i<(*m_exp).size(); ++i)
486  {
487  e_out_ds = out_d + m_phys_offset[i];
488  (*m_exp)[i]->PhysDeriv_s(inarray+m_phys_offset[i],e_out_ds);
489  }
490  }
491  else if(edir==MultiRegions::eN)
492  {
493  Array<OneD, NekDouble > e_out_dn;
494  for(i=0; i<(*m_exp).size(); i++)
495  {
496  e_out_dn = out_d +m_phys_offset[i];
497  (*m_exp)[i]->PhysDeriv_n(inarray+m_phys_offset[i],e_out_dn);
498  }
499  }
500  else
501  {
502  // convert enum into int
503  int intdir= (int)edir;
504  Array<OneD, NekDouble> e_out_d;
505  for(i= 0; i < (*m_exp).size(); ++i)
506  {
507  e_out_d = out_d + m_phys_offset[i];
508  (*m_exp)[i]->PhysDeriv(intdir, inarray+m_phys_offset[i], e_out_d);
509  }
510 
511  }
512  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
void Nektar::MultiRegions::ExpList::v_PhysGalerkinProjection1DScaled ( const NekDouble  scale,
const Array< OneD, NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D, Nektar::MultiRegions::ExpList2D, and Nektar::MultiRegions::ExpList3D.

Definition at line 1857 of file ExpList.cpp.

References ASSERTL0.

Referenced by PhysGalerkinProjection1DScaled().

1857  {
1858  ASSERTL0(false,
1859  "This method is not defined or valid for this class type");
1860  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_PhysInterp1DScaled ( const NekDouble  scale,
const Array< OneD, NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D, Nektar::MultiRegions::ExpList2D, and Nektar::MultiRegions::ExpList3D.

Definition at line 1851 of file ExpList.cpp.

References ASSERTL0.

Referenced by PhysInterp1DScaled().

1852  {
1853  ASSERTL0(false,
1854  "This method is not defined or valid for this class type");
1855  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_ReadGlobalOptimizationParameters ( )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpList1D, Nektar::MultiRegions::ExpList2D, and Nektar::MultiRegions::ExpList3D.

Definition at line 2570 of file ExpList.cpp.

References ASSERTL0.

Referenced by ReadGlobalOptimizationParameters().

2571  {
2572  ASSERTL0(false,
2573  "This method is not defined or valid for this class type");
2574  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_Reset ( )
protectedvirtual

Reset geometry information, metrics, matrix managers and geometry information.

This routine clears all matrix managers and resets all geometry information, which allows the geometry information to be dynamically updated as the solver is run.

Reimplemented in Nektar::MultiRegions::DisContField1D, Nektar::MultiRegions::DisContField2D, and Nektar::MultiRegions::DisContField3D.

Definition at line 1394 of file ExpList.cpp.

References m_exp, and m_graph.

Referenced by Reset(), Nektar::MultiRegions::DisContField3D::v_Reset(), Nektar::MultiRegions::DisContField2D::v_Reset(), and Nektar::MultiRegions::DisContField1D::v_Reset().

1395  {
1396  // Reset matrix managers.
1398  DNekScalMat, LocalRegions::MatrixKey::opLess>::ClearManager();
1399  LibUtilities::NekManager<LocalRegions::MatrixKey,
1401 
1402  // Loop over all elements and reset geometry information.
1403  for (int i = 0; i < m_exp->size(); ++i)
1404  {
1405  (*m_exp)[i]->GetGeom()->Reset(m_graph->GetCurvedEdges(),
1406  m_graph->GetCurvedFaces());
1407  }
1408 
1409  // Loop over all elements and rebuild geometric factors.
1410  for (int i = 0; i < m_exp->size(); ++i)
1411  {
1412  (*m_exp)[i]->Reset();
1413  }
1414  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
NekMatrix< NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag >, BlockMatrixTag > DNekScalBlkMat
Definition: NekTypeDefs.hpp:66
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:883
Used to lookup the create function in NekManager.
Definition: MatrixKey.h:68
NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag > DNekScalMat
virtual void Nektar::MultiRegions::ExpList::v_SetHomo1DSpecVanVisc ( Array< OneD, NekDouble visc)
inlineprivatevirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1328 of file ExpList.h.

References ASSERTL0.

Referenced by SetHomo1DSpecVanVisc().

1329  {
1330  ASSERTL0(false,
1331  "This method is not defined or valid for this class type");
1332  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_SetUpPhysNormals ( )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpList1D, Nektar::MultiRegions::ExpList2D, and Nektar::MultiRegions::ExpList3D.

Definition at line 2553 of file ExpList.cpp.

References ASSERTL0.

Referenced by SetUpPhysNormals().

2554  {
2555  ASSERTL0(false,
2556  "This method is not defined or valid for this class type");
2557  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_SmoothField ( Array< OneD, NekDouble > &  field)
protectedvirtual

This function smooth a field after some calculaitons which have been done elementally.

Parameters
fieldAn array containing the field in physical space

Reimplemented in Nektar::MultiRegions::ContField2D, and Nektar::MultiRegions::ContField3DHomogeneous1D.

Definition at line 594 of file ExpList.cpp.

References ASSERTL0, Nektar::LibUtilities::eGauss_Lagrange, Nektar::LibUtilities::eGLL_Lagrange, and m_exp.

Referenced by SmoothField().

595  {
596  // Do nothing unless the method is implemented in the appropriate
597  // class, i.e. ContField1D,ContField2D, etc.
598 
599  // So far it has been implemented just for ContField2D and
600  // ContField3DHomogeneous1D
601 
602  // Block in case users try the smoothing with a modal expansion.
603  // Maybe a different techique for the smoothing require
604  // implementation for modal basis.
605 
606  ASSERTL0((*m_exp)[0]->GetBasisType(0)
608  (*m_exp)[0]->GetBasisType(0)
610  "Smoothing is currently not allowed unless you are using "
611  "a nodal base for efficiency reasons. The implemented "
612  "smoothing technique requires the mass matrix inversion "
613  "which is trivial just for GLL_LAGRANGE_SEM and "
614  "GAUSS_LAGRANGE_SEMexpansions.");
615  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
Lagrange Polynomials using the Gauss points .
Definition: BasisType.h:54
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
Lagrange for SEM basis .
Definition: BasisType.h:53
boost::shared_ptr< ExpList > & Nektar::MultiRegions::ExpList::v_UpdateBndCondExpansion ( int  i)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D, Nektar::MultiRegions::DisContField2D, Nektar::MultiRegions::DisContField1D, Nektar::MultiRegions::DisContField3D, and Nektar::MultiRegions::DisContField3DHomogeneous2D.

Definition at line 2225 of file ExpList.cpp.

References ASSERTL0.

Referenced by UpdateBndCondExpansion().

2226  {
2227  ASSERTL0(false,
2228  "This method is not defined or valid for this class type");
2229  static boost::shared_ptr<ExpList> result;
2230  return result;
2231  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
Array< OneD, SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::v_UpdateBndConditions ( )
privatevirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D, Nektar::MultiRegions::DisContField2D, Nektar::MultiRegions::DisContField1D, Nektar::MultiRegions::DisContField3D, and Nektar::MultiRegions::DisContField3DHomogeneous2D.

Definition at line 2590 of file ExpList.cpp.

References ASSERTL0.

Referenced by UpdateBndConditions().

2591  {
2592  ASSERTL0(false,
2593  "This method is not defined or valid for this class type");
2595  return result;
2596  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_Upwind ( const Array< OneD, const Array< OneD, NekDouble > > &  Vec,
const Array< OneD, const NekDouble > &  Fwd,
const Array< OneD, const NekDouble > &  Bwd,
Array< OneD, NekDouble > &  Upwind 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpList1D.

Definition at line 2233 of file ExpList.cpp.

References ASSERTL0.

Referenced by Upwind().

2238  {
2239  ASSERTL0(false,
2240  "This method is not defined or valid for this class type");
2241  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_Upwind ( const Array< OneD, const NekDouble > &  Vn,
const Array< OneD, const NekDouble > &  Fwd,
const Array< OneD, const NekDouble > &  Bwd,
Array< OneD, NekDouble > &  Upwind 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpList1D, Nektar::MultiRegions::ExpList2D, and Nektar::MultiRegions::ExpList0D.

Definition at line 2243 of file ExpList.cpp.

References ASSERTL0.

2248  {
2249  ASSERTL0(false,
2250  "This method is not defined or valid for this class type");
2251  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_WriteTecplotConnectivity ( std::ostream &  outfile,
int  expansion 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpList3DHomogeneous1D.

Definition at line 1554 of file ExpList.cpp.

References ASSERTL0, and m_exp.

Referenced by WriteTecplotConnectivity().

1556  {
1557  int i,j,k,l;
1558  int nbase = (*m_exp)[0]->GetNumBases();
1559  int cnt = 0;
1560 
1561  boost::shared_ptr<LocalRegions::ExpansionVector> exp = m_exp;
1562 
1563  if (expansion != -1)
1564  {
1565  exp = boost::shared_ptr<LocalRegions::ExpansionVector>(
1567  (*exp)[0] = (*m_exp)[expansion];
1568  }
1569 
1570  if (nbase == 2)
1571  {
1572  for(i = 0; i < (*exp).size(); ++i)
1573  {
1574  const int np0 = (*exp)[i]->GetNumPoints(0);
1575  const int np1 = (*exp)[i]->GetNumPoints(1);
1576 
1577  for(j = 1; j < np1; ++j)
1578  {
1579  for(k = 1; k < np0; ++k)
1580  {
1581  outfile << cnt + (j-1)*np0 + k << " ";
1582  outfile << cnt + (j-1)*np0 + k+1 << " ";
1583  outfile << cnt + j *np0 + k+1 << " ";
1584  outfile << cnt + j *np0 + k << endl;
1585  }
1586  }
1587 
1588  cnt += np0*np1;
1589  }
1590  }
1591  else if (nbase == 3)
1592  {
1593  for(i = 0; i < (*exp).size(); ++i)
1594  {
1595  const int np0 = (*exp)[i]->GetNumPoints(0);
1596  const int np1 = (*exp)[i]->GetNumPoints(1);
1597  const int np2 = (*exp)[i]->GetNumPoints(2);
1598  const int np01 = np0*np1;
1599 
1600  for(j = 1; j < np2; ++j)
1601  {
1602  for(k = 1; k < np1; ++k)
1603  {
1604  for(l = 1; l < np0; ++l)
1605  {
1606  outfile << cnt + (j-1)*np01 + (k-1)*np0 + l << " ";
1607  outfile << cnt + (j-1)*np01 + (k-1)*np0 + l+1 << " ";
1608  outfile << cnt + (j-1)*np01 + k *np0 + l+1 << " ";
1609  outfile << cnt + (j-1)*np01 + k *np0 + l << " ";
1610  outfile << cnt + j *np01 + (k-1)*np0 + l << " ";
1611  outfile << cnt + j *np01 + (k-1)*np0 + l+1 << " ";
1612  outfile << cnt + j *np01 + k *np0 + l+1 << " ";
1613  outfile << cnt + j *np01 + k *np0 + l << endl;
1614  }
1615  }
1616  }
1617  cnt += np0*np1*np2;
1618  }
1619  }
1620  else
1621  {
1622  ASSERTL0(false,"Not set up for this dimension");
1623  }
1624  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
std::vector< ExpansionSharedPtr > ExpansionVector
Definition: Expansion.h:70
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
void Nektar::MultiRegions::ExpList::v_WriteTecplotField ( std::ostream &  outfile,
int  expansion 
)
protectedvirtual

Write Tecplot Files Field

Parameters
outfileOutput file name.
expansionExpansion that is considered

Definition at line 1631 of file ExpList.cpp.

References BwdTrans(), GetTotPoints(), m_coeffs, m_phys, m_phys_offset, and m_physState.

Referenced by WriteTecplotField().

1632  {
1633  if (expansion == -1)
1634  {
1635  int totpoints = GetTotPoints();
1636  if(m_physState == false)
1637  {
1639  }
1640 
1641  for(int i = 0; i < totpoints; ++i)
1642  {
1643  outfile << m_phys[i] << " ";
1644  if(i % 1000 == 0 && i)
1645  {
1646  outfile << std::endl;
1647  }
1648  }
1649  outfile << std::endl;
1650 
1651  }
1652  else
1653  {
1654  int nPoints = (*m_exp)[expansion]->GetTotPoints();
1655 
1656  for (int i = 0; i < nPoints; ++i)
1657  {
1658  outfile << m_phys[i + m_phys_offset[expansion]] << " ";
1659  }
1660 
1661  outfile << std::endl;
1662  }
1663  }
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.h:1557
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:926
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:909
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1401
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:935
void Nektar::MultiRegions::ExpList::v_WriteTecplotHeader ( std::ostream &  outfile,
std::string  var = "" 
)
protectedvirtual

Write Tecplot Files Header

Parameters
outfileOutput file name.
varvariables names

Definition at line 1421 of file ExpList.cpp.

References Nektar::MultiRegions::e3DH1D, Nektar::MultiRegions::e3DH2D, GetExp(), GetNumElmts(), and m_expType.

Referenced by WriteTecplotHeader().

1423  {
1424  if (GetNumElmts() == 0)
1425  {
1426  return;
1427  }
1428 
1429  int coordim = GetExp(0)->GetCoordim();
1430  char vars[3] = { 'x', 'y', 'z' };
1431 
1432  if (m_expType == e3DH1D)
1433  {
1434  coordim += 1;
1435  }
1436  else if (m_expType == e3DH2D)
1437  {
1438  coordim += 2;
1439  }
1440 
1441  outfile << "Variables = x";
1442  for (int i = 1; i < coordim; ++i)
1443  {
1444  outfile << ", " << vars[i];
1445  }
1446 
1447  if (var.size() > 0)
1448  {
1449  outfile << ", " << var;
1450  }
1451 
1452  outfile << std::endl << std::endl;
1453  }
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:1858
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Definition: ExpList.h:562
void Nektar::MultiRegions::ExpList::v_WriteTecplotZone ( std::ostream &  outfile,
int  expansion 
)
protectedvirtual

Write Tecplot Files Zone

Parameters
outfileOutput file name.
expansionExpansion that is considered

Reimplemented in Nektar::MultiRegions::ExpList2DHomogeneous1D, Nektar::MultiRegions::ExpList3DHomogeneous2D, and Nektar::MultiRegions::ExpList1DHomogeneous2D.

Definition at line 1460 of file ExpList.cpp.

References ASSERTL0, Nektar::MultiRegions::e3DH1D, Nektar::MultiRegions::e3DH2D, GetCoordim(), GetCoords(), GetTotPoints(), GetZIDs(), m_exp, and m_expType.

Referenced by WriteTecplotZone().

1461  {
1462  int i, j;
1463  int coordim = GetCoordim(0);
1464  int nPoints = GetTotPoints();
1465  int nBases = (*m_exp)[0]->GetNumBases();
1466  int numBlocks = 0;
1467 
1469 
1470  if (expansion == -1)
1471  {
1472  nPoints = GetTotPoints();
1473 
1474  coords[0] = Array<OneD, NekDouble>(nPoints);
1475  coords[1] = Array<OneD, NekDouble>(nPoints);
1476  coords[2] = Array<OneD, NekDouble>(nPoints);
1477 
1478  GetCoords(coords[0], coords[1], coords[2]);
1479 
1480  for (i = 0; i < m_exp->size(); ++i)
1481  {
1482  int numInt = 1;
1483 
1484  for (j = 0; j < nBases; ++j)
1485  {
1486  numInt *= (*m_exp)[i]->GetNumPoints(j)-1;
1487  }
1488 
1489  numBlocks += numInt;
1490  }
1491  }
1492  else
1493  {
1494  nPoints = (*m_exp)[expansion]->GetTotPoints();
1495 
1496  coords[0] = Array<OneD, NekDouble>(nPoints);
1497  coords[1] = Array<OneD, NekDouble>(nPoints);
1498  coords[2] = Array<OneD, NekDouble>(nPoints);
1499 
1500  (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
1501 
1502  numBlocks = 1;
1503  for (j = 0; j < nBases; ++j)
1504  {
1505  numBlocks *= (*m_exp)[expansion]->GetNumPoints(j)-1;
1506  }
1507  }
1508 
1509  if (m_expType == e3DH1D)
1510  {
1511  nBases += 1;
1512  coordim += 1;
1513  int nPlanes = GetZIDs().num_elements();
1514  NekDouble tmp = numBlocks * (nPlanes-1.0) / nPlanes;
1515  numBlocks = (int)tmp;
1516  }
1517  else if (m_expType == e3DH2D)
1518  {
1519  nBases += 2;
1520  coordim += 1;
1521  }
1522 
1523  outfile << "Zone, N=" << nPoints << ", E="
1524  << numBlocks << ", F=FEBlock" ;
1525 
1526  switch(nBases)
1527  {
1528  case 2:
1529  outfile << ", ET=QUADRILATERAL" << std::endl;
1530  break;
1531  case 3:
1532  outfile << ", ET=BRICK" << std::endl;
1533  break;
1534  default:
1535  ASSERTL0(false,"Not set up for this type of output");
1536  break;
1537  }
1538 
1539  // Write out coordinates
1540  for (j = 0; j < coordim; ++j)
1541  {
1542  for (i = 0; i < nPoints; ++i)
1543  {
1544  outfile << coords[j][i] << " ";
1545  if (i % 1000 == 0 && i)
1546  {
1547  outfile << std::endl;
1548  }
1549  }
1550  outfile << std::endl;
1551  }
1552  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
Array< OneD, const unsigned int > GetZIDs(void)
This function returns a vector containing the wave numbers in z-direction associated with the 3D homo...
Definition: ExpList.h:503
void GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1=NullNekDouble1DArray, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
This function calculates the coordinates of all the elemental quadrature points . ...
Definition: ExpList.h:1632
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:947
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1401
double NekDouble
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1735
void Nektar::MultiRegions::ExpList::v_WriteVtkPieceData ( std::ostream &  outfile,
int  expansion,
std::string  var 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1690 of file ExpList.cpp.

References Nektar::NekConstants::kNekZeroTol, m_phys, and m_phys_offset.

Referenced by WriteVtkPieceData().

1692  {
1693  int i;
1694  int nq = (*m_exp)[expansion]->GetTotPoints();
1695 
1696  // printing the fields of that zone
1697  outfile << " <DataArray type=\"Float64\" Name=\""
1698  << var << "\">" << endl;
1699  outfile << " ";
1700  const Array<OneD, NekDouble> phys = m_phys + m_phys_offset[expansion];
1701  for(i = 0; i < nq; ++i)
1702  {
1703  outfile << (fabs(phys[i]) < NekConstants::kNekZeroTol ? 0 : phys[i]) << " ";
1704  }
1705  outfile << endl;
1706  outfile << " </DataArray>" << endl;
1707  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:926
static const NekDouble kNekZeroTol
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:961
void Nektar::MultiRegions::ExpList::v_WriteVtkPieceHeader ( std::ostream &  outfile,
int  expansion,
int  istrip 
)
protectedvirtual
void Nektar::MultiRegions::ExpList::WriteTecplotConnectivity ( std::ostream &  outfile,
int  expansion = -1 
)
inline

Definition at line 385 of file ExpList.h.

References v_WriteTecplotConnectivity().

387  {
388  v_WriteTecplotConnectivity(outfile, expansion);
389  }
virtual void v_WriteTecplotConnectivity(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:1554
void Nektar::MultiRegions::ExpList::WriteTecplotField ( std::ostream &  outfile,
int  expansion = -1 
)
inline

Definition at line 379 of file ExpList.h.

References v_WriteTecplotField().

381  {
382  v_WriteTecplotField(outfile, expansion);
383  }
virtual void v_WriteTecplotField(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:1631
void Nektar::MultiRegions::ExpList::WriteTecplotHeader ( std::ostream &  outfile,
std::string  var = "" 
)
inline

Definition at line 366 of file ExpList.h.

References v_WriteTecplotHeader().

368  {
369  v_WriteTecplotHeader(outfile, var);
370  }
virtual void v_WriteTecplotHeader(std::ostream &outfile, std::string var="")
Definition: ExpList.cpp:1421
void Nektar::MultiRegions::ExpList::WriteTecplotZone ( std::ostream &  outfile,
int  expansion = -1 
)
inline

Definition at line 372 of file ExpList.h.

References v_WriteTecplotZone().

375  {
376  v_WriteTecplotZone(outfile, expansion);
377  }
virtual void v_WriteTecplotZone(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:1460
void Nektar::MultiRegions::ExpList::WriteVtkFooter ( std::ostream &  outfile)

Definition at line 1673 of file ExpList.cpp.

1674  {
1675  outfile << " </UnstructuredGrid>" << endl;
1676  outfile << "</VTKFile>" << endl;
1677  }
void Nektar::MultiRegions::ExpList::WriteVtkHeader ( std::ostream &  outfile)

Definition at line 1665 of file ExpList.cpp.

1666  {
1667  outfile << "<?xml version=\"1.0\"?>" << endl;
1668  outfile << "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" "
1669  << "byte_order=\"LittleEndian\">" << endl;
1670  outfile << " <UnstructuredGrid>" << endl;
1671  }
void Nektar::MultiRegions::ExpList::WriteVtkPieceData ( std::ostream &  outfile,
int  expansion,
std::string  var = "v" 
)
inline

Definition at line 404 of file ExpList.h.

References v_WriteVtkPieceData().

408  {
409  v_WriteVtkPieceData(outfile, expansion, var);
410  }
virtual void v_WriteVtkPieceData(std::ostream &outfile, int expansion, std::string var)
Definition: ExpList.cpp:1690
void Nektar::MultiRegions::ExpList::WriteVtkPieceFooter ( std::ostream &  outfile,
int  expansion 
)

Definition at line 1684 of file ExpList.cpp.

1685  {
1686  outfile << " </PointData>" << endl;
1687  outfile << " </Piece>" << endl;
1688  }
void Nektar::MultiRegions::ExpList::WriteVtkPieceHeader ( std::ostream &  outfile,
int  expansion,
int  istrip = 0 
)
inline

Definition at line 394 of file ExpList.h.

References v_WriteVtkPieceHeader().

396  {
397  v_WriteVtkPieceHeader(outfile, expansion, istrip);
398  }
virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip)
Definition: ExpList.cpp:1679

Member Data Documentation

BlockMatrixMapShPtr Nektar::MultiRegions::ExpList::m_blockMat
protected

Definition at line 973 of file ExpList.h.

Referenced by GetBlockMatrix().

Array<OneD, int> Nektar::MultiRegions::ExpList::m_coeff_offset
protected
Array<OneD, NekDouble> Nektar::MultiRegions::ExpList::m_coeffs
protected

Concatenation of all local expansion coefficients.

The array of length m_ncoeffs $=N_{\mathrm{eof}}$ which is the concatenation of the local expansion coefficients $\hat{u}_n^e$ over all $N_{\mathrm{el}}$ elements

\[\mathrm{\texttt{m\_coeffs}}=\boldsymbol{\hat{u}}_{l} = \underline{\boldsymbol{\hat{u}}}^e = \left [ \begin{array}{c} \boldsymbol{\hat{u}}^{1} \ \ \boldsymbol{\hat{u}}^{2} \ \ \vdots \ \ \boldsymbol{\hat{u}}^{{{N_{\mathrm{el}}}}} \end{array} \right ], \quad \mathrm{where}\quad \boldsymbol{\hat{u}}^{e}[n]=\hat{u}_n^{e}\]

Definition at line 909 of file ExpList.h.

Referenced by Nektar::MultiRegions::ContField3D::Assemble(), Nektar::MultiRegions::ContField2D::Assemble(), Nektar::MultiRegions::ContField1D::Assemble(), Nektar::MultiRegions::DisContField3D::EvaluateHDGPostProcessing(), Nektar::MultiRegions::DisContField2D::EvaluateHDGPostProcessing(), ExpList(), Nektar::MultiRegions::ExpList0D::ExpList0D(), Nektar::MultiRegions::ExpList1D::ExpList1D(), Nektar::MultiRegions::ExpList2D::ExpList2D(), GetCoeff(), GetCoeffs(), Nektar::MultiRegions::ContField2D::GlobalToLocal(), Nektar::MultiRegions::DisContField2D::L2_DGDeriv(), SetCoeff(), Nektar::MultiRegions::ExpList3D::SetCoeffPhys(), Nektar::MultiRegions::ExpList1DHomogeneous2D::SetCoeffPhys(), Nektar::MultiRegions::ExpList3DHomogeneous2D::SetCoeffPhys(), Nektar::MultiRegions::ExpList2DHomogeneous1D::SetCoeffPhys(), Nektar::MultiRegions::ExpList3DHomogeneous1D::SetCoeffPhys(), SetCoeffs(), SetCoeffsArray(), UpdateCoeffs(), Nektar::MultiRegions::ExpListHomogeneous2D::v_AppendFieldData(), Nektar::MultiRegions::ExpListHomogeneous1D::v_AppendFieldData(), v_AppendFieldData(), Nektar::MultiRegions::ContField3D::v_FillBndCondFromField(), Nektar::MultiRegions::ContField2D::v_FillBndCondFromField(), Nektar::MultiRegions::ContField3D::v_GlobalToLocal(), Nektar::MultiRegions::ContField1D::v_GlobalToLocal(), Nektar::MultiRegions::ContField2D::v_GlobalToLocal(), Nektar::MultiRegions::ContField3D::v_LocalToGlobal(), Nektar::MultiRegions::ContField1D::v_LocalToGlobal(), Nektar::MultiRegions::ContField2D::v_LocalToGlobal(), and v_WriteTecplotField().

std::vector<int> Nektar::MultiRegions::ExpList::m_coll_coeff_offset
protected

Offset of elemental data into the array m_coeffs.

Definition at line 952 of file ExpList.h.

Referenced by CreateCollections(), IProductWRTDerivBase(), v_BwdTrans_IterPerExp(), v_IProductWRTBase(), and v_IProductWRTBase_IterPerExp().

std::vector<int> Nektar::MultiRegions::ExpList::m_coll_phys_offset
protected

Offset of elemental data into the array m_phys.

Definition at line 955 of file ExpList.h.

Referenced by CreateCollections(), IProductWRTDerivBase(), v_BwdTrans_IterPerExp(), v_IProductWRTBase(), v_IProductWRTBase_IterPerExp(), and v_PhysDeriv().

Collections::CollectionVector Nektar::MultiRegions::ExpList::m_collections
protected
LibUtilities::CommSharedPtr Nektar::MultiRegions::ExpList::m_comm
protected
boost::shared_ptr<LocalRegions::ExpansionVector> Nektar::MultiRegions::ExpList::m_exp
protected

The list of local expansions.

The (shared pointer to the) vector containing (shared pointers to) all local expansions. The fact that the local expansions are all stored as a (pointer to a) #StdExpansion, the abstract base class for all local expansions, allows a general implementation where most of the routines for the derived classes are defined in the ExpList base class.

Definition at line 947 of file ExpList.h.

Referenced by Nektar::MultiRegions::ContField3DHomogeneous1D::ContField3DHomogeneous1D(), Nektar::MultiRegions::ContField3DHomogeneous2D::ContField3DHomogeneous2D(), CreateCollections(), Nektar::MultiRegions::DisContField3DHomogeneous1D::DisContField3DHomogeneous1D(), Nektar::MultiRegions::DisContField3DHomogeneous2D::DisContField3DHomogeneous2D(), EvalBasisNumModesMax(), EvalBasisNumModesMaxPerExp(), Nektar::MultiRegions::ExpList2DHomogeneous1D::ExpList2DHomogeneous1D(), Nektar::MultiRegions::ExpList3DHomogeneous2D::ExpList3DHomogeneous2D(), GenBlockMatrix(), GeneralGetFieldDefinitions(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GenExpList3DHomogeneous1D(), Get1DScaledTotPoints(), GetCoordim(), GetExp(), GetExpIndex(), GetNcoeffs(), GetTotPoints(), Nektar::MultiRegions::DisContField2D::IsLeftAdjacentEdge(), Nektar::MultiRegions::DisContField3D::IsLeftAdjacentFace(), Nektar::MultiRegions::DisContField1D::IsLeftAdjacentVertex(), Nektar::MultiRegions::ExpList3D::SetCoeffPhys(), Nektar::MultiRegions::ExpList0D::SetCoeffPhysOffsets(), Nektar::MultiRegions::ExpList2D::SetCoeffPhysOffsets(), Nektar::MultiRegions::ExpList1D::SetCoeffPhysOffsets(), Nektar::MultiRegions::DisContField3D::SetUpDG(), Nektar::MultiRegions::DisContField2D::SetUpDG(), Nektar::MultiRegions::DisContField1D::SetUpDG(), Nektar::MultiRegions::ExpListHomogeneous1D::v_ExtractDataToCoeffs(), v_ExtractDataToCoeffs(), Nektar::MultiRegions::ExpList0D::v_GetNormals(), Nektar::MultiRegions::ExpList2D::v_GetNormals(), Nektar::MultiRegions::ExpList1D::v_GetNormals(), Nektar::MultiRegions::ExpList3D::v_PhysGalerkinProjection1DScaled(), Nektar::MultiRegions::ExpList2D::v_PhysGalerkinProjection1DScaled(), Nektar::MultiRegions::ExpList3D::v_PhysInterp1DScaled(), Nektar::MultiRegions::ExpList2D::v_PhysInterp1DScaled(), Nektar::MultiRegions::ExpList3D::v_ReadGlobalOptimizationParameters(), Nektar::MultiRegions::ExpList2D::v_ReadGlobalOptimizationParameters(), v_Reset(), Nektar::MultiRegions::ExpList3D::v_SetUpPhysNormals(), Nektar::MultiRegions::ExpList2D::v_SetUpPhysNormals(), Nektar::MultiRegions::ExpList1D::v_SetUpPhysNormals(), v_SmoothField(), Nektar::MultiRegions::ExpList2D::v_Upwind(), Nektar::MultiRegions::ExpList1D::v_Upwind(), v_WriteTecplotConnectivity(), and v_WriteTecplotZone().

ExpansionType Nektar::MultiRegions::ExpList::m_expType

Definition at line 865 of file ExpList.h.

Referenced by GetExpType(), SetExpType(), v_WriteTecplotHeader(), and v_WriteTecplotZone().

NekOptimize::GlobalOptParamSharedPtr Nektar::MultiRegions::ExpList::m_globalOptParam
protected
SpatialDomains::MeshGraphSharedPtr Nektar::MultiRegions::ExpList::m_graph
protected
int Nektar::MultiRegions::ExpList::m_ncoeffs
protected

The total number of local degrees of freedom. m_ncoeffs $=N_{\mathrm{eof}}=\sum_{e=1}^{{N_{\mathrm{el}}}}N^{e}_l$.

Definition at line 887 of file ExpList.h.

Referenced by Nektar::MultiRegions::ContField2D::BwdTrans(), Nektar::MultiRegions::ContField1D::ContField1D(), Nektar::MultiRegions::ContField2D::ContField2D(), Nektar::MultiRegions::ContField3D::ContField3D(), ExpList(), Nektar::MultiRegions::ExpList0D::ExpList0D(), Nektar::MultiRegions::ExpList1D::ExpList1D(), Nektar::MultiRegions::ExpList2D::ExpList2D(), Nektar::MultiRegions::ExpList3D::ExpList3D(), Nektar::MultiRegions::ContField1D::FwdTrans(), GetNcoeffs(), Nektar::MultiRegions::ContField2D::IProductWRTBase(), Nektar::MultiRegions::ContField1D::IProductWRTBase(), Nektar::MultiRegions::DisContField2D::L2_DGDeriv(), Nektar::MultiRegions::ContField2D::LaplaceSolve(), MultiplyByElmtInvMass(), Nektar::MultiRegions::ContField1D::MultiplyByInvMassMatrix(), Nektar::MultiRegions::ExpList3D::SetCoeffPhys(), Nektar::MultiRegions::ExpList1DHomogeneous2D::SetCoeffPhys(), Nektar::MultiRegions::ExpList3DHomogeneous2D::SetCoeffPhys(), Nektar::MultiRegions::ExpList2DHomogeneous1D::SetCoeffPhys(), Nektar::MultiRegions::ExpList3DHomogeneous1D::SetCoeffPhys(), Nektar::MultiRegions::ExpList0D::SetCoeffPhysOffsets(), Nektar::MultiRegions::ExpList2D::SetCoeffPhysOffsets(), Nektar::MultiRegions::ExpList1D::SetCoeffPhysOffsets(), Nektar::MultiRegions::ContField3D::v_BwdTrans(), Nektar::MultiRegions::ExpListHomogeneous1D::v_ExtractCoeffsToCoeffs(), v_ExtractCoeffsToCoeffs(), v_FwdTrans_IterPerExp(), Nektar::MultiRegions::ContField3D::v_GeneralMatrixOp(), Nektar::MultiRegions::ContField1D::v_GeneralMatrixOp(), Nektar::MultiRegions::ContField2D::v_GeneralMatrixOp(), Nektar::MultiRegions::DisContField3D::v_HelmSolve(), Nektar::MultiRegions::DisContField2D::v_HelmSolve(), Nektar::MultiRegions::DisContField1D::v_HelmSolve(), and Nektar::MultiRegions::ContField3D::v_IProductWRTBase().

int Nektar::MultiRegions::ExpList::m_npoints
protected
Array<OneD, int> Nektar::MultiRegions::ExpList::m_offset_elmt_id
protected
Array<OneD, NekDouble> Nektar::MultiRegions::ExpList::m_phys
protected
Array<OneD, int> Nektar::MultiRegions::ExpList::m_phys_offset
protected
bool Nektar::MultiRegions::ExpList::m_physState
protected
LibUtilities::SessionReaderSharedPtr Nektar::MultiRegions::ExpList::m_session
protected

Session.

Definition at line 880 of file ExpList.h.

Referenced by Nektar::MultiRegions::ContField1D::ContField1D(), Nektar::MultiRegions::ContField2D::ContField2D(), Nektar::MultiRegions::ContField3D::ContField3D(), Nektar::MultiRegions::ContField3DHomogeneous1D::ContField3DHomogeneous1D(), CreateCollections(), Nektar::MultiRegions::DisContField1D::DisContField1D(), Nektar::MultiRegions::DisContField2D::DisContField2D(), Nektar::MultiRegions::DisContField3D::DisContField3D(), Nektar::MultiRegions::DisContField3DHomogeneous1D::DisContField3DHomogeneous1D(), Nektar::MultiRegions::ExpList2DHomogeneous1D::ExpList2DHomogeneous1D(), Nektar::MultiRegions::ExpList3DHomogeneous2D::ExpList3DHomogeneous2D(), Nektar::MultiRegions::ExpListHomogeneous1D::ExpListHomogeneous1D(), ExtractFileBCs(), Nektar::MultiRegions::DisContField2D::FindPeriodicEdges(), Nektar::MultiRegions::DisContField3D::FindPeriodicFaces(), Nektar::MultiRegions::DisContField1D::FindPeriodicVertices(), Nektar::MultiRegions::DisContField3D::GenerateBoundaryConditionExpansion(), Nektar::MultiRegions::DisContField2D::GenerateBoundaryConditionExpansion(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GenExpList3DHomogeneous1D(), GenGlobalMatrix(), Nektar::MultiRegions::DisContField1D::GetDomainBCs(), GetSession(), Nektar::MultiRegions::ExpListHomogeneous1D::Homogeneous1DTrans(), Nektar::MultiRegions::DisContField3DHomogeneous2D::SetupBoundaryConditions(), Nektar::MultiRegions::DisContField3DHomogeneous1D::SetupBoundaryConditions(), Nektar::MultiRegions::DisContField3D::SetUpDG(), Nektar::MultiRegions::DisContField2D::SetUpDG(), Nektar::MultiRegions::DisContField1D::SetUpDG(), Nektar::MultiRegions::ExpListHomogeneous1D::v_DealiasedProd(), Nektar::MultiRegions::ExpListHomogeneous1D::v_GetFieldDefinitions(), Nektar::MultiRegions::ExpListHomogeneous1D::v_PhysDeriv(), Nektar::MultiRegions::ExpList3D::v_ReadGlobalOptimizationParameters(), Nektar::MultiRegions::ExpList2D::v_ReadGlobalOptimizationParameters(), and Nektar::MultiRegions::ExpList3DHomogeneous1D::v_WriteVtkPieceHeader().

bool Nektar::MultiRegions::ExpList::m_WaveSpace
protected