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

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

#include <ExpList.h>

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

Public Member Functions

 ExpList ()
 The default constructor. More...
 
 ExpList (const LibUtilities::SessionReaderSharedPtr &pSession)
 The default constructor. More...
 
 ExpList (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
 The default constructor. More...
 
 ExpList (const ExpList &in, const std::vector< unsigned int > &eIDs, const bool DeclareCoeffPhysArrays=true)
 Constructor copying only elements defined in eIds. More...
 
 ExpList (const ExpList &in, const bool DeclareCoeffPhysArrays=true)
 The copy constructor. More...
 
virtual ~ExpList ()
 The default destructor. More...
 
int GetNcoeffs (void) const
 Returns the total number of local degrees of freedom $N_{\mathrm{eof}}=\sum_{e=1}^{{N_{\mathrm{el}}}}N^{e}_m$. More...
 
int GetNcoeffs (const int eid) const
 Returns the total number of local degrees of freedom for element eid. More...
 
ExpansionType GetExpType (void)
 Returns the type of the expansion. More...
 
void SetExpType (ExpansionType Type)
 Returns the type of the expansion. More...
 
int EvalBasisNumModesMax (void) const
 Evaulates the maximum number of modes in the elemental basis order over all elements. More...
 
const Array< OneD, int > EvalBasisNumModesMaxPerExp (void) const
 Returns the vector of the number of modes in the elemental basis order over all elements. More...
 
int GetTotPoints (void) const
 Returns the total number of quadrature points m_npoints $=Q_{\mathrm{tot}}$. More...
 
int GetTotPoints (const int eid) const
 Returns the total number of quadrature points for eid's element $=Q_{\mathrm{tot}}$. More...
 
int GetNpoints (void) const
 Returns the total number of quadrature points m_npoints $=Q_{\mathrm{tot}}$. More...
 
int Get1DScaledTotPoints (const NekDouble scale) const
 Returns the total number of qudature points scaled by the factor scale on each 1D direction. More...
 
void SetWaveSpace (const bool wavespace)
 Sets the wave space to the one of the possible configuration true or false. More...
 
void SetModifiedBasis (const bool modbasis)
 Set Modified Basis for the stability analysis. More...
 
void SetPhys (int i, NekDouble val)
 Set the i th value of m_phys to value val. More...
 
bool GetWaveSpace (void) const
 This function returns the third direction expansion condition, which can be in wave space (coefficient) or not It is stored in the variable m_WaveSpace. More...
 
void SetPhys (const Array< OneD, const NekDouble > &inarray)
 Fills the array m_phys. More...
 
void SetPhysArray (Array< OneD, NekDouble > &inarray)
 Sets the array m_phys. More...
 
void SetPhysState (const bool physState)
 This function manually sets whether the array of physical values $\boldsymbol{u}_l$ (implemented as m_phys) is filled or not. More...
 
bool GetPhysState (void) const
 This function indicates whether the array of physical values $\boldsymbol{u}_l$ (implemented as m_phys) is filled or not. More...
 
NekDouble PhysIntegral (void)
 This function integrates a function $f(\boldsymbol{x})$ over the domain consisting of all the elements of the expansion. More...
 
NekDouble PhysIntegral (const Array< OneD, const NekDouble > &inarray)
 This function integrates a function $f(\boldsymbol{x})$ over the domain consisting of all the elements of the expansion. More...
 
void IProductWRTBase_IterPerExp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function calculates the inner product of a function $f(\boldsymbol{x})$ with respect to all {local} expansion modes $\phi_n^e(\boldsymbol{x})$. More...
 
void IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
 
void IProductWRTDerivBase (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function calculates the inner product of a function $f(\boldsymbol{x})$ with respect to the derivative (in direction. More...
 
void IProductWRTDerivBase (const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, NekDouble > &outarray)
 This function calculates the inner product of a function $f(\boldsymbol{x})$ with respect to the derivative (in direction. More...
 
void FwdTrans_IterPerExp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function elementally evaluates the forward transformation of a function $u(\boldsymbol{x})$ onto the global spectral/hp expansion. More...
 
void FwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
 
void MultiplyByElmtInvMass (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function elementally mulplies the coefficient space of Sin my the elemental inverse of the mass matrix. More...
 
void MultiplyByInvMassMatrix (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
 
void SmoothField (Array< OneD, NekDouble > &field)
 Smooth a field across elements. More...
 
void HelmSolve (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const FlagList &flags, const StdRegions::ConstFactorMap &factors, const StdRegions::VarCoeffMap &varcoeff=StdRegions::NullVarCoeffMap, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
 Solve helmholtz problem. More...
 
void LinearAdvectionDiffusionReactionSolve (const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, CoeffState coeffstate=eLocal, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
 Solve Advection Diffusion Reaction. More...
 
void LinearAdvectionReactionSolve (const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, CoeffState coeffstate=eLocal, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
 Solve Advection Diffusion Reaction. More...
 
void FwdTrans_BndConstrained (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void BwdTrans_IterPerExp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function elementally evaluates the backward transformation of the global spectral/hp element expansion. More...
 
void BwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
 
void GetCoords (Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1=NullNekDouble1DArray, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
 This function calculates the coordinates of all the elemental quadrature points $\boldsymbol{x}_i$. More...
 
void HomogeneousFwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
 
void HomogeneousBwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
 
void DealiasedProd (const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
 
void GetBCValues (Array< OneD, NekDouble > &BndVals, const Array< OneD, NekDouble > &TotField, int BndID)
 
void NormVectorIProductWRTBase (Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
 
void NormVectorIProductWRTBase (Array< OneD, Array< OneD, NekDouble > > &V, Array< OneD, NekDouble > &outarray)
 
void ApplyGeomInfo ()
 Apply geometry information to each expansion. More...
 
void Reset ()
 Reset geometry information and reset matrices. More...
 
void WriteTecplotHeader (std::ostream &outfile, std::string var="")
 
void WriteTecplotZone (std::ostream &outfile, int expansion=-1)
 
void WriteTecplotField (std::ostream &outfile, int expansion=-1)
 
void WriteTecplotConnectivity (std::ostream &outfile, int expansion=-1)
 
void WriteVtkHeader (std::ostream &outfile)
 
void WriteVtkFooter (std::ostream &outfile)
 
void WriteVtkPieceHeader (std::ostream &outfile, int expansion, int istrip=0)
 
void WriteVtkPieceFooter (std::ostream &outfile, int expansion)
 
void WriteVtkPieceData (std::ostream &outfile, int expansion, std::string var="v")
 
int GetCoordim (int eid)
 This function returns the dimension of the coordinates of the element eid. More...
 
void SetCoeff (int i, NekDouble val)
 Set the i th coefficiient in m_coeffs to value val. More...
 
void SetCoeffs (int i, NekDouble val)
 Set the i th coefficiient in m_coeffs to value val. More...
 
void SetCoeffsArray (Array< OneD, NekDouble > &inarray)
 Set the m_coeffs array to inarray. More...
 
const Array< OneD, const
NekDouble > & 
GetCoeffs () const
 This function returns (a reference to) the array $\boldsymbol{\hat{u}}_l$ (implemented as m_coeffs) containing all local expansion coefficients. More...
 
void ImposeDirichletConditions (Array< OneD, NekDouble > &outarray)
 Impose Dirichlet Boundary Conditions onto Array. More...
 
void FillBndCondFromField (void)
 Fill Bnd Condition expansion from the values stored in expansion. More...
 
void LocalToGlobal (void)
 Put the coefficients into global ordering using m_coeffs. More...
 
void GlobalToLocal (void)
 Put the coefficients into local ordering and place in m_coeffs. More...
 
NekDouble GetCoeff (int i)
 Get the i th value (coefficient) of m_coeffs. More...
 
NekDouble GetCoeffs (int i)
 Get the i th value (coefficient) of m_coeffs. More...
 
const Array< OneD, const
NekDouble > & 
GetPhys () const
 This function returns (a reference to) the array $\boldsymbol{u}_l$ (implemented as m_phys) containing the function $u^{\delta}(\boldsymbol{x})$ evaluated at the quadrature points. More...
 
NekDouble Linf (const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
 This function calculates the $L_\infty$ error of the global spectral/hp element approximation. More...
 
NekDouble L2 (const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
 This function calculates the $L_2$ error with respect to soln of the global spectral/hp element approximation. More...
 
NekDouble H1 (const Array< OneD, const NekDouble > &inarray, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
 Calculates the $H^1$ error of the global spectral/hp element approximation. More...
 
NekDouble Integral (const Array< OneD, const NekDouble > &inarray)
 
Array< OneD, const NekDoubleHomogeneousEnergy (void)
 This function calculates the energy associated with each one of the modesof a 3D homogeneous nD expansion. More...
 
void SetHomo1DSpecVanVisc (Array< OneD, NekDouble > visc)
 This function sets the Spectral Vanishing Viscosity in homogeneous1D expansion. More...
 
Array< OneD, const unsigned int > GetZIDs (void)
 This function returns a vector containing the wave numbers in z-direction associated with the 3D homogenous expansion. Required if a parellelisation is applied in the Fourier direction. More...
 
LibUtilities::TranspositionSharedPtr GetTransposition (void)
 This function returns the transposition class associaed with the homogeneous expansion. More...
 
NekDouble GetHomoLen (void)
 This function returns the Width of homogeneous direction associaed with the homogeneous expansion. More...
 
Array< OneD, const unsigned int > GetYIDs (void)
 This function returns a vector containing the wave numbers in y-direction associated with the 3D homogenous expansion. Required if a parellelisation is applied in the Fourier direction. More...
 
void PhysInterp1DScaled (const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function interpolates the physical space points in inarray to outarray using the same points defined in the expansion but where the number of points are rescaled by 1DScale. More...
 
void PhysGalerkinProjection1DScaled (const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 This function Galerkin projects the physical space points in inarray to outarray where inarray is assumed to be defined in the expansion but where the number of points are rescaled by 1DScale. More...
 
int GetExpSize (void)
 This function returns the number of elements in the expansion. More...
 
int GetNumElmts (void)
 This function returns the number of elements in the expansion which may be different for a homogeoenous extended expansionp. More...
 
const boost::shared_ptr
< LocalRegions::ExpansionVector
GetExp () const
 This function returns the vector of elements in the expansion. More...
 
LocalRegions::ExpansionSharedPtrGetExp (int n) const
 This function returns (a shared pointer to) the local elemental expansion of the $n^{\mathrm{th}}$ element. More...
 
LocalRegions::ExpansionSharedPtrGetExp (const Array< OneD, const NekDouble > &gloCoord)
 This function returns (a shared pointer to) the local elemental expansion containing the arbitrary point given by gloCoord. More...
 
int GetExpIndex (const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false)
 
int GetExpIndex (const Array< OneD, const NekDouble > &gloCoords, Array< OneD, NekDouble > &locCoords, NekDouble tol=0.0, bool returnNearestElmt=false)
 
int GetCoeff_Offset (int n) const
 Get the start offset position for a global list of m_coeffs correspoinding to element n. More...
 
int GetPhys_Offset (int n) const
 Get the start offset position for a global list of m_phys correspoinding to element n. More...
 
int GetOffset_Elmt_Id (int n) const
 Get the element id associated with the n th consecutive block of data in m_phys and m_coeffs. More...
 
Array< OneD, NekDouble > & UpdateCoeffs ()
 This function returns (a reference to) the array $\boldsymbol{\hat{u}}_l$ (implemented as m_coeffs) containing all local expansion coefficients. More...
 
Array< OneD, NekDouble > & UpdatePhys ()
 This function returns (a reference to) the array $\boldsymbol{u}_l$ (implemented as m_phys) containing the function $u^{\delta}(\boldsymbol{x})$ evaluated at the quadrature points. More...
 
void PhysDeriv (Direction edir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d)
 
void PhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1=NullNekDouble1DArray, Array< OneD, NekDouble > &out_d2=NullNekDouble1DArray)
 This function discretely evaluates the derivative of a function $f(\boldsymbol{x})$ on the domain consisting of all elements of the expansion. More...
 
void PhysDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d)
 
const Array< OneD, const
boost::shared_ptr< ExpList > > & 
GetBndCondExpansions ()
 
boost::shared_ptr< ExpList > & UpdateBndCondExpansion (int i)
 
void Upwind (const Array< OneD, const Array< OneD, NekDouble > > &Vec, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
 
void Upwind (const Array< OneD, const NekDouble > &Vn, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
 
boost::shared_ptr< ExpList > & GetTrace ()
 
boost::shared_ptr
< AssemblyMapDG > & 
GetTraceMap (void)
 
const Array< OneD, const int > & GetTraceBndMap (void)
 
void GetNormals (Array< OneD, Array< OneD, NekDouble > > &normals)
 
void AddTraceIntegral (const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
 
void AddTraceIntegral (const Array< OneD, const NekDouble > &Fn, Array< OneD, NekDouble > &outarray)
 
void AddFwdBwdTraceIntegral (const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
 
void GetFwdBwdTracePhys (Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
 
void GetFwdBwdTracePhys (const Array< OneD, const NekDouble > &field, Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
 
const 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)
 
void ExtractElmtToBndPhys (int i, Array< OneD, NekDouble > &elmt, Array< OneD, NekDouble > &boundary)
 
void ExtractPhysToBndElmt (int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bndElmt)
 
void GetBoundaryNormals (int i, Array< OneD, Array< OneD, NekDouble > > &normals)
 
void GeneralGetFieldDefinitions (std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef, int NumHomoDir=0, Array< OneD, LibUtilities::BasisSharedPtr > &HomoBasis=LibUtilities::NullBasisSharedPtr1DArray, std::vector< NekDouble > &HomoLen=LibUtilities::NullNekDoubleVector, bool homoStrips=false, std::vector< unsigned int > &HomoSIDs=LibUtilities::NullUnsignedIntVector, std::vector< unsigned int > &HomoZIDs=LibUtilities::NullUnsignedIntVector, std::vector< unsigned int > &HomoYIDs=LibUtilities::NullUnsignedIntVector)
 
const
NekOptimize::GlobalOptParamSharedPtr
GetGlobalOptParam (void)
 
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 ()
 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)
 
virtual void v_LinearAdvectionDiffusionReactionSolve (const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, CoeffState coeffstate=eLocal, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
 
virtual void v_LinearAdvectionReactionSolve (const Array< OneD, Array< OneD, NekDouble > > &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, CoeffState coeffstate=eLocal, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
 
virtual void v_ImposeDirichletConditions (Array< OneD, NekDouble > &outarray)
 
virtual void v_FillBndCondFromField ()
 
virtual void v_Reset ()
 Reset geometry information, metrics, matrix managers and geometry information. More...
 
virtual void v_LocalToGlobal (void)
 
virtual void v_GlobalToLocal (void)
 
virtual void v_BwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
 
virtual void v_BwdTrans_IterPerExp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_FwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
 
virtual void v_FwdTrans_IterPerExp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_SmoothField (Array< OneD, NekDouble > &field)
 
virtual void v_IProductWRTBase (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
 
virtual void v_IProductWRTBase_IterPerExp (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_GeneralMatrixOp (const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
 
virtual void v_GetCoords (Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
 
virtual void v_PhysDeriv (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2)
 
virtual void v_PhysDeriv (const int dir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d)
 
virtual void v_PhysDeriv (Direction edir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d)
 
virtual void v_HomogeneousFwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
 
virtual void v_HomogeneousBwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal, bool Shuff=true, bool UnShuff=true)
 
virtual void v_DealiasedProd (const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
 
virtual void v_GetBCValues (Array< OneD, NekDouble > &BndVals, const Array< OneD, NekDouble > &TotField, int BndID)
 
virtual void v_NormVectorIProductWRTBase (Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
 
virtual void v_NormVectorIProductWRTBase (Array< OneD, Array< OneD, NekDouble > > &V, Array< OneD, NekDouble > &outarray)
 
virtual void v_SetUpPhysNormals ()
 
virtual void v_GetBoundaryToElmtMap (Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
 
virtual void v_GetBndElmtExpansion (int i, boost::shared_ptr< ExpList > &result)
 
virtual void v_ExtractElmtToBndPhys (int i, Array< OneD, NekDouble > &elmt, Array< OneD, NekDouble > &boundary)
 
virtual void v_ExtractPhysToBndElmt (int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bndElmt)
 
virtual void v_GetBoundaryNormals (int i, Array< OneD, Array< OneD, NekDouble > > &normals)
 
virtual void v_ReadGlobalOptimizationParameters ()
 
virtual std::vector
< LibUtilities::FieldDefinitionsSharedPtr
v_GetFieldDefinitions (void)
 
virtual void v_GetFieldDefinitions (std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef)
 
virtual void v_AppendFieldData (LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
 
virtual void v_AppendFieldData (LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, Array< OneD, NekDouble > &coeffs)
 
virtual void v_ExtractDataToCoeffs (LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, std::string &field, Array< OneD, NekDouble > &coeffs)
 Extract data from raw field data into expansion list. More...
 
virtual void v_ExtractCoeffsToCoeffs (const boost::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
 
virtual void v_WriteTecplotHeader (std::ostream &outfile, std::string var="")
 
virtual void v_WriteTecplotZone (std::ostream &outfile, int expansion)
 
virtual void v_WriteTecplotField (std::ostream &outfile, int expansion)
 
virtual void v_WriteTecplotConnectivity (std::ostream &outfile, int expansion)
 
virtual void v_WriteVtkPieceHeader (std::ostream &outfile, int expansion, int istrip)
 
virtual void v_WriteVtkPieceData (std::ostream &outfile, int expansion, std::string var)
 
virtual NekDouble v_L2 (const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
 
virtual NekDouble v_Integral (const Array< OneD, const NekDouble > &inarray)
 
virtual Array< OneD, const
NekDouble
v_HomogeneousEnergy (void)
 
virtual
LibUtilities::TranspositionSharedPtr 
v_GetTransposition (void)
 
virtual NekDouble v_GetHomoLen (void)
 
virtual Array< OneD, const
unsigned int > 
v_GetZIDs (void)
 
virtual Array< OneD, const
unsigned int > 
v_GetYIDs (void)
 
virtual void v_PhysInterp1DScaled (const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_PhysGalerkinProjection1DScaled (const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_ClearGlobalLinSysManager (void)
 
void ExtractFileBCs (const std::string &fileName, const std::string &varName, const boost::shared_ptr< ExpList > locExpList)
 

Static Protected Member Functions

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

Protected Attributes

LibUtilities::CommSharedPtr m_comm
 Communicator. More...
 
LibUtilities::SessionReaderSharedPtr m_session
 Session. More...
 
SpatialDomains::MeshGraphSharedPtr m_graph
 Mesh associated with this expansion list. More...
 
int m_ncoeffs
 The total number of local degrees of freedom. m_ncoeffs $=N_{\mathrm{eof}}=\sum_{e=1}^{{N_{\mathrm{el}}}}N^{e}_l$. More...
 
int m_npoints
 
Array< OneD, NekDoublem_coeffs
 Concatenation of all local expansion coefficients. More...
 
Array< OneD, NekDoublem_phys
 The global expansion evaluated at the quadrature points. More...
 
bool m_physState
 The state of the array m_phys. More...
 
boost::shared_ptr
< LocalRegions::ExpansionVector
m_exp
 The list of local expansions. More...
 
Collections::CollectionVector m_collections
 
std::vector< int > m_coll_coeff_offset
 Offset of elemental data into the array m_coeffs. More...
 
std::vector< int > m_coll_phys_offset
 Offset of elemental data into the array m_phys. More...
 
Array< OneD, int > m_coeff_offset
 Offset of elemental data into the array m_coeffs. More...
 
Array< OneD, int > m_phys_offset
 Offset of elemental data into the array m_phys. More...
 
Array< OneD, int > m_offset_elmt_id
 Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coeffs and m_phys is associated, i.e. for an array of constant expansion size and single shape elements m_phys[n*m_npoints] is the data related to m_exp[m_offset_elmt_id[n]];. More...
 
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
 
BlockMatrixMapShPtr m_blockMat
 
bool m_WaveSpace
 
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:1003
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:917
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:999
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:913
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:910
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp: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:1003
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:917
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:999
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:913
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:910
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp: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:1003
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:917
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:999
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:913
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:910
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp: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:1003
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:917
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:999
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:913
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:910
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp: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:1001
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1003
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:917
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:999
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:913
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:910
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:985
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:253
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:982
Collections::CollectionVector m_collections
Definition: ExpList.h:979
Nektar::MultiRegions::ExpList::~ExpList ( )
virtual

The default destructor.

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

References v_AddFwdBwdTraceIntegral().

2044  {
2045  v_AddFwdBwdTraceIntegral(Fwd,Bwd,outarray);
2046  }
virtual void v_AddFwdBwdTraceIntegral(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2342
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 2025 of file ExpList.h.

References v_AddTraceIntegral().

2029  {
2030  v_AddTraceIntegral(Fx,Fy,outarray);
2031  }
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2325
void Nektar::MultiRegions::ExpList::AddTraceIntegral ( const Array< OneD, const NekDouble > &  Fn,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 2033 of file ExpList.h.

References v_AddTraceIntegral().

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

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

Definition at line 809 of file ExpList.h.

References v_AppendFieldData().

812  {
813  v_AppendFieldData(fielddef,fielddata);
814  }
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:2108
void Nektar::MultiRegions::ExpList::AppendFieldData ( LibUtilities::FieldDefinitionsSharedPtr fielddef,
std::vector< NekDouble > &  fielddata,
Array< OneD, NekDouble > &  coeffs 
)
inline

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

Definition at line 819 of file ExpList.h.

References v_AppendFieldData().

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

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

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

Definition at line 1612 of file ExpList.h.

References v_BwdTrans().

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

1616  {
1617  v_BwdTrans(inarray,outarray,coeffstate);
1618  }
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2550
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 1623 of file ExpList.h.

References v_BwdTrans_IterPerExp().

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

1626  {
1627  v_BwdTrans_IterPerExp(inarray,outarray);
1628  }
virtual void v_BwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1231
void Nektar::MultiRegions::ExpList::ClearGlobalLinSysManager ( void  )

Definition at line 3095 of file ExpList.cpp.

References v_ClearGlobalLinSysManager().

3096  {
3098  }
virtual void v_ClearGlobalLinSysManager(void)
Definition: ExpList.cpp:1905
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 2956 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().

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

Definition at line 1754 of file ExpList.h.

References v_DealiasedProd().

1759  {
1760  v_DealiasedProd(inarray1,inarray2,outarray,coeffstate);
1761  }
virtual void v_DealiasedProd(const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.cpp:2454
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 1420 of file ExpList.h.

References m_exp.

1421  {
1422  unsigned int i;
1423  int returnval = 0;
1424 
1425  for(i= 0; i < (*m_exp).size(); ++i)
1426  {
1427  returnval = (std::max)(returnval,
1428  (*m_exp)[i]->EvalBasisNumModesMax());
1429  }
1430 
1431  return returnval;
1432  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
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 1437 of file ExpList.h.

References m_exp.

1439  {
1440  unsigned int i;
1441  Array<OneD,int> returnval((*m_exp).size(),0);
1442 
1443  for(i= 0; i < (*m_exp).size(); ++i)
1444  {
1445  returnval[i]
1446  = (std::max)(returnval[i],(*m_exp)[i]->EvalBasisNumModesMax());
1447  }
1448 
1449  return returnval;
1450  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
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 2094 of file ExpList.h.

References v_EvaluateBoundaryConditions().

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

2099  {
2100  v_EvaluateBoundaryConditions(time, varName, x2_in, x3_in);
2101  }
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:2833
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 2145 of file ExpList.cpp.

References v_ExtractCoeffsToCoeffs().

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

References v_ExtractDataToCoeffs().

2141  {
2142  v_ExtractDataToCoeffs(fielddef,fielddata,field,coeffs);
2143  }
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:2158
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 2159 of file ExpList.h.

References v_ExtractElmtToBndPhys().

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

Definition at line 1911 of file ExpList.cpp.

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

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

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

Definition at line 2166 of file ExpList.h.

References v_ExtractPhysToBndElmt().

2169  {
2170  v_ExtractPhysToBndElmt(i, phys, bndElmt);
2171  }
virtual void v_ExtractPhysToBndElmt(int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bndElmt)
Definition: ExpList.cpp:2708
void Nektar::MultiRegions::ExpList::ExtractTracePhys ( Array< OneD, NekDouble > &  outarray)
inline

Definition at line 2068 of file ExpList.h.

References v_ExtractTracePhys().

2069  {
2070  v_ExtractTracePhys(outarray);
2071  }
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2376
void Nektar::MultiRegions::ExpList::ExtractTracePhys ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 2074 of file ExpList.h.

References v_ExtractTracePhys().

2077  {
2078  v_ExtractTracePhys(inarray,outarray);
2079  }
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2376
void Nektar::MultiRegions::ExpList::FillBndCondFromField ( void  )
inline

Fill Bnd Condition expansion from the values stored in expansion.

Definition at line 1848 of file ExpList.h.

References v_FillBndCondFromField().

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

Definition at line 1583 of file ExpList.h.

References v_FwdTrans().

1587  {
1588  v_FwdTrans(inarray,outarray,coeffstate);
1589  }
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2557
void Nektar::MultiRegions::ExpList::FwdTrans_BndConstrained ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

Definition at line 614 of file ExpList.cpp.

References m_coeff_offset, and m_phys_offset.

617  {
618  int i;
619 
620  Array<OneD,NekDouble> e_outarray;
621 
622  for(i= 0; i < (*m_exp).size(); ++i)
623  {
624  (*m_exp)[i]->FwdTrans_BndConstrained(inarray+m_phys_offset[i],
625  e_outarray = outarray+m_coeff_offset[i]);
626  }
627  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
void Nektar::MultiRegions::ExpList::FwdTrans_IterPerExp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

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

Definition at line 1594 of file ExpList.h.

References v_FwdTrans_IterPerExp().

1597  {
1598  v_FwdTrans_IterPerExp(inarray,outarray);
1599  }
virtual void v_FwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:604
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 678 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().

680  {
681  int i,cnt1;
682  int n_exp = 0;
683  DNekScalMatSharedPtr loc_mat;
684  DNekScalBlkMatSharedPtr BlkMatrix;
685  map<int,int> elmt_id;
686  LibUtilities::ShapeType ShapeType = gkey.GetShapeType();
687 
688  if(ShapeType != LibUtilities::eNoShapeType)
689  {
690  for(i = 0 ; i < (*m_exp).size(); ++i)
691  {
692  if((*m_exp)[m_offset_elmt_id[i]]->DetShapeType()
693  == ShapeType)
694  {
695  elmt_id[n_exp++] = m_offset_elmt_id[i];
696  }
697  }
698  }
699  else
700  {
701  n_exp = (*m_exp).size();
702  for(i = 0; i < n_exp; ++i)
703  {
704  elmt_id[i] = m_offset_elmt_id[i];
705  }
706  }
707 
708  Array<OneD,unsigned int> nrows(n_exp);
709  Array<OneD,unsigned int> ncols(n_exp);
710 
711  switch(gkey.GetMatrixType())
712  {
714  {
715  // set up an array of integers for block matrix construction
716  for(i = 0; i < n_exp; ++i)
717  {
718  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
719  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
720  }
721  }
722  break;
724  {
725  // set up an array of integers for block matrix construction
726  for(i = 0; i < n_exp; ++i)
727  {
728  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
729  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
730  }
731  }
732  break;
733  case StdRegions::eMass:
738  {
739  // set up an array of integers for block matrix construction
740  for(i = 0; i < n_exp; ++i)
741  {
742  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
743  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
744  }
745  }
746  break;
747 
749  {
750  // set up an array of integers for block matrix construction
751  for(i = 0; i < n_exp; ++i)
752  {
753  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
754  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
755  }
756  }
757  break;
758 
760  {
761  // set up an array of integers for block matrix construction
762  for(i = 0; i < n_exp; ++i)
763  {
764  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
765  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
766  }
767  }
768  break;
769 
770  default:
771  {
773  "Global Matrix creation not defined for this type "
774  "of matrix");
775  }
776  }
777 
778  MatrixStorage blkmatStorage = eDIAGONAL;
780  ::AllocateSharedPtr(nrows,ncols,blkmatStorage);
781 
782  int nvarcoeffs = gkey.GetNVarCoeffs();
783  int eid;
784  Array<OneD, NekDouble> varcoeffs_wk;
785 
786  for(i = cnt1 = 0; i < n_exp; ++i)
787  {
788  // need to be initialised with zero size for non variable coefficient case
789  StdRegions::VarCoeffMap varcoeffs;
790 
791  eid = elmt_id[i];
792  if(nvarcoeffs>0)
793  {
794  StdRegions::VarCoeffMap::const_iterator x;
795  for (x = gkey.GetVarCoeffs().begin(); x != gkey.GetVarCoeffs().end(); ++x)
796  {
797  varcoeffs[x->first] = x->second + m_phys_offset[eid];
798  }
799  }
800 
801  LocalRegions::MatrixKey matkey(gkey.GetMatrixType(),
802  (*m_exp)[eid]->DetShapeType(),
803  *(*m_exp)[eid],
804  gkey.GetConstFactors(),
805  varcoeffs );
806 
807  loc_mat = boost::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[elmt_id.find(i)->second])->GetLocMatrix(matkey);
808  BlkMatrix->SetBlock(i,i,loc_mat);
809  }
810 
811  return BlkMatrix;
812  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:185
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:226
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:999
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:74
void Nektar::MultiRegions::ExpList::GeneralGetFieldDefinitions ( std::vector< LibUtilities::FieldDefinitionsSharedPtr > &  fielddef,
int  NumHomoDir = 0,
Array< OneD, LibUtilities::BasisSharedPtr > &  HomoBasis = LibUtilities::NullBasisSharedPtr1DArray,
std::vector< NekDouble > &  HomoLen = LibUtilities::NullNekDoubleVector,
bool  homoStrips = false,
std::vector< unsigned int > &  HomoSIDs = LibUtilities::NullUnsignedIntVector,
std::vector< unsigned int > &  HomoZIDs = LibUtilities::NullUnsignedIntVector,
std::vector< unsigned int > &  HomoYIDs = LibUtilities::NullUnsignedIntVector 
)

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

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

References v_GeneralMatrixOp().

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

2137  {
2138  v_GeneralMatrixOp(gkey,inarray,outarray,coeffstate);
2139  }
virtual void v_GeneralMatrixOp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2579
void Nektar::MultiRegions::ExpList::GeneralMatrixOp_IterPerExp ( const GlobalMatrixKey gkey,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

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

833  {
834  const Array<OneD, const bool> doBlockMatOp
835  = m_globalOptParam->DoBlockMatOp(gkey.GetMatrixType());
836  const Array<OneD, const int> num_elmts
837  = m_globalOptParam->GetShapeNumElements();
838 
839  Array<OneD,NekDouble> tmp_outarray;
840  int cnt = 0;
841  int eid;
842  for(int n = 0; n < num_elmts.num_elements(); ++n)
843  {
844  if(doBlockMatOp[n])
845  {
846  const LibUtilities::ShapeType vType
847  = m_globalOptParam->GetShapeList()[n];
848  const MultiRegions::GlobalMatrixKey vKey(gkey, vType);
849  if (cnt < m_offset_elmt_id.num_elements())
850  {
851  eid = m_offset_elmt_id[cnt];
852  MultiplyByBlockMatrix(vKey,inarray + m_coeff_offset[eid],
853  tmp_outarray = outarray + m_coeff_offset[eid]);
854  cnt += num_elmts[n];
855  }
856  }
857  else
858  {
859  int i;
860  int nvarcoeffs = gkey.GetNVarCoeffs();
861 
862  for(i= 0; i < num_elmts[n]; ++i)
863  {
864  // need to be initialised with zero size for non variable coefficient case
865  StdRegions::VarCoeffMap varcoeffs;
866 
867  eid = m_offset_elmt_id[cnt++];
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  StdRegions::StdMatrixKey mkey(gkey.GetMatrixType(),
878  (*m_exp)[eid]->DetShapeType(),
879  *((*m_exp)[eid]),
880  gkey.GetConstFactors(),varcoeffs);
881 
882  (*m_exp)[eid]->GeneralMatrixOp(inarray + m_coeff_offset[eid],
883  tmp_outarray = outarray+m_coeff_offset[eid],
884  mkey);
885  }
886  }
887  }
888  }
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:1001
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:226
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:999
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 1194 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().

1197  {
1198  boost::shared_ptr<ExpList> vExpList = GetSharedThisPtr();
1199  const map<int,RobinBCInfoSharedPtr> vRobinBCInfo = GetRobinBCInfo();
1200 
1201  MultiRegions::GlobalSysSolnType vType = mkey.GetGlobalSysSolnType();
1202 
1203  if (vType >= eSIZE_GlobalSysSolnType)
1204  {
1205  ASSERTL0(false,"Matrix solution type not defined");
1206  }
1207  std::string vSolnType = MultiRegions::GlobalSysSolnTypeMap[vType];
1208 
1209  return GetGlobalLinSysFactory().CreateInstance(vSolnType,mkey,
1210  vExpList,locToGloMap);
1211  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:162
boost::shared_ptr< ExpList > GetSharedThisPtr()
Returns a shared pointer to the current object.
Definition: ExpList.h:859
const char *const GlobalSysSolnTypeMap[]
std::map< int, RobinBCInfoSharedPtr > GetRobinBCInfo()
Definition: ExpList.h:780
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 1175 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().

1178  {
1179  GlobalLinSysSharedPtr returnlinsys;
1180  boost::shared_ptr<ExpList> vExpList = GetSharedThisPtr();
1181 
1182  MultiRegions::GlobalSysSolnType vType = mkey.GetGlobalSysSolnType();
1183 
1184  if (vType >= eSIZE_GlobalSysSolnType)
1185  {
1186  ASSERTL0(false,"Matrix solution type not defined");
1187  }
1188  std::string vSolnType = MultiRegions::GlobalSysSolnTypeMap[vType];
1189 
1190  return GetGlobalLinSysFactory().CreateInstance( vSolnType, mkey,
1191  vExpList, locToGloMap);
1192  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:162
boost::shared_ptr< ExpList > GetSharedThisPtr()
Returns a shared pointer to the current object.
Definition: ExpList.h:859
const char *const GlobalSysSolnTypeMap[]
boost::shared_ptr< GlobalLinSys > GlobalLinSysSharedPtr
Pointer to a GlobalLinSys object.
Definition: GlobalLinSys.h:52
GlobalLinSysFactory & GetGlobalLinSysFactory()
GlobalMatrixSharedPtr Nektar::MultiRegions::ExpList::GenGlobalMatrix ( const GlobalMatrixKey mkey,
const boost::shared_ptr< AssemblyMapCG > &  locToGloMap 
)
protected

Generates a global matrix from the given key and map.

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

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

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

900  {
901  int i,j,n,gid1,gid2,cntdim1,cntdim2;
902  NekDouble sign1,sign2;
903  DNekScalMatSharedPtr loc_mat;
904 
905  unsigned int glob_rows;
906  unsigned int glob_cols;
907  unsigned int loc_rows;
908  unsigned int loc_cols;
909 
910  bool assembleFirstDim;
911  bool assembleSecondDim;
912 
913  switch(mkey.GetMatrixType())
914  {
916  {
917  glob_rows = m_npoints;
918  glob_cols = locToGloMap->GetNumGlobalCoeffs();
919 
920  assembleFirstDim = false;
921  assembleSecondDim = true;
922  }
923  break;
925  {
926  glob_rows = locToGloMap->GetNumGlobalCoeffs();
927  glob_cols = m_npoints;
928 
929  assembleFirstDim = true;
930  assembleSecondDim = false;
931  }
932  break;
933  case StdRegions::eMass:
937  {
938  glob_rows = locToGloMap->GetNumGlobalCoeffs();
939  glob_cols = locToGloMap->GetNumGlobalCoeffs();
940 
941  assembleFirstDim = true;
942  assembleSecondDim = true;
943  }
944  break;
945  default:
946  {
948  "Global Matrix creation not defined for this type "
949  "of matrix");
950  }
951  }
952 
953  COOMatType spcoomat;
954  CoordType coord;
955 
956  int nvarcoeffs = mkey.GetNVarCoeffs();
957  int eid;
958 
959  // fill global matrix
960  for(n = cntdim1 = cntdim2 = 0; n < (*m_exp).size(); ++n)
961  {
962  // need to be initialised with zero size for non variable coefficient case
963  StdRegions::VarCoeffMap varcoeffs;
964 
965  eid = m_offset_elmt_id[n];
966  if(nvarcoeffs>0)
967  {
968  StdRegions::VarCoeffMap::const_iterator x;
969  for (x = mkey.GetVarCoeffs().begin(); x != mkey.GetVarCoeffs().end(); ++x)
970  {
971  varcoeffs[x->first] = x->second + m_phys_offset[eid];
972  }
973  }
974 
975  LocalRegions::MatrixKey matkey(mkey.GetMatrixType(),
976  (*m_exp)[eid]->DetShapeType(),
977  *((*m_exp)[eid]),
978  mkey.GetConstFactors(),varcoeffs);
979 
980  loc_mat = boost::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[m_offset_elmt_id[n]])->GetLocMatrix(matkey);
981 
982  loc_rows = loc_mat->GetRows();
983  loc_cols = loc_mat->GetColumns();
984 
985  for(i = 0; i < loc_rows; ++i)
986  {
987  if(assembleFirstDim)
988  {
989  gid1 = locToGloMap->GetLocalToGlobalMap (cntdim1 + i);
990  sign1 = locToGloMap->GetLocalToGlobalSign(cntdim1 + i);
991  }
992  else
993  {
994  gid1 = cntdim1 + i;
995  sign1 = 1.0;
996  }
997 
998  for(j = 0; j < loc_cols; ++j)
999  {
1000  if(assembleSecondDim)
1001  {
1002  gid2 = locToGloMap
1003  ->GetLocalToGlobalMap(cntdim2 + j);
1004  sign2 = locToGloMap
1005  ->GetLocalToGlobalSign(cntdim2 + j);
1006  }
1007  else
1008  {
1009  gid2 = cntdim2 + j;
1010  sign2 = 1.0;
1011  }
1012 
1013  // sparse matrix fill
1014  coord = make_pair(gid1,gid2);
1015  if( spcoomat.count(coord) == 0 )
1016  {
1017  spcoomat[coord] = sign1*sign2*(*loc_mat)(i,j);
1018  }
1019  else
1020  {
1021  spcoomat[coord] += sign1*sign2*(*loc_mat)(i,j);
1022  }
1023  }
1024  }
1025  cntdim1 += loc_rows;
1026  cntdim2 += loc_cols;
1027  }
1028 
1030  ::AllocateSharedPtr(m_session,glob_rows,glob_cols,spcoomat);
1031  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:185
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
std::map< CoordType, NekDouble > COOMatType
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:226
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:999
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:910
double NekDouble
std::pair< IndexType, IndexType > CoordType
DNekMatSharedPtr Nektar::MultiRegions::ExpList::GenGlobalMatrixFull ( const GlobalLinSysKey mkey,
const boost::shared_ptr< AssemblyMapCG > &  locToGloMap 
)
protected

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

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

References m_exp.

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

Definition at line 1766 of file ExpList.h.

References v_GetBCValues().

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

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

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

References v_GetBndCondExpansions().

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

1977  {
1978  return v_GetBndCondExpansions();
1979  }
virtual const Array< OneD, const boost::shared_ptr< ExpList > > & v_GetBndCondExpansions(void)
Definition: ExpList.cpp:2261
const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::GetBndConditions ( )
inline

Definition at line 2082 of file ExpList.h.

References v_GetBndConditions().

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

Definition at line 2153 of file ExpList.h.

References v_GetBndElmtExpansion().

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

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

2868  {
2869  SpatialDomains::BoundaryConditionCollection::const_iterator collectionIter = collection.find(regionId);
2870  ASSERTL1(collectionIter != collection.end(), "Unable to locate collection "+boost::lexical_cast<string>(regionId));
2871  const SpatialDomains::BoundaryConditionMapShPtr boundaryConditionMap = (*collectionIter).second;
2872  SpatialDomains::BoundaryConditionMap::const_iterator conditionMapIter = boundaryConditionMap->find(variable);
2873  ASSERTL1(conditionMapIter != boundaryConditionMap->end(), "Unable to locate condition map.");
2874  const SpatialDomains::BoundaryConditionShPtr boundaryCondition = (*conditionMapIter).second;
2875  return boundaryCondition;
2876  }
boost::shared_ptr< BoundaryConditionMap > BoundaryConditionMapShPtr
Definition: Conditions.h:214
boost::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
Definition: Conditions.h:208
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
void Nektar::MultiRegions::ExpList::GetBoundaryNormals ( int  i,
Array< OneD, Array< OneD, NekDouble > > &  normals 
)
inline

Definition at line 2173 of file ExpList.h.

References v_GetBoundaryNormals().

2175  {
2176  v_GetBoundaryNormals(i, normals);
2177  }
virtual void v_GetBoundaryNormals(int i, Array< OneD, Array< OneD, NekDouble > > &normals)
Definition: ExpList.cpp:2749
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 1868 of file ExpList.h.

References m_coeffs.

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

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

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

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

Returns
(A constant reference to) the array m_coeffs.

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

1838  {
1839  return m_coeffs;
1840  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
NekDouble Nektar::MultiRegions::ExpList::GetCoeffs ( int  i)
inline

Get the i th value (coefficient) of m_coeffs.

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

Definition at line 1877 of file ExpList.h.

References m_coeffs.

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

Returns the comm object.

Definition at line 871 of file ExpList.h.

References m_comm.

872  {
873  return m_comm;
874  }
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
int Nektar::MultiRegions::ExpList::GetCoordim ( int  eid)
inline

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

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

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

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

References v_GetCoords().

Referenced by v_WriteTecplotZone().

1691  {
1692  v_GetCoords(coord_0,coord_1,coord_2);
1693  }
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
Definition: ExpList.cpp:2599
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 1920 of file ExpList.h.

References m_exp.

Referenced by Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG(), Nektar::MultiRegions::AssemblyMapDG::AssemblyMapDG(), Nektar::MultiRegions::ContField3DHomogeneous1D::ContField3DHomogeneous1D(), Nektar::MultiRegions::ContField3DHomogeneous2D::ContField3DHomogeneous2D(), Nektar::MultiRegions::AssemblyMapCG::CreateGraph(), Nektar::MultiRegions::DisContField3DHomogeneous1D::DisContField3DHomogeneous1D(), Nektar::MultiRegions::DisContField3DHomogeneous2D::DisContField3DHomogeneous2D(), Nektar::MultiRegions::ExpList2DHomogeneous1D::ExpList2DHomogeneous1D(), Nektar::MultiRegions::ExpList3DHomogeneous2D::ExpList3DHomogeneous2D(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GenExpList3DHomogeneous1D(), Nektar::MultiRegions::DisContField3DHomogeneous1D::GetBCValues(), GetExpIndex(), Nektar::MultiRegions::LocTraceToTraceMap::LocTraceToTraceMap(), Nektar::MultiRegions::DisContField3DHomogeneous1D::NormVectorIProductWRTBase(), Nektar::MultiRegions::ExpList1D::PostProcess(), Nektar::MultiRegions::LocTraceToTraceMap::Setup2D(), Nektar::MultiRegions::LocTraceToTraceMap::Setup3D(), Nektar::MultiRegions::AssemblyMapCG::SetUpUniversalC0ContMap(), Nektar::MultiRegions::AssemblyMapDG::SetUpUniversalDGMap(), Nektar::MultiRegions::AssemblyMapDG::SetUpUniversalTraceMap(), v_ExtractElmtToBndPhys(), v_ExtractPhysToBndElmt(), Nektar::MultiRegions::DisContField3DHomogeneous2D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField2D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBoundaryNormals(), v_GetBoundaryNormals(), v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_HomogeneousEnergy(), Nektar::MultiRegions::AssemblyMapCG::v_LinearSpaceMap(), and v_WriteTecplotHeader().

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

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

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

Definition at line 1911 of file ExpList.h.

References m_exp.

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

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

Definition at line 1243 of file ExpList.cpp.

References ASSERTL0, GetCoordim(), and m_exp.

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

1268  {
1269  Array<OneD, NekDouble> Lcoords(gloCoord.num_elements());
1270 
1271  return GetExpIndex(gloCoord,Lcoords,tol,returnNearestElmt);
1272  }
int GetExpIndex(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false)
Definition: ExpList.cpp:1264
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 1275 of file ExpList.cpp.

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

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

This function returns the number of elements in the expansion.

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

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

1900  {
1901  return (*m_exp).size();
1902  }
ExpansionType Nektar::MultiRegions::ExpList::GetExpType ( void  )

Returns the type of the expansion.

Definition at line 245 of file ExpList.cpp.

References m_expType.

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

Definition at line 794 of file ExpList.h.

References v_GetFieldDefinitions().

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

Definition at line 800 of file ExpList.h.

References v_GetFieldDefinitions().

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

Definition at line 2048 of file ExpList.h.

References v_GetFwdBwdTracePhys().

2051  {
2052  v_GetFwdBwdTracePhys(Fwd,Bwd);
2053  }
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
Definition: ExpList.cpp:2351
void Nektar::MultiRegions::ExpList::GetFwdBwdTracePhys ( const Array< OneD, const NekDouble > &  field,
Array< OneD, NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd 
)
inline

Definition at line 2055 of file ExpList.h.

References v_GetFwdBwdTracePhys().

2059  {
2060  v_GetFwdBwdTracePhys(field,Fwd,Bwd);
2061  }
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
Definition: ExpList.cpp:2351
const NekOptimize::GlobalOptParamSharedPtr& Nektar::MultiRegions::ExpList::GetGlobalOptParam ( void  )
inline

Definition at line 775 of file ExpList.h.

References m_globalOptParam.

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

Definition at line 876 of file ExpList.h.

References m_graph.

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

Definition at line 882 of file ExpList.h.

References v_GetHomogeneousBasis().

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

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

Definition at line 527 of file ExpList.h.

References v_GetHomoLen().

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

Definition at line 2063 of file ExpList.h.

References v_GetLeftAdjacentFaces().

2064  {
2065  return v_GetLeftAdjacentFaces();
2066  }
virtual const std::vector< bool > & v_GetLeftAdjacentFaces(void) const
Definition: ExpList.cpp:2367
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 1411 of file ExpList.h.

References m_exp.

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

Definition at line 2019 of file ExpList.h.

References v_GetNormals().

2021  {
2022  v_GetNormals(normals);
2023  }
virtual void v_GetNormals(Array< OneD, Array< OneD, NekDouble > > &normals)
Definition: ExpList.cpp:2318
int Nektar::MultiRegions::ExpList::GetNpoints ( void  ) const
inline

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

Definition at line 1488 of file ExpList.h.

References m_npoints.

1489  {
1490  return m_npoints;
1491  }
int Nektar::MultiRegions::ExpList::GetNumElmts ( void  )
inline

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

Definition at line 572 of file ExpList.h.

References v_GetNumElmts().

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

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

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

Definition at line 785 of file ExpList.h.

References v_GetPeriodicEntities().

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

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

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

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

Definition at line 1554 of file ExpList.h.

References m_physState.

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

Definition at line 887 of file ExpList.h.

References v_GetPlane().

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

Definition at line 780 of file ExpList.h.

References v_GetRobinBCInfo().

Referenced by GenGlobalBndLinSys(), and GenGlobalMatrixFull().

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

Returns the session object.

Definition at line 865 of file ExpList.h.

References m_session.

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

Returns a shared pointer to the current object.

Definition at line 859 of file ExpList.h.

Referenced by GenGlobalBndLinSys(), and GenGlobalLinSys().

860  {
861  return shared_from_this();
862  }
int Nektar::MultiRegions::ExpList::GetTotPoints ( void  ) const
inline
int Nektar::MultiRegions::ExpList::GetTotPoints ( const int  eid) const
inline

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

Definition at line 1461 of file ExpList.h.

References m_exp.

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

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

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

2005  {
2006  return v_GetTrace();
2007  }
virtual boost::shared_ptr< ExpList > & v_GetTrace()
Definition: ExpList.cpp:2297
const Array< OneD, const int > & Nektar::MultiRegions::ExpList::GetTraceBndMap ( void  )
inline

Definition at line 2014 of file ExpList.h.

References v_GetTraceBndMap().

2015  {
2016  return v_GetTraceBndMap();
2017  }
virtual const Array< OneD, const int > & v_GetTraceBndMap()
Definition: ExpList.cpp:2313
boost::shared_ptr< AssemblyMapDG > & Nektar::MultiRegions::ExpList::GetTraceMap ( void  )
inline

Definition at line 2009 of file ExpList.h.

References v_GetTraceMap().

Referenced by v_GetTraceBndMap().

2010  {
2011  return v_GetTraceMap();
2012  }
virtual boost::shared_ptr< AssemblyMapDG > & v_GetTraceMap()
Definition: ExpList.cpp:2305
LibUtilities::TranspositionSharedPtr Nektar::MultiRegions::ExpList::GetTransposition ( void  )
inline

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

Definition at line 520 of file ExpList.h.

References v_GetTransposition().

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

References m_WaveSpace.

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

1506  {
1507  return m_WaveSpace;
1508  }
Array<OneD, const unsigned int> Nektar::MultiRegions::ExpList::GetYIDs ( void  )
inline

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

Definition at line 536 of file ExpList.h.

References v_GetYIDs().

537  {
538  return v_GetYIDs();
539  }
virtual Array< OneD, const unsigned int > v_GetYIDs(void)
Definition: ExpList.cpp:1885
Array<OneD, const unsigned int> Nektar::MultiRegions::ExpList::GetZIDs ( void  )
inline

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

Definition at line 513 of file ExpList.h.

References v_GetZIDs().

Referenced by v_WriteTecplotZone().

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

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

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

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

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

Definition at line 1967 of file ExpList.cpp.

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

1970  {
1971  NekDouble err = 0.0, errh1;
1972  int i;
1973 
1974  for (i = 0; i < (*m_exp).size(); ++i)
1975  {
1976  errh1 = (*m_exp)[i]->H1(inarray + m_phys_offset[i],
1977  soln + m_phys_offset[i]);
1978  err += errh1*errh1;
1979  }
1980 
1981  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
1982 
1983  return sqrt(err);
1984  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
void Nektar::MultiRegions::ExpList::HelmSolve ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const FlagList flags,
const StdRegions::ConstFactorMap factors,
const StdRegions::VarCoeffMap varcoeff = StdRegions::NullVarCoeffMap,
const Array< OneD, const NekDouble > &  dirForcing = NullNekDouble1DArray 
)
inline

Solve helmholtz problem.

Definition at line 1645 of file ExpList.h.

References v_HelmSolve().

1652  {
1653  v_HelmSolve(inarray, outarray, flags, factors, varcoeff, dirForcing);
1654  }
virtual void v_HelmSolve(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const FlagList &flags, const StdRegions::ConstFactorMap &factors, const StdRegions::VarCoeffMap &varcoeff, const Array< OneD, const NekDouble > &dirForcing)
Definition: ExpList.cpp:2399
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 1741 of file ExpList.h.

References v_HomogeneousBwdTrans().

1747  {
1748  v_HomogeneousBwdTrans(inarray,outarray,coeffstate,Shuff,UnShuff);
1749  }
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:2444
Array<OneD, const NekDouble> Nektar::MultiRegions::ExpList::HomogeneousEnergy ( void  )
inline

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

Definition at line 497 of file ExpList.h.

References v_HomogeneousEnergy().

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

References v_HomogeneousFwdTrans().

1734  {
1735  v_HomogeneousFwdTrans(inarray,outarray,coeffstate,Shuff,UnShuff);
1736  }
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:2434
void Nektar::MultiRegions::ExpList::ImposeDirichletConditions ( Array< OneD, NekDouble > &  outarray)
inline

Impose Dirichlet Boundary Conditions onto Array.

Definition at line 1842 of file ExpList.h.

References v_ImposeDirichletConditions().

1844  {
1845  v_ImposeDirichletConditions(outarray);
1846  }
virtual void v_ImposeDirichletConditions(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2523
NekDouble Nektar::MultiRegions::ExpList::Integral ( const Array< OneD, const NekDouble > &  inarray)
inline

Definition at line 490 of file ExpList.h.

References v_Integral().

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

Definition at line 1562 of file ExpList.h.

References v_IProductWRTBase().

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

1566  {
1567  v_IProductWRTBase(inarray,outarray, coeffstate);
1568  }
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2564
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 1573 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().

1576  {
1577  v_IProductWRTBase_IterPerExp(inarray,outarray);
1578  }
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:988
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
void Nektar::MultiRegions::ExpList::IProductWRTDerivBase ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

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

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

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

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

Definition at line 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:188
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:985
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1797
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:982
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
Collections::CollectionVector m_collections
Definition: ExpList.h:979
NekDouble Nektar::MultiRegions::ExpList::L2 ( const Array< OneD, const NekDouble > &  inarray,
const Array< OneD, const NekDouble > &  soln = NullNekDouble1DArray 
)
inline

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

Definition at line 477 of file ExpList.h.

References v_L2().

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

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

References v_LinearAdvectionDiffusionReactionSolve().

1667  {
1668  v_LinearAdvectionDiffusionReactionSolve(velocity,inarray, outarray,
1669  lambda, coeffstate,dirForcing);
1670  }
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:2410
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 1672 of file ExpList.h.

References v_LinearAdvectionReactionSolve().

1679  {
1680  v_LinearAdvectionReactionSolve(velocity,inarray, outarray,
1681  lambda, coeffstate,dirForcing);
1682  }
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:2422
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 1770 of file ExpList.cpp.

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

1773  {
1774  NekDouble err = 0.0;
1775 
1776  if (soln == NullNekDouble1DArray)
1777  {
1778  err = Vmath::Vmax(m_npoints, inarray, 1);
1779  }
1780  else
1781  {
1782  for (int i = 0; i < m_npoints; ++i)
1783  {
1784  err = max(err, abs(inarray[i] - soln[i]));
1785  }
1786  }
1787 
1788  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceMax);
1789 
1790  return err;
1791  }
static Array< OneD, NekDouble > NullNekDouble1DArray
T Vmax(int n, const T *x, const int incx)
Return the maximum element in x – called vmax to avoid conflict with max.
Definition: Vmath.cpp:765
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
void Nektar::MultiRegions::ExpList::LocalToGlobal ( void  )
inline
void Nektar::MultiRegions::ExpList::MultiplyByBlockMatrix ( const GlobalMatrixKey gkey,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protected

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

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

Definition at line 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:814
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 565 of file ExpList.cpp.

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

Referenced by v_FwdTrans_IterPerExp().

568  {
569  GlobalMatrixKey mkey(StdRegions::eInvMass);
570  const DNekScalBlkMatSharedPtr& InvMass = GetBlockMatrix(mkey);
571 
572  // Inverse mass matrix
573  NekVector<NekDouble> out(m_ncoeffs,outarray,eWrapper);
574  if(inarray.get() == outarray.get())
575  {
576  NekVector<NekDouble> in(m_ncoeffs,inarray); // copy data
577  out = (*InvMass)*in;
578  }
579  else
580  {
581  NekVector<NekDouble> in(m_ncoeffs,inarray,eWrapper);
582  out = (*InvMass)*in;
583  }
584  }
const DNekScalBlkMatSharedPtr & GetBlockMatrix(const GlobalMatrixKey &gkey)
Definition: ExpList.cpp:814
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:917
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:74
void Nektar::MultiRegions::ExpList::MultiplyByInvMassMatrix ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
inline

Definition at line 1634 of file ExpList.h.

References v_MultiplyByInvMassMatrix().

1638  {
1639  v_MultiplyByInvMassMatrix(inarray,outarray,coeffstate);
1640  }
virtual void v_MultiplyByInvMassMatrix(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2390
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 1777 of file ExpList.h.

References v_NormVectorIProductWRTBase().

1782  {
1783  v_NormVectorIProductWRTBase(V1,V2,outarray,BndID);
1784  }
virtual void v_NormVectorIProductWRTBase(Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
Definition: ExpList.cpp:2468
void Nektar::MultiRegions::ExpList::NormVectorIProductWRTBase ( Array< OneD, Array< OneD, NekDouble > > &  V,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 1786 of file ExpList.h.

References v_NormVectorIProductWRTBase().

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

Definition at line 1717 of file ExpList.h.

References v_PhysDeriv().

1721  {
1722  v_PhysDeriv(edir, inarray,out_d);
1723  }
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 1698 of file ExpList.h.

References v_PhysDeriv().

1702  {
1703  v_PhysDeriv(inarray,out_d0,out_d1,out_d2);
1704  }
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 1709 of file ExpList.h.

References v_PhysDeriv().

1713  {
1714  v_PhysDeriv(dir,inarray,out_d);
1715  }
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 557 of file ExpList.h.

References v_PhysGalerkinProjection1DScaled().

561  {
562  v_PhysGalerkinProjection1DScaled(scale, inarray, outarray);
563  }
virtual void v_PhysGalerkinProjection1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1900
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:956
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:218
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:991
double NekDouble
void Nektar::MultiRegions::ExpList::PhysInterp1DScaled ( const NekDouble  scale,
const Array< OneD, NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

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

Definition at line 545 of file ExpList.h.

References v_PhysInterp1DScaled().

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

Reset geometry information and reset matrices.

Definition at line 371 of file ExpList.h.

References v_Reset().

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

References m_coeffs.

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

Set the i th coefficiient in m_coeffs to value val.

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

Definition at line 1818 of file ExpList.h.

References m_coeffs.

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

Set the m_coeffs array to inarray.

Definition at line 1824 of file ExpList.h.

References m_coeffs.

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

This function sets the Spectral Vanishing Viscosity in homogeneous1D expansion.

Definition at line 504 of file ExpList.h.

References v_SetHomo1DSpecVanVisc().

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

References m_phys.

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

Fills the array m_phys.

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

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

Definition at line 1525 of file ExpList.h.

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

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

Sets the array m_phys.

Definition at line 1536 of file ExpList.h.

References m_phys.

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

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

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

Definition at line 1545 of file ExpList.h.

References m_physState.

1546  {
1547  m_physState = physState;
1548  }
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
void Nektar::MultiRegions::ExpList::SetUpPhysNormals ( )
inline
void Nektar::MultiRegions::ExpList::SetWaveSpace ( const bool  wavespace)
inline

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

Definition at line 1497 of file ExpList.h.

References m_WaveSpace.

1498  {
1499  m_WaveSpace = wavespace;
1500  }
void Nektar::MultiRegions::ExpList::SmoothField ( Array< OneD, NekDouble > &  field)
inline

Smooth a field across elements.

Definition at line 1604 of file ExpList.h.

References v_SmoothField().

1605  {
1606  v_SmoothField(field);
1607  }
virtual void v_SmoothField(Array< OneD, NekDouble > &field)
Definition: ExpList.cpp:636
boost::shared_ptr< ExpList > & Nektar::MultiRegions::ExpList::UpdateBndCondExpansion ( int  i)
inline

Definition at line 1981 of file ExpList.h.

References v_UpdateBndCondExpansion().

1982  {
1983  return v_UpdateBndCondExpansion(i);
1984  }
virtual boost::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
Definition: ExpList.cpp:2269
Array< OneD, SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::UpdateBndConditions ( )
inline

Definition at line 2089 of file ExpList.h.

References v_UpdateBndConditions().

2090  {
2091  return v_UpdateBndConditions();
2092  }
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
Definition: ExpList.cpp:2823
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 1956 of file ExpList.h.

References m_coeffs.

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

1957  {
1958  return m_coeffs;
1959  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:939
Array< OneD, NekDouble > & Nektar::MultiRegions::ExpList::UpdatePhys ( void  )
inline

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

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

Returns
(A reference to) the array m_phys.

Definition at line 1967 of file ExpList.h.

References m_phys, and m_physState.

1968  {
1969  m_physState = true;
1970  return m_phys;
1971  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:965
void Nektar::MultiRegions::ExpList::Upwind ( const Array< OneD, const Array< OneD, NekDouble > > &  Vec,
const Array< OneD, const NekDouble > &  Fwd,
const Array< OneD, const NekDouble > &  Bwd,
Array< OneD, NekDouble > &  Upwind 
)
inline

Definition at line 1986 of file ExpList.h.

References v_Upwind().

1991  {
1992  v_Upwind(Vec, Fwd, Bwd, Upwind);
1993  }
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:2277
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 1995 of file ExpList.h.

References v_Upwind().

2000  {
2001  v_Upwind(Vn, Fwd, Bwd, Upwind);
2002  }
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:2277
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 2342 of file ExpList.cpp.

References ASSERTL0.

Referenced by AddFwdBwdTraceIntegral().

2346  {
2347  ASSERTL0(false,
2348  "This method is not defined or valid for this class type");
2349  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 2325 of file ExpList.cpp.

References ASSERTL0.

Referenced by AddTraceIntegral().

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

References ASSERTL0.

2337  {
2338  ASSERTL0(false,
2339  "This method is not defined or valid for this class type");
2340  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 2108 of file ExpList.cpp.

References m_coeffs.

Referenced by AppendFieldData().

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

References m_coeff_offset.

2114  {
2115  int i;
2116  // Determine mapping from element ids to location in
2117  // expansion list
2118  // Determine mapping from element ids to location in
2119  // expansion list
2120  map<int, int> ElmtID_to_ExpID;
2121  for(i = 0; i < (*m_exp).size(); ++i)
2122  {
2123  ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2124  }
2125 
2126  for(i = 0; i < fielddef->m_elementIDs.size(); ++i)
2127  {
2128  int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
2129  int datalen = (*m_exp)[eid]->GetNcoeffs();
2130  fielddata.insert(fielddata.end(),&coeffs[m_coeff_offset[eid]],&coeffs[m_coeff_offset[eid]]+datalen);
2131  }
2132 
2133  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
void Nektar::MultiRegions::ExpList::v_BwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate 
)
protectedvirtual

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

Definition at line 2550 of file ExpList.cpp.

References v_BwdTrans_IterPerExp().

Referenced by BwdTrans().

2553  {
2554  v_BwdTrans_IterPerExp(inarray,outarray);
2555  }
virtual void v_BwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1231
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 1231 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().

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

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

Definition at line 1905 of file ExpList.cpp.

References ASSERTL0.

Referenced by ClearGlobalLinSysManager().

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

References ASSERTL0.

Referenced by DealiasedProd().

2455  {
2456  ASSERTL0(false,
2457  "This method is not defined or valid for this class type");
2458  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 2833 of file ExpList.cpp.

References ASSERTL0.

Referenced by EvaluateBoundaryConditions().

2838  {
2839  ASSERTL0(false,
2840  "This method is not defined or valid for this class type");
2841  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 2238 of file ExpList.cpp.

References m_coeff_offset, and m_offset_elmt_id.

Referenced by ExtractCoeffsToCoeffs().

2239  {
2240  int i;
2241  int offset = 0;
2242 
2243  for(i = 0; i < (*m_exp).size(); ++i)
2244  {
2245  std::vector<unsigned int> nummodes;
2246  int eid = m_offset_elmt_id[i];
2247  for(int j= 0; j < fromExpList->GetExp(eid)->GetNumBases(); ++j)
2248  {
2249  nummodes.push_back(fromExpList->GetExp(eid)->GetBasisNumModes(j));
2250  }
2251 
2252  (*m_exp)[eid]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes,0,
2253  &toCoeffs[m_coeff_offset[eid]]);
2254 
2255  offset += fromExpList->GetExp(eid)->GetNcoeffs();
2256  }
2257  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:999
void Nektar::MultiRegions::ExpList::v_ExtractDataToCoeffs ( LibUtilities::FieldDefinitionsSharedPtr fielddef,
std::vector< NekDouble > &  fielddata,
std::string &  field,
Array< OneD, NekDouble > &  coeffs 
)
protectedvirtual

Extract data from raw field data into expansion list.

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

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

Definition at line 2158 of file ExpList.cpp.

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

Referenced by ExtractDataToCoeffs().

2163  {
2164  int i, expId;
2165  int offset = 0;
2166  int modes_offset = 0;
2167  int datalen = fielddata.size()/fielddef->m_fields.size();
2168 
2169  // Find data location according to field definition
2170  for(i = 0; i < fielddef->m_fields.size(); ++i)
2171  {
2172  if(fielddef->m_fields[i] == field)
2173  {
2174  break;
2175  }
2176  offset += datalen;
2177  }
2178 
2179  ASSERTL0(i != fielddef->m_fields.size(),
2180  "Field (" + field + ") not found in file.");
2181 
2182  if (m_elmtToExpId.size() == 0)
2183  {
2184  // Loop in reverse order so that in case where using a
2185  // Homogeneous expansion it sets geometry ids to first part of
2186  // m_exp list. Otherwise will set to second (complex) expansion
2187  for(i = (*m_exp).size()-1; i >= 0; --i)
2188  {
2189  m_elmtToExpId[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2190  }
2191  }
2192 
2194 
2195  for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
2196  {
2197  // Reset modes_offset in the case where all expansions of
2198  // the same order.
2199  if (fielddef->m_uniOrder == true)
2200  {
2201  modes_offset = 0;
2202  }
2203 
2204  datalen = LibUtilities::GetNumberOfCoefficients(fielddef->m_shapeType,
2205  fielddef->m_numModes, modes_offset);
2206 
2207  const int elmtId = fielddef->m_elementIDs[i];
2208  eIt = m_elmtToExpId.find(elmtId);
2209 
2210  if (eIt == m_elmtToExpId.end())
2211  {
2212  offset += datalen;
2213  modes_offset += (*m_exp)[0]->GetNumBases();
2214  continue;
2215  }
2216 
2217  expId = eIt->second;
2218 
2219  if (datalen == (*m_exp)[expId]->GetNcoeffs())
2220  {
2221  Vmath::Vcopy(datalen, &fielddata[offset], 1,
2222  &coeffs[m_coeff_offset[expId]], 1);
2223  }
2224  else
2225  {
2226  (*m_exp)[expId]->ExtractDataToCoeffs(
2227  &fielddata[offset], fielddef->m_numModes,
2228  modes_offset, &coeffs[m_coeff_offset[expId]]);
2229  }
2230 
2231  offset += datalen;
2232  modes_offset += (*m_exp)[0]->GetNumBases();
2233  }
2234 
2235  return;
2236  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
boost::unordered_map< int, int > m_elmtToExpId
Mapping from geometry ID of element to index inside m_exp.
Definition: ExpList.h:1011
int GetNumberOfCoefficients(ShapeType shape, std::vector< unsigned int > &modes, int offset)
Definition: ShapeType.hpp:312
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:988
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
int GetNcoeffs(void) const
Returns the total number of local degrees of freedom .
Definition: ExpList.h:1406
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
void Nektar::MultiRegions::ExpList::v_ExtractElmtToBndPhys ( int  i,
Array< OneD, NekDouble > &  elmt,
Array< OneD, NekDouble > &  boundary 
)
protectedvirtual

Definition at line 2669 of file ExpList.cpp.

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

Referenced by ExtractElmtToBndPhys().

2672  {
2673  int n, cnt;
2674  Array<OneD, NekDouble> tmp1, tmp2;
2676 
2677  Array<OneD, int> ElmtID,EdgeID;
2678  GetBoundaryToElmtMap(ElmtID,EdgeID);
2679 
2680  // Initialise result
2681  boundary = Array<OneD, NekDouble>
2682  (GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
2683 
2684  // Skip other boundary regions
2685  for (cnt = n = 0; n < i; ++n)
2686  {
2687  cnt += GetBndCondExpansions()[n]->GetExpSize();
2688  }
2689 
2690  int offsetBnd;
2691  int offsetElmt = 0;
2692  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2693  {
2694  offsetBnd = GetBndCondExpansions()[i]->GetPhys_Offset(n);
2695 
2696  elmt = GetExp(ElmtID[cnt+n]);
2697  elmt->GetTracePhysVals(EdgeID[cnt+n],
2698  GetBndCondExpansions()[i]->GetExp(n),
2699  tmp1 = element + offsetElmt,
2700  tmp2 = boundary + offsetBnd);
2701 
2702  offsetElmt += elmt->GetTotPoints();
2703  }
2704  }
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:1920
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2147
const Array< OneD, const boost::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:1976
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 2708 of file ExpList.cpp.

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

Referenced by ExtractPhysToBndElmt().

2711  {
2712  int n, cnt, nq;
2713  Array<OneD, NekDouble> tmp1, tmp2;
2714 
2715  Array<OneD, int> ElmtID,EdgeID;
2716  GetBoundaryToElmtMap(ElmtID,EdgeID);
2717 
2718  // Skip other boundary regions
2719  for (cnt = n = 0; n < i; ++n)
2720  {
2721  cnt += GetBndCondExpansions()[n]->GetExpSize();
2722  }
2723 
2724  // Count number of points
2725  int npoints = 0;
2726  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2727  {
2728  npoints += GetExp(ElmtID[cnt+n])->GetTotPoints();
2729  }
2730 
2731  // Initialise result
2732  bndElmt = Array<OneD, NekDouble> (npoints, 0.0);
2733 
2734  // Extract data
2735  int offsetPhys;
2736  int offsetElmt = 0;
2737  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2738  {
2739  nq = GetExp(ElmtID[cnt+n])->GetTotPoints();
2740  offsetPhys = GetPhys_Offset(ElmtID[cnt+n]);
2741  Vmath::Vcopy(nq, tmp1 = phys + offsetPhys, 1,
2742  tmp2 = bndElmt + offsetElmt, 1);
2743  offsetElmt += nq;
2744  }
2745  }
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:1937
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:1920
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2147
const Array< OneD, const boost::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:1976
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1047
void Nektar::MultiRegions::ExpList::v_ExtractTracePhys ( Array< OneD, NekDouble > &  outarray)
protectedvirtual

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

Definition at line 2376 of file ExpList.cpp.

References ASSERTL0.

Referenced by ExtractTracePhys().

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

References ASSERTL0.

2385  {
2386  ASSERTL0(false,
2387  "This method is not defined or valid for this class type");
2388  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
void Nektar::MultiRegions::ExpList::v_FillBndCondFromField ( void  )
protectedvirtual

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

Definition at line 2531 of file ExpList.cpp.

References ASSERTL0.

Referenced by FillBndCondFromField().

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

References v_FwdTrans_IterPerExp().

Referenced by FwdTrans().

2560  {
2561  v_FwdTrans_IterPerExp(inarray,outarray);
2562  }
virtual void v_FwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:604
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 604 of file ExpList.cpp.

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

Referenced by FwdTrans_IterPerExp(), and v_FwdTrans().

606  {
607  Array<OneD,NekDouble> f(m_ncoeffs);
608 
609  IProductWRTBase_IterPerExp(inarray,f);
610  MultiplyByElmtInvMass(f,outarray);
611 
612  }
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:565
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:1573
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:917
void Nektar::MultiRegions::ExpList::v_GeneralMatrixOp ( const GlobalMatrixKey gkey,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate 
)
protectedvirtual

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

Definition at line 2579 of file ExpList.cpp.

References GeneralMatrixOp_IterPerExp().

Referenced by GeneralMatrixOp().

2584  {
2585  GeneralMatrixOp_IterPerExp(gkey,inarray,outarray);
2586  }
void GeneralMatrixOp_IterPerExp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:829
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 2460 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBCValues().

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

References ASSERTL0.

Referenced by GetBndCondExpansions().

2262  {
2263  ASSERTL0(false,
2264  "This method is not defined or valid for this class type");
2265  static Array<OneD,const boost::shared_ptr<ExpList> > result;
2266  return result;
2267  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 2812 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBndConditions().

2813  {
2814  ASSERTL0(false,
2815  "This method is not defined or valid for this class type");
2816  static Array<OneD, const SpatialDomains::BoundaryConditionShPtr>
2817  result;
2818  return result;
2819  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
void Nektar::MultiRegions::ExpList::v_GetBndElmtExpansion ( int  i,
boost::shared_ptr< ExpList > &  result 
)
protectedvirtual

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

Definition at line 2660 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBndElmtExpansion().

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

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D.

Definition at line 2749 of file ExpList.cpp.

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

Referenced by GetBoundaryNormals().

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

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

Definition at line 2794 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBoundaryToElmtMap().

2796  {
2797  ASSERTL0(false,
2798  "This method is not defined or valid for this class type");
2799  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 2599 of file ExpList.cpp.

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

Referenced by GetCoords().

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

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

Definition at line 2094 of file ExpList.cpp.

Referenced by GetFieldDefinitions().

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

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

Definition at line 2101 of file ExpList.cpp.

References GeneralGetFieldDefinitions().

2102  {
2103  GeneralGetFieldDefinitions(fielddef);
2104  }
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:1986
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 2351 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetFwdBwdTracePhys().

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

References ASSERTL0.

2362  {
2363  ASSERTL0(false,
2364  "This method is not defined or valid for this class type");
2365  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
virtual LibUtilities::BasisSharedPtr Nektar::MultiRegions::ExpList::v_GetHomogeneousBasis ( void  )
inlineprivatevirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1375 of file ExpList.h.

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

Referenced by GetHomogeneousBasis().

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

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1869 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetHomoLen().

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

Reimplemented in Nektar::MultiRegions::DisContField3D.

Definition at line 2367 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetLeftAdjacentFaces().

2368  {
2369  ASSERTL0(false,
2370  "This method is not defined or valid for this class type");
2371  vector<bool> returnval;
2372  return returnval;
2373  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 2318 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetNormals().

2320  {
2321  ASSERTL0(false,
2322  "This method is not defined or valid for this class type");
2323  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
virtual int Nektar::MultiRegions::ExpList::v_GetNumElmts ( void  )
inlineprotectedvirtual

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

Definition at line 1059 of file ExpList.h.

Referenced by GetNumElmts().

1060  {
1061  return (*m_exp).size();
1062  }
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 2855 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetPeriodicEntities().

2859  {
2860  ASSERTL0(false,
2861  "This method is not defined or valid for this class type");
2862  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
ExpListSharedPtr & Nektar::MultiRegions::ExpList::v_GetPlane ( int  n)
privatevirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 2878 of file ExpList.cpp.

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

Referenced by GetPlane().

2879  {
2880  ASSERTL0(false,
2881  "This method is not defined or valid for this class type");
2882  return NullExpListSharedPtr;
2883  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
static ExpListSharedPtr NullExpListSharedPtr
Definition: ExpList.h:1398
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 2845 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetRobinBCInfo().

2846  {
2847  ASSERTL0(false,
2848  "This method is not defined or valid for this class type");
2849  static map<int,RobinBCInfoSharedPtr> result;
2850  return result;
2851  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 2297 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetTrace().

2298  {
2299  ASSERTL0(false,
2300  "This method is not defined or valid for this class type");
2301  static boost::shared_ptr<ExpList> returnVal;
2302  return returnVal;
2303  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
const Array< OneD, const int > & Nektar::MultiRegions::ExpList::v_GetTraceBndMap ( )
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D.

Definition at line 2313 of file ExpList.cpp.

References GetTraceMap().

Referenced by GetTraceBndMap().

2314  {
2315  return GetTraceMap()->GetBndCondTraceToGlobalTraceMap();
2316  }
boost::shared_ptr< AssemblyMapDG > & GetTraceMap(void)
Definition: ExpList.h:2009
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 2305 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetTraceMap().

2306  {
2307  ASSERTL0(false,
2308  "This method is not defined or valid for this class type");
2309  static boost::shared_ptr<AssemblyMapDG> result;
2310  return result;
2311  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
LibUtilities::TranspositionSharedPtr Nektar::MultiRegions::ExpList::v_GetTransposition ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1861 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetTransposition().

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

Definition at line 1885 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetYIDs().

1886  {
1887  ASSERTL0(false,
1888  "This method is not defined or valid for this class type");
1889  Array<OneD, unsigned int> NoModes(1);
1890  return NoModes;
1891  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
Array< OneD, const unsigned int > Nektar::MultiRegions::ExpList::v_GetZIDs ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1877 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetZIDs().

1878  {
1879  ASSERTL0(false,
1880  "This method is not defined or valid for this class type");
1881  Array<OneD, unsigned int> NoModes(1);
1882  return NoModes;
1883  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 2543 of file ExpList.cpp.

References ASSERTL0.

Referenced by GlobalToLocal().

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

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

Definition at line 2444 of file ExpList.cpp.

References ASSERTL0.

Referenced by HomogeneousBwdTrans().

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

Reimplemented in Nektar::MultiRegions::ExpList3DHomogeneous1D.

Definition at line 1853 of file ExpList.cpp.

References ASSERTL0.

Referenced by HomogeneousEnergy().

1854  {
1855  ASSERTL0(false,
1856  "This method is not defined or valid for this class type");
1857  Array<OneD, NekDouble> NoEnergy(1,0.0);
1858  return NoEnergy;
1859  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 2434 of file ExpList.cpp.

References ASSERTL0.

Referenced by HomogeneousFwdTrans().

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

References ASSERTL0.

Referenced by ImposeDirichletConditions().

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

Definition at line 1839 of file ExpList.cpp.

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

Referenced by Integral().

1840  {
1841  NekDouble err = 0.0;
1842  int i = 0;
1843 
1844  for (i = 0; i < (*m_exp).size(); ++i)
1845  {
1846  err += (*m_exp)[m_offset_elmt_id[i]]->Integral(inarray + m_phys_offset[i]);
1847  }
1848  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
1849 
1850  return err;
1851  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
Array< OneD, int > m_offset_elmt_id
Array containing the element id m_offset_elmt_id[n] that the n^th consecutive block of data in m_coef...
Definition: ExpList.h:999
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
void Nektar::MultiRegions::ExpList::v_IProductWRTBase ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate 
)
protectedvirtual

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

Definition at line 2564 of file ExpList.cpp.

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

Referenced by IProductWRTBase().

2568  {
2569  Array<OneD,NekDouble> tmp;
2570  for (int i = 0; i < m_collections.size(); ++i)
2571  {
2572 
2574  inarray + m_coll_phys_offset[i],
2575  tmp = outarray + m_coll_coeff_offset[i]);
2576  }
2577  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:985
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:982
Collections::CollectionVector m_collections
Definition: ExpList.h:979
void Nektar::MultiRegions::ExpList::v_IProductWRTBase_IterPerExp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

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

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

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

Definition at line 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:985
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:982
Collections::CollectionVector m_collections
Definition: ExpList.h:979
NekDouble Nektar::MultiRegions::ExpList::v_L2 ( const Array< OneD, const NekDouble > &  inarray,
const Array< OneD, const NekDouble > &  soln = NullNekDouble1DArray 
)
protectedvirtual

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

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

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

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

Definition at line 1809 of file ExpList.cpp.

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

Referenced by L2().

1812  {
1813  NekDouble err = 0.0, errl2;
1814  int i;
1815 
1816  if (soln == NullNekDouble1DArray)
1817  {
1818  for (i = 0; i < (*m_exp).size(); ++i)
1819  {
1820  errl2 = (*m_exp)[i]->L2(inarray + m_phys_offset[i]);
1821  err += errl2*errl2;
1822  }
1823  }
1824  else
1825  {
1826  for (i = 0; i < (*m_exp).size(); ++i)
1827  {
1828  errl2 = (*m_exp)[i]->L2(inarray + m_phys_offset[i],
1829  soln + m_phys_offset[i]);
1830  err += errl2*errl2;
1831  }
1832  }
1833 
1834  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
1835 
1836  return sqrt(err);
1837  }
static Array< OneD, NekDouble > NullNekDouble1DArray
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:907
void Nektar::MultiRegions::ExpList::v_LinearAdvectionDiffusionReactionSolve ( const Array< OneD, Array< OneD, NekDouble > > &  velocity,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const NekDouble  lambda,
CoeffState  coeffstate = eLocal,
const Array< OneD, const NekDouble > &  dirForcing = NullNekDouble1DArray 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField2D.

Definition at line 2410 of file ExpList.cpp.

References ASSERTL0.

Referenced by LinearAdvectionDiffusionReactionSolve().

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

References ASSERTL0.

Referenced by LinearAdvectionReactionSolve().

2429  {
2430  ASSERTL0(false,
2431  "This method is not defined or valid for this class type");
2432  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
void Nektar::MultiRegions::ExpList::v_LocalToGlobal ( void  )
protectedvirtual

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

Definition at line 2537 of file ExpList.cpp.

References ASSERTL0.

Referenced by LocalToGlobal().

2538  {
2539  ASSERTL0(false,
2540  "This method is not defined or valid for this class type");
2541  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 2390 of file ExpList.cpp.

References ASSERTL0.

Referenced by MultiplyByInvMassMatrix().

2394  {
2395  ASSERTL0(false,
2396  "This method is not defined or valid for this class type");
2397  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 2468 of file ExpList.cpp.

References ASSERTL0.

Referenced by NormVectorIProductWRTBase().

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

Definition at line 2477 of file ExpList.cpp.

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

2480  {
2481  Array< OneD, NekDouble> tmp;
2482  switch (GetCoordim(0))
2483  {
2484  case 1:
2485  {
2486  for(int i = 0; i < GetExpSize(); ++i)
2487  {
2488  (*m_exp)[i]->NormVectorIProductWRTBase(
2489  V[0] + GetPhys_Offset(i),
2490  tmp = outarray + GetCoeff_Offset(i));
2491  }
2492  }
2493  break;
2494  case 2:
2495  {
2496  for(int i = 0; i < GetExpSize(); ++i)
2497  {
2498  (*m_exp)[i]->NormVectorIProductWRTBase(
2499  V[0] + GetPhys_Offset(i),
2500  V[1] + GetPhys_Offset(i),
2501  tmp = outarray + GetCoeff_Offset(i));
2502  }
2503  }
2504  break;
2505  case 3:
2506  {
2507  for(int i = 0; i < GetExpSize(); ++i)
2508  {
2509  (*m_exp)[i]->NormVectorIProductWRTBase(
2510  V[0] + GetPhys_Offset(i),
2511  V[1] + GetPhys_Offset(i),
2512  V[2] + GetPhys_Offset(i),
2513  tmp = outarray + GetCoeff_Offset(i));
2514  }
2515  }
2516  break;
2517  default:
2518  ASSERTL0(false,"Dimension not supported");
2519  break;
2520  }
2521  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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:1929
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:1937
int GetExpSize(void)
This function returns the number of elements in the expansion.
Definition: ExpList.h:1899
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1797
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  for (int i = 0; i < m_collections.size(); ++i)
499  {
500  int offset = m_coll_phys_offset[i];
501  e_out_d0 = out_d0 + offset;
502  e_out_d1 = out_d1 + offset;
503  e_out_d2 = out_d2 + offset;
504 
505  m_collections[i].ApplyOperator(Collections::ePhysDeriv,
506  inarray + offset,
507  e_out_d0,e_out_d1, e_out_d2);
508 
509  }
510  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:985
Collections::CollectionVector m_collections
Definition: ExpList.h:979
void Nektar::MultiRegions::ExpList::v_PhysDeriv ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d 
)
protectedvirtual

Definition at line 512 of file ExpList.cpp.

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

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

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

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

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

Definition at line 1900 of file ExpList.cpp.

References ASSERTL0.

Referenced by PhysGalerkinProjection1DScaled().

1900  {
1901  ASSERTL0(false,
1902  "This method is not defined or valid for this class type");
1903  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 1894 of file ExpList.cpp.

References ASSERTL0.

Referenced by PhysInterp1DScaled().

1895  {
1896  ASSERTL0(false,
1897  "This method is not defined or valid for this class type");
1898  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
void Nektar::MultiRegions::ExpList::v_ReadGlobalOptimizationParameters ( )
protectedvirtual

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

Definition at line 2803 of file ExpList.cpp.

References ASSERTL0.

Referenced by ReadGlobalOptimizationParameters().

2804  {
2805  ASSERTL0(false,
2806  "This method is not defined or valid for this class type");
2807  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 1437 of file ExpList.cpp.

References m_exp, and m_graph.

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

1438  {
1439  // Reset matrix managers.
1440  LibUtilities::NekManager<LocalRegions::MatrixKey,
1441  DNekScalMat, LocalRegions::MatrixKey::opLess>::ClearManager();
1442  LibUtilities::NekManager<LocalRegions::MatrixKey,
1443  DNekScalBlkMat, LocalRegions::MatrixKey::opLess>::ClearManager();
1444 
1445  // Loop over all elements and reset geometry information.
1446  for (int i = 0; i < m_exp->size(); ++i)
1447  {
1448  (*m_exp)[i]->GetGeom()->Reset(m_graph->GetCurvedEdges(),
1449  m_graph->GetCurvedFaces());
1450  }
1451 
1452  // Loop over all elements and rebuild geometric factors.
1453  for (int i = 0; i < m_exp->size(); ++i)
1454  {
1455  (*m_exp)[i]->Reset();
1456  }
1457  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
NekMatrix< NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag >, BlockMatrixTag > DNekScalBlkMat
Definition: NekTypeDefs.hpp:66
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:913
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 1383 of file ExpList.h.

References ASSERTL0.

Referenced by SetHomo1DSpecVanVisc().

1384  {
1385  ASSERTL0(false,
1386  "This method is not defined or valid for this class type");
1387  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
void Nektar::MultiRegions::ExpList::v_SetUpPhysNormals ( )
protectedvirtual

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

Definition at line 2652 of file ExpList.cpp.

References ASSERTL0.

Referenced by SetUpPhysNormals().

2653  {
2654  ASSERTL0(false,
2655  "This method is not defined or valid for this class type");
2656  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 636 of file ExpList.cpp.

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

Referenced by SmoothField().

637  {
638  // Do nothing unless the method is implemented in the appropriate
639  // class, i.e. ContField1D,ContField2D, etc.
640 
641  // So far it has been implemented just for ContField2D and
642  // ContField3DHomogeneous1D
643 
644  // Block in case users try the smoothing with a modal expansion.
645  // Maybe a different techique for the smoothing require
646  // implementation for modal basis.
647 
648  ASSERTL0((*m_exp)[0]->GetBasisType(0)
650  (*m_exp)[0]->GetBasisType(0)
652  "Smoothing is currently not allowed unless you are using "
653  "a nodal base for efficiency reasons. The implemented "
654  "smoothing technique requires the mass matrix inversion "
655  "which is trivial just for GLL_LAGRANGE_SEM and "
656  "GAUSS_LAGRANGE_SEMexpansions.");
657  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
Lagrange Polynomials using the Gauss points .
Definition: BasisType.h:54
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
Lagrange for SEM basis .
Definition: BasisType.h:53
boost::shared_ptr< ExpList > & Nektar::MultiRegions::ExpList::v_UpdateBndCondExpansion ( int  i)
protectedvirtual

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

Definition at line 2269 of file ExpList.cpp.

References ASSERTL0.

Referenced by UpdateBndCondExpansion().

2270  {
2271  ASSERTL0(false,
2272  "This method is not defined or valid for this class type");
2273  static boost::shared_ptr<ExpList> result;
2274  return result;
2275  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 2823 of file ExpList.cpp.

References ASSERTL0.

Referenced by UpdateBndConditions().

2824  {
2825  ASSERTL0(false,
2826  "This method is not defined or valid for this class type");
2827  static Array<OneD, SpatialDomains::BoundaryConditionShPtr> result;
2828  return result;
2829  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 2277 of file ExpList.cpp.

References ASSERTL0.

Referenced by Upwind().

2282  {
2283  ASSERTL0(false,
2284  "This method is not defined or valid for this class type");
2285  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
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 2287 of file ExpList.cpp.

References ASSERTL0.

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

Reimplemented in Nektar::MultiRegions::ExpList3DHomogeneous1D.

Definition at line 1597 of file ExpList.cpp.

References ASSERTL0, and m_exp.

Referenced by WriteTecplotConnectivity().

1599  {
1600  int i,j,k,l;
1601  int nbase = (*m_exp)[0]->GetNumBases();
1602  int cnt = 0;
1603 
1604  boost::shared_ptr<LocalRegions::ExpansionVector> exp = m_exp;
1605 
1606  if (expansion != -1)
1607  {
1608  exp = boost::shared_ptr<LocalRegions::ExpansionVector>(
1610  (*exp)[0] = (*m_exp)[expansion];
1611  }
1612 
1613  if (nbase == 2)
1614  {
1615  for(i = 0; i < (*exp).size(); ++i)
1616  {
1617  const int np0 = (*exp)[i]->GetNumPoints(0);
1618  const int np1 = (*exp)[i]->GetNumPoints(1);
1619 
1620  for(j = 1; j < np1; ++j)
1621  {
1622  for(k = 1; k < np0; ++k)
1623  {
1624  outfile << cnt + (j-1)*np0 + k << " ";
1625  outfile << cnt + (j-1)*np0 + k+1 << " ";
1626  outfile << cnt + j *np0 + k+1 << " ";
1627  outfile << cnt + j *np0 + k << endl;
1628  }
1629  }
1630 
1631  cnt += np0*np1;
1632  }
1633  }
1634  else if (nbase == 3)
1635  {
1636  for(i = 0; i < (*exp).size(); ++i)
1637  {
1638  const int np0 = (*exp)[i]->GetNumPoints(0);
1639  const int np1 = (*exp)[i]->GetNumPoints(1);
1640  const int np2 = (*exp)[i]->GetNumPoints(2);
1641  const int np01 = np0*np1;
1642 
1643  for(j = 1; j < np2; ++j)
1644  {
1645  for(k = 1; k < np1; ++k)
1646  {
1647  for(l = 1; l < np0; ++l)
1648  {
1649  outfile << cnt + (j-1)*np01 + (k-1)*np0 + l << " ";
1650  outfile << cnt + (j-1)*np01 + (k-1)*np0 + l+1 << " ";
1651  outfile << cnt + (j-1)*np01 + k *np0 + l+1 << " ";
1652  outfile << cnt + (j-1)*np01 + k *np0 + l << " ";
1653  outfile << cnt + j *np01 + (k-1)*np0 + l << " ";
1654  outfile << cnt + j *np01 + (k-1)*np0 + l+1 << " ";
1655  outfile << cnt + j *np01 + k *np0 + l+1 << " ";
1656  outfile << cnt + j *np01 + k *np0 + l << endl;
1657  }
1658  }
1659  }
1660  cnt += np0*np1*np2;
1661  }
1662  }
1663  else
1664  {
1665  ASSERTL0(false,"Not set up for this dimension");
1666  }
1667  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:188
std::vector< ExpansionSharedPtr > ExpansionVector
Definition: Expansion.h:70
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:977
void Nektar::MultiRegions::ExpList::v_WriteTecplotField ( std::ostream &  outfile,
int  expansion 
)
protectedvirtual

Write Tecplot Files Field

Parameters
outfileOutput file name.
expansionExpansion that is considered

Definition at line 1674 of file ExpList.cpp.

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

Referenced by WriteTecplotField().

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

Write Tecplot Files Header

Parameters
outfileOutput file name.
varvariables names

Definition at line 1464 of file ExpList.cpp.

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

Referenced by WriteTecplotHeader().

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

Write Tecplot Files Zone

Parameters
outfileOutput file name.
expansionExpansion that is considered

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

Definition at line 1503 of file ExpList.cpp.

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

Referenced by WriteTecplotZone().

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

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

Referenced by WriteVtkPieceData().

1735  {
1736  int i;
1737  int nq = (*m_exp)[expansion]->GetTotPoints();
1738 
1739  // printing the fields of that zone
1740  outfile << " <DataArray type=\"Float64\" Name=\""
1741  << var << "\">" << endl;
1742  outfile << " ";
1743  const Array<OneD, NekDouble> phys = m_phys + m_phys_offset[expansion];
1744  for(i = 0; i < nq; ++i)
1745  {
1746  outfile << (fabs(phys[i]) < NekConstants::kNekZeroTol ? 0 : phys[i]) << " ";
1747  }
1748  outfile << endl;
1749  outfile << " </DataArray>" << endl;
1750  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:956
static const NekDouble kNekZeroTol
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:991
void Nektar::MultiRegions::ExpList::v_WriteVtkPieceHeader ( std::ostream &  outfile,
int  expansion,
int  istrip 
)
protectedvirtual
void Nektar::MultiRegions::ExpList::WriteTecplotConnectivity ( std::ostream &  outfile,
int  expansion = -1 
)
inline

Definition at line 395 of file ExpList.h.

References v_WriteTecplotConnectivity().

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

Definition at line 389 of file ExpList.h.

References v_WriteTecplotField().

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

Definition at line 376 of file ExpList.h.

References v_WriteTecplotHeader().

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

Definition at line 382 of file ExpList.h.

References v_WriteTecplotZone().

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

Definition at line 1716 of file ExpList.cpp.

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

Definition at line 1708 of file ExpList.cpp.

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

Definition at line 414 of file ExpList.h.

References v_WriteVtkPieceData().

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

Definition at line 1727 of file ExpList.cpp.

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

Definition at line 404 of file ExpList.h.

References v_WriteVtkPieceHeader().

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

Member Data Documentation

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

Definition at line 1003 of file ExpList.h.

Referenced by GetBlockMatrix().

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

Concatenation of all local expansion coefficients.

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

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

Definition at line 939 of file ExpList.h.

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

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

Offset of elemental data into the array m_coeffs.

Definition at line 982 of file ExpList.h.

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

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

Offset of elemental data into the array m_phys.

Definition at line 985 of file ExpList.h.

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

Collections::CollectionVector Nektar::MultiRegions::ExpList::m_collections
protected
LibUtilities::CommSharedPtr Nektar::MultiRegions::ExpList::m_comm
protected
boost::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 977 of file ExpList.h.

Referenced by Nektar::MultiRegions::ContField3DHomogeneous1D::ContField3DHomogeneous1D(), Nektar::MultiRegions::ContField3DHomogeneous2D::ContField3DHomogeneous2D(), CreateCollections(), Nektar::MultiRegions::DisContField3DHomogeneous1D::DisContField3DHomogeneous1D(), Nektar::MultiRegions::DisContField3DHomogeneous2D::DisContField3DHomogeneous2D(), EvalBasisNumModesMax(), EvalBasisNumModesMaxPerExp(), ExpList(), Nektar::MultiRegions::ExpList2DHomogeneous1D::ExpList2DHomogeneous1D(), Nektar::MultiRegions::ExpList3DHomogeneous2D::ExpList3DHomogeneous2D(), GenBlockMatrix(), GeneralGetFieldDefinitions(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GenExpList3DHomogeneous1D(), Get1DScaledTotPoints(), GetCoordim(), GetExp(), GetExpIndex(), GetNcoeffs(), GetTotPoints(), Nektar::MultiRegions::DisContField2D::IsLeftAdjacentEdge(), Nektar::MultiRegions::DisContField3D::IsLeftAdjacentFace(), Nektar::MultiRegions::DisContField1D::IsLeftAdjacentVertex(), Nektar::MultiRegions::ExpList3D::SetCoeffPhys(), Nektar::MultiRegions::ExpList0D::SetCoeffPhysOffsets(), Nektar::MultiRegions::ExpList2D::SetCoeffPhysOffsets(), Nektar::MultiRegions::ExpList1D::SetCoeffPhysOffsets(), Nektar::MultiRegions::DisContField3D::SetUpDG(), Nektar::MultiRegions::DisContField2D::SetUpDG(), Nektar::MultiRegions::DisContField1D::SetUpDG(), Nektar::MultiRegions::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 893 of file ExpList.h.

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

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

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

Definition at line 917 of file ExpList.h.

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

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

Session.

Definition at line 910 of file ExpList.h.

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

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