Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 std::vector< unsigned int > &eIDs, const bool DeclareCoeffPhysArrays=true)
 Constructor copying only elements defined in eIds. 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 NormVectorIProductWRTBase (Array< OneD, Array< OneD, NekDouble > > &V, Array< OneD, NekDouble > &outarray)
 
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::ExpansionVector
GetExp () 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)
 
const vector< bool > & GetLeftAdjacentFaces (void) const
 
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 GetBndElmtExpansion (int i, boost::shared_ptr< ExpList > &result)
 
void ExtractElmtToBndPhys (int i, Array< OneD, NekDouble > &elmt, Array< OneD, NekDouble > &boundary)
 
void ExtractPhysToBndElmt (int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bndElmt)
 
void GetBoundaryNormals (int i, Array< OneD, Array< OneD, NekDouble > > &normals)
 
void GeneralGetFieldDefinitions (std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef, int NumHomoDir=0, Array< OneD, LibUtilities::BasisSharedPtr > &HomoBasis=LibUtilities::NullBasisSharedPtr1DArray, std::vector< NekDouble > &HomoLen=LibUtilities::NullNekDoubleVector, bool homoStrips=false, std::vector< unsigned int > &HomoSIDs=LibUtilities::NullUnsignedIntVector, std::vector< unsigned int > &HomoZIDs=LibUtilities::NullUnsignedIntVector, std::vector< unsigned int > &HomoYIDs=LibUtilities::NullUnsignedIntVector)
 
const
NekOptimize::GlobalOptParamSharedPtr
GetGlobalOptParam (void)
 
map< int, RobinBCInfoSharedPtrGetRobinBCInfo ()
 
void GetPeriodicEntities (PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces=NullPeriodicMap)
 
std::vector
< LibUtilities::FieldDefinitionsSharedPtr
GetFieldDefinitions ()
 
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::SessionReader
GetSession ()
 Returns the session object. More...
 
boost::shared_ptr
< LibUtilities::Comm
GetComm ()
 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...
 
void ClearGlobalLinSysManager (void)
 

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 const vector< bool > & v_GetLeftAdjacentFaces (void) const
 
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_NormVectorIProductWRTBase (Array< OneD, Array< OneD, NekDouble > > &V, Array< OneD, NekDouble > &outarray)
 
virtual void v_SetUpPhysNormals ()
 
virtual void v_GetBoundaryToElmtMap (Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
 
virtual void v_GetBndElmtExpansion (int i, boost::shared_ptr< ExpList > &result)
 
virtual void v_ExtractElmtToBndPhys (int i, Array< OneD, NekDouble > &elmt, Array< OneD, NekDouble > &boundary)
 
virtual void v_ExtractPhysToBndElmt (int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bndElmt)
 
virtual void v_GetBoundaryNormals (int i, Array< OneD, Array< OneD, NekDouble > > &normals)
 
virtual void v_ReadGlobalOptimizationParameters ()
 
virtual std::vector
< LibUtilities::FieldDefinitionsSharedPtr
v_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
NekDouble
v_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)
 
virtual void v_ClearGlobalLinSysManager (void)
 
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::ExpansionVector
m_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,
RobinBCInfoSharedPtr
v_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:1003
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:917
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:999
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:913
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:910
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:251
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:1003
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:917
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:999
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:913
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:910
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:251
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:1003
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:917
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:999
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:913
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:910
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:251
Nektar::MultiRegions::ExpList::ExpList ( const ExpList in,
const std::vector< unsigned int > &  eIDs,
const bool  DeclareCoeffPhysArrays = true 
)

Constructor copying only elements defined in eIds.

Copies the eIds elements from an existing expansion list.

Parameters
inSource expansion list.
inelements that will be in the new exp list.

Definition at line 173 of file ExpList.cpp.

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

175  :
176  m_comm(in.m_comm),
177  m_session(in.m_session),
178  m_graph(in.m_graph),
179  m_ncoeffs(0),
180  m_npoints(0),
181  m_coeffs(),
182  m_phys(),
183  m_physState(false),
185  ::AllocateSharedPtr()),
186  m_coeff_offset(),
187  m_phys_offset(),
190  m_WaveSpace(false)
191  {
193 
194  for (int i=0; i < eIDs.size(); ++i)
195  {
196  (*m_exp).push_back( (*(in.m_exp))[eIDs[i]]);
197  m_ncoeffs += (*m_exp)[i]->GetNcoeffs();
198  m_npoints += (*m_exp)[i]->GetTotPoints();
199  }
200 
201  if(DeclareCoeffPhysArrays)
202  {
205  }
206  }
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1003
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:917
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:999
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:913
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:910
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:251
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 213 of file ExpList.cpp.

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

213  :
214  m_comm(in.m_comm),
215  m_session(in.m_session),
216  m_graph(in.m_graph),
217  m_ncoeffs(in.m_ncoeffs),
218  m_npoints(in.m_npoints),
219  m_physState(false),
220  m_exp(in.m_exp),
221  m_collections(in.m_collections),
222  m_coll_coeff_offset(in.m_coll_coeff_offset),
223  m_coll_phys_offset(in.m_coll_phys_offset),
224  m_coeff_offset(in.m_coeff_offset),
225  m_phys_offset(in.m_phys_offset),
226  m_offset_elmt_id(in.m_offset_elmt_id),
227  m_globalOptParam(in.m_globalOptParam),
228  m_blockMat(in.m_blockMat),
229  m_WaveSpace(false)
230  {
232 
233  if(DeclareCoeffPhysArrays)
234  {
237  }
238  }
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:1001
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1003
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:917
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:999
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:913
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:910
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:985
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:251
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:982
Collections::CollectionVector m_collections
Definition: ExpList.h:979
Nektar::MultiRegions::ExpList::~ExpList ( )
virtual

The default destructor.

Definition at line 256 of file ExpList.cpp.

257  {
258  }

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 2037 of file ExpList.h.

References v_AddFwdBwdTraceIntegral().

2041  {
2042  v_AddFwdBwdTraceIntegral(Fwd,Bwd,outarray);
2043  }
virtual void v_AddFwdBwdTraceIntegral(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2336
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 2022 of file ExpList.h.

References v_AddTraceIntegral().

2026  {
2027  v_AddTraceIntegral(Fx,Fy,outarray);
2028  }
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2319
void Nektar::MultiRegions::ExpList::AddTraceIntegral ( const Array< OneD, const NekDouble > &  Fn,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 2030 of file ExpList.h.

References v_AddTraceIntegral().

2033  {
2034  v_AddTraceIntegral(Fn,outarray);
2035  }
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2319
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 809 of file ExpList.h.

References v_AppendFieldData().

812  {
813  v_AppendFieldData(fielddef,fielddata);
814  }
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:2106
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 819 of file ExpList.h.

References v_AppendFieldData().

823  {
824  v_AppendFieldData(fielddef,fielddata,coeffs);
825  }
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:2106
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 1422 of file ExpList.cpp.

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

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

Definition at line 1609 of file ExpList.h.

References v_BwdTrans().

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

1613  {
1614  v_BwdTrans(inarray,outarray,coeffstate);
1615  }
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2544
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 1620 of file ExpList.h.

References v_BwdTrans_IterPerExp().

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

1623  {
1624  v_BwdTrans_IterPerExp(inarray,outarray);
1625  }
virtual void v_BwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1229
void Nektar::MultiRegions::ExpList::ClearGlobalLinSysManager ( void  )

Definition at line 3089 of file ExpList.cpp.

References v_ClearGlobalLinSysManager().

3090  {
3092  }
virtual void v_ClearGlobalLinSysManager(void)
Definition: ExpList.cpp:1903
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 2950 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().

2951  {
2953  vector<std::pair<LocalRegions::ExpansionSharedPtr,int> > > collections;
2955  vector<std::pair<LocalRegions::ExpansionSharedPtr,int> > >::iterator it;
2956 
2957  // Figure out optimisation parameters if provided in
2958  // session file or default given
2959  Collections::CollectionOptimisation colOpt(m_session, ImpType);
2960  ImpType = colOpt.GetDefaultImplementationType();
2961 
2962  bool autotuning = colOpt.IsUsingAutotuning();
2963  bool verbose = (m_session->DefinesCmdLineArgument("verbose")) &&
2964  (m_comm->GetRank() == 0);
2965  int collmax = (colOpt.GetMaxCollectionSize() > 0
2966  ? colOpt.GetMaxCollectionSize()
2967  : 2*m_exp->size());
2968 
2969  // clear vectors in case previously called
2970  m_collections.clear();
2971  m_coll_coeff_offset.clear();
2972  m_coll_phys_offset.clear();
2973 
2974  // Loop over expansions, and create collections for each element type
2975  for (int i = 0; i < m_exp->size(); ++i)
2976  {
2977  collections[(*m_exp)[i]->DetShapeType()].push_back(
2978  std::pair<LocalRegions::ExpansionSharedPtr,int> ((*m_exp)[i],i));
2979  }
2980 
2981  for (it = collections.begin(); it != collections.end(); ++it)
2982  {
2983  LocalRegions::ExpansionSharedPtr exp = it->second[0].first;
2984 
2985  Collections::OperatorImpMap impTypes = colOpt.GetOperatorImpMap(exp);
2986  vector<StdRegions::StdExpansionSharedPtr> collExp;
2987 
2988  int prevCoeffOffset = m_coeff_offset[it->second[0].second];
2989  int prevPhysOffset = m_phys_offset [it->second[0].second];
2990  int collcnt;
2991 
2992  m_coll_coeff_offset.push_back(prevCoeffOffset);
2993  m_coll_phys_offset .push_back(prevPhysOffset);
2994 
2995  if(it->second.size() == 1) // single element case
2996  {
2997  collExp.push_back(it->second[0].first);
2998 
2999  // if no Imp Type provided and No settign in xml file.
3000  // reset impTypes using timings
3001  if(autotuning)
3002  {
3003  impTypes = colOpt.SetWithTimings(collExp,
3004  impTypes, verbose);
3005  }
3006 
3007  Collections::Collection tmp(collExp, impTypes);
3008  m_collections.push_back(tmp);
3009  }
3010  else
3011  {
3012  // set up first geometry
3013  collExp.push_back(it->second[0].first);
3014  int prevnCoeff = it->second[0].first->GetNcoeffs();
3015  int prevnPhys = it->second[0].first->GetTotPoints();
3016  collcnt = 1;
3017 
3018  for (int i = 1; i < it->second.size(); ++i)
3019  {
3020  int nCoeffs = it->second[i].first->GetNcoeffs();
3021  int nPhys = it->second[i].first->GetTotPoints();
3022  int coeffOffset = m_coeff_offset[it->second[i].second];
3023  int physOffset = m_phys_offset [it->second[i].second];
3024 
3025  // check to see if next elmt is different or
3026  // collmax reached and if so end collection
3027  // and start new one
3028  if(prevCoeffOffset + nCoeffs != coeffOffset ||
3029  prevnCoeff != nCoeffs ||
3030  prevPhysOffset + nPhys != physOffset ||
3031  prevnPhys != nPhys || collcnt >= collmax)
3032  {
3033 
3034  // if no Imp Type provided and No
3035  // settign in xml file. reset
3036  // impTypes using timings
3037  if(autotuning)
3038  {
3039  impTypes = colOpt.SetWithTimings(collExp,
3040  impTypes,
3041  verbose);
3042  }
3043 
3044  Collections::Collection tmp(collExp, impTypes);
3045  m_collections.push_back(tmp);
3046 
3047 
3048  // start new geom list
3049  collExp.clear();
3050 
3051  m_coll_coeff_offset.push_back(coeffOffset);
3052  m_coll_phys_offset .push_back(physOffset);
3053  collExp.push_back(it->second[i].first);
3054  collcnt = 1;
3055  }
3056  else // add to list of collections
3057  {
3058  collExp.push_back(it->second[i].first);
3059  collcnt++;
3060  }
3061 
3062  // if end of list finish up collection
3063  if (i == it->second.size() - 1)
3064  {
3065  // if no Imp Type provided and No
3066  // settign in xml file.
3067  if(autotuning)
3068  {
3069  impTypes = colOpt.SetWithTimings(collExp,
3070  impTypes,verbose);
3071  }
3072 
3073  Collections::Collection tmp(collExp, impTypes);
3074  m_collections.push_back(tmp);
3075  collExp.clear();
3076  collcnt = 0;
3077 
3078  }
3079 
3080  prevCoeffOffset = coeffOffset;
3081  prevPhysOffset = physOffset;
3082  prevnCoeff = nCoeffs;
3083  prevnPhys = nPhys;
3084  }
3085  }
3086  }
3087  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:910
boost::shared_ptr< Expansion > ExpansionSharedPtr
Definition: Expansion.h:68
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:985
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:982
Collections::CollectionVector m_collections
Definition: ExpList.h:979
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 1751 of file ExpList.h.

References v_DealiasedProd().

1756  {
1757  v_DealiasedProd(inarray1,inarray2,outarray,coeffstate);
1758  }
virtual void v_DealiasedProd(const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.cpp:2448
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 1417 of file ExpList.h.

References m_exp.

Referenced by EvalBasisNumModesMaxPerExp().

1418  {
1419  unsigned int i;
1420  int returnval = 0;
1421 
1422  for(i= 0; i < (*m_exp).size(); ++i)
1423  {
1424  returnval = max(returnval,
1425  (*m_exp)[i]->EvalBasisNumModesMax());
1426  }
1427 
1428  return returnval;
1429  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
int EvalBasisNumModesMax(void) const
Evaulates the maximum number of modes in the elemental basis order over all elements.
Definition: ExpList.h:1417
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 1434 of file ExpList.h.

References EvalBasisNumModesMax(), and m_exp.

1436  {
1437  unsigned int i;
1438  Array<OneD,int> returnval((*m_exp).size(),0);
1439 
1440  for(i= 0; i < (*m_exp).size(); ++i)
1441  {
1442  returnval[i]
1443  = max(returnval[i],(*m_exp)[i]->EvalBasisNumModesMax());
1444  }
1445 
1446  return returnval;
1447  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
int EvalBasisNumModesMax(void) const
Evaulates the maximum number of modes in the elemental basis order over all elements.
Definition: ExpList.h:1417
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 2091 of file ExpList.h.

References v_EvaluateBoundaryConditions().

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

2096  {
2097  v_EvaluateBoundaryConditions(time, varName, x2_in, x3_in);
2098  }
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:2827
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 2143 of file ExpList.cpp.

References v_ExtractCoeffsToCoeffs().

2144  {
2145  v_ExtractCoeffsToCoeffs(fromExpList,fromCoeffs,toCoeffs);
2146  }
virtual void v_ExtractCoeffsToCoeffs(const boost::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
Definition: ExpList.cpp:2232
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 2134 of file ExpList.cpp.

References v_ExtractDataToCoeffs().

2139  {
2140  v_ExtractDataToCoeffs(fielddef,fielddata,field,coeffs);
2141  }
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:2156
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::ExtractElmtToBndPhys ( int  i,
Array< OneD, NekDouble > &  elmt,
Array< OneD, NekDouble > &  boundary 
)
inline

Definition at line 2156 of file ExpList.h.

References v_ExtractElmtToBndPhys().

2159  {
2160  v_ExtractElmtToBndPhys(i, elmt, boundary);
2161  }
virtual void v_ExtractElmtToBndPhys(int i, Array< OneD, NekDouble > &elmt, Array< OneD, NekDouble > &boundary)
Definition: ExpList.cpp:2663
void Nektar::MultiRegions::ExpList::ExtractFileBCs ( const std::string &  fileName,
const std::string &  varName,
const boost::shared_ptr< ExpList locExpList 
)
protected

Definition at line 1909 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().

1913  {
1914  string varString = fileName.substr(0, fileName.find_last_of("."));
1915  int j, k, len = varString.length();
1916  varString = varString.substr(len-1, len);
1917 
1918  std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
1919  std::vector<std::vector<NekDouble> > FieldData;
1920 
1921  LibUtilities::FieldIO f(m_session->GetComm());
1922  f.Import(fileName, FieldDef, FieldData);
1923 
1924  bool found = false;
1925  for (j = 0; j < FieldDef.size(); ++j)
1926  {
1927  for (k = 0; k < FieldDef[j]->m_fields.size(); ++k)
1928  {
1929  if (FieldDef[j]->m_fields[k] == varName)
1930  {
1931  // Copy FieldData into locExpList
1932  locExpList->ExtractDataToCoeffs(
1933  FieldDef[j], FieldData[j],
1934  FieldDef[j]->m_fields[k],
1935  locExpList->UpdateCoeffs());
1936  found = true;
1937  }
1938  }
1939  }
1940 
1941  ASSERTL0(found, "Could not find variable '"+varName+
1942  "' in file boundary condition "+fileName);
1943  locExpList->BwdTrans_IterPerExp(
1944  locExpList->GetCoeffs(),
1945  locExpList->UpdatePhys());
1946  }
#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:406
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:910
Class for operating on FLD files.
Definition: FieldIO.h:137
void Nektar::MultiRegions::ExpList::ExtractPhysToBndElmt ( int  i,
const Array< OneD, const NekDouble > &  phys,
Array< OneD, NekDouble > &  bndElmt 
)
inline

Definition at line 2163 of file ExpList.h.

References v_ExtractPhysToBndElmt().

2166  {
2167  v_ExtractPhysToBndElmt(i, phys, bndElmt);
2168  }
virtual void v_ExtractPhysToBndElmt(int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bndElmt)
Definition: ExpList.cpp:2702
void Nektar::MultiRegions::ExpList::ExtractTracePhys ( Array< OneD, NekDouble > &  outarray)
inline

Definition at line 2065 of file ExpList.h.

References v_ExtractTracePhys().

2066  {
2067  v_ExtractTracePhys(outarray);
2068  }
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2370
void Nektar::MultiRegions::ExpList::ExtractTracePhys ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 2071 of file ExpList.h.

References v_ExtractTracePhys().

2074  {
2075  v_ExtractTracePhys(inarray,outarray);
2076  }
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2370
void Nektar::MultiRegions::ExpList::FillBndCondFromField ( void  )
inline

Fill Bnd Condition expansion from the values stored in expansion.

Definition at line 1845 of file ExpList.h.

References v_FillBndCondFromField().

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

Definition at line 1580 of file ExpList.h.

References v_FwdTrans().

1584  {
1585  v_FwdTrans(inarray,outarray,coeffstate);
1586  }
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2551
void Nektar::MultiRegions::ExpList::FwdTrans_BndConstrained ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

Definition at line 612 of file ExpList.cpp.

References m_coeff_offset, and m_phys_offset.

615  {
616  int i;
617 
618  Array<OneD,NekDouble> e_outarray;
619 
620  for(i= 0; i < (*m_exp).size(); ++i)
621  {
622  (*m_exp)[i]->FwdTrans_BndConstrained(inarray+m_phys_offset[i],
623  e_outarray = outarray+m_coeff_offset[i]);
624  }
625  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
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 1591 of file ExpList.h.

References v_FwdTrans_IterPerExp().

1594  {
1595  v_FwdTrans_IterPerExp(inarray,outarray);
1596  }
virtual void v_FwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:602
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 676 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().

678  {
679  int i,cnt1;
680  int n_exp = 0;
681  DNekScalMatSharedPtr loc_mat;
682  DNekScalBlkMatSharedPtr BlkMatrix;
683  map<int,int> elmt_id;
684  LibUtilities::ShapeType ShapeType = gkey.GetShapeType();
685 
686  if(ShapeType != LibUtilities::eNoShapeType)
687  {
688  for(i = 0 ; i < (*m_exp).size(); ++i)
689  {
690  if((*m_exp)[m_offset_elmt_id[i]]->DetShapeType()
691  == ShapeType)
692  {
693  elmt_id[n_exp++] = m_offset_elmt_id[i];
694  }
695  }
696  }
697  else
698  {
699  n_exp = (*m_exp).size();
700  for(i = 0; i < n_exp; ++i)
701  {
702  elmt_id[i] = m_offset_elmt_id[i];
703  }
704  }
705 
706  Array<OneD,unsigned int> nrows(n_exp);
707  Array<OneD,unsigned int> ncols(n_exp);
708 
709  switch(gkey.GetMatrixType())
710  {
712  {
713  // set up an array of integers for block matrix construction
714  for(i = 0; i < n_exp; ++i)
715  {
716  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
717  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
718  }
719  }
720  break;
722  {
723  // set up an array of integers for block matrix construction
724  for(i = 0; i < n_exp; ++i)
725  {
726  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
727  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
728  }
729  }
730  break;
731  case StdRegions::eMass:
736  {
737  // set up an array of integers for block matrix construction
738  for(i = 0; i < n_exp; ++i)
739  {
740  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
741  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
742  }
743  }
744  break;
745 
747  {
748  // set up an array of integers for block matrix construction
749  for(i = 0; i < n_exp; ++i)
750  {
751  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
752  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
753  }
754  }
755  break;
756 
758  {
759  // set up an array of integers for block matrix construction
760  for(i = 0; i < n_exp; ++i)
761  {
762  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
763  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
764  }
765  }
766  break;
767 
768  default:
769  {
771  "Global Matrix creation not defined for this type "
772  "of matrix");
773  }
774  }
775 
776  MatrixStorage blkmatStorage = eDIAGONAL;
778  ::AllocateSharedPtr(nrows,ncols,blkmatStorage);
779 
780  int nvarcoeffs = gkey.GetNVarCoeffs();
781  int eid;
782  Array<OneD, NekDouble> varcoeffs_wk;
783 
784  for(i = cnt1 = 0; i < n_exp; ++i)
785  {
786  // need to be initialised with zero size for non variable coefficient case
787  StdRegions::VarCoeffMap varcoeffs;
788 
789  eid = elmt_id[i];
790  if(nvarcoeffs>0)
791  {
792  StdRegions::VarCoeffMap::const_iterator x;
793  for (x = gkey.GetVarCoeffs().begin(); x != gkey.GetVarCoeffs().end(); ++x)
794  {
795  varcoeffs[x->first] = x->second + m_phys_offset[eid];
796  }
797  }
798 
799  LocalRegions::MatrixKey matkey(gkey.GetMatrixType(),
800  (*m_exp)[eid]->DetShapeType(),
801  *(*m_exp)[eid],
802  gkey.GetConstFactors(),
803  varcoeffs );
804 
805  loc_mat = boost::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[elmt_id.find(i)->second])->GetLocMatrix(matkey);
806  BlkMatrix->SetBlock(i,i,loc_mat);
807  }
808 
809  return BlkMatrix;
810  }
#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:977
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:226
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
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:999
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:74
void Nektar::MultiRegions::ExpList::GeneralGetFieldDefinitions ( std::vector< LibUtilities::FieldDefinitionsSharedPtr > &  fielddef,
int  NumHomoDir = 0,
Array< OneD, LibUtilities::BasisSharedPtr > &  HomoBasis = LibUtilities::NullBasisSharedPtr1DArray,
std::vector< NekDouble > &  HomoLen = LibUtilities::NullNekDoubleVector,
bool  homoStrips = false,
std::vector< unsigned int > &  HomoSIDs = LibUtilities::NullUnsignedIntVector,
std::vector< unsigned int > &  HomoZIDs = LibUtilities::NullUnsignedIntVector,
std::vector< unsigned int > &  HomoYIDs = LibUtilities::NullUnsignedIntVector 
)

Definition at line 1984 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().

1992  {
1993  int startenum = (int) LibUtilities::eSegment;
1994  int endenum = (int) LibUtilities::eHexahedron;
1995  int s = 0;
1997 
1998  ASSERTL1(NumHomoDir == HomoBasis.num_elements(),"Homogeneous basis is not the same length as NumHomoDir");
1999  ASSERTL1(NumHomoDir == HomoLen.size(),"Homogeneous length vector is not the same length as NumHomDir");
2000 
2001  // count number of shapes
2002  switch((*m_exp)[0]->GetShapeDimension())
2003  {
2004  case 1:
2005  startenum = (int) LibUtilities::eSegment;
2006  endenum = (int) LibUtilities::eSegment;
2007  break;
2008  case 2:
2009  startenum = (int) LibUtilities::eTriangle;
2010  endenum = (int) LibUtilities::eQuadrilateral;
2011  break;
2012  case 3:
2013  startenum = (int) LibUtilities::eTetrahedron;
2014  endenum = (int) LibUtilities::eHexahedron;
2015  break;
2016  }
2017 
2018  for(s = startenum; s <= endenum; ++s)
2019  {
2020  std::vector<unsigned int> elementIDs;
2021  std::vector<LibUtilities::BasisType> basis;
2022  std::vector<unsigned int> numModes;
2023  std::vector<std::string> fields;
2024 
2025  bool first = true;
2026  bool UniOrder = true;
2027  int n;
2028 
2029  shape = (LibUtilities::ShapeType) s;
2030 
2031  for(int i = 0; i < (*m_exp).size(); ++i)
2032  {
2033  if((*m_exp)[i]->GetGeom()->GetShapeType() == shape)
2034  {
2035  elementIDs.push_back((*m_exp)[i]->GetGeom()->GetGlobalID());
2036  if(first)
2037  {
2038  for(int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2039  {
2040  basis.push_back((*m_exp)[i]->GetBasis(j)->GetBasisType());
2041  numModes.push_back((*m_exp)[i]->GetBasis(j)->GetNumModes());
2042  }
2043 
2044  // add homogeneous direction details if defined
2045  for(n = 0 ; n < NumHomoDir; ++n)
2046  {
2047  basis.push_back(HomoBasis[n]->GetBasisType());
2048  numModes.push_back(HomoBasis[n]->GetNumModes());
2049  }
2050 
2051  first = false;
2052  }
2053  else
2054  {
2055  ASSERTL0((*m_exp)[i]->GetBasis(0)->GetBasisType() == basis[0],"Routine is not set up for multiple bases definitions");
2056 
2057  for(int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2058  {
2059  numModes.push_back((*m_exp)[i]->GetBasis(j)->GetNumModes());
2060  if(numModes[j] != (*m_exp)[i]->GetBasis(j)->GetNumModes())
2061  {
2062  UniOrder = false;
2063  }
2064  }
2065  // add homogeneous direction details if defined
2066  for(n = 0 ; n < NumHomoDir; ++n)
2067  {
2068  numModes.push_back(HomoBasis[n]->GetNumModes());
2069  }
2070  }
2071  }
2072  }
2073 
2074 
2075  if(elementIDs.size() > 0)
2076  {
2079  AllocateSharedPtr(shape, elementIDs, basis,
2080  UniOrder, numModes,fields,
2081  NumHomoDir, HomoLen, homoStrips,
2082  HomoSIDs, HomoZIDs, HomoYIDs);
2083  fielddef.push_back(fdef);
2084  }
2085  }
2086  }
#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:118
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
#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 2129 of file ExpList.h.

References v_GeneralMatrixOp().

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

2134  {
2135  v_GeneralMatrixOp(gkey,inarray,outarray,coeffstate);
2136  }
virtual void v_GeneralMatrixOp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2573
void Nektar::MultiRegions::ExpList::GeneralMatrixOp_IterPerExp ( const GlobalMatrixKey gkey,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

Definition at line 827 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().

831  {
832  const Array<OneD, const bool> doBlockMatOp
833  = m_globalOptParam->DoBlockMatOp(gkey.GetMatrixType());
834  const Array<OneD, const int> num_elmts
835  = m_globalOptParam->GetShapeNumElements();
836 
837  Array<OneD,NekDouble> tmp_outarray;
838  int cnt = 0;
839  int eid;
840  for(int n = 0; n < num_elmts.num_elements(); ++n)
841  {
842  if(doBlockMatOp[n])
843  {
844  const LibUtilities::ShapeType vType
845  = m_globalOptParam->GetShapeList()[n];
846  const MultiRegions::GlobalMatrixKey vKey(gkey, vType);
847  if (cnt < m_offset_elmt_id.num_elements())
848  {
849  eid = m_offset_elmt_id[cnt];
850  MultiplyByBlockMatrix(vKey,inarray + m_coeff_offset[eid],
851  tmp_outarray = outarray + m_coeff_offset[eid]);
852  cnt += num_elmts[n];
853  }
854  }
855  else
856  {
857  int i;
858  int nvarcoeffs = gkey.GetNVarCoeffs();
859 
860  for(i= 0; i < num_elmts[n]; ++i)
861  {
862  // need to be initialised with zero size for non variable coefficient case
863  StdRegions::VarCoeffMap varcoeffs;
864 
865  eid = m_offset_elmt_id[cnt++];
866  if(nvarcoeffs>0)
867  {
868  StdRegions::VarCoeffMap::const_iterator x;
869  for (x = gkey.GetVarCoeffs().begin(); x != gkey.GetVarCoeffs().end(); ++x)
870  {
871  varcoeffs[x->first] = x->second + m_phys_offset[eid];
872  }
873  }
874 
875  StdRegions::StdMatrixKey mkey(gkey.GetMatrixType(),
876  (*m_exp)[eid]->DetShapeType(),
877  *((*m_exp)[eid]),
878  gkey.GetConstFactors(),varcoeffs);
879 
880  (*m_exp)[eid]->GeneralMatrixOp(inarray + m_coeff_offset[eid],
881  tmp_outarray = outarray+m_coeff_offset[eid],
882  mkey);
883  }
884  }
885  }
886  }
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:1001
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:226
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
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:999
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:324
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 1192 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::DisContField2D::GetGlobalBndLinSys(), Nektar::MultiRegions::DisContField3D::GetGlobalBndLinSys(), and Nektar::MultiRegions::DisContField1D::GetGlobalBndLinSys().

1195  {
1196  boost::shared_ptr<ExpList> vExpList = GetSharedThisPtr();
1197  const map<int,RobinBCInfoSharedPtr> vRobinBCInfo = GetRobinBCInfo();
1198 
1199  MultiRegions::GlobalSysSolnType vType = mkey.GetGlobalSysSolnType();
1200 
1201  if (vType >= eSIZE_GlobalSysSolnType)
1202  {
1203  ASSERTL0(false,"Matrix solution type not defined");
1204  }
1205  std::string vSolnType = MultiRegions::GlobalSysSolnTypeMap[vType];
1206 
1207  return GetGlobalLinSysFactory().CreateInstance(vSolnType,mkey,
1208  vExpList,locToGloMap);
1209  }
#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:780
boost::shared_ptr< ExpList > GetSharedThisPtr()
Returns a shared pointer to the current object.
Definition: ExpList.h:859
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 1173 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().

1176  {
1177  GlobalLinSysSharedPtr returnlinsys;
1178  boost::shared_ptr<ExpList> vExpList = GetSharedThisPtr();
1179 
1180  MultiRegions::GlobalSysSolnType vType = mkey.GetGlobalSysSolnType();
1181 
1182  if (vType >= eSIZE_GlobalSysSolnType)
1183  {
1184  ASSERTL0(false,"Matrix solution type not defined");
1185  }
1186  std::string vSolnType = MultiRegions::GlobalSysSolnTypeMap[vType];
1187 
1188  return GetGlobalLinSysFactory().CreateInstance( vSolnType, mkey,
1189  vExpList, locToGloMap);
1190  }
#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:859
const char *const GlobalSysSolnTypeMap[]
boost::shared_ptr< GlobalLinSys > GlobalLinSysSharedPtr
Pointer to a GlobalLinSys object.
Definition: GlobalLinSys.h:52
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 895 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().

898  {
899  int i,j,n,gid1,gid2,cntdim1,cntdim2;
900  NekDouble sign1,sign2;
901  DNekScalMatSharedPtr loc_mat;
902 
903  unsigned int glob_rows;
904  unsigned int glob_cols;
905  unsigned int loc_rows;
906  unsigned int loc_cols;
907 
908  bool assembleFirstDim;
909  bool assembleSecondDim;
910 
911  switch(mkey.GetMatrixType())
912  {
914  {
915  glob_rows = m_npoints;
916  glob_cols = locToGloMap->GetNumGlobalCoeffs();
917 
918  assembleFirstDim = false;
919  assembleSecondDim = true;
920  }
921  break;
923  {
924  glob_rows = locToGloMap->GetNumGlobalCoeffs();
925  glob_cols = m_npoints;
926 
927  assembleFirstDim = true;
928  assembleSecondDim = false;
929  }
930  break;
931  case StdRegions::eMass:
935  {
936  glob_rows = locToGloMap->GetNumGlobalCoeffs();
937  glob_cols = locToGloMap->GetNumGlobalCoeffs();
938 
939  assembleFirstDim = true;
940  assembleSecondDim = true;
941  }
942  break;
943  default:
944  {
946  "Global Matrix creation not defined for this type "
947  "of matrix");
948  }
949  }
950 
951  COOMatType spcoomat;
952  CoordType coord;
953 
954  int nvarcoeffs = mkey.GetNVarCoeffs();
955  int eid;
956 
957  // fill global matrix
958  for(n = cntdim1 = cntdim2 = 0; n < (*m_exp).size(); ++n)
959  {
960  // need to be initialised with zero size for non variable coefficient case
961  StdRegions::VarCoeffMap varcoeffs;
962 
963  eid = m_offset_elmt_id[n];
964  if(nvarcoeffs>0)
965  {
966  StdRegions::VarCoeffMap::const_iterator x;
967  for (x = mkey.GetVarCoeffs().begin(); x != mkey.GetVarCoeffs().end(); ++x)
968  {
969  varcoeffs[x->first] = x->second + m_phys_offset[eid];
970  }
971  }
972 
973  LocalRegions::MatrixKey matkey(mkey.GetMatrixType(),
974  (*m_exp)[eid]->DetShapeType(),
975  *((*m_exp)[eid]),
976  mkey.GetConstFactors(),varcoeffs);
977 
978  loc_mat = boost::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[m_offset_elmt_id[n]])->GetLocMatrix(matkey);
979 
980  loc_rows = loc_mat->GetRows();
981  loc_cols = loc_mat->GetColumns();
982 
983  for(i = 0; i < loc_rows; ++i)
984  {
985  if(assembleFirstDim)
986  {
987  gid1 = locToGloMap->GetLocalToGlobalMap (cntdim1 + i);
988  sign1 = locToGloMap->GetLocalToGlobalSign(cntdim1 + i);
989  }
990  else
991  {
992  gid1 = cntdim1 + i;
993  sign1 = 1.0;
994  }
995 
996  for(j = 0; j < loc_cols; ++j)
997  {
998  if(assembleSecondDim)
999  {
1000  gid2 = locToGloMap
1001  ->GetLocalToGlobalMap(cntdim2 + j);
1002  sign2 = locToGloMap
1003  ->GetLocalToGlobalSign(cntdim2 + j);
1004  }
1005  else
1006  {
1007  gid2 = cntdim2 + j;
1008  sign2 = 1.0;
1009  }
1010 
1011  // sparse matrix fill
1012  coord = make_pair(gid1,gid2);
1013  if( spcoomat.count(coord) == 0 )
1014  {
1015  spcoomat[coord] = sign1*sign2*(*loc_mat)(i,j);
1016  }
1017  else
1018  {
1019  spcoomat[coord] += sign1*sign2*(*loc_mat)(i,j);
1020  }
1021  }
1022  }
1023  cntdim1 += loc_rows;
1024  cntdim2 += loc_cols;
1025  }
1026 
1028  ::AllocateSharedPtr(m_session,glob_rows,glob_cols,spcoomat);
1029  }
#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:226
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
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:999
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:910
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 1032 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().

1033  {
1034  int i,j,n,gid1,gid2,loc_lda,eid;
1035  NekDouble sign1,sign2,value;
1036  DNekScalMatSharedPtr loc_mat;
1037 
1038  int totDofs = locToGloMap->GetNumGlobalCoeffs();
1039  int NumDirBCs = locToGloMap->GetNumGlobalDirBndCoeffs();
1040 
1041  unsigned int rows = totDofs - NumDirBCs;
1042  unsigned int cols = totDofs - NumDirBCs;
1043  NekDouble zero = 0.0;
1044 
1045  DNekMatSharedPtr Gmat;
1046  int bwidth = locToGloMap->GetFullSystemBandWidth();
1047 
1048  int nvarcoeffs = mkey.GetNVarCoeffs();
1049  MatrixStorage matStorage;
1050 
1051  map<int, RobinBCInfoSharedPtr> RobinBCInfo = GetRobinBCInfo();
1052 
1053  switch(mkey.GetMatrixType())
1054  {
1055  // case for all symmetric matices
1058  if( (2*(bwidth+1)) < rows)
1059  {
1061  Gmat = MemoryManager<DNekMat>::AllocateSharedPtr(rows,cols,zero,matStorage,bwidth,bwidth);
1062  }
1063  else
1064  {
1065  matStorage = ePOSITIVE_DEFINITE_SYMMETRIC;
1066  Gmat = MemoryManager<DNekMat>::AllocateSharedPtr(rows,cols,zero,matStorage);
1067  }
1068 
1069  break;
1070  default: // Assume general matrix - currently only set up for full invert
1071  {
1072  matStorage = eFULL;
1073  Gmat = MemoryManager<DNekMat>::AllocateSharedPtr(rows,cols,zero,matStorage);
1074  }
1075  }
1076 
1077  // fill global symmetric matrix
1078  for(n = 0; n < (*m_exp).size(); ++n)
1079  {
1080  // need to be initialised with zero size for non variable coefficient case
1081  StdRegions::VarCoeffMap varcoeffs;
1082 
1083  eid = m_offset_elmt_id[n];
1084  if(nvarcoeffs>0)
1085  {
1086  StdRegions::VarCoeffMap::const_iterator x;
1087  for (x = mkey.GetVarCoeffs().begin(); x != mkey.GetVarCoeffs().end(); ++x)
1088  {
1089  varcoeffs[x->first] = x->second + m_phys_offset[eid];
1090  }
1091  }
1092 
1093  LocalRegions::MatrixKey matkey(mkey.GetMatrixType(),
1094  (*m_exp)[eid]->DetShapeType(),
1095  *((*m_exp)[eid]),
1096  mkey.GetConstFactors(),varcoeffs);
1097 
1098  loc_mat = boost::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[n])->GetLocMatrix(matkey);
1099 
1100 
1101  if(RobinBCInfo.count(n) != 0) // add robin mass matrix
1102  {
1104 
1105  // declare local matrix from scaled matrix.
1106  int rows = loc_mat->GetRows();
1107  int cols = loc_mat->GetColumns();
1108  const NekDouble *dat = loc_mat->GetRawPtr();
1110  Blas::Dscal(rows*cols,loc_mat->Scale(),new_mat->GetRawPtr(),1);
1111 
1112  // add local matrix contribution
1113  for(rBC = RobinBCInfo.find(n)->second;rBC; rBC = rBC->next)
1114  {
1115  (*m_exp)[n]->AddRobinMassMatrix(rBC->m_robinID,rBC->m_robinPrimitiveCoeffs,new_mat);
1116  }
1117 
1118  NekDouble one = 1.0;
1119  // redeclare loc_mat to point to new_mat plus the scalar.
1120  loc_mat = MemoryManager<DNekScalMat>::AllocateSharedPtr(one,new_mat);
1121  }
1122 
1123  loc_lda = loc_mat->GetColumns();
1124 
1125  for(i = 0; i < loc_lda; ++i)
1126  {
1127  gid1 = locToGloMap->GetLocalToGlobalMap(m_coeff_offset[n] + i) - NumDirBCs;
1128  sign1 = locToGloMap->GetLocalToGlobalSign(m_coeff_offset[n] + i);
1129  if(gid1 >= 0)
1130  {
1131  for(j = 0; j < loc_lda; ++j)
1132  {
1133  gid2 = locToGloMap->GetLocalToGlobalMap(m_coeff_offset[n] + j) - NumDirBCs;
1134  sign2 = locToGloMap->GetLocalToGlobalSign(m_coeff_offset[n] + j);
1135  if(gid2 >= 0)
1136  {
1137  // When global matrix is symmetric,
1138  // only add the value for the upper
1139  // triangular part in order to avoid
1140  // entries to be entered twice
1141  if((matStorage == eFULL)||(gid2 >= gid1))
1142  {
1143  value = Gmat->GetValue(gid1,gid2) + sign1*sign2*(*loc_mat)(i,j);
1144  Gmat->SetValue(gid1,gid2,value);
1145  }
1146  }
1147  }
1148  }
1149  }
1150  }
1151 
1152  return Gmat;
1153  }
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:780
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:988
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:226
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
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:999
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 1464 of file ExpList.h.

References m_exp.

1465  {
1466  int returnval = 0;
1467  int cnt;
1468  int nbase = (*m_exp)[0]->GetNumBases();
1469 
1470  for(int i = 0; i < (*m_exp).size(); ++i)
1471  {
1472  cnt = 1;
1473  for(int j = 0; j < nbase; ++j)
1474  {
1475  cnt *= (int)(scale*((*m_exp)[i]->GetNumPoints(j)));
1476  }
1477  returnval += cnt;
1478  }
1479  return returnval;
1480  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
void Nektar::MultiRegions::ExpList::GetBCValues ( Array< OneD, NekDouble > &  BndVals,
const Array< OneD, NekDouble > &  TotField,
int  BndID 
)
inline

Definition at line 1763 of file ExpList.h.

References v_GetBCValues().

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

Definition at line 812 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().

814  {
815  BlockMatrixMap::iterator matrixIter = m_blockMat->find(gkey);
816 
817  if(matrixIter == m_blockMat->end())
818  {
819  return ((*m_blockMat)[gkey] = GenBlockMatrix(gkey));
820  }
821  else
822  {
823  return matrixIter->second;
824  }
825  }
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1003
const DNekScalBlkMatSharedPtr GenBlockMatrix(const GlobalMatrixKey &gkey)
This function assembles the block diagonal matrix of local matrices of the type mtype.
Definition: ExpList.cpp:676
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 1973 of file ExpList.h.

References v_GetBndCondExpansions().

Referenced by v_ExtractElmtToBndPhys(), v_ExtractPhysToBndElmt(), and v_GetBoundaryNormals().

1974  {
1975  return v_GetBndCondExpansions();
1976  }
virtual const Array< OneD, const boost::shared_ptr< ExpList > > & v_GetBndCondExpansions(void)
Definition: ExpList.cpp:2255
const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::GetBndConditions ( )
inline

Definition at line 2079 of file ExpList.h.

References v_GetBndConditions().

2080  {
2081  return v_GetBndConditions();
2082  }
virtual const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & v_GetBndConditions()
Definition: ExpList.cpp:2806
void Nektar::MultiRegions::ExpList::GetBndElmtExpansion ( int  i,
boost::shared_ptr< ExpList > &  result 
)
inline

Definition at line 2150 of file ExpList.h.

References v_GetBndElmtExpansion().

2152  {
2153  v_GetBndElmtExpansion(i, result);
2154  }
virtual void v_GetBndElmtExpansion(int i, boost::shared_ptr< ExpList > &result)
Definition: ExpList.cpp:2654
SpatialDomains::BoundaryConditionShPtr Nektar::MultiRegions::ExpList::GetBoundaryCondition ( const SpatialDomains::BoundaryConditionCollection collection,
unsigned int  index,
const std::string &  variable 
)
staticprotected

Definition at line 2858 of file ExpList.cpp.

References ASSERTL1.

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

2862  {
2863  SpatialDomains::BoundaryConditionCollection::const_iterator collectionIter = collection.find(regionId);
2864  ASSERTL1(collectionIter != collection.end(), "Unable to locate collection "+boost::lexical_cast<string>(regionId));
2865  const SpatialDomains::BoundaryConditionMapShPtr boundaryConditionMap = (*collectionIter).second;
2866  SpatialDomains::BoundaryConditionMap::const_iterator conditionMapIter = boundaryConditionMap->find(variable);
2867  ASSERTL1(conditionMapIter != boundaryConditionMap->end(), "Unable to locate condition map.");
2868  const SpatialDomains::BoundaryConditionShPtr boundaryCondition = (*conditionMapIter).second;
2869  return boundaryCondition;
2870  }
boost::shared_ptr< BoundaryConditionMap > BoundaryConditionMapShPtr
Definition: Conditions.h:214
boost::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
Definition: Conditions.h:208
#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::GetBoundaryNormals ( int  i,
Array< OneD, Array< OneD, NekDouble > > &  normals 
)
inline

Definition at line 2170 of file ExpList.h.

References v_GetBoundaryNormals().

2172  {
2173  v_GetBoundaryNormals(i, normals);
2174  }
virtual void v_GetBoundaryNormals(int i, Array< OneD, Array< OneD, NekDouble > > &normals)
Definition: ExpList.cpp:2743
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 1865 of file ExpList.h.

References m_coeffs.

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

1866  {
1867  return m_coeffs[i];
1868  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
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 1834 of file ExpList.h.

References m_coeffs.

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

1835  {
1836  return m_coeffs;
1837  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
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 1874 of file ExpList.h.

References m_coeffs.

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

Returns the comm object.

Definition at line 871 of file ExpList.h.

References m_comm.

872  {
873  return m_comm;
874  }
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
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 1794 of file ExpList.h.

References ASSERTL2, and m_exp.

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

1795  {
1796  ASSERTL2(eid <= (*m_exp).size(),
1797  "eid is larger than number of elements");
1798  return (*m_exp)[eid]->GetCoordim();
1799  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
#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 1684 of file ExpList.h.

References v_GetCoords().

Referenced by v_WriteTecplotZone().

1688  {
1689  v_GetCoords(coord_0,coord_1,coord_2);
1690  }
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
Definition: ExpList.cpp:2593
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 1917 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::LocTraceToTraceMap::LocTraceToTraceMap(), Nektar::MultiRegions::DisContField3DHomogeneous1D::NormVectorIProductWRTBase(), Nektar::MultiRegions::ExpList1D::PostProcess(), Nektar::MultiRegions::LocTraceToTraceMap::Setup2D(), Nektar::MultiRegions::LocTraceToTraceMap::Setup3D(), Nektar::MultiRegions::AssemblyMapCG::SetUpUniversalC0ContMap(), Nektar::MultiRegions::AssemblyMapDG::SetUpUniversalDGMap(), Nektar::MultiRegions::AssemblyMapDG::SetUpUniversalTraceMap(), v_ExtractElmtToBndPhys(), v_ExtractPhysToBndElmt(), Nektar::MultiRegions::DisContField3DHomogeneous2D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField2D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBoundaryNormals(), v_GetBoundaryNormals(), v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_HomogeneousEnergy(), Nektar::MultiRegions::AssemblyMapCG::v_LinearSpaceMap(), and v_WriteTecplotHeader().

1918  {
1919  return m_exp;
1920  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
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 1908 of file ExpList.h.

References m_exp.

1909  {
1910  return (*m_exp)[n];
1911  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
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 1241 of file ExpList.cpp.

References ASSERTL0, GetCoordim(), and m_exp.

1243  {
1244  Array<OneD, NekDouble> stdCoord(GetCoordim(0),0.0);
1245  for (int i = 0; i < (*m_exp).size(); ++i)
1246  {
1247  if ((*m_exp)[i]->GetGeom()->ContainsPoint(gloCoord))
1248  {
1249  return (*m_exp)[i];
1250  }
1251  }
1252  ASSERTL0(false, "Cannot find element for this point.");
1253  return (*m_exp)[0]; // avoid warnings
1254  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1794
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 1262 of file ExpList.cpp.

1266  {
1267  Array<OneD, NekDouble> Lcoords(gloCoord.num_elements());
1268 
1269  return GetExpIndex(gloCoord,Lcoords,tol,returnNearestElmt);
1270  }
int GetExpIndex(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false)
Definition: ExpList.cpp:1262
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 1273 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.

1277  {
1278  NekDouble nearpt = 1e6;
1279 
1280  if (GetNumElmts() == 0)
1281  {
1282  return -1;
1283  }
1284  std::vector<std::pair<int,NekDouble> > elmtIdDist;
1285 
1286  // Manifold case (point may match multiple elements)
1287  if (GetExp(0)->GetCoordim() > GetExp(0)->GetShapeDimension())
1288  {
1291  NekDouble dist = 0.0;
1292 
1293  // Scan all elements and store those which may contain the point
1294  for (int i = 0; i < (*m_exp).size(); ++i)
1295  {
1296  if ((*m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1297  locCoords,
1298  tol, nearpt))
1299  {
1300  w.SetX(gloCoords[0]);
1301  w.SetY(gloCoords[1]);
1302  w.SetZ(gloCoords[2]);
1303 
1304  // Find closest vertex
1305  for (int j = 0; j < (*m_exp)[i]->GetNverts(); ++j) {
1306  v = m_graph->GetVertex(
1307  (*m_exp)[i]->GetGeom()->GetVid(j));
1308  if (j == 0 || dist > v->dist(w))
1309  {
1310  dist = v->dist(w);
1311  }
1312  }
1313  elmtIdDist.push_back(
1314  std::pair<int, NekDouble>(i, dist));
1315  }
1316  }
1317 
1318  // Find nearest element
1319  if (!elmtIdDist.empty())
1320  {
1321  int min_id = elmtIdDist[0].first;
1322  NekDouble min_d = elmtIdDist[0].second;
1323 
1324  for (int i = 1; i < elmtIdDist.size(); ++i)
1325  {
1326  if (elmtIdDist[i].second < min_d) {
1327  min_id = elmtIdDist[i].first;
1328  min_d = elmtIdDist[i].second;
1329  }
1330  }
1331 
1332  // retrieve local coordinate of point
1333  (*m_exp)[min_id]->GetGeom()->GetLocCoords(gloCoords,
1334  locCoords);
1335  return min_id;
1336  }
1337  else
1338  {
1339  return -1;
1340  }
1341  }
1342  // non-embedded mesh (point can only match one element)
1343  else
1344  {
1345  static int start = 0;
1346  int min_id = 0;
1347  NekDouble nearpt_min = 1e6;
1348  Array<OneD, NekDouble> savLocCoords(locCoords.num_elements());
1349 
1350  // restart search from last found value
1351  for (int i = start; i < (*m_exp).size(); ++i)
1352  {
1353  if ((*m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1354  locCoords,
1355  tol, nearpt))
1356  {
1357  start = i;
1358  return i;
1359  }
1360  else
1361  {
1362  if(nearpt < nearpt_min)
1363  {
1364  min_id = i;
1365  nearpt_min = nearpt;
1366  Vmath::Vcopy(locCoords.num_elements(),locCoords,1,savLocCoords,1);
1367  }
1368  }
1369  }
1370 
1371  for (int i = 0; i < start; ++i)
1372  {
1373  if ((*m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1374  locCoords,
1375  tol, nearpt))
1376  {
1377  start = i;
1378  return i;
1379  }
1380  else
1381  {
1382  if(nearpt < nearpt_min)
1383  {
1384  min_id = i;
1385  nearpt_min = nearpt;
1386  Vmath::Vcopy(locCoords.num_elements(),
1387  locCoords,1,savLocCoords,1);
1388  }
1389  }
1390  }
1391 
1392  if(returnNearestElmt)
1393  {
1394 
1395  std::string msg = "Failed to find point within element to tolerance of "
1396  + boost::lexical_cast<std::string>(tol)
1397  + " using local point ("
1398  + boost::lexical_cast<std::string>(locCoords[0]) +","
1399  + boost::lexical_cast<std::string>(locCoords[1]) +","
1400  + boost::lexical_cast<std::string>(locCoords[1])
1401  + ") in element: "
1402  + boost::lexical_cast<std::string>(min_id);
1403  WARNINGL1(false,msg.c_str());
1404 
1405  Vmath::Vcopy(locCoords.num_elements(),savLocCoords,1,locCoords,1);
1406  return min_id;
1407  }
1408  else
1409  {
1410  return -1;
1411  }
1412 
1413  }
1414  }
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:1917
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Definition: ExpList.h:572
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:977
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:913
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:1794
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
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 1896 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::DisContField2D::v_AddFwdBwdTraceIntegral(), Nektar::MultiRegions::DisContField1D::v_AddTraceIntegral(), Nektar::MultiRegions::DisContField2D::v_AddTraceIntegral(), Nektar::MultiRegions::DisContField1D::v_ExtractTracePhys(), Nektar::MultiRegions::DisContField2D::v_ExtractTracePhys(), Nektar::MultiRegions::DisContField3D::v_GetBoundaryToElmtMap(), Nektar::MultiRegions::DisContField2D::v_GetBoundaryToElmtMap(), Nektar::MultiRegions::DisContField1D::v_GetBoundaryToElmtMap(), Nektar::MultiRegions::DisContField1D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField2D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField3D::v_HelmSolve(), Nektar::MultiRegions::DisContField2D::v_HelmSolve(), Nektar::MultiRegions::DisContField1D::v_HelmSolve(), v_NormVectorIProductWRTBase(), 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().

1897  {
1898  return (*m_exp).size();
1899  }
ExpansionType Nektar::MultiRegions::ExpList::GetExpType ( void  )

Returns the type of the expansion.

Definition at line 243 of file ExpList.cpp.

References m_expType.

244  {
245  return m_expType;
246  }
std::vector<LibUtilities::FieldDefinitionsSharedPtr> Nektar::MultiRegions::ExpList::GetFieldDefinitions ( )
inline

Definition at line 794 of file ExpList.h.

References v_GetFieldDefinitions().

795  {
796  return v_GetFieldDefinitions();
797  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2092
void Nektar::MultiRegions::ExpList::GetFieldDefinitions ( std::vector< LibUtilities::FieldDefinitionsSharedPtr > &  fielddef)
inline

Definition at line 800 of file ExpList.h.

References v_GetFieldDefinitions().

801  {
802  v_GetFieldDefinitions(fielddef);
803  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2092
void Nektar::MultiRegions::ExpList::GetFwdBwdTracePhys ( Array< OneD, NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd 
)
inline

Definition at line 2045 of file ExpList.h.

References v_GetFwdBwdTracePhys().

2048  {
2049  v_GetFwdBwdTracePhys(Fwd,Bwd);
2050  }
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
Definition: ExpList.cpp:2345
void Nektar::MultiRegions::ExpList::GetFwdBwdTracePhys ( const Array< OneD, const NekDouble > &  field,
Array< OneD, NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd 
)
inline

Definition at line 2052 of file ExpList.h.

References v_GetFwdBwdTracePhys().

2056  {
2057  v_GetFwdBwdTracePhys(field,Fwd,Bwd);
2058  }
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
Definition: ExpList.cpp:2345
const NekOptimize::GlobalOptParamSharedPtr& Nektar::MultiRegions::ExpList::GetGlobalOptParam ( void  )
inline

Definition at line 775 of file ExpList.h.

References m_globalOptParam.

776  {
777  return m_globalOptParam;
778  }
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:1001
SpatialDomains::MeshGraphSharedPtr Nektar::MultiRegions::ExpList::GetGraph ( )
inline

Definition at line 876 of file ExpList.h.

References m_graph.

877  {
878  return m_graph;
879  }
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:913
LibUtilities::BasisSharedPtr Nektar::MultiRegions::ExpList::GetHomogeneousBasis ( void  )
inline

Definition at line 882 of file ExpList.h.

References v_GetHomogeneousBasis().

883  {
884  return v_GetHomogeneousBasis();
885  }
virtual LibUtilities::BasisSharedPtr v_GetHomogeneousBasis(void)
Definition: ExpList.h:1372
NekDouble Nektar::MultiRegions::ExpList::GetHomoLen ( void  )
inline

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

Definition at line 527 of file ExpList.h.

References v_GetHomoLen().

528  {
529  return v_GetHomoLen();
530  }
virtual NekDouble v_GetHomoLen(void)
Definition: ExpList.cpp:1867
const vector< bool > & Nektar::MultiRegions::ExpList::GetLeftAdjacentFaces ( void  ) const
inline

Definition at line 2060 of file ExpList.h.

References v_GetLeftAdjacentFaces().

2061  {
2062  return v_GetLeftAdjacentFaces();
2063  }
virtual const vector< bool > & v_GetLeftAdjacentFaces(void) const
Definition: ExpList.cpp:2361
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 1408 of file ExpList.h.

References m_exp.

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

Definition at line 2016 of file ExpList.h.

References v_GetNormals().

2018  {
2019  v_GetNormals(normals);
2020  }
virtual void v_GetNormals(Array< OneD, Array< OneD, NekDouble > > &normals)
Definition: ExpList.cpp:2312
int Nektar::MultiRegions::ExpList::GetNpoints ( void  ) const
inline

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

Definition at line 1485 of file ExpList.h.

References m_npoints.

1486  {
1487  return m_npoints;
1488  }
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 572 of file ExpList.h.

References v_GetNumElmts().

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

573  {
574  return v_GetNumElmts();
575  }
virtual int v_GetNumElmts(void)
Definition: ExpList.h:1056
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 1942 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().

1943  {
1944  return m_offset_elmt_id[n];
1945  }
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:999
void Nektar::MultiRegions::ExpList::GetPeriodicEntities ( PeriodicMap periodicVerts,
PeriodicMap periodicEdges,
PeriodicMap periodicFaces = NullPeriodicMap 
)
inline

Definition at line 785 of file ExpList.h.

References v_GetPeriodicEntities().

789  {
790  v_GetPeriodicEntities(periodicVerts, periodicEdges, periodicFaces);
791  }
virtual void v_GetPeriodicEntities(PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces)
Definition: ExpList.cpp:2849
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 1887 of file ExpList.h.

References m_phys.

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

1888  {
1889  return m_phys;
1890  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
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 1551 of file ExpList.h.

References m_physState.

1552  {
1553  return m_physState;
1554  }
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
boost::shared_ptr<ExpList>& Nektar::MultiRegions::ExpList::GetPlane ( int  n)
inline

Definition at line 887 of file ExpList.h.

References v_GetPlane().

888  {
889  return v_GetPlane(n);
890  }
virtual boost::shared_ptr< ExpList > & v_GetPlane(int n)
Definition: ExpList.cpp:2872
map<int, RobinBCInfoSharedPtr> Nektar::MultiRegions::ExpList::GetRobinBCInfo ( )
inline

Definition at line 780 of file ExpList.h.

References v_GetRobinBCInfo().

Referenced by GenGlobalBndLinSys(), and GenGlobalMatrixFull().

781  {
782  return v_GetRobinBCInfo();
783  }
virtual map< int, RobinBCInfoSharedPtr > v_GetRobinBCInfo(void)
Definition: ExpList.cpp:2839
boost::shared_ptr<LibUtilities::SessionReader> Nektar::MultiRegions::ExpList::GetSession ( )
inline

Returns the session object.

Definition at line 865 of file ExpList.h.

References m_session.

866  {
867  return m_session;
868  }
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:910
boost::shared_ptr<ExpList> Nektar::MultiRegions::ExpList::GetSharedThisPtr ( )
inline

Returns a shared pointer to the current object.

Definition at line 859 of file ExpList.h.

Referenced by GenGlobalBndLinSys(), and GenGlobalLinSys().

860  {
861  return shared_from_this();
862  }
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 1458 of file ExpList.h.

References m_exp.

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

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

Definition at line 2001 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().

2002  {
2003  return v_GetTrace();
2004  }
virtual boost::shared_ptr< ExpList > & v_GetTrace()
Definition: ExpList.cpp:2291
const Array< OneD, const int > & Nektar::MultiRegions::ExpList::GetTraceBndMap ( void  )
inline

Definition at line 2011 of file ExpList.h.

References v_GetTraceBndMap().

2012  {
2013  return v_GetTraceBndMap();
2014  }
virtual const Array< OneD, const int > & v_GetTraceBndMap()
Definition: ExpList.cpp:2307
boost::shared_ptr< AssemblyMapDG > & Nektar::MultiRegions::ExpList::GetTraceMap ( void  )
inline

Definition at line 2006 of file ExpList.h.

References v_GetTraceMap().

Referenced by v_GetTraceBndMap().

2007  {
2008  return v_GetTraceMap();
2009  }
virtual boost::shared_ptr< AssemblyMapDG > & v_GetTraceMap()
Definition: ExpList.cpp:2299
LibUtilities::TranspositionSharedPtr Nektar::MultiRegions::ExpList::GetTransposition ( void  )
inline

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

Definition at line 520 of file ExpList.h.

References v_GetTransposition().

521  {
522  return v_GetTransposition();
523  }
virtual LibUtilities::TranspositionSharedPtr v_GetTransposition(void)
Definition: ExpList.cpp:1859
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 1502 of file ExpList.h.

References m_WaveSpace.

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

1503  {
1504  return m_WaveSpace;
1505  }
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 536 of file ExpList.h.

References v_GetYIDs().

537  {
538  return v_GetYIDs();
539  }
virtual Array< OneD, const unsigned int > v_GetYIDs(void)
Definition: ExpList.cpp:1883
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 513 of file ExpList.h.

References v_GetZIDs().

Referenced by v_WriteTecplotZone().

514  {
515  return v_GetZIDs();
516  }
virtual Array< OneD, const unsigned int > v_GetZIDs(void)
Definition: ExpList.cpp:1875
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 1965 of file ExpList.cpp.

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

1968  {
1969  NekDouble err = 0.0, errh1;
1970  int i;
1971 
1972  for (i = 0; i < (*m_exp).size(); ++i)
1973  {
1974  errh1 = (*m_exp)[i]->H1(inarray + m_phys_offset[i],
1975  soln + m_phys_offset[i]);
1976  err += errh1*errh1;
1977  }
1978 
1979  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
1980 
1981  return sqrt(err);
1982  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
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 1642 of file ExpList.h.

References v_HelmSolve().

1649  {
1650  v_HelmSolve(inarray, outarray, flags, factors, varcoeff, dirForcing);
1651  }
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:2393
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 1738 of file ExpList.h.

References v_HomogeneousBwdTrans().

1744  {
1745  v_HomogeneousBwdTrans(inarray,outarray,coeffstate,Shuff,UnShuff);
1746  }
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:2438
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 497 of file ExpList.h.

References v_HomogeneousEnergy().

498  {
499  return v_HomogeneousEnergy();
500  }
virtual Array< OneD, const NekDouble > v_HomogeneousEnergy(void)
Definition: ExpList.cpp:1851
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 1725 of file ExpList.h.

References v_HomogeneousFwdTrans().

1731  {
1732  v_HomogeneousFwdTrans(inarray,outarray,coeffstate,Shuff,UnShuff);
1733  }
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:2428
void Nektar::MultiRegions::ExpList::ImposeDirichletConditions ( Array< OneD, NekDouble > &  outarray)
inline

Impose Dirichlet Boundary Conditions onto Array.

Definition at line 1839 of file ExpList.h.

References v_ImposeDirichletConditions().

1841  {
1842  v_ImposeDirichletConditions(outarray);
1843  }
virtual void v_ImposeDirichletConditions(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2517
NekDouble Nektar::MultiRegions::ExpList::Integral ( const Array< OneD, const NekDouble > &  inarray)
inline

Definition at line 490 of file ExpList.h.

References v_Integral().

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

Definition at line 1559 of file ExpList.h.

References v_IProductWRTBase().

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

1563  {
1564  v_IProductWRTBase(inarray,outarray, coeffstate);
1565  }
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2558
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 1570 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().

1573  {
1574  v_IProductWRTBase_IterPerExp(inarray,outarray);
1575  }
virtual void v_IProductWRTBase_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:354
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 381 of file ExpList.cpp.

References m_coeff_offset, and m_phys_offset.

384  {
385  int i;
386 
387  Array<OneD,NekDouble> e_outarray;
388 
389  for(i = 0; i < (*m_exp).size(); ++i)
390  {
391  (*m_exp)[i]->IProductWRTDerivBase(dir,inarray+m_phys_offset[i],
392  e_outarray = outarray+m_coeff_offset[i]);
393  }
394  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
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 408 of file ExpList.cpp.

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

410  {
411  Array<OneD, NekDouble> tmp0,tmp1,tmp2;
412  // assume coord dimension defines the size of Deriv Base
413  int dim = GetCoordim(0);
414 
415  ASSERTL1(inarray.num_elements() >= dim,"inarray is not of sufficient dimension");
416 
417  switch(dim)
418  {
419  case 1:
420  for (int i = 0; i < m_collections.size(); ++i)
421  {
422  m_collections[i].ApplyOperator(
424  inarray[0] + m_coll_phys_offset[i],
425  tmp0 = outarray + m_coll_coeff_offset[i]);
426  }
427  break;
428  case 2:
429  for (int i = 0; i < m_collections.size(); ++i)
430  {
431  m_collections[i].ApplyOperator(
433  inarray[0] + m_coll_phys_offset[i],
434  tmp0 = inarray[1] + m_coll_phys_offset[i],
435  tmp1 = outarray + m_coll_coeff_offset[i]);
436  }
437  break;
438  case 3:
439  for (int i = 0; i < m_collections.size(); ++i)
440  {
441  m_collections[i].ApplyOperator(
443  inarray[0] + m_coll_phys_offset[i],
444  tmp0 = inarray[1] + m_coll_phys_offset[i],
445  tmp1 = inarray[2] + m_coll_phys_offset[i],
446  tmp2 = outarray + m_coll_coeff_offset[i]);
447  }
448  break;
449  default:
450  ASSERTL0(false,"Dimension of inarray not correct");
451  break;
452  }
453  }
#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:985
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1794
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:982
#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:979
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 477 of file ExpList.h.

References v_L2().

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

480  {
481  return v_L2(inarray, soln);
482  }
virtual NekDouble v_L2(const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
Definition: ExpList.cpp:1807
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 1657 of file ExpList.h.

References v_LinearAdvectionDiffusionReactionSolve().

1664  {
1665  v_LinearAdvectionDiffusionReactionSolve(velocity,inarray, outarray,
1666  lambda, coeffstate,dirForcing);
1667  }
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:2404
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 1669 of file ExpList.h.

References v_LinearAdvectionReactionSolve().

1676  {
1677  v_LinearAdvectionReactionSolve(velocity,inarray, outarray,
1678  lambda, coeffstate,dirForcing);
1679  }
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:2416
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 1768 of file ExpList.cpp.

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

1771  {
1772  NekDouble err = 0.0;
1773 
1774  if (soln == NullNekDouble1DArray)
1775  {
1776  err = Vmath::Vmax(m_npoints, inarray, 1);
1777  }
1778  else
1779  {
1780  for (int i = 0; i < m_npoints; ++i)
1781  {
1782  err = max(err, abs(inarray[i] - soln[i]));
1783  }
1784  }
1785 
1786  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceMax);
1787 
1788  return err;
1789  }
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:765
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
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 324 of file ExpList.cpp.

References Nektar::eWrapper, and GetBlockMatrix().

Referenced by GeneralMatrixOp_IterPerExp().

328  {
329  // Retrieve the block matrix using the given key.
330  const DNekScalBlkMatSharedPtr& blockmat = GetBlockMatrix(gkey);
331  int nrows = blockmat->GetRows();
332  int ncols = blockmat->GetColumns();
333 
334  // Create NekVectors from the given data arrays
335  NekVector<NekDouble> in (ncols,inarray, eWrapper);
336  NekVector< NekDouble> out(nrows,outarray,eWrapper);
337 
338  // Perform matrix-vector multiply.
339  out = (*blockmat)*in;
340  }
const DNekScalBlkMatSharedPtr & GetBlockMatrix(const GlobalMatrixKey &gkey)
Definition: ExpList.cpp:812
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 563 of file ExpList.cpp.

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

Referenced by v_FwdTrans_IterPerExp().

566  {
567  GlobalMatrixKey mkey(StdRegions::eInvMass);
568  const DNekScalBlkMatSharedPtr& InvMass = GetBlockMatrix(mkey);
569 
570  // Inverse mass matrix
572  if(inarray.get() == outarray.get())
573  {
574  NekVector<NekDouble> in(m_ncoeffs,inarray); // copy data
575  out = (*InvMass)*in;
576  }
577  else
578  {
580  out = (*InvMass)*in;
581  }
582  }
const DNekScalBlkMatSharedPtr & GetBlockMatrix(const GlobalMatrixKey &gkey)
Definition: ExpList.cpp:812
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:917
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 1631 of file ExpList.h.

References v_MultiplyByInvMassMatrix().

1635  {
1636  v_MultiplyByInvMassMatrix(inarray,outarray,coeffstate);
1637  }
virtual void v_MultiplyByInvMassMatrix(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2384
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 1774 of file ExpList.h.

References v_NormVectorIProductWRTBase().

1779  {
1780  v_NormVectorIProductWRTBase(V1,V2,outarray,BndID);
1781  }
virtual void v_NormVectorIProductWRTBase(Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
Definition: ExpList.cpp:2462
void Nektar::MultiRegions::ExpList::NormVectorIProductWRTBase ( Array< OneD, Array< OneD, NekDouble > > &  V,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 1783 of file ExpList.h.

References v_NormVectorIProductWRTBase().

1786  {
1787  v_NormVectorIProductWRTBase(V, outarray);
1788  }
virtual void v_NormVectorIProductWRTBase(Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
Definition: ExpList.cpp:2462
void Nektar::MultiRegions::ExpList::PhysDeriv ( Direction  edir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d 
)
inline

Definition at line 1714 of file ExpList.h.

References v_PhysDeriv().

1718  {
1719  v_PhysDeriv(edir, inarray,out_d);
1720  }
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:488
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 1695 of file ExpList.h.

References v_PhysDeriv().

1699  {
1700  v_PhysDeriv(inarray,out_d0,out_d1,out_d2);
1701  }
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:488
void Nektar::MultiRegions::ExpList::PhysDeriv ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d 
)
inline

Definition at line 1706 of file ExpList.h.

References v_PhysDeriv().

1710  {
1711  v_PhysDeriv(dir,inarray,out_d);
1712  }
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:488
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 557 of file ExpList.h.

References v_PhysGalerkinProjection1DScaled().

561  {
562  v_PhysGalerkinProjection1DScaled(scale, inarray, outarray);
563  }
virtual void v_PhysGalerkinProjection1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1898
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 276 of file ExpList.cpp.

References ASSERTL1, m_phys, and m_physState.

277  {
278  ASSERTL1(m_physState == true,
279  "local physical space is not true ");
280 
281  return PhysIntegral(m_phys);
282  }
NekDouble PhysIntegral(void)
This function integrates a function over the domain consisting of all the elements of the expansion...
Definition: ExpList.cpp:276
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
#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 301 of file ExpList.cpp.

References m_phys_offset.

303  {
304  int i;
305  NekDouble sum = 0.0;
306 
307  for(i = 0; i < (*m_exp).size(); ++i)
308  {
309  sum += (*m_exp)[i]->Integral(inarray + m_phys_offset[i]);
310  }
311 
312  return sum;
313  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
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 545 of file ExpList.h.

References v_PhysInterp1DScaled().

549  {
550  v_PhysInterp1DScaled(scale, inarray,outarray);
551  }
virtual void v_PhysInterp1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1892
void Nektar::MultiRegions::ExpList::ReadGlobalOptimizationParameters ( )
inlineprotected
void Nektar::MultiRegions::ExpList::Reset ( )
inline

Reset geometry information and reset matrices.

Definition at line 371 of file ExpList.h.

References v_Reset().

372  {
373  v_Reset();
374  }
virtual void v_Reset()
Reset geometry information, metrics, matrix managers and geometry information.
Definition: ExpList.cpp:1435
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 1805 of file ExpList.h.

References m_coeffs.

1806  {
1807  m_coeffs[i] = val;
1808  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
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 1815 of file ExpList.h.

References m_coeffs.

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

Set the m_coeffs array to inarray.

Definition at line 1821 of file ExpList.h.

References m_coeffs.

1822  {
1823  m_coeffs = inarray;
1824  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
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 504 of file ExpList.h.

References v_SetHomo1DSpecVanVisc().

505  {
507  }
virtual void v_SetHomo1DSpecVanVisc(Array< OneD, NekDouble > visc)
Definition: ExpList.h:1380
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 1508 of file ExpList.h.

References m_phys.

1509  {
1510  m_phys[i] = val;
1511  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
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 1522 of file ExpList.h.

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

1524  {
1525  ASSERTL0(inarray.num_elements() == m_npoints,
1526  "Input array does not have correct number of elements.");
1527 
1528  Vmath::Vcopy(m_npoints,&inarray[0],1,&m_phys[0],1);
1529  m_physState = true;
1530  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
void Nektar::MultiRegions::ExpList::SetPhysArray ( Array< OneD, NekDouble > &  inarray)
inline

Sets the array m_phys.

Definition at line 1533 of file ExpList.h.

References m_phys.

1534  {
1535  m_phys = inarray;
1536  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
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 1542 of file ExpList.h.

References m_physState.

1543  {
1544  m_physState = physState;
1545  }
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
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 1494 of file ExpList.h.

References m_WaveSpace.

1495  {
1496  m_WaveSpace = wavespace;
1497  }
void Nektar::MultiRegions::ExpList::SmoothField ( Array< OneD, NekDouble > &  field)
inline

Smooth a field across elements.

Definition at line 1601 of file ExpList.h.

References v_SmoothField().

1602  {
1603  v_SmoothField(field);
1604  }
virtual void v_SmoothField(Array< OneD, NekDouble > &field)
Definition: ExpList.cpp:634
boost::shared_ptr< ExpList > & Nektar::MultiRegions::ExpList::UpdateBndCondExpansion ( int  i)
inline

Definition at line 1978 of file ExpList.h.

References v_UpdateBndCondExpansion().

1979  {
1980  return v_UpdateBndCondExpansion(i);
1981  }
virtual boost::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
Definition: ExpList.cpp:2263
Array< OneD, SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::UpdateBndConditions ( )
inline

Definition at line 2086 of file ExpList.h.

References v_UpdateBndConditions().

2087  {
2088  return v_UpdateBndConditions();
2089  }
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
Definition: ExpList.cpp:2817
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 1953 of file ExpList.h.

References m_coeffs.

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

1954  {
1955  return m_coeffs;
1956  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
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 1964 of file ExpList.h.

References m_phys, and m_physState.

1965  {
1966  m_physState = true;
1967  return m_phys;
1968  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
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 1983 of file ExpList.h.

References v_Upwind().

1988  {
1989  v_Upwind(Vec, Fwd, Bwd, Upwind);
1990  }
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:2271
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 1992 of file ExpList.h.

References v_Upwind().

1997  {
1998  v_Upwind(Vn, Fwd, Bwd, Upwind);
1999  }
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:2271
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 2336 of file ExpList.cpp.

References ASSERTL0.

Referenced by AddFwdBwdTraceIntegral().

2340  {
2341  ASSERTL0(false,
2342  "This method is not defined or valid for this class type");
2343  }
#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 2319 of file ExpList.cpp.

References ASSERTL0.

Referenced by AddTraceIntegral().

2323  {
2324  ASSERTL0(false,
2325  "This method is not defined or valid for this class type");
2326  }
#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::DisContField3D, and Nektar::MultiRegions::DisContField1D.

Definition at line 2328 of file ExpList.cpp.

References ASSERTL0.

2331  {
2332  ASSERTL0(false,
2333  "This method is not defined or valid for this class type");
2334  }
#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 2106 of file ExpList.cpp.

References m_coeffs.

Referenced by AppendFieldData().

2107  {
2108  v_AppendFieldData(fielddef,fielddata,m_coeffs);
2109  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:2106
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 2111 of file ExpList.cpp.

References m_coeff_offset.

2112  {
2113  int i;
2114  // Determine mapping from element ids to location in
2115  // expansion list
2116  // Determine mapping from element ids to location in
2117  // expansion list
2118  map<int, int> ElmtID_to_ExpID;
2119  for(i = 0; i < (*m_exp).size(); ++i)
2120  {
2121  ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2122  }
2123 
2124  for(i = 0; i < fielddef->m_elementIDs.size(); ++i)
2125  {
2126  int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
2127  int datalen = (*m_exp)[eid]->GetNcoeffs();
2128  fielddata.insert(fielddata.end(),&coeffs[m_coeff_offset[eid]],&coeffs[m_coeff_offset[eid]]+datalen);
2129  }
2130 
2131  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
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 2544 of file ExpList.cpp.

References v_BwdTrans_IterPerExp().

Referenced by BwdTrans().

2547  {
2548  v_BwdTrans_IterPerExp(inarray,outarray);
2549  }
virtual void v_BwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1229
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 1229 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().

1231  {
1233  for (int i = 0; i < m_collections.size(); ++i)
1234  {
1235  m_collections[i].ApplyOperator(Collections::eBwdTrans,
1236  inarray + m_coll_coeff_offset[i],
1237  tmp = outarray + m_coll_phys_offset[i]);
1238  }
1239  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:985
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:982
Collections::CollectionVector m_collections
Definition: ExpList.h:979
void Nektar::MultiRegions::ExpList::v_ClearGlobalLinSysManager ( void  )
protectedvirtual

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

Definition at line 1903 of file ExpList.cpp.

References ASSERTL0.

Referenced by ClearGlobalLinSysManager().

1904  {
1905  ASSERTL0(false,
1906  "This method is not defined or valid for this class type");
1907  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
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 2448 of file ExpList.cpp.

References ASSERTL0.

Referenced by DealiasedProd().

2449  {
2450  ASSERTL0(false,
2451  "This method is not defined or valid for this class type");
2452  }
#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::DisContField2D, Nektar::MultiRegions::DisContField3DHomogeneous1D, Nektar::MultiRegions::DisContField3D, Nektar::MultiRegions::DisContField1D, and Nektar::MultiRegions::DisContField3DHomogeneous2D.

Definition at line 2827 of file ExpList.cpp.

References ASSERTL0.

Referenced by EvaluateBoundaryConditions().

2832  {
2833  ASSERTL0(false,
2834  "This method is not defined or valid for this class type");
2835  }
#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 2232 of file ExpList.cpp.

References m_coeff_offset, and m_offset_elmt_id.

Referenced by ExtractCoeffsToCoeffs().

2233  {
2234  int i;
2235  int offset = 0;
2236 
2237  for(i = 0; i < (*m_exp).size(); ++i)
2238  {
2239  std::vector<unsigned int> nummodes;
2240  int eid = m_offset_elmt_id[i];
2241  for(int j= 0; j < fromExpList->GetExp(eid)->GetNumBases(); ++j)
2242  {
2243  nummodes.push_back(fromExpList->GetExp(eid)->GetBasisNumModes(j));
2244  }
2245 
2246  (*m_exp)[eid]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes,0,
2247  &toCoeffs[m_coeff_offset[eid]]);
2248 
2249  offset += fromExpList->GetExp(eid)->GetNcoeffs();
2250  }
2251  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
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:999
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 2156 of file ExpList.cpp.

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

Referenced by ExtractDataToCoeffs().

2161  {
2162  int i, expId;
2163  int offset = 0;
2164  int modes_offset = 0;
2165  int datalen = fielddata.size()/fielddef->m_fields.size();
2166 
2167  // Find data location according to field definition
2168  for(i = 0; i < fielddef->m_fields.size(); ++i)
2169  {
2170  if(fielddef->m_fields[i] == field)
2171  {
2172  break;
2173  }
2174  offset += datalen;
2175  }
2176 
2177  ASSERTL0(i != fielddef->m_fields.size(),
2178  "Field (" + field + ") not found in file.");
2179 
2180  // Determine mapping from element ids to location in expansion list
2181  map<int, int> elmtToExpId;
2182 
2183  // Loop in reverse order so that in case where using a Homogeneous
2184  // expansion it sets geometry ids to first part of m_exp
2185  // list. Otherwise will set to second (complex) expansion
2186  for(i = (*m_exp).size()-1; i >= 0; --i)
2187  {
2188  elmtToExpId[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2189  }
2190 
2191  for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
2192  {
2193  // Reset modes_offset in the case where all expansions of
2194  // the same order.
2195  if (fielddef->m_uniOrder == true)
2196  {
2197  modes_offset = 0;
2198  }
2199 
2200  datalen = LibUtilities::GetNumberOfCoefficients(fielddef->m_shapeType,
2201  fielddef->m_numModes, modes_offset);
2202 
2203  const int elmtId = fielddef->m_elementIDs[i];
2204  if (elmtToExpId.count(elmtId) == 0)
2205  {
2206  offset += datalen;
2207  modes_offset += (*m_exp)[0]->GetNumBases();
2208  continue;
2209  }
2210 
2211  expId = elmtToExpId[elmtId];
2212 
2213  if (datalen == (*m_exp)[expId]->GetNcoeffs())
2214  {
2215  Vmath::Vcopy(datalen, &fielddata[offset], 1,
2216  &coeffs[m_coeff_offset[expId]], 1);
2217  }
2218  else
2219  {
2220  (*m_exp)[expId]->ExtractDataToCoeffs(
2221  &fielddata[offset], fielddef->m_numModes,
2222  modes_offset, &coeffs[m_coeff_offset[expId]]);
2223  }
2224 
2225  offset += datalen;
2226  modes_offset += (*m_exp)[0]->GetNumBases();
2227  }
2228 
2229  return;
2230  }
#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:988
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
int GetNcoeffs(void) const
Returns the total number of local degrees of freedom .
Definition: ExpList.h:1403
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
void Nektar::MultiRegions::ExpList::v_ExtractElmtToBndPhys ( int  i,
Array< OneD, NekDouble > &  elmt,
Array< OneD, NekDouble > &  boundary 
)
protectedvirtual

Definition at line 2663 of file ExpList.cpp.

References GetBndCondExpansions(), GetBoundaryToElmtMap(), and GetExp().

Referenced by ExtractElmtToBndPhys().

2666  {
2667  int n, cnt;
2668  Array<OneD, NekDouble> tmp1, tmp2;
2670 
2671  Array<OneD, int> ElmtID,EdgeID;
2672  GetBoundaryToElmtMap(ElmtID,EdgeID);
2673 
2674  // Initialise result
2675  boundary = Array<OneD, NekDouble>
2676  (GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
2677 
2678  // Skip other boundary regions
2679  for (cnt = n = 0; n < i; ++n)
2680  {
2681  cnt += GetBndCondExpansions()[n]->GetExpSize();
2682  }
2683 
2684  int offsetBnd;
2685  int offsetElmt = 0;
2686  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2687  {
2688  offsetBnd = GetBndCondExpansions()[i]->GetPhys_Offset(n);
2689 
2690  elmt = GetExp(ElmtID[cnt+n]);
2691  elmt->GetTracePhysVals(EdgeID[cnt+n],
2692  GetBndCondExpansions()[i]->GetExp(n),
2693  tmp1 = element + offsetElmt,
2694  tmp2 = boundary + offsetBnd);
2695 
2696  offsetElmt += elmt->GetTotPoints();
2697  }
2698  }
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:1917
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2144
const Array< OneD, const boost::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:1973
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
void Nektar::MultiRegions::ExpList::v_ExtractPhysToBndElmt ( int  i,
const Array< OneD, const NekDouble > &  phys,
Array< OneD, NekDouble > &  bndElmt 
)
protectedvirtual

Definition at line 2702 of file ExpList.cpp.

References GetBndCondExpansions(), GetBoundaryToElmtMap(), GetExp(), GetPhys_Offset(), and Vmath::Vcopy().

Referenced by ExtractPhysToBndElmt().

2705  {
2706  int n, cnt, nq;
2707  Array<OneD, NekDouble> tmp1, tmp2;
2708 
2709  Array<OneD, int> ElmtID,EdgeID;
2710  GetBoundaryToElmtMap(ElmtID,EdgeID);
2711 
2712  // Skip other boundary regions
2713  for (cnt = n = 0; n < i; ++n)
2714  {
2715  cnt += GetBndCondExpansions()[n]->GetExpSize();
2716  }
2717 
2718  // Count number of points
2719  int npoints = 0;
2720  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2721  {
2722  npoints += GetExp(ElmtID[cnt+n])->GetTotPoints();
2723  }
2724 
2725  // Initialise result
2726  bndElmt = Array<OneD, NekDouble> (npoints, 0.0);
2727 
2728  // Extract data
2729  int offsetPhys;
2730  int offsetElmt = 0;
2731  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2732  {
2733  nq = GetExp(ElmtID[cnt+n])->GetTotPoints();
2734  offsetPhys = GetPhys_Offset(ElmtID[cnt+n]);
2735  Vmath::Vcopy(nq, tmp1 = phys + offsetPhys, 1,
2736  tmp2 = bndElmt + offsetElmt, 1);
2737  offsetElmt += nq;
2738  }
2739  }
int GetPhys_Offset(int n) const
Get the start offset position for a global list of m_phys correspoinding to element n...
Definition: ExpList.h:1934
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:1917
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2144
const Array< OneD, const boost::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:1973
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
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 2370 of file ExpList.cpp.

References ASSERTL0.

Referenced by ExtractTracePhys().

2371  {
2372  ASSERTL0(false,
2373  "This method is not defined or valid for this class type");
2374  }
#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::DisContField2D, Nektar::MultiRegions::DisContField1D, and Nektar::MultiRegions::DisContField3D.

Definition at line 2376 of file ExpList.cpp.

References ASSERTL0.

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

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

Definition at line 2525 of file ExpList.cpp.

References ASSERTL0.

Referenced by FillBndCondFromField().

2526  {
2527  ASSERTL0(false,
2528  "This method is not defined or valid for this class type");
2529  }
#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 2551 of file ExpList.cpp.

References v_FwdTrans_IterPerExp().

Referenced by FwdTrans().

2554  {
2555  v_FwdTrans_IterPerExp(inarray,outarray);
2556  }
virtual void v_FwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:602
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 602 of file ExpList.cpp.

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

Referenced by FwdTrans_IterPerExp(), and v_FwdTrans().

604  {
606 
607  IProductWRTBase_IterPerExp(inarray,f);
608  MultiplyByElmtInvMass(f,outarray);
609 
610  }
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:563
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:1570
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:917
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::DisContField2D, Nektar::MultiRegions::ContField1D, Nektar::MultiRegions::DisContField3D, and Nektar::MultiRegions::ContField3D.

Definition at line 2573 of file ExpList.cpp.

References GeneralMatrixOp_IterPerExp().

Referenced by GeneralMatrixOp().

2578  {
2579  GeneralMatrixOp_IterPerExp(gkey,inarray,outarray);
2580  }
void GeneralMatrixOp_IterPerExp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:827
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 2454 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBCValues().

2457  {
2458  ASSERTL0(false,
2459  "This method is not defined or valid for this class type");
2460  }
#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::DisContField2D, Nektar::MultiRegions::DisContField3DHomogeneous1D, Nektar::MultiRegions::DisContField3D, Nektar::MultiRegions::DisContField1D, and Nektar::MultiRegions::DisContField3DHomogeneous2D.

Definition at line 2255 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBndCondExpansions().

2256  {
2257  ASSERTL0(false,
2258  "This method is not defined or valid for this class type");
2260  return result;
2261  }
#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::DisContField2D, Nektar::MultiRegions::DisContField3DHomogeneous1D, Nektar::MultiRegions::DisContField3D, Nektar::MultiRegions::DisContField1D, Nektar::MultiRegions::ContField1D, and Nektar::MultiRegions::DisContField3DHomogeneous2D.

Definition at line 2806 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBndConditions().

2807  {
2808  ASSERTL0(false,
2809  "This method is not defined or valid for this class type");
2811  result;
2812  return result;
2813  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_GetBndElmtExpansion ( int  i,
boost::shared_ptr< ExpList > &  result 
)
protectedvirtual

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

Definition at line 2654 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBndElmtExpansion().

2656  {
2657  ASSERTL0(false,
2658  "This method is not defined or valid for this class type");
2659  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_GetBoundaryNormals ( int  i,
Array< OneD, Array< OneD, NekDouble > > &  normals 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D.

Definition at line 2743 of file ExpList.cpp.

References GetBndCondExpansions(), GetBoundaryToElmtMap(), GetCoordim(), GetExp(), and Vmath::Vcopy().

Referenced by GetBoundaryNormals().

2745  {
2746  int j, n, cnt, nq;
2747  int coordim = GetCoordim(0);
2750 
2751  Array<OneD, int> ElmtID,EdgeID;
2752  GetBoundaryToElmtMap(ElmtID,EdgeID);
2753 
2754  // Initialise result
2755  normals = Array<OneD, Array<OneD, NekDouble> > (coordim);
2756  for (j = 0; j < coordim; ++j)
2757  {
2758  normals[j] = Array<OneD, NekDouble> (
2759  GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
2760  }
2761 
2762  // Skip other boundary regions
2763  for (cnt = n = 0; n < i; ++n)
2764  {
2765  cnt += GetBndCondExpansions()[n]->GetExpSize();
2766  }
2767 
2768  int offset;
2769  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2770  {
2771  offset = GetBndCondExpansions()[i]->GetPhys_Offset(n);
2772  nq = GetBndCondExpansions()[i]->GetExp(n)->GetTotPoints();
2773 
2774  elmt = GetExp(ElmtID[cnt+n]);
2775  const Array<OneD, const Array<OneD, NekDouble> > normalsElmt
2776  = elmt->GetSurfaceNormal(EdgeID[cnt+n]);
2777  // Copy to result
2778  for (j = 0; j < coordim; ++j)
2779  {
2780  Vmath::Vcopy(nq, normalsElmt[j], 1,
2781  tmp = normals[j] + offset, 1);
2782  }
2783  }
2784  }
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:1917
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2144
const Array< OneD, const boost::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:1973
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1794
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
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 2788 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBoundaryToElmtMap().

2790  {
2791  ASSERTL0(false,
2792  "This method is not defined or valid for this class type");
2793  }
#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::ExpList3DHomogeneous2D, Nektar::MultiRegions::ExpList2DHomogeneous1D, and Nektar::MultiRegions::ExpList1DHomogeneous2D.

Definition at line 2593 of file ExpList.cpp.

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

Referenced by GetCoords().

2596  {
2597  if (GetNumElmts() == 0)
2598  {
2599  return;
2600  }
2601 
2602  int i;
2603  Array<OneD, NekDouble> e_coord_0;
2604  Array<OneD, NekDouble> e_coord_1;
2605  Array<OneD, NekDouble> e_coord_2;
2606 
2607  switch(GetExp(0)->GetCoordim())
2608  {
2609  case 1:
2610  for(i= 0; i < (*m_exp).size(); ++i)
2611  {
2612  e_coord_0 = coord_0 + m_phys_offset[i];
2613  (*m_exp)[i]->GetCoords(e_coord_0);
2614  }
2615  break;
2616  case 2:
2617  ASSERTL0(coord_1.num_elements() != 0,
2618  "output coord_1 is not defined");
2619 
2620  for(i= 0; i < (*m_exp).size(); ++i)
2621  {
2622  e_coord_0 = coord_0 + m_phys_offset[i];
2623  e_coord_1 = coord_1 + m_phys_offset[i];
2624  (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1);
2625  }
2626  break;
2627  case 3:
2628  ASSERTL0(coord_1.num_elements() != 0,
2629  "output coord_1 is not defined");
2630  ASSERTL0(coord_2.num_elements() != 0,
2631  "output coord_2 is not defined");
2632 
2633  for(i= 0; i < (*m_exp).size(); ++i)
2634  {
2635  e_coord_0 = coord_0 + m_phys_offset[i];
2636  e_coord_1 = coord_1 + m_phys_offset[i];
2637  e_coord_2 = coord_2 + m_phys_offset[i];
2638  (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1,e_coord_2);
2639  }
2640  break;
2641  }
2642  }
#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:1917
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Definition: ExpList.h:572
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1794
std::vector< LibUtilities::FieldDefinitionsSharedPtr > Nektar::MultiRegions::ExpList::v_GetFieldDefinitions ( void  )
protectedvirtual

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

Definition at line 2092 of file ExpList.cpp.

Referenced by GetFieldDefinitions().

2093  {
2094  std::vector<LibUtilities::FieldDefinitionsSharedPtr> returnval;
2095  v_GetFieldDefinitions(returnval);
2096  return returnval;
2097  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2092
void Nektar::MultiRegions::ExpList::v_GetFieldDefinitions ( std::vector< LibUtilities::FieldDefinitionsSharedPtr > &  fielddef)
protectedvirtual

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

Definition at line 2099 of file ExpList.cpp.

References GeneralGetFieldDefinitions().

2100  {
2101  GeneralGetFieldDefinitions(fielddef);
2102  }
void GeneralGetFieldDefinitions(std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef, int NumHomoDir=0, Array< OneD, LibUtilities::BasisSharedPtr > &HomoBasis=LibUtilities::NullBasisSharedPtr1DArray, std::vector< NekDouble > &HomoLen=LibUtilities::NullNekDoubleVector, bool homoStrips=false, std::vector< unsigned int > &HomoSIDs=LibUtilities::NullUnsignedIntVector, std::vector< unsigned int > &HomoZIDs=LibUtilities::NullUnsignedIntVector, std::vector< unsigned int > &HomoYIDs=LibUtilities::NullUnsignedIntVector)
Definition: ExpList.cpp:1984
void Nektar::MultiRegions::ExpList::v_GetFwdBwdTracePhys ( Array< OneD, NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd 
)
protectedvirtual

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

Definition at line 2345 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetFwdBwdTracePhys().

2347  {
2348  ASSERTL0(false,
2349  "This method is not defined or valid for this class type");
2350  }
#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::DisContField2D, Nektar::MultiRegions::DisContField1D, and Nektar::MultiRegions::DisContField3D.

Definition at line 2352 of file ExpList.cpp.

References ASSERTL0.

2356  {
2357  ASSERTL0(false,
2358  "This method is not defined or valid for this class type");
2359  }
#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 1372 of file ExpList.h.

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

Referenced by GetHomogeneousBasis().

1373  {
1374  ASSERTL0(false,
1375  "This method is not defined or valid for this class type");
1377  }
#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 1867 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetHomoLen().

1868  {
1869  ASSERTL0(false,
1870  "This method is not defined or valid for this class type");
1871  NekDouble len = 0.0;
1872  return len;
1873  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
double NekDouble
const vector< bool > & Nektar::MultiRegions::ExpList::v_GetLeftAdjacentFaces ( void  ) const
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3D.

Definition at line 2361 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetLeftAdjacentFaces().

2362  {
2363  ASSERTL0(false,
2364  "This method is not defined or valid for this class type");
2365  vector<bool> returnval;
2366  return returnval;
2367  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_GetNormals ( Array< OneD, Array< OneD, NekDouble > > &  normals)
protectedvirtual

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

Definition at line 2312 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetNormals().

2314  {
2315  ASSERTL0(false,
2316  "This method is not defined or valid for this class type");
2317  }
#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 1056 of file ExpList.h.

Referenced by GetNumElmts().

1057  {
1058  return (*m_exp).size();
1059  }
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 2849 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetPeriodicEntities().

2853  {
2854  ASSERTL0(false,
2855  "This method is not defined or valid for this class type");
2856  }
#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 2872 of file ExpList.cpp.

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

Referenced by GetPlane().

2873  {
2874  ASSERTL0(false,
2875  "This method is not defined or valid for this class type");
2876  return NullExpListSharedPtr;
2877  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
static ExpListSharedPtr NullExpListSharedPtr
Definition: ExpList.h:1395
map< int, RobinBCInfoSharedPtr > Nektar::MultiRegions::ExpList::v_GetRobinBCInfo ( void  )
privatevirtual

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

Definition at line 2839 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetRobinBCInfo().

2840  {
2841  ASSERTL0(false,
2842  "This method is not defined or valid for this class type");
2843  static map<int,RobinBCInfoSharedPtr> result;
2844  return result;
2845  }
#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 2291 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetTrace().

2292  {
2293  ASSERTL0(false,
2294  "This method is not defined or valid for this class type");
2295  static boost::shared_ptr<ExpList> returnVal;
2296  return returnVal;
2297  }
#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 2307 of file ExpList.cpp.

References GetTraceMap().

Referenced by GetTraceBndMap().

2308  {
2309  return GetTraceMap()->GetBndCondTraceToGlobalTraceMap();
2310  }
boost::shared_ptr< AssemblyMapDG > & GetTraceMap(void)
Definition: ExpList.h:2006
boost::shared_ptr< AssemblyMapDG > & Nektar::MultiRegions::ExpList::v_GetTraceMap ( void  )
protectedvirtual

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

Definition at line 2299 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetTraceMap().

2300  {
2301  ASSERTL0(false,
2302  "This method is not defined or valid for this class type");
2303  static boost::shared_ptr<AssemblyMapDG> result;
2304  return result;
2305  }
#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 1859 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetTransposition().

1860  {
1861  ASSERTL0(false,
1862  "This method is not defined or valid for this class type");
1864  return trans;
1865  }
#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 1883 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetYIDs().

1884  {
1885  ASSERTL0(false,
1886  "This method is not defined or valid for this class type");
1887  Array<OneD, unsigned int> NoModes(1);
1888  return NoModes;
1889  }
#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 1875 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetZIDs().

1876  {
1877  ASSERTL0(false,
1878  "This method is not defined or valid for this class type");
1879  Array<OneD, unsigned int> NoModes(1);
1880  return NoModes;
1881  }
#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::ContField3DHomogeneous1D, and Nektar::MultiRegions::ContField3DHomogeneous2D.

Definition at line 2537 of file ExpList.cpp.

References ASSERTL0.

Referenced by GlobalToLocal().

2538  {
2539  ASSERTL0(false,
2540  "This method is not defined or valid for this class type");
2541  }
#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 2438 of file ExpList.cpp.

References ASSERTL0.

Referenced by HomogeneousBwdTrans().

2443  {
2444  ASSERTL0(false,
2445  "This method is not defined or valid for this class type");
2446  }
#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 1851 of file ExpList.cpp.

References ASSERTL0.

Referenced by HomogeneousEnergy().

1852  {
1853  ASSERTL0(false,
1854  "This method is not defined or valid for this class type");
1855  Array<OneD, NekDouble> NoEnergy(1,0.0);
1856  return NoEnergy;
1857  }
#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 2428 of file ExpList.cpp.

References ASSERTL0.

Referenced by HomogeneousFwdTrans().

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_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 2517 of file ExpList.cpp.

References ASSERTL0.

Referenced by ImposeDirichletConditions().

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

Definition at line 1837 of file ExpList.cpp.

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

Referenced by Integral().

1838  {
1839  NekDouble err = 0.0;
1840  int i = 0;
1841 
1842  for (i = 0; i < (*m_exp).size(); ++i)
1843  {
1844  err += (*m_exp)[m_offset_elmt_id[i]]->Integral(inarray + m_phys_offset[i]);
1845  }
1846  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
1847 
1848  return err;
1849  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
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:999
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
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 2558 of file ExpList.cpp.

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

Referenced by IProductWRTBase().

2562  {
2564  for (int i = 0; i < m_collections.size(); ++i)
2565  {
2566 
2568  inarray + m_coll_phys_offset[i],
2569  tmp = outarray + m_coll_coeff_offset[i]);
2570  }
2571  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:985
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:982
Collections::CollectionVector m_collections
Definition: ExpList.h:979
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 354 of file ExpList.cpp.

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

Referenced by IProductWRTBase_IterPerExp().

357  {
359  for (int i = 0; i < m_collections.size(); ++i)
360  {
361 
363  inarray + m_coll_phys_offset[i],
364  tmp = outarray + m_coll_coeff_offset[i]);
365  }
366  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:985
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:982
Collections::CollectionVector m_collections
Definition: ExpList.h:979
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 1807 of file ExpList.cpp.

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

Referenced by L2().

1810  {
1811  NekDouble err = 0.0, errl2;
1812  int i;
1813 
1814  if (soln == NullNekDouble1DArray)
1815  {
1816  for (i = 0; i < (*m_exp).size(); ++i)
1817  {
1818  errl2 = (*m_exp)[i]->L2(inarray + m_phys_offset[i]);
1819  err += errl2*errl2;
1820  }
1821  }
1822  else
1823  {
1824  for (i = 0; i < (*m_exp).size(); ++i)
1825  {
1826  errl2 = (*m_exp)[i]->L2(inarray + m_phys_offset[i],
1827  soln + m_phys_offset[i]);
1828  err += errl2*errl2;
1829  }
1830  }
1831 
1832  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
1833 
1834  return sqrt(err);
1835  }
static Array< OneD, NekDouble > NullNekDouble1DArray
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
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 2404 of file ExpList.cpp.

References ASSERTL0.

Referenced by LinearAdvectionDiffusionReactionSolve().

2411  {
2412  ASSERTL0(false,
2413  "This method is not defined or valid for this class type");
2414  }
#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 2416 of file ExpList.cpp.

References ASSERTL0.

Referenced by LinearAdvectionReactionSolve().

2423  {
2424  ASSERTL0(false,
2425  "This method is not defined or valid for this class type");
2426  }
#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::ContField3DHomogeneous1D, and Nektar::MultiRegions::ContField3DHomogeneous2D.

Definition at line 2531 of file ExpList.cpp.

References ASSERTL0.

Referenced by LocalToGlobal().

2532  {
2533  ASSERTL0(false,
2534  "This method is not defined or valid for this class type");
2535  }
#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 2384 of file ExpList.cpp.

References ASSERTL0.

Referenced by MultiplyByInvMassMatrix().

2388  {
2389  ASSERTL0(false,
2390  "This method is not defined or valid for this class type");
2391  }
#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 2462 of file ExpList.cpp.

References ASSERTL0.

Referenced by NormVectorIProductWRTBase().

2466  {
2467  ASSERTL0(false,
2468  "This method is not defined or valid for this class type");
2469  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
void Nektar::MultiRegions::ExpList::v_NormVectorIProductWRTBase ( Array< OneD, Array< OneD, NekDouble > > &  V,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Definition at line 2471 of file ExpList.cpp.

References ASSERTL0, GetCoeff_Offset(), GetCoordim(), GetExpSize(), and GetPhys_Offset().

2474  {
2476  switch (GetCoordim(0))
2477  {
2478  case 1:
2479  {
2480  for(int i = 0; i < GetExpSize(); ++i)
2481  {
2482  (*m_exp)[i]->NormVectorIProductWRTBase(
2483  V[0] + GetPhys_Offset(i),
2484  tmp = outarray + GetCoeff_Offset(i));
2485  }
2486  }
2487  break;
2488  case 2:
2489  {
2490  for(int i = 0; i < GetExpSize(); ++i)
2491  {
2492  (*m_exp)[i]->NormVectorIProductWRTBase(
2493  V[0] + GetPhys_Offset(i),
2494  V[1] + GetPhys_Offset(i),
2495  tmp = outarray + GetCoeff_Offset(i));
2496  }
2497  }
2498  break;
2499  case 3:
2500  {
2501  for(int i = 0; i < GetExpSize(); ++i)
2502  {
2503  (*m_exp)[i]->NormVectorIProductWRTBase(
2504  V[0] + GetPhys_Offset(i),
2505  V[1] + GetPhys_Offset(i),
2506  V[2] + GetPhys_Offset(i),
2507  tmp = outarray + GetCoeff_Offset(i));
2508  }
2509  }
2510  break;
2511  default:
2512  ASSERTL0(false,"Dimension not supported");
2513  break;
2514  }
2515  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
int GetCoeff_Offset(int n) const
Get the start offset position for a global list of m_coeffs correspoinding to element n...
Definition: ExpList.h:1926
int GetPhys_Offset(int n) const
Get the start offset position for a global list of m_phys correspoinding to element n...
Definition: ExpList.h:1934
int GetExpSize(void)
This function returns the number of elements in the expansion.
Definition: ExpList.h:1896
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1794
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 488 of file ExpList.cpp.

References m_coll_phys_offset, and m_collections.

Referenced by PhysDeriv(), and v_PhysDeriv().

492  {
493  Array<OneD, NekDouble> e_out_d0;
494  Array<OneD, NekDouble> e_out_d1;
495  Array<OneD, NekDouble> e_out_d2;
496  for (int i = 0; i < m_collections.size(); ++i)
497  {
498  int offset = m_coll_phys_offset[i];
499  e_out_d0 = out_d0 + offset;
500  e_out_d1 = out_d1 + offset;
501  e_out_d2 = out_d2 + offset;
502 
503  m_collections[i].ApplyOperator(Collections::ePhysDeriv,
504  inarray + offset,
505  e_out_d0,e_out_d1, e_out_d2);
506 
507  }
508  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:985
Collections::CollectionVector m_collections
Definition: ExpList.h:979
void Nektar::MultiRegions::ExpList::v_PhysDeriv ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d 
)
protectedvirtual

Definition at line 510 of file ExpList.cpp.

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

513  {
514  Direction edir = DirCartesianMap[dir];
515  v_PhysDeriv(edir, inarray,out_d);
516  }
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:488
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 518 of file ExpList.cpp.

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

520  {
521  int i;
522  if(edir==MultiRegions::eS)
523  {
524  Array<OneD, NekDouble> e_out_ds;
525  for(i=0; i<(*m_exp).size(); ++i)
526  {
527  e_out_ds = out_d + m_phys_offset[i];
528  (*m_exp)[i]->PhysDeriv_s(inarray+m_phys_offset[i],e_out_ds);
529  }
530  }
531  else if(edir==MultiRegions::eN)
532  {
533  Array<OneD, NekDouble > e_out_dn;
534  for(i=0; i<(*m_exp).size(); i++)
535  {
536  e_out_dn = out_d +m_phys_offset[i];
537  (*m_exp)[i]->PhysDeriv_n(inarray+m_phys_offset[i],e_out_dn);
538  }
539  }
540  else
541  {
542  // convert enum into int
543  int intdir= (int)edir;
544  Array<OneD, NekDouble> e_out_d;
545  for(i= 0; i < (*m_exp).size(); ++i)
546  {
547  e_out_d = out_d + m_phys_offset[i];
548  (*m_exp)[i]->PhysDeriv(intdir, inarray+m_phys_offset[i], e_out_d);
549  }
550 
551  }
552  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
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 1898 of file ExpList.cpp.

References ASSERTL0.

Referenced by PhysGalerkinProjection1DScaled().

1898  {
1899  ASSERTL0(false,
1900  "This method is not defined or valid for this class type");
1901  }
#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 1892 of file ExpList.cpp.

References ASSERTL0.

Referenced by PhysInterp1DScaled().

1893  {
1894  ASSERTL0(false,
1895  "This method is not defined or valid for this class type");
1896  }
#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 2797 of file ExpList.cpp.

References ASSERTL0.

Referenced by ReadGlobalOptimizationParameters().

2798  {
2799  ASSERTL0(false,
2800  "This method is not defined or valid for this class type");
2801  }
#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 1435 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().

1436  {
1437  // Reset matrix managers.
1439  DNekScalMat, LocalRegions::MatrixKey::opLess>::ClearManager();
1440  LibUtilities::NekManager<LocalRegions::MatrixKey,
1442 
1443  // Loop over all elements and reset geometry information.
1444  for (int i = 0; i < m_exp->size(); ++i)
1445  {
1446  (*m_exp)[i]->GetGeom()->Reset(m_graph->GetCurvedEdges(),
1447  m_graph->GetCurvedFaces());
1448  }
1449 
1450  // Loop over all elements and rebuild geometric factors.
1451  for (int i = 0; i < m_exp->size(); ++i)
1452  {
1453  (*m_exp)[i]->Reset();
1454  }
1455  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
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:913
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 1380 of file ExpList.h.

References ASSERTL0.

Referenced by SetHomo1DSpecVanVisc().

1381  {
1382  ASSERTL0(false,
1383  "This method is not defined or valid for this class type");
1384  }
#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 2646 of file ExpList.cpp.

References ASSERTL0.

Referenced by SetUpPhysNormals().

2647  {
2648  ASSERTL0(false,
2649  "This method is not defined or valid for this class type");
2650  }
#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 634 of file ExpList.cpp.

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

Referenced by SmoothField().

635  {
636  // Do nothing unless the method is implemented in the appropriate
637  // class, i.e. ContField1D,ContField2D, etc.
638 
639  // So far it has been implemented just for ContField2D and
640  // ContField3DHomogeneous1D
641 
642  // Block in case users try the smoothing with a modal expansion.
643  // Maybe a different techique for the smoothing require
644  // implementation for modal basis.
645 
646  ASSERTL0((*m_exp)[0]->GetBasisType(0)
648  (*m_exp)[0]->GetBasisType(0)
650  "Smoothing is currently not allowed unless you are using "
651  "a nodal base for efficiency reasons. The implemented "
652  "smoothing technique requires the mass matrix inversion "
653  "which is trivial just for GLL_LAGRANGE_SEM and "
654  "GAUSS_LAGRANGE_SEMexpansions.");
655  }
#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:977
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::DisContField3D, Nektar::MultiRegions::DisContField1D, and Nektar::MultiRegions::DisContField3DHomogeneous2D.

Definition at line 2263 of file ExpList.cpp.

References ASSERTL0.

Referenced by UpdateBndCondExpansion().

2264  {
2265  ASSERTL0(false,
2266  "This method is not defined or valid for this class type");
2267  static boost::shared_ptr<ExpList> result;
2268  return result;
2269  }
#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::DisContField3D, Nektar::MultiRegions::DisContField1D, and Nektar::MultiRegions::DisContField3DHomogeneous2D.

Definition at line 2817 of file ExpList.cpp.

References ASSERTL0.

Referenced by UpdateBndConditions().

2818  {
2819  ASSERTL0(false,
2820  "This method is not defined or valid for this class type");
2822  return result;
2823  }
#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 2271 of file ExpList.cpp.

References ASSERTL0.

Referenced by Upwind().

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
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 2281 of file ExpList.cpp.

References ASSERTL0.

2286  {
2287  ASSERTL0(false,
2288  "This method is not defined or valid for this class type");
2289  }
#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 1595 of file ExpList.cpp.

References ASSERTL0, and m_exp.

Referenced by WriteTecplotConnectivity().

1597  {
1598  int i,j,k,l;
1599  int nbase = (*m_exp)[0]->GetNumBases();
1600  int cnt = 0;
1601 
1602  boost::shared_ptr<LocalRegions::ExpansionVector> exp = m_exp;
1603 
1604  if (expansion != -1)
1605  {
1606  exp = boost::shared_ptr<LocalRegions::ExpansionVector>(
1608  (*exp)[0] = (*m_exp)[expansion];
1609  }
1610 
1611  if (nbase == 2)
1612  {
1613  for(i = 0; i < (*exp).size(); ++i)
1614  {
1615  const int np0 = (*exp)[i]->GetNumPoints(0);
1616  const int np1 = (*exp)[i]->GetNumPoints(1);
1617 
1618  for(j = 1; j < np1; ++j)
1619  {
1620  for(k = 1; k < np0; ++k)
1621  {
1622  outfile << cnt + (j-1)*np0 + k << " ";
1623  outfile << cnt + (j-1)*np0 + k+1 << " ";
1624  outfile << cnt + j *np0 + k+1 << " ";
1625  outfile << cnt + j *np0 + k << endl;
1626  }
1627  }
1628 
1629  cnt += np0*np1;
1630  }
1631  }
1632  else if (nbase == 3)
1633  {
1634  for(i = 0; i < (*exp).size(); ++i)
1635  {
1636  const int np0 = (*exp)[i]->GetNumPoints(0);
1637  const int np1 = (*exp)[i]->GetNumPoints(1);
1638  const int np2 = (*exp)[i]->GetNumPoints(2);
1639  const int np01 = np0*np1;
1640 
1641  for(j = 1; j < np2; ++j)
1642  {
1643  for(k = 1; k < np1; ++k)
1644  {
1645  for(l = 1; l < np0; ++l)
1646  {
1647  outfile << cnt + (j-1)*np01 + (k-1)*np0 + l << " ";
1648  outfile << cnt + (j-1)*np01 + (k-1)*np0 + l+1 << " ";
1649  outfile << cnt + (j-1)*np01 + k *np0 + l+1 << " ";
1650  outfile << cnt + (j-1)*np01 + k *np0 + l << " ";
1651  outfile << cnt + j *np01 + (k-1)*np0 + l << " ";
1652  outfile << cnt + j *np01 + (k-1)*np0 + l+1 << " ";
1653  outfile << cnt + j *np01 + k *np0 + l+1 << " ";
1654  outfile << cnt + j *np01 + k *np0 + l << endl;
1655  }
1656  }
1657  }
1658  cnt += np0*np1*np2;
1659  }
1660  }
1661  else
1662  {
1663  ASSERTL0(false,"Not set up for this dimension");
1664  }
1665  }
#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:977
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 1672 of file ExpList.cpp.

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

Referenced by WriteTecplotField().

1673  {
1674  if (expansion == -1)
1675  {
1676  int totpoints = GetTotPoints();
1677  if(m_physState == false)
1678  {
1680  }
1681 
1682  for(int i = 0; i < totpoints; ++i)
1683  {
1684  outfile << m_phys[i] << " ";
1685  if(i % 1000 == 0 && i)
1686  {
1687  outfile << std::endl;
1688  }
1689  }
1690  outfile << std::endl;
1691 
1692  }
1693  else
1694  {
1695  int nPoints = (*m_exp)[expansion]->GetTotPoints();
1696 
1697  for (int i = 0; i < nPoints; ++i)
1698  {
1699  outfile << m_phys[i + m_phys_offset[expansion]] << " ";
1700  }
1701 
1702  outfile << std::endl;
1703  }
1704  }
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.h:1609
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1453
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
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 1462 of file ExpList.cpp.

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

Referenced by WriteTecplotHeader().

1464  {
1465  if (GetNumElmts() == 0)
1466  {
1467  return;
1468  }
1469 
1470  int coordim = GetExp(0)->GetCoordim();
1471  char vars[3] = { 'x', 'y', 'z' };
1472 
1473  if (m_expType == e3DH1D)
1474  {
1475  coordim += 1;
1476  }
1477  else if (m_expType == e3DH2D)
1478  {
1479  coordim += 2;
1480  }
1481 
1482  outfile << "Variables = x";
1483  for (int i = 1; i < coordim; ++i)
1484  {
1485  outfile << ", " << vars[i];
1486  }
1487 
1488  if (var.size() > 0)
1489  {
1490  outfile << ", " << var;
1491  }
1492 
1493  outfile << std::endl << std::endl;
1494  }
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:1917
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Definition: ExpList.h:572
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 1501 of file ExpList.cpp.

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

Referenced by WriteTecplotZone().

1502  {
1503  int i, j;
1504  int coordim = GetCoordim(0);
1505  int nPoints = GetTotPoints();
1506  int nBases = (*m_exp)[0]->GetNumBases();
1507  int numBlocks = 0;
1508 
1510 
1511  if (expansion == -1)
1512  {
1513  nPoints = GetTotPoints();
1514 
1515  coords[0] = Array<OneD, NekDouble>(nPoints);
1516  coords[1] = Array<OneD, NekDouble>(nPoints);
1517  coords[2] = Array<OneD, NekDouble>(nPoints);
1518 
1519  GetCoords(coords[0], coords[1], coords[2]);
1520 
1521  for (i = 0; i < m_exp->size(); ++i)
1522  {
1523  int numInt = 1;
1524 
1525  for (j = 0; j < nBases; ++j)
1526  {
1527  numInt *= (*m_exp)[i]->GetNumPoints(j)-1;
1528  }
1529 
1530  numBlocks += numInt;
1531  }
1532  }
1533  else
1534  {
1535  nPoints = (*m_exp)[expansion]->GetTotPoints();
1536 
1537  coords[0] = Array<OneD, NekDouble>(nPoints);
1538  coords[1] = Array<OneD, NekDouble>(nPoints);
1539  coords[2] = Array<OneD, NekDouble>(nPoints);
1540 
1541  (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
1542 
1543  numBlocks = 1;
1544  for (j = 0; j < nBases; ++j)
1545  {
1546  numBlocks *= (*m_exp)[expansion]->GetNumPoints(j)-1;
1547  }
1548  }
1549 
1550  if (m_expType == e3DH1D)
1551  {
1552  nBases += 1;
1553  coordim += 1;
1554  int nPlanes = GetZIDs().num_elements();
1555  NekDouble tmp = numBlocks * (nPlanes-1.0) / nPlanes;
1556  numBlocks = (int)tmp;
1557  }
1558  else if (m_expType == e3DH2D)
1559  {
1560  nBases += 2;
1561  coordim += 1;
1562  }
1563 
1564  outfile << "Zone, N=" << nPoints << ", E="
1565  << numBlocks << ", F=FEBlock" ;
1566 
1567  switch(nBases)
1568  {
1569  case 2:
1570  outfile << ", ET=QUADRILATERAL" << std::endl;
1571  break;
1572  case 3:
1573  outfile << ", ET=BRICK" << std::endl;
1574  break;
1575  default:
1576  ASSERTL0(false,"Not set up for this type of output");
1577  break;
1578  }
1579 
1580  // Write out coordinates
1581  for (j = 0; j < coordim; ++j)
1582  {
1583  for (i = 0; i < nPoints; ++i)
1584  {
1585  outfile << coords[j][i] << " ";
1586  if (i % 1000 == 0 && i)
1587  {
1588  outfile << std::endl;
1589  }
1590  }
1591  outfile << std::endl;
1592  }
1593  }
#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:513
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:1684
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1453
double NekDouble
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1794
void Nektar::MultiRegions::ExpList::v_WriteVtkPieceData ( std::ostream &  outfile,
int  expansion,
std::string  var 
)
protectedvirtual

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

Definition at line 1731 of file ExpList.cpp.

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

Referenced by WriteVtkPieceData().

1733  {
1734  int i;
1735  int nq = (*m_exp)[expansion]->GetTotPoints();
1736 
1737  // printing the fields of that zone
1738  outfile << " <DataArray type=\"Float64\" Name=\""
1739  << var << "\">" << endl;
1740  outfile << " ";
1741  const Array<OneD, NekDouble> phys = m_phys + m_phys_offset[expansion];
1742  for(i = 0; i < nq; ++i)
1743  {
1744  outfile << (fabs(phys[i]) < NekConstants::kNekZeroTol ? 0 : phys[i]) << " ";
1745  }
1746  outfile << endl;
1747  outfile << " </DataArray>" << endl;
1748  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
static const NekDouble kNekZeroTol
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
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 395 of file ExpList.h.

References v_WriteTecplotConnectivity().

397  {
398  v_WriteTecplotConnectivity(outfile, expansion);
399  }
virtual void v_WriteTecplotConnectivity(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:1595
void Nektar::MultiRegions::ExpList::WriteTecplotField ( std::ostream &  outfile,
int  expansion = -1 
)
inline

Definition at line 389 of file ExpList.h.

References v_WriteTecplotField().

391  {
392  v_WriteTecplotField(outfile, expansion);
393  }
virtual void v_WriteTecplotField(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:1672
void Nektar::MultiRegions::ExpList::WriteTecplotHeader ( std::ostream &  outfile,
std::string  var = "" 
)
inline

Definition at line 376 of file ExpList.h.

References v_WriteTecplotHeader().

378  {
379  v_WriteTecplotHeader(outfile, var);
380  }
virtual void v_WriteTecplotHeader(std::ostream &outfile, std::string var="")
Definition: ExpList.cpp:1462
void Nektar::MultiRegions::ExpList::WriteTecplotZone ( std::ostream &  outfile,
int  expansion = -1 
)
inline

Definition at line 382 of file ExpList.h.

References v_WriteTecplotZone().

385  {
386  v_WriteTecplotZone(outfile, expansion);
387  }
virtual void v_WriteTecplotZone(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:1501
void Nektar::MultiRegions::ExpList::WriteVtkFooter ( std::ostream &  outfile)

Definition at line 1714 of file ExpList.cpp.

1715  {
1716  outfile << " </UnstructuredGrid>" << endl;
1717  outfile << "</VTKFile>" << endl;
1718  }
void Nektar::MultiRegions::ExpList::WriteVtkHeader ( std::ostream &  outfile)

Definition at line 1706 of file ExpList.cpp.

1707  {
1708  outfile << "<?xml version=\"1.0\"?>" << endl;
1709  outfile << "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" "
1710  << "byte_order=\"LittleEndian\">" << endl;
1711  outfile << " <UnstructuredGrid>" << endl;
1712  }
void Nektar::MultiRegions::ExpList::WriteVtkPieceData ( std::ostream &  outfile,
int  expansion,
std::string  var = "v" 
)
inline

Definition at line 414 of file ExpList.h.

References v_WriteVtkPieceData().

418  {
419  v_WriteVtkPieceData(outfile, expansion, var);
420  }
virtual void v_WriteVtkPieceData(std::ostream &outfile, int expansion, std::string var)
Definition: ExpList.cpp:1731
void Nektar::MultiRegions::ExpList::WriteVtkPieceFooter ( std::ostream &  outfile,
int  expansion 
)

Definition at line 1725 of file ExpList.cpp.

1726  {
1727  outfile << " </PointData>" << endl;
1728  outfile << " </Piece>" << endl;
1729  }
void Nektar::MultiRegions::ExpList::WriteVtkPieceHeader ( std::ostream &  outfile,
int  expansion,
int  istrip = 0 
)
inline

Definition at line 404 of file ExpList.h.

References v_WriteVtkPieceHeader().

406  {
407  v_WriteVtkPieceHeader(outfile, expansion, istrip);
408  }
virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip)
Definition: ExpList.cpp:1720

Member Data Documentation

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

Definition at line 1003 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 939 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::ExpList2DHomogeneous1D::SetCoeffPhys(), Nektar::MultiRegions::ExpList3DHomogeneous2D::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 982 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 985 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 977 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(), ExpList(), 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 893 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 917 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::ExpList2DHomogeneous1D::SetCoeffPhys(), Nektar::MultiRegions::ExpList3DHomogeneous2D::SetCoeffPhys(), Nektar::MultiRegions::ExpList3DHomogeneous1D::SetCoeffPhys(), Nektar::MultiRegions::ExpList0D::SetCoeffPhysOffsets(), Nektar::MultiRegions::ExpList2D::SetCoeffPhysOffsets(), Nektar::MultiRegions::ExpList1D::SetCoeffPhysOffsets(), Nektar::MultiRegions::ContField3D::v_BwdTrans(), 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 910 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