Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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, const bool PhysSpaceForcing=true)
 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 DealiasedDotProd (const Array< OneD, Array< OneD, NekDouble > > &inarray1, const Array< OneD, Array< OneD, NekDouble > > &inarray2, Array< OneD, 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 FillBndCondFromField (const int nreg)
 Fill Bnd Condition expansion in nreg from the values stored in expansion. More...
 
void LocalToGlobal (bool useComm=true)
 Gathers the global coefficients $\boldsymbol{\hat{u}}_g$ from the local coefficients $\boldsymbol{\hat{u}}_l$. More...
 
void LocalToGlobal (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool useComm=true)
 
void GlobalToLocal (void)
 Scatters from the global coefficients $\boldsymbol{\hat{u}}_g$ to the local coefficients $\boldsymbol{\hat{u}}_l$. More...
 
void GlobalToLocal (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
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)
 
void CurlCurl (Array< OneD, Array< OneD, NekDouble > > &Vel, Array< OneD, Array< OneD, NekDouble > > &Q)
 
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 std::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, const bool DeclareCoeffPhysArrays=true)
 
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 ExtractPhysToBnd (int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bnd)
 
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)
 
std::map< int,
RobinBCInfoSharedPtr
GetRobinBCInfo ()
 
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 () const
 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 std::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, const bool PhysSpaceForcing)
 
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_FillBndCondFromField (const int nreg)
 
virtual void v_Reset ()
 Reset geometry information, metrics, matrix managers and geometry information. More...
 
virtual void v_LocalToGlobal (bool UseComm)
 
virtual void v_LocalToGlobal (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool UseComm)
 
virtual void v_GlobalToLocal (void)
 
virtual void v_GlobalToLocal (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
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_CurlCurl (Array< OneD, Array< OneD, NekDouble > > &Vel, Array< OneD, Array< OneD, NekDouble > > &Q)
 
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_DealiasedDotProd (const Array< OneD, Array< OneD, NekDouble > > &inarray1, const Array< OneD, Array< OneD, NekDouble > > &inarray2, Array< OneD, 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, const bool DeclareCoeffPhysArrays)
 
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_ExtractPhysToBnd (int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bnd)
 
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, LibUtilities::CommSharedPtr comm, 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
 
boost::unordered_map< int, int > m_elmtToExpId
 Mapping from geometry ID of element to index inside m_exp. More...
 

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 std::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 95 of file ExpList.cpp.

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

95  :
96  m_comm(),
97  m_session(),
98  m_graph(),
99  m_ncoeffs(0),
100  m_npoints(0),
101  m_coeffs(),
102  m_phys(),
103  m_physState(false),
104  m_exp(MemoryManager<LocalRegions::ExpansionVector>
105  ::AllocateSharedPtr()),
106  m_coeff_offset(),
107  m_phys_offset(),
109  m_blockMat(MemoryManager<BlockMatrixMap>::AllocateSharedPtr()),
110  m_WaveSpace(false)
111  {
113  }
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1062
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:976
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:1058
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:972
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:969
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:966
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:253
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 121 of file ExpList.cpp.

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

122  :
123  m_comm(pSession->GetComm()),
124  m_session(pSession),
125  m_graph(),
126  m_ncoeffs(0),
127  m_npoints(0),
128  m_coeffs(),
129  m_phys(),
130  m_physState(false),
131  m_exp(MemoryManager<LocalRegions::ExpansionVector>
132  ::AllocateSharedPtr()),
133  m_coeff_offset(),
134  m_phys_offset(),
136  m_blockMat(MemoryManager<BlockMatrixMap>::AllocateSharedPtr()),
137  m_WaveSpace(false)
138  {
140  }
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1062
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:976
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:1058
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:972
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:969
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:966
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:253
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 148 of file ExpList.cpp.

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

150  :
151  m_comm(pSession->GetComm()),
152  m_session(pSession),
153  m_graph(pGraph),
154  m_ncoeffs(0),
155  m_npoints(0),
156  m_coeffs(),
157  m_phys(),
158  m_physState(false),
159  m_exp(MemoryManager<LocalRegions::ExpansionVector>
160  ::AllocateSharedPtr()),
161  m_coeff_offset(),
162  m_phys_offset(),
164  m_blockMat(MemoryManager<BlockMatrixMap>::AllocateSharedPtr()),
165  m_WaveSpace(false)
166  {
168  }
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1062
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:976
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:1058
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:972
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:969
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:966
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:253
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 175 of file ExpList.cpp.

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

177  :
178  m_comm(in.m_comm),
179  m_session(in.m_session),
180  m_graph(in.m_graph),
181  m_ncoeffs(0),
182  m_npoints(0),
183  m_coeffs(),
184  m_phys(),
185  m_physState(false),
186  m_exp(MemoryManager<LocalRegions::ExpansionVector>
187  ::AllocateSharedPtr()),
188  m_coeff_offset(),
189  m_phys_offset(),
191  m_blockMat(MemoryManager<BlockMatrixMap>::AllocateSharedPtr()),
192  m_WaveSpace(false)
193  {
195 
196  for (int i=0; i < eIDs.size(); ++i)
197  {
198  (*m_exp).push_back( (*(in.m_exp))[eIDs[i]]);
199  m_ncoeffs += (*m_exp)[i]->GetNcoeffs();
200  m_npoints += (*m_exp)[i]->GetTotPoints();
201  }
202 
203  if(DeclareCoeffPhysArrays)
204  {
205  m_coeffs = Array<OneD, NekDouble>(m_ncoeffs, 0.0);
206  m_phys = Array<OneD, NekDouble>(m_npoints, 0.0);
207  }
208  }
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1062
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:976
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:1058
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:972
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:969
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:966
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:253
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 215 of file ExpList.cpp.

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

215  :
216  m_comm(in.m_comm),
217  m_session(in.m_session),
218  m_graph(in.m_graph),
219  m_ncoeffs(in.m_ncoeffs),
220  m_npoints(in.m_npoints),
221  m_physState(false),
222  m_exp(in.m_exp),
223  m_collections(in.m_collections),
224  m_coll_coeff_offset(in.m_coll_coeff_offset),
225  m_coll_phys_offset(in.m_coll_phys_offset),
226  m_coeff_offset(in.m_coeff_offset),
227  m_phys_offset(in.m_phys_offset),
228  m_offset_elmt_id(in.m_offset_elmt_id),
229  m_globalOptParam(in.m_globalOptParam),
230  m_blockMat(in.m_blockMat),
231  m_WaveSpace(false)
232  {
234 
235  if(DeclareCoeffPhysArrays)
236  {
237  m_coeffs = Array<OneD, NekDouble>(m_ncoeffs, 0.0);
238  m_phys = Array<OneD, NekDouble>(m_npoints, 0.0);
239  }
240  }
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:1060
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1062
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:976
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:1058
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:972
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:969
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:966
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1044
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:253
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1041
Collections::CollectionVector m_collections
Definition: ExpList.h:1038
Nektar::MultiRegions::ExpList::~ExpList ( )
virtual

The default destructor.

Definition at line 258 of file ExpList.cpp.

259  {
260  }

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

References v_AddFwdBwdTraceIntegral().

2199  {
2200  v_AddFwdBwdTraceIntegral(Fwd,Bwd,outarray);
2201  }
virtual void v_AddFwdBwdTraceIntegral(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2436
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 2180 of file ExpList.h.

References v_AddTraceIntegral().

2184  {
2185  v_AddTraceIntegral(Fx,Fy,outarray);
2186  }
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2419
void Nektar::MultiRegions::ExpList::AddTraceIntegral ( const Array< OneD, const NekDouble > &  Fn,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 2188 of file ExpList.h.

References v_AddTraceIntegral().

2191  {
2192  v_AddTraceIntegral(Fn,outarray);
2193  }
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2419
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 868 of file ExpList.h.

References v_AppendFieldData().

871  {
872  v_AppendFieldData(fielddef,fielddata);
873  }
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:2188
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 878 of file ExpList.h.

References v_AppendFieldData().

882  {
883  v_AppendFieldData(fielddef,fielddata,coeffs);
884  }
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:2188
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 1500 of file ExpList.cpp.

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

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

Definition at line 1699 of file ExpList.h.

References v_BwdTrans().

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

1703  {
1704  v_BwdTrans(inarray,outarray,coeffstate);
1705  }
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2684
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 1710 of file ExpList.h.

References v_BwdTrans_IterPerExp().

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

1713  {
1714  v_BwdTrans_IterPerExp(inarray,outarray);
1715  }
virtual void v_BwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1307
void Nektar::MultiRegions::ExpList::ClearGlobalLinSysManager ( void  )

Definition at line 3268 of file ExpList.cpp.

References v_ClearGlobalLinSysManager().

3269  {
3271  }
virtual void v_ClearGlobalLinSysManager(void)
Definition: ExpList.cpp:1981
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 3129 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().

3130  {
3132  vector<std::pair<LocalRegions::ExpansionSharedPtr,int> > > collections;
3134  vector<std::pair<LocalRegions::ExpansionSharedPtr,int> > >::iterator it;
3135 
3136  // Figure out optimisation parameters if provided in
3137  // session file or default given
3138  Collections::CollectionOptimisation colOpt(m_session, ImpType);
3139  ImpType = colOpt.GetDefaultImplementationType();
3140 
3141  bool autotuning = colOpt.IsUsingAutotuning();
3142  bool verbose = (m_session->DefinesCmdLineArgument("verbose")) &&
3143  (m_comm->GetRank() == 0);
3144  int collmax = (colOpt.GetMaxCollectionSize() > 0
3145  ? colOpt.GetMaxCollectionSize()
3146  : 2*m_exp->size());
3147 
3148  // clear vectors in case previously called
3149  m_collections.clear();
3150  m_coll_coeff_offset.clear();
3151  m_coll_phys_offset.clear();
3152 
3153  // Loop over expansions, and create collections for each element type
3154  for (int i = 0; i < m_exp->size(); ++i)
3155  {
3156  collections[(*m_exp)[i]->DetShapeType()].push_back(
3157  std::pair<LocalRegions::ExpansionSharedPtr,int> ((*m_exp)[i],i));
3158  }
3159 
3160  for (it = collections.begin(); it != collections.end(); ++it)
3161  {
3162  LocalRegions::ExpansionSharedPtr exp = it->second[0].first;
3163 
3164  Collections::OperatorImpMap impTypes = colOpt.GetOperatorImpMap(exp);
3165  vector<StdRegions::StdExpansionSharedPtr> collExp;
3166 
3167  int prevCoeffOffset = m_coeff_offset[it->second[0].second];
3168  int prevPhysOffset = m_phys_offset [it->second[0].second];
3169  int collcnt;
3170 
3171  m_coll_coeff_offset.push_back(prevCoeffOffset);
3172  m_coll_phys_offset .push_back(prevPhysOffset);
3173 
3174  if(it->second.size() == 1) // single element case
3175  {
3176  collExp.push_back(it->second[0].first);
3177 
3178  // if no Imp Type provided and No settign in xml file.
3179  // reset impTypes using timings
3180  if(autotuning)
3181  {
3182  impTypes = colOpt.SetWithTimings(collExp,
3183  impTypes, verbose);
3184  }
3185 
3186  Collections::Collection tmp(collExp, impTypes);
3187  m_collections.push_back(tmp);
3188  }
3189  else
3190  {
3191  // set up first geometry
3192  collExp.push_back(it->second[0].first);
3193  int prevnCoeff = it->second[0].first->GetNcoeffs();
3194  int prevnPhys = it->second[0].first->GetTotPoints();
3195  collcnt = 1;
3196 
3197  for (int i = 1; i < it->second.size(); ++i)
3198  {
3199  int nCoeffs = it->second[i].first->GetNcoeffs();
3200  int nPhys = it->second[i].first->GetTotPoints();
3201  int coeffOffset = m_coeff_offset[it->second[i].second];
3202  int physOffset = m_phys_offset [it->second[i].second];
3203 
3204  // check to see if next elmt is different or
3205  // collmax reached and if so end collection
3206  // and start new one
3207  if(prevCoeffOffset + nCoeffs != coeffOffset ||
3208  prevnCoeff != nCoeffs ||
3209  prevPhysOffset + nPhys != physOffset ||
3210  prevnPhys != nPhys || collcnt >= collmax)
3211  {
3212 
3213  // if no Imp Type provided and No
3214  // settign in xml file. reset
3215  // impTypes using timings
3216  if(autotuning)
3217  {
3218  impTypes = colOpt.SetWithTimings(collExp,
3219  impTypes,
3220  verbose);
3221  }
3222 
3223  Collections::Collection tmp(collExp, impTypes);
3224  m_collections.push_back(tmp);
3225 
3226 
3227  // start new geom list
3228  collExp.clear();
3229 
3230  m_coll_coeff_offset.push_back(coeffOffset);
3231  m_coll_phys_offset .push_back(physOffset);
3232  collExp.push_back(it->second[i].first);
3233  collcnt = 1;
3234  }
3235  else // add to list of collections
3236  {
3237  collExp.push_back(it->second[i].first);
3238  collcnt++;
3239  }
3240 
3241  // if end of list finish up collection
3242  if (i == it->second.size() - 1)
3243  {
3244  // if no Imp Type provided and No
3245  // settign in xml file.
3246  if(autotuning)
3247  {
3248  impTypes = colOpt.SetWithTimings(collExp,
3249  impTypes,verbose);
3250  }
3251 
3252  Collections::Collection tmp(collExp, impTypes);
3253  m_collections.push_back(tmp);
3254  collExp.clear();
3255  collcnt = 0;
3256 
3257  }
3258 
3259  prevCoeffOffset = coeffOffset;
3260  prevPhysOffset = physOffset;
3261  prevnCoeff = nCoeffs;
3262  prevnPhys = nPhys;
3263  }
3264  }
3265  }
3266  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:969
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:966
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1044
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1041
Collections::CollectionVector m_collections
Definition: ExpList.h:1038
void Nektar::MultiRegions::ExpList::CurlCurl ( Array< OneD, Array< OneD, NekDouble > > &  Vel,
Array< OneD, Array< OneD, NekDouble > > &  Q 
)
inline

Definition at line 1815 of file ExpList.h.

References v_CurlCurl().

1818  {
1819  v_CurlCurl(Vel, Q);
1820  }
virtual void v_CurlCurl(Array< OneD, Array< OneD, NekDouble > > &Vel, Array< OneD, Array< OneD, NekDouble > > &Q)
Definition: ExpList.cpp:562
void Nektar::MultiRegions::ExpList::DealiasedDotProd ( const Array< OneD, Array< OneD, NekDouble > > &  inarray1,
const Array< OneD, Array< OneD, NekDouble > > &  inarray2,
Array< OneD, Array< OneD, NekDouble > > &  outarray,
CoeffState  coeffstate = eLocal 
)
inline

Definition at line 1863 of file ExpList.h.

References v_DealiasedDotProd().

1868  {
1869  v_DealiasedDotProd(inarray1,inarray2,outarray,coeffstate);
1870  }
virtual void v_DealiasedDotProd(const Array< OneD, Array< OneD, NekDouble > > &inarray1, const Array< OneD, Array< OneD, NekDouble > > &inarray2, Array< OneD, Array< OneD, NekDouble > > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.cpp:2558
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 1851 of file ExpList.h.

References v_DealiasedProd().

Referenced by Nektar::MultiRegions::ExpListHomogeneous2D::v_DealiasedDotProd().

1856  {
1857  v_DealiasedProd(inarray1,inarray2,outarray,coeffstate);
1858  }
virtual void v_DealiasedProd(const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.cpp:2549
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 1507 of file ExpList.h.

References m_exp.

1508  {
1509  unsigned int i;
1510  int returnval = 0;
1511 
1512  for(i= 0; i < (*m_exp).size(); ++i)
1513  {
1514  returnval = (std::max)(returnval,
1515  (*m_exp)[i]->EvalBasisNumModesMax());
1516  }
1517 
1518  return returnval;
1519  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
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 1524 of file ExpList.h.

References m_exp.

1526  {
1527  unsigned int i;
1528  Array<OneD,int> returnval((*m_exp).size(),0);
1529 
1530  for(i= 0; i < (*m_exp).size(); ++i)
1531  {
1532  returnval[i]
1533  = (std::max)(returnval[i],(*m_exp)[i]->EvalBasisNumModesMax());
1534  }
1535 
1536  return returnval;
1537  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
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 2249 of file ExpList.h.

References v_EvaluateBoundaryConditions().

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

2254  {
2255  v_EvaluateBoundaryConditions(time, varName, x2_in, x3_in);
2256  }
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:3006
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 2225 of file ExpList.cpp.

References v_ExtractCoeffsToCoeffs().

2226  {
2227  v_ExtractCoeffsToCoeffs(fromExpList,fromCoeffs,toCoeffs);
2228  }
virtual void v_ExtractCoeffsToCoeffs(const boost::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
Definition: ExpList.cpp:2329
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 2216 of file ExpList.cpp.

References v_ExtractDataToCoeffs().

2221  {
2222  v_ExtractDataToCoeffs(fielddef,fielddata,field,coeffs);
2223  }
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:2238
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 2315 of file ExpList.h.

References v_ExtractElmtToBndPhys().

2318  {
2319  v_ExtractElmtToBndPhys(i, elmt, boundary);
2320  }
virtual void v_ExtractElmtToBndPhys(int i, Array< OneD, NekDouble > &elmt, Array< OneD, NekDouble > &boundary)
Definition: ExpList.cpp:2804
void Nektar::MultiRegions::ExpList::ExtractFileBCs ( const std::string &  fileName,
LibUtilities::CommSharedPtr  comm,
const std::string &  varName,
const boost::shared_ptr< ExpList locExpList 
)
protected

Definition at line 1987 of file ExpList.cpp.

References ASSERTL0, Nektar::LibUtilities::NekFactory< tKey, tBase, >::CreateInstance(), Nektar::LibUtilities::GetFieldIOFactory(), Nektar::LibUtilities::FieldIO::GetFileType(), and m_session.

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

1992  {
1993  string varString = fileName.substr(0, fileName.find_last_of("."));
1994  int j, k, len = varString.length();
1995  varString = varString.substr(len-1, len);
1996 
1997  std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
1998  std::vector<std::vector<NekDouble> > FieldData;
1999 
2000  std::string ft = LibUtilities::FieldIO::GetFileType(fileName, comm);
2002  .CreateInstance(ft, comm, m_session->GetSharedFilesystem());
2003 
2004  f->Import(fileName, FieldDef, FieldData);
2005 
2006  bool found = false;
2007  for (j = 0; j < FieldDef.size(); ++j)
2008  {
2009  for (k = 0; k < FieldDef[j]->m_fields.size(); ++k)
2010  {
2011  if (FieldDef[j]->m_fields[k] == varName)
2012  {
2013  // Copy FieldData into locExpList
2014  locExpList->ExtractDataToCoeffs(
2015  FieldDef[j], FieldData[j],
2016  FieldDef[j]->m_fields[k],
2017  locExpList->UpdateCoeffs());
2018  found = true;
2019  }
2020  }
2021  }
2022 
2023  ASSERTL0(found, "Could not find variable '"+varName+
2024  "' in file boundary condition "+fileName);
2025  locExpList->BwdTrans_IterPerExp(
2026  locExpList->GetCoeffs(),
2027  locExpList->UpdatePhys());
2028  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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
FieldIOFactory & GetFieldIOFactory()
Returns the FieldIO factory.
Definition: FieldIO.cpp:74
static const std::string GetFileType(const std::string &filename, CommSharedPtr comm)
Determine file type of given input file.
Definition: FieldIO.cpp:101
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:969
boost::shared_ptr< FieldIO > FieldIOSharedPtr
Definition: FieldIO.h:309
void Nektar::MultiRegions::ExpList::ExtractPhysToBnd ( int  i,
const Array< OneD, const NekDouble > &  phys,
Array< OneD, NekDouble > &  bnd 
)
inline

Definition at line 2329 of file ExpList.h.

References v_ExtractPhysToBnd().

2332  {
2333  v_ExtractPhysToBnd(i, phys, bnd);
2334  }
virtual void v_ExtractPhysToBnd(int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bnd)
Definition: ExpList.cpp:2884
void Nektar::MultiRegions::ExpList::ExtractPhysToBndElmt ( int  i,
const Array< OneD, const NekDouble > &  phys,
Array< OneD, NekDouble > &  bndElmt 
)
inline

Definition at line 2322 of file ExpList.h.

References v_ExtractPhysToBndElmt().

2325  {
2326  v_ExtractPhysToBndElmt(i, phys, bndElmt);
2327  }
virtual void v_ExtractPhysToBndElmt(int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bndElmt)
Definition: ExpList.cpp:2843
void Nektar::MultiRegions::ExpList::ExtractTracePhys ( Array< OneD, NekDouble > &  outarray)
inline

Definition at line 2223 of file ExpList.h.

References v_ExtractTracePhys().

2224  {
2225  v_ExtractTracePhys(outarray);
2226  }
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2470
void Nektar::MultiRegions::ExpList::ExtractTracePhys ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 2229 of file ExpList.h.

References v_ExtractTracePhys().

2232  {
2233  v_ExtractTracePhys(inarray,outarray);
2234  }
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2470
void Nektar::MultiRegions::ExpList::FillBndCondFromField ( void  )
inline

Fill Bnd Condition expansion from the values stored in expansion.

Definition at line 1957 of file ExpList.h.

References v_FillBndCondFromField().

1958  {
1960  }
virtual void v_FillBndCondFromField()
Definition: ExpList.cpp:2639
void Nektar::MultiRegions::ExpList::FillBndCondFromField ( const int  nreg)
inline

Fill Bnd Condition expansion in nreg from the values stored in expansion.

Definition at line 1962 of file ExpList.h.

References v_FillBndCondFromField().

1963  {
1964  v_FillBndCondFromField(nreg);
1965  }
virtual void v_FillBndCondFromField()
Definition: ExpList.cpp:2639
void Nektar::MultiRegions::ExpList::FwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
inline

Definition at line 1670 of file ExpList.h.

References v_FwdTrans().

1674  {
1675  v_FwdTrans(inarray,outarray,coeffstate);
1676  }
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2691
void Nektar::MultiRegions::ExpList::FwdTrans_BndConstrained ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

Definition at line 690 of file ExpList.cpp.

References m_coeff_offset, and m_phys_offset.

693  {
694  int i;
695 
696  Array<OneD,NekDouble> e_outarray;
697 
698  for(i= 0; i < (*m_exp).size(); ++i)
699  {
700  (*m_exp)[i]->FwdTrans_BndConstrained(inarray+m_phys_offset[i],
701  e_outarray = outarray+m_coeff_offset[i]);
702  }
703  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
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 1681 of file ExpList.h.

References v_FwdTrans_IterPerExp().

1684  {
1685  v_FwdTrans_IterPerExp(inarray,outarray);
1686  }
virtual void v_FwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:680
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 754 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().

756  {
757  int i,cnt1;
758  int n_exp = 0;
759  DNekScalMatSharedPtr loc_mat;
760  DNekScalBlkMatSharedPtr BlkMatrix;
761  map<int,int> elmt_id;
762  LibUtilities::ShapeType ShapeType = gkey.GetShapeType();
763 
764  if(ShapeType != LibUtilities::eNoShapeType)
765  {
766  for(i = 0 ; i < (*m_exp).size(); ++i)
767  {
768  if((*m_exp)[m_offset_elmt_id[i]]->DetShapeType()
769  == ShapeType)
770  {
771  elmt_id[n_exp++] = m_offset_elmt_id[i];
772  }
773  }
774  }
775  else
776  {
777  n_exp = (*m_exp).size();
778  for(i = 0; i < n_exp; ++i)
779  {
780  elmt_id[i] = m_offset_elmt_id[i];
781  }
782  }
783 
784  Array<OneD,unsigned int> nrows(n_exp);
785  Array<OneD,unsigned int> ncols(n_exp);
786 
787  switch(gkey.GetMatrixType())
788  {
790  {
791  // set up an array of integers for block matrix construction
792  for(i = 0; i < n_exp; ++i)
793  {
794  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
795  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
796  }
797  }
798  break;
800  {
801  // set up an array of integers for block matrix construction
802  for(i = 0; i < n_exp; ++i)
803  {
804  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
805  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
806  }
807  }
808  break;
809  case StdRegions::eMass:
814  {
815  // set up an array of integers for block matrix construction
816  for(i = 0; i < n_exp; ++i)
817  {
818  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
819  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
820  }
821  }
822  break;
823 
825  {
826  // set up an array of integers for block matrix construction
827  for(i = 0; i < n_exp; ++i)
828  {
829  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
830  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
831  }
832  }
833  break;
834 
836  {
837  // set up an array of integers for block matrix construction
838  for(i = 0; i < n_exp; ++i)
839  {
840  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
841  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
842  }
843  }
844  break;
845 
846  default:
847  {
849  "Global Matrix creation not defined for this type "
850  "of matrix");
851  }
852  }
853 
854  MatrixStorage blkmatStorage = eDIAGONAL;
856  ::AllocateSharedPtr(nrows,ncols,blkmatStorage);
857 
858  int nvarcoeffs = gkey.GetNVarCoeffs();
859  int eid;
860  Array<OneD, NekDouble> varcoeffs_wk;
861 
862  for(i = cnt1 = 0; i < n_exp; ++i)
863  {
864  // need to be initialised with zero size for non variable coefficient case
865  StdRegions::VarCoeffMap varcoeffs;
866 
867  eid = elmt_id[i];
868  if(nvarcoeffs>0)
869  {
870  StdRegions::VarCoeffMap::const_iterator x;
871  for (x = gkey.GetVarCoeffs().begin(); x != gkey.GetVarCoeffs().end(); ++x)
872  {
873  varcoeffs[x->first] = x->second + m_phys_offset[eid];
874  }
875  }
876 
877  LocalRegions::MatrixKey matkey(gkey.GetMatrixType(),
878  (*m_exp)[eid]->DetShapeType(),
879  *(*m_exp)[eid],
880  gkey.GetConstFactors(),
881  varcoeffs );
882 
883  loc_mat = boost::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[elmt_id.find(i)->second])->GetLocMatrix(matkey);
884  BlkMatrix->SetBlock(i,i,loc_mat);
885  }
886 
887  return BlkMatrix;
888  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:191
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:1036
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:227
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
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:1058
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 2066 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().

2074  {
2075  int startenum = (int) LibUtilities::eSegment;
2076  int endenum = (int) LibUtilities::eHexahedron;
2077  int s = 0;
2079 
2080  ASSERTL1(NumHomoDir == HomoBasis.num_elements(),"Homogeneous basis is not the same length as NumHomoDir");
2081  ASSERTL1(NumHomoDir == HomoLen.size(),"Homogeneous length vector is not the same length as NumHomDir");
2082 
2083  // count number of shapes
2084  switch((*m_exp)[0]->GetShapeDimension())
2085  {
2086  case 1:
2087  startenum = (int) LibUtilities::eSegment;
2088  endenum = (int) LibUtilities::eSegment;
2089  break;
2090  case 2:
2091  startenum = (int) LibUtilities::eTriangle;
2092  endenum = (int) LibUtilities::eQuadrilateral;
2093  break;
2094  case 3:
2095  startenum = (int) LibUtilities::eTetrahedron;
2096  endenum = (int) LibUtilities::eHexahedron;
2097  break;
2098  }
2099 
2100  for(s = startenum; s <= endenum; ++s)
2101  {
2102  std::vector<unsigned int> elementIDs;
2103  std::vector<LibUtilities::BasisType> basis;
2104  std::vector<unsigned int> numModes;
2105  std::vector<std::string> fields;
2106 
2107  bool first = true;
2108  bool UniOrder = true;
2109  int n;
2110 
2111  shape = (LibUtilities::ShapeType) s;
2112 
2113  for(int i = 0; i < (*m_exp).size(); ++i)
2114  {
2115  if((*m_exp)[i]->GetGeom()->GetShapeType() == shape)
2116  {
2117  elementIDs.push_back((*m_exp)[i]->GetGeom()->GetGlobalID());
2118  if(first)
2119  {
2120  for(int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2121  {
2122  basis.push_back((*m_exp)[i]->GetBasis(j)->GetBasisType());
2123  numModes.push_back((*m_exp)[i]->GetBasis(j)->GetNumModes());
2124  }
2125 
2126  // add homogeneous direction details if defined
2127  for(n = 0 ; n < NumHomoDir; ++n)
2128  {
2129  basis.push_back(HomoBasis[n]->GetBasisType());
2130  numModes.push_back(HomoBasis[n]->GetNumModes());
2131  }
2132 
2133  first = false;
2134  }
2135  else
2136  {
2137  ASSERTL0((*m_exp)[i]->GetBasis(0)->GetBasisType() == basis[0],"Routine is not set up for multiple bases definitions");
2138 
2139  for(int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2140  {
2141  numModes.push_back((*m_exp)[i]->GetBasis(j)->GetNumModes());
2142  if(numModes[j] != (*m_exp)[i]->GetBasis(j)->GetNumModes())
2143  {
2144  UniOrder = false;
2145  }
2146  }
2147  // add homogeneous direction details if defined
2148  for(n = 0 ; n < NumHomoDir; ++n)
2149  {
2150  numModes.push_back(HomoBasis[n]->GetNumModes());
2151  }
2152  }
2153  }
2154  }
2155 
2156 
2157  if(elementIDs.size() > 0)
2158  {
2161  AllocateSharedPtr(shape, elementIDs, basis,
2162  UniOrder, numModes,fields,
2163  NumHomoDir, HomoLen, homoStrips,
2164  HomoSIDs, HomoZIDs, HomoYIDs);
2165  fielddef.push_back(fdef);
2166  }
2167  }
2168  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
boost::shared_ptr< FieldDefinitions > FieldDefinitionsSharedPtr
Definition: FieldIO.h:181
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 2287 of file ExpList.h.

References v_GeneralMatrixOp().

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

2292  {
2293  v_GeneralMatrixOp(gkey,inarray,outarray,coeffstate);
2294  }
virtual void v_GeneralMatrixOp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2713
void Nektar::MultiRegions::ExpList::GeneralMatrixOp_IterPerExp ( const GlobalMatrixKey gkey,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

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

909  {
910  const Array<OneD, const bool> doBlockMatOp
911  = m_globalOptParam->DoBlockMatOp(gkey.GetMatrixType());
912  const Array<OneD, const int> num_elmts
913  = m_globalOptParam->GetShapeNumElements();
914 
915  Array<OneD,NekDouble> tmp_outarray;
916  int cnt = 0;
917  int eid;
918  for(int n = 0; n < num_elmts.num_elements(); ++n)
919  {
920  if(doBlockMatOp[n])
921  {
922  const LibUtilities::ShapeType vType
923  = m_globalOptParam->GetShapeList()[n];
924  const MultiRegions::GlobalMatrixKey vKey(gkey, vType);
925  if (cnt < m_offset_elmt_id.num_elements())
926  {
927  eid = m_offset_elmt_id[cnt];
928  MultiplyByBlockMatrix(vKey,inarray + m_coeff_offset[eid],
929  tmp_outarray = outarray + m_coeff_offset[eid]);
930  cnt += num_elmts[n];
931  }
932  }
933  else
934  {
935  int i;
936  int nvarcoeffs = gkey.GetNVarCoeffs();
937 
938  for(i= 0; i < num_elmts[n]; ++i)
939  {
940  // need to be initialised with zero size for non variable coefficient case
941  StdRegions::VarCoeffMap varcoeffs;
942 
943  eid = m_offset_elmt_id[cnt++];
944  if(nvarcoeffs>0)
945  {
946  StdRegions::VarCoeffMap::const_iterator x;
947  for (x = gkey.GetVarCoeffs().begin(); x != gkey.GetVarCoeffs().end(); ++x)
948  {
949  varcoeffs[x->first] = x->second + m_phys_offset[eid];
950  }
951  }
952 
953  StdRegions::StdMatrixKey mkey(gkey.GetMatrixType(),
954  (*m_exp)[eid]->DetShapeType(),
955  *((*m_exp)[eid]),
956  gkey.GetConstFactors(),varcoeffs);
957 
958  (*m_exp)[eid]->GeneralMatrixOp(inarray + m_coeff_offset[eid],
959  tmp_outarray = outarray+m_coeff_offset[eid],
960  mkey);
961  }
962  }
963  }
964  }
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:1060
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:227
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
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:1058
void MultiplyByBlockMatrix(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:326
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 1270 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().

1273  {
1274  boost::shared_ptr<ExpList> vExpList = GetSharedThisPtr();
1275  const map<int,RobinBCInfoSharedPtr> vRobinBCInfo = GetRobinBCInfo();
1276 
1277  MultiRegions::GlobalSysSolnType vType = mkey.GetGlobalSysSolnType();
1278 
1279  if (vType >= eSIZE_GlobalSysSolnType)
1280  {
1281  ASSERTL0(false,"Matrix solution type not defined");
1282  }
1283  std::string vSolnType = MultiRegions::GlobalSysSolnTypeMap[vType];
1284 
1285  return GetGlobalLinSysFactory().CreateInstance(vSolnType,mkey,
1286  vExpList,locToGloMap);
1287  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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:918
const char *const GlobalSysSolnTypeMap[]
std::map< int, RobinBCInfoSharedPtr > GetRobinBCInfo()
Definition: ExpList.h:839
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 1251 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().

1254  {
1255  GlobalLinSysSharedPtr returnlinsys;
1256  boost::shared_ptr<ExpList> vExpList = GetSharedThisPtr();
1257 
1258  MultiRegions::GlobalSysSolnType vType = mkey.GetGlobalSysSolnType();
1259 
1260  if (vType >= eSIZE_GlobalSysSolnType)
1261  {
1262  ASSERTL0(false,"Matrix solution type not defined");
1263  }
1264  std::string vSolnType = MultiRegions::GlobalSysSolnTypeMap[vType];
1265 
1266  return GetGlobalLinSysFactory().CreateInstance( vSolnType, mkey,
1267  vExpList, locToGloMap);
1268  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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:918
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 973 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().

976  {
977  int i,j,n,gid1,gid2,cntdim1,cntdim2;
978  NekDouble sign1,sign2;
979  DNekScalMatSharedPtr loc_mat;
980 
981  unsigned int glob_rows;
982  unsigned int glob_cols;
983  unsigned int loc_rows;
984  unsigned int loc_cols;
985 
986  bool assembleFirstDim;
987  bool assembleSecondDim;
988 
989  switch(mkey.GetMatrixType())
990  {
992  {
993  glob_rows = m_npoints;
994  glob_cols = locToGloMap->GetNumGlobalCoeffs();
995 
996  assembleFirstDim = false;
997  assembleSecondDim = true;
998  }
999  break;
1001  {
1002  glob_rows = locToGloMap->GetNumGlobalCoeffs();
1003  glob_cols = m_npoints;
1004 
1005  assembleFirstDim = true;
1006  assembleSecondDim = false;
1007  }
1008  break;
1009  case StdRegions::eMass:
1013  {
1014  glob_rows = locToGloMap->GetNumGlobalCoeffs();
1015  glob_cols = locToGloMap->GetNumGlobalCoeffs();
1016 
1017  assembleFirstDim = true;
1018  assembleSecondDim = true;
1019  }
1020  break;
1021  default:
1022  {
1024  "Global Matrix creation not defined for this type "
1025  "of matrix");
1026  }
1027  }
1028 
1029  COOMatType spcoomat;
1030  CoordType coord;
1031 
1032  int nvarcoeffs = mkey.GetNVarCoeffs();
1033  int eid;
1034 
1035  // fill global matrix
1036  for(n = cntdim1 = cntdim2 = 0; n < (*m_exp).size(); ++n)
1037  {
1038  // need to be initialised with zero size for non variable coefficient case
1039  StdRegions::VarCoeffMap varcoeffs;
1040 
1041  eid = m_offset_elmt_id[n];
1042  if(nvarcoeffs>0)
1043  {
1044  StdRegions::VarCoeffMap::const_iterator x;
1045  for (x = mkey.GetVarCoeffs().begin(); x != mkey.GetVarCoeffs().end(); ++x)
1046  {
1047  varcoeffs[x->first] = x->second + m_phys_offset[eid];
1048  }
1049  }
1050 
1051  LocalRegions::MatrixKey matkey(mkey.GetMatrixType(),
1052  (*m_exp)[eid]->DetShapeType(),
1053  *((*m_exp)[eid]),
1054  mkey.GetConstFactors(),varcoeffs);
1055 
1056  loc_mat = boost::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[m_offset_elmt_id[n]])->GetLocMatrix(matkey);
1057 
1058  loc_rows = loc_mat->GetRows();
1059  loc_cols = loc_mat->GetColumns();
1060 
1061  for(i = 0; i < loc_rows; ++i)
1062  {
1063  if(assembleFirstDim)
1064  {
1065  gid1 = locToGloMap->GetLocalToGlobalMap (cntdim1 + i);
1066  sign1 = locToGloMap->GetLocalToGlobalSign(cntdim1 + i);
1067  }
1068  else
1069  {
1070  gid1 = cntdim1 + i;
1071  sign1 = 1.0;
1072  }
1073 
1074  for(j = 0; j < loc_cols; ++j)
1075  {
1076  if(assembleSecondDim)
1077  {
1078  gid2 = locToGloMap
1079  ->GetLocalToGlobalMap(cntdim2 + j);
1080  sign2 = locToGloMap
1081  ->GetLocalToGlobalSign(cntdim2 + j);
1082  }
1083  else
1084  {
1085  gid2 = cntdim2 + j;
1086  sign2 = 1.0;
1087  }
1088 
1089  // sparse matrix fill
1090  coord = make_pair(gid1,gid2);
1091  if( spcoomat.count(coord) == 0 )
1092  {
1093  spcoomat[coord] = sign1*sign2*(*loc_mat)(i,j);
1094  }
1095  else
1096  {
1097  spcoomat[coord] += sign1*sign2*(*loc_mat)(i,j);
1098  }
1099  }
1100  }
1101  cntdim1 += loc_rows;
1102  cntdim2 += loc_cols;
1103  }
1104 
1106  ::AllocateSharedPtr(m_session,glob_rows,glob_cols,spcoomat);
1107  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:191
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:227
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
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:1058
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:969
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 1110 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().

1111  {
1112  int i,j,n,gid1,gid2,loc_lda,eid;
1113  NekDouble sign1,sign2,value;
1114  DNekScalMatSharedPtr loc_mat;
1115 
1116  int totDofs = locToGloMap->GetNumGlobalCoeffs();
1117  int NumDirBCs = locToGloMap->GetNumGlobalDirBndCoeffs();
1118 
1119  unsigned int rows = totDofs - NumDirBCs;
1120  unsigned int cols = totDofs - NumDirBCs;
1121  NekDouble zero = 0.0;
1122 
1123  DNekMatSharedPtr Gmat;
1124  int bwidth = locToGloMap->GetFullSystemBandWidth();
1125 
1126  int nvarcoeffs = mkey.GetNVarCoeffs();
1127  MatrixStorage matStorage;
1128 
1129  map<int, RobinBCInfoSharedPtr> RobinBCInfo = GetRobinBCInfo();
1130 
1131  switch(mkey.GetMatrixType())
1132  {
1133  // case for all symmetric matices
1136  if( (2*(bwidth+1)) < rows)
1137  {
1139  Gmat = MemoryManager<DNekMat>::AllocateSharedPtr(rows,cols,zero,matStorage,bwidth,bwidth);
1140  }
1141  else
1142  {
1143  matStorage = ePOSITIVE_DEFINITE_SYMMETRIC;
1144  Gmat = MemoryManager<DNekMat>::AllocateSharedPtr(rows,cols,zero,matStorage);
1145  }
1146 
1147  break;
1148  default: // Assume general matrix - currently only set up for full invert
1149  {
1150  matStorage = eFULL;
1151  Gmat = MemoryManager<DNekMat>::AllocateSharedPtr(rows,cols,zero,matStorage);
1152  }
1153  }
1154 
1155  // fill global symmetric matrix
1156  for(n = 0; n < (*m_exp).size(); ++n)
1157  {
1158  // need to be initialised with zero size for non variable coefficient case
1159  StdRegions::VarCoeffMap varcoeffs;
1160 
1161  eid = m_offset_elmt_id[n];
1162  if(nvarcoeffs>0)
1163  {
1164  StdRegions::VarCoeffMap::const_iterator x;
1165  for (x = mkey.GetVarCoeffs().begin(); x != mkey.GetVarCoeffs().end(); ++x)
1166  {
1167  varcoeffs[x->first] = x->second + m_phys_offset[eid];
1168  }
1169  }
1170 
1171  LocalRegions::MatrixKey matkey(mkey.GetMatrixType(),
1172  (*m_exp)[eid]->DetShapeType(),
1173  *((*m_exp)[eid]),
1174  mkey.GetConstFactors(),varcoeffs);
1175 
1176  loc_mat = boost::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[n])->GetLocMatrix(matkey);
1177 
1178 
1179  if(RobinBCInfo.count(n) != 0) // add robin mass matrix
1180  {
1182 
1183  // declare local matrix from scaled matrix.
1184  int rows = loc_mat->GetRows();
1185  int cols = loc_mat->GetColumns();
1186  const NekDouble *dat = loc_mat->GetRawPtr();
1188  Blas::Dscal(rows*cols,loc_mat->Scale(),new_mat->GetRawPtr(),1);
1189 
1190  // add local matrix contribution
1191  for(rBC = RobinBCInfo.find(n)->second;rBC; rBC = rBC->next)
1192  {
1193  (*m_exp)[n]->AddRobinMassMatrix(rBC->m_robinID,rBC->m_robinPrimitiveCoeffs,new_mat);
1194  }
1195 
1196  NekDouble one = 1.0;
1197  // redeclare loc_mat to point to new_mat plus the scalar.
1198  loc_mat = MemoryManager<DNekScalMat>::AllocateSharedPtr(one,new_mat);
1199  }
1200 
1201  loc_lda = loc_mat->GetColumns();
1202 
1203  for(i = 0; i < loc_lda; ++i)
1204  {
1205  gid1 = locToGloMap->GetLocalToGlobalMap(m_coeff_offset[n] + i) - NumDirBCs;
1206  sign1 = locToGloMap->GetLocalToGlobalSign(m_coeff_offset[n] + i);
1207  if(gid1 >= 0)
1208  {
1209  for(j = 0; j < loc_lda; ++j)
1210  {
1211  gid2 = locToGloMap->GetLocalToGlobalMap(m_coeff_offset[n] + j) - NumDirBCs;
1212  sign2 = locToGloMap->GetLocalToGlobalSign(m_coeff_offset[n] + j);
1213  if(gid2 >= 0)
1214  {
1215  // When global matrix is symmetric,
1216  // only add the value for the upper
1217  // triangular part in order to avoid
1218  // entries to be entered twice
1219  if((matStorage == eFULL)||(gid2 >= gid1))
1220  {
1221  value = Gmat->GetValue(gid1,gid2) + sign1*sign2*(*loc_mat)(i,j);
1222  Gmat->SetValue(gid1,gid2,value);
1223  }
1224  }
1225  }
1226  }
1227  }
1228  }
1229 
1230  return Gmat;
1231  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
boost::shared_ptr< RobinBCInfo > RobinBCInfoSharedPtr
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:1047
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:227
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
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:1058
double NekDouble
std::map< int, RobinBCInfoSharedPtr > GetRobinBCInfo()
Definition: ExpList.h:839
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 1554 of file ExpList.h.

References m_exp.

1555  {
1556  int returnval = 0;
1557  int cnt;
1558  int nbase = (*m_exp)[0]->GetNumBases();
1559 
1560  for(int i = 0; i < (*m_exp).size(); ++i)
1561  {
1562  cnt = 1;
1563  for(int j = 0; j < nbase; ++j)
1564  {
1565  cnt *= (int)(scale*((*m_exp)[i]->GetNumPoints(j)));
1566  }
1567  returnval += cnt;
1568  }
1569  return returnval;
1570  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
void Nektar::MultiRegions::ExpList::GetBCValues ( Array< OneD, NekDouble > &  BndVals,
const Array< OneD, NekDouble > &  TotField,
int  BndID 
)
inline

Definition at line 1875 of file ExpList.h.

References v_GetBCValues().

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

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

892  {
893  BlockMatrixMap::iterator matrixIter = m_blockMat->find(gkey);
894 
895  if(matrixIter == m_blockMat->end())
896  {
897  return ((*m_blockMat)[gkey] = GenBlockMatrix(gkey));
898  }
899  else
900  {
901  return matrixIter->second;
902  }
903  }
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1062
const DNekScalBlkMatSharedPtr GenBlockMatrix(const GlobalMatrixKey &gkey)
This function assembles the block diagonal matrix of local matrices of the type mtype.
Definition: ExpList.cpp:754
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 2131 of file ExpList.h.

References v_GetBndCondExpansions().

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

2132  {
2133  return v_GetBndCondExpansions();
2134  }
virtual const Array< OneD, const boost::shared_ptr< ExpList > > & v_GetBndCondExpansions(void)
Definition: ExpList.cpp:2355
const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::GetBndConditions ( )
inline

Definition at line 2237 of file ExpList.h.

References v_GetBndConditions().

2238  {
2239  return v_GetBndConditions();
2240  }
virtual const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & v_GetBndConditions()
Definition: ExpList.cpp:2985
void Nektar::MultiRegions::ExpList::GetBndElmtExpansion ( int  i,
boost::shared_ptr< ExpList > &  result,
const bool  DeclareCoeffPhysArrays = true 
)
inline

Definition at line 2308 of file ExpList.h.

References v_GetBndElmtExpansion().

2311  {
2312  v_GetBndElmtExpansion(i, result, DeclareCoeffPhysArrays);
2313  }
virtual void v_GetBndElmtExpansion(int i, boost::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays)
Definition: ExpList.cpp:2794
SpatialDomains::BoundaryConditionShPtr Nektar::MultiRegions::ExpList::GetBoundaryCondition ( const SpatialDomains::BoundaryConditionCollection collection,
unsigned int  index,
const std::string &  variable 
)
staticprotected

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

3041  {
3042  SpatialDomains::BoundaryConditionCollection::const_iterator collectionIter = collection.find(regionId);
3043  ASSERTL1(collectionIter != collection.end(), "Unable to locate collection "+boost::lexical_cast<string>(regionId));
3044  const SpatialDomains::BoundaryConditionMapShPtr boundaryConditionMap = (*collectionIter).second;
3045  SpatialDomains::BoundaryConditionMap::const_iterator conditionMapIter = boundaryConditionMap->find(variable);
3046  ASSERTL1(conditionMapIter != boundaryConditionMap->end(), "Unable to locate condition map.");
3047  const SpatialDomains::BoundaryConditionShPtr boundaryCondition = (*conditionMapIter).second;
3048  return boundaryCondition;
3049  }
boost::shared_ptr< BoundaryConditionMap > BoundaryConditionMapShPtr
Definition: Conditions.h:225
boost::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
Definition: Conditions.h:219
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
void Nektar::MultiRegions::ExpList::GetBoundaryNormals ( int  i,
Array< OneD, Array< OneD, NekDouble > > &  normals 
)
inline

Definition at line 2336 of file ExpList.h.

References v_GetBoundaryNormals().

2338  {
2339  v_GetBoundaryNormals(i, normals);
2340  }
virtual void v_GetBoundaryNormals(int i, Array< OneD, Array< OneD, NekDouble > > &normals)
Definition: ExpList.cpp:2922
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 2023 of file ExpList.h.

References m_coeffs.

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

2024  {
2025  return m_coeffs[i];
2026  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
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 1946 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().

1947  {
1948  return m_coeffs;
1949  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
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 2032 of file ExpList.h.

References m_coeffs.

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

Returns the comm object.

Definition at line 930 of file ExpList.h.

References m_comm.

931  {
932  return m_comm;
933  }
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:966
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 1906 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().

1907  {
1908  ASSERTL2(eid <= (*m_exp).size(),
1909  "eid is larger than number of elements");
1910  return (*m_exp)[eid]->GetCoordim();
1911  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed t...
Definition: ErrorUtil.hpp:250
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 1777 of file ExpList.h.

References v_GetCoords().

Referenced by v_WriteTecplotZone().

1781  {
1782  v_GetCoords(coord_0,coord_1,coord_2);
1783  }
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
Definition: ExpList.cpp:2733
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 2075 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::ExpList1DHomogeneous2D::ExpList1DHomogeneous2D(), 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_ExtractPhysToBnd(), v_ExtractPhysToBndElmt(), Nektar::MultiRegions::DisContField3DHomogeneous2D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField2D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBoundaryNormals(), v_GetBoundaryNormals(), v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_HomogeneousEnergy(), Nektar::MultiRegions::AssemblyMapCG::v_LinearSpaceMap(), and v_WriteTecplotHeader().

2076  {
2077  return m_exp;
2078  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
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 2066 of file ExpList.h.

References m_exp.

2067  {
2068  return (*m_exp)[n];
2069  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
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 1319 of file ExpList.cpp.

References ASSERTL0, GetCoordim(), and m_exp.

1321  {
1322  Array<OneD, NekDouble> stdCoord(GetCoordim(0),0.0);
1323  for (int i = 0; i < (*m_exp).size(); ++i)
1324  {
1325  if ((*m_exp)[i]->GetGeom()->ContainsPoint(gloCoord))
1326  {
1327  return (*m_exp)[i];
1328  }
1329  }
1330  ASSERTL0(false, "Cannot find element for this point.");
1331  return (*m_exp)[0]; // avoid warnings
1332  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1906
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 1340 of file ExpList.cpp.

1344  {
1345  Array<OneD, NekDouble> Lcoords(gloCoord.num_elements());
1346 
1347  return GetExpIndex(gloCoord,Lcoords,tol,returnNearestElmt);
1348  }
int GetExpIndex(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false)
Definition: ExpList.cpp:1340
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 1351 of file ExpList.cpp.

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

1355  {
1356  NekDouble nearpt = 1e6;
1357 
1358  if (GetNumElmts() == 0)
1359  {
1360  return -1;
1361  }
1362  std::vector<std::pair<int,NekDouble> > elmtIdDist;
1363 
1364  // Manifold case (point may match multiple elements)
1365  if (GetExp(0)->GetCoordim() > GetExp(0)->GetShapeDimension())
1366  {
1368  SpatialDomains::PointGeom w;
1369  NekDouble dist = 0.0;
1370 
1371  // Scan all elements and store those which may contain the point
1372  for (int i = 0; i < (*m_exp).size(); ++i)
1373  {
1374  if ((*m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1375  locCoords,
1376  tol, nearpt))
1377  {
1378  w.SetX(gloCoords[0]);
1379  w.SetY(gloCoords[1]);
1380  w.SetZ(gloCoords[2]);
1381 
1382  // Find closest vertex
1383  for (int j = 0; j < (*m_exp)[i]->GetNverts(); ++j) {
1384  v = m_graph->GetVertex(
1385  (*m_exp)[i]->GetGeom()->GetVid(j));
1386  if (j == 0 || dist > v->dist(w))
1387  {
1388  dist = v->dist(w);
1389  }
1390  }
1391  elmtIdDist.push_back(
1392  std::pair<int, NekDouble>(i, dist));
1393  }
1394  }
1395 
1396  // Find nearest element
1397  if (!elmtIdDist.empty())
1398  {
1399  int min_id = elmtIdDist[0].first;
1400  NekDouble min_d = elmtIdDist[0].second;
1401 
1402  for (int i = 1; i < elmtIdDist.size(); ++i)
1403  {
1404  if (elmtIdDist[i].second < min_d) {
1405  min_id = elmtIdDist[i].first;
1406  min_d = elmtIdDist[i].second;
1407  }
1408  }
1409 
1410  // retrieve local coordinate of point
1411  (*m_exp)[min_id]->GetGeom()->GetLocCoords(gloCoords,
1412  locCoords);
1413  return min_id;
1414  }
1415  else
1416  {
1417  return -1;
1418  }
1419  }
1420  // non-embedded mesh (point can only match one element)
1421  else
1422  {
1423  static int start = 0;
1424  int min_id = 0;
1425  NekDouble nearpt_min = 1e6;
1426  Array<OneD, NekDouble> savLocCoords(locCoords.num_elements());
1427 
1428  // restart search from last found value
1429  for (int i = start; i < (*m_exp).size(); ++i)
1430  {
1431  if ((*m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1432  locCoords,
1433  tol, nearpt))
1434  {
1435  start = i;
1436  return i;
1437  }
1438  else
1439  {
1440  if(nearpt < nearpt_min)
1441  {
1442  min_id = i;
1443  nearpt_min = nearpt;
1444  Vmath::Vcopy(locCoords.num_elements(),locCoords,1,savLocCoords,1);
1445  }
1446  }
1447  }
1448 
1449  for (int i = 0; i < start; ++i)
1450  {
1451  if ((*m_exp)[i]->GetGeom()->ContainsPoint(gloCoords,
1452  locCoords,
1453  tol, nearpt))
1454  {
1455  start = i;
1456  return i;
1457  }
1458  else
1459  {
1460  if(nearpt < nearpt_min)
1461  {
1462  min_id = i;
1463  nearpt_min = nearpt;
1464  Vmath::Vcopy(locCoords.num_elements(),
1465  locCoords,1,savLocCoords,1);
1466  }
1467  }
1468  }
1469 
1470  if(returnNearestElmt)
1471  {
1472 
1473  std::string msg = "Failed to find point within element to tolerance of "
1474  + boost::lexical_cast<std::string>(tol)
1475  + " using local point ("
1476  + boost::lexical_cast<std::string>(locCoords[0]) +","
1477  + boost::lexical_cast<std::string>(locCoords[1]) +","
1478  + boost::lexical_cast<std::string>(locCoords[1])
1479  + ") in element: "
1480  + boost::lexical_cast<std::string>(min_id);
1481  WARNINGL1(false,msg.c_str());
1482 
1483  Vmath::Vcopy(locCoords.num_elements(),savLocCoords,1,locCoords,1);
1484  return min_id;
1485  }
1486  else
1487  {
1488  return -1;
1489  }
1490 
1491  }
1492  }
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2075
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Definition: ExpList.h:623
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:972
double NekDouble
string msg
print "Adding",units.name, hash(units), units.description(), print "(was",id(_u),"now",id(units),")" Ensure referenced units exist
Definition: pycml.py:3834
#define WARNINGL1(condition, msg)
Definition: ErrorUtil.hpp:229
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1906
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1061
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 2054 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().

2055  {
2056  return (*m_exp).size();
2057  }
ExpansionType Nektar::MultiRegions::ExpList::GetExpType ( void  )

Returns the type of the expansion.

Definition at line 245 of file ExpList.cpp.

References m_expType.

Referenced by v_CurlCurl().

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

Definition at line 853 of file ExpList.h.

References v_GetFieldDefinitions().

854  {
855  return v_GetFieldDefinitions();
856  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2174
void Nektar::MultiRegions::ExpList::GetFieldDefinitions ( std::vector< LibUtilities::FieldDefinitionsSharedPtr > &  fielddef)
inline

Definition at line 859 of file ExpList.h.

References v_GetFieldDefinitions().

860  {
861  v_GetFieldDefinitions(fielddef);
862  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2174
void Nektar::MultiRegions::ExpList::GetFwdBwdTracePhys ( Array< OneD, NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd 
)
inline

Definition at line 2203 of file ExpList.h.

References v_GetFwdBwdTracePhys().

2206  {
2207  v_GetFwdBwdTracePhys(Fwd,Bwd);
2208  }
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
Definition: ExpList.cpp:2445
void Nektar::MultiRegions::ExpList::GetFwdBwdTracePhys ( const Array< OneD, const NekDouble > &  field,
Array< OneD, NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd 
)
inline

Definition at line 2210 of file ExpList.h.

References v_GetFwdBwdTracePhys().

2214  {
2215  v_GetFwdBwdTracePhys(field,Fwd,Bwd);
2216  }
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
Definition: ExpList.cpp:2445
const NekOptimize::GlobalOptParamSharedPtr& Nektar::MultiRegions::ExpList::GetGlobalOptParam ( void  )
inline

Definition at line 834 of file ExpList.h.

References m_globalOptParam.

835  {
836  return m_globalOptParam;
837  }
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:1060
SpatialDomains::MeshGraphSharedPtr Nektar::MultiRegions::ExpList::GetGraph ( )
inline

Definition at line 935 of file ExpList.h.

References m_graph.

936  {
937  return m_graph;
938  }
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:972
LibUtilities::BasisSharedPtr Nektar::MultiRegions::ExpList::GetHomogeneousBasis ( void  )
inline

Definition at line 941 of file ExpList.h.

References v_GetHomogeneousBasis().

942  {
943  return v_GetHomogeneousBasis();
944  }
virtual LibUtilities::BasisSharedPtr v_GetHomogeneousBasis(void)
Definition: ExpList.h:1462
NekDouble Nektar::MultiRegions::ExpList::GetHomoLen ( void  )
inline

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

Definition at line 578 of file ExpList.h.

References v_GetHomoLen().

579  {
580  return v_GetHomoLen();
581  }
virtual NekDouble v_GetHomoLen(void)
Definition: ExpList.cpp:1945
const std::vector< bool > & Nektar::MultiRegions::ExpList::GetLeftAdjacentFaces ( void  ) const
inline

Definition at line 2218 of file ExpList.h.

References v_GetLeftAdjacentFaces().

2219  {
2220  return v_GetLeftAdjacentFaces();
2221  }
virtual const std::vector< bool > & v_GetLeftAdjacentFaces(void) const
Definition: ExpList.cpp:2461
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 1498 of file ExpList.h.

References m_exp.

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

Definition at line 2174 of file ExpList.h.

References v_GetNormals().

2176  {
2177  v_GetNormals(normals);
2178  }
virtual void v_GetNormals(Array< OneD, Array< OneD, NekDouble > > &normals)
Definition: ExpList.cpp:2412
int Nektar::MultiRegions::ExpList::GetNpoints ( void  ) const
inline

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

Definition at line 1575 of file ExpList.h.

References m_npoints.

1576  {
1577  return m_npoints;
1578  }
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 623 of file ExpList.h.

References v_GetNumElmts().

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

624  {
625  return v_GetNumElmts();
626  }
virtual int v_GetNumElmts(void)
Definition: ExpList.h:1118
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 2100 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().

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

Definition at line 844 of file ExpList.h.

References v_GetPeriodicEntities().

848  {
849  v_GetPeriodicEntities(periodicVerts, periodicEdges, periodicFaces);
850  }
virtual void v_GetPeriodicEntities(PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces)
Definition: ExpList.cpp:3028
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 2045 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().

2046  {
2047  return m_phys;
2048  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
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 1641 of file ExpList.h.

References m_physState.

1642  {
1643  return m_physState;
1644  }
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
boost::shared_ptr<ExpList>& Nektar::MultiRegions::ExpList::GetPlane ( int  n)
inline

Definition at line 946 of file ExpList.h.

References v_GetPlane().

947  {
948  return v_GetPlane(n);
949  }
virtual boost::shared_ptr< ExpList > & v_GetPlane(int n)
Definition: ExpList.cpp:3051
std::map<int, RobinBCInfoSharedPtr> Nektar::MultiRegions::ExpList::GetRobinBCInfo ( )
inline

Definition at line 839 of file ExpList.h.

References v_GetRobinBCInfo().

Referenced by GenGlobalBndLinSys(), and GenGlobalMatrixFull().

840  {
841  return v_GetRobinBCInfo();
842  }
virtual std::map< int, RobinBCInfoSharedPtr > v_GetRobinBCInfo(void)
Definition: ExpList.cpp:3018
boost::shared_ptr<LibUtilities::SessionReader> Nektar::MultiRegions::ExpList::GetSession ( ) const
inline

Returns the session object.

Definition at line 924 of file ExpList.h.

References m_session.

Referenced by Nektar::MultiRegions::AssemblyMapCG::SetUpUniversalC0ContMap(), and Nektar::MultiRegions::AssemblyMapCG::v_LinearSpaceMap().

925  {
926  return m_session;
927  }
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:969
boost::shared_ptr<ExpList> Nektar::MultiRegions::ExpList::GetSharedThisPtr ( )
inline

Returns a shared pointer to the current object.

Definition at line 918 of file ExpList.h.

Referenced by GenGlobalBndLinSys(), and GenGlobalLinSys().

919  {
920  return shared_from_this();
921  }
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 1548 of file ExpList.h.

References m_exp.

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

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

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

2160  {
2161  return v_GetTrace();
2162  }
virtual boost::shared_ptr< ExpList > & v_GetTrace()
Definition: ExpList.cpp:2391
const Array< OneD, const int > & Nektar::MultiRegions::ExpList::GetTraceBndMap ( void  )
inline

Definition at line 2169 of file ExpList.h.

References v_GetTraceBndMap().

2170  {
2171  return v_GetTraceBndMap();
2172  }
virtual const Array< OneD, const int > & v_GetTraceBndMap()
Definition: ExpList.cpp:2407
boost::shared_ptr< AssemblyMapDG > & Nektar::MultiRegions::ExpList::GetTraceMap ( void  )
inline

Definition at line 2164 of file ExpList.h.

References v_GetTraceMap().

Referenced by v_GetTraceBndMap().

2165  {
2166  return v_GetTraceMap();
2167  }
virtual boost::shared_ptr< AssemblyMapDG > & v_GetTraceMap()
Definition: ExpList.cpp:2399
LibUtilities::TranspositionSharedPtr Nektar::MultiRegions::ExpList::GetTransposition ( void  )
inline

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

Definition at line 571 of file ExpList.h.

References v_GetTransposition().

572  {
573  return v_GetTransposition();
574  }
virtual LibUtilities::TranspositionSharedPtr v_GetTransposition(void)
Definition: ExpList.cpp:1937
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 1592 of file ExpList.h.

References m_WaveSpace.

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

1593  {
1594  return m_WaveSpace;
1595  }
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 587 of file ExpList.h.

References v_GetYIDs().

588  {
589  return v_GetYIDs();
590  }
virtual Array< OneD, const unsigned int > v_GetYIDs(void)
Definition: ExpList.cpp:1961
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 564 of file ExpList.h.

References v_GetZIDs().

Referenced by v_WriteTecplotZone().

565  {
566  return v_GetZIDs();
567  }
virtual Array< OneD, const unsigned int > v_GetZIDs(void)
Definition: ExpList.cpp:1953
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
void Nektar::MultiRegions::ExpList::GlobalToLocal ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

This operation is evaluated as:

\begin{tabbing} \hspace{1cm} \= Do \= $e=$ $1, N_{\mathrm{el}}$ \\ \> \> Do \= $i=$ $0,N_m^e-1$ \\ \> \> \> $\boldsymbol{\hat{u}}^{e}[i] = \mbox{sign}[e][i] \cdot \boldsymbol{\hat{u}}_g[\mbox{map}[e][i]]$ \\ \> \> continue \\ \> continue \end{tabbing}

where map $[e][i]$ is the mapping array and sign $[e][i]$ is an array of similar dimensions ensuring the correct modal connectivity between the different elements (both these arrays are contained in the data member #m_locToGloMap). This operation is equivalent to the scatter operation $\boldsymbol{\hat{u}}_l=\mathcal{A}\boldsymbol{\hat{u}}_g$, where $\mathcal{A}$ is the $N_{\mathrm{eof}}\times N_{\mathrm{dof}}$ permutation matrix.

Parameters
inarrayAn array of size $N_\mathrm{dof}$ containing the global degrees of freedom $\boldsymbol{x}_g$.
outarrayThe resulting local degrees of freedom $\boldsymbol{x}_l$ will be stored in this array of size $N_\mathrm{eof}$.

Definition at line 2011 of file ExpList.h.

References v_GlobalToLocal().

2014  {
2015  v_GlobalToLocal(inarray, outarray);
2016  }
virtual void v_GlobalToLocal(void)
Definition: ExpList.cpp:2669
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 2047 of file ExpList.cpp.

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

2050  {
2051  NekDouble err = 0.0, errh1;
2052  int i;
2053 
2054  for (i = 0; i < (*m_exp).size(); ++i)
2055  {
2056  errh1 = (*m_exp)[i]->H1(inarray + m_phys_offset[i],
2057  soln + m_phys_offset[i]);
2058  err += errh1*errh1;
2059  }
2060 
2061  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
2062 
2063  return sqrt(err);
2064  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:966
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,
const bool  PhysSpaceForcing = true 
)
inline

Solve helmholtz problem.

Definition at line 1732 of file ExpList.h.

References v_HelmSolve().

1741  {
1742  v_HelmSolve(inarray, outarray, flags, factors, varcoeff,
1743  dirForcing, PhysSpaceForcing);
1744  }
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, const bool PhysSpaceForcing)
Definition: ExpList.cpp:2493
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 1838 of file ExpList.h.

References v_HomogeneousBwdTrans().

1844  {
1845  v_HomogeneousBwdTrans(inarray,outarray,coeffstate,Shuff,UnShuff);
1846  }
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:2539
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 548 of file ExpList.h.

References v_HomogeneousEnergy().

549  {
550  return v_HomogeneousEnergy();
551  }
virtual Array< OneD, const NekDouble > v_HomogeneousEnergy(void)
Definition: ExpList.cpp:1929
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 1825 of file ExpList.h.

References v_HomogeneousFwdTrans().

1831  {
1832  v_HomogeneousFwdTrans(inarray,outarray,coeffstate,Shuff,UnShuff);
1833  }
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:2529
void Nektar::MultiRegions::ExpList::ImposeDirichletConditions ( Array< OneD, NekDouble > &  outarray)
inline

Impose Dirichlet Boundary Conditions onto Array.

Definition at line 1951 of file ExpList.h.

References v_ImposeDirichletConditions().

1953  {
1954  v_ImposeDirichletConditions(outarray);
1955  }
virtual void v_ImposeDirichletConditions(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2631
NekDouble Nektar::MultiRegions::ExpList::Integral ( const Array< OneD, const NekDouble > &  inarray)
inline

Definition at line 541 of file ExpList.h.

References v_Integral().

542  {
543  return v_Integral(inarray);
544  }
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Definition: ExpList.cpp:1915
void Nektar::MultiRegions::ExpList::IProductWRTBase ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
inline
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 1660 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().

1663  {
1664  v_IProductWRTBase_IterPerExp(inarray,outarray);
1665  }
virtual void v_IProductWRTBase_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:356
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 383 of file ExpList.cpp.

References m_coeff_offset, and m_phys_offset.

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

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

412  {
413  Array<OneD, NekDouble> tmp0,tmp1,tmp2;
414  // assume coord dimension defines the size of Deriv Base
415  int dim = GetCoordim(0);
416 
417  ASSERTL1(inarray.num_elements() >= dim,"inarray is not of sufficient dimension");
418 
419  switch(dim)
420  {
421  case 1:
422  for (int i = 0; i < m_collections.size(); ++i)
423  {
424  m_collections[i].ApplyOperator(
426  inarray[0] + m_coll_phys_offset[i],
427  tmp0 = outarray + m_coll_coeff_offset[i]);
428  }
429  break;
430  case 2:
431  for (int i = 0; i < m_collections.size(); ++i)
432  {
433  m_collections[i].ApplyOperator(
435  inarray[0] + m_coll_phys_offset[i],
436  tmp0 = inarray[1] + m_coll_phys_offset[i],
437  tmp1 = outarray + m_coll_coeff_offset[i]);
438  }
439  break;
440  case 3:
441  for (int i = 0; i < m_collections.size(); ++i)
442  {
443  m_collections[i].ApplyOperator(
445  inarray[0] + m_coll_phys_offset[i],
446  tmp0 = inarray[1] + m_coll_phys_offset[i],
447  tmp1 = inarray[2] + m_coll_phys_offset[i],
448  tmp2 = outarray + m_coll_coeff_offset[i]);
449  }
450  break;
451  default:
452  ASSERTL0(false,"Dimension of inarray not correct");
453  break;
454  }
455  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1044
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1906
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1041
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
Collections::CollectionVector m_collections
Definition: ExpList.h:1038
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 528 of file ExpList.h.

References v_L2().

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

531  {
532  return v_L2(inarray, soln);
533  }
virtual NekDouble v_L2(const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
Definition: ExpList.cpp:1885
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 1750 of file ExpList.h.

References v_LinearAdvectionDiffusionReactionSolve().

1757  {
1758  v_LinearAdvectionDiffusionReactionSolve(velocity,inarray, outarray,
1759  lambda, coeffstate,dirForcing);
1760  }
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:2505
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 1762 of file ExpList.h.

References v_LinearAdvectionReactionSolve().

1769  {
1770  v_LinearAdvectionReactionSolve(velocity,inarray, outarray,
1771  lambda, coeffstate,dirForcing);
1772  }
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:2517
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 1846 of file ExpList.cpp.

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

1849  {
1850  NekDouble err = 0.0;
1851 
1852  if (soln == NullNekDouble1DArray)
1853  {
1854  err = Vmath::Vmax(m_npoints, inarray, 1);
1855  }
1856  else
1857  {
1858  for (int i = 0; i < m_npoints; ++i)
1859  {
1860  err = max(err, abs(inarray[i] - soln[i]));
1861  }
1862  }
1863 
1864  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceMax);
1865 
1866  return err;
1867  }
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:779
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:966
void Nektar::MultiRegions::ExpList::LocalToGlobal ( bool  useComm = true)
inline

Gathers the global coefficients $\boldsymbol{\hat{u}}_g$ from the local coefficients $\boldsymbol{\hat{u}}_l$.

Definition at line 1967 of file ExpList.h.

References v_LocalToGlobal().

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

1968  {
1969  v_LocalToGlobal(useComm);
1970  }
virtual void v_LocalToGlobal(bool UseComm)
Definition: ExpList.cpp:2653
void Nektar::MultiRegions::ExpList::LocalToGlobal ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
bool  useComm = true 
)
inline

Definition at line 1972 of file ExpList.h.

References v_LocalToGlobal().

1976  {
1977  v_LocalToGlobal(inarray, outarray,useComm);
1978  }
virtual void v_LocalToGlobal(bool UseComm)
Definition: ExpList.cpp:2653
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 326 of file ExpList.cpp.

References Nektar::eWrapper, and GetBlockMatrix().

Referenced by GeneralMatrixOp_IterPerExp().

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

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

Referenced by v_FwdTrans_IterPerExp().

644  {
645  GlobalMatrixKey mkey(StdRegions::eInvMass);
646  const DNekScalBlkMatSharedPtr& InvMass = GetBlockMatrix(mkey);
647 
648  // Inverse mass matrix
649  NekVector<NekDouble> out(m_ncoeffs,outarray,eWrapper);
650  if(inarray.get() == outarray.get())
651  {
652  NekVector<NekDouble> in(m_ncoeffs,inarray); // copy data
653  out = (*InvMass)*in;
654  }
655  else
656  {
657  NekVector<NekDouble> in(m_ncoeffs,inarray,eWrapper);
658  out = (*InvMass)*in;
659  }
660  }
const DNekScalBlkMatSharedPtr & GetBlockMatrix(const GlobalMatrixKey &gkey)
Definition: ExpList.cpp:890
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:976
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 1721 of file ExpList.h.

References v_MultiplyByInvMassMatrix().

1725  {
1726  v_MultiplyByInvMassMatrix(inarray,outarray,coeffstate);
1727  }
virtual void v_MultiplyByInvMassMatrix(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2484
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 1886 of file ExpList.h.

References v_NormVectorIProductWRTBase().

1891  {
1892  v_NormVectorIProductWRTBase(V1,V2,outarray,BndID);
1893  }
virtual void v_NormVectorIProductWRTBase(Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
Definition: ExpList.cpp:2576
void Nektar::MultiRegions::ExpList::NormVectorIProductWRTBase ( Array< OneD, Array< OneD, NekDouble > > &  V,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 1895 of file ExpList.h.

References v_NormVectorIProductWRTBase().

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

Definition at line 1807 of file ExpList.h.

References v_PhysDeriv().

Referenced by v_CurlCurl().

1811  {
1812  v_PhysDeriv(edir, inarray,out_d);
1813  }
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:490
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 1788 of file ExpList.h.

References v_PhysDeriv().

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

Definition at line 1799 of file ExpList.h.

References v_PhysDeriv().

1803  {
1804  v_PhysDeriv(dir,inarray,out_d);
1805  }
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:490
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 608 of file ExpList.h.

References v_PhysGalerkinProjection1DScaled().

612  {
613  v_PhysGalerkinProjection1DScaled(scale, inarray, outarray);
614  }
virtual void v_PhysGalerkinProjection1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1976
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 278 of file ExpList.cpp.

References ASSERTL1, m_phys, and m_physState.

279  {
280  ASSERTL1(m_physState == true,
281  "local physical space is not true ");
282 
283  return PhysIntegral(m_phys);
284  }
NekDouble PhysIntegral(void)
This function integrates a function over the domain consisting of all the elements of the expansion...
Definition: ExpList.cpp:278
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
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 303 of file ExpList.cpp.

References m_phys_offset.

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

References v_PhysInterp1DScaled().

600  {
601  v_PhysInterp1DScaled(scale, inarray,outarray);
602  }
virtual void v_PhysInterp1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1970
void Nektar::MultiRegions::ExpList::ReadGlobalOptimizationParameters ( )
inlineprotected
void Nektar::MultiRegions::ExpList::Reset ( )
inline

Reset geometry information and reset matrices.

Definition at line 378 of file ExpList.h.

References v_Reset().

379  {
380  v_Reset();
381  }
virtual void v_Reset()
Reset geometry information, metrics, matrix managers and geometry information.
Definition: ExpList.cpp:1513
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 1917 of file ExpList.h.

References m_coeffs.

1918  {
1919  m_coeffs[i] = val;
1920  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
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 1927 of file ExpList.h.

References m_coeffs.

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

Set the m_coeffs array to inarray.

Definition at line 1933 of file ExpList.h.

References m_coeffs.

1934  {
1935  m_coeffs = inarray;
1936  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
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 555 of file ExpList.h.

References v_SetHomo1DSpecVanVisc().

556  {
558  }
virtual void v_SetHomo1DSpecVanVisc(Array< OneD, NekDouble > visc)
Definition: ExpList.h:1470
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 1598 of file ExpList.h.

References m_phys.

1599  {
1600  m_phys[i] = val;
1601  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
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 1612 of file ExpList.h.

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

1614  {
1615  ASSERTL0(inarray.num_elements() == m_npoints,
1616  "Input array does not have correct number of elements.");
1617 
1618  Vmath::Vcopy(m_npoints,&inarray[0],1,&m_phys[0],1);
1619  m_physState = true;
1620  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1061
void Nektar::MultiRegions::ExpList::SetPhysArray ( Array< OneD, NekDouble > &  inarray)
inline

Sets the array m_phys.

Definition at line 1623 of file ExpList.h.

References m_phys.

1624  {
1625  m_phys = inarray;
1626  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
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 1632 of file ExpList.h.

References m_physState.

1633  {
1634  m_physState = physState;
1635  }
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
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 1584 of file ExpList.h.

References m_WaveSpace.

1585  {
1586  m_WaveSpace = wavespace;
1587  }
void Nektar::MultiRegions::ExpList::SmoothField ( Array< OneD, NekDouble > &  field)
inline

Smooth a field across elements.

Definition at line 1691 of file ExpList.h.

References v_SmoothField().

1692  {
1693  v_SmoothField(field);
1694  }
virtual void v_SmoothField(Array< OneD, NekDouble > &field)
Definition: ExpList.cpp:712
boost::shared_ptr< ExpList > & Nektar::MultiRegions::ExpList::UpdateBndCondExpansion ( int  i)
inline

Definition at line 2136 of file ExpList.h.

References v_UpdateBndCondExpansion().

2137  {
2138  return v_UpdateBndCondExpansion(i);
2139  }
virtual boost::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
Definition: ExpList.cpp:2363
Array< OneD, SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::UpdateBndConditions ( )
inline

Definition at line 2244 of file ExpList.h.

References v_UpdateBndConditions().

2245  {
2246  return v_UpdateBndConditions();
2247  }
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
Definition: ExpList.cpp:2996
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 2111 of file ExpList.h.

References m_coeffs.

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

2112  {
2113  return m_coeffs;
2114  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
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 2122 of file ExpList.h.

References m_phys, and m_physState.

2123  {
2124  m_physState = true;
2125  return m_phys;
2126  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
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 2141 of file ExpList.h.

References v_Upwind().

2146  {
2147  v_Upwind(Vec, Fwd, Bwd, Upwind);
2148  }
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:2371
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 2150 of file ExpList.h.

References v_Upwind().

2155  {
2156  v_Upwind(Vn, Fwd, Bwd, Upwind);
2157  }
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:2371
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 2436 of file ExpList.cpp.

References ASSERTL0.

Referenced by AddFwdBwdTraceIntegral().

2440  {
2441  ASSERTL0(false,
2442  "This method is not defined or valid for this class type");
2443  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2419 of file ExpList.cpp.

References ASSERTL0.

Referenced by AddTraceIntegral().

2423  {
2424  ASSERTL0(false,
2425  "This method is not defined or valid for this class type");
2426  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2428 of file ExpList.cpp.

References ASSERTL0.

2431  {
2432  ASSERTL0(false,
2433  "This method is not defined or valid for this class type");
2434  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2188 of file ExpList.cpp.

References m_coeffs.

Referenced by AppendFieldData().

2189  {
2190  v_AppendFieldData(fielddef,fielddata,m_coeffs);
2191  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:2188
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 2193 of file ExpList.cpp.

References m_coeff_offset.

2194  {
2195  int i;
2196  // Determine mapping from element ids to location in
2197  // expansion list
2198  // Determine mapping from element ids to location in
2199  // expansion list
2200  map<int, int> ElmtID_to_ExpID;
2201  for(i = 0; i < (*m_exp).size(); ++i)
2202  {
2203  ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2204  }
2205 
2206  for(i = 0; i < fielddef->m_elementIDs.size(); ++i)
2207  {
2208  int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
2209  int datalen = (*m_exp)[eid]->GetNcoeffs();
2210  fielddata.insert(fielddata.end(),&coeffs[m_coeff_offset[eid]],&coeffs[m_coeff_offset[eid]]+datalen);
2211  }
2212 
2213  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
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 2684 of file ExpList.cpp.

References v_BwdTrans_IterPerExp().

Referenced by BwdTrans().

2687  {
2688  v_BwdTrans_IterPerExp(inarray,outarray);
2689  }
virtual void v_BwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1307
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 1307 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().

1309  {
1310  Array<OneD, NekDouble> tmp;
1311  for (int i = 0; i < m_collections.size(); ++i)
1312  {
1313  m_collections[i].ApplyOperator(Collections::eBwdTrans,
1314  inarray + m_coll_coeff_offset[i],
1315  tmp = outarray + m_coll_phys_offset[i]);
1316  }
1317  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1044
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1041
Collections::CollectionVector m_collections
Definition: ExpList.h:1038
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 1981 of file ExpList.cpp.

References ASSERTL0.

Referenced by ClearGlobalLinSysManager().

1982  {
1983  ASSERTL0(false,
1984  "This method is not defined or valid for this class type");
1985  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
void Nektar::MultiRegions::ExpList::v_CurlCurl ( Array< OneD, Array< OneD, NekDouble > > &  Vel,
Array< OneD, Array< OneD, NekDouble > > &  Q 
)
protectedvirtual

Definition at line 562 of file ExpList.cpp.

References ASSERTL0, Nektar::MultiRegions::e2D, Nektar::MultiRegions::e3D, Nektar::MultiRegions::e3DH1D, Nektar::MultiRegions::e3DH2D, GetExpType(), GetTotPoints(), m_session, Vmath::Neg(), PhysDeriv(), Vmath::Smul(), Vmath::Vsub(), Nektar::xDir, Nektar::yDir, and Nektar::zDir.

Referenced by CurlCurl().

565  {
566  int nq = GetTotPoints();
567  Array<OneD,NekDouble> Vx(nq);
568  Array<OneD,NekDouble> Uy(nq);
569  Array<OneD,NekDouble> Dummy(nq);
570 
571  bool halfMode = false;
572  if ( GetExpType() == e3DH1D)
573  {
574  m_session->MatchSolverInfo("ModeType", "HalfMode",
575  halfMode, false);
576  }
577 
578  switch(GetExpType())
579  {
580  case e2D:
581  {
582  PhysDeriv(xDir, Vel[yDir], Vx);
583  PhysDeriv(yDir, Vel[xDir], Uy);
584 
585 
586  Vmath::Vsub(nq, Vx, 1, Uy, 1, Dummy, 1);
587 
588  PhysDeriv(Dummy,Q[1],Q[0]);
589 
590  Vmath::Smul(nq, -1.0, Q[1], 1, Q[1], 1);
591  }
592  break;
593 
594  case e3D:
595  case e3DH1D:
596  case e3DH2D:
597  {
598  Array<OneD,NekDouble> Vz(nq);
599  Array<OneD,NekDouble> Uz(nq);
600  Array<OneD,NekDouble> Wx(nq);
601  Array<OneD,NekDouble> Wy(nq);
602 
603  PhysDeriv(Vel[xDir], Dummy, Uy, Uz);
604  PhysDeriv(Vel[yDir], Vx, Dummy, Vz);
605  PhysDeriv(Vel[zDir], Wx, Wy, Dummy);
606 
607  Vmath::Vsub(nq, Wy, 1, Vz, 1, Q[0], 1);
608  Vmath::Vsub(nq, Uz, 1, Wx, 1, Q[1], 1);
609  Vmath::Vsub(nq, Vx, 1, Uy, 1, Q[2], 1);
610 
611  PhysDeriv(Q[0], Dummy, Uy, Uz);
612  PhysDeriv(Q[1], Vx, Dummy, Vz);
613  PhysDeriv(Q[2], Wx, Wy, Dummy);
614 
615  // For halfmode, need to change the sign of z derivatives
616  if (halfMode)
617  {
618  Vmath::Neg(nq, Uz, 1);
619  Vmath::Neg(nq, Vz, 1);
620  }
621 
622  Vmath::Vsub(nq, Wy, 1, Vz, 1, Q[0], 1);
623  Vmath::Vsub(nq, Uz, 1, Wx, 1, Q[1], 1);
624  Vmath::Vsub(nq, Vx, 1, Uy, 1, Q[2], 1);
625  }
626  break;
627  default:
628  ASSERTL0(0,"Dimension not supported");
629  break;
630  }
631  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
ExpansionType GetExpType(void)
Returns the type of the expansion.
Definition: ExpList.cpp:245
void PhysDeriv(Direction edir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d)
Definition: ExpList.h:1807
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
Definition: Vmath.cpp:213
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1543
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:969
void Neg(int n, T *x, const int incx)
Negate x = -x.
Definition: Vmath.cpp:396
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
Definition: Vmath.cpp:343
void Nektar::MultiRegions::ExpList::v_DealiasedDotProd ( const Array< OneD, Array< OneD, NekDouble > > &  inarray1,
const Array< OneD, Array< OneD, NekDouble > > &  inarray2,
Array< OneD, Array< OneD, NekDouble > > &  outarray,
CoeffState  coeffstate = eLocal 
)
protectedvirtual

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

Definition at line 2558 of file ExpList.cpp.

References ASSERTL0.

Referenced by DealiasedDotProd().

2563  {
2564  ASSERTL0(false,
2565  "This method is not defined or valid for this class type");
2566  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2549 of file ExpList.cpp.

References ASSERTL0.

Referenced by DealiasedProd().

2553  {
2554  ASSERTL0(false,
2555  "This method is not defined or valid for this class type");
2556  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 3006 of file ExpList.cpp.

References ASSERTL0.

Referenced by EvaluateBoundaryConditions().

3011  {
3012  ASSERTL0(false,
3013  "This method is not defined or valid for this class type");
3014  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2329 of file ExpList.cpp.

References m_coeff_offset, and m_offset_elmt_id.

Referenced by ExtractCoeffsToCoeffs().

2330  {
2331  int i;
2332  int offset = 0;
2333 
2334  for(i = 0; i < (*m_exp).size(); ++i)
2335  {
2336  std::vector<unsigned int> nummodes;
2337  vector<LibUtilities::BasisType> basisTypes;
2338  int eid = m_offset_elmt_id[i];
2339  for(int j= 0; j < fromExpList->GetExp(eid)->GetNumBases(); ++j)
2340  {
2341  nummodes.push_back(fromExpList->GetExp(eid)->GetBasisNumModes(j));
2342  basisTypes.push_back(fromExpList->GetExp(eid)->GetBasisType(j));
2343  }
2344 
2345  (*m_exp)[eid]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes,0,
2346  &toCoeffs[m_coeff_offset[eid]],
2347  basisTypes);
2348 
2349  offset += fromExpList->GetExp(eid)->GetNcoeffs();
2350  }
2351  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
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:1058
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 2238 of file ExpList.cpp.

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

Referenced by ExtractDataToCoeffs().

2243  {
2244  int i, expId;
2245  int offset = 0;
2246  int modes_offset = 0;
2247  int datalen = fielddata.size()/fielddef->m_fields.size();
2248 
2249  // Find data location according to field definition
2250  for(i = 0; i < fielddef->m_fields.size(); ++i)
2251  {
2252  if(fielddef->m_fields[i] == field)
2253  {
2254  break;
2255  }
2256  offset += datalen;
2257  }
2258 
2259  ASSERTL0(i != fielddef->m_fields.size(),
2260  "Field (" + field + ") not found in file.");
2261 
2262  if (m_elmtToExpId.size() == 0)
2263  {
2264  // Loop in reverse order so that in case where using a
2265  // Homogeneous expansion it sets geometry ids to first part of
2266  // m_exp list. Otherwise will set to second (complex) expansion
2267  for(i = (*m_exp).size()-1; i >= 0; --i)
2268  {
2269  m_elmtToExpId[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2270  }
2271  }
2272 
2274 
2275  for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
2276  {
2277  // Reset modes_offset in the case where all expansions of
2278  // the same order.
2279  if (fielddef->m_uniOrder == true)
2280  {
2281  modes_offset = 0;
2282  }
2283 
2284  datalen = LibUtilities::GetNumberOfCoefficients(fielddef->m_shapeType,
2285  fielddef->m_numModes, modes_offset);
2286 
2287  const int elmtId = fielddef->m_elementIDs[i];
2288  eIt = m_elmtToExpId.find(elmtId);
2289 
2290  if (eIt == m_elmtToExpId.end())
2291  {
2292  offset += datalen;
2293  modes_offset += (*m_exp)[0]->GetNumBases();
2294  continue;
2295  }
2296 
2297  expId = eIt->second;
2298 
2299  bool sameBasis = true;
2300  for (int j = 0; j < fielddef->m_basis.size(); ++j)
2301  {
2302  if (fielddef->m_basis[j] != (*m_exp)[expId]->GetBasisType(j))
2303  {
2304  sameBasis = false;
2305  break;
2306  }
2307  }
2308 
2309  if (datalen == (*m_exp)[expId]->GetNcoeffs() && sameBasis)
2310  {
2311  Vmath::Vcopy(datalen, &fielddata[offset], 1,
2312  &coeffs[m_coeff_offset[expId]], 1);
2313  }
2314  else
2315  {
2316  (*m_exp)[expId]->ExtractDataToCoeffs(
2317  &fielddata[offset], fielddef->m_numModes,
2318  modes_offset, &coeffs[m_coeff_offset[expId]],
2319  fielddef->m_basis);
2320  }
2321 
2322  offset += datalen;
2323  modes_offset += (*m_exp)[0]->GetNumBases();
2324  }
2325 
2326  return;
2327  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
boost::unordered_map< int, int > m_elmtToExpId
Mapping from geometry ID of element to index inside m_exp.
Definition: ExpList.h:1070
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:1047
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1061
void Nektar::MultiRegions::ExpList::v_ExtractElmtToBndPhys ( int  i,
Array< OneD, NekDouble > &  elmt,
Array< OneD, NekDouble > &  boundary 
)
protectedvirtual

Definition at line 2804 of file ExpList.cpp.

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

Referenced by ExtractElmtToBndPhys().

2807  {
2808  int n, cnt;
2809  Array<OneD, NekDouble> tmp1, tmp2;
2811 
2812  Array<OneD, int> ElmtID,EdgeID;
2813  GetBoundaryToElmtMap(ElmtID,EdgeID);
2814 
2815  // Initialise result
2816  boundary = Array<OneD, NekDouble>
2817  (GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
2818 
2819  // Skip other boundary regions
2820  for (cnt = n = 0; n < i; ++n)
2821  {
2822  cnt += GetBndCondExpansions()[n]->GetExpSize();
2823  }
2824 
2825  int offsetBnd;
2826  int offsetElmt = 0;
2827  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2828  {
2829  offsetBnd = GetBndCondExpansions()[i]->GetPhys_Offset(n);
2830 
2831  elmt = GetExp(ElmtID[cnt+n]);
2832  elmt->GetTracePhysVals(EdgeID[cnt+n],
2833  GetBndCondExpansions()[i]->GetExp(n),
2834  tmp1 = element + offsetElmt,
2835  tmp2 = boundary + offsetBnd);
2836 
2837  offsetElmt += elmt->GetTotPoints();
2838  }
2839  }
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2075
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2302
const Array< OneD, const boost::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:2131
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
void Nektar::MultiRegions::ExpList::v_ExtractPhysToBnd ( int  i,
const Array< OneD, const NekDouble > &  phys,
Array< OneD, NekDouble > &  bnd 
)
protectedvirtual

Definition at line 2884 of file ExpList.cpp.

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

Referenced by ExtractPhysToBnd().

2887  {
2888  int n, cnt;
2889  Array<OneD, NekDouble> tmp1, tmp2;
2891 
2892  Array<OneD, int> ElmtID,EdgeID;
2893  GetBoundaryToElmtMap(ElmtID,EdgeID);
2894 
2895  // Initialise result
2896  bnd = Array<OneD, NekDouble>
2897  (GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
2898 
2899  // Skip other boundary regions
2900  for (cnt = n = 0; n < i; ++n)
2901  {
2902  cnt += GetBndCondExpansions()[n]->GetExpSize();
2903  }
2904 
2905  int offsetBnd;
2906  int offsetPhys;
2907  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2908  {
2909  offsetPhys = GetPhys_Offset(ElmtID[cnt+n]);
2910  offsetBnd = GetBndCondExpansions()[i]->GetPhys_Offset(n);
2911 
2912  elmt = GetExp(ElmtID[cnt+n]);
2913  elmt->GetTracePhysVals(EdgeID[cnt+n],
2914  GetBndCondExpansions()[i]->GetExp(n),
2915  tmp1 = phys + offsetPhys,
2916  tmp2 = bnd + offsetBnd);
2917  }
2918  }
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:2092
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2075
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2302
const Array< OneD, const boost::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:2131
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 2843 of file ExpList.cpp.

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

Referenced by ExtractPhysToBndElmt().

2846  {
2847  int n, cnt, nq;
2848  Array<OneD, NekDouble> tmp1, tmp2;
2849 
2850  Array<OneD, int> ElmtID,EdgeID;
2851  GetBoundaryToElmtMap(ElmtID,EdgeID);
2852 
2853  // Skip other boundary regions
2854  for (cnt = n = 0; n < i; ++n)
2855  {
2856  cnt += GetBndCondExpansions()[n]->GetExpSize();
2857  }
2858 
2859  // Count number of points
2860  int npoints = 0;
2861  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2862  {
2863  npoints += GetExp(ElmtID[cnt+n])->GetTotPoints();
2864  }
2865 
2866  // Initialise result
2867  bndElmt = Array<OneD, NekDouble> (npoints, 0.0);
2868 
2869  // Extract data
2870  int offsetPhys;
2871  int offsetElmt = 0;
2872  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2873  {
2874  nq = GetExp(ElmtID[cnt+n])->GetTotPoints();
2875  offsetPhys = GetPhys_Offset(ElmtID[cnt+n]);
2876  Vmath::Vcopy(nq, tmp1 = phys + offsetPhys, 1,
2877  tmp2 = bndElmt + offsetElmt, 1);
2878  offsetElmt += nq;
2879  }
2880  }
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:2092
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2075
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2302
const Array< OneD, const boost::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:2131
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1061
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 2470 of file ExpList.cpp.

References ASSERTL0.

Referenced by ExtractTracePhys().

2471  {
2472  ASSERTL0(false,
2473  "This method is not defined or valid for this class type");
2474  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2476 of file ExpList.cpp.

References ASSERTL0.

2479  {
2480  ASSERTL0(false,
2481  "This method is not defined or valid for this class type");
2482  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
void Nektar::MultiRegions::ExpList::v_FillBndCondFromField ( void  )
protectedvirtual

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

Definition at line 2639 of file ExpList.cpp.

References ASSERTL0.

Referenced by FillBndCondFromField().

2640  {
2641  ASSERTL0(false,
2642  "This method is not defined or valid for this class type");
2643  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
void Nektar::MultiRegions::ExpList::v_FillBndCondFromField ( const int  nreg)
protectedvirtual

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

Definition at line 2647 of file ExpList.cpp.

References ASSERTL0.

2648  {
2649  ASSERTL0(false,
2650  "This method is not defined or valid for this class type");
2651  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2691 of file ExpList.cpp.

References v_FwdTrans_IterPerExp().

Referenced by FwdTrans().

2694  {
2695  v_FwdTrans_IterPerExp(inarray,outarray);
2696  }
virtual void v_FwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:680
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 680 of file ExpList.cpp.

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

Referenced by FwdTrans_IterPerExp(), and v_FwdTrans().

682  {
683  Array<OneD,NekDouble> f(m_ncoeffs);
684 
685  IProductWRTBase_IterPerExp(inarray,f);
686  MultiplyByElmtInvMass(f,outarray);
687 
688  }
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:641
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:1660
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:976
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 2713 of file ExpList.cpp.

References GeneralMatrixOp_IterPerExp().

Referenced by GeneralMatrixOp().

2718  {
2719  GeneralMatrixOp_IterPerExp(gkey,inarray,outarray);
2720  }
void GeneralMatrixOp_IterPerExp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:905
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 2568 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBCValues().

2571  {
2572  ASSERTL0(false,
2573  "This method is not defined or valid for this class type");
2574  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2355 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBndCondExpansions().

2356  {
2357  ASSERTL0(false,
2358  "This method is not defined or valid for this class type");
2359  static Array<OneD,const boost::shared_ptr<ExpList> > result;
2360  return result;
2361  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2985 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBndConditions().

2986  {
2987  ASSERTL0(false,
2988  "This method is not defined or valid for this class type");
2989  static Array<OneD, const SpatialDomains::BoundaryConditionShPtr>
2990  result;
2991  return result;
2992  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
void Nektar::MultiRegions::ExpList::v_GetBndElmtExpansion ( int  i,
boost::shared_ptr< ExpList > &  result,
const bool  DeclareCoeffPhysArrays 
)
protectedvirtual

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

Definition at line 2794 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBndElmtExpansion().

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

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D.

Definition at line 2922 of file ExpList.cpp.

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

Referenced by GetBoundaryNormals().

2924  {
2925  int j, n, cnt, nq;
2926  int coordim = GetCoordim(0);
2927  Array<OneD, NekDouble> tmp;
2929 
2930  Array<OneD, int> ElmtID,EdgeID;
2931  GetBoundaryToElmtMap(ElmtID,EdgeID);
2932 
2933  // Initialise result
2934  normals = Array<OneD, Array<OneD, NekDouble> > (coordim);
2935  for (j = 0; j < coordim; ++j)
2936  {
2937  normals[j] = Array<OneD, NekDouble> (
2938  GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
2939  }
2940 
2941  // Skip other boundary regions
2942  for (cnt = n = 0; n < i; ++n)
2943  {
2944  cnt += GetBndCondExpansions()[n]->GetExpSize();
2945  }
2946 
2947  int offset;
2948  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2949  {
2950  offset = GetBndCondExpansions()[i]->GetPhys_Offset(n);
2951  nq = GetBndCondExpansions()[i]->GetExp(n)->GetTotPoints();
2952 
2953  elmt = GetExp(ElmtID[cnt+n]);
2954  const Array<OneD, const Array<OneD, NekDouble> > normalsElmt
2955  = elmt->GetSurfaceNormal(EdgeID[cnt+n]);
2956  // Copy to result
2957  for (j = 0; j < coordim; ++j)
2958  {
2959  Vmath::Vcopy(nq, normalsElmt[j], 1,
2960  tmp = normals[j] + offset, 1);
2961  }
2962  }
2963  }
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2075
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2302
const Array< OneD, const boost::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:2131
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1906
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1061
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 2967 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBoundaryToElmtMap().

2969  {
2970  ASSERTL0(false,
2971  "This method is not defined or valid for this class type");
2972  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2733 of file ExpList.cpp.

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

Referenced by GetCoords().

2736  {
2737  if (GetNumElmts() == 0)
2738  {
2739  return;
2740  }
2741 
2742  int i;
2743  Array<OneD, NekDouble> e_coord_0;
2744  Array<OneD, NekDouble> e_coord_1;
2745  Array<OneD, NekDouble> e_coord_2;
2746 
2747  switch(GetExp(0)->GetCoordim())
2748  {
2749  case 1:
2750  for(i= 0; i < (*m_exp).size(); ++i)
2751  {
2752  e_coord_0 = coord_0 + m_phys_offset[i];
2753  (*m_exp)[i]->GetCoords(e_coord_0);
2754  }
2755  break;
2756  case 2:
2757  ASSERTL0(coord_1.num_elements() != 0,
2758  "output coord_1 is not defined");
2759 
2760  for(i= 0; i < (*m_exp).size(); ++i)
2761  {
2762  e_coord_0 = coord_0 + m_phys_offset[i];
2763  e_coord_1 = coord_1 + m_phys_offset[i];
2764  (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1);
2765  }
2766  break;
2767  case 3:
2768  ASSERTL0(coord_1.num_elements() != 0,
2769  "output coord_1 is not defined");
2770  ASSERTL0(coord_2.num_elements() != 0,
2771  "output coord_2 is not defined");
2772 
2773  for(i= 0; i < (*m_exp).size(); ++i)
2774  {
2775  e_coord_0 = coord_0 + m_phys_offset[i];
2776  e_coord_1 = coord_1 + m_phys_offset[i];
2777  e_coord_2 = coord_2 + m_phys_offset[i];
2778  (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1,e_coord_2);
2779  }
2780  break;
2781  }
2782  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2075
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Definition: ExpList.h:623
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1906
std::vector< LibUtilities::FieldDefinitionsSharedPtr > Nektar::MultiRegions::ExpList::v_GetFieldDefinitions ( void  )
protectedvirtual

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

Definition at line 2174 of file ExpList.cpp.

Referenced by GetFieldDefinitions().

2175  {
2176  std::vector<LibUtilities::FieldDefinitionsSharedPtr> returnval;
2177  v_GetFieldDefinitions(returnval);
2178  return returnval;
2179  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2174
void Nektar::MultiRegions::ExpList::v_GetFieldDefinitions ( std::vector< LibUtilities::FieldDefinitionsSharedPtr > &  fielddef)
protectedvirtual

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

Definition at line 2181 of file ExpList.cpp.

References GeneralGetFieldDefinitions().

2182  {
2183  GeneralGetFieldDefinitions(fielddef);
2184  }
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:2066
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 2445 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetFwdBwdTracePhys().

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

References ASSERTL0.

2456  {
2457  ASSERTL0(false,
2458  "This method is not defined or valid for this class type");
2459  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
virtual LibUtilities::BasisSharedPtr Nektar::MultiRegions::ExpList::v_GetHomogeneousBasis ( void  )
inlineprivatevirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1462 of file ExpList.h.

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

Referenced by GetHomogeneousBasis().

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

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1945 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetHomoLen().

1946  {
1947  ASSERTL0(false,
1948  "This method is not defined or valid for this class type");
1949  NekDouble len = 0.0;
1950  return len;
1951  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
double NekDouble
const vector< bool > & Nektar::MultiRegions::ExpList::v_GetLeftAdjacentFaces ( void  ) const
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3D.

Definition at line 2461 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetLeftAdjacentFaces().

2462  {
2463  ASSERTL0(false,
2464  "This method is not defined or valid for this class type");
2465  static vector<bool> tmp;
2466  return tmp;
2467  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2412 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetNormals().

2414  {
2415  ASSERTL0(false,
2416  "This method is not defined or valid for this class type");
2417  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
virtual int Nektar::MultiRegions::ExpList::v_GetNumElmts ( void  )
inlineprotectedvirtual

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

Definition at line 1118 of file ExpList.h.

Referenced by GetNumElmts().

1119  {
1120  return (*m_exp).size();
1121  }
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 3028 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetPeriodicEntities().

3032  {
3033  ASSERTL0(false,
3034  "This method is not defined or valid for this class type");
3035  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
ExpListSharedPtr & Nektar::MultiRegions::ExpList::v_GetPlane ( int  n)
privatevirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 3051 of file ExpList.cpp.

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

Referenced by GetPlane().

3052  {
3053  ASSERTL0(false,
3054  "This method is not defined or valid for this class type");
3055  return NullExpListSharedPtr;
3056  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
static ExpListSharedPtr NullExpListSharedPtr
Definition: ExpList.h:1485
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 3018 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetRobinBCInfo().

3019  {
3020  ASSERTL0(false,
3021  "This method is not defined or valid for this class type");
3022  static map<int,RobinBCInfoSharedPtr> result;
3023  return result;
3024  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2391 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetTrace().

2392  {
2393  ASSERTL0(false,
2394  "This method is not defined or valid for this class type");
2395  static boost::shared_ptr<ExpList> returnVal;
2396  return returnVal;
2397  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
const Array< OneD, const int > & Nektar::MultiRegions::ExpList::v_GetTraceBndMap ( )
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D.

Definition at line 2407 of file ExpList.cpp.

References GetTraceMap().

Referenced by GetTraceBndMap().

2408  {
2409  return GetTraceMap()->GetBndCondTraceToGlobalTraceMap();
2410  }
boost::shared_ptr< AssemblyMapDG > & GetTraceMap(void)
Definition: ExpList.h:2164
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 2399 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetTraceMap().

2400  {
2401  ASSERTL0(false,
2402  "This method is not defined or valid for this class type");
2403  static boost::shared_ptr<AssemblyMapDG> result;
2404  return result;
2405  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
LibUtilities::TranspositionSharedPtr Nektar::MultiRegions::ExpList::v_GetTransposition ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1937 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetTransposition().

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

Definition at line 1961 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetYIDs().

1962  {
1963  ASSERTL0(false,
1964  "This method is not defined or valid for this class type");
1965  Array<OneD, unsigned int> NoModes(1);
1966  return NoModes;
1967  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
Array< OneD, const unsigned int > Nektar::MultiRegions::ExpList::v_GetZIDs ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1953 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetZIDs().

1954  {
1955  ASSERTL0(false,
1956  "This method is not defined or valid for this class type");
1957  Array<OneD, unsigned int> NoModes(1);
1958  return NoModes;
1959  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2669 of file ExpList.cpp.

References ASSERTL0.

Referenced by GlobalToLocal().

2670  {
2671  ASSERTL0(false,
2672  "This method is not defined or valid for this class type");
2673  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
void Nektar::MultiRegions::ExpList::v_GlobalToLocal ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

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

Definition at line 2676 of file ExpList.cpp.

References ASSERTL0.

2678  {
2679  ASSERTL0(false,
2680  "This method is not defined or valid for this class type");
2681  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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,
const bool  PhysSpaceForcing 
)
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 2539 of file ExpList.cpp.

References ASSERTL0.

Referenced by HomogeneousBwdTrans().

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

Reimplemented in Nektar::MultiRegions::ExpList3DHomogeneous1D.

Definition at line 1929 of file ExpList.cpp.

References ASSERTL0.

Referenced by HomogeneousEnergy().

1930  {
1931  ASSERTL0(false,
1932  "This method is not defined or valid for this class type");
1933  Array<OneD, NekDouble> NoEnergy(1,0.0);
1934  return NoEnergy;
1935  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2529 of file ExpList.cpp.

References ASSERTL0.

Referenced by HomogeneousFwdTrans().

2534  {
2535  ASSERTL0(false,
2536  "This method is not defined or valid for this class type");
2537  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2631 of file ExpList.cpp.

References ASSERTL0.

Referenced by ImposeDirichletConditions().

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

Definition at line 1915 of file ExpList.cpp.

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

Referenced by Integral().

1916  {
1917  NekDouble err = 0.0;
1918  int i = 0;
1919 
1920  for (i = 0; i < (*m_exp).size(); ++i)
1921  {
1922  err += (*m_exp)[m_offset_elmt_id[i]]->Integral(inarray + m_phys_offset[i]);
1923  }
1924  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
1925 
1926  return err;
1927  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
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:1058
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:966
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 2698 of file ExpList.cpp.

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

Referenced by IProductWRTBase().

2702  {
2703  Array<OneD,NekDouble> tmp;
2704  for (int i = 0; i < m_collections.size(); ++i)
2705  {
2706 
2708  inarray + m_coll_phys_offset[i],
2709  tmp = outarray + m_coll_coeff_offset[i]);
2710  }
2711  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1044
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1041
Collections::CollectionVector m_collections
Definition: ExpList.h:1038
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 356 of file ExpList.cpp.

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

Referenced by IProductWRTBase_IterPerExp().

359  {
360  Array<OneD,NekDouble> tmp;
361  for (int i = 0; i < m_collections.size(); ++i)
362  {
363 
365  inarray + m_coll_phys_offset[i],
366  tmp = outarray + m_coll_coeff_offset[i]);
367  }
368  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1044
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1041
Collections::CollectionVector m_collections
Definition: ExpList.h:1038
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 1885 of file ExpList.cpp.

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

Referenced by L2().

1888  {
1889  NekDouble err = 0.0, errl2;
1890  int i;
1891 
1892  if (soln == NullNekDouble1DArray)
1893  {
1894  for (i = 0; i < (*m_exp).size(); ++i)
1895  {
1896  errl2 = (*m_exp)[i]->L2(inarray + m_phys_offset[i]);
1897  err += errl2*errl2;
1898  }
1899  }
1900  else
1901  {
1902  for (i = 0; i < (*m_exp).size(); ++i)
1903  {
1904  errl2 = (*m_exp)[i]->L2(inarray + m_phys_offset[i],
1905  soln + m_phys_offset[i]);
1906  err += errl2*errl2;
1907  }
1908  }
1909 
1910  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
1911 
1912  return sqrt(err);
1913  }
static Array< OneD, NekDouble > NullNekDouble1DArray
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:966
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, and Nektar::MultiRegions::ContField3D.

Definition at line 2505 of file ExpList.cpp.

References ASSERTL0.

Referenced by LinearAdvectionDiffusionReactionSolve().

2512  {
2513  ASSERTL0(false,
2514  "This method is not defined or valid for this class type");
2515  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2517 of file ExpList.cpp.

References ASSERTL0.

Referenced by LinearAdvectionReactionSolve().

2524  {
2525  ASSERTL0(false,
2526  "This method is not defined or valid for this class type");
2527  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
void Nektar::MultiRegions::ExpList::v_LocalToGlobal ( bool  UseComm)
protectedvirtual

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

Definition at line 2653 of file ExpList.cpp.

References ASSERTL0.

Referenced by LocalToGlobal().

2654  {
2655  ASSERTL0(false,
2656  "This method is not defined or valid for this class type");
2657  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
void Nektar::MultiRegions::ExpList::v_LocalToGlobal ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
bool  UseComm 
)
protectedvirtual

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

Definition at line 2660 of file ExpList.cpp.

References ASSERTL0.

2663  {
2664  ASSERTL0(false,
2665  "This method is not defined or valid for this class type");
2666  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2484 of file ExpList.cpp.

References ASSERTL0.

Referenced by MultiplyByInvMassMatrix().

2488  {
2489  ASSERTL0(false,
2490  "This method is not defined or valid for this class type");
2491  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2576 of file ExpList.cpp.

References ASSERTL0.

Referenced by NormVectorIProductWRTBase().

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

Definition at line 2585 of file ExpList.cpp.

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

2588  {
2589  Array< OneD, NekDouble> tmp;
2590  switch (GetCoordim(0))
2591  {
2592  case 1:
2593  {
2594  for(int i = 0; i < GetExpSize(); ++i)
2595  {
2596  (*m_exp)[i]->NormVectorIProductWRTBase(
2597  V[0] + GetPhys_Offset(i),
2598  tmp = outarray + GetCoeff_Offset(i));
2599  }
2600  }
2601  break;
2602  case 2:
2603  {
2604  for(int i = 0; i < GetExpSize(); ++i)
2605  {
2606  (*m_exp)[i]->NormVectorIProductWRTBase(
2607  V[0] + GetPhys_Offset(i),
2608  V[1] + GetPhys_Offset(i),
2609  tmp = outarray + GetCoeff_Offset(i));
2610  }
2611  }
2612  break;
2613  case 3:
2614  {
2615  for(int i = 0; i < GetExpSize(); ++i)
2616  {
2617  (*m_exp)[i]->NormVectorIProductWRTBase(
2618  V[0] + GetPhys_Offset(i),
2619  V[1] + GetPhys_Offset(i),
2620  V[2] + GetPhys_Offset(i),
2621  tmp = outarray + GetCoeff_Offset(i));
2622  }
2623  }
2624  break;
2625  default:
2626  ASSERTL0(false,"Dimension not supported");
2627  break;
2628  }
2629  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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:2084
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:2092
int GetExpSize(void)
This function returns the number of elements in the expansion.
Definition: ExpList.h:2054
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1906
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 490 of file ExpList.cpp.

References m_coll_phys_offset, and m_collections.

Referenced by PhysDeriv(), and v_PhysDeriv().

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

Definition at line 513 of file ExpList.cpp.

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

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

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

523  {
524  int i;
525  if(edir==MultiRegions::eS)
526  {
527  Array<OneD, NekDouble> e_out_ds;
528  for(i=0; i<(*m_exp).size(); ++i)
529  {
530  e_out_ds = out_d + m_phys_offset[i];
531  (*m_exp)[i]->PhysDeriv_s(inarray+m_phys_offset[i],e_out_ds);
532  }
533  }
534  else if(edir==MultiRegions::eN)
535  {
536  Array<OneD, NekDouble > e_out_dn;
537  for(i=0; i<(*m_exp).size(); i++)
538  {
539  e_out_dn = out_d +m_phys_offset[i];
540  (*m_exp)[i]->PhysDeriv_n(inarray+m_phys_offset[i],e_out_dn);
541  }
542  }
543  else
544  {
545  // convert enum into int
546  int intdir= (int)edir;
547  Array<OneD, NekDouble> e_out_d;
548  int offset;
549  for (int i = 0; i < m_collections.size(); ++i)
550  {
551  offset = m_coll_phys_offset[i];
552  e_out_d = out_d + offset;
553 
554  m_collections[i].ApplyOperator(Collections::ePhysDeriv,
555  intdir,
556  inarray + offset,
557  e_out_d);
558  }
559  }
560  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1044
Collections::CollectionVector m_collections
Definition: ExpList.h:1038
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 1976 of file ExpList.cpp.

References ASSERTL0.

Referenced by PhysGalerkinProjection1DScaled().

1976  {
1977  ASSERTL0(false,
1978  "This method is not defined or valid for this class type");
1979  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 1970 of file ExpList.cpp.

References ASSERTL0.

Referenced by PhysInterp1DScaled().

1971  {
1972  ASSERTL0(false,
1973  "This method is not defined or valid for this class type");
1974  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
void Nektar::MultiRegions::ExpList::v_ReadGlobalOptimizationParameters ( )
protectedvirtual

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

Definition at line 2976 of file ExpList.cpp.

References ASSERTL0.

Referenced by ReadGlobalOptimizationParameters().

2977  {
2978  ASSERTL0(false,
2979  "This method is not defined or valid for this class type");
2980  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 1513 of file ExpList.cpp.

References m_exp, and m_graph.

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

1514  {
1515  // Reset matrix managers.
1516  LibUtilities::NekManager<LocalRegions::MatrixKey,
1517  DNekScalMat, LocalRegions::MatrixKey::opLess>::ClearManager();
1518  LibUtilities::NekManager<LocalRegions::MatrixKey,
1519  DNekScalBlkMat, LocalRegions::MatrixKey::opLess>::ClearManager();
1520 
1521  // Loop over all elements and reset geometry information.
1522  for (int i = 0; i < m_exp->size(); ++i)
1523  {
1524  (*m_exp)[i]->GetGeom()->Reset(m_graph->GetCurvedEdges(),
1525  m_graph->GetCurvedFaces());
1526  }
1527 
1528  // Loop over all elements and rebuild geometric factors.
1529  for (int i = 0; i < m_exp->size(); ++i)
1530  {
1531  (*m_exp)[i]->Reset();
1532  }
1533  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
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:972
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 1470 of file ExpList.h.

References ASSERTL0.

Referenced by SetHomo1DSpecVanVisc().

1471  {
1472  ASSERTL0(false,
1473  "This method is not defined or valid for this class type");
1474  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
void Nektar::MultiRegions::ExpList::v_SetUpPhysNormals ( )
protectedvirtual

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

Definition at line 2786 of file ExpList.cpp.

References ASSERTL0.

Referenced by SetUpPhysNormals().

2787  {
2788  ASSERTL0(false,
2789  "This method is not defined or valid for this class type");
2790  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 712 of file ExpList.cpp.

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

Referenced by SmoothField().

713  {
714  // Do nothing unless the method is implemented in the appropriate
715  // class, i.e. ContField1D,ContField2D, etc.
716 
717  // So far it has been implemented just for ContField2D and
718  // ContField3DHomogeneous1D
719 
720  // Block in case users try the smoothing with a modal expansion.
721  // Maybe a different techique for the smoothing require
722  // implementation for modal basis.
723 
724  ASSERTL0((*m_exp)[0]->GetBasisType(0)
726  (*m_exp)[0]->GetBasisType(0)
728  "Smoothing is currently not allowed unless you are using "
729  "a nodal base for efficiency reasons. The implemented "
730  "smoothing technique requires the mass matrix inversion "
731  "which is trivial just for GLL_LAGRANGE_SEM and "
732  "GAUSS_LAGRANGE_SEMexpansions.");
733  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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:1036
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 2363 of file ExpList.cpp.

References ASSERTL0.

Referenced by UpdateBndCondExpansion().

2364  {
2365  ASSERTL0(false,
2366  "This method is not defined or valid for this class type");
2367  static boost::shared_ptr<ExpList> result;
2368  return result;
2369  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2996 of file ExpList.cpp.

References ASSERTL0.

Referenced by UpdateBndConditions().

2997  {
2998  ASSERTL0(false,
2999  "This method is not defined or valid for this class type");
3000  static Array<OneD, SpatialDomains::BoundaryConditionShPtr> result;
3001  return result;
3002  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2371 of file ExpList.cpp.

References ASSERTL0.

Referenced by Upwind().

2376  {
2377  ASSERTL0(false,
2378  "This method is not defined or valid for this class type");
2379  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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 2381 of file ExpList.cpp.

References ASSERTL0.

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

Reimplemented in Nektar::MultiRegions::ExpList3DHomogeneous1D.

Definition at line 1673 of file ExpList.cpp.

References ASSERTL0, and m_exp.

Referenced by WriteTecplotConnectivity().

1675  {
1676  int i,j,k,l;
1677  int nbase = (*m_exp)[0]->GetNumBases();
1678  int cnt = 0;
1679 
1680  boost::shared_ptr<LocalRegions::ExpansionVector> exp = m_exp;
1681 
1682  if (expansion != -1)
1683  {
1684  exp = boost::shared_ptr<LocalRegions::ExpansionVector>(
1686  (*exp)[0] = (*m_exp)[expansion];
1687  }
1688 
1689  if (nbase == 2)
1690  {
1691  for(i = 0; i < (*exp).size(); ++i)
1692  {
1693  const int np0 = (*exp)[i]->GetNumPoints(0);
1694  const int np1 = (*exp)[i]->GetNumPoints(1);
1695 
1696  for(j = 1; j < np1; ++j)
1697  {
1698  for(k = 1; k < np0; ++k)
1699  {
1700  outfile << cnt + (j-1)*np0 + k << " ";
1701  outfile << cnt + (j-1)*np0 + k+1 << " ";
1702  outfile << cnt + j *np0 + k+1 << " ";
1703  outfile << cnt + j *np0 + k << endl;
1704  }
1705  }
1706 
1707  cnt += np0*np1;
1708  }
1709  }
1710  else if (nbase == 3)
1711  {
1712  for(i = 0; i < (*exp).size(); ++i)
1713  {
1714  const int np0 = (*exp)[i]->GetNumPoints(0);
1715  const int np1 = (*exp)[i]->GetNumPoints(1);
1716  const int np2 = (*exp)[i]->GetNumPoints(2);
1717  const int np01 = np0*np1;
1718 
1719  for(j = 1; j < np2; ++j)
1720  {
1721  for(k = 1; k < np1; ++k)
1722  {
1723  for(l = 1; l < np0; ++l)
1724  {
1725  outfile << cnt + (j-1)*np01 + (k-1)*np0 + l << " ";
1726  outfile << cnt + (j-1)*np01 + (k-1)*np0 + l+1 << " ";
1727  outfile << cnt + (j-1)*np01 + k *np0 + l+1 << " ";
1728  outfile << cnt + (j-1)*np01 + k *np0 + l << " ";
1729  outfile << cnt + j *np01 + (k-1)*np0 + l << " ";
1730  outfile << cnt + j *np01 + (k-1)*np0 + l+1 << " ";
1731  outfile << cnt + j *np01 + k *np0 + l+1 << " ";
1732  outfile << cnt + j *np01 + k *np0 + l << endl;
1733  }
1734  }
1735  }
1736  cnt += np0*np1*np2;
1737  }
1738  }
1739  else
1740  {
1741  ASSERTL0(false,"Not set up for this dimension");
1742  }
1743  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
std::vector< ExpansionSharedPtr > ExpansionVector
Definition: Expansion.h:70
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
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 1750 of file ExpList.cpp.

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

Referenced by WriteTecplotField().

1751  {
1752  if (expansion == -1)
1753  {
1754  int totpoints = GetTotPoints();
1755  if(m_physState == false)
1756  {
1758  }
1759 
1760  for(int i = 0; i < totpoints; ++i)
1761  {
1762  outfile << m_phys[i] << " ";
1763  if(i % 1000 == 0 && i)
1764  {
1765  outfile << std::endl;
1766  }
1767  }
1768  outfile << std::endl;
1769 
1770  }
1771  else
1772  {
1773  int nPoints = (*m_exp)[expansion]->GetTotPoints();
1774 
1775  for (int i = 0; i < nPoints; ++i)
1776  {
1777  outfile << m_phys[i + m_phys_offset[expansion]] << " ";
1778  }
1779 
1780  outfile << std::endl;
1781  }
1782  }
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.h:1699
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1543
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
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 1540 of file ExpList.cpp.

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

Referenced by WriteTecplotHeader().

1542  {
1543  if (GetNumElmts() == 0)
1544  {
1545  return;
1546  }
1547 
1548  int coordim = GetExp(0)->GetCoordim();
1549  char vars[3] = { 'x', 'y', 'z' };
1550 
1551  if (m_expType == e3DH1D)
1552  {
1553  coordim += 1;
1554  }
1555  else if (m_expType == e3DH2D)
1556  {
1557  coordim += 2;
1558  }
1559 
1560  outfile << "Variables = x";
1561  for (int i = 1; i < coordim; ++i)
1562  {
1563  outfile << ", " << vars[i];
1564  }
1565 
1566  if (var.size() > 0)
1567  {
1568  outfile << ", " << var;
1569  }
1570 
1571  outfile << std::endl << std::endl;
1572  }
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2075
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Definition: ExpList.h:623
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 1579 of file ExpList.cpp.

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

Referenced by WriteTecplotZone().

1580  {
1581  int i, j;
1582  int coordim = GetCoordim(0);
1583  int nPoints = GetTotPoints();
1584  int nBases = (*m_exp)[0]->GetNumBases();
1585  int numBlocks = 0;
1586 
1587  Array<OneD, Array<OneD, NekDouble> > coords(3);
1588 
1589  if (expansion == -1)
1590  {
1591  nPoints = GetTotPoints();
1592 
1593  coords[0] = Array<OneD, NekDouble>(nPoints);
1594  coords[1] = Array<OneD, NekDouble>(nPoints);
1595  coords[2] = Array<OneD, NekDouble>(nPoints);
1596 
1597  GetCoords(coords[0], coords[1], coords[2]);
1598 
1599  for (i = 0; i < m_exp->size(); ++i)
1600  {
1601  int numInt = 1;
1602 
1603  for (j = 0; j < nBases; ++j)
1604  {
1605  numInt *= (*m_exp)[i]->GetNumPoints(j)-1;
1606  }
1607 
1608  numBlocks += numInt;
1609  }
1610  }
1611  else
1612  {
1613  nPoints = (*m_exp)[expansion]->GetTotPoints();
1614 
1615  coords[0] = Array<OneD, NekDouble>(nPoints);
1616  coords[1] = Array<OneD, NekDouble>(nPoints);
1617  coords[2] = Array<OneD, NekDouble>(nPoints);
1618 
1619  (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
1620 
1621  numBlocks = 1;
1622  for (j = 0; j < nBases; ++j)
1623  {
1624  numBlocks *= (*m_exp)[expansion]->GetNumPoints(j)-1;
1625  }
1626  }
1627 
1628  if (m_expType == e3DH1D)
1629  {
1630  nBases += 1;
1631  coordim += 1;
1632  int nPlanes = GetZIDs().num_elements();
1633  NekDouble tmp = numBlocks * (nPlanes-1.0) / nPlanes;
1634  numBlocks = (int)tmp;
1635  }
1636  else if (m_expType == e3DH2D)
1637  {
1638  nBases += 2;
1639  coordim += 1;
1640  }
1641 
1642  outfile << "Zone, N=" << nPoints << ", E="
1643  << numBlocks << ", F=FEBlock" ;
1644 
1645  switch(nBases)
1646  {
1647  case 2:
1648  outfile << ", ET=QUADRILATERAL" << std::endl;
1649  break;
1650  case 3:
1651  outfile << ", ET=BRICK" << std::endl;
1652  break;
1653  default:
1654  ASSERTL0(false,"Not set up for this type of output");
1655  break;
1656  }
1657 
1658  // Write out coordinates
1659  for (j = 0; j < coordim; ++j)
1660  {
1661  for (i = 0; i < nPoints; ++i)
1662  {
1663  outfile << coords[j][i] << " ";
1664  if (i % 1000 == 0 && i)
1665  {
1666  outfile << std::endl;
1667  }
1668  }
1669  outfile << std::endl;
1670  }
1671  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
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:564
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:1777
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1543
double NekDouble
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1906
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 1809 of file ExpList.cpp.

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

Referenced by WriteVtkPieceData().

1811  {
1812  int i;
1813  int nq = (*m_exp)[expansion]->GetTotPoints();
1814 
1815  // printing the fields of that zone
1816  outfile << " <DataArray type=\"Float64\" Name=\""
1817  << var << "\">" << endl;
1818  outfile << " ";
1819  const Array<OneD, NekDouble> phys = m_phys + m_phys_offset[expansion];
1820  for(i = 0; i < nq; ++i)
1821  {
1822  outfile << (fabs(phys[i]) < NekConstants::kNekZeroTol ? 0 : phys[i]) << " ";
1823  }
1824  outfile << endl;
1825  outfile << " </DataArray>" << endl;
1826  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
static const NekDouble kNekZeroTol
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
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 402 of file ExpList.h.

References v_WriteTecplotConnectivity().

404  {
405  v_WriteTecplotConnectivity(outfile, expansion);
406  }
virtual void v_WriteTecplotConnectivity(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:1673
void Nektar::MultiRegions::ExpList::WriteTecplotField ( std::ostream &  outfile,
int  expansion = -1 
)
inline

Definition at line 396 of file ExpList.h.

References v_WriteTecplotField().

398  {
399  v_WriteTecplotField(outfile, expansion);
400  }
virtual void v_WriteTecplotField(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:1750
void Nektar::MultiRegions::ExpList::WriteTecplotHeader ( std::ostream &  outfile,
std::string  var = "" 
)
inline

Definition at line 383 of file ExpList.h.

References v_WriteTecplotHeader().

385  {
386  v_WriteTecplotHeader(outfile, var);
387  }
virtual void v_WriteTecplotHeader(std::ostream &outfile, std::string var="")
Definition: ExpList.cpp:1540
void Nektar::MultiRegions::ExpList::WriteTecplotZone ( std::ostream &  outfile,
int  expansion = -1 
)
inline

Definition at line 389 of file ExpList.h.

References v_WriteTecplotZone().

392  {
393  v_WriteTecplotZone(outfile, expansion);
394  }
virtual void v_WriteTecplotZone(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:1579
void Nektar::MultiRegions::ExpList::WriteVtkFooter ( std::ostream &  outfile)

Definition at line 1792 of file ExpList.cpp.

1793  {
1794  outfile << " </UnstructuredGrid>" << endl;
1795  outfile << "</VTKFile>" << endl;
1796  }
void Nektar::MultiRegions::ExpList::WriteVtkHeader ( std::ostream &  outfile)

Definition at line 1784 of file ExpList.cpp.

1785  {
1786  outfile << "<?xml version=\"1.0\"?>" << endl;
1787  outfile << "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" "
1788  << "byte_order=\"LittleEndian\">" << endl;
1789  outfile << " <UnstructuredGrid>" << endl;
1790  }
void Nektar::MultiRegions::ExpList::WriteVtkPieceData ( std::ostream &  outfile,
int  expansion,
std::string  var = "v" 
)
inline

Definition at line 421 of file ExpList.h.

References v_WriteVtkPieceData().

425  {
426  v_WriteVtkPieceData(outfile, expansion, var);
427  }
virtual void v_WriteVtkPieceData(std::ostream &outfile, int expansion, std::string var)
Definition: ExpList.cpp:1809
void Nektar::MultiRegions::ExpList::WriteVtkPieceFooter ( std::ostream &  outfile,
int  expansion 
)

Definition at line 1803 of file ExpList.cpp.

1804  {
1805  outfile << " </PointData>" << endl;
1806  outfile << " </Piece>" << endl;
1807  }
void Nektar::MultiRegions::ExpList::WriteVtkPieceHeader ( std::ostream &  outfile,
int  expansion,
int  istrip = 0 
)
inline

Definition at line 411 of file ExpList.h.

References v_WriteVtkPieceHeader().

413  {
414  v_WriteVtkPieceHeader(outfile, expansion, istrip);
415  }
virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip)
Definition: ExpList.cpp:1798

Member Data Documentation

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

Definition at line 1062 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 998 of file ExpList.h.

Referenced by Nektar::MultiRegions::ContField2D::Assemble(), Nektar::MultiRegions::ContField3D::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::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 1041 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 1044 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::unordered_map<int, int> Nektar::MultiRegions::ExpList::m_elmtToExpId
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 1036 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::DisContField1D::v_AddTraceIntegral(), 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 952 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 976 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 969 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(), v_CurlCurl(), Nektar::MultiRegions::ExpListHomogeneous1D::v_DealiasedDotProd(), 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