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

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

#include <ExpList.h>

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

Public Member Functions

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

Public Attributes

ExpansionType m_expType
 

Protected Member Functions

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

Static Protected Member Functions

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

Protected Attributes

LibUtilities::CommSharedPtr m_comm
 Communicator. More...
 
LibUtilities::SessionReaderSharedPtr m_session
 Session. More...
 
SpatialDomains::MeshGraphSharedPtr m_graph
 Mesh associated with this expansion list. More...
 
int m_ncoeffs
 The total number of local degrees of freedom. m_ncoeffs $=N_{\mathrm{eof}}=\sum_{e=1}^{{N_{\mathrm{el}}}}N^{e}_l$. More...
 
int m_npoints
 
Array< OneD, NekDoublem_coeffs
 Concatenation of all local expansion coefficients. More...
 
Array< OneD, NekDoublem_phys
 The global expansion evaluated at the quadrature points. More...
 
bool m_physState
 The state of the array m_phys. More...
 
boost::shared_ptr
< LocalRegions::ExpansionVector
m_exp
 The list of local expansions. More...
 
Collections::CollectionVector m_collections
 
std::vector< int > m_coll_coeff_offset
 Offset of elemental data into the array m_coeffs. More...
 
std::vector< int > m_coll_phys_offset
 Offset of elemental data into the array m_phys. More...
 
Array< OneD, int > m_coeff_offset
 Offset of elemental data into the array m_coeffs. More...
 
Array< OneD, int > m_phys_offset
 Offset of elemental data into the array m_phys. More...
 
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(),
108  m_blockMat(MemoryManager<BlockMatrixMap>::AllocateSharedPtr()),
109  m_WaveSpace(false)
110  {
112  }
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1054
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:976
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:972
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:969
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:966
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:277
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 120 of file ExpList.cpp.

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

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

The default constructor.

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

Definition at line 146 of file ExpList.cpp.

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

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

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

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

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

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

The default destructor.

Definition at line 282 of file ExpList.cpp.

283  {
284  }

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

References v_AddFwdBwdTraceIntegral().

2183  {
2184  v_AddFwdBwdTraceIntegral(Fwd,Bwd,outarray);
2185  }
virtual void v_AddFwdBwdTraceIntegral(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2459
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 2164 of file ExpList.h.

References v_AddTraceIntegral().

2168  {
2169  v_AddTraceIntegral(Fx,Fy,outarray);
2170  }
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2442
void Nektar::MultiRegions::ExpList::AddTraceIntegral ( const Array< OneD, const NekDouble > &  Fn,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 2172 of file ExpList.h.

References v_AddTraceIntegral().

2175  {
2176  v_AddTraceIntegral(Fn,outarray);
2177  }
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2442
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 864 of file ExpList.h.

References v_AppendFieldData().

867  {
868  v_AppendFieldData(fielddef,fielddata);
869  }
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:2212
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 874 of file ExpList.h.

References v_AppendFieldData().

878  {
879  v_AppendFieldData(fielddef,fielddata,coeffs);
880  }
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:2212
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 1524 of file ExpList.cpp.

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

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

Definition at line 1691 of file ExpList.h.

References v_BwdTrans().

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

1695  {
1696  v_BwdTrans(inarray,outarray,coeffstate);
1697  }
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2707
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 1702 of file ExpList.h.

References v_BwdTrans_IterPerExp().

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

1705  {
1706  v_BwdTrans_IterPerExp(inarray,outarray);
1707  }
virtual void v_BwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1331
void Nektar::MultiRegions::ExpList::ClearGlobalLinSysManager ( void  )

Definition at line 3290 of file ExpList.cpp.

References v_ClearGlobalLinSysManager().

3291  {
3293  }
virtual void v_ClearGlobalLinSysManager(void)
Definition: ExpList.cpp:2005
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 3151 of file ExpList.cpp.

References Nektar::Collections::CollectionOptimisation::GetDefaultImplementationType(), Nektar::Collections::CollectionOptimisation::GetMaxCollectionSize(), Nektar::Collections::CollectionOptimisation::GetOperatorImpMap(), Nektar::Collections::CollectionOptimisation::IsUsingAutotuning(), Nektar::iterator, m_coeff_offset, m_coll_coeff_offset, m_coll_phys_offset, m_collections, m_comm, m_exp, m_phys_offset, m_session, and Nektar::Collections::CollectionOptimisation::SetWithTimings().

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

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

Definition at line 1807 of file ExpList.h.

References v_CurlCurl().

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

Definition at line 1855 of file ExpList.h.

References v_DealiasedDotProd().

1860  {
1861  v_DealiasedDotProd(inarray1,inarray2,outarray,coeffstate);
1862  }
virtual void v_DealiasedDotProd(const Array< OneD, Array< OneD, NekDouble > > &inarray1, const Array< OneD, Array< OneD, NekDouble > > &inarray2, Array< OneD, Array< OneD, NekDouble > > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.cpp:2581
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 1843 of file ExpList.h.

References v_DealiasedProd().

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

1848  {
1849  v_DealiasedProd(inarray1,inarray2,outarray,coeffstate);
1850  }
virtual void v_DealiasedProd(const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.cpp:2572
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 1499 of file ExpList.h.

References m_exp.

1500  {
1501  unsigned int i;
1502  int returnval = 0;
1503 
1504  for(i= 0; i < (*m_exp).size(); ++i)
1505  {
1506  returnval = (std::max)(returnval,
1507  (*m_exp)[i]->EvalBasisNumModesMax());
1508  }
1509 
1510  return returnval;
1511  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
const Array< OneD, int > Nektar::MultiRegions::ExpList::EvalBasisNumModesMaxPerExp ( void  ) const
inline

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

Definition at line 1516 of file ExpList.h.

References m_exp.

1518  {
1519  unsigned int i;
1520  Array<OneD,int> returnval((*m_exp).size(),0);
1521 
1522  for(i= 0; i < (*m_exp).size(); ++i)
1523  {
1524  returnval[i]
1525  = (std::max)(returnval[i],(*m_exp)[i]->EvalBasisNumModesMax());
1526  }
1527 
1528  return returnval;
1529  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
void Nektar::MultiRegions::ExpList::EvaluateBoundaryConditions ( const NekDouble  time = 0.0,
const std::string  varName = "",
const NekDouble  x2_in = NekConstants::kNekUnsetDouble,
const NekDouble  x3_in = NekConstants::kNekUnsetDouble 
)
inline

Definition at line 2233 of file ExpList.h.

References v_EvaluateBoundaryConditions().

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

2238  {
2239  v_EvaluateBoundaryConditions(time, varName, x2_in, x3_in);
2240  }
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:3028
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 2249 of file ExpList.cpp.

References v_ExtractCoeffsToCoeffs().

2250  {
2251  v_ExtractCoeffsToCoeffs(fromExpList,fromCoeffs,toCoeffs);
2252  }
virtual void v_ExtractCoeffsToCoeffs(const boost::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
Definition: ExpList.cpp:2353
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 2240 of file ExpList.cpp.

References v_ExtractDataToCoeffs().

2245  {
2246  v_ExtractDataToCoeffs(fielddef,fielddata,field,coeffs);
2247  }
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:2262
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 2299 of file ExpList.h.

References v_ExtractElmtToBndPhys().

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

Definition at line 2011 of file ExpList.cpp.

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

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

2016  {
2017  string varString = fileName.substr(0, fileName.find_last_of("."));
2018  int j, k, len = varString.length();
2019  varString = varString.substr(len-1, len);
2020 
2021  std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
2022  std::vector<std::vector<NekDouble> > FieldData;
2023 
2024  std::string ft = LibUtilities::FieldIO::GetFileType(fileName, comm);
2026  .CreateInstance(ft, comm, m_session->GetSharedFilesystem());
2027 
2028  f->Import(fileName, FieldDef, FieldData);
2029 
2030  bool found = false;
2031  for (j = 0; j < FieldDef.size(); ++j)
2032  {
2033  for (k = 0; k < FieldDef[j]->m_fields.size(); ++k)
2034  {
2035  if (FieldDef[j]->m_fields[k] == varName)
2036  {
2037  // Copy FieldData into locExpList
2038  locExpList->ExtractDataToCoeffs(
2039  FieldDef[j], FieldData[j],
2040  FieldDef[j]->m_fields[k],
2041  locExpList->UpdateCoeffs());
2042  found = true;
2043  }
2044  }
2045  }
2046 
2047  ASSERTL0(found, "Could not find variable '"+varName+
2048  "' in file boundary condition "+fileName);
2049  locExpList->BwdTrans_IterPerExp(
2050  locExpList->GetCoeffs(),
2051  locExpList->UpdatePhys());
2052  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:162
FieldIOFactory & GetFieldIOFactory()
Returns the FieldIO factory.
Definition: FieldIO.cpp:74
static const std::string GetFileType(const std::string &filename, CommSharedPtr comm)
Determine file type of given input file.
Definition: FieldIO.cpp:101
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:969
boost::shared_ptr< FieldIO > FieldIOSharedPtr
Definition: FieldIO.h:309
void Nektar::MultiRegions::ExpList::ExtractPhysToBnd ( int  i,
const Array< OneD, const NekDouble > &  phys,
Array< OneD, NekDouble > &  bnd 
)
inline

Definition at line 2313 of file ExpList.h.

References v_ExtractPhysToBnd().

2316  {
2317  v_ExtractPhysToBnd(i, phys, bnd);
2318  }
virtual void v_ExtractPhysToBnd(int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bnd)
Definition: ExpList.cpp:2906
void Nektar::MultiRegions::ExpList::ExtractPhysToBndElmt ( int  i,
const Array< OneD, const NekDouble > &  phys,
Array< OneD, NekDouble > &  bndElmt 
)
inline

Definition at line 2306 of file ExpList.h.

References v_ExtractPhysToBndElmt().

2309  {
2310  v_ExtractPhysToBndElmt(i, phys, bndElmt);
2311  }
virtual void v_ExtractPhysToBndElmt(int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bndElmt)
Definition: ExpList.cpp:2866
void Nektar::MultiRegions::ExpList::ExtractTracePhys ( Array< OneD, NekDouble > &  outarray)
inline

Definition at line 2207 of file ExpList.h.

References v_ExtractTracePhys().

2208  {
2209  v_ExtractTracePhys(outarray);
2210  }
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2493
void Nektar::MultiRegions::ExpList::ExtractTracePhys ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 2213 of file ExpList.h.

References v_ExtractTracePhys().

2216  {
2217  v_ExtractTracePhys(inarray,outarray);
2218  }
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2493
void Nektar::MultiRegions::ExpList::FillBndCondFromField ( void  )
inline

Fill Bnd Condition expansion from the values stored in expansion.

Definition at line 1949 of file ExpList.h.

References v_FillBndCondFromField().

1950  {
1952  }
virtual void v_FillBndCondFromField()
Definition: ExpList.cpp:2662
void Nektar::MultiRegions::ExpList::FillBndCondFromField ( const int  nreg)
inline

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

Definition at line 1954 of file ExpList.h.

References v_FillBndCondFromField().

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

Definition at line 1662 of file ExpList.h.

References v_FwdTrans().

1666  {
1667  v_FwdTrans(inarray,outarray,coeffstate);
1668  }
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2714
void Nektar::MultiRegions::ExpList::FwdTrans_BndConstrained ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

Definition at line 714 of file ExpList.cpp.

References m_coeff_offset, and m_phys_offset.

717  {
718  int i;
719 
720  Array<OneD,NekDouble> e_outarray;
721 
722  for(i= 0; i < (*m_exp).size(); ++i)
723  {
724  (*m_exp)[i]->FwdTrans_BndConstrained(inarray+m_phys_offset[i],
725  e_outarray = outarray+m_coeff_offset[i]);
726  }
727  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
void Nektar::MultiRegions::ExpList::FwdTrans_IterPerExp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

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

Definition at line 1673 of file ExpList.h.

References v_FwdTrans_IterPerExp().

1676  {
1677  v_FwdTrans_IterPerExp(inarray,outarray);
1678  }
virtual void v_FwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:704
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 778 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_phys_offset, and NEKERROR.

Referenced by GetBlockMatrix().

780  {
781  int i,cnt1;
782  int n_exp = 0;
783  DNekScalMatSharedPtr loc_mat;
784  DNekScalBlkMatSharedPtr BlkMatrix;
785  map<int,int> elmt_id;
786  LibUtilities::ShapeType ShapeType = gkey.GetShapeType();
787 
788  if(ShapeType != LibUtilities::eNoShapeType)
789  {
790  for(i = 0 ; i < (*m_exp).size(); ++i)
791  {
792  if((*m_exp)[i]->DetShapeType()
793  == ShapeType)
794  {
795  elmt_id[n_exp++] = i;
796  }
797  }
798  }
799  else
800  {
801  n_exp = (*m_exp).size();
802  for(i = 0; i < n_exp; ++i)
803  {
804  elmt_id[i] = i;
805  }
806  }
807 
808  Array<OneD,unsigned int> nrows(n_exp);
809  Array<OneD,unsigned int> ncols(n_exp);
810 
811  switch(gkey.GetMatrixType())
812  {
814  {
815  // set up an array of integers for block matrix construction
816  for(i = 0; i < n_exp; ++i)
817  {
818  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
819  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
820  }
821  }
822  break;
824  {
825  // set up an array of integers for block matrix construction
826  for(i = 0; i < n_exp; ++i)
827  {
828  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
829  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
830  }
831  }
832  break;
833  case StdRegions::eMass:
838  {
839  // set up an array of integers for block matrix construction
840  for(i = 0; i < n_exp; ++i)
841  {
842  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
843  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
844  }
845  }
846  break;
847 
849  {
850  // set up an array of integers for block matrix construction
851  for(i = 0; i < n_exp; ++i)
852  {
853  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
854  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
855  }
856  }
857  break;
858 
860  {
861  // set up an array of integers for block matrix construction
862  for(i = 0; i < n_exp; ++i)
863  {
864  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
865  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
866  }
867  }
868  break;
869 
870  default:
871  {
873  "Global Matrix creation not defined for this type "
874  "of matrix");
875  }
876  }
877 
878  MatrixStorage blkmatStorage = eDIAGONAL;
880  ::AllocateSharedPtr(nrows,ncols,blkmatStorage);
881 
882  int nvarcoeffs = gkey.GetNVarCoeffs();
883  int eid;
884  Array<OneD, NekDouble> varcoeffs_wk;
885 
886  for(i = cnt1 = 0; i < n_exp; ++i)
887  {
888  // need to be initialised with zero size for non variable coefficient case
889  StdRegions::VarCoeffMap varcoeffs;
890 
891  eid = elmt_id[i];
892  if(nvarcoeffs>0)
893  {
894  StdRegions::VarCoeffMap::const_iterator x;
895  for (x = gkey.GetVarCoeffs().begin(); x != gkey.GetVarCoeffs().end(); ++x)
896  {
897  varcoeffs[x->first] = x->second + m_phys_offset[eid];
898  }
899  }
900 
901  LocalRegions::MatrixKey matkey(gkey.GetMatrixType(),
902  (*m_exp)[eid]->DetShapeType(),
903  *(*m_exp)[eid],
904  gkey.GetConstFactors(),
905  varcoeffs );
906 
907  loc_mat = boost::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[elmt_id.find(i)->second])->GetLocMatrix(matkey);
908  BlkMatrix->SetBlock(i,i,loc_mat);
909  }
910 
911  return BlkMatrix;
912  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:191
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:227
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
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 2090 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().

2098  {
2099  int startenum = (int) LibUtilities::eSegment;
2100  int endenum = (int) LibUtilities::eHexahedron;
2101  int s = 0;
2103 
2104  ASSERTL1(NumHomoDir == HomoBasis.num_elements(),"Homogeneous basis is not the same length as NumHomoDir");
2105  ASSERTL1(NumHomoDir == HomoLen.size(),"Homogeneous length vector is not the same length as NumHomDir");
2106 
2107  // count number of shapes
2108  switch((*m_exp)[0]->GetShapeDimension())
2109  {
2110  case 1:
2111  startenum = (int) LibUtilities::eSegment;
2112  endenum = (int) LibUtilities::eSegment;
2113  break;
2114  case 2:
2115  startenum = (int) LibUtilities::eTriangle;
2116  endenum = (int) LibUtilities::eQuadrilateral;
2117  break;
2118  case 3:
2119  startenum = (int) LibUtilities::eTetrahedron;
2120  endenum = (int) LibUtilities::eHexahedron;
2121  break;
2122  }
2123 
2124  for(s = startenum; s <= endenum; ++s)
2125  {
2126  std::vector<unsigned int> elementIDs;
2127  std::vector<LibUtilities::BasisType> basis;
2128  std::vector<unsigned int> numModes;
2129  std::vector<std::string> fields;
2130 
2131  bool first = true;
2132  bool UniOrder = true;
2133  int n;
2134 
2135  shape = (LibUtilities::ShapeType) s;
2136 
2137  for(int i = 0; i < (*m_exp).size(); ++i)
2138  {
2139  if((*m_exp)[i]->GetGeom()->GetShapeType() == shape)
2140  {
2141  elementIDs.push_back((*m_exp)[i]->GetGeom()->GetGlobalID());
2142  if(first)
2143  {
2144  for(int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2145  {
2146  basis.push_back((*m_exp)[i]->GetBasis(j)->GetBasisType());
2147  numModes.push_back((*m_exp)[i]->GetBasis(j)->GetNumModes());
2148  }
2149 
2150  // add homogeneous direction details if defined
2151  for(n = 0 ; n < NumHomoDir; ++n)
2152  {
2153  basis.push_back(HomoBasis[n]->GetBasisType());
2154  numModes.push_back(HomoBasis[n]->GetNumModes());
2155  }
2156 
2157  first = false;
2158  }
2159  else
2160  {
2161  ASSERTL0((*m_exp)[i]->GetBasis(0)->GetBasisType() == basis[0],"Routine is not set up for multiple bases definitions");
2162 
2163  for(int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2164  {
2165  numModes.push_back((*m_exp)[i]->GetBasis(j)->GetNumModes());
2166  if(numModes[j] != (*m_exp)[i]->GetBasis(j)->GetNumModes())
2167  {
2168  UniOrder = false;
2169  }
2170  }
2171  // add homogeneous direction details if defined
2172  for(n = 0 ; n < NumHomoDir; ++n)
2173  {
2174  numModes.push_back(HomoBasis[n]->GetNumModes());
2175  }
2176  }
2177  }
2178  }
2179 
2180 
2181  if(elementIDs.size() > 0)
2182  {
2185  AllocateSharedPtr(shape, elementIDs, basis,
2186  UniOrder, numModes,fields,
2187  NumHomoDir, HomoLen, homoStrips,
2188  HomoSIDs, HomoZIDs, HomoYIDs);
2189  fielddef.push_back(fdef);
2190  }
2191  }
2192  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
boost::shared_ptr< FieldDefinitions > FieldDefinitionsSharedPtr
Definition: FieldIO.h:181
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
void Nektar::MultiRegions::ExpList::GeneralMatrixOp ( const GlobalMatrixKey gkey,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
inline

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

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

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

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

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

Definition at line 2271 of file ExpList.h.

References v_GeneralMatrixOp().

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

2276  {
2277  v_GeneralMatrixOp(gkey,inarray,outarray,coeffstate);
2278  }
virtual void v_GeneralMatrixOp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2736
void Nektar::MultiRegions::ExpList::GeneralMatrixOp_IterPerExp ( const GlobalMatrixKey gkey,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

Definition at line 929 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_phys_offset, and MultiplyByBlockMatrix().

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

933  {
934  const Array<OneD, const bool> doBlockMatOp
935  = m_globalOptParam->DoBlockMatOp(gkey.GetMatrixType());
936  const Array<OneD, const int> num_elmts
937  = m_globalOptParam->GetShapeNumElements();
938 
939  Array<OneD,NekDouble> tmp_outarray;
940  int cnt = 0;
941  int eid;
942  for(int n = 0; n < num_elmts.num_elements(); ++n)
943  {
944  if(doBlockMatOp[n])
945  {
946  const LibUtilities::ShapeType vType
947  = m_globalOptParam->GetShapeList()[n];
948  const MultiRegions::GlobalMatrixKey vKey(gkey, vType);
949  if (cnt < m_coeff_offset.num_elements())
950  {
951  eid = cnt;
952  MultiplyByBlockMatrix(vKey,inarray + m_coeff_offset[eid],
953  tmp_outarray = outarray + m_coeff_offset[eid]);
954  cnt += num_elmts[n];
955  }
956  }
957  else
958  {
959  int i;
960  int nvarcoeffs = gkey.GetNVarCoeffs();
961 
962  for(i= 0; i < num_elmts[n]; ++i)
963  {
964  // need to be initialised with zero size for non variable coefficient case
965  StdRegions::VarCoeffMap varcoeffs;
966 
967  eid = cnt++;
968  if(nvarcoeffs>0)
969  {
970  StdRegions::VarCoeffMap::const_iterator x;
971  for (x = gkey.GetVarCoeffs().begin(); x != gkey.GetVarCoeffs().end(); ++x)
972  {
973  varcoeffs[x->first] = x->second + m_phys_offset[eid];
974  }
975  }
976 
977  StdRegions::StdMatrixKey mkey(gkey.GetMatrixType(),
978  (*m_exp)[eid]->DetShapeType(),
979  *((*m_exp)[eid]),
980  gkey.GetConstFactors(),varcoeffs);
981 
982  (*m_exp)[eid]->GeneralMatrixOp(inarray + m_coeff_offset[eid],
983  tmp_outarray = outarray+m_coeff_offset[eid],
984  mkey);
985  }
986  }
987  }
988  }
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:1052
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:227
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
void MultiplyByBlockMatrix(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:350
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 1294 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().

1297  {
1298  boost::shared_ptr<ExpList> vExpList = GetSharedThisPtr();
1299  const map<int,RobinBCInfoSharedPtr> vRobinBCInfo = GetRobinBCInfo();
1300 
1301  MultiRegions::GlobalSysSolnType vType = mkey.GetGlobalSysSolnType();
1302 
1303  if (vType >= eSIZE_GlobalSysSolnType)
1304  {
1305  ASSERTL0(false,"Matrix solution type not defined");
1306  }
1307  std::string vSolnType = MultiRegions::GlobalSysSolnTypeMap[vType];
1308 
1309  return GetGlobalLinSysFactory().CreateInstance(vSolnType,mkey,
1310  vExpList,locToGloMap);
1311  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:162
boost::shared_ptr< ExpList > GetSharedThisPtr()
Returns a shared pointer to the current object.
Definition: ExpList.h:914
const char *const GlobalSysSolnTypeMap[]
std::map< int, RobinBCInfoSharedPtr > GetRobinBCInfo()
Definition: ExpList.h:835
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 1275 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().

1278  {
1279  GlobalLinSysSharedPtr returnlinsys;
1280  boost::shared_ptr<ExpList> vExpList = GetSharedThisPtr();
1281 
1282  MultiRegions::GlobalSysSolnType vType = mkey.GetGlobalSysSolnType();
1283 
1284  if (vType >= eSIZE_GlobalSysSolnType)
1285  {
1286  ASSERTL0(false,"Matrix solution type not defined");
1287  }
1288  std::string vSolnType = MultiRegions::GlobalSysSolnTypeMap[vType];
1289 
1290  return GetGlobalLinSysFactory().CreateInstance( vSolnType, mkey,
1291  vExpList, locToGloMap);
1292  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:162
boost::shared_ptr< ExpList > GetSharedThisPtr()
Returns a shared pointer to the current object.
Definition: ExpList.h:914
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 997 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_phys_offset, m_session, and NEKERROR.

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

1000  {
1001  int i,j,n,gid1,gid2,cntdim1,cntdim2;
1002  NekDouble sign1,sign2;
1003  DNekScalMatSharedPtr loc_mat;
1004 
1005  unsigned int glob_rows;
1006  unsigned int glob_cols;
1007  unsigned int loc_rows;
1008  unsigned int loc_cols;
1009 
1010  bool assembleFirstDim;
1011  bool assembleSecondDim;
1012 
1013  switch(mkey.GetMatrixType())
1014  {
1015  case StdRegions::eBwdTrans:
1016  {
1017  glob_rows = m_npoints;
1018  glob_cols = locToGloMap->GetNumGlobalCoeffs();
1019 
1020  assembleFirstDim = false;
1021  assembleSecondDim = true;
1022  }
1023  break;
1025  {
1026  glob_rows = locToGloMap->GetNumGlobalCoeffs();
1027  glob_cols = m_npoints;
1028 
1029  assembleFirstDim = true;
1030  assembleSecondDim = false;
1031  }
1032  break;
1033  case StdRegions::eMass:
1037  {
1038  glob_rows = locToGloMap->GetNumGlobalCoeffs();
1039  glob_cols = locToGloMap->GetNumGlobalCoeffs();
1040 
1041  assembleFirstDim = true;
1042  assembleSecondDim = true;
1043  }
1044  break;
1045  default:
1046  {
1048  "Global Matrix creation not defined for this type "
1049  "of matrix");
1050  }
1051  }
1052 
1053  COOMatType spcoomat;
1054  CoordType coord;
1055 
1056  int nvarcoeffs = mkey.GetNVarCoeffs();
1057  int eid;
1058 
1059  // fill global matrix
1060  for(n = cntdim1 = cntdim2 = 0; n < (*m_exp).size(); ++n)
1061  {
1062  // need to be initialised with zero size for non variable coefficient case
1063  StdRegions::VarCoeffMap varcoeffs;
1064 
1065  eid = n;
1066  if(nvarcoeffs>0)
1067  {
1068  StdRegions::VarCoeffMap::const_iterator x;
1069  for (x = mkey.GetVarCoeffs().begin(); x != mkey.GetVarCoeffs().end(); ++x)
1070  {
1071  varcoeffs[x->first] = x->second + m_phys_offset[eid];
1072  }
1073  }
1074 
1075  LocalRegions::MatrixKey matkey(mkey.GetMatrixType(),
1076  (*m_exp)[eid]->DetShapeType(),
1077  *((*m_exp)[eid]),
1078  mkey.GetConstFactors(),varcoeffs);
1079 
1080  loc_mat = boost::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[n])->GetLocMatrix(matkey);
1081 
1082  loc_rows = loc_mat->GetRows();
1083  loc_cols = loc_mat->GetColumns();
1084 
1085  for(i = 0; i < loc_rows; ++i)
1086  {
1087  if(assembleFirstDim)
1088  {
1089  gid1 = locToGloMap->GetLocalToGlobalMap (cntdim1 + i);
1090  sign1 = locToGloMap->GetLocalToGlobalSign(cntdim1 + i);
1091  }
1092  else
1093  {
1094  gid1 = cntdim1 + i;
1095  sign1 = 1.0;
1096  }
1097 
1098  for(j = 0; j < loc_cols; ++j)
1099  {
1100  if(assembleSecondDim)
1101  {
1102  gid2 = locToGloMap
1103  ->GetLocalToGlobalMap(cntdim2 + j);
1104  sign2 = locToGloMap
1105  ->GetLocalToGlobalSign(cntdim2 + j);
1106  }
1107  else
1108  {
1109  gid2 = cntdim2 + j;
1110  sign2 = 1.0;
1111  }
1112 
1113  // sparse matrix fill
1114  coord = make_pair(gid1,gid2);
1115  if( spcoomat.count(coord) == 0 )
1116  {
1117  spcoomat[coord] = sign1*sign2*(*loc_mat)(i,j);
1118  }
1119  else
1120  {
1121  spcoomat[coord] += sign1*sign2*(*loc_mat)(i,j);
1122  }
1123  }
1124  }
1125  cntdim1 += loc_rows;
1126  cntdim2 += loc_cols;
1127  }
1128 
1130  ::AllocateSharedPtr(m_session,glob_rows,glob_cols,spcoomat);
1131  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:191
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
std::map< CoordType, NekDouble > COOMatType
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:227
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:969
double NekDouble
std::pair< IndexType, IndexType > CoordType
DNekMatSharedPtr Nektar::MultiRegions::ExpList::GenGlobalMatrixFull ( const GlobalLinSysKey mkey,
const boost::shared_ptr< AssemblyMapCG > &  locToGloMap 
)
protected

Definition at line 1134 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, and m_phys_offset.

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

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

References m_exp.

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

Definition at line 1867 of file ExpList.h.

References v_GetBCValues().

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

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

916  {
917  BlockMatrixMap::iterator matrixIter = m_blockMat->find(gkey);
918 
919  if(matrixIter == m_blockMat->end())
920  {
921  return ((*m_blockMat)[gkey] = GenBlockMatrix(gkey));
922  }
923  else
924  {
925  return matrixIter->second;
926  }
927  }
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1054
const DNekScalBlkMatSharedPtr GenBlockMatrix(const GlobalMatrixKey &gkey)
This function assembles the block diagonal matrix of local matrices of the type mtype.
Definition: ExpList.cpp:778
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 2115 of file ExpList.h.

References v_GetBndCondExpansions().

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

2116  {
2117  return v_GetBndCondExpansions();
2118  }
virtual const Array< OneD, const boost::shared_ptr< ExpList > > & v_GetBndCondExpansions(void)
Definition: ExpList.cpp:2378
const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::GetBndConditions ( )
inline

Definition at line 2221 of file ExpList.h.

References v_GetBndConditions().

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

Definition at line 2292 of file ExpList.h.

References v_GetBndElmtExpansion().

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

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

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

Definition at line 2320 of file ExpList.h.

References v_GetBoundaryNormals().

2322  {
2323  v_GetBoundaryNormals(i, normals);
2324  }
virtual void v_GetBoundaryNormals(int i, Array< OneD, Array< OneD, NekDouble > > &normals)
Definition: ExpList.cpp:2944
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 2015 of file ExpList.h.

References m_coeffs.

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

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

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

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

Returns
(A constant reference to) the array m_coeffs.

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

1939  {
1940  return m_coeffs;
1941  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
NekDouble Nektar::MultiRegions::ExpList::GetCoeffs ( int  i)
inline

Get the i th value (coefficient) of m_coeffs.

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

Definition at line 2024 of file ExpList.h.

References m_coeffs.

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

Returns the comm object.

Definition at line 926 of file ExpList.h.

References m_comm.

927  {
928  return m_comm;
929  }
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:966
int Nektar::MultiRegions::ExpList::GetCoordim ( int  eid)
inline

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

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

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

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

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

Definition at line 1769 of file ExpList.h.

References v_GetCoords().

Referenced by v_WriteTecplotZone().

1773  {
1774  v_GetCoords(coord_0,coord_1,coord_2);
1775  }
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
Definition: ExpList.cpp:2756
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 2067 of file ExpList.h.

References m_exp.

Referenced by Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG(), Nektar::MultiRegions::AssemblyMapDG::AssemblyMapDG(), Nektar::MultiRegions::ContField3DHomogeneous1D::ContField3DHomogeneous1D(), Nektar::MultiRegions::ContField3DHomogeneous2D::ContField3DHomogeneous2D(), Nektar::MultiRegions::AssemblyMapCG::CreateGraph(), Nektar::MultiRegions::DisContField3DHomogeneous1D::DisContField3DHomogeneous1D(), Nektar::MultiRegions::DisContField3DHomogeneous2D::DisContField3DHomogeneous2D(), Nektar::MultiRegions::ExpList1DHomogeneous2D::ExpList1DHomogeneous2D(), Nektar::MultiRegions::ExpList2DHomogeneous1D::ExpList2DHomogeneous1D(), Nektar::MultiRegions::ExpList3DHomogeneous2D::ExpList3DHomogeneous2D(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GenExpList3DHomogeneous1D(), Nektar::MultiRegions::DisContField3DHomogeneous1D::GetBCValues(), GetExpIndex(), Nektar::MultiRegions::LocTraceToTraceMap::LocTraceToTraceMap(), Nektar::MultiRegions::DisContField3DHomogeneous1D::NormVectorIProductWRTBase(), Nektar::MultiRegions::ExpList1D::PostProcess(), Nektar::MultiRegions::LocTraceToTraceMap::Setup2D(), Nektar::MultiRegions::LocTraceToTraceMap::Setup3D(), Nektar::MultiRegions::AssemblyMapCG::SetUpUniversalC0ContMap(), Nektar::MultiRegions::AssemblyMapDG::SetUpUniversalDGMap(), Nektar::MultiRegions::AssemblyMapDG::SetUpUniversalTraceMap(), v_ExtractElmtToBndPhys(), v_ExtractPhysToBnd(), v_ExtractPhysToBndElmt(), Nektar::MultiRegions::DisContField3DHomogeneous2D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3D::v_GetBndElmtExpansion(), Nektar::MultiRegions::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().

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

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

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

Definition at line 2058 of file ExpList.h.

References m_exp.

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

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

Definition at line 1343 of file ExpList.cpp.

References ASSERTL0, GetCoordim(), and m_exp.

1345  {
1346  Array<OneD, NekDouble> stdCoord(GetCoordim(0),0.0);
1347  for (int i = 0; i < (*m_exp).size(); ++i)
1348  {
1349  if ((*m_exp)[i]->GetGeom()->ContainsPoint(gloCoord))
1350  {
1351  return (*m_exp)[i];
1352  }
1353  }
1354  ASSERTL0(false, "Cannot find element for this point.");
1355  return (*m_exp)[0]; // avoid warnings
1356  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1898
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 1364 of file ExpList.cpp.

1368  {
1369  Array<OneD, NekDouble> Lcoords(gloCoord.num_elements());
1370 
1371  return GetExpIndex(gloCoord,Lcoords,tol,returnNearestElmt);
1372  }
int GetExpIndex(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false)
Definition: ExpList.cpp:1364
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 1375 of file ExpList.cpp.

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

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

This function returns the number of elements in the expansion.

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

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

2047  {
2048  return (*m_exp).size();
2049  }
ExpansionType Nektar::MultiRegions::ExpList::GetExpType ( void  )

Returns the type of the expansion.

Definition at line 269 of file ExpList.cpp.

References m_expType.

Referenced by v_CurlCurl().

270  {
271  return m_expType;
272  }
std::vector<LibUtilities::FieldDefinitionsSharedPtr> Nektar::MultiRegions::ExpList::GetFieldDefinitions ( )
inline

Definition at line 849 of file ExpList.h.

References v_GetFieldDefinitions().

850  {
851  return v_GetFieldDefinitions();
852  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2198
void Nektar::MultiRegions::ExpList::GetFieldDefinitions ( std::vector< LibUtilities::FieldDefinitionsSharedPtr > &  fielddef)
inline

Definition at line 855 of file ExpList.h.

References v_GetFieldDefinitions().

856  {
857  v_GetFieldDefinitions(fielddef);
858  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2198
void Nektar::MultiRegions::ExpList::GetFwdBwdTracePhys ( Array< OneD, NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd 
)
inline

Definition at line 2187 of file ExpList.h.

References v_GetFwdBwdTracePhys().

2190  {
2191  v_GetFwdBwdTracePhys(Fwd,Bwd);
2192  }
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
Definition: ExpList.cpp:2468
void Nektar::MultiRegions::ExpList::GetFwdBwdTracePhys ( const Array< OneD, const NekDouble > &  field,
Array< OneD, NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd 
)
inline

Definition at line 2194 of file ExpList.h.

References v_GetFwdBwdTracePhys().

2198  {
2199  v_GetFwdBwdTracePhys(field,Fwd,Bwd);
2200  }
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
Definition: ExpList.cpp:2468
const NekOptimize::GlobalOptParamSharedPtr& Nektar::MultiRegions::ExpList::GetGlobalOptParam ( void  )
inline

Definition at line 830 of file ExpList.h.

References m_globalOptParam.

831  {
832  return m_globalOptParam;
833  }
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:1052
SpatialDomains::MeshGraphSharedPtr Nektar::MultiRegions::ExpList::GetGraph ( )
inline

Definition at line 931 of file ExpList.h.

References m_graph.

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

Definition at line 937 of file ExpList.h.

References v_GetHomogeneousBasis().

938  {
939  return v_GetHomogeneousBasis();
940  }
virtual LibUtilities::BasisSharedPtr v_GetHomogeneousBasis(void)
Definition: ExpList.h:1454
NekDouble Nektar::MultiRegions::ExpList::GetHomoLen ( void  )
inline

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

Definition at line 578 of file ExpList.h.

References v_GetHomoLen().

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

Definition at line 2202 of file ExpList.h.

References v_GetLeftAdjacentFaces().

2203  {
2204  return v_GetLeftAdjacentFaces();
2205  }
virtual const std::vector< bool > & v_GetLeftAdjacentFaces(void) const
Definition: ExpList.cpp:2484
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 1490 of file ExpList.h.

References m_exp.

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

Definition at line 2158 of file ExpList.h.

References v_GetNormals().

2160  {
2161  v_GetNormals(normals);
2162  }
virtual void v_GetNormals(Array< OneD, Array< OneD, NekDouble > > &normals)
Definition: ExpList.cpp:2435
int Nektar::MultiRegions::ExpList::GetNpoints ( void  ) const
inline

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

Definition at line 1567 of file ExpList.h.

References m_npoints.

1568  {
1569  return m_npoints;
1570  }
int Nektar::MultiRegions::ExpList::GetNumElmts ( void  )
inline

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

Definition at line 623 of file ExpList.h.

References v_GetNumElmts().

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

624  {
625  return v_GetNumElmts();
626  }
virtual int v_GetNumElmts(void)
Definition: ExpList.h:1110
void Nektar::MultiRegions::ExpList::GetPeriodicEntities ( PeriodicMap periodicVerts,
PeriodicMap periodicEdges,
PeriodicMap periodicFaces = NullPeriodicMap 
)
inline

Definition at line 840 of file ExpList.h.

References v_GetPeriodicEntities().

844  {
845  v_GetPeriodicEntities(periodicVerts, periodicEdges, periodicFaces);
846  }
virtual void v_GetPeriodicEntities(PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces)
Definition: ExpList.cpp:3050
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 2037 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().

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

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

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

Definition at line 1633 of file ExpList.h.

References m_physState.

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

Definition at line 942 of file ExpList.h.

References v_GetPlane().

943  {
944  return v_GetPlane(n);
945  }
virtual boost::shared_ptr< ExpList > & v_GetPlane(int n)
Definition: ExpList.cpp:3073
std::map<int, RobinBCInfoSharedPtr> Nektar::MultiRegions::ExpList::GetRobinBCInfo ( )
inline

Definition at line 835 of file ExpList.h.

References v_GetRobinBCInfo().

Referenced by GenGlobalBndLinSys(), and GenGlobalMatrixFull().

836  {
837  return v_GetRobinBCInfo();
838  }
virtual std::map< int, RobinBCInfoSharedPtr > v_GetRobinBCInfo(void)
Definition: ExpList.cpp:3040
boost::shared_ptr<LibUtilities::SessionReader> Nektar::MultiRegions::ExpList::GetSession ( ) const
inline

Returns the session object.

Definition at line 920 of file ExpList.h.

References m_session.

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

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

Returns a shared pointer to the current object.

Definition at line 914 of file ExpList.h.

Referenced by GenGlobalBndLinSys(), and GenGlobalLinSys().

915  {
916  return shared_from_this();
917  }
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 1540 of file ExpList.h.

References m_exp.

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

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

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

2144  {
2145  return v_GetTrace();
2146  }
virtual boost::shared_ptr< ExpList > & v_GetTrace()
Definition: ExpList.cpp:2414
const Array< OneD, const int > & Nektar::MultiRegions::ExpList::GetTraceBndMap ( void  )
inline

Definition at line 2153 of file ExpList.h.

References v_GetTraceBndMap().

2154  {
2155  return v_GetTraceBndMap();
2156  }
virtual const Array< OneD, const int > & v_GetTraceBndMap()
Definition: ExpList.cpp:2430
boost::shared_ptr< AssemblyMapDG > & Nektar::MultiRegions::ExpList::GetTraceMap ( void  )
inline

Definition at line 2148 of file ExpList.h.

References v_GetTraceMap().

Referenced by v_GetTraceBndMap().

2149  {
2150  return v_GetTraceMap();
2151  }
virtual boost::shared_ptr< AssemblyMapDG > & v_GetTraceMap()
Definition: ExpList.cpp:2422
LibUtilities::TranspositionSharedPtr Nektar::MultiRegions::ExpList::GetTransposition ( void  )
inline

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

Definition at line 571 of file ExpList.h.

References v_GetTransposition().

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

References m_WaveSpace.

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

1585  {
1586  return m_WaveSpace;
1587  }
Array<OneD, const unsigned int> Nektar::MultiRegions::ExpList::GetYIDs ( void  )
inline

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

Definition at line 587 of file ExpList.h.

References v_GetYIDs().

588  {
589  return v_GetYIDs();
590  }
virtual Array< OneD, const unsigned int > v_GetYIDs(void)
Definition: ExpList.cpp:1985
Array<OneD, const unsigned int> Nektar::MultiRegions::ExpList::GetZIDs ( void  )
inline

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

Definition at line 564 of file ExpList.h.

References v_GetZIDs().

Referenced by v_WriteTecplotZone().

565  {
566  return v_GetZIDs();
567  }
virtual Array< OneD, const unsigned int > v_GetZIDs(void)
Definition: ExpList.cpp:1977
void Nektar::MultiRegions::ExpList::GlobalEigenSystem ( const boost::shared_ptr< DNekMat > &  Gmat,
Array< OneD, NekDouble > &  EigValsReal,
Array< OneD, NekDouble > &  EigValsImag,
Array< OneD, NekDouble > &  EigVecs = NullNekDouble1DArray 
)
protected
void Nektar::MultiRegions::ExpList::GlobalToLocal ( void  )
inline
void Nektar::MultiRegions::ExpList::GlobalToLocal ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

This operation is evaluated as:

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

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

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

Definition at line 2003 of file ExpList.h.

References v_GlobalToLocal().

2006  {
2007  v_GlobalToLocal(inarray, outarray);
2008  }
virtual void v_GlobalToLocal(void)
Definition: ExpList.cpp:2692
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 2071 of file ExpList.cpp.

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

2074  {
2075  NekDouble err = 0.0, errh1;
2076  int i;
2077 
2078  for (i = 0; i < (*m_exp).size(); ++i)
2079  {
2080  errh1 = (*m_exp)[i]->H1(inarray + m_phys_offset[i],
2081  soln + m_phys_offset[i]);
2082  err += errh1*errh1;
2083  }
2084 
2085  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
2086 
2087  return sqrt(err);
2088  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:966
void Nektar::MultiRegions::ExpList::HelmSolve ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const FlagList flags,
const StdRegions::ConstFactorMap factors,
const StdRegions::VarCoeffMap varcoeff = StdRegions::NullVarCoeffMap,
const Array< OneD, const NekDouble > &  dirForcing = NullNekDouble1DArray,
const bool  PhysSpaceForcing = true 
)
inline

Solve helmholtz problem.

Definition at line 1724 of file ExpList.h.

References v_HelmSolve().

1733  {
1734  v_HelmSolve(inarray, outarray, flags, factors, varcoeff,
1735  dirForcing, PhysSpaceForcing);
1736  }
virtual void v_HelmSolve(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const FlagList &flags, const StdRegions::ConstFactorMap &factors, const StdRegions::VarCoeffMap &varcoeff, const Array< OneD, const NekDouble > &dirForcing, const bool PhysSpaceForcing)
Definition: ExpList.cpp:2516
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 1830 of file ExpList.h.

References v_HomogeneousBwdTrans().

1836  {
1837  v_HomogeneousBwdTrans(inarray,outarray,coeffstate,Shuff,UnShuff);
1838  }
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:2562
Array<OneD, const NekDouble> Nektar::MultiRegions::ExpList::HomogeneousEnergy ( void  )
inline

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

Definition at line 548 of file ExpList.h.

References v_HomogeneousEnergy().

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

References v_HomogeneousFwdTrans().

1823  {
1824  v_HomogeneousFwdTrans(inarray,outarray,coeffstate,Shuff,UnShuff);
1825  }
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:2552
void Nektar::MultiRegions::ExpList::ImposeDirichletConditions ( Array< OneD, NekDouble > &  outarray)
inline

Impose Dirichlet Boundary Conditions onto Array.

Definition at line 1943 of file ExpList.h.

References v_ImposeDirichletConditions().

1945  {
1946  v_ImposeDirichletConditions(outarray);
1947  }
virtual void v_ImposeDirichletConditions(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2654
NekDouble Nektar::MultiRegions::ExpList::Integral ( const Array< OneD, const NekDouble > &  inarray)
inline

Definition at line 541 of file ExpList.h.

References v_Integral().

542  {
543  return v_Integral(inarray);
544  }
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Definition: ExpList.cpp:1939
void Nektar::MultiRegions::ExpList::IProductWRTBase ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
inline
void Nektar::MultiRegions::ExpList::IProductWRTBase_IterPerExp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

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

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

1655  {
1656  v_IProductWRTBase_IterPerExp(inarray,outarray);
1657  }
virtual void v_IProductWRTBase_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:380
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 407 of file ExpList.cpp.

References m_coeff_offset, and m_phys_offset.

410  {
411  int i;
412 
413  Array<OneD,NekDouble> e_outarray;
414 
415  for(i = 0; i < (*m_exp).size(); ++i)
416  {
417  (*m_exp)[i]->IProductWRTDerivBase(dir,inarray+m_phys_offset[i],
418  e_outarray = outarray+m_coeff_offset[i]);
419  }
420  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
void Nektar::MultiRegions::ExpList::IProductWRTDerivBase ( const Array< OneD, const Array< OneD, NekDouble > > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

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

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

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

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

Definition at line 434 of file ExpList.cpp.

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

436  {
437  Array<OneD, NekDouble> tmp0,tmp1,tmp2;
438  // assume coord dimension defines the size of Deriv Base
439  int dim = GetCoordim(0);
440 
441  ASSERTL1(inarray.num_elements() >= dim,"inarray is not of sufficient dimension");
442 
443  switch(dim)
444  {
445  case 1:
446  for (int i = 0; i < m_collections.size(); ++i)
447  {
448  m_collections[i].ApplyOperator(
450  inarray[0] + m_coll_phys_offset[i],
451  tmp0 = outarray + m_coll_coeff_offset[i]);
452  }
453  break;
454  case 2:
455  for (int i = 0; i < m_collections.size(); ++i)
456  {
457  m_collections[i].ApplyOperator(
459  inarray[0] + m_coll_phys_offset[i],
460  tmp0 = inarray[1] + m_coll_phys_offset[i],
461  tmp1 = outarray + m_coll_coeff_offset[i]);
462  }
463  break;
464  case 3:
465  for (int i = 0; i < m_collections.size(); ++i)
466  {
467  m_collections[i].ApplyOperator(
469  inarray[0] + m_coll_phys_offset[i],
470  tmp0 = inarray[1] + m_coll_phys_offset[i],
471  tmp1 = inarray[2] + m_coll_phys_offset[i],
472  tmp2 = outarray + m_coll_coeff_offset[i]);
473  }
474  break;
475  default:
476  ASSERTL0(false,"Dimension of inarray not correct");
477  break;
478  }
479  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1044
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1898
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1041
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
Collections::CollectionVector m_collections
Definition: ExpList.h:1038
NekDouble Nektar::MultiRegions::ExpList::L2 ( const Array< OneD, const NekDouble > &  inarray,
const Array< OneD, const NekDouble > &  soln = NullNekDouble1DArray 
)
inline

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

Definition at line 528 of file ExpList.h.

References v_L2().

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

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

References v_LinearAdvectionDiffusionReactionSolve().

1749  {
1750  v_LinearAdvectionDiffusionReactionSolve(velocity,inarray, outarray,
1751  lambda, coeffstate,dirForcing);
1752  }
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:2528
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 1754 of file ExpList.h.

References v_LinearAdvectionReactionSolve().

1761  {
1762  v_LinearAdvectionReactionSolve(velocity,inarray, outarray,
1763  lambda, coeffstate,dirForcing);
1764  }
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:2540
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 1870 of file ExpList.cpp.

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

1873  {
1874  NekDouble err = 0.0;
1875 
1876  if (soln == NullNekDouble1DArray)
1877  {
1878  err = Vmath::Vmax(m_npoints, inarray, 1);
1879  }
1880  else
1881  {
1882  for (int i = 0; i < m_npoints; ++i)
1883  {
1884  err = max(err, abs(inarray[i] - soln[i]));
1885  }
1886  }
1887 
1888  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceMax);
1889 
1890  return err;
1891  }
static Array< OneD, NekDouble > NullNekDouble1DArray
T Vmax(int n, const T *x, const int incx)
Return the maximum element in x – called vmax to avoid conflict with max.
Definition: Vmath.cpp:779
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:966
void Nektar::MultiRegions::ExpList::LocalToGlobal ( bool  useComm = true)
inline

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

Definition at line 1959 of file ExpList.h.

References v_LocalToGlobal().

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

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

Definition at line 1964 of file ExpList.h.

References v_LocalToGlobal().

1968  {
1969  v_LocalToGlobal(inarray, outarray,useComm);
1970  }
virtual void v_LocalToGlobal(bool UseComm)
Definition: ExpList.cpp:2676
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 350 of file ExpList.cpp.

References Nektar::eWrapper, and GetBlockMatrix().

Referenced by GeneralMatrixOp_IterPerExp().

354  {
355  // Retrieve the block matrix using the given key.
356  const DNekScalBlkMatSharedPtr& blockmat = GetBlockMatrix(gkey);
357  int nrows = blockmat->GetRows();
358  int ncols = blockmat->GetColumns();
359 
360  // Create NekVectors from the given data arrays
361  NekVector<NekDouble> in (ncols,inarray, eWrapper);
362  NekVector< NekDouble> out(nrows,outarray,eWrapper);
363 
364  // Perform matrix-vector multiply.
365  out = (*blockmat)*in;
366  }
const DNekScalBlkMatSharedPtr & GetBlockMatrix(const GlobalMatrixKey &gkey)
Definition: ExpList.cpp:914
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 665 of file ExpList.cpp.

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

Referenced by v_FwdTrans_IterPerExp().

668  {
669  GlobalMatrixKey mkey(StdRegions::eInvMass);
670  const DNekScalBlkMatSharedPtr& InvMass = GetBlockMatrix(mkey);
671 
672  // Inverse mass matrix
673  NekVector<NekDouble> out(m_ncoeffs,outarray,eWrapper);
674  if(inarray.get() == outarray.get())
675  {
676  NekVector<NekDouble> in(m_ncoeffs,inarray); // copy data
677  out = (*InvMass)*in;
678  }
679  else
680  {
681  NekVector<NekDouble> in(m_ncoeffs,inarray,eWrapper);
682  out = (*InvMass)*in;
683  }
684  }
const DNekScalBlkMatSharedPtr & GetBlockMatrix(const GlobalMatrixKey &gkey)
Definition: ExpList.cpp:914
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:976
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:74
void Nektar::MultiRegions::ExpList::MultiplyByInvMassMatrix ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
inline

Definition at line 1713 of file ExpList.h.

References v_MultiplyByInvMassMatrix().

1717  {
1718  v_MultiplyByInvMassMatrix(inarray,outarray,coeffstate);
1719  }
virtual void v_MultiplyByInvMassMatrix(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2507
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 1878 of file ExpList.h.

References v_NormVectorIProductWRTBase().

1883  {
1884  v_NormVectorIProductWRTBase(V1,V2,outarray,BndID);
1885  }
virtual void v_NormVectorIProductWRTBase(Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
Definition: ExpList.cpp:2599
void Nektar::MultiRegions::ExpList::NormVectorIProductWRTBase ( Array< OneD, Array< OneD, NekDouble > > &  V,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 1887 of file ExpList.h.

References v_NormVectorIProductWRTBase().

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

Definition at line 1799 of file ExpList.h.

References v_PhysDeriv().

Referenced by v_CurlCurl().

1803  {
1804  v_PhysDeriv(edir, inarray,out_d);
1805  }
virtual void v_PhysDeriv(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d0, Array< OneD, NekDouble > &out_d1, Array< OneD, NekDouble > &out_d2)
Definition: ExpList.cpp:514
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 1780 of file ExpList.h.

References v_PhysDeriv().

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

Definition at line 1791 of file ExpList.h.

References v_PhysDeriv().

1795  {
1796  v_PhysDeriv(dir,inarray,out_d);
1797  }
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:514
void Nektar::MultiRegions::ExpList::PhysGalerkinProjection1DScaled ( const NekDouble  scale,
const Array< OneD, NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

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

Definition at line 608 of file ExpList.h.

References v_PhysGalerkinProjection1DScaled().

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

References ASSERTL1, m_phys, and m_physState.

303  {
304  ASSERTL1(m_physState == true,
305  "local physical space is not true ");
306 
307  return PhysIntegral(m_phys);
308  }
NekDouble PhysIntegral(void)
This function integrates a function over the domain consisting of all the elements of the expansion...
Definition: ExpList.cpp:302
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
NekDouble Nektar::MultiRegions::ExpList::PhysIntegral ( const Array< OneD, const NekDouble > &  inarray)

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

The integration is evaluated locally, that is

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

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

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

Definition at line 327 of file ExpList.cpp.

References m_phys_offset.

329  {
330  int i;
331  NekDouble sum = 0.0;
332 
333  for(i = 0; i < (*m_exp).size(); ++i)
334  {
335  sum += (*m_exp)[i]->Integral(inarray + m_phys_offset[i]);
336  }
337 
338  return sum;
339  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
double NekDouble
void Nektar::MultiRegions::ExpList::PhysInterp1DScaled ( const NekDouble  scale,
const Array< OneD, NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

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

Definition at line 596 of file ExpList.h.

References v_PhysInterp1DScaled().

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

Reset geometry information and reset matrices.

Definition at line 378 of file ExpList.h.

References v_Reset().

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

References m_coeffs.

1910  {
1911  m_coeffs[i] = val;
1912  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
void Nektar::MultiRegions::ExpList::SetCoeffPhysOffsets ( )
protected

Definition of the total number of degrees of freedom and quadrature points and offsets to access data.

Each expansion (local element) is processed in turn to determine the number of coefficients and physical data points it contributes to the domain. Twoe arrays, m_coeff_offset are m_phys_offset are also initialised and updated to store the data offsets of each element in the m_coeffs and m_phys arrays, and the element id that each consecutive block is associated respectively.

Definition at line 247 of file ExpList.cpp.

References m_coeff_offset, m_exp, m_ncoeffs, m_npoints, and m_phys_offset.

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

248  {
249  int i;
250 
251  // Set up offset information and array sizes
252  m_coeff_offset = Array<OneD,int>(m_exp->size());
253  m_phys_offset = Array<OneD,int>(m_exp->size());
254 
255  m_ncoeffs = m_npoints = 0;
256 
257  for(i = 0; i < m_exp->size(); ++i)
258  {
260  m_phys_offset [i] = m_npoints;
261  m_ncoeffs += (*m_exp)[i]->GetNcoeffs();
262  m_npoints += (*m_exp)[i]->GetTotPoints();
263  }
264  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:976
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 1919 of file ExpList.h.

References m_coeffs.

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

Set the m_coeffs array to inarray.

Definition at line 1925 of file ExpList.h.

References m_coeffs.

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

This function sets the Spectral Vanishing Viscosity in homogeneous1D expansion.

Definition at line 555 of file ExpList.h.

References v_SetHomo1DSpecVanVisc().

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

References m_phys.

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

Fills the array m_phys.

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

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

Definition at line 1604 of file ExpList.h.

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

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

Sets the array m_phys.

Definition at line 1615 of file ExpList.h.

References m_phys.

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

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

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

Definition at line 1624 of file ExpList.h.

References m_physState.

1625  {
1626  m_physState = physState;
1627  }
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
void Nektar::MultiRegions::ExpList::SetUpPhysNormals ( )
inline
void Nektar::MultiRegions::ExpList::SetWaveSpace ( const bool  wavespace)
inline

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

Definition at line 1576 of file ExpList.h.

References m_WaveSpace.

1577  {
1578  m_WaveSpace = wavespace;
1579  }
void Nektar::MultiRegions::ExpList::SmoothField ( Array< OneD, NekDouble > &  field)
inline

Smooth a field across elements.

Definition at line 1683 of file ExpList.h.

References v_SmoothField().

1684  {
1685  v_SmoothField(field);
1686  }
virtual void v_SmoothField(Array< OneD, NekDouble > &field)
Definition: ExpList.cpp:736
boost::shared_ptr< ExpList > & Nektar::MultiRegions::ExpList::UpdateBndCondExpansion ( int  i)
inline

Definition at line 2120 of file ExpList.h.

References v_UpdateBndCondExpansion().

2121  {
2122  return v_UpdateBndCondExpansion(i);
2123  }
virtual boost::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
Definition: ExpList.cpp:2386
Array< OneD, SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::UpdateBndConditions ( )
inline

Definition at line 2228 of file ExpList.h.

References v_UpdateBndConditions().

2229  {
2230  return v_UpdateBndConditions();
2231  }
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
Definition: ExpList.cpp:3018
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 2095 of file ExpList.h.

References m_coeffs.

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

2096  {
2097  return m_coeffs;
2098  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
Array< OneD, NekDouble > & Nektar::MultiRegions::ExpList::UpdatePhys ( void  )
inline

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

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

Returns
(A reference to) the array m_phys.

Definition at line 2106 of file ExpList.h.

References m_phys, and m_physState.

2107  {
2108  m_physState = true;
2109  return m_phys;
2110  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
void Nektar::MultiRegions::ExpList::Upwind ( const Array< OneD, const Array< OneD, NekDouble > > &  Vec,
const Array< OneD, const NekDouble > &  Fwd,
const Array< OneD, const NekDouble > &  Bwd,
Array< OneD, NekDouble > &  Upwind 
)
inline

Definition at line 2125 of file ExpList.h.

References v_Upwind().

2130  {
2131  v_Upwind(Vec, Fwd, Bwd, Upwind);
2132  }
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:2394
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 2134 of file ExpList.h.

References v_Upwind().

2139  {
2140  v_Upwind(Vn, Fwd, Bwd, Upwind);
2141  }
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:2394
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 2459 of file ExpList.cpp.

References ASSERTL0.

Referenced by AddFwdBwdTraceIntegral().

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

Reimplemented in Nektar::MultiRegions::DisContField2D.

Definition at line 2442 of file ExpList.cpp.

References ASSERTL0.

Referenced by AddTraceIntegral().

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

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

Definition at line 2451 of file ExpList.cpp.

References ASSERTL0.

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

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

Definition at line 2212 of file ExpList.cpp.

References m_coeffs.

Referenced by AppendFieldData().

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

References m_coeff_offset.

2218  {
2219  int i;
2220  // Determine mapping from element ids to location in
2221  // expansion list
2222  // Determine mapping from element ids to location in
2223  // expansion list
2224  map<int, int> ElmtID_to_ExpID;
2225  for(i = 0; i < (*m_exp).size(); ++i)
2226  {
2227  ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2228  }
2229 
2230  for(i = 0; i < fielddef->m_elementIDs.size(); ++i)
2231  {
2232  int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
2233  int datalen = (*m_exp)[eid]->GetNcoeffs();
2234  fielddata.insert(fielddata.end(),&coeffs[m_coeff_offset[eid]],&coeffs[m_coeff_offset[eid]]+datalen);
2235  }
2236 
2237  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
void Nektar::MultiRegions::ExpList::v_BwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate 
)
protectedvirtual

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

Definition at line 2707 of file ExpList.cpp.

References v_BwdTrans_IterPerExp().

Referenced by BwdTrans().

2710  {
2711  v_BwdTrans_IterPerExp(inarray,outarray);
2712  }
virtual void v_BwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1331
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 1331 of file ExpList.cpp.

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

Referenced by BwdTrans_IterPerExp(), and v_BwdTrans().

1333  {
1334  Array<OneD, NekDouble> tmp;
1335  for (int i = 0; i < m_collections.size(); ++i)
1336  {
1337  m_collections[i].ApplyOperator(Collections::eBwdTrans,
1338  inarray + m_coll_coeff_offset[i],
1339  tmp = outarray + m_coll_phys_offset[i]);
1340  }
1341  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1044
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1041
Collections::CollectionVector m_collections
Definition: ExpList.h:1038
void Nektar::MultiRegions::ExpList::v_ClearGlobalLinSysManager ( void  )
protectedvirtual

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

Definition at line 2005 of file ExpList.cpp.

References ASSERTL0.

Referenced by ClearGlobalLinSysManager().

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

Definition at line 586 of file ExpList.cpp.

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

Referenced by CurlCurl().

589  {
590  int nq = GetTotPoints();
591  Array<OneD,NekDouble> Vx(nq);
592  Array<OneD,NekDouble> Uy(nq);
593  Array<OneD,NekDouble> Dummy(nq);
594 
595  bool halfMode = false;
596  if ( GetExpType() == e3DH1D)
597  {
598  m_session->MatchSolverInfo("ModeType", "HalfMode",
599  halfMode, false);
600  }
601 
602  switch(GetExpType())
603  {
604  case e2D:
605  {
606  PhysDeriv(xDir, Vel[yDir], Vx);
607  PhysDeriv(yDir, Vel[xDir], Uy);
608 
609 
610  Vmath::Vsub(nq, Vx, 1, Uy, 1, Dummy, 1);
611 
612  PhysDeriv(Dummy,Q[1],Q[0]);
613 
614  Vmath::Smul(nq, -1.0, Q[1], 1, Q[1], 1);
615  }
616  break;
617 
618  case e3D:
619  case e3DH1D:
620  case e3DH2D:
621  {
622  Array<OneD,NekDouble> Vz(nq);
623  Array<OneD,NekDouble> Uz(nq);
624  Array<OneD,NekDouble> Wx(nq);
625  Array<OneD,NekDouble> Wy(nq);
626 
627  PhysDeriv(Vel[xDir], Dummy, Uy, Uz);
628  PhysDeriv(Vel[yDir], Vx, Dummy, Vz);
629  PhysDeriv(Vel[zDir], Wx, Wy, Dummy);
630 
631  Vmath::Vsub(nq, Wy, 1, Vz, 1, Q[0], 1);
632  Vmath::Vsub(nq, Uz, 1, Wx, 1, Q[1], 1);
633  Vmath::Vsub(nq, Vx, 1, Uy, 1, Q[2], 1);
634 
635  PhysDeriv(Q[0], Dummy, Uy, Uz);
636  PhysDeriv(Q[1], Vx, Dummy, Vz);
637  PhysDeriv(Q[2], Wx, Wy, Dummy);
638 
639  // For halfmode, need to change the sign of z derivatives
640  if (halfMode)
641  {
642  Vmath::Neg(nq, Uz, 1);
643  Vmath::Neg(nq, Vz, 1);
644  }
645 
646  Vmath::Vsub(nq, Wy, 1, Vz, 1, Q[0], 1);
647  Vmath::Vsub(nq, Uz, 1, Wx, 1, Q[1], 1);
648  Vmath::Vsub(nq, Vx, 1, Uy, 1, Q[2], 1);
649  }
650  break;
651  default:
652  ASSERTL0(0,"Dimension not supported");
653  break;
654  }
655  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
ExpansionType GetExpType(void)
Returns the type of the expansion.
Definition: ExpList.cpp:269
void PhysDeriv(Direction edir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d)
Definition: ExpList.h:1799
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
Definition: Vmath.cpp:213
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1535
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:969
void Neg(int n, T *x, const int incx)
Negate x = -x.
Definition: Vmath.cpp:396
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
Definition: Vmath.cpp:343
void Nektar::MultiRegions::ExpList::v_DealiasedDotProd ( const Array< OneD, Array< OneD, NekDouble > > &  inarray1,
const Array< OneD, Array< OneD, NekDouble > > &  inarray2,
Array< OneD, Array< OneD, NekDouble > > &  outarray,
CoeffState  coeffstate = eLocal 
)
protectedvirtual

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

Definition at line 2581 of file ExpList.cpp.

References ASSERTL0.

Referenced by DealiasedDotProd().

2586  {
2587  ASSERTL0(false,
2588  "This method is not defined or valid for this class type");
2589  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
void Nektar::MultiRegions::ExpList::v_DealiasedProd ( const Array< OneD, NekDouble > &  inarray1,
const Array< OneD, NekDouble > &  inarray2,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
protectedvirtual

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

Definition at line 2572 of file ExpList.cpp.

References ASSERTL0.

Referenced by DealiasedProd().

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

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

Definition at line 3028 of file ExpList.cpp.

References ASSERTL0.

Referenced by EvaluateBoundaryConditions().

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

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 2353 of file ExpList.cpp.

References m_coeff_offset.

Referenced by ExtractCoeffsToCoeffs().

2354  {
2355  int i;
2356  int offset = 0;
2357 
2358  for(i = 0; i < (*m_exp).size(); ++i)
2359  {
2360  std::vector<unsigned int> nummodes;
2361  vector<LibUtilities::BasisType> basisTypes;
2362  for(int j= 0; j < fromExpList->GetExp(i)->GetNumBases(); ++j)
2363  {
2364  nummodes.push_back(fromExpList->GetExp(i)->GetBasisNumModes(j));
2365  basisTypes.push_back(fromExpList->GetExp(i)->GetBasisType(j));
2366  }
2367 
2368  (*m_exp)[i]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes,0,
2369  &toCoeffs[m_coeff_offset[i]],
2370  basisTypes);
2371 
2372  offset += fromExpList->GetExp(i)->GetNcoeffs();
2373  }
2374  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
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 2262 of file ExpList.cpp.

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

Referenced by ExtractDataToCoeffs().

2267  {
2268  int i, expId;
2269  int offset = 0;
2270  int modes_offset = 0;
2271  int datalen = fielddata.size()/fielddef->m_fields.size();
2272 
2273  // Find data location according to field definition
2274  for(i = 0; i < fielddef->m_fields.size(); ++i)
2275  {
2276  if(fielddef->m_fields[i] == field)
2277  {
2278  break;
2279  }
2280  offset += datalen;
2281  }
2282 
2283  ASSERTL0(i != fielddef->m_fields.size(),
2284  "Field (" + field + ") not found in file.");
2285 
2286  if (m_elmtToExpId.size() == 0)
2287  {
2288  // Loop in reverse order so that in case where using a
2289  // Homogeneous expansion it sets geometry ids to first part of
2290  // m_exp list. Otherwise will set to second (complex) expansion
2291  for(i = (*m_exp).size()-1; i >= 0; --i)
2292  {
2293  m_elmtToExpId[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2294  }
2295  }
2296 
2298 
2299  for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
2300  {
2301  // Reset modes_offset in the case where all expansions of
2302  // the same order.
2303  if (fielddef->m_uniOrder == true)
2304  {
2305  modes_offset = 0;
2306  }
2307 
2308  datalen = LibUtilities::GetNumberOfCoefficients(fielddef->m_shapeType,
2309  fielddef->m_numModes, modes_offset);
2310 
2311  const int elmtId = fielddef->m_elementIDs[i];
2312  eIt = m_elmtToExpId.find(elmtId);
2313 
2314  if (eIt == m_elmtToExpId.end())
2315  {
2316  offset += datalen;
2317  modes_offset += (*m_exp)[0]->GetNumBases();
2318  continue;
2319  }
2320 
2321  expId = eIt->second;
2322 
2323  bool sameBasis = true;
2324  for (int j = 0; j < fielddef->m_basis.size(); ++j)
2325  {
2326  if (fielddef->m_basis[j] != (*m_exp)[expId]->GetBasisType(j))
2327  {
2328  sameBasis = false;
2329  break;
2330  }
2331  }
2332 
2333  if (datalen == (*m_exp)[expId]->GetNcoeffs() && sameBasis)
2334  {
2335  Vmath::Vcopy(datalen, &fielddata[offset], 1,
2336  &coeffs[m_coeff_offset[expId]], 1);
2337  }
2338  else
2339  {
2340  (*m_exp)[expId]->ExtractDataToCoeffs(
2341  &fielddata[offset], fielddef->m_numModes,
2342  modes_offset, &coeffs[m_coeff_offset[expId]],
2343  fielddef->m_basis);
2344  }
2345 
2346  offset += datalen;
2347  modes_offset += (*m_exp)[0]->GetNumBases();
2348  }
2349 
2350  return;
2351  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
boost::unordered_map< int, int > m_elmtToExpId
Mapping from geometry ID of element to index inside m_exp.
Definition: ExpList.h:1062
int GetNumberOfCoefficients(ShapeType shape, std::vector< unsigned int > &modes, int offset)
Definition: ShapeType.hpp:312
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1047
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1061
void Nektar::MultiRegions::ExpList::v_ExtractElmtToBndPhys ( int  i,
Array< OneD, NekDouble > &  elmt,
Array< OneD, NekDouble > &  boundary 
)
protectedvirtual

Definition at line 2827 of file ExpList.cpp.

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

Referenced by ExtractElmtToBndPhys().

2830  {
2831  int n, cnt;
2832  Array<OneD, NekDouble> tmp1, tmp2;
2834 
2835  Array<OneD, int> ElmtID,EdgeID;
2836  GetBoundaryToElmtMap(ElmtID,EdgeID);
2837 
2838  // Initialise result
2839  boundary = Array<OneD, NekDouble>
2840  (GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
2841 
2842  // Skip other boundary regions
2843  for (cnt = n = 0; n < i; ++n)
2844  {
2845  cnt += GetBndCondExpansions()[n]->GetExpSize();
2846  }
2847 
2848  int offsetBnd;
2849  int offsetElmt = 0;
2850  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2851  {
2852  offsetBnd = GetBndCondExpansions()[i]->GetPhys_Offset(n);
2853 
2854  elmt = GetExp(ElmtID[cnt+n]);
2855  elmt->GetTracePhysVals(EdgeID[cnt+n],
2856  GetBndCondExpansions()[i]->GetExp(n),
2857  tmp1 = element + offsetElmt,
2858  tmp2 = boundary + offsetBnd);
2859 
2860  offsetElmt += elmt->GetTotPoints();
2861  }
2862  }
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2067
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2286
const Array< OneD, const boost::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:2115
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
void Nektar::MultiRegions::ExpList::v_ExtractPhysToBnd ( int  i,
const Array< OneD, const NekDouble > &  phys,
Array< OneD, NekDouble > &  bnd 
)
protectedvirtual

Definition at line 2906 of file ExpList.cpp.

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

Referenced by ExtractPhysToBnd().

2909  {
2910  int n, cnt;
2911  Array<OneD, NekDouble> tmp1, tmp2;
2913 
2914  Array<OneD, int> ElmtID,EdgeID;
2915  GetBoundaryToElmtMap(ElmtID,EdgeID);
2916 
2917  // Initialise result
2918  bnd = Array<OneD, NekDouble>
2919  (GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
2920 
2921  // Skip other boundary regions
2922  for (cnt = n = 0; n < i; ++n)
2923  {
2924  cnt += GetBndCondExpansions()[n]->GetExpSize();
2925  }
2926 
2927  int offsetBnd;
2928  int offsetPhys;
2929  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2930  {
2931  offsetPhys = GetPhys_Offset(ElmtID[cnt+n]);
2932  offsetBnd = GetBndCondExpansions()[i]->GetPhys_Offset(n);
2933 
2934  elmt = GetExp(ElmtID[cnt+n]);
2935  elmt->GetTracePhysVals(EdgeID[cnt+n],
2936  GetBndCondExpansions()[i]->GetExp(n),
2937  tmp1 = phys + offsetPhys,
2938  tmp2 = bnd + offsetBnd);
2939  }
2940  }
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:2084
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2067
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2286
const Array< OneD, const boost::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:2115
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 2866 of file ExpList.cpp.

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

Referenced by ExtractPhysToBndElmt().

2869  {
2870  int n, cnt, nq;
2871 
2872  Array<OneD, int> ElmtID,EdgeID;
2873  GetBoundaryToElmtMap(ElmtID,EdgeID);
2874 
2875  // Skip other boundary regions
2876  for (cnt = n = 0; n < i; ++n)
2877  {
2878  cnt += GetBndCondExpansions()[n]->GetExpSize();
2879  }
2880 
2881  // Count number of points
2882  int npoints = 0;
2883  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2884  {
2885  npoints += GetExp(ElmtID[cnt+n])->GetTotPoints();
2886  }
2887 
2888  // Initialise result
2889  bndElmt = Array<OneD, NekDouble> (npoints, 0.0);
2890 
2891  // Extract data
2892  int offsetPhys;
2893  int offsetElmt = 0;
2894  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2895  {
2896  nq = GetExp(ElmtID[cnt+n])->GetTotPoints();
2897  offsetPhys = GetPhys_Offset(ElmtID[cnt+n]);
2898  Vmath::Vcopy(nq, &phys[offsetPhys], 1,
2899  &bndElmt[offsetElmt], 1);
2900  offsetElmt += nq;
2901  }
2902  }
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:2084
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2067
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2286
const Array< OneD, const boost::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:2115
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1061
void Nektar::MultiRegions::ExpList::v_ExtractTracePhys ( Array< OneD, NekDouble > &  outarray)
protectedvirtual

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

Definition at line 2493 of file ExpList.cpp.

References ASSERTL0.

Referenced by ExtractTracePhys().

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

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

Definition at line 2499 of file ExpList.cpp.

References ASSERTL0.

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

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

Definition at line 2662 of file ExpList.cpp.

References ASSERTL0.

Referenced by FillBndCondFromField().

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

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

Definition at line 2670 of file ExpList.cpp.

References ASSERTL0.

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

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

Definition at line 2714 of file ExpList.cpp.

References v_FwdTrans_IterPerExp().

Referenced by FwdTrans().

2717  {
2718  v_FwdTrans_IterPerExp(inarray,outarray);
2719  }
virtual void v_FwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:704
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 704 of file ExpList.cpp.

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

Referenced by FwdTrans_IterPerExp(), and v_FwdTrans().

706  {
707  Array<OneD,NekDouble> f(m_ncoeffs);
708 
709  IProductWRTBase_IterPerExp(inarray,f);
710  MultiplyByElmtInvMass(f,outarray);
711 
712  }
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:665
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:1652
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:976
void Nektar::MultiRegions::ExpList::v_GeneralMatrixOp ( const GlobalMatrixKey gkey,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate 
)
protectedvirtual

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

Definition at line 2736 of file ExpList.cpp.

References GeneralMatrixOp_IterPerExp().

Referenced by GeneralMatrixOp().

2741  {
2742  GeneralMatrixOp_IterPerExp(gkey,inarray,outarray);
2743  }
void GeneralMatrixOp_IterPerExp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:929
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 2591 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBCValues().

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

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

Definition at line 2378 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBndCondExpansions().

2379  {
2380  ASSERTL0(false,
2381  "This method is not defined or valid for this class type");
2382  static Array<OneD,const boost::shared_ptr<ExpList> > result;
2383  return result;
2384  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::v_GetBndConditions ( void  )
privatevirtual

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

Definition at line 3007 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBndConditions().

3008  {
3009  ASSERTL0(false,
3010  "This method is not defined or valid for this class type");
3011  static Array<OneD, const SpatialDomains::BoundaryConditionShPtr>
3012  result;
3013  return result;
3014  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
void Nektar::MultiRegions::ExpList::v_GetBndElmtExpansion ( int  i,
boost::shared_ptr< ExpList > &  result,
const bool  DeclareCoeffPhysArrays 
)
protectedvirtual

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

Definition at line 2817 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBndElmtExpansion().

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

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D.

Definition at line 2944 of file ExpList.cpp.

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

Referenced by GetBoundaryNormals().

2946  {
2947  int j, n, cnt, nq;
2948  int coordim = GetCoordim(0);
2949  Array<OneD, NekDouble> tmp;
2951 
2952  Array<OneD, int> ElmtID,EdgeID;
2953  GetBoundaryToElmtMap(ElmtID,EdgeID);
2954 
2955  // Initialise result
2956  normals = Array<OneD, Array<OneD, NekDouble> > (coordim);
2957  for (j = 0; j < coordim; ++j)
2958  {
2959  normals[j] = Array<OneD, NekDouble> (
2960  GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
2961  }
2962 
2963  // Skip other boundary regions
2964  for (cnt = n = 0; n < i; ++n)
2965  {
2966  cnt += GetBndCondExpansions()[n]->GetExpSize();
2967  }
2968 
2969  int offset;
2970  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
2971  {
2972  offset = GetBndCondExpansions()[i]->GetPhys_Offset(n);
2973  nq = GetBndCondExpansions()[i]->GetExp(n)->GetTotPoints();
2974 
2975  elmt = GetExp(ElmtID[cnt+n]);
2976  const Array<OneD, const Array<OneD, NekDouble> > normalsElmt
2977  = elmt->GetSurfaceNormal(EdgeID[cnt+n]);
2978  // Copy to result
2979  for (j = 0; j < coordim; ++j)
2980  {
2981  Vmath::Vcopy(nq, normalsElmt[j], 1,
2982  tmp = normals[j] + offset, 1);
2983  }
2984  }
2985  }
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2067
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2286
const Array< OneD, const boost::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:2115
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1898
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1061
void Nektar::MultiRegions::ExpList::v_GetBoundaryToElmtMap ( Array< OneD, int > &  ElmtID,
Array< OneD, int > &  EdgeID 
)
protectedvirtual

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

Definition at line 2989 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBoundaryToElmtMap().

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

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

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

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

Definition at line 2756 of file ExpList.cpp.

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

Referenced by GetCoords().

2759  {
2760  if (GetNumElmts() == 0)
2761  {
2762  return;
2763  }
2764 
2765  int i;
2766  Array<OneD, NekDouble> e_coord_0;
2767  Array<OneD, NekDouble> e_coord_1;
2768  Array<OneD, NekDouble> e_coord_2;
2769 
2770  switch(GetExp(0)->GetCoordim())
2771  {
2772  case 1:
2773  for(i= 0; i < (*m_exp).size(); ++i)
2774  {
2775  e_coord_0 = coord_0 + m_phys_offset[i];
2776  (*m_exp)[i]->GetCoords(e_coord_0);
2777  }
2778  break;
2779  case 2:
2780  ASSERTL0(coord_1.num_elements() != 0,
2781  "output coord_1 is not defined");
2782 
2783  for(i= 0; i < (*m_exp).size(); ++i)
2784  {
2785  e_coord_0 = coord_0 + m_phys_offset[i];
2786  e_coord_1 = coord_1 + m_phys_offset[i];
2787  (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1);
2788  }
2789  break;
2790  case 3:
2791  ASSERTL0(coord_1.num_elements() != 0,
2792  "output coord_1 is not defined");
2793  ASSERTL0(coord_2.num_elements() != 0,
2794  "output coord_2 is not defined");
2795 
2796  for(i= 0; i < (*m_exp).size(); ++i)
2797  {
2798  e_coord_0 = coord_0 + m_phys_offset[i];
2799  e_coord_1 = coord_1 + m_phys_offset[i];
2800  e_coord_2 = coord_2 + m_phys_offset[i];
2801  (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1,e_coord_2);
2802  }
2803  break;
2804  }
2805  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2067
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Definition: ExpList.h:623
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1898
std::vector< LibUtilities::FieldDefinitionsSharedPtr > Nektar::MultiRegions::ExpList::v_GetFieldDefinitions ( void  )
protectedvirtual

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

Definition at line 2198 of file ExpList.cpp.

Referenced by GetFieldDefinitions().

2199  {
2200  std::vector<LibUtilities::FieldDefinitionsSharedPtr> returnval;
2201  v_GetFieldDefinitions(returnval);
2202  return returnval;
2203  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2198
void Nektar::MultiRegions::ExpList::v_GetFieldDefinitions ( std::vector< LibUtilities::FieldDefinitionsSharedPtr > &  fielddef)
protectedvirtual

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

Definition at line 2205 of file ExpList.cpp.

References GeneralGetFieldDefinitions().

2206  {
2207  GeneralGetFieldDefinitions(fielddef);
2208  }
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:2090
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 2468 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetFwdBwdTracePhys().

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

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

Definition at line 2475 of file ExpList.cpp.

References ASSERTL0.

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

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1454 of file ExpList.h.

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

Referenced by GetHomogeneousBasis().

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

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1969 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetHomoLen().

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

Reimplemented in Nektar::MultiRegions::DisContField3D.

Definition at line 2484 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetLeftAdjacentFaces().

2485  {
2486  ASSERTL0(false,
2487  "This method is not defined or valid for this class type");
2488  static vector<bool> tmp;
2489  return tmp;
2490  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
void Nektar::MultiRegions::ExpList::v_GetNormals ( Array< OneD, Array< OneD, NekDouble > > &  normals)
protectedvirtual

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

Definition at line 2435 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetNormals().

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

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

Definition at line 1110 of file ExpList.h.

Referenced by GetNumElmts().

1111  {
1112  return (*m_exp).size();
1113  }
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 3050 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetPeriodicEntities().

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

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 3073 of file ExpList.cpp.

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

Referenced by GetPlane().

3074  {
3075  ASSERTL0(false,
3076  "This method is not defined or valid for this class type");
3077  return NullExpListSharedPtr;
3078  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
static ExpListSharedPtr NullExpListSharedPtr
Definition: ExpList.h:1477
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 3040 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetRobinBCInfo().

3041  {
3042  ASSERTL0(false,
3043  "This method is not defined or valid for this class type");
3044  static map<int,RobinBCInfoSharedPtr> result;
3045  return result;
3046  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
boost::shared_ptr< ExpList > & Nektar::MultiRegions::ExpList::v_GetTrace ( )
protectedvirtual

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

Definition at line 2414 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetTrace().

2415  {
2416  ASSERTL0(false,
2417  "This method is not defined or valid for this class type");
2418  static boost::shared_ptr<ExpList> returnVal;
2419  return returnVal;
2420  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
const Array< OneD, const int > & Nektar::MultiRegions::ExpList::v_GetTraceBndMap ( )
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D.

Definition at line 2430 of file ExpList.cpp.

References GetTraceMap().

Referenced by GetTraceBndMap().

2431  {
2432  return GetTraceMap()->GetBndCondTraceToGlobalTraceMap();
2433  }
boost::shared_ptr< AssemblyMapDG > & GetTraceMap(void)
Definition: ExpList.h:2148
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 2422 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetTraceMap().

2423  {
2424  ASSERTL0(false,
2425  "This method is not defined or valid for this class type");
2426  static boost::shared_ptr<AssemblyMapDG> result;
2427  return result;
2428  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
LibUtilities::TranspositionSharedPtr Nektar::MultiRegions::ExpList::v_GetTransposition ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1961 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetTransposition().

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

Definition at line 1985 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetYIDs().

1986  {
1987  ASSERTL0(false,
1988  "This method is not defined or valid for this class type");
1989  Array<OneD, unsigned int> NoModes(1);
1990  return NoModes;
1991  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
Array< OneD, const unsigned int > Nektar::MultiRegions::ExpList::v_GetZIDs ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1977 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetZIDs().

1978  {
1979  ASSERTL0(false,
1980  "This method is not defined or valid for this class type");
1981  Array<OneD, unsigned int> NoModes(1);
1982  return NoModes;
1983  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
void Nektar::MultiRegions::ExpList::v_GlobalToLocal ( void  )
protectedvirtual

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

Definition at line 2692 of file ExpList.cpp.

References ASSERTL0.

Referenced by GlobalToLocal().

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

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

Definition at line 2699 of file ExpList.cpp.

References ASSERTL0.

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

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

Definition at line 2562 of file ExpList.cpp.

References ASSERTL0.

Referenced by HomogeneousBwdTrans().

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

Reimplemented in Nektar::MultiRegions::ExpList3DHomogeneous1D.

Definition at line 1953 of file ExpList.cpp.

References ASSERTL0.

Referenced by HomogeneousEnergy().

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

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

Definition at line 2552 of file ExpList.cpp.

References ASSERTL0.

Referenced by HomogeneousFwdTrans().

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

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

Definition at line 2654 of file ExpList.cpp.

References ASSERTL0.

Referenced by ImposeDirichletConditions().

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

Definition at line 1939 of file ExpList.cpp.

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

Referenced by Integral().

1940  {
1941  NekDouble err = 0.0;
1942  int i = 0;
1943 
1944  for (i = 0; i < (*m_exp).size(); ++i)
1945  {
1946  err += (*m_exp)[i]->Integral(inarray + m_phys_offset[i]);
1947  }
1948  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
1949 
1950  return err;
1951  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:966
void Nektar::MultiRegions::ExpList::v_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 2721 of file ExpList.cpp.

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

Referenced by IProductWRTBase().

2725  {
2726  Array<OneD,NekDouble> tmp;
2727  for (int i = 0; i < m_collections.size(); ++i)
2728  {
2729 
2731  inarray + m_coll_phys_offset[i],
2732  tmp = outarray + m_coll_coeff_offset[i]);
2733  }
2734  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1044
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1041
Collections::CollectionVector m_collections
Definition: ExpList.h:1038
void Nektar::MultiRegions::ExpList::v_IProductWRTBase_IterPerExp ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

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

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

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

Definition at line 380 of file ExpList.cpp.

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

Referenced by IProductWRTBase_IterPerExp().

383  {
384  Array<OneD,NekDouble> tmp;
385  for (int i = 0; i < m_collections.size(); ++i)
386  {
387 
389  inarray + m_coll_phys_offset[i],
390  tmp = outarray + m_coll_coeff_offset[i]);
391  }
392  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1044
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1041
Collections::CollectionVector m_collections
Definition: ExpList.h:1038
NekDouble Nektar::MultiRegions::ExpList::v_L2 ( const Array< OneD, const NekDouble > &  inarray,
const Array< OneD, const NekDouble > &  soln = NullNekDouble1DArray 
)
protectedvirtual

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

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

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

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

Definition at line 1909 of file ExpList.cpp.

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

Referenced by L2().

1912  {
1913  NekDouble err = 0.0, errl2;
1914  int i;
1915 
1916  if (soln == NullNekDouble1DArray)
1917  {
1918  for (i = 0; i < (*m_exp).size(); ++i)
1919  {
1920  errl2 = (*m_exp)[i]->L2(inarray + m_phys_offset[i]);
1921  err += errl2*errl2;
1922  }
1923  }
1924  else
1925  {
1926  for (i = 0; i < (*m_exp).size(); ++i)
1927  {
1928  errl2 = (*m_exp)[i]->L2(inarray + m_phys_offset[i],
1929  soln + m_phys_offset[i]);
1930  err += errl2*errl2;
1931  }
1932  }
1933 
1934  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
1935 
1936  return sqrt(err);
1937  }
static Array< OneD, NekDouble > NullNekDouble1DArray
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:966
void Nektar::MultiRegions::ExpList::v_LinearAdvectionDiffusionReactionSolve ( const Array< OneD, Array< OneD, NekDouble > > &  velocity,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const NekDouble  lambda,
CoeffState  coeffstate = eLocal,
const Array< OneD, const NekDouble > &  dirForcing = NullNekDouble1DArray 
)
protectedvirtual

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

Definition at line 2528 of file ExpList.cpp.

References ASSERTL0.

Referenced by LinearAdvectionDiffusionReactionSolve().

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

Reimplemented in Nektar::MultiRegions::ContField2D.

Definition at line 2540 of file ExpList.cpp.

References ASSERTL0.

Referenced by LinearAdvectionReactionSolve().

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

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

Definition at line 2676 of file ExpList.cpp.

References ASSERTL0.

Referenced by LocalToGlobal().

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

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

Definition at line 2683 of file ExpList.cpp.

References ASSERTL0.

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

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

Definition at line 2507 of file ExpList.cpp.

References ASSERTL0.

Referenced by MultiplyByInvMassMatrix().

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

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D.

Definition at line 2599 of file ExpList.cpp.

References ASSERTL0.

Referenced by NormVectorIProductWRTBase().

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

Definition at line 2608 of file ExpList.cpp.

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

2611  {
2612  Array< OneD, NekDouble> tmp;
2613  switch (GetCoordim(0))
2614  {
2615  case 1:
2616  {
2617  for(int i = 0; i < GetExpSize(); ++i)
2618  {
2619  (*m_exp)[i]->NormVectorIProductWRTBase(
2620  V[0] + GetPhys_Offset(i),
2621  tmp = outarray + GetCoeff_Offset(i));
2622  }
2623  }
2624  break;
2625  case 2:
2626  {
2627  for(int i = 0; i < GetExpSize(); ++i)
2628  {
2629  (*m_exp)[i]->NormVectorIProductWRTBase(
2630  V[0] + GetPhys_Offset(i),
2631  V[1] + GetPhys_Offset(i),
2632  tmp = outarray + GetCoeff_Offset(i));
2633  }
2634  }
2635  break;
2636  case 3:
2637  {
2638  for(int i = 0; i < GetExpSize(); ++i)
2639  {
2640  (*m_exp)[i]->NormVectorIProductWRTBase(
2641  V[0] + GetPhys_Offset(i),
2642  V[1] + GetPhys_Offset(i),
2643  V[2] + GetPhys_Offset(i),
2644  tmp = outarray + GetCoeff_Offset(i));
2645  }
2646  }
2647  break;
2648  default:
2649  ASSERTL0(false,"Dimension not supported");
2650  break;
2651  }
2652  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
int GetCoeff_Offset(int n) const
Get the start offset position for a global list of m_coeffs correspoinding to element n...
Definition: ExpList.h:2076
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:2084
int GetExpSize(void)
This function returns the number of elements in the expansion.
Definition: ExpList.h:2046
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1898
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 514 of file ExpList.cpp.

References Nektar::Collections::ePhysDeriv, m_coll_phys_offset, and m_collections.

Referenced by PhysDeriv(), and v_PhysDeriv().

518  {
519  Array<OneD, NekDouble> e_out_d0;
520  Array<OneD, NekDouble> e_out_d1;
521  Array<OneD, NekDouble> e_out_d2;
522  int offset;
523  for (int i = 0; i < m_collections.size(); ++i)
524  {
525  offset = m_coll_phys_offset[i];
526  e_out_d0 = out_d0 + offset;
527  e_out_d1 = out_d1 + offset;
528  e_out_d2 = out_d2 + offset;
529 
530  m_collections[i].ApplyOperator(Collections::ePhysDeriv,
531  inarray + offset,
532  e_out_d0,e_out_d1, e_out_d2);
533 
534  }
535  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1044
Collections::CollectionVector m_collections
Definition: ExpList.h:1038
void Nektar::MultiRegions::ExpList::v_PhysDeriv ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d 
)
protectedvirtual

Definition at line 537 of file ExpList.cpp.

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

540  {
541  Direction edir = DirCartesianMap[dir];
542  v_PhysDeriv(edir, inarray,out_d);
543  }
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:514
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 545 of file ExpList.cpp.

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

547  {
548  int i;
549  if(edir==MultiRegions::eS)
550  {
551  Array<OneD, NekDouble> e_out_ds;
552  for(i=0; i<(*m_exp).size(); ++i)
553  {
554  e_out_ds = out_d + m_phys_offset[i];
555  (*m_exp)[i]->PhysDeriv_s(inarray+m_phys_offset[i],e_out_ds);
556  }
557  }
558  else if(edir==MultiRegions::eN)
559  {
560  Array<OneD, NekDouble > e_out_dn;
561  for(i=0; i<(*m_exp).size(); i++)
562  {
563  e_out_dn = out_d +m_phys_offset[i];
564  (*m_exp)[i]->PhysDeriv_n(inarray+m_phys_offset[i],e_out_dn);
565  }
566  }
567  else
568  {
569  // convert enum into int
570  int intdir= (int)edir;
571  Array<OneD, NekDouble> e_out_d;
572  int offset;
573  for (int i = 0; i < m_collections.size(); ++i)
574  {
575  offset = m_coll_phys_offset[i];
576  e_out_d = out_d + offset;
577 
578  m_collections[i].ApplyOperator(Collections::ePhysDeriv,
579  intdir,
580  inarray + offset,
581  e_out_d);
582  }
583  }
584  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1044
Collections::CollectionVector m_collections
Definition: ExpList.h:1038
void Nektar::MultiRegions::ExpList::v_PhysGalerkinProjection1DScaled ( const NekDouble  scale,
const Array< OneD, NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

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

Definition at line 2000 of file ExpList.cpp.

References ASSERTL0.

Referenced by PhysGalerkinProjection1DScaled().

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

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

Definition at line 1994 of file ExpList.cpp.

References ASSERTL0.

Referenced by PhysInterp1DScaled().

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

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

Definition at line 2998 of file ExpList.cpp.

References ASSERTL0.

Referenced by ReadGlobalOptimizationParameters().

2999  {
3000  ASSERTL0(false,
3001  "This method is not defined or valid for this class type");
3002  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
void Nektar::MultiRegions::ExpList::v_Reset ( )
protectedvirtual

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

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

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

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

1538  {
1539  // Reset matrix managers.
1540  LibUtilities::NekManager<LocalRegions::MatrixKey,
1541  DNekScalMat, LocalRegions::MatrixKey::opLess>::ClearManager();
1542  LibUtilities::NekManager<LocalRegions::MatrixKey,
1543  DNekScalBlkMat, LocalRegions::MatrixKey::opLess>::ClearManager();
1544 
1545  // Loop over all elements and reset geometry information.
1546  for (int i = 0; i < m_exp->size(); ++i)
1547  {
1548  (*m_exp)[i]->GetGeom()->Reset(m_graph->GetCurvedEdges(),
1549  m_graph->GetCurvedFaces());
1550  }
1551 
1552  // Loop over all elements and rebuild geometric factors.
1553  for (int i = 0; i < m_exp->size(); ++i)
1554  {
1555  (*m_exp)[i]->Reset();
1556  }
1557  }
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
NekMatrix< NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag >, BlockMatrixTag > DNekScalBlkMat
Definition: NekTypeDefs.hpp:66
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:972
NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag > DNekScalMat
virtual void Nektar::MultiRegions::ExpList::v_SetHomo1DSpecVanVisc ( Array< OneD, NekDouble visc)
inlineprivatevirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1462 of file ExpList.h.

References ASSERTL0.

Referenced by SetHomo1DSpecVanVisc().

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

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

Definition at line 2809 of file ExpList.cpp.

References ASSERTL0.

Referenced by SetUpPhysNormals().

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

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

Parameters
fieldAn array containing the field in physical space

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

Definition at line 736 of file ExpList.cpp.

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

Referenced by SmoothField().

737  {
738  // Do nothing unless the method is implemented in the appropriate
739  // class, i.e. ContField1D,ContField2D, etc.
740 
741  // So far it has been implemented just for ContField2D and
742  // ContField3DHomogeneous1D
743 
744  // Block in case users try the smoothing with a modal expansion.
745  // Maybe a different techique for the smoothing require
746  // implementation for modal basis.
747 
748  ASSERTL0((*m_exp)[0]->GetBasisType(0)
750  (*m_exp)[0]->GetBasisType(0)
752  "Smoothing is currently not allowed unless you are using "
753  "a nodal base for efficiency reasons. The implemented "
754  "smoothing technique requires the mass matrix inversion "
755  "which is trivial just for GLL_LAGRANGE_SEM and "
756  "GAUSS_LAGRANGE_SEMexpansions.");
757  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
Lagrange Polynomials using the Gauss points .
Definition: BasisType.h:54
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
Lagrange for SEM basis .
Definition: BasisType.h:53
boost::shared_ptr< ExpList > & Nektar::MultiRegions::ExpList::v_UpdateBndCondExpansion ( int  i)
protectedvirtual

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

Definition at line 2386 of file ExpList.cpp.

References ASSERTL0.

Referenced by UpdateBndCondExpansion().

2387  {
2388  ASSERTL0(false,
2389  "This method is not defined or valid for this class type");
2390  static boost::shared_ptr<ExpList> result;
2391  return result;
2392  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
Array< OneD, SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::v_UpdateBndConditions ( )
privatevirtual

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

Definition at line 3018 of file ExpList.cpp.

References ASSERTL0.

Referenced by UpdateBndConditions().

3019  {
3020  ASSERTL0(false,
3021  "This method is not defined or valid for this class type");
3022  static Array<OneD, SpatialDomains::BoundaryConditionShPtr> result;
3023  return result;
3024  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
void Nektar::MultiRegions::ExpList::v_Upwind ( const Array< OneD, const Array< OneD, NekDouble > > &  Vec,
const Array< OneD, const NekDouble > &  Fwd,
const Array< OneD, const NekDouble > &  Bwd,
Array< OneD, NekDouble > &  Upwind 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpList1D.

Definition at line 2394 of file ExpList.cpp.

References ASSERTL0.

Referenced by Upwind().

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

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

Definition at line 2404 of file ExpList.cpp.

References ASSERTL0.

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

Reimplemented in Nektar::MultiRegions::ExpList3DHomogeneous1D.

Definition at line 1697 of file ExpList.cpp.

References ASSERTL0, and m_exp.

Referenced by WriteTecplotConnectivity().

1699  {
1700  int i,j,k,l;
1701  int nbase = (*m_exp)[0]->GetNumBases();
1702  int cnt = 0;
1703 
1704  boost::shared_ptr<LocalRegions::ExpansionVector> exp = m_exp;
1705 
1706  if (expansion != -1)
1707  {
1708  exp = boost::shared_ptr<LocalRegions::ExpansionVector>(
1710  (*exp)[0] = (*m_exp)[expansion];
1711  }
1712 
1713  if (nbase == 2)
1714  {
1715  for(i = 0; i < (*exp).size(); ++i)
1716  {
1717  const int np0 = (*exp)[i]->GetNumPoints(0);
1718  const int np1 = (*exp)[i]->GetNumPoints(1);
1719 
1720  for(j = 1; j < np1; ++j)
1721  {
1722  for(k = 1; k < np0; ++k)
1723  {
1724  outfile << cnt + (j-1)*np0 + k << " ";
1725  outfile << cnt + (j-1)*np0 + k+1 << " ";
1726  outfile << cnt + j *np0 + k+1 << " ";
1727  outfile << cnt + j *np0 + k << endl;
1728  }
1729  }
1730 
1731  cnt += np0*np1;
1732  }
1733  }
1734  else if (nbase == 3)
1735  {
1736  for(i = 0; i < (*exp).size(); ++i)
1737  {
1738  const int np0 = (*exp)[i]->GetNumPoints(0);
1739  const int np1 = (*exp)[i]->GetNumPoints(1);
1740  const int np2 = (*exp)[i]->GetNumPoints(2);
1741  const int np01 = np0*np1;
1742 
1743  for(j = 1; j < np2; ++j)
1744  {
1745  for(k = 1; k < np1; ++k)
1746  {
1747  for(l = 1; l < np0; ++l)
1748  {
1749  outfile << cnt + (j-1)*np01 + (k-1)*np0 + l << " ";
1750  outfile << cnt + (j-1)*np01 + (k-1)*np0 + l+1 << " ";
1751  outfile << cnt + (j-1)*np01 + k *np0 + l+1 << " ";
1752  outfile << cnt + (j-1)*np01 + k *np0 + l << " ";
1753  outfile << cnt + j *np01 + (k-1)*np0 + l << " ";
1754  outfile << cnt + j *np01 + (k-1)*np0 + l+1 << " ";
1755  outfile << cnt + j *np01 + k *np0 + l+1 << " ";
1756  outfile << cnt + j *np01 + k *np0 + l << endl;
1757  }
1758  }
1759  }
1760  cnt += np0*np1*np2;
1761  }
1762  }
1763  else
1764  {
1765  ASSERTL0(false,"Not set up for this dimension");
1766  }
1767  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
std::vector< ExpansionSharedPtr > ExpansionVector
Definition: Expansion.h:70
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
void Nektar::MultiRegions::ExpList::v_WriteTecplotField ( std::ostream &  outfile,
int  expansion 
)
protectedvirtual

Write Tecplot Files Field

Parameters
outfileOutput file name.
expansionExpansion that is considered

Definition at line 1774 of file ExpList.cpp.

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

Referenced by WriteTecplotField().

1775  {
1776  if (expansion == -1)
1777  {
1778  int totpoints = GetTotPoints();
1779  if(m_physState == false)
1780  {
1782  }
1783 
1784  for(int i = 0; i < totpoints; ++i)
1785  {
1786  outfile << m_phys[i] << " ";
1787  if(i % 1000 == 0 && i)
1788  {
1789  outfile << std::endl;
1790  }
1791  }
1792  outfile << std::endl;
1793 
1794  }
1795  else
1796  {
1797  int nPoints = (*m_exp)[expansion]->GetTotPoints();
1798 
1799  for (int i = 0; i < nPoints; ++i)
1800  {
1801  outfile << m_phys[i + m_phys_offset[expansion]] << " ";
1802  }
1803 
1804  outfile << std::endl;
1805  }
1806  }
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.h:1691
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:998
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1535
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1024
void Nektar::MultiRegions::ExpList::v_WriteTecplotHeader ( std::ostream &  outfile,
std::string  var = "" 
)
protectedvirtual

Write Tecplot Files Header

Parameters
outfileOutput file name.
varvariables names

Definition at line 1564 of file ExpList.cpp.

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

Referenced by WriteTecplotHeader().

1566  {
1567  if (GetNumElmts() == 0)
1568  {
1569  return;
1570  }
1571 
1572  int coordim = GetExp(0)->GetCoordim();
1573  char vars[3] = { 'x', 'y', 'z' };
1574 
1575  if (m_expType == e3DH1D)
1576  {
1577  coordim += 1;
1578  }
1579  else if (m_expType == e3DH2D)
1580  {
1581  coordim += 2;
1582  }
1583 
1584  outfile << "Variables = x";
1585  for (int i = 1; i < coordim; ++i)
1586  {
1587  outfile << ", " << vars[i];
1588  }
1589 
1590  if (var.size() > 0)
1591  {
1592  outfile << ", " << var;
1593  }
1594 
1595  outfile << std::endl << std::endl;
1596  }
const boost::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2067
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Definition: ExpList.h:623
void Nektar::MultiRegions::ExpList::v_WriteTecplotZone ( std::ostream &  outfile,
int  expansion 
)
protectedvirtual

Write Tecplot Files Zone

Parameters
outfileOutput file name.
expansionExpansion that is considered

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

Definition at line 1603 of file ExpList.cpp.

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

Referenced by WriteTecplotZone().

1604  {
1605  int i, j;
1606  int coordim = GetCoordim(0);
1607  int nPoints = GetTotPoints();
1608  int nBases = (*m_exp)[0]->GetNumBases();
1609  int numBlocks = 0;
1610 
1611  Array<OneD, Array<OneD, NekDouble> > coords(3);
1612 
1613  if (expansion == -1)
1614  {
1615  nPoints = GetTotPoints();
1616 
1617  coords[0] = Array<OneD, NekDouble>(nPoints);
1618  coords[1] = Array<OneD, NekDouble>(nPoints);
1619  coords[2] = Array<OneD, NekDouble>(nPoints);
1620 
1621  GetCoords(coords[0], coords[1], coords[2]);
1622 
1623  for (i = 0; i < m_exp->size(); ++i)
1624  {
1625  int numInt = 1;
1626 
1627  for (j = 0; j < nBases; ++j)
1628  {
1629  numInt *= (*m_exp)[i]->GetNumPoints(j)-1;
1630  }
1631 
1632  numBlocks += numInt;
1633  }
1634  }
1635  else
1636  {
1637  nPoints = (*m_exp)[expansion]->GetTotPoints();
1638 
1639  coords[0] = Array<OneD, NekDouble>(nPoints);
1640  coords[1] = Array<OneD, NekDouble>(nPoints);
1641  coords[2] = Array<OneD, NekDouble>(nPoints);
1642 
1643  (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
1644 
1645  numBlocks = 1;
1646  for (j = 0; j < nBases; ++j)
1647  {
1648  numBlocks *= (*m_exp)[expansion]->GetNumPoints(j)-1;
1649  }
1650  }
1651 
1652  if (m_expType == e3DH1D)
1653  {
1654  nBases += 1;
1655  coordim += 1;
1656  int nPlanes = GetZIDs().num_elements();
1657  NekDouble tmp = numBlocks * (nPlanes-1.0) / nPlanes;
1658  numBlocks = (int)tmp;
1659  }
1660  else if (m_expType == e3DH2D)
1661  {
1662  nBases += 2;
1663  coordim += 1;
1664  }
1665 
1666  outfile << "Zone, N=" << nPoints << ", E="
1667  << numBlocks << ", F=FEBlock" ;
1668 
1669  switch(nBases)
1670  {
1671  case 2:
1672  outfile << ", ET=QUADRILATERAL" << std::endl;
1673  break;
1674  case 3:
1675  outfile << ", ET=BRICK" << std::endl;
1676  break;
1677  default:
1678  ASSERTL0(false,"Not set up for this type of output");
1679  break;
1680  }
1681 
1682  // Write out coordinates
1683  for (j = 0; j < coordim; ++j)
1684  {
1685  for (i = 0; i < nPoints; ++i)
1686  {
1687  outfile << coords[j][i] << " ";
1688  if (i % 1000 == 0 && i)
1689  {
1690  outfile << std::endl;
1691  }
1692  }
1693  outfile << std::endl;
1694  }
1695  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
Array< OneD, const unsigned int > GetZIDs(void)
This function returns a vector containing the wave numbers in z-direction associated with the 3D homo...
Definition: ExpList.h:564
void GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1=NullNekDouble1DArray, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
This function calculates the coordinates of all the elemental quadrature points . ...
Definition: ExpList.h:1769
boost::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1036
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1535
double NekDouble
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1898
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 1833 of file ExpList.cpp.

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

Referenced by WriteVtkPieceData().

1835  {
1836  int i;
1837  int nq = (*m_exp)[expansion]->GetTotPoints();
1838 
1839  // printing the fields of that zone
1840  outfile << " <DataArray type=\"Float64\" Name=\""
1841  << var << "\">" << endl;
1842  outfile << " ";
1843  const Array<OneD, NekDouble> phys = m_phys + m_phys_offset[expansion];
1844  for(i = 0; i < nq; ++i)
1845  {
1846  outfile << (fabs(phys[i]) < NekConstants::kNekZeroTol ? 0 : phys[i]) << " ";
1847  }
1848  outfile << endl;
1849  outfile << " </DataArray>" << endl;
1850  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1015
static const NekDouble kNekZeroTol
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1050
void Nektar::MultiRegions::ExpList::v_WriteVtkPieceHeader ( std::ostream &  outfile,
int  expansion,
int  istrip 
)
protectedvirtual
void Nektar::MultiRegions::ExpList::WriteTecplotConnectivity ( std::ostream &  outfile,
int  expansion = -1 
)
inline

Definition at line 402 of file ExpList.h.

References v_WriteTecplotConnectivity().

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

Definition at line 396 of file ExpList.h.

References v_WriteTecplotField().

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

Definition at line 383 of file ExpList.h.

References v_WriteTecplotHeader().

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

Definition at line 389 of file ExpList.h.

References v_WriteTecplotZone().

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

Definition at line 1816 of file ExpList.cpp.

1817  {
1818  outfile << " </UnstructuredGrid>" << endl;
1819  outfile << "</VTKFile>" << endl;
1820  }
void Nektar::MultiRegions::ExpList::WriteVtkHeader ( std::ostream &  outfile)

Definition at line 1808 of file ExpList.cpp.

1809  {
1810  outfile << "<?xml version=\"1.0\"?>" << endl;
1811  outfile << "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" "
1812  << "byte_order=\"LittleEndian\">" << endl;
1813  outfile << " <UnstructuredGrid>" << endl;
1814  }
void Nektar::MultiRegions::ExpList::WriteVtkPieceData ( std::ostream &  outfile,
int  expansion,
std::string  var = "v" 
)
inline

Definition at line 421 of file ExpList.h.

References v_WriteVtkPieceData().

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

Definition at line 1827 of file ExpList.cpp.

1828  {
1829  outfile << " </PointData>" << endl;
1830  outfile << " </Piece>" << endl;
1831  }
void Nektar::MultiRegions::ExpList::WriteVtkPieceHeader ( std::ostream &  outfile,
int  expansion,
int  istrip = 0 
)
inline

Definition at line 411 of file ExpList.h.

References v_WriteVtkPieceHeader().

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

Member Data Documentation

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

Definition at line 1054 of file ExpList.h.

Referenced by GetBlockMatrix().

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

Concatenation of all local expansion coefficients.

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

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

Definition at line 998 of file ExpList.h.

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

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

Offset of elemental data into the array m_coeffs.

Definition at line 1041 of file ExpList.h.

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

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

Offset of elemental data into the array m_phys.

Definition at line 1044 of file ExpList.h.

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

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

The list of local expansions.

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

Definition at line 1036 of file ExpList.h.

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

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

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

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

Definition at line 976 of file ExpList.h.

Referenced by Nektar::MultiRegions::ContField2D::BwdTrans(), Nektar::MultiRegions::ContField1D::ContField1D(), Nektar::MultiRegions::ContField2D::ContField2D(), Nektar::MultiRegions::ContField3D::ContField3D(), ExpList(), Nektar::MultiRegions::ExpList0D::ExpList0D(), Nektar::MultiRegions::ExpList1D::ExpList1D(), Nektar::MultiRegions::ExpList2D::ExpList2D(), Nektar::MultiRegions::ExpList3D::ExpList3D(), Nektar::MultiRegions::ContField1D::FwdTrans(), GetNcoeffs(), Nektar::MultiRegions::ContField2D::IProductWRTBase(), Nektar::MultiRegions::ContField1D::IProductWRTBase(), Nektar::MultiRegions::DisContField2D::L2_DGDeriv(), Nektar::MultiRegions::ContField2D::LaplaceSolve(), MultiplyByElmtInvMass(), Nektar::MultiRegions::ContField1D::MultiplyByInvMassMatrix(), Nektar::MultiRegions::ExpList1DHomogeneous2D::SetCoeffPhys(), Nektar::MultiRegions::ExpList2DHomogeneous1D::SetCoeffPhys(), Nektar::MultiRegions::ExpList3DHomogeneous2D::SetCoeffPhys(), Nektar::MultiRegions::ExpList3DHomogeneous1D::SetCoeffPhys(), 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, NekDouble> Nektar::MultiRegions::ExpList::m_phys
protected
Array<OneD, int> Nektar::MultiRegions::ExpList::m_phys_offset
protected
bool Nektar::MultiRegions::ExpList::m_physState
protected
LibUtilities::SessionReaderSharedPtr Nektar::MultiRegions::ExpList::m_session
protected

Session.

Definition at line 969 of file ExpList.h.

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

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