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

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

#include <ExpList.h>

Inheritance diagram for Nektar::MultiRegions::ExpList:
[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 IProductWRTDirectionalDerivBase (const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 Directional derivative along a given 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 ExponentialFilter (Array< OneD, NekDouble > &array, const NekDouble alpha, const NekDouble exponent, const NekDouble cutoff)
 
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 MultiRegions::VarFactorsMap &varfactors=MultiRegions::NullVarFactorsMap, 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...
 
int GetShapeDimension ()
 This function returns the dimension of the shape of the element eid. 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)
 
NekDouble VectorFlux (const Array< OneD, Array< OneD, 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...
 
void SetHomoLen (const NekDouble lhom)
 This function sets 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 std::shared_ptr< LocalRegions::ExpansionVectorGetExp () const
 This function returns the vector of elements in the expansion. More...
 
LocalRegions::ExpansionSharedPtrGetExp (int n) const
 This function returns (a shared pointer to) the local elemental expansion of the \(n^{\mathrm{th}}\) element. More...
 
LocalRegions::ExpansionSharedPtrGetExp (const Array< OneD, const NekDouble > &gloCoord)
 This function returns (a shared pointer to) the local elemental expansion containing the arbitrary point given by gloCoord. More...
 
int GetExpIndex (const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false)
 
int GetExpIndex (const Array< OneD, const NekDouble > &gloCoords, Array< OneD, NekDouble > &locCoords, NekDouble tol=0.0, bool returnNearestElmt=false)
 
NekDouble PhysEvaluate (const Array< OneD, const NekDouble > &coords, const Array< OneD, const NekDouble > &phys)
 
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)
 
void PhysDirectionalDeriv (const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void GetMovingFrames (const SpatialDomains::GeomMMF MMFdir, const Array< OneD, const NekDouble > &CircCentre, Array< OneD, Array< OneD, NekDouble > > &outarray)
 
const Array< OneD, const std::shared_ptr< ExpList > > & GetBndCondExpansions ()
 
std::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)
 
std::shared_ptr< ExpList > & GetTrace ()
 
std::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, std::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays=true)
 
void ExtractElmtToBndPhys (int i, const 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::GlobalOptParamSharedPtrGetGlobalOptParam (void)
 
std::map< int, RobinBCInfoSharedPtrGetRobinBCInfo ()
 
void GetPeriodicEntities (PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces=NullPeriodicMap)
 
std::vector< LibUtilities::FieldDefinitionsSharedPtrGetFieldDefinitions ()
 
void GetFieldDefinitions (std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef)
 
void AppendFieldData (LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
 Append the element data listed in elements fielddef->m_ElementIDs onto fielddata. More...
 
void AppendFieldData (LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, Array< OneD, NekDouble > &coeffs)
 Append the data in coeffs listed in elements fielddef->m_ElementIDs onto fielddata. More...
 
void ExtractElmtDataToCoeffs (LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, std::string &field, Array< OneD, NekDouble > &coeffs)
 Extract the data in fielddata into the coeffs using the basic ExpList Elemental expansions rather than planes in homogeneous case. More...
 
void ExtractCoeffsToCoeffs (const std::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...
 
void GenerateElementVector (const int ElementID, const NekDouble scalar1, const NekDouble scalar2, Array< OneD, NekDouble > &outarray)
 Generate vector v such that v[i] = scalar1 if i is in the element < ElementID. Otherwise, v[i] = scalar2. More...
 
std::shared_ptr< ExpListGetSharedThisPtr ()
 Returns a shared pointer to the current object. More...
 
std::shared_ptr< LibUtilities::SessionReaderGetSession () const
 Returns the session object. More...
 
std::shared_ptr< LibUtilities::CommGetComm ()
 Returns the comm object. More...
 
SpatialDomains::MeshGraphSharedPtr GetGraph ()
 
LibUtilities::BasisSharedPtr GetHomogeneousBasis (void)
 
std::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...
 
std::shared_ptr< DNekMatGenGlobalMatrixFull (const GlobalLinSysKey &mkey, const std::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)
 
std::shared_ptr< GlobalMatrixGenGlobalMatrix (const GlobalMatrixKey &mkey, const std::shared_ptr< AssemblyMapCG > &locToGloMap)
 Generates a global matrix from the given key and map. More...
 
void GlobalEigenSystem (const std::shared_ptr< DNekMat > &Gmat, Array< OneD, NekDouble > &EigValsReal, Array< OneD, NekDouble > &EigValsImag, Array< OneD, NekDouble > &EigVecs=NullNekDouble1DArray)
 
std::shared_ptr< GlobalLinSysGenGlobalLinSys (const GlobalLinSysKey &mkey, const std::shared_ptr< AssemblyMapCG > &locToGloMap)
 This operation constructs the global linear system of type mkey. More...
 
std::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 std::shared_ptr< ExpList > > & v_GetBndCondExpansions (void)
 
virtual std::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 std::shared_ptr< ExpList > & v_GetTrace ()
 
virtual std::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 MultiRegions::VarFactorsMap &varfactors, 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_FwdTrans_BndConstrained (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_PhysDirectionalDeriv (const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_GetMovingFrames (const SpatialDomains::GeomMMF MMFdir, const Array< OneD, const NekDouble > &CircCentre, Array< OneD, Array< OneD, NekDouble > > &outarray)
 
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, std::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays)
 
virtual void v_ExtractElmtToBndPhys (const int i, const Array< OneD, NekDouble > &elmt, Array< OneD, NekDouble > &boundary)
 
virtual void v_ExtractPhysToBndElmt (const int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bndElmt)
 
virtual void v_ExtractPhysToBnd (const 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::FieldDefinitionsSharedPtrv_GetFieldDefinitions (void)
 
virtual void v_GetFieldDefinitions (std::vector< LibUtilities::FieldDefinitionsSharedPtr > &fielddef)
 
virtual void v_AppendFieldData (LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
 
virtual void v_AppendFieldData (LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, Array< OneD, NekDouble > &coeffs)
 
virtual void v_ExtractDataToCoeffs (LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, std::string &field, Array< OneD, NekDouble > &coeffs)
 Extract data from raw field data into expansion list. More...
 
virtual void v_ExtractCoeffsToCoeffs (const std::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 NekDouble v_VectorFlux (const Array< OneD, Array< OneD, NekDouble > > &inarray)
 
virtual Array< OneD, const NekDoublev_HomogeneousEnergy (void)
 
virtual LibUtilities::TranspositionSharedPtr v_GetTransposition (void)
 
virtual NekDouble v_GetHomoLen (void)
 
virtual void v_SetHomoLen (const NekDouble lhom)
 
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 std::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...
 
std::shared_ptr< LocalRegions::ExpansionVectorm_exp
 The list of local expansions. More...
 
Collections::CollectionVector m_collections
 
std::vector< int > m_coll_coeff_offset
 Offset of elemental data into the array m_coeffs. More...
 
std::vector< int > m_coll_phys_offset
 Offset of elemental data into the array m_phys. More...
 
Array< OneD, int > m_coeff_offset
 Offset of elemental data into the array m_coeffs. More...
 
Array< OneD, int > m_phys_offset
 Offset of elemental data into the array m_phys. More...
 
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
 
BlockMatrixMapShPtr m_blockMat
 
bool m_WaveSpace
 
std::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, RobinBCInfoSharedPtrv_GetRobinBCInfo (void)
 
virtual void v_GetPeriodicEntities (PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces)
 
virtual LibUtilities::BasisSharedPtr v_GetHomogeneousBasis (void)
 
virtual void v_SetHomo1DSpecVanVisc (Array< OneD, NekDouble > visc)
 
virtual std::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 103 of file ExpList.h.

Constructor & Destructor Documentation

◆ ExpList() [1/5]

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

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

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

96  :
97  m_comm(),
98  m_session(),
99  m_graph(),
100  m_ncoeffs(0),
101  m_npoints(0),
102  m_coeffs(),
103  m_phys(),
104  m_physState(false),
105  m_exp(MemoryManager<LocalRegions::ExpansionVector>
106  ::AllocateSharedPtr()),
107  m_coeff_offset(),
108  m_phys_offset(),
110  m_WaveSpace(false)
111  {
113  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1108
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1069
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:1052
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1101
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1078
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:1030
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:1026
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:1023
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:1020
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:279

◆ ExpList() [2/5]

Nektar::MultiRegions::ExpList::ExpList ( const LibUtilities::SessionReaderSharedPtr pSession)

The default constructor.

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

Definition at line 121 of file ExpList.cpp.

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

122  :
123  m_comm(pSession->GetComm()),
124  m_session(pSession),
125  m_graph(),
126  m_ncoeffs(0),
127  m_npoints(0),
128  m_coeffs(),
129  m_phys(),
130  m_physState(false),
131  m_exp(MemoryManager<LocalRegions::ExpansionVector>
132  ::AllocateSharedPtr()),
133  m_coeff_offset(),
134  m_phys_offset(),
136  m_WaveSpace(false)
137  {
139  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1108
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1069
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:1052
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1101
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1078
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:1030
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:1026
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:1023
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:1020
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:279

◆ ExpList() [3/5]

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

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

149  :
150  m_comm(pSession->GetComm()),
151  m_session(pSession),
152  m_graph(pGraph),
153  m_ncoeffs(0),
154  m_npoints(0),
155  m_coeffs(),
156  m_phys(),
157  m_physState(false),
158  m_exp(MemoryManager<LocalRegions::ExpansionVector>
159  ::AllocateSharedPtr()),
160  m_coeff_offset(),
161  m_phys_offset(),
163  m_WaveSpace(false)
164  {
166  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1108
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1069
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:1052
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1101
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1078
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:1030
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:1026
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:1023
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:1020
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:279

◆ ExpList() [4/5]

Nektar::MultiRegions::ExpList::ExpList ( const ExpList in,
const std::vector< unsigned int > &  eIDs,
const bool  DeclareCoeffPhysArrays = true 
)

Constructor copying only elements defined in eIds.

Copies the eIds elements from an existing expansion list.

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

Definition at line 173 of file ExpList.cpp.

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

175  :
176  m_comm(in.m_comm),
177  m_session(in.m_session),
178  m_graph(in.m_graph),
179  m_ncoeffs(0),
180  m_npoints(0),
181  m_coeffs(),
182  m_phys(),
183  m_physState(false),
184  m_exp(MemoryManager<LocalRegions::ExpansionVector>
185  ::AllocateSharedPtr()),
186  m_coeff_offset(),
187  m_phys_offset(),
189  m_WaveSpace(false)
190  {
192 
193  for (int i=0; i < eIDs.size(); ++i)
194  {
195  (*m_exp).push_back( (*(in.m_exp))[eIDs[i]]);
196  m_ncoeffs += (*m_exp)[i]->GetNcoeffs();
197  m_npoints += (*m_exp)[i]->GetTotPoints();
198  }
199 
200  if(DeclareCoeffPhysArrays)
201  {
202  m_coeffs = Array<OneD, NekDouble>(m_ncoeffs, 0.0);
203  m_phys = Array<OneD, NekDouble>(m_npoints, 0.0);
204  }
205  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1108
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1069
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:1052
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1101
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1078
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:1030
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:1026
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:1023
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:1020
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:279

◆ ExpList() [5/5]

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

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

212  :
213  std::enable_shared_from_this<ExpList>(in),
214  m_comm(in.m_comm),
215  m_session(in.m_session),
216  m_graph(in.m_graph),
217  m_ncoeffs(in.m_ncoeffs),
218  m_npoints(in.m_npoints),
219  m_physState(false),
220  m_exp(in.m_exp),
221  m_collections(in.m_collections),
222  m_coll_coeff_offset(in.m_coll_coeff_offset),
223  m_coll_phys_offset(in.m_coll_phys_offset),
224  m_coeff_offset(in.m_coeff_offset),
225  m_phys_offset(in.m_phys_offset),
226  m_globalOptParam(in.m_globalOptParam),
227  m_blockMat(in.m_blockMat),
228  m_WaveSpace(false)
229  {
231 
232  if(DeclareCoeffPhysArrays)
233  {
234  m_coeffs = Array<OneD, NekDouble>(m_ncoeffs, 0.0);
235  m_phys = Array<OneD, NekDouble>(m_npoints, 0.0);
236  }
237  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:1106
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1108
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1069
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:1052
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1101
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1078
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:1030
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:1026
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:1023
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:1020
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1098
void SetExpType(ExpansionType Type)
Returns the type of the expansion.
Definition: ExpList.cpp:279
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1095
Collections::CollectionVector m_collections
Definition: ExpList.h:1092

◆ ~ExpList()

Nektar::MultiRegions::ExpList::~ExpList ( )
virtual

The default destructor.

Definition at line 284 of file ExpList.cpp.

285  {
286  }

Member Function Documentation

◆ AddFwdBwdTraceIntegral()

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

References v_AddFwdBwdTraceIntegral().

Referenced by GetNumElmts().

2307  {
2308  v_AddFwdBwdTraceIntegral(Fwd,Bwd,outarray);
2309  }
virtual void v_AddFwdBwdTraceIntegral(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2629

◆ AddTraceIntegral() [1/2]

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

References v_AddTraceIntegral().

Referenced by GetNumElmts().

2292  {
2293  v_AddTraceIntegral(Fx,Fy,outarray);
2294  }
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2610

◆ AddTraceIntegral() [2/2]

void Nektar::MultiRegions::ExpList::AddTraceIntegral ( const Array< OneD, const NekDouble > &  Fn,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 2296 of file ExpList.h.

References v_AddTraceIntegral().

2299  {
2300  v_AddTraceIntegral(Fn,outarray);
2301  }
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2610

◆ AppendFieldData() [1/2]

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

References v_AppendFieldData().

916  {
917  v_AppendFieldData(fielddef,fielddata);
918  }
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:2296

◆ AppendFieldData() [2/2]

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

References ExtractCoeffsToCoeffs(), ExtractDataToCoeffs(), ExtractElmtDataToCoeffs(), GenerateElementVector(), MULTI_REGIONS_EXPORT, and v_AppendFieldData().

927  {
928  v_AppendFieldData(fielddef,fielddata,coeffs);
929  }
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:2296

◆ ApplyGeomInfo()

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

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

1571  {
1572 
1573  }

◆ BwdTrans()

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

Definition at line 1775 of file ExpList.h.

References v_BwdTrans().

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

1779  {
1780  v_BwdTrans(inarray,outarray,coeffstate);
1781  }
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2901

◆ BwdTrans_IterPerExp()

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

References v_BwdTrans_IterPerExp().

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

1789  {
1790  v_BwdTrans_IterPerExp(inarray,outarray);
1791  }
virtual void v_BwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1418

◆ ClearGlobalLinSysManager()

void Nektar::MultiRegions::ExpList::ClearGlobalLinSysManager ( void  )

Definition at line 3432 of file ExpList.cpp.

References v_ClearGlobalLinSysManager().

3433  {
3435  }
virtual void v_ClearGlobalLinSysManager(void)
Definition: ExpList.cpp:2089

◆ CreateCollections()

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

References Nektar::Collections::CollectionOptimisation::GetDefaultImplementationType(), Nektar::Collections::CollectionOptimisation::GetMaxCollectionSize(), Nektar::Collections::CollectionOptimisation::GetOperatorImpMap(), Nektar::Collections::CollectionOptimisation::IsUsingAutotuning(), 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().

3296  {
3298  vector<std::pair<LocalRegions::ExpansionSharedPtr,int> > > collections;
3299 
3300  // Figure out optimisation parameters if provided in
3301  // session file or default given
3302  Collections::CollectionOptimisation colOpt(m_session, ImpType);
3303  ImpType = colOpt.GetDefaultImplementationType();
3304 
3305  bool autotuning = colOpt.IsUsingAutotuning();
3306  bool verbose = (m_session->DefinesCmdLineArgument("verbose")) &&
3307  (m_comm->GetRank() == 0);
3308  int collmax = (colOpt.GetMaxCollectionSize() > 0
3309  ? colOpt.GetMaxCollectionSize()
3310  : 2*m_exp->size());
3311 
3312  // clear vectors in case previously called
3313  m_collections.clear();
3314  m_coll_coeff_offset.clear();
3315  m_coll_phys_offset.clear();
3316 
3317  // Loop over expansions, and create collections for each element type
3318  for (int i = 0; i < m_exp->size(); ++i)
3319  {
3320  collections[(*m_exp)[i]->DetShapeType()].push_back(
3321  std::pair<LocalRegions::ExpansionSharedPtr,int> ((*m_exp)[i],i));
3322  }
3323 
3324  for (auto &it : collections)
3325  {
3326  LocalRegions::ExpansionSharedPtr exp = it.second[0].first;
3327 
3328  Collections::OperatorImpMap impTypes = colOpt.GetOperatorImpMap(exp);
3329  vector<StdRegions::StdExpansionSharedPtr> collExp;
3330 
3331  int prevCoeffOffset = m_coeff_offset[it.second[0].second];
3332  int prevPhysOffset = m_phys_offset [it.second[0].second];
3333  int collcnt;
3334 
3335  m_coll_coeff_offset.push_back(prevCoeffOffset);
3336  m_coll_phys_offset .push_back(prevPhysOffset);
3337 
3338  if(it.second.size() == 1) // single element case
3339  {
3340  collExp.push_back(it.second[0].first);
3341 
3342  // if no Imp Type provided and No settign in xml file.
3343  // reset impTypes using timings
3344  if(autotuning)
3345  {
3346  impTypes = colOpt.SetWithTimings(collExp,
3347  impTypes, verbose);
3348  }
3349 
3350  Collections::Collection tmp(collExp, impTypes);
3351  m_collections.push_back(tmp);
3352  }
3353  else
3354  {
3355  // set up first geometry
3356  collExp.push_back(it.second[0].first);
3357  int prevnCoeff = it.second[0].first->GetNcoeffs();
3358  int prevnPhys = it.second[0].first->GetTotPoints();
3359  collcnt = 1;
3360 
3361  for (int i = 1; i < it.second.size(); ++i)
3362  {
3363  int nCoeffs = it.second[i].first->GetNcoeffs();
3364  int nPhys = it.second[i].first->GetTotPoints();
3365  int coeffOffset = m_coeff_offset[it.second[i].second];
3366  int physOffset = m_phys_offset [it.second[i].second];
3367 
3368  // check to see if next elmt is different or
3369  // collmax reached and if so end collection
3370  // and start new one
3371  if(prevCoeffOffset + nCoeffs != coeffOffset ||
3372  prevnCoeff != nCoeffs ||
3373  prevPhysOffset + nPhys != physOffset ||
3374  prevnPhys != nPhys || collcnt >= collmax)
3375  {
3376 
3377  // if no Imp Type provided and No
3378  // settign in xml file. reset
3379  // impTypes using timings
3380  if(autotuning)
3381  {
3382  impTypes = colOpt.SetWithTimings(collExp,
3383  impTypes,
3384  verbose);
3385  }
3386 
3387  Collections::Collection tmp(collExp, impTypes);
3388  m_collections.push_back(tmp);
3389 
3390 
3391  // start new geom list
3392  collExp.clear();
3393 
3394  m_coll_coeff_offset.push_back(coeffOffset);
3395  m_coll_phys_offset .push_back(physOffset);
3396  collExp.push_back(it.second[i].first);
3397  collcnt = 1;
3398  }
3399  else // add to list of collections
3400  {
3401  collExp.push_back(it.second[i].first);
3402  collcnt++;
3403  }
3404 
3405  // if end of list finish up collection
3406  if (i == it.second.size() - 1)
3407  {
3408  // if no Imp Type provided and No
3409  // settign in xml file.
3410  if(autotuning)
3411  {
3412  impTypes = colOpt.SetWithTimings(collExp,
3413  impTypes,verbose);
3414  }
3415 
3416  Collections::Collection tmp(collExp, impTypes);
3417  m_collections.push_back(tmp);
3418  collExp.clear();
3419  collcnt = 0;
3420 
3421  }
3422 
3423  prevCoeffOffset = coeffOffset;
3424  prevPhysOffset = physOffset;
3425  prevnCoeff = nCoeffs;
3426  prevnPhys = nPhys;
3427  }
3428  }
3429  }
3430  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1101
std::map< OperatorType, ImplementationType > OperatorImpMap
Definition: Operator.h:103
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:1023
std::shared_ptr< Expansion > ExpansionSharedPtr
Definition: Expansion.h:65
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:1020
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1098
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1095
Collections::CollectionVector m_collections
Definition: ExpList.h:1092

◆ CurlCurl()

void Nektar::MultiRegions::ExpList::CurlCurl ( Array< OneD, Array< OneD, NekDouble > > &  Vel,
Array< OneD, Array< OneD, NekDouble > > &  Q 
)
inline

Definition at line 1922 of file ExpList.h.

References v_CurlCurl().

Referenced by GetNumElmts().

1925  {
1926  v_CurlCurl(Vel, Q);
1927  }
virtual void v_CurlCurl(Array< OneD, Array< OneD, NekDouble > > &Vel, Array< OneD, Array< OneD, NekDouble > > &Q)
Definition: ExpList.cpp:625

◆ DealiasedDotProd()

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

References v_DealiasedDotProd().

1975  {
1976  v_DealiasedDotProd(inarray1,inarray2,outarray,coeffstate);
1977  }
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:2767

◆ DealiasedProd()

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

References v_DealiasedProd().

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

1963  {
1964  v_DealiasedProd(inarray1,inarray2,outarray,coeffstate);
1965  }
virtual void v_DealiasedProd(const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.cpp:2757

◆ EvalBasisNumModesMax()

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

References m_exp.

1573  {
1574  unsigned int i;
1575  int returnval = 0;
1576 
1577  for(i= 0; i < (*m_exp).size(); ++i)
1578  {
1579  returnval = (std::max)(returnval,
1580  (*m_exp)[i]->EvalBasisNumModesMax());
1581  }
1582 
1583  return returnval;
1584  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090

◆ EvalBasisNumModesMaxPerExp()

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

References m_exp.

1591  {
1592  unsigned int i;
1593  Array<OneD,int> returnval((*m_exp).size(),0);
1594 
1595  for(i= 0; i < (*m_exp).size(); ++i)
1596  {
1597  returnval[i]
1598  = (std::max)(returnval[i],(*m_exp)[i]->EvalBasisNumModesMax());
1599  }
1600 
1601  return returnval;
1602  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090

◆ EvaluateBoundaryConditions()

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

References v_EvaluateBoundaryConditions().

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

2361  {
2362  v_EvaluateBoundaryConditions(time, varName, x2_in, x3_in);
2363  }
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:3228

◆ ExponentialFilter()

void Nektar::MultiRegions::ExpList::ExponentialFilter ( Array< OneD, NekDouble > &  array,
const NekDouble  alpha,
const NekDouble  exponent,
const NekDouble  cutoff 
)

Definition at line 729 of file ExpList.cpp.

References m_phys_offset.

734  {
735  Array<OneD,NekDouble> e_array;
736 
737  for(int i = 0; i < (*m_exp).size(); ++i)
738  {
739  (*m_exp)[i]->ExponentialFilter(
740  e_array = array+m_phys_offset[i],
741  alpha,
742  exponent,
743  cutoff);
744  }
745  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104

◆ ExtractCoeffsToCoeffs()

void Nektar::MultiRegions::ExpList::ExtractCoeffsToCoeffs ( const std::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 2333 of file ExpList.cpp.

References v_ExtractCoeffsToCoeffs().

Referenced by AppendFieldData().

2334  {
2335  v_ExtractCoeffsToCoeffs(fromExpList,fromCoeffs,toCoeffs);
2336  }
virtual void v_ExtractCoeffsToCoeffs(const std::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
Definition: ExpList.cpp:2435

◆ ExtractDataToCoeffs()

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

References v_ExtractDataToCoeffs().

Referenced by AppendFieldData().

2329  {
2330  v_ExtractDataToCoeffs(fielddef,fielddata,field,coeffs);
2331  }
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:2346

◆ ExtractElmtDataToCoeffs()

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.

Referenced by AppendFieldData().

◆ ExtractElmtToBndPhys()

void Nektar::MultiRegions::ExpList::ExtractElmtToBndPhys ( int  i,
const Array< OneD, NekDouble > &  elmt,
Array< OneD, NekDouble > &  boundary 
)
inline

Definition at line 2422 of file ExpList.h.

References v_ExtractElmtToBndPhys().

Referenced by GetNumElmts().

2425  {
2426  v_ExtractElmtToBndPhys(i, elmt, boundary);
2427  }
virtual void v_ExtractElmtToBndPhys(const int i, const Array< OneD, NekDouble > &elmt, Array< OneD, NekDouble > &boundary)
Definition: ExpList.cpp:3026

◆ ExtractFileBCs()

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

Definition at line 2095 of file ExpList.cpp.

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

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

2100  {
2101  string varString = fileName.substr(0, fileName.find_last_of("."));
2102  int j, k, len = varString.length();
2103  varString = varString.substr(len-1, len);
2104 
2105  std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
2106  std::vector<std::vector<NekDouble> > FieldData;
2107 
2108  std::string ft = LibUtilities::FieldIO::GetFileType(fileName, comm);
2110  .CreateInstance(ft, comm, m_session->GetSharedFilesystem());
2111 
2112  f->Import(fileName, FieldDef, FieldData);
2113 
2114  bool found = false;
2115  for (j = 0; j < FieldDef.size(); ++j)
2116  {
2117  for (k = 0; k < FieldDef[j]->m_fields.size(); ++k)
2118  {
2119  if (FieldDef[j]->m_fields[k] == varName)
2120  {
2121  // Copy FieldData into locExpList
2122  locExpList->ExtractDataToCoeffs(
2123  FieldDef[j], FieldData[j],
2124  FieldDef[j]->m_fields[k],
2125  locExpList->UpdateCoeffs());
2126  found = true;
2127  }
2128  }
2129  }
2130 
2131  ASSERTL0(found, "Could not find variable '"+varName+
2132  "' in file boundary condition "+fileName);
2133  locExpList->BwdTrans_IterPerExp(
2134  locExpList->GetCoeffs(),
2135  locExpList->UpdatePhys());
2136  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
FieldIOFactory & GetFieldIOFactory()
Returns the FieldIO factory.
Definition: FieldIO.cpp:72
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:144
static const std::string GetFileType(const std::string &filename, CommSharedPtr comm)
Determine file type of given input file.
Definition: FieldIO.cpp:97
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:1023
std::shared_ptr< FieldIO > FieldIOSharedPtr
Definition: FieldIO.h:306

◆ ExtractPhysToBnd()

void Nektar::MultiRegions::ExpList::ExtractPhysToBnd ( int  i,
const Array< OneD, const NekDouble > &  phys,
Array< OneD, NekDouble > &  bnd 
)
inline

Definition at line 2436 of file ExpList.h.

References v_ExtractPhysToBnd().

Referenced by GetNumElmts().

2439  {
2440  v_ExtractPhysToBnd(i, phys, bnd);
2441  }
virtual void v_ExtractPhysToBnd(const int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bnd)
Definition: ExpList.cpp:3105

◆ ExtractPhysToBndElmt()

void Nektar::MultiRegions::ExpList::ExtractPhysToBndElmt ( int  i,
const Array< OneD, const NekDouble > &  phys,
Array< OneD, NekDouble > &  bndElmt 
)
inline

Definition at line 2429 of file ExpList.h.

References v_ExtractPhysToBndElmt().

Referenced by GetNumElmts().

2432  {
2433  v_ExtractPhysToBndElmt(i, phys, bndElmt);
2434  }
virtual void v_ExtractPhysToBndElmt(const int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bndElmt)
Definition: ExpList.cpp:3065

◆ ExtractTracePhys() [1/2]

void Nektar::MultiRegions::ExpList::ExtractTracePhys ( Array< OneD, NekDouble > &  outarray)
inline

Definition at line 2331 of file ExpList.h.

References v_ExtractTracePhys().

Referenced by GetNumElmts().

2332  {
2333  v_ExtractTracePhys(outarray);
2334  }
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2666

◆ ExtractTracePhys() [2/2]

void Nektar::MultiRegions::ExpList::ExtractTracePhys ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 2337 of file ExpList.h.

References v_ExtractTracePhys().

2340  {
2341  v_ExtractTracePhys(inarray,outarray);
2342  }
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2666

◆ FillBndCondFromField() [1/2]

void Nektar::MultiRegions::ExpList::FillBndCondFromField ( void  )
inline

Fill Bnd Condition expansion from the values stored in expansion.

Definition at line 2073 of file ExpList.h.

References v_FillBndCondFromField().

Referenced by WriteVtkPieceData().

2074  {
2076  }
virtual void v_FillBndCondFromField()
Definition: ExpList.cpp:2852

◆ FillBndCondFromField() [2/2]

void Nektar::MultiRegions::ExpList::FillBndCondFromField ( const int  nreg)
inline

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

Definition at line 2078 of file ExpList.h.

References v_FillBndCondFromField().

2079  {
2080  v_FillBndCondFromField(nreg);
2081  }
virtual void v_FillBndCondFromField()
Definition: ExpList.cpp:2852

◆ FwdTrans()

void Nektar::MultiRegions::ExpList::FwdTrans ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
inline

Definition at line 1735 of file ExpList.h.

References v_FwdTrans().

1739  {
1740  v_FwdTrans(inarray,outarray,coeffstate);
1741  }
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2909

◆ FwdTrans_BndConstrained()

void Nektar::MultiRegions::ExpList::FwdTrans_BndConstrained ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 1756 of file ExpList.h.

References v_FwdTrans_BndConstrained().

1759  {
1760  v_FwdTrans_BndConstrained(inarray,outarray);
1761  }
virtual void v_FwdTrans_BndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:804

◆ FwdTrans_IterPerExp()

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

References v_FwdTrans_IterPerExp().

1749  {
1750  v_FwdTrans_IterPerExp(inarray,outarray);
1751  }
virtual void v_FwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:794

◆ GenBlockMatrix()

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

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::StdRegions::eBwdTrans, Nektar::eDIAGONAL, Nektar::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().

871  {
872  int i,cnt1;
873  int n_exp = 0;
874  DNekScalMatSharedPtr loc_mat;
875  DNekScalBlkMatSharedPtr BlkMatrix;
876  map<int,int> elmt_id;
877  LibUtilities::ShapeType ShapeType = gkey.GetShapeType();
878 
879  if(ShapeType != LibUtilities::eNoShapeType)
880  {
881  for(i = 0 ; i < (*m_exp).size(); ++i)
882  {
883  if((*m_exp)[i]->DetShapeType()
884  == ShapeType)
885  {
886  elmt_id[n_exp++] = i;
887  }
888  }
889  }
890  else
891  {
892  n_exp = (*m_exp).size();
893  for(i = 0; i < n_exp; ++i)
894  {
895  elmt_id[i] = i;
896  }
897  }
898 
899  Array<OneD,unsigned int> nrows(n_exp);
900  Array<OneD,unsigned int> ncols(n_exp);
901 
902  switch(gkey.GetMatrixType())
903  {
905  {
906  // set up an array of integers for block matrix construction
907  for(i = 0; i < n_exp; ++i)
908  {
909  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
910  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
911  }
912  }
913  break;
915  {
916  // set up an array of integers for block matrix construction
917  for(i = 0; i < n_exp; ++i)
918  {
919  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
920  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
921  }
922  }
923  break;
924  case StdRegions::eMass:
929  {
930  // set up an array of integers for block matrix construction
931  for(i = 0; i < n_exp; ++i)
932  {
933  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
934  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
935  }
936  }
937  break;
938 
940  {
941  // set up an array of integers for block matrix construction
942  for(i = 0; i < n_exp; ++i)
943  {
944  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
945  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
946  }
947  }
948  break;
949 
951  {
952  // set up an array of integers for block matrix construction
953  for(i = 0; i < n_exp; ++i)
954  {
955  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
956  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
957  }
958  }
959  break;
960 
961  default:
962  {
964  "Global Matrix creation not defined for this type "
965  "of matrix");
966  }
967  }
968 
969  MatrixStorage blkmatStorage = eDIAGONAL;
971  ::AllocateSharedPtr(nrows,ncols,blkmatStorage);
972 
973  int nvarcoeffs = gkey.GetNVarCoeffs();
974  int eid;
975  Array<OneD, NekDouble> varcoeffs_wk;
976 
977  for(i = cnt1 = 0; i < n_exp; ++i)
978  {
979  // need to be initialised with zero size for non variable coefficient case
980  StdRegions::VarCoeffMap varcoeffs;
981 
982  eid = elmt_id[i];
983  if(nvarcoeffs>0)
984  {
985  for (auto &x : gkey.GetVarCoeffs())
986  {
987  varcoeffs[x.first] = x.second + m_phys_offset[eid];
988  }
989  }
990 
991  LocalRegions::MatrixKey matkey(gkey.GetMatrixType(),
992  (*m_exp)[eid]->DetShapeType(),
993  *(*m_exp)[eid],
994  gkey.GetConstFactors(),
995  varcoeffs );
996 
997  loc_mat = std::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[elmt_id.find(i)->second])->GetLocMatrix(matkey);
998  BlkMatrix->SetBlock(i,i,loc_mat);
999  }
1000 
1001  return BlkMatrix;
1002  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:73
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:264
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.

◆ GeneralGetFieldDefinitions()

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 2174 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 GetNumElmts(), and v_GetFieldDefinitions().

2182  {
2183  int startenum = (int) LibUtilities::eSegment;
2184  int endenum = (int) LibUtilities::eHexahedron;
2185  int s = 0;
2187 
2188  ASSERTL1(NumHomoDir == HomoBasis.num_elements(),"Homogeneous basis is not the same length as NumHomoDir");
2189  ASSERTL1(NumHomoDir == HomoLen.size(),"Homogeneous length vector is not the same length as NumHomDir");
2190 
2191  // count number of shapes
2192  switch((*m_exp)[0]->GetShapeDimension())
2193  {
2194  case 1:
2195  startenum = (int) LibUtilities::eSegment;
2196  endenum = (int) LibUtilities::eSegment;
2197  break;
2198  case 2:
2199  startenum = (int) LibUtilities::eTriangle;
2200  endenum = (int) LibUtilities::eQuadrilateral;
2201  break;
2202  case 3:
2203  startenum = (int) LibUtilities::eTetrahedron;
2204  endenum = (int) LibUtilities::eHexahedron;
2205  break;
2206  }
2207 
2208  for(s = startenum; s <= endenum; ++s)
2209  {
2210  std::vector<unsigned int> elementIDs;
2211  std::vector<LibUtilities::BasisType> basis;
2212  std::vector<unsigned int> numModes;
2213  std::vector<std::string> fields;
2214 
2215  bool first = true;
2216  bool UniOrder = true;
2217  int n;
2218 
2219  shape = (LibUtilities::ShapeType) s;
2220 
2221  for(int i = 0; i < (*m_exp).size(); ++i)
2222  {
2223  if((*m_exp)[i]->GetGeom()->GetShapeType() == shape)
2224  {
2225  elementIDs.push_back((*m_exp)[i]->GetGeom()->GetGlobalID());
2226  if(first)
2227  {
2228  for(int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2229  {
2230  basis.push_back((*m_exp)[i]->GetBasis(j)->GetBasisType());
2231  numModes.push_back((*m_exp)[i]->GetBasis(j)->GetNumModes());
2232  }
2233 
2234  // add homogeneous direction details if defined
2235  for(n = 0 ; n < NumHomoDir; ++n)
2236  {
2237  basis.push_back(HomoBasis[n]->GetBasisType());
2238  numModes.push_back(HomoBasis[n]->GetNumModes());
2239  }
2240 
2241  first = false;
2242  }
2243  else
2244  {
2245  ASSERTL0((*m_exp)[i]->GetBasis(0)->GetBasisType() == basis[0],"Routine is not set up for multiple bases definitions");
2246 
2247  for(int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2248  {
2249  numModes.push_back((*m_exp)[i]->GetBasis(j)->GetNumModes());
2250  if(numModes[j] != (*m_exp)[i]->GetBasis(j)->GetNumModes())
2251  {
2252  UniOrder = false;
2253  }
2254  }
2255  // add homogeneous direction details if defined
2256  for(n = 0 ; n < NumHomoDir; ++n)
2257  {
2258  numModes.push_back(HomoBasis[n]->GetNumModes());
2259  }
2260  }
2261  }
2262  }
2263 
2264 
2265  if(elementIDs.size() > 0)
2266  {
2269  AllocateSharedPtr(shape, elementIDs, basis,
2270  UniOrder, numModes,fields,
2271  NumHomoDir, HomoLen, homoStrips,
2272  HomoSIDs, HomoZIDs, HomoYIDs);
2273  fielddef.push_back(fdef);
2274  }
2275  }
2276  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
std::shared_ptr< FieldDefinitions > FieldDefinitionsSharedPtr
Definition: FieldIO.h:179
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:250

◆ GeneralMatrixOp()

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

References v_GeneralMatrixOp().

Referenced by Nektar::MultiRegions::ContField3D::GenerateDirBndCondForcing(), and GetNumElmts().

2399  {
2400  v_GeneralMatrixOp(gkey,inarray,outarray,coeffstate);
2401  }
virtual void v_GeneralMatrixOp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2933

◆ GeneralMatrixOp_IterPerExp()

void Nektar::MultiRegions::ExpList::GeneralMatrixOp_IterPerExp ( const GlobalMatrixKey gkey,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

Definition at line 1019 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 GetNumElmts(), Nektar::MultiRegions::ContField3D::v_GeneralMatrixOp(), Nektar::MultiRegions::ContField1D::v_GeneralMatrixOp(), Nektar::MultiRegions::ContField2D::v_GeneralMatrixOp(), and v_GeneralMatrixOp().

1023  {
1024  const Array<OneD, const bool> doBlockMatOp
1025  = m_globalOptParam->DoBlockMatOp(gkey.GetMatrixType());
1026  const Array<OneD, const int> num_elmts
1027  = m_globalOptParam->GetShapeNumElements();
1028 
1029  Array<OneD,NekDouble> tmp_outarray;
1030  int cnt = 0;
1031  int eid;
1032  for(int n = 0; n < num_elmts.num_elements(); ++n)
1033  {
1034  if(doBlockMatOp[n])
1035  {
1036  const LibUtilities::ShapeType vType
1037  = m_globalOptParam->GetShapeList()[n];
1038  const MultiRegions::GlobalMatrixKey vKey(gkey, vType);
1039  if (cnt < m_coeff_offset.num_elements())
1040  {
1041  eid = cnt;
1042  MultiplyByBlockMatrix(vKey,inarray + m_coeff_offset[eid],
1043  tmp_outarray = outarray + m_coeff_offset[eid]);
1044  cnt += num_elmts[n];
1045  }
1046  }
1047  else
1048  {
1049  int i;
1050  int nvarcoeffs = gkey.GetNVarCoeffs();
1051 
1052  for(i= 0; i < num_elmts[n]; ++i)
1053  {
1054  // need to be initialised with zero size for non variable coefficient case
1055  StdRegions::VarCoeffMap varcoeffs;
1056 
1057  eid = cnt++;
1058  if(nvarcoeffs>0)
1059  {
1060  for (auto &x : gkey.GetVarCoeffs())
1061  {
1062  varcoeffs[x.first] = x.second + m_phys_offset[eid];
1063  }
1064  }
1065 
1066  StdRegions::StdMatrixKey mkey(gkey.GetMatrixType(),
1067  (*m_exp)[eid]->DetShapeType(),
1068  *((*m_exp)[eid]),
1069  gkey.GetConstFactors(),varcoeffs);
1070 
1071  (*m_exp)[eid]->GeneralMatrixOp(inarray + m_coeff_offset[eid],
1072  tmp_outarray = outarray+m_coeff_offset[eid],
1073  mkey);
1074  }
1075  }
1076  }
1077  }
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:1106
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1101
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:264
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
void MultiplyByBlockMatrix(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:352

◆ GenerateElementVector()

void Nektar::MultiRegions::ExpList::GenerateElementVector ( const int  ElementID,
const NekDouble  scalar1,
const NekDouble  scalar2,
Array< OneD, NekDouble > &  outarray 
)

Generate vector v such that v[i] = scalar1 if i is in the element < ElementID. Otherwise, v[i] = scalar2.

Definition at line 2511 of file ExpList.cpp.

References m_phys_offset, and Vmath::Vcopy().

Referenced by AppendFieldData().

2516  {
2517  int npoints_e;
2518  NekDouble coeff;
2519 
2520  Array<OneD, NekDouble> outarray_e;
2521 
2522  for(int i = 0 ; i < (*m_exp).size(); ++i)
2523  {
2524  npoints_e = (*m_exp)[i]->GetTotPoints();
2525 
2526  if(i <= ElementID)
2527  {
2528  coeff = scalar1;
2529  }
2530  else
2531  {
2532  coeff = scalar2;
2533  }
2534 
2535  outarray_e = Array<OneD, NekDouble>(npoints_e, coeff);
2536  Vmath::Vcopy(npoints_e, &outarray_e[0], 1,
2537  &outarray[m_phys_offset[i]], 1);
2538  }
2539  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
double NekDouble
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ GenGlobalBndLinSys()

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

References ASSERTL0, Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::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().

1384  {
1385  std::shared_ptr<ExpList> vExpList = GetSharedThisPtr();
1386  const map<int,RobinBCInfoSharedPtr> vRobinBCInfo = GetRobinBCInfo();
1387 
1388  MultiRegions::GlobalSysSolnType vType = mkey.GetGlobalSysSolnType();
1389 
1390  if (vType >= eSIZE_GlobalSysSolnType)
1391  {
1392  ASSERTL0(false,"Matrix solution type not defined");
1393  }
1394  std::string vSolnType = MultiRegions::GlobalSysSolnTypeMap[vType];
1395 
1396  return GetGlobalLinSysFactory().CreateInstance(vSolnType,mkey,
1397  vExpList,locToGloMap);
1398  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
std::shared_ptr< ExpList > GetSharedThisPtr()
Returns a shared pointer to the current object.
Definition: ExpList.h:968
const char *const GlobalSysSolnTypeMap[]
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:144
std::map< int, RobinBCInfoSharedPtr > GetRobinBCInfo()
Definition: ExpList.h:884
GlobalLinSysFactory & GetGlobalLinSysFactory()

◆ GenGlobalLinSys()

GlobalLinSysSharedPtr Nektar::MultiRegions::ExpList::GenGlobalLinSys ( const GlobalLinSysKey mkey,
const std::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 1362 of file ExpList.cpp.

References ASSERTL0, Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::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().

1365  {
1366  GlobalLinSysSharedPtr returnlinsys;
1367  std::shared_ptr<ExpList> vExpList = GetSharedThisPtr();
1368 
1369  MultiRegions::GlobalSysSolnType vType = mkey.GetGlobalSysSolnType();
1370 
1371  if (vType >= eSIZE_GlobalSysSolnType)
1372  {
1373  ASSERTL0(false,"Matrix solution type not defined");
1374  }
1375  std::string vSolnType = MultiRegions::GlobalSysSolnTypeMap[vType];
1376 
1377  return GetGlobalLinSysFactory().CreateInstance( vSolnType, mkey,
1378  vExpList, locToGloMap);
1379  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
std::shared_ptr< ExpList > GetSharedThisPtr()
Returns a shared pointer to the current object.
Definition: ExpList.h:968
std::shared_ptr< GlobalLinSys > GlobalLinSysSharedPtr
Pointer to a GlobalLinSys object.
Definition: GlobalLinSys.h:50
const char *const GlobalSysSolnTypeMap[]
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:144
GlobalLinSysFactory & GetGlobalLinSysFactory()

◆ GenGlobalMatrix()

GlobalMatrixSharedPtr Nektar::MultiRegions::ExpList::GenGlobalMatrix ( const GlobalMatrixKey mkey,
const std::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 1086 of file ExpList.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::StdRegions::eBwdTrans, Nektar::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().

1089  {
1090  int i,j,n,gid1,gid2,cntdim1,cntdim2;
1091  NekDouble sign1,sign2;
1092  DNekScalMatSharedPtr loc_mat;
1093 
1094  unsigned int glob_rows = 0;
1095  unsigned int glob_cols = 0;
1096  unsigned int loc_rows = 0;
1097  unsigned int loc_cols = 0;
1098 
1099  bool assembleFirstDim = false;
1100  bool assembleSecondDim = false;
1101 
1102  switch(mkey.GetMatrixType())
1103  {
1104  case StdRegions::eBwdTrans:
1105  {
1106  glob_rows = m_npoints;
1107  glob_cols = locToGloMap->GetNumGlobalCoeffs();
1108 
1109  assembleFirstDim = false;
1110  assembleSecondDim = true;
1111  }
1112  break;
1114  {
1115  glob_rows = locToGloMap->GetNumGlobalCoeffs();
1116  glob_cols = m_npoints;
1117 
1118  assembleFirstDim = true;
1119  assembleSecondDim = false;
1120  }
1121  break;
1122  case StdRegions::eMass:
1126  {
1127  glob_rows = locToGloMap->GetNumGlobalCoeffs();
1128  glob_cols = locToGloMap->GetNumGlobalCoeffs();
1129 
1130  assembleFirstDim = true;
1131  assembleSecondDim = true;
1132  }
1133  break;
1134  default:
1135  {
1137  "Global Matrix creation not defined for this type "
1138  "of matrix");
1139  }
1140  }
1141 
1142  COOMatType spcoomat;
1143  CoordType coord;
1144 
1145  int nvarcoeffs = mkey.GetNVarCoeffs();
1146  int eid;
1147 
1148  // fill global matrix
1149  for(n = cntdim1 = cntdim2 = 0; n < (*m_exp).size(); ++n)
1150  {
1151  // need to be initialised with zero size for non variable coefficient case
1152  StdRegions::VarCoeffMap varcoeffs;
1153 
1154  eid = n;
1155  if(nvarcoeffs>0)
1156  {
1157  for (auto &x : mkey.GetVarCoeffs())
1158  {
1159  varcoeffs[x.first] = x.second + m_phys_offset[eid];
1160  }
1161  }
1162 
1163  LocalRegions::MatrixKey matkey(mkey.GetMatrixType(),
1164  (*m_exp)[eid]->DetShapeType(),
1165  *((*m_exp)[eid]),
1166  mkey.GetConstFactors(),varcoeffs);
1167 
1168  loc_mat = std::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[n])->GetLocMatrix(matkey);
1169 
1170  loc_rows = loc_mat->GetRows();
1171  loc_cols = loc_mat->GetColumns();
1172 
1173  for(i = 0; i < loc_rows; ++i)
1174  {
1175  if(assembleFirstDim)
1176  {
1177  gid1 = locToGloMap->GetLocalToGlobalMap (cntdim1 + i);
1178  sign1 = locToGloMap->GetLocalToGlobalSign(cntdim1 + i);
1179  }
1180  else
1181  {
1182  gid1 = cntdim1 + i;
1183  sign1 = 1.0;
1184  }
1185 
1186  for(j = 0; j < loc_cols; ++j)
1187  {
1188  if(assembleSecondDim)
1189  {
1190  gid2 = locToGloMap
1191  ->GetLocalToGlobalMap(cntdim2 + j);
1192  sign2 = locToGloMap
1193  ->GetLocalToGlobalSign(cntdim2 + j);
1194  }
1195  else
1196  {
1197  gid2 = cntdim2 + j;
1198  sign2 = 1.0;
1199  }
1200 
1201  // sparse matrix fill
1202  coord = make_pair(gid1,gid2);
1203  if( spcoomat.count(coord) == 0 )
1204  {
1205  spcoomat[coord] = sign1*sign2*(*loc_mat)(i,j);
1206  }
1207  else
1208  {
1209  spcoomat[coord] += sign1*sign2*(*loc_mat)(i,j);
1210  }
1211  }
1212  }
1213  cntdim1 += loc_rows;
1214  cntdim2 += loc_cols;
1215  }
1216 
1218  ::AllocateSharedPtr(m_session,glob_rows,glob_cols,spcoomat);
1219  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::map< CoordType, NekDouble > COOMatType
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:264
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:1023
double NekDouble
std::pair< IndexType, IndexType > CoordType

◆ GenGlobalMatrixFull()

DNekMatSharedPtr Nektar::MultiRegions::ExpList::GenGlobalMatrixFull ( const GlobalLinSysKey mkey,
const std::shared_ptr< AssemblyMapCG > &  locToGloMap 
)
protected

Definition at line 1222 of file ExpList.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Blas::Dscal(), 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().

1223  {
1224  int i,j,n,gid1,gid2,loc_lda,eid;
1225  NekDouble sign1,sign2,value;
1226  DNekScalMatSharedPtr loc_mat;
1227 
1228  int totDofs = locToGloMap->GetNumGlobalCoeffs();
1229  int NumDirBCs = locToGloMap->GetNumGlobalDirBndCoeffs();
1230 
1231  unsigned int rows = totDofs - NumDirBCs;
1232  unsigned int cols = totDofs - NumDirBCs;
1233  NekDouble zero = 0.0;
1234 
1235  DNekMatSharedPtr Gmat;
1236  int bwidth = locToGloMap->GetFullSystemBandWidth();
1237 
1238  int nvarcoeffs = mkey.GetNVarCoeffs();
1239  MatrixStorage matStorage;
1240 
1241  map<int, RobinBCInfoSharedPtr> RobinBCInfo = GetRobinBCInfo();
1242 
1243  switch(mkey.GetMatrixType())
1244  {
1245  // case for all symmetric matices
1248  if( (2*(bwidth+1)) < rows)
1249  {
1251  Gmat = MemoryManager<DNekMat>::AllocateSharedPtr(rows,cols,zero,matStorage,bwidth,bwidth);
1252  }
1253  else
1254  {
1255  matStorage = ePOSITIVE_DEFINITE_SYMMETRIC;
1256  Gmat = MemoryManager<DNekMat>::AllocateSharedPtr(rows,cols,zero,matStorage);
1257  }
1258 
1259  break;
1260  default: // Assume general matrix - currently only set up for full invert
1261  {
1262  matStorage = eFULL;
1263  Gmat = MemoryManager<DNekMat>::AllocateSharedPtr(rows,cols,zero,matStorage);
1264  }
1265  }
1266 
1267  // fill global symmetric matrix
1268  for(n = 0; n < (*m_exp).size(); ++n)
1269  {
1270  // need to be initialised with zero size for non variable coefficient case
1271  StdRegions::VarCoeffMap varcoeffs;
1272 
1273  eid = n;
1274  if(nvarcoeffs>0)
1275  {
1276  for (auto &x : mkey.GetVarCoeffs())
1277  {
1278  varcoeffs[x.first] = x.second + m_phys_offset[eid];
1279  }
1280  }
1281 
1282  LocalRegions::MatrixKey matkey(mkey.GetMatrixType(),
1283  (*m_exp)[eid]->DetShapeType(),
1284  *((*m_exp)[eid]),
1285  mkey.GetConstFactors(),varcoeffs);
1286 
1287  loc_mat = std::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[n])->GetLocMatrix(matkey);
1288 
1289 
1290  if(RobinBCInfo.count(n) != 0) // add robin mass matrix
1291  {
1293 
1294  // declare local matrix from scaled matrix.
1295  int rows = loc_mat->GetRows();
1296  int cols = loc_mat->GetColumns();
1297  const NekDouble *dat = loc_mat->GetRawPtr();
1299  Blas::Dscal(rows*cols,loc_mat->Scale(),new_mat->GetRawPtr(),1);
1300 
1301  // add local matrix contribution
1302  for(rBC = RobinBCInfo.find(n)->second;rBC; rBC = rBC->next)
1303  {
1304  (*m_exp)[n]->AddRobinMassMatrix(rBC->m_robinID,rBC->m_robinPrimitiveCoeffs,new_mat);
1305  }
1306 
1307  NekDouble one = 1.0;
1308  // redeclare loc_mat to point to new_mat plus the scalar.
1309  loc_mat = MemoryManager<DNekScalMat>::AllocateSharedPtr(one,new_mat);
1310  }
1311 
1312  loc_lda = loc_mat->GetColumns();
1313 
1314  for(i = 0; i < loc_lda; ++i)
1315  {
1316  gid1 = locToGloMap->GetLocalToGlobalMap(m_coeff_offset[n] + i) - NumDirBCs;
1317  sign1 = locToGloMap->GetLocalToGlobalSign(m_coeff_offset[n] + i);
1318  if(gid1 >= 0)
1319  {
1320  for(j = 0; j < loc_lda; ++j)
1321  {
1322  gid2 = locToGloMap->GetLocalToGlobalMap(m_coeff_offset[n] + j) - NumDirBCs;
1323  sign2 = locToGloMap->GetLocalToGlobalSign(m_coeff_offset[n] + j);
1324  if(gid2 >= 0)
1325  {
1326  // When global matrix is symmetric,
1327  // only add the value for the upper
1328  // triangular part in order to avoid
1329  // entries to be entered twice
1330  if((matStorage == eFULL)||(gid2 >= gid1))
1331  {
1332  value = Gmat->GetValue(gid1,gid2) + sign1*sign2*(*loc_mat)(i,j);
1333  Gmat->SetValue(gid1,gid2,value);
1334  }
1335  }
1336  }
1337  }
1338  }
1339  }
1340 
1341  return Gmat;
1342  }
std::shared_ptr< RobinBCInfo > RobinBCInfoSharedPtr
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:69
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1101
std::map< StdRegions::VarCoeffType, Array< OneD, NekDouble > > VarCoeffMap
Definition: StdRegions.hpp:264
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
double NekDouble
std::map< int, RobinBCInfoSharedPtr > GetRobinBCInfo()
Definition: ExpList.h:884
static void Dscal(const int &n, const double &alpha, double *x, const int &incx)
BLAS level 1: x = alpha x.
Definition: Blas.hpp:125

◆ Get1DScaledTotPoints()

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

References m_exp.

1620  {
1621  int returnval = 0;
1622  int cnt;
1623  int nbase = (*m_exp)[0]->GetNumBases();
1624 
1625  for(int i = 0; i < (*m_exp).size(); ++i)
1626  {
1627  cnt = 1;
1628  for(int j = 0; j < nbase; ++j)
1629  {
1630  cnt *= (int)(scale*((*m_exp)[i]->GetNumPoints(j)));
1631  }
1632  returnval += cnt;
1633  }
1634  return returnval;
1635  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090

◆ GetBCValues()

void Nektar::MultiRegions::ExpList::GetBCValues ( Array< OneD, NekDouble > &  BndVals,
const Array< OneD, NekDouble > &  TotField,
int  BndID 
)
inline

Definition at line 1982 of file ExpList.h.

References v_GetBCValues().

1986  {
1987  v_GetBCValues(BndVals,TotField,BndID);
1988  }
virtual void v_GetBCValues(Array< OneD, NekDouble > &BndVals, const Array< OneD, NekDouble > &TotField, int BndID)
Definition: ExpList.cpp:2778

◆ GetBlockMatrix()

const DNekScalBlkMatSharedPtr & Nektar::MultiRegions::ExpList::GetBlockMatrix ( const GlobalMatrixKey gkey)
protected

Definition at line 1004 of file ExpList.cpp.

References GenBlockMatrix(), 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().

1006  {
1007  auto matrixIter = m_blockMat->find(gkey);
1008 
1009  if(matrixIter == m_blockMat->end())
1010  {
1011  return ((*m_blockMat)[gkey] = GenBlockMatrix(gkey));
1012  }
1013  else
1014  {
1015  return matrixIter->second;
1016  }
1017  }
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1108
const DNekScalBlkMatSharedPtr GenBlockMatrix(const GlobalMatrixKey &gkey)
This function assembles the block diagonal matrix of local matrices of the type mtype.
Definition: ExpList.cpp:869

◆ GetBndCondExpansions()

const Array< OneD, const std::shared_ptr< ExpList > > & Nektar::MultiRegions::ExpList::GetBndCondExpansions ( )
inline

Definition at line 2239 of file ExpList.h.

References v_GetBndCondExpansions().

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

2240  {
2241  return v_GetBndCondExpansions();
2242  }
virtual const Array< OneD, const std::shared_ptr< ExpList > > & v_GetBndCondExpansions(void)
Definition: ExpList.cpp:2542

◆ GetBndConditions()

const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::GetBndConditions ( )
inline

Definition at line 2345 of file ExpList.h.

References v_GetBndConditions().

Referenced by GetNumElmts().

2346  {
2347  return v_GetBndConditions();
2348  }
virtual const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & v_GetBndConditions()
Definition: ExpList.cpp:3207

◆ GetBndElmtExpansion()

void Nektar::MultiRegions::ExpList::GetBndElmtExpansion ( int  i,
std::shared_ptr< ExpList > &  result,
const bool  DeclareCoeffPhysArrays = true 
)
inline

Definition at line 2415 of file ExpList.h.

References v_GetBndElmtExpansion().

Referenced by GetNumElmts().

2418  {
2419  v_GetBndElmtExpansion(i, result, DeclareCoeffPhysArrays);
2420  }
virtual void v_GetBndElmtExpansion(int i, std::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays)
Definition: ExpList.cpp:3015

◆ GetBoundaryCondition()

SpatialDomains::BoundaryConditionShPtr Nektar::MultiRegions::ExpList::GetBoundaryCondition ( const SpatialDomains::BoundaryConditionCollection collection,
unsigned int  index,
const std::string &  variable 
)
staticprotected

Definition at line 3261 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(), Nektar::MultiRegions::DisContField3DHomogeneous1D::SetupBoundaryConditions(), and v_GetNumElmts().

3265  {
3266  auto collectionIter = collection.find(regionId);
3267  ASSERTL1(collectionIter != collection.end(),
3268  "Unable to locate collection " +
3269  boost::lexical_cast<string>(regionId));
3270 
3272  = (*collectionIter).second;
3273  auto conditionMapIter = bndCondMap->find(variable);
3274  ASSERTL1(conditionMapIter != bndCondMap->end(),
3275  "Unable to locate condition map.");
3276 
3277  const SpatialDomains::BoundaryConditionShPtr boundaryCondition
3278  = (*conditionMapIter).second;
3279 
3280  return boundaryCondition;
3281  }
std::shared_ptr< BoundaryConditionMap > BoundaryConditionMapShPtr
Definition: Conditions.h:225
std::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:250

◆ GetBoundaryNormals()

void Nektar::MultiRegions::ExpList::GetBoundaryNormals ( int  i,
Array< OneD, Array< OneD, NekDouble > > &  normals 
)
inline

Definition at line 2443 of file ExpList.h.

References v_GetBoundaryNormals().

Referenced by GetNumElmts().

2445  {
2446  v_GetBoundaryNormals(i, normals);
2447  }
virtual void v_GetBoundaryNormals(int i, Array< OneD, Array< OneD, NekDouble > > &normals)
Definition: ExpList.cpp:3143

◆ GetBoundaryToElmtMap()

void Nektar::MultiRegions::ExpList::GetBoundaryToElmtMap ( Array< OneD, int > &  ElmtID,
Array< OneD, int > &  EdgeID 
)
inline

◆ GetCoeff()

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

References m_coeffs.

Referenced by Nektar::MultiRegions::DisContField1D::v_EvaluateBoundaryConditions(), and WriteVtkPieceData().

2140  {
2141  return m_coeffs[i];
2142  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:1052

◆ GetCoeff_Offset()

int Nektar::MultiRegions::ExpList::GetCoeff_Offset ( int  n) const
inline

◆ GetCoeffs() [1/2]

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

References m_coeffs.

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

2063  {
2064  return m_coeffs;
2065  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:1052

◆ GetCoeffs() [2/2]

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

References m_coeffs.

2149  {
2150  return m_coeffs[i];
2151  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:1052

◆ GetComm()

std::shared_ptr<LibUtilities::Comm> Nektar::MultiRegions::ExpList::GetComm ( )
inline

Returns the comm object.

Definition at line 980 of file ExpList.h.

References m_comm.

981  {
982  return m_comm;
983  }
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:1020

◆ GetCoordim()

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

References ASSERTL2, and m_exp.

Referenced by Nektar::MultiRegions::ExpList2DHomogeneous1D::GetCoords(), GetExpIndex(), IProductWRTDerivBase(), PhysEvaluate(), 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(), v_WriteTecplotZone(), and WriteVtkPieceData().

2014  {
2015  ASSERTL2(eid <= (*m_exp).size(),
2016  "eid is larger than number of elements");
2017  return (*m_exp)[eid]->GetCoordim();
2018  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed t...
Definition: ErrorUtil.hpp:274

◆ GetCoords()

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

References v_GetCoords().

Referenced by v_WriteTecplotZone().

1858  {
1859  v_GetCoords(coord_0,coord_1,coord_2);
1860  }
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
Definition: ExpList.cpp:2954

◆ GetExp() [1/3]

const std::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 2191 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(), GetExp(), GetExpIndex(), GetNumElmts(), Nektar::MultiRegions::LocTraceToTraceMap::LocTraceToTraceMap(), Nektar::MultiRegions::DisContField3DHomogeneous1D::NormVectorIProductWRTBase(), Nektar::MultiRegions::ExpList1D::PostProcess(), Nektar::MultiRegions::LocTraceToTraceMap::Setup2D(), Nektar::MultiRegions::LocTraceToTraceMap::Setup3D(), Nektar::MultiRegions::AssemblyMapCG::SetUpUniversalC0ContMap(), Nektar::MultiRegions::AssemblyMapDG::SetUpUniversalDGMap(), Nektar::MultiRegions::AssemblyMapDG::SetUpUniversalTraceMap(), v_ExtractElmtToBndPhys(), v_ExtractPhysToBnd(), v_ExtractPhysToBndElmt(), Nektar::MultiRegions::DisContField3DHomogeneous2D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField2D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBoundaryNormals(), v_GetBoundaryNormals(), v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_HomogeneousEnergy(), Nektar::MultiRegions::AssemblyMapCG::v_LinearSpaceMap(), and v_WriteTecplotHeader().

2192  {
2193  return m_exp;
2194  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090

◆ GetExp() [2/3]

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

References m_exp.

2183  {
2184  return (*m_exp)[n];
2185  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090

◆ GetExp() [3/3]

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

References GetExp(), and GetExpIndex().

1432  {
1433  return GetExp(GetExpIndex(gloCoord));
1434  }
int GetExpIndex(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false)
Definition: ExpList.cpp:1442
const std::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2191

◆ GetExpIndex() [1/2]

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

Referenced by GetExp(), GetNumElmts(), and PhysEvaluate().

1446  {
1447  Array<OneD, NekDouble> Lcoords(gloCoord.num_elements());
1448 
1449  return GetExpIndex(gloCoord,Lcoords,tol,returnNearestElmt);
1450  }
int GetExpIndex(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false)
Definition: ExpList.cpp:1442

◆ GetExpIndex() [2/2]

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

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), GetCoordim(), GetExp(), GetNumElmts(), m_elmtToExpId, m_exp, m_graph, CellMLToNektar.pycml::msg, CellMLToNektar.cellml_metadata::p, Vmath::Vcopy(), and WARNINGL1.

1458  {
1459  if (GetNumElmts() == 0)
1460  {
1461  return -1;
1462  }
1463 
1464  if (m_elmtToExpId.size() == 0)
1465  {
1466  // Loop in reverse order so that in case where using a
1467  // Homogeneous expansion it sets geometry ids to first part of
1468  // m_exp list. Otherwise will set to second (complex) expansion
1469  for(int i = (*m_exp).size()-1; i >= 0; --i)
1470  {
1471  m_elmtToExpId[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
1472  }
1473  }
1474 
1475  NekDouble x = (gloCoords.num_elements() > 0 ? gloCoords[0] : 0.0);
1476  NekDouble y = (gloCoords.num_elements() > 1 ? gloCoords[1] : 0.0);
1477  NekDouble z = (gloCoords.num_elements() > 2 ? gloCoords[2] : 0.0);
1480  GetExp(0)->GetCoordim(), -1, x, y, z);
1481 
1482  // Get the list of elements whose bounding box contains the desired
1483  // point.
1484  std::vector<int> elmts = m_graph->GetElementsContainingPoint(p);
1485 
1486  NekDouble nearpt = 1e6;
1487  NekDouble nearpt_min = 1e6;
1488  int min_id = 0;
1489  Array<OneD, NekDouble> savLocCoords(locCoords.num_elements());
1490 
1491  // Check each element in turn to see if point lies within it.
1492  for (int i = 0; i < elmts.size(); ++i)
1493  {
1494  if ((*m_exp)[m_elmtToExpId[elmts[i]]]->
1495  GetGeom()->ContainsPoint(gloCoords,
1496  locCoords,
1497  tol, nearpt))
1498  {
1499  return m_elmtToExpId[elmts[i]];
1500  }
1501  else
1502  {
1503  // If it does not lie within, keep track of which element
1504  // is nearest.
1505  if(nearpt < nearpt_min)
1506  {
1507  min_id = m_elmtToExpId[elmts[i]];
1508  nearpt_min = nearpt;
1509  Vmath::Vcopy(locCoords.num_elements(),locCoords, 1,
1510  savLocCoords, 1);
1511  }
1512  }
1513  }
1514 
1515  // If the calling function is with just the nearest element, return
1516  // that. Otherwise return -1 to indicate no matching elemenet found.
1517  if(returnNearestElmt)
1518  {
1519 
1520  std::string msg = "Failed to find point within element to "
1521  "tolerance of "
1522  + boost::lexical_cast<std::string>(tol)
1523  + " using local point ("
1524  + boost::lexical_cast<std::string>(locCoords[0]) +","
1525  + boost::lexical_cast<std::string>(locCoords[1]) +","
1526  + boost::lexical_cast<std::string>(locCoords[1])
1527  + ") in element: "
1528  + boost::lexical_cast<std::string>(min_id);
1529  WARNINGL1(false,msg.c_str());
1530 
1531  Vmath::Vcopy(locCoords.num_elements(),savLocCoords, 1,
1532  locCoords, 1);
1533  return min_id;
1534  }
1535  else
1536  {
1537  return -1;
1538  }
1539  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
const std::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2191
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Definition: ExpList.h:655
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:1026
double NekDouble
std::shared_ptr< PointGeom > PointGeomSharedPtr
Definition: Geometry.h:59
#define WARNINGL1(condition, msg)
Definition: ErrorUtil.hpp:251
std::unordered_map< int, int > m_elmtToExpId
Mapping from geometry ID of element to index inside m_exp.
Definition: ExpList.h:1116
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:2013
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ GetExpSize()

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 2170 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(), export_ExpList(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GenExpList3DHomogeneous1D(), Nektar::MultiRegions::DisContField1D::GetNegatedFluxNormal(), Nektar::MultiRegions::DisContField2D::L2_DGDeriv(), Nektar::MultiRegions::ExpList1D::PeriodicEval(), PhysGalerkinProjection1DScaled(), 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::DisContField1D::v_GetBoundaryToElmtMap(), Nektar::MultiRegions::DisContField2D::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().

2171  {
2172  return (*m_exp).size();
2173  }

◆ GetExpType()

ExpansionType Nektar::MultiRegions::ExpList::GetExpType ( void  )

Returns the type of the expansion.

Definition at line 271 of file ExpList.cpp.

References m_expType.

Referenced by v_CurlCurl().

272  {
273  return m_expType;
274  }

◆ GetFieldDefinitions() [1/2]

std::vector<LibUtilities::FieldDefinitionsSharedPtr> Nektar::MultiRegions::ExpList::GetFieldDefinitions ( )
inline

Definition at line 898 of file ExpList.h.

References v_GetFieldDefinitions().

899  {
900  return v_GetFieldDefinitions();
901  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2282

◆ GetFieldDefinitions() [2/2]

void Nektar::MultiRegions::ExpList::GetFieldDefinitions ( std::vector< LibUtilities::FieldDefinitionsSharedPtr > &  fielddef)
inline

Definition at line 904 of file ExpList.h.

References v_GetFieldDefinitions().

905  {
906  v_GetFieldDefinitions(fielddef);
907  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2282

◆ GetFwdBwdTracePhys() [1/2]

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

Definition at line 2311 of file ExpList.h.

References v_GetFwdBwdTracePhys().

Referenced by GetNumElmts().

2314  {
2315  v_GetFwdBwdTracePhys(Fwd,Bwd);
2316  }
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
Definition: ExpList.cpp:2639

◆ GetFwdBwdTracePhys() [2/2]

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

Definition at line 2318 of file ExpList.h.

References v_GetFwdBwdTracePhys().

2322  {
2323  v_GetFwdBwdTracePhys(field,Fwd,Bwd);
2324  }
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
Definition: ExpList.cpp:2639

◆ GetGlobalOptParam()

const NekOptimize::GlobalOptParamSharedPtr& Nektar::MultiRegions::ExpList::GetGlobalOptParam ( void  )
inline

Definition at line 879 of file ExpList.h.

References m_globalOptParam.

880  {
881  return m_globalOptParam;
882  }
NekOptimize::GlobalOptParamSharedPtr m_globalOptParam
Definition: ExpList.h:1106

◆ GetGraph()

SpatialDomains::MeshGraphSharedPtr Nektar::MultiRegions::ExpList::GetGraph ( )
inline

Definition at line 985 of file ExpList.h.

References m_graph.

986  {
987  return m_graph;
988  }
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:1026

◆ GetHomogeneousBasis()

LibUtilities::BasisSharedPtr Nektar::MultiRegions::ExpList::GetHomogeneousBasis ( void  )
inline

Definition at line 991 of file ExpList.h.

References v_GetHomogeneousBasis().

992  {
993  return v_GetHomogeneousBasis();
994  }
virtual LibUtilities::BasisSharedPtr v_GetHomogeneousBasis(void)
Definition: ExpList.h:1526

◆ GetHomoLen()

NekDouble Nektar::MultiRegions::ExpList::GetHomoLen ( void  )
inline

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

Definition at line 603 of file ExpList.h.

References v_GetHomoLen().

604  {
605  return v_GetHomoLen();
606  }
virtual NekDouble v_GetHomoLen(void)
Definition: ExpList.cpp:2037

◆ GetLeftAdjacentFaces()

const std::vector< bool > & Nektar::MultiRegions::ExpList::GetLeftAdjacentFaces ( void  ) const
inline

Definition at line 2326 of file ExpList.h.

References v_GetLeftAdjacentFaces().

Referenced by GetNumElmts().

2327  {
2328  return v_GetLeftAdjacentFaces();
2329  }
virtual const std::vector< bool > & v_GetLeftAdjacentFaces(void) const
Definition: ExpList.cpp:2657

◆ GetMovingFrames()

void Nektar::MultiRegions::ExpList::GetMovingFrames ( const SpatialDomains::GeomMMF  MMFdir,
const Array< OneD, const NekDouble > &  CircCentre,
Array< OneD, Array< OneD, NekDouble > > &  outarray 
)
inline

Definition at line 1866 of file ExpList.h.

References v_GetMovingFrames().

Referenced by GetNumElmts().

1870  {
1871  v_GetMovingFrames(MMFdir,CircCentre,outarray);
1872  }
virtual void v_GetMovingFrames(const SpatialDomains::GeomMMF MMFdir, const Array< OneD, const NekDouble > &CircCentre, Array< OneD, Array< OneD, NekDouble > > &outarray)
Definition: ExpList.cpp:2459

◆ GetNcoeffs() [1/2]

int Nektar::MultiRegions::ExpList::GetNcoeffs ( void  ) const
inline

◆ GetNcoeffs() [2/2]

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

References m_exp.

1564  {
1565  return (*m_exp)[eid]->GetNcoeffs();
1566  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090

◆ GetNormals()

void Nektar::MultiRegions::ExpList::GetNormals ( Array< OneD, Array< OneD, NekDouble > > &  normals)
inline

Definition at line 2282 of file ExpList.h.

References v_GetNormals().

Referenced by GetNumElmts().

2284  {
2285  v_GetNormals(normals);
2286  }
virtual void v_GetNormals(Array< OneD, Array< OneD, NekDouble > > &normals)
Definition: ExpList.cpp:2602

◆ GetNpoints()

int Nektar::MultiRegions::ExpList::GetNpoints ( void  ) const
inline

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

Definition at line 1640 of file ExpList.h.

References m_npoints.

Referenced by export_ExpList().

1641  {
1642  return m_npoints;
1643  }

◆ GetNumElmts()

int Nektar::MultiRegions::ExpList::GetNumElmts ( void  )
inline

◆ GetPeriodicEntities()

void Nektar::MultiRegions::ExpList::GetPeriodicEntities ( PeriodicMap periodicVerts,
PeriodicMap periodicEdges,
PeriodicMap periodicFaces = NullPeriodicMap 
)
inline

Definition at line 889 of file ExpList.h.

References v_GetPeriodicEntities().

893  {
894  v_GetPeriodicEntities(periodicVerts, periodicEdges, periodicFaces);
895  }
virtual void v_GetPeriodicEntities(PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces)
Definition: ExpList.cpp:3251

◆ GetPhys()

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 2161 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::DisContField1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField2D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField1D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField2D::v_GetFwdBwdTracePhys(), and WriteVtkPieceData().

2162  {
2163  return m_phys;
2164  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1069

◆ GetPhys_Offset()

int Nektar::MultiRegions::ExpList::GetPhys_Offset ( int  n) const
inline

◆ GetPhysState()

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

References m_physState.

Referenced by export_ExpList().

1707  {
1708  return m_physState;
1709  }
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1078

◆ GetPlane()

std::shared_ptr<ExpList>& Nektar::MultiRegions::ExpList::GetPlane ( int  n)
inline

Definition at line 996 of file ExpList.h.

References v_GetPlane().

997  {
998  return v_GetPlane(n);
999  }
virtual std::shared_ptr< ExpList > & v_GetPlane(int n)
Definition: ExpList.cpp:3283

◆ GetRobinBCInfo()

std::map<int, RobinBCInfoSharedPtr> Nektar::MultiRegions::ExpList::GetRobinBCInfo ( )
inline

Definition at line 884 of file ExpList.h.

References v_GetRobinBCInfo().

Referenced by GenGlobalBndLinSys(), and GenGlobalMatrixFull().

885  {
886  return v_GetRobinBCInfo();
887  }
virtual std::map< int, RobinBCInfoSharedPtr > v_GetRobinBCInfo(void)
Definition: ExpList.cpp:3241

◆ GetSession()

std::shared_ptr<LibUtilities::SessionReader> Nektar::MultiRegions::ExpList::GetSession ( ) const
inline

Returns the session object.

Definition at line 974 of file ExpList.h.

References m_session.

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

975  {
976  return m_session;
977  }
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:1023

◆ GetShapeDimension()

int Nektar::MultiRegions::ExpList::GetShapeDimension ( )
inline

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

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

Definition at line 2024 of file ExpList.h.

References m_exp.

Referenced by WriteVtkPieceData().

2025  {
2026  return (*m_exp)[0]->GetShapeDimension();
2027  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090

◆ GetSharedThisPtr()

std::shared_ptr<ExpList> Nektar::MultiRegions::ExpList::GetSharedThisPtr ( )
inline

Returns a shared pointer to the current object.

Definition at line 968 of file ExpList.h.

Referenced by GenGlobalBndLinSys(), and GenGlobalLinSys().

969  {
970  return shared_from_this();
971  }

◆ GetTotPoints() [1/2]

int Nektar::MultiRegions::ExpList::GetTotPoints ( void  ) const
inline

◆ GetTotPoints() [2/2]

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

References m_exp.

1614  {
1615  return (*m_exp)[eid]->GetTotPoints();
1616  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090

◆ GetTrace()

std::shared_ptr< ExpList > & Nektar::MultiRegions::ExpList::GetTrace ( )
inline

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

Definition at line 2267 of file ExpList.h.

References v_GetTrace().

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

2268  {
2269  return v_GetTrace();
2270  }
virtual std::shared_ptr< ExpList > & v_GetTrace()
Definition: ExpList.cpp:2581

◆ GetTraceBndMap()

const Array< OneD, const int > & Nektar::MultiRegions::ExpList::GetTraceBndMap ( void  )
inline

Definition at line 2277 of file ExpList.h.

References v_GetTraceBndMap().

Referenced by GetNumElmts().

2278  {
2279  return v_GetTraceBndMap();
2280  }
virtual const Array< OneD, const int > & v_GetTraceBndMap()
Definition: ExpList.cpp:2597

◆ GetTraceMap()

std::shared_ptr< AssemblyMapDG > & Nektar::MultiRegions::ExpList::GetTraceMap ( void  )
inline

Definition at line 2272 of file ExpList.h.

References v_GetTraceMap().

Referenced by GetNumElmts(), and v_GetTraceBndMap().

2273  {
2274  return v_GetTraceMap();
2275  }
virtual std::shared_ptr< AssemblyMapDG > & v_GetTraceMap()
Definition: ExpList.cpp:2589

◆ GetTransposition()

LibUtilities::TranspositionSharedPtr Nektar::MultiRegions::ExpList::GetTransposition ( void  )
inline

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

Definition at line 596 of file ExpList.h.

References v_GetTransposition().

597  {
598  return v_GetTransposition();
599  }
virtual LibUtilities::TranspositionSharedPtr v_GetTransposition(void)
Definition: ExpList.cpp:2029

◆ GetWaveSpace()

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

References m_WaveSpace.

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

1658  {
1659  return m_WaveSpace;
1660  }

◆ GetYIDs()

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

References v_GetYIDs().

620  {
621  return v_GetYIDs();
622  }
virtual Array< OneD, const unsigned int > v_GetYIDs(void)
Definition: ExpList.cpp:2060

◆ GetZIDs()

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

References v_GetZIDs().

Referenced by v_WriteTecplotZone().

590  {
591  return v_GetZIDs();
592  }
virtual Array< OneD, const unsigned int > v_GetZIDs(void)
Definition: ExpList.cpp:2052

◆ GlobalEigenSystem()

void Nektar::MultiRegions::ExpList::GlobalEigenSystem ( const std::shared_ptr< DNekMat > &  Gmat,
Array< OneD, NekDouble > &  EigValsReal,
Array< OneD, NekDouble > &  EigValsImag,
Array< OneD, NekDouble > &  EigVecs = NullNekDouble1DArray 
)
protected

◆ GlobalToLocal() [1/2]

void Nektar::MultiRegions::ExpList::GlobalToLocal ( void  )
inline

◆ GlobalToLocal() [2/2]

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

References v_GlobalToLocal().

2130  {
2131  v_GlobalToLocal(inarray, outarray);
2132  }
virtual void v_GlobalToLocal(void)
Definition: ExpList.cpp:2885

◆ H1()

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

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

Referenced by L2().

2158  {
2159  NekDouble err = 0.0, errh1;
2160  int i;
2161 
2162  for (i = 0; i < (*m_exp).size(); ++i)
2163  {
2164  errh1 = (*m_exp)[i]->H1(inarray + m_phys_offset[i],
2165  soln + m_phys_offset[i]);
2166  err += errh1*errh1;
2167  }
2168 
2169  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
2170 
2171  return sqrt(err);
2172  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:1020

◆ HelmSolve()

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 MultiRegions::VarFactorsMap varfactors = MultiRegions::NullVarFactorsMap,
const Array< OneD, const NekDouble > &  dirForcing = NullNekDouble1DArray,
const bool  PhysSpaceForcing = true 
)
inline

Solve helmholtz problem.

Definition at line 1808 of file ExpList.h.

References v_HelmSolve().

1818  {
1819  v_HelmSolve(inarray, outarray, flags, factors, varcoeff,
1820  varfactors, dirForcing, PhysSpaceForcing);
1821  }
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 MultiRegions::VarFactorsMap &varfactors, const Array< OneD, const NekDouble > &dirForcing, const bool PhysSpaceForcing)
Definition: ExpList.cpp:2692

◆ HomogeneousBwdTrans()

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

References v_HomogeneousBwdTrans().

1951  {
1952  v_HomogeneousBwdTrans(inarray,outarray,coeffstate,Shuff,UnShuff);
1953  }
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:2746

◆ HomogeneousEnergy()

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

References v_HomogeneousEnergy().

574  {
575  return v_HomogeneousEnergy();
576  }
virtual Array< OneD, const NekDouble > v_HomogeneousEnergy(void)
Definition: ExpList.cpp:2021

◆ HomogeneousFwdTrans()

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

References v_HomogeneousFwdTrans().

1938  {
1939  v_HomogeneousFwdTrans(inarray,outarray,coeffstate,Shuff,UnShuff);
1940  }
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:2735

◆ ImposeDirichletConditions()

void Nektar::MultiRegions::ExpList::ImposeDirichletConditions ( Array< OneD, NekDouble > &  outarray)
inline

Impose Dirichlet Boundary Conditions onto Array.

Definition at line 2067 of file ExpList.h.

References v_ImposeDirichletConditions().

Referenced by WriteVtkPieceData().

2069  {
2070  v_ImposeDirichletConditions(outarray);
2071  }
virtual void v_ImposeDirichletConditions(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2843

◆ Integral()

NekDouble Nektar::MultiRegions::ExpList::Integral ( const Array< OneD, const NekDouble > &  inarray)
inline

Definition at line 561 of file ExpList.h.

References v_Integral().

562  {
563  return v_Integral(inarray);
564  }
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Definition: ExpList.cpp:1988

◆ IProductWRTBase()

void Nektar::MultiRegions::ExpList::IProductWRTBase ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
inline

◆ IProductWRTBase_IterPerExp()

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 1725 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().

1728  {
1729  v_IProductWRTBase_IterPerExp(inarray,outarray);
1730  }
virtual void v_IProductWRTBase_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:382

◆ IProductWRTDerivBase() [1/2]

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

References m_coeff_offset, and m_phys_offset.

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

◆ IProductWRTDerivBase() [2/2]

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

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

475  {
476  Array<OneD, NekDouble> tmp0,tmp1,tmp2;
477  // assume coord dimension defines the size of Deriv Base
478  int dim = GetCoordim(0);
479 
480  ASSERTL1(inarray.num_elements() >= dim,"inarray is not of sufficient dimension");
481 
482  switch(dim)
483  {
484  case 1:
485  for (int i = 0; i < m_collections.size(); ++i)
486  {
487  m_collections[i].ApplyOperator(
489  inarray[0] + m_coll_phys_offset[i],
490  tmp0 = outarray + m_coll_coeff_offset[i]);
491  }
492  break;
493  case 2:
494  for (int i = 0; i < m_collections.size(); ++i)
495  {
496  m_collections[i].ApplyOperator(
498  inarray[0] + m_coll_phys_offset[i],
499  tmp0 = inarray[1] + m_coll_phys_offset[i],
500  tmp1 = outarray + m_coll_coeff_offset[i]);
501  }
502  break;
503  case 3:
504  for (int i = 0; i < m_collections.size(); ++i)
505  {
506  m_collections[i].ApplyOperator(
508  inarray[0] + m_coll_phys_offset[i],
509  tmp0 = inarray[1] + m_coll_phys_offset[i],
510  tmp1 = inarray[2] + m_coll_phys_offset[i],
511  tmp2 = outarray + m_coll_coeff_offset[i]);
512  }
513  break;
514  default:
515  ASSERTL0(false,"Dimension of inarray not correct");
516  break;
517  }
518  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1098
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:2013
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1095
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:250
Collections::CollectionVector m_collections
Definition: ExpList.h:1092

◆ IProductWRTDirectionalDerivBase()

void Nektar::MultiRegions::ExpList::IProductWRTDirectionalDerivBase ( const Array< OneD, const NekDouble > &  direction,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)

Directional derivative along a given direction.

Definition at line 429 of file ExpList.cpp.

References m_coeff_offset, m_phys_offset, and Vmath::Vcopy().

433  {
434  int npts_e;
435  int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
436  int nq = direction.num_elements()/coordim;
437 
438  Array<OneD, NekDouble> e_outarray;
439  Array<OneD, NekDouble> e_MFdiv;
440 
441  Array<OneD, NekDouble> locdir;
442 
443  for(int i = 0; i < (*m_exp).size(); ++i)
444  {
445  npts_e = (*m_exp)[i]->GetTotPoints();
446  locdir = Array<OneD, NekDouble>(npts_e*coordim);
447 
448  for (int k = 0; k<coordim; ++k)
449  {
450  Vmath::Vcopy(npts_e, &direction[k*nq+m_phys_offset[i]], 1,
451  &locdir[k*npts_e], 1);
452  }
453 
454  (*m_exp)[i]->IProductWRTDirectionalDerivBase(
455  locdir,
456  inarray+m_phys_offset[i],
457  e_outarray = outarray+m_coeff_offset[i] );
458  }
459  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1101
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ L2()

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

References H1(), MULTI_REGIONS_EXPORT, Nektar::NullNekDouble1DArray, and v_L2().

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

551  {
552  return v_L2(inarray, soln);
553  }
virtual NekDouble v_L2(const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
Definition: ExpList.cpp:1958

◆ LinearAdvectionDiffusionReactionSolve()

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

References v_LinearAdvectionDiffusionReactionSolve().

1834  {
1835  v_LinearAdvectionDiffusionReactionSolve(velocity,inarray, outarray,
1836  lambda, coeffstate,dirForcing);
1837  }
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:2707

◆ LinearAdvectionReactionSolve()

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

References v_LinearAdvectionReactionSolve().

1846  {
1847  v_LinearAdvectionReactionSolve(velocity,inarray, outarray,
1848  lambda, coeffstate,dirForcing);
1849  }
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:2721

◆ Linf()

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

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

Referenced by WriteVtkPieceData().

1922  {
1923  NekDouble err = 0.0;
1924 
1925  if (soln == NullNekDouble1DArray)
1926  {
1927  err = Vmath::Vmax(m_npoints, inarray, 1);
1928  }
1929  else
1930  {
1931  for (int i = 0; i < m_npoints; ++i)
1932  {
1933  err = max(err, abs(inarray[i] - soln[i]));
1934  }
1935  }
1936 
1937  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceMax);
1938 
1939  return err;
1940  }
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:782
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:1020

◆ LocalToGlobal() [1/2]

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

References v_LocalToGlobal().

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

2084  {
2085  v_LocalToGlobal(useComm);
2086  }
virtual void v_LocalToGlobal(bool UseComm)
Definition: ExpList.cpp:2867

◆ LocalToGlobal() [2/2]

void Nektar::MultiRegions::ExpList::LocalToGlobal ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
bool  useComm = true 
)
inline

Definition at line 2088 of file ExpList.h.

References v_LocalToGlobal().

2092  {
2093  v_LocalToGlobal(inarray, outarray,useComm);
2094  }
virtual void v_LocalToGlobal(bool UseComm)
Definition: ExpList.cpp:2867

◆ MultiplyByBlockMatrix()

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

References Nektar::eWrapper, and GetBlockMatrix().

Referenced by GeneralMatrixOp_IterPerExp().

356  {
357  // Retrieve the block matrix using the given key.
358  const DNekScalBlkMatSharedPtr& blockmat = GetBlockMatrix(gkey);
359  int nrows = blockmat->GetRows();
360  int ncols = blockmat->GetColumns();
361 
362  // Create NekVectors from the given data arrays
363  NekVector<NekDouble> in (ncols,inarray, eWrapper);
364  NekVector< NekDouble> out(nrows,outarray,eWrapper);
365 
366  // Perform matrix-vector multiply.
367  out = (*blockmat)*in;
368  }
const DNekScalBlkMatSharedPtr & GetBlockMatrix(const GlobalMatrixKey &gkey)
Definition: ExpList.cpp:1004
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:73

◆ MultiplyByElmtInvMass()

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

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

Referenced by v_FwdTrans_IterPerExp().

758  {
759  GlobalMatrixKey mkey(StdRegions::eInvMass);
760  const DNekScalBlkMatSharedPtr& InvMass = GetBlockMatrix(mkey);
761 
762  // Inverse mass matrix
763  NekVector<NekDouble> out(m_ncoeffs,outarray,eWrapper);
764  if(inarray.get() == outarray.get())
765  {
766  NekVector<NekDouble> in(m_ncoeffs,inarray); // copy data
767  out = (*InvMass)*in;
768  }
769  else
770  {
771  NekVector<NekDouble> in(m_ncoeffs,inarray,eWrapper);
772  out = (*InvMass)*in;
773  }
774  }
const DNekScalBlkMatSharedPtr & GetBlockMatrix(const GlobalMatrixKey &gkey)
Definition: ExpList.cpp:1004
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:73
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:1030

◆ MultiplyByInvMassMatrix()

void Nektar::MultiRegions::ExpList::MultiplyByInvMassMatrix ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
CoeffState  coeffstate = eLocal 
)
inline

Definition at line 1797 of file ExpList.h.

References v_MultiplyByInvMassMatrix().

1801  {
1802  v_MultiplyByInvMassMatrix(inarray,outarray,coeffstate);
1803  }
virtual void v_MultiplyByInvMassMatrix(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate)
Definition: ExpList.cpp:2682

◆ NormVectorIProductWRTBase() [1/2]

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

References v_NormVectorIProductWRTBase().

1998  {
1999  v_NormVectorIProductWRTBase(V1,V2,outarray,BndID);
2000  }
virtual void v_NormVectorIProductWRTBase(Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
Definition: ExpList.cpp:2787

◆ NormVectorIProductWRTBase() [2/2]

void Nektar::MultiRegions::ExpList::NormVectorIProductWRTBase ( Array< OneD, Array< OneD, NekDouble > > &  V,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 2002 of file ExpList.h.

References v_NormVectorIProductWRTBase().

2005  {
2006  v_NormVectorIProductWRTBase(V, outarray);
2007  }
virtual void v_NormVectorIProductWRTBase(Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
Definition: ExpList.cpp:2787

◆ PhysDeriv() [1/3]

void Nektar::MultiRegions::ExpList::PhysDeriv ( Direction  edir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d 
)
inline

Definition at line 1897 of file ExpList.h.

References v_PhysDeriv().

Referenced by GetNumElmts(), and v_CurlCurl().

1901  {
1902  v_PhysDeriv(edir, inarray,out_d);
1903  }
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:553

◆ PhysDeriv() [2/3]

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

References v_PhysDeriv().

1882  {
1883  v_PhysDeriv(inarray,out_d0,out_d1,out_d2);
1884  }
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:553

◆ PhysDeriv() [3/3]

void Nektar::MultiRegions::ExpList::PhysDeriv ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d 
)
inline

Definition at line 1889 of file ExpList.h.

References v_PhysDeriv().

1893  {
1894  v_PhysDeriv(dir,inarray,out_d);
1895  }
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:553

◆ PhysDirectionalDeriv()

void Nektar::MultiRegions::ExpList::PhysDirectionalDeriv ( const Array< OneD, const NekDouble > &  direction,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 1909 of file ExpList.h.

References v_PhysDirectionalDeriv().

Referenced by GetNumElmts().

1913  {
1914  v_PhysDirectionalDeriv(direction, inarray, outarray);
1915  }
virtual void v_PhysDirectionalDeriv(const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:697

◆ PhysEvaluate()

NekDouble Nektar::MultiRegions::ExpList::PhysEvaluate ( const Array< OneD, const NekDouble > &  coords,
const Array< OneD, const NekDouble > &  phys 
)

This function return the expansion field value at the coordinates given as input.

Given some coordinates, output the expansion field value at that point

Definition at line 1545 of file ExpList.cpp.

References ASSERTL0, GetCoordim(), GetExpIndex(), m_exp, and m_phys_offset.

Referenced by export_ExpList(), and GetNumElmts().

1548  {
1549  int dim = GetCoordim(0);
1550  ASSERTL0(dim == coords.num_elements(),
1551  "Invalid coordinate dimension.");
1552 
1553  // Grab the element index corresponding to coords.
1554  Array<OneD, NekDouble> xi(dim);
1555  int elmtIdx = GetExpIndex(coords, xi);
1556  ASSERTL0(elmtIdx > 0, "Unable to find element containing point.");
1557 
1558  // Grab that element's physical storage.
1559  Array<OneD, NekDouble> elmtPhys = phys + m_phys_offset[elmtIdx];
1560 
1561  // Evaluate the element at the appropriate point.
1562  return (*m_exp)[elmtIdx]->StdPhysEvaluate(xi, elmtPhys);
1563  }
int GetExpIndex(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false)
Definition: ExpList.cpp:1442
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:2013

◆ PhysGalerkinProjection1DScaled()

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

References GetExpSize(), and v_PhysGalerkinProjection1DScaled().

644  {
645  v_PhysGalerkinProjection1DScaled(scale, inarray, outarray);
646  }
virtual void v_PhysGalerkinProjection1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2079

◆ PhysIntegral() [1/2]

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

References ASSERTL1, m_phys, and m_physState.

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

◆ PhysIntegral() [2/2]

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

References m_phys_offset.

331  {
332  int i;
333  NekDouble sum = 0.0;
334 
335  for(i = 0; i < (*m_exp).size(); ++i)
336  {
337  sum += (*m_exp)[i]->Integral(inarray + m_phys_offset[i]);
338  }
339 
340  return sum;
341  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
double NekDouble

◆ PhysInterp1DScaled()

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

References v_PhysInterp1DScaled().

632  {
633  v_PhysInterp1DScaled(scale, inarray,outarray);
634  }
virtual void v_PhysInterp1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2069

◆ ReadGlobalOptimizationParameters()

void Nektar::MultiRegions::ExpList::ReadGlobalOptimizationParameters ( )
inlineprotected

◆ Reset()

void Nektar::MultiRegions::ExpList::Reset ( )
inline

Reset geometry information and reset matrices.

Definition at line 393 of file ExpList.h.

References v_Reset().

394  {
395  v_Reset();
396  }
virtual void v_Reset()
Reset geometry information, metrics, matrix managers and geometry information.
Definition: ExpList.cpp:1583

◆ SetCoeff()

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

References m_coeffs.

Referenced by WriteVtkPieceData().

2034  {
2035  m_coeffs[i] = val;
2036  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:1052

◆ SetCoeffPhysOffsets()

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 249 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().

250  {
251  int i;
252 
253  // Set up offset information and array sizes
254  m_coeff_offset = Array<OneD,int>(m_exp->size());
255  m_phys_offset = Array<OneD,int>(m_exp->size());
256 
257  m_ncoeffs = m_npoints = 0;
258 
259  for(i = 0; i < m_exp->size(); ++i)
260  {
262  m_phys_offset [i] = m_npoints;
263  m_ncoeffs += (*m_exp)[i]->GetNcoeffs();
264  m_npoints += (*m_exp)[i]->GetTotPoints();
265  }
266  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1101
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:1030

◆ SetCoeffs()

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

References m_coeffs.

Referenced by WriteVtkPieceData().

2044  {
2045  m_coeffs[i] = val;
2046  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:1052

◆ SetCoeffsArray()

void Nektar::MultiRegions::ExpList::SetCoeffsArray ( Array< OneD, NekDouble > &  inarray)
inline

Set the m_coeffs array to inarray.

Definition at line 2049 of file ExpList.h.

References m_coeffs.

Referenced by WriteVtkPieceData().

2050  {
2051  m_coeffs = inarray;
2052  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:1052

◆ SetExpType()

void Nektar::MultiRegions::ExpList::SetExpType ( ExpansionType  Type)

◆ SetHomo1DSpecVanVisc()

void Nektar::MultiRegions::ExpList::SetHomo1DSpecVanVisc ( Array< OneD, NekDouble visc)
inline

This function sets the Spectral Vanishing Viscosity in homogeneous1D expansion.

Definition at line 580 of file ExpList.h.

References v_SetHomo1DSpecVanVisc().

581  {
583  }
virtual void v_SetHomo1DSpecVanVisc(Array< OneD, NekDouble > visc)
Definition: ExpList.h:1534

◆ SetHomoLen()

void Nektar::MultiRegions::ExpList::SetHomoLen ( const NekDouble  lhom)
inline

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

Definition at line 610 of file ExpList.h.

References v_SetHomoLen().

611  {
612  return v_SetHomoLen(lhom);
613  }
virtual void v_SetHomoLen(const NekDouble lhom)
Definition: ExpList.cpp:2045

◆ SetModifiedBasis()

void Nektar::MultiRegions::ExpList::SetModifiedBasis ( const bool  modbasis)
inline

Set Modified Basis for the stability analysis.

◆ SetPhys() [1/2]

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

References m_phys.

1664  {
1665  m_phys[i] = val;
1666  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1069

◆ SetPhys() [2/2]

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

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

1679  {
1680  ASSERTL0(inarray.num_elements() == m_npoints,
1681  "Input array does not have correct number of elements.");
1682 
1683  Vmath::Vcopy(m_npoints,&inarray[0],1,&m_phys[0],1);
1684  m_physState = true;
1685  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1069
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1078
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ SetPhysArray()

void Nektar::MultiRegions::ExpList::SetPhysArray ( Array< OneD, NekDouble > &  inarray)
inline

Sets the array m_phys.

Definition at line 1688 of file ExpList.h.

References m_phys.

1689  {
1690  m_phys = inarray;
1691  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1069

◆ SetPhysState()

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

References m_physState.

Referenced by export_ExpList().

1698  {
1699  m_physState = physState;
1700  }
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1078

◆ SetUpPhysNormals()

void Nektar::MultiRegions::ExpList::SetUpPhysNormals ( )
inline

◆ SetWaveSpace()

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

References m_WaveSpace.

1650  {
1651  m_WaveSpace = wavespace;
1652  }

◆ SmoothField()

void Nektar::MultiRegions::ExpList::SmoothField ( Array< OneD, NekDouble > &  field)
inline

Smooth a field across elements.

Definition at line 1767 of file ExpList.h.

References v_SmoothField().

1768  {
1769  v_SmoothField(field);
1770  }
virtual void v_SmoothField(Array< OneD, NekDouble > &field)
Definition: ExpList.cpp:826

◆ UpdateBndCondExpansion()

std::shared_ptr< ExpList > & Nektar::MultiRegions::ExpList::UpdateBndCondExpansion ( int  i)
inline

Definition at line 2244 of file ExpList.h.

References v_UpdateBndCondExpansion().

Referenced by GetNumElmts().

2245  {
2246  return v_UpdateBndCondExpansion(i);
2247  }
virtual std::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
Definition: ExpList.cpp:2550

◆ UpdateBndConditions()

Array< OneD, SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::UpdateBndConditions ( )
inline

Definition at line 2351 of file ExpList.h.

References v_UpdateBndConditions().

Referenced by GetNumElmts().

2352  {
2353  return v_UpdateBndConditions();
2354  }
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
Definition: ExpList.cpp:3218

◆ UpdateCoeffs()

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

References m_coeffs.

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

2220  {
2221  return m_coeffs;
2222  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:1052

◆ UpdatePhys()

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

References m_phys, and m_physState.

Referenced by GetNumElmts().

2231  {
2232  m_physState = true;
2233  return m_phys;
2234  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1069
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1078

◆ Upwind() [1/2]

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

References v_Upwind().

Referenced by GetNumElmts().

2254  {
2255  v_Upwind(Vec, Fwd, Bwd, Upwind);
2256  }
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:2559

◆ Upwind() [2/2]

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

References v_Upwind().

2263  {
2264  v_Upwind(Vn, Fwd, Bwd, Upwind);
2265  }
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:2559

◆ v_AddFwdBwdTraceIntegral()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by AddFwdBwdTraceIntegral(), and v_GetNumElmts().

2633  {
2634  boost::ignore_unused(Fwd, Bwd, outarray);
2636  "This method is not defined or valid for this class type");
2637  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_AddTraceIntegral() [1/2]

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by AddTraceIntegral(), and v_GetNumElmts().

2614  {
2615  boost::ignore_unused(Fx, Fy, outarray);
2617  "This method is not defined or valid for this class type");
2618  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_AddTraceIntegral() [2/2]

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

2623  {
2624  boost::ignore_unused(Fn, outarray);
2626  "This method is not defined or valid for this class type");
2627  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_AppendFieldData() [1/2]

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

References m_coeffs.

Referenced by AppendFieldData(), and v_GetNumElmts().

2297  {
2298  v_AppendFieldData(fielddef,fielddata,m_coeffs);
2299  }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:1052
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:2296

◆ v_AppendFieldData() [2/2]

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

References m_coeff_offset.

2302  {
2303  int i;
2304  // Determine mapping from element ids to location in
2305  // expansion list
2306  // Determine mapping from element ids to location in
2307  // expansion list
2308  map<int, int> ElmtID_to_ExpID;
2309  for(i = 0; i < (*m_exp).size(); ++i)
2310  {
2311  ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2312  }
2313 
2314  for(i = 0; i < fielddef->m_elementIDs.size(); ++i)
2315  {
2316  int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
2317  int datalen = (*m_exp)[eid]->GetNcoeffs();
2318  fielddata.insert(fielddata.end(),&coeffs[m_coeff_offset[eid]],&coeffs[m_coeff_offset[eid]]+datalen);
2319  }
2320 
2321  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1101

◆ v_BwdTrans()

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

References v_BwdTrans_IterPerExp().

Referenced by BwdTrans(), and v_GetNumElmts().

2904  {
2905  boost::ignore_unused(coeffstate);
2906  v_BwdTrans_IterPerExp(inarray,outarray);
2907  }
virtual void v_BwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1418

◆ v_BwdTrans_IterPerExp()

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

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

Referenced by BwdTrans_IterPerExp(), v_BwdTrans(), and v_GetNumElmts().

1420  {
1421  Array<OneD, NekDouble> tmp;
1422  for (int i = 0; i < m_collections.size(); ++i)
1423  {
1424  m_collections[i].ApplyOperator(Collections::eBwdTrans,
1425  inarray + m_coll_coeff_offset[i],
1426  tmp = outarray + m_coll_phys_offset[i]);
1427  }
1428  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1098
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1095
Collections::CollectionVector m_collections
Definition: ExpList.h:1092

◆ v_ClearGlobalLinSysManager()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by ClearGlobalLinSysManager(), and v_GetNumElmts().

2090  {
2092  "This method is not defined or valid for this class type");
2093  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_CurlCurl()

void Nektar::MultiRegions::ExpList::v_CurlCurl ( Array< OneD, Array< OneD, NekDouble > > &  Vel,
Array< OneD, Array< OneD, NekDouble > > &  Q 
)
protectedvirtual

Definition at line 625 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(), and v_GetNumElmts().

628  {
629  int nq = GetTotPoints();
630  Array<OneD,NekDouble> Vx(nq);
631  Array<OneD,NekDouble> Uy(nq);
632  Array<OneD,NekDouble> Dummy(nq);
633 
634  bool halfMode = false;
635  if ( GetExpType() == e3DH1D)
636  {
637  m_session->MatchSolverInfo("ModeType", "HalfMode",
638  halfMode, false);
639  }
640 
641  switch(GetExpType())
642  {
643  case e2D:
644  {
645  PhysDeriv(xDir, Vel[yDir], Vx);
646  PhysDeriv(yDir, Vel[xDir], Uy);
647 
648 
649  Vmath::Vsub(nq, Vx, 1, Uy, 1, Dummy, 1);
650 
651  PhysDeriv(Dummy,Q[1],Q[0]);
652 
653  Vmath::Smul(nq, -1.0, Q[1], 1, Q[1], 1);
654  }
655  break;
656 
657  case e3D:
658  case e3DH1D:
659  case e3DH2D:
660  {
661  Array<OneD,NekDouble> Vz(nq);
662  Array<OneD,NekDouble> Uz(nq);
663  Array<OneD,NekDouble> Wx(nq);
664  Array<OneD,NekDouble> Wy(nq);
665 
666  PhysDeriv(Vel[xDir], Dummy, Uy, Uz);
667  PhysDeriv(Vel[yDir], Vx, Dummy, Vz);
668  PhysDeriv(Vel[zDir], Wx, Wy, Dummy);
669 
670  Vmath::Vsub(nq, Wy, 1, Vz, 1, Q[0], 1);
671  Vmath::Vsub(nq, Uz, 1, Wx, 1, Q[1], 1);
672  Vmath::Vsub(nq, Vx, 1, Uy, 1, Q[2], 1);
673 
674  PhysDeriv(Q[0], Dummy, Uy, Uz);
675  PhysDeriv(Q[1], Vx, Dummy, Vz);
676  PhysDeriv(Q[2], Wx, Wy, Dummy);
677 
678  // For halfmode, need to change the sign of z derivatives
679  if (halfMode)
680  {
681  Vmath::Neg(nq, Uz, 1);
682  Vmath::Neg(nq, Vz, 1);
683  }
684 
685  Vmath::Vsub(nq, Wy, 1, Vz, 1, Q[0], 1);
686  Vmath::Vsub(nq, Uz, 1, Wx, 1, Q[1], 1);
687  Vmath::Vsub(nq, Vx, 1, Uy, 1, Q[2], 1);
688  }
689  break;
690  default:
691  ASSERTL0(0,"Dimension not supported");
692  break;
693  }
694  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
ExpansionType GetExpType(void)
Returns the type of the expansion.
Definition: ExpList.cpp:271
void PhysDeriv(Direction edir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d)
Definition: ExpList.h:1897
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:216
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:1023
void Neg(int n, T *x, const int incx)
Negate x = -x.
Definition: Vmath.cpp:399
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:346
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1608

◆ v_DealiasedDotProd()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by DealiasedDotProd(), and v_GetNumElmts().

2772  {
2773  boost::ignore_unused(inarray1, inarray2, outarray, coeffstate);
2775  "This method is not defined or valid for this class type");
2776  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_DealiasedProd()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by DealiasedProd(), and v_GetNumElmts().

2761  {
2762  boost::ignore_unused(inarray1, inarray2, outarray, coeffstate);
2764  "This method is not defined or valid for this class type");
2765  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_EvaluateBoundaryConditions()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by EvaluateBoundaryConditions(), and v_GetNumElmts().

3233  {
3234  boost::ignore_unused(time, varName, x2_in, x3_in);
3236  "This method is not defined or valid for this class type");
3237  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_ExtractCoeffsToCoeffs()

void Nektar::MultiRegions::ExpList::v_ExtractCoeffsToCoeffs ( const std::shared_ptr< ExpList > &  fromExpList,
const Array< OneD, const NekDouble > &  fromCoeffs,
Array< OneD, NekDouble > &  toCoeffs 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 2435 of file ExpList.cpp.

References m_coeff_offset.

Referenced by ExtractCoeffsToCoeffs(), and v_GetNumElmts().

2436  {
2437  int i;
2438  int offset = 0;
2439 
2440  for(i = 0; i < (*m_exp).size(); ++i)
2441  {
2442  std::vector<unsigned int> nummodes;
2443  vector<LibUtilities::BasisType> basisTypes;
2444  for(int j= 0; j < fromExpList->GetExp(i)->GetNumBases(); ++j)
2445  {
2446  nummodes.push_back(fromExpList->GetExp(i)->GetBasisNumModes(j));
2447  basisTypes.push_back(fromExpList->GetExp(i)->GetBasisType(j));
2448  }
2449 
2450  (*m_exp)[i]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes,0,
2451  &toCoeffs[m_coeff_offset[i]],
2452  basisTypes);
2453 
2454  offset += fromExpList->GetExp(i)->GetNcoeffs();
2455  }
2456  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1101

◆ v_ExtractDataToCoeffs()

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

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

Referenced by ExtractDataToCoeffs(), and v_GetNumElmts().

2351  {
2352  int i, expId;
2353  int offset = 0;
2354  int modes_offset = 0;
2355  int datalen = fielddata.size()/fielddef->m_fields.size();
2356 
2357  // Find data location according to field definition
2358  for(i = 0; i < fielddef->m_fields.size(); ++i)
2359  {
2360  if(fielddef->m_fields[i] == field)
2361  {
2362  break;
2363  }
2364  offset += datalen;
2365  }
2366 
2367  ASSERTL0(i != fielddef->m_fields.size(),
2368  "Field (" + field + ") not found in file.");
2369 
2370  if (m_elmtToExpId.size() == 0)
2371  {
2372  // Loop in reverse order so that in case where using a
2373  // Homogeneous expansion it sets geometry ids to first part of
2374  // m_exp list. Otherwise will set to second (complex) expansion
2375  for(i = (*m_exp).size()-1; i >= 0; --i)
2376  {
2377  m_elmtToExpId[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2378  }
2379  }
2380 
2381  for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
2382  {
2383  // Reset modes_offset in the case where all expansions of
2384  // the same order.
2385  if (fielddef->m_uniOrder == true)
2386  {
2387  modes_offset = 0;
2388  }
2389 
2391  fielddef->m_shapeType, fielddef->m_numModes, modes_offset);
2392 
2393  const int elmtId = fielddef->m_elementIDs[i];
2394  auto eIt = m_elmtToExpId.find(elmtId);
2395 
2396  if (eIt == m_elmtToExpId.end())
2397  {
2398  offset += datalen;
2399  modes_offset += (*m_exp)[0]->GetNumBases();
2400  continue;
2401  }
2402 
2403  expId = eIt->second;
2404 
2405  bool sameBasis = true;
2406  for (int j = 0; j < fielddef->m_basis.size(); ++j)
2407  {
2408  if (fielddef->m_basis[j] != (*m_exp)[expId]->GetBasisType(j))
2409  {
2410  sameBasis = false;
2411  break;
2412  }
2413  }
2414 
2415  if (datalen == (*m_exp)[expId]->GetNcoeffs() && sameBasis)
2416  {
2417  Vmath::Vcopy(datalen, &fielddata[offset], 1,
2418  &coeffs[m_coeff_offset[expId]], 1);
2419  }
2420  else
2421  {
2422  (*m_exp)[expId]->ExtractDataToCoeffs(
2423  &fielddata[offset], fielddef->m_numModes,
2424  modes_offset, &coeffs[m_coeff_offset[expId]],
2425  fielddef->m_basis);
2426  }
2427 
2428  offset += datalen;
2429  modes_offset += (*m_exp)[0]->GetNumBases();
2430  }
2431 
2432  return;
2433  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
int GetNumberOfCoefficients(ShapeType shape, std::vector< unsigned int > &modes, int offset)
Definition: ShapeType.hpp:313
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1101
std::unordered_map< int, int > m_elmtToExpId
Mapping from geometry ID of element to index inside m_exp.
Definition: ExpList.h:1116
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ v_ExtractElmtToBndPhys()

void Nektar::MultiRegions::ExpList::v_ExtractElmtToBndPhys ( const int  i,
const Array< OneD, NekDouble > &  elmt,
Array< OneD, NekDouble > &  boundary 
)
protectedvirtual

Definition at line 3026 of file ExpList.cpp.

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

Referenced by ExtractElmtToBndPhys(), and v_GetNumElmts().

3029  {
3030  int n, cnt;
3031  Array<OneD, NekDouble> tmp1, tmp2;
3033 
3034  Array<OneD, int> ElmtID,EdgeID;
3035  GetBoundaryToElmtMap(ElmtID,EdgeID);
3036 
3037  // Initialise result
3038  boundary = Array<OneD, NekDouble>
3039  (GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
3040 
3041  // Skip other boundary regions
3042  for (cnt = n = 0; n < i; ++n)
3043  {
3044  cnt += GetBndCondExpansions()[n]->GetExpSize();
3045  }
3046 
3047  int offsetBnd;
3048  int offsetElmt = 0;
3049  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
3050  {
3051  offsetBnd = GetBndCondExpansions()[i]->GetPhys_Offset(n);
3052 
3053  elmt = GetExp(ElmtID[cnt+n]);
3054  elmt->GetTracePhysVals(EdgeID[cnt+n],
3055  GetBndCondExpansions()[i]->GetExp(n),
3056  tmp1 = element + offsetElmt,
3057  tmp2 = boundary + offsetBnd);
3058 
3059  offsetElmt += elmt->GetTotPoints();
3060  }
3061  }
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2409
const std::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2191
const Array< OneD, const std::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:2239
std::shared_ptr< Expansion > ExpansionSharedPtr
Definition: Expansion.h:65

◆ v_ExtractPhysToBnd()

void Nektar::MultiRegions::ExpList::v_ExtractPhysToBnd ( const int  i,
const Array< OneD, const NekDouble > &  phys,
Array< OneD, NekDouble > &  bnd 
)
protectedvirtual

Definition at line 3105 of file ExpList.cpp.

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

Referenced by ExtractPhysToBnd(), and v_GetNumElmts().

3108  {
3109  int n, cnt;
3110  Array<OneD, NekDouble> tmp1;
3112 
3113  Array<OneD, int> ElmtID,EdgeID;
3114  GetBoundaryToElmtMap(ElmtID,EdgeID);
3115 
3116  // Initialise result
3117  bnd = Array<OneD, NekDouble>
3118  (GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
3119 
3120  // Skip other boundary regions
3121  for (cnt = n = 0; n < i; ++n)
3122  {
3123  cnt += GetBndCondExpansions()[n]->GetExpSize();
3124  }
3125 
3126  int offsetBnd;
3127  int offsetPhys;
3128  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
3129  {
3130  offsetPhys = GetPhys_Offset(ElmtID[cnt+n]);
3131  offsetBnd = GetBndCondExpansions()[i]->GetPhys_Offset(n);
3132 
3133  elmt = GetExp(ElmtID[cnt+n]);
3134  elmt->GetTracePhysVals(EdgeID[cnt+n],
3135  GetBndCondExpansions()[i]->GetExp(n),
3136  phys + offsetPhys,
3137  tmp1 = bnd + offsetBnd);
3138  }
3139  }
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2409
const std::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2191
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
const Array< OneD, const std::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:2239
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:2208

◆ v_ExtractPhysToBndElmt()

void Nektar::MultiRegions::ExpList::v_ExtractPhysToBndElmt ( const int  i,
const Array< OneD, const NekDouble > &  phys,
Array< OneD, NekDouble > &  bndElmt 
)
protectedvirtual

Definition at line 3065 of file ExpList.cpp.

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

Referenced by ExtractPhysToBndElmt(), and v_GetNumElmts().

3068  {
3069  int n, cnt, nq;
3070 
3071  Array<OneD, int> ElmtID,EdgeID;
3072  GetBoundaryToElmtMap(ElmtID,EdgeID);
3073 
3074  // Skip other boundary regions
3075  for (cnt = n = 0; n < i; ++n)
3076  {
3077  cnt += GetBndCondExpansions()[n]->GetExpSize();
3078  }
3079 
3080  // Count number of points
3081  int npoints = 0;
3082  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
3083  {
3084  npoints += GetExp(ElmtID[cnt+n])->GetTotPoints();
3085  }
3086 
3087  // Initialise result
3088  bndElmt = Array<OneD, NekDouble> (npoints, 0.0);
3089 
3090  // Extract data
3091  int offsetPhys;
3092  int offsetElmt = 0;
3093  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
3094  {
3095  nq = GetExp(ElmtID[cnt+n])->GetTotPoints();
3096  offsetPhys = GetPhys_Offset(ElmtID[cnt+n]);
3097  Vmath::Vcopy(nq, &phys[offsetPhys], 1,
3098  &bndElmt[offsetElmt], 1);
3099  offsetElmt += nq;
3100  }
3101  }
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2409
const std::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2191
const Array< OneD, const std::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:2239
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:2208
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ v_ExtractTracePhys() [1/2]

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by ExtractTracePhys(), and v_GetNumElmts().

2667  {
2668  boost::ignore_unused(outarray);
2670  "This method is not defined or valid for this class type");
2671  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_ExtractTracePhys() [2/2]

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

2676  {
2677  boost::ignore_unused(inarray, outarray);
2679  "This method is not defined or valid for this class type");
2680  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_FillBndCondFromField() [1/2]

void Nektar::MultiRegions::ExpList::v_FillBndCondFromField ( void  )
protectedvirtual

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

Definition at line 2852 of file ExpList.cpp.

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by FillBndCondFromField(), and v_GetNumElmts().

2853  {
2855  "This method is not defined or valid for this class type");
2856  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_FillBndCondFromField() [2/2]

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

2861  {
2862  boost::ignore_unused(nreg);
2864  "This method is not defined or valid for this class type");
2865  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_FwdTrans()

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

References v_FwdTrans_IterPerExp().

Referenced by FwdTrans(), and v_GetNumElmts().

2912  {
2913  boost::ignore_unused(coeffstate);
2914  v_FwdTrans_IterPerExp(inarray,outarray);
2915  }
virtual void v_FwdTrans_IterPerExp(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:794

◆ v_FwdTrans_BndConstrained()

void Nektar::MultiRegions::ExpList::v_FwdTrans_BndConstrained ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 804 of file ExpList.cpp.

References m_coeff_offset, and m_phys_offset.

Referenced by FwdTrans_BndConstrained(), and v_GetNumElmts().

807  {
808  int i;
809 
810  Array<OneD,NekDouble> e_outarray;
811 
812  for(i= 0; i < (*m_exp).size(); ++i)
813  {
814  (*m_exp)[i]->FwdTrans_BndConstrained(inarray+m_phys_offset[i],
815  e_outarray = outarray+m_coeff_offset[i]);
816  }
817  }
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1101
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104

◆ v_FwdTrans_IterPerExp()

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

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

Referenced by FwdTrans_IterPerExp(), v_FwdTrans(), and v_GetNumElmts().

796  {
797  Array<OneD,NekDouble> f(m_ncoeffs);
798 
799  IProductWRTBase_IterPerExp(inarray,f);
800  MultiplyByElmtInvMass(f,outarray);
801 
802  }
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:755
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:1725
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:1030

◆ v_GeneralMatrixOp()

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

References GeneralMatrixOp_IterPerExp().

Referenced by GeneralMatrixOp(), and v_GetNumElmts().

2938  {
2939  boost::ignore_unused(coeffstate);
2940  GeneralMatrixOp_IterPerExp(gkey,inarray,outarray);
2941  }
void GeneralMatrixOp_IterPerExp(const GlobalMatrixKey &gkey, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1019

◆ v_GetBCValues()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by GetBCValues(), and v_GetNumElmts().

2781  {
2782  boost::ignore_unused(BndVals, TotField, BndID);
2784  "This method is not defined or valid for this class type");
2785  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_GetBndCondExpansions()

const Array< OneD, const std::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 2542 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBndCondExpansions(), and v_GetNumElmts().

2543  {
2544  ASSERTL0(false,
2545  "This method is not defined or valid for this class type");
2546  static Array<OneD,const std::shared_ptr<ExpList> > result;
2547  return result;
2548  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216

◆ v_GetBndConditions()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by GetBndConditions(), and v_GetNumElmts().

3208  {
3210  "This method is not defined or valid for this class type");
3211  static Array<OneD, const SpatialDomains::BoundaryConditionShPtr>
3212  result;
3213  return result;
3214  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_GetBndElmtExpansion()

void Nektar::MultiRegions::ExpList::v_GetBndElmtExpansion ( int  i,
std::shared_ptr< ExpList > &  result,
const bool  DeclareCoeffPhysArrays 
)
protectedvirtual

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

Definition at line 3015 of file ExpList.cpp.

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by GetBndElmtExpansion(), and v_GetNumElmts().

3018  {
3019  boost::ignore_unused(i, result, DeclareCoeffPhysArrays);
3021  "This method is not defined or valid for this class type");
3022  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_GetBoundaryNormals()

void Nektar::MultiRegions::ExpList::v_GetBoundaryNormals ( int  i,
Array< OneD, Array< OneD, NekDouble > > &  normals 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D.

Definition at line 3143 of file ExpList.cpp.

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

Referenced by GetBoundaryNormals(), and v_GetNumElmts().

3145  {
3146  int j, n, cnt, nq;
3147  int coordim = GetCoordim(0);
3148  Array<OneD, NekDouble> tmp;
3150 
3151  Array<OneD, int> ElmtID,EdgeID;
3152  GetBoundaryToElmtMap(ElmtID,EdgeID);
3153 
3154  // Initialise result
3155  normals = Array<OneD, Array<OneD, NekDouble> > (coordim);
3156  for (j = 0; j < coordim; ++j)
3157  {
3158  normals[j] = Array<OneD, NekDouble> (
3159  GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
3160  }
3161 
3162  // Skip other boundary regions
3163  for (cnt = n = 0; n < i; ++n)
3164  {
3165  cnt += GetBndCondExpansions()[n]->GetExpSize();
3166  }
3167 
3168  int offset;
3169  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
3170  {
3171  offset = GetBndCondExpansions()[i]->GetPhys_Offset(n);
3172  nq = GetBndCondExpansions()[i]->GetExp(n)->GetTotPoints();
3173 
3174  elmt = GetExp(ElmtID[cnt+n]);
3175  const Array<OneD, const Array<OneD, NekDouble> > normalsElmt
3176  = elmt->GetSurfaceNormal(EdgeID[cnt+n]);
3177  // Copy to result
3178  for (j = 0; j < coordim; ++j)
3179  {
3180  Vmath::Vcopy(nq, normalsElmt[j], 1,
3181  tmp = normals[j] + offset, 1);
3182  }
3183  }
3184  }
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2409
const std::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2191
const Array< OneD, const std::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:2239
std::shared_ptr< Expansion > ExpansionSharedPtr
Definition: Expansion.h:65
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:2013
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ v_GetBoundaryToElmtMap()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by GetBoundaryToElmtMap(), and v_GetNumElmts().

3190  {
3191  boost::ignore_unused(ElmtID, EdgeID);
3193  "This method is not defined or valid for this class type");
3194  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_GetCoords()

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

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

Referenced by GetCoords(), and v_GetNumElmts().

2957  {
2958  if (GetNumElmts() == 0)
2959  {
2960  return;
2961  }
2962 
2963  int i;
2964  Array<OneD, NekDouble> e_coord_0;
2965  Array<OneD, NekDouble> e_coord_1;
2966  Array<OneD, NekDouble> e_coord_2;
2967 
2968  switch(GetExp(0)->GetCoordim())
2969  {
2970  case 1:
2971  for(i= 0; i < (*m_exp).size(); ++i)
2972  {
2973  e_coord_0 = coord_0 + m_phys_offset[i];
2974  (*m_exp)[i]->GetCoords(e_coord_0);
2975  }
2976  break;
2977  case 2:
2978  ASSERTL0(coord_1.num_elements() != 0,
2979  "output coord_1 is not defined");
2980 
2981  for(i= 0; i < (*m_exp).size(); ++i)
2982  {
2983  e_coord_0 = coord_0 + m_phys_offset[i];
2984  e_coord_1 = coord_1 + m_phys_offset[i];
2985  (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1);
2986  }
2987  break;
2988  case 3:
2989  ASSERTL0(coord_1.num_elements() != 0,
2990  "output coord_1 is not defined");
2991  ASSERTL0(coord_2.num_elements() != 0,
2992  "output coord_2 is not defined");
2993 
2994  for(i= 0; i < (*m_exp).size(); ++i)
2995  {
2996  e_coord_0 = coord_0 + m_phys_offset[i];
2997  e_coord_1 = coord_1 + m_phys_offset[i];
2998  e_coord_2 = coord_2 + m_phys_offset[i];
2999  (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1,e_coord_2);
3000  }
3001  break;
3002  }
3003  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
const std::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2191
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Definition: ExpList.h:655
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:2013

◆ v_GetFieldDefinitions() [1/2]

std::vector< LibUtilities::FieldDefinitionsSharedPtr > Nektar::MultiRegions::ExpList::v_GetFieldDefinitions ( void  )
protectedvirtual

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

Definition at line 2282 of file ExpList.cpp.

Referenced by GetFieldDefinitions(), and v_GetNumElmts().

2283  {
2284  std::vector<LibUtilities::FieldDefinitionsSharedPtr> returnval;
2285  v_GetFieldDefinitions(returnval);
2286  return returnval;
2287  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2282

◆ v_GetFieldDefinitions() [2/2]

void Nektar::MultiRegions::ExpList::v_GetFieldDefinitions ( std::vector< LibUtilities::FieldDefinitionsSharedPtr > &  fielddef)
protectedvirtual

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

Definition at line 2289 of file ExpList.cpp.

References GeneralGetFieldDefinitions().

2290  {
2291  GeneralGetFieldDefinitions(fielddef);
2292  }
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:2174

◆ v_GetFwdBwdTracePhys() [1/2]

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by GetFwdBwdTracePhys(), and v_GetNumElmts().

2641  {
2642  boost::ignore_unused(Fwd, Bwd);
2644  "This method is not defined or valid for this class type");
2645  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_GetFwdBwdTracePhys() [2/2]

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

2651  {
2652  boost::ignore_unused(field, Fwd, Bwd);
2654  "This method is not defined or valid for this class type");
2655  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_GetHomogeneousBasis()

virtual LibUtilities::BasisSharedPtr Nektar::MultiRegions::ExpList::v_GetHomogeneousBasis ( void  )
inlineprivatevirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1526 of file ExpList.h.

References Nektar::ErrorUtil::efatal, NEKERROR, and Nektar::LibUtilities::NullBasisSharedPtr.

Referenced by GetHomogeneousBasis().

1527  {
1529  "This method is not defined or valid for this class type");
1531  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209
static BasisSharedPtr NullBasisSharedPtr
Definition: Basis.h:365

◆ v_GetHomoLen()

NekDouble Nektar::MultiRegions::ExpList::v_GetHomoLen ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 2037 of file ExpList.cpp.

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by GetHomoLen(), and v_GetNumElmts().

2038  {
2040  "This method is not defined or valid for this class type");
2041  NekDouble len = 0.0;
2042  return len;
2043  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209
double NekDouble

◆ v_GetLeftAdjacentFaces()

const vector< bool > & Nektar::MultiRegions::ExpList::v_GetLeftAdjacentFaces ( void  ) const
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3D.

Definition at line 2657 of file ExpList.cpp.

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by GetLeftAdjacentFaces(), and v_GetNumElmts().

2658  {
2660  "This method is not defined or valid for this class type");
2661  static vector<bool> tmp;
2662  return tmp;
2663  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_GetMovingFrames()

void Nektar::MultiRegions::ExpList::v_GetMovingFrames ( const SpatialDomains::GeomMMF  MMFdir,
const Array< OneD, const NekDouble > &  CircCentre,
Array< OneD, Array< OneD, NekDouble > > &  outarray 
)
protectedvirtual

Definition at line 2459 of file ExpList.cpp.

References m_exp, m_phys_offset, and Vmath::Vcopy().

Referenced by GetMovingFrames(), and v_GetNumElmts().

2463  {
2464  int npts;
2465 
2466  int MFdim = 3;
2467  int nq = outarray[0].num_elements()/MFdim;
2468 
2469  // Assume whole array is of same coordinate dimension
2470  int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
2471 
2472  Array<OneD, Array<OneD, NekDouble> > MFloc(MFdim*coordim);
2473  // Process each expansion.
2474  for(int i = 0; i < m_exp->size(); ++i)
2475  {
2476  npts = (*m_exp)[i]->GetTotPoints();
2477 
2478  for (int j=0; j< MFdim*coordim; ++j)
2479  {
2480  MFloc[j] = Array<OneD, NekDouble>(npts, 0.0);
2481  }
2482 
2483  // MF from LOCALREGIONS
2484  (*m_exp)[i]->GetMetricInfo()->GetMovingFrames(
2485  (*m_exp)[i]->GetPointsKeys(),
2486  MMFdir,
2487  CircCentre,
2488  MFloc );
2489 
2490  // Get the physical data offset for this expansion.
2491  for (int j = 0; j < MFdim; ++j)
2492  {
2493  for (int k = 0; k < coordim; ++k)
2494  {
2495  Vmath::Vcopy(npts,
2496  &MFloc[j*coordim+k][0], 1,
2497  &outarray[j][k*nq+m_phys_offset[i]], 1);
2498  }
2499  }
2500  }
2501 
2502  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ v_GetNormals()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by GetNormals(), and v_GetNumElmts().

2604  {
2605  boost::ignore_unused(normals);
2607  "This method is not defined or valid for this class type");
2608  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_GetNumElmts()

virtual int Nektar::MultiRegions::ExpList::v_GetNumElmts ( void  )
inlineprotectedvirtual

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

Definition at line 1164 of file ExpList.h.

References Nektar::MultiRegions::eLocal, ExtractFileBCs(), GetBoundaryCondition(), Nektar::NekConstants::kNekUnsetDouble, MULTI_REGIONS_EXPORT, Nektar::NullNekDouble1DArray, v_AddFwdBwdTraceIntegral(), v_AddTraceIntegral(), v_AppendFieldData(), v_BwdTrans(), v_BwdTrans_IterPerExp(), v_ClearGlobalLinSysManager(), v_CurlCurl(), v_DealiasedDotProd(), v_DealiasedProd(), v_EvaluateBoundaryConditions(), v_ExtractCoeffsToCoeffs(), v_ExtractDataToCoeffs(), v_ExtractElmtToBndPhys(), v_ExtractPhysToBnd(), v_ExtractPhysToBndElmt(), v_ExtractTracePhys(), v_FillBndCondFromField(), v_FwdTrans(), v_FwdTrans_BndConstrained(), v_FwdTrans_IterPerExp(), v_GeneralMatrixOp(), v_GetBCValues(), v_GetBndCondExpansions(), v_GetBndConditions(), v_GetBndElmtExpansion(), v_GetBoundaryNormals(), v_GetBoundaryToElmtMap(), v_GetCoords(), v_GetFieldDefinitions(), v_GetFwdBwdTracePhys(), v_GetHomoLen(), v_GetLeftAdjacentFaces(), v_GetMovingFrames(), v_GetNormals(), v_GetPeriodicEntities(), v_GetRobinBCInfo(), v_GetTrace(), v_GetTraceBndMap(), v_GetTraceMap(), v_GetTransposition(), v_GetYIDs(), v_GetZIDs(), v_GlobalToLocal(), v_HelmSolve(), v_HomogeneousBwdTrans(), v_HomogeneousEnergy(), v_HomogeneousFwdTrans(), v_ImposeDirichletConditions(), v_Integral(), v_IProductWRTBase(), v_IProductWRTBase_IterPerExp(), v_L2(), v_LinearAdvectionDiffusionReactionSolve(), v_LinearAdvectionReactionSolve(), v_LocalToGlobal(), v_MultiplyByInvMassMatrix(), v_NormVectorIProductWRTBase(), v_PhysDeriv(), v_PhysDirectionalDeriv(), v_PhysGalerkinProjection1DScaled(), v_PhysInterp1DScaled(), v_ReadGlobalOptimizationParameters(), v_Reset(), v_SetHomoLen(), v_SetUpPhysNormals(), v_SmoothField(), v_UpdateBndCondExpansion(), v_UpdateBndConditions(), v_Upwind(), v_VectorFlux(), v_WriteTecplotConnectivity(), v_WriteTecplotField(), v_WriteTecplotHeader(), v_WriteTecplotZone(), v_WriteVtkPieceData(), and v_WriteVtkPieceHeader().

Referenced by GetNumElmts().

1165  {
1166  return (*m_exp).size();
1167  }

◆ v_GetPeriodicEntities()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by GetPeriodicEntities(), and v_GetNumElmts().

3255  {
3256  boost::ignore_unused(periodicVerts, periodicEdges, periodicFaces);
3258  "This method is not defined or valid for this class type");
3259  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_GetPlane()

ExpListSharedPtr & Nektar::MultiRegions::ExpList::v_GetPlane ( int  n)
privatevirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 3283 of file ExpList.cpp.

References Nektar::ErrorUtil::efatal, NEKERROR, and Nektar::MultiRegions::NullExpListSharedPtr.

Referenced by GetPlane(), and v_SetHomo1DSpecVanVisc().

3284  {
3285  boost::ignore_unused(n);
3287  "This method is not defined or valid for this class type");
3288  return NullExpListSharedPtr;
3289  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209
static ExpListSharedPtr NullExpListSharedPtr
Definition: ExpList.h:1550

◆ v_GetRobinBCInfo()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by GetRobinBCInfo(), and v_GetNumElmts().

3242  {
3244  "This method is not defined or valid for this class type");
3245  static map<int,RobinBCInfoSharedPtr> result;
3246  return result;
3247  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_GetTrace()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by GetTrace(), and v_GetNumElmts().

2582  {
2584  "This method is not defined or valid for this class type");
2585  static std::shared_ptr<ExpList> returnVal;
2586  return returnVal;
2587  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_GetTraceBndMap()

const Array< OneD, const int > & Nektar::MultiRegions::ExpList::v_GetTraceBndMap ( )
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D.

Definition at line 2597 of file ExpList.cpp.

References GetTraceMap().

Referenced by GetTraceBndMap(), and v_GetNumElmts().

2598  {
2599  return GetTraceMap()->GetBndCondTraceToGlobalTraceMap();
2600  }
std::shared_ptr< AssemblyMapDG > & GetTraceMap(void)
Definition: ExpList.h:2272

◆ v_GetTraceMap()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by GetTraceMap(), and v_GetNumElmts().

2590  {
2592  "This method is not defined or valid for this class type");
2593  static std::shared_ptr<AssemblyMapDG> result;
2594  return result;
2595  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_GetTransposition()

LibUtilities::TranspositionSharedPtr Nektar::MultiRegions::ExpList::v_GetTransposition ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 2029 of file ExpList.cpp.

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by GetTransposition(), and v_GetNumElmts().

2030  {
2032  "This method is not defined or valid for this class type");
2034  return trans;
2035  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209
std::shared_ptr< Transposition > TranspositionSharedPtr

◆ v_GetYIDs()

Array< OneD, const unsigned int > Nektar::MultiRegions::ExpList::v_GetYIDs ( void  )
protectedvirtual

Definition at line 2060 of file ExpList.cpp.

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by GetYIDs(), and v_GetNumElmts().

2061  {
2063  "This method is not defined or valid for this class type");
2064  Array<OneD, unsigned int> NoModes(1);
2065  return NoModes;
2066  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_GetZIDs()

Array< OneD, const unsigned int > Nektar::MultiRegions::ExpList::v_GetZIDs ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 2052 of file ExpList.cpp.

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by GetZIDs(), and v_GetNumElmts().

2053  {
2055  "This method is not defined or valid for this class type");
2056  Array<OneD, unsigned int> NoModes(1);
2057  return NoModes;
2058  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_GlobalToLocal() [1/2]

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by GlobalToLocal(), and v_GetNumElmts().

2886  {
2888  "This method is not defined or valid for this class type");
2889  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_GlobalToLocal() [2/2]

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

2894  {
2895  boost::ignore_unused(inarray, outarray);
2897  "This method is not defined or valid for this class type");
2898  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_HelmSolve()

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 MultiRegions::VarFactorsMap varfactors,
const Array< OneD, const NekDouble > &  dirForcing,
const bool  PhysSpaceForcing 
)
protectedvirtual

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

Definition at line 2692 of file ExpList.cpp.

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by HelmSolve(), and v_GetNumElmts().

2701  {
2702  boost::ignore_unused(inarray, outarray, flags, factors, varcoeff,
2703  varfactors, dirForcing, PhysSpaceForcing);
2704  NEKERROR(ErrorUtil::efatal, "HelmSolve not implemented.");
2705  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_HomogeneousBwdTrans()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by HomogeneousBwdTrans(), and v_GetNumElmts().

2751  {
2752  boost::ignore_unused(inarray, outarray, coeffstate, Shuff, UnShuff);
2754  "This method is not defined or valid for this class type");
2755  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_HomogeneousEnergy()

Array< OneD, const NekDouble > Nektar::MultiRegions::ExpList::v_HomogeneousEnergy ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpList3DHomogeneous1D.

Definition at line 2021 of file ExpList.cpp.

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by HomogeneousEnergy(), and v_GetNumElmts().

2022  {
2024  "This method is not defined or valid for this class type");
2025  Array<OneD, NekDouble> NoEnergy(1,0.0);
2026  return NoEnergy;
2027  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_HomogeneousFwdTrans()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by HomogeneousFwdTrans(), and v_GetNumElmts().

2740  {
2741  boost::ignore_unused(inarray, outarray, coeffstate, Shuff, UnShuff);
2743  "This method is not defined or valid for this class type");
2744  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_ImposeDirichletConditions()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by ImposeDirichletConditions(), and v_GetNumElmts().

2844  {
2845  boost::ignore_unused(outarray);
2847  "This method is not defined or valid for this class type");
2848  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_Integral()

NekDouble Nektar::MultiRegions::ExpList::v_Integral ( const Array< OneD, const NekDouble > &  inarray)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpList2DHomogeneous1D.

Definition at line 1988 of file ExpList.cpp.

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

Referenced by Integral(), and v_GetNumElmts().

1989  {
1990  NekDouble err = 0.0;
1991  int i = 0;
1992 
1993  for (i = 0; i < (*m_exp).size(); ++i)
1994  {
1995  err += (*m_exp)[i]->Integral(inarray + m_phys_offset[i]);
1996  }
1997  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
1998 
1999  return err;
2000  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:1020

◆ v_IProductWRTBase()

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

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

Referenced by IProductWRTBase(), and v_GetNumElmts().

2921  {
2922  boost::ignore_unused(coeffstate);
2923  Array<OneD,NekDouble> tmp;
2924  for (int i = 0; i < m_collections.size(); ++i)
2925  {
2926 
2928  inarray + m_coll_phys_offset[i],
2929  tmp = outarray + m_coll_coeff_offset[i]);
2930  }
2931  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1098
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1095
Collections::CollectionVector m_collections
Definition: ExpList.h:1092

◆ v_IProductWRTBase_IterPerExp()

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

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

Referenced by IProductWRTBase_IterPerExp(), and v_GetNumElmts().

385  {
386  Array<OneD,NekDouble> tmp;
387  for (int i = 0; i < m_collections.size(); ++i)
388  {
389 
391  inarray + m_coll_phys_offset[i],
392  tmp = outarray + m_coll_coeff_offset[i]);
393  }
394  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1098
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1095
Collections::CollectionVector m_collections
Definition: ExpList.h:1092

◆ v_L2()

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

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

Referenced by L2(), and v_GetNumElmts().

1961  {
1962  NekDouble err = 0.0, errl2;
1963  int i;
1964 
1965  if (soln == NullNekDouble1DArray)
1966  {
1967  for (i = 0; i < (*m_exp).size(); ++i)
1968  {
1969  errl2 = (*m_exp)[i]->L2(inarray + m_phys_offset[i]);
1970  err += errl2*errl2;
1971  }
1972  }
1973  else
1974  {
1975  for (i = 0; i < (*m_exp).size(); ++i)
1976  {
1977  errl2 = (*m_exp)[i]->L2(inarray + m_phys_offset[i],
1978  soln + m_phys_offset[i]);
1979  err += errl2*errl2;
1980  }
1981  }
1982 
1983  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
1984 
1985  return sqrt(err);
1986  }
static Array< OneD, NekDouble > NullNekDouble1DArray
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
double NekDouble
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:1020

◆ v_LinearAdvectionDiffusionReactionSolve()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by LinearAdvectionDiffusionReactionSolve(), and v_GetNumElmts().

2714  {
2715  boost::ignore_unused(velocity, inarray, outarray, lambda,
2716  coeffstate, dirForcing);
2718  "This method is not defined or valid for this class type");
2719  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_LinearAdvectionReactionSolve()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by LinearAdvectionReactionSolve(), and v_GetNumElmts().

2728  {
2729  boost::ignore_unused(velocity, inarray, outarray, lambda,
2730  coeffstate, dirForcing);
2732  "This method is not defined or valid for this class type");
2733  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_LocalToGlobal() [1/2]

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by LocalToGlobal(), and v_GetNumElmts().

2868  {
2869  boost::ignore_unused(useComm);
2871  "This method is not defined or valid for this class type");
2872  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_LocalToGlobal() [2/2]

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

2878  {
2879  boost::ignore_unused(inarray, outarray, useComm);
2881  "This method is not defined or valid for this class type");
2882  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_MultiplyByInvMassMatrix()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by MultiplyByInvMassMatrix(), and v_GetNumElmts().

2686  {
2687  boost::ignore_unused(inarray, outarray, coeffstate);
2689  "This method is not defined or valid for this class type");
2690  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_NormVectorIProductWRTBase() [1/2]

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by NormVectorIProductWRTBase(), and v_GetNumElmts().

2791  {
2792  boost::ignore_unused(V1, V2, outarray, BndID);
2794  "This method is not defined or valid for this class type");
2795  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_NormVectorIProductWRTBase() [2/2]

void Nektar::MultiRegions::ExpList::v_NormVectorIProductWRTBase ( Array< OneD, Array< OneD, NekDouble > > &  V,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Definition at line 2797 of file ExpList.cpp.

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

2800  {
2801  Array< OneD, NekDouble> tmp;
2802  switch (GetCoordim(0))
2803  {
2804  case 1:
2805  {
2806  for(int i = 0; i < GetExpSize(); ++i)
2807  {
2808  (*m_exp)[i]->NormVectorIProductWRTBase(
2809  V[0] + GetPhys_Offset(i),
2810  tmp = outarray + GetCoeff_Offset(i));
2811  }
2812  }
2813  break;
2814  case 2:
2815  {
2816  for(int i = 0; i < GetExpSize(); ++i)
2817  {
2818  (*m_exp)[i]->NormVectorIProductWRTBase(
2819  V[0] + GetPhys_Offset(i),
2820  V[1] + GetPhys_Offset(i),
2821  tmp = outarray + GetCoeff_Offset(i));
2822  }
2823  }
2824  break;
2825  case 3:
2826  {
2827  for(int i = 0; i < GetExpSize(); ++i)
2828  {
2829  (*m_exp)[i]->NormVectorIProductWRTBase(
2830  V[0] + GetPhys_Offset(i),
2831  V[1] + GetPhys_Offset(i),
2832  V[2] + GetPhys_Offset(i),
2833  tmp = outarray + GetCoeff_Offset(i));
2834  }
2835  }
2836  break;
2837  default:
2838  ASSERTL0(false,"Dimension not supported");
2839  break;
2840  }
2841  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
int GetExpSize(void)
This function returns the number of elements in the expansion.
Definition: ExpList.h:2170
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:2013
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:2200
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:2208

◆ v_PhysDeriv() [1/3]

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

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

Referenced by PhysDeriv(), v_GetNumElmts(), and v_PhysDeriv().

557  {
558  Array<OneD, NekDouble> e_out_d0;
559  Array<OneD, NekDouble> e_out_d1;
560  Array<OneD, NekDouble> e_out_d2;
561  int offset;
562  for (int i = 0; i < m_collections.size(); ++i)
563  {
564  offset = m_coll_phys_offset[i];
565  e_out_d0 = out_d0 + offset;
566  e_out_d1 = out_d1 + offset;
567  e_out_d2 = out_d2 + offset;
568 
569  m_collections[i].ApplyOperator(Collections::ePhysDeriv,
570  inarray + offset,
571  e_out_d0,e_out_d1, e_out_d2);
572 
573  }
574  }
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1098
Collections::CollectionVector m_collections
Definition: ExpList.h:1092

◆ v_PhysDeriv() [2/3]

void Nektar::MultiRegions::ExpList::v_PhysDeriv ( const int  dir,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  out_d 
)
protectedvirtual

Definition at line 576 of file ExpList.cpp.

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

579  {
580  Direction edir = DirCartesianMap[dir];
581  v_PhysDeriv(edir, inarray,out_d);
582  }
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:553
MultiRegions::Direction const DirCartesianMap[]
Definition: ExpList.h:88

◆ v_PhysDeriv() [3/3]

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

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

586  {
587  int i;
588  if(edir==MultiRegions::eS)
589  {
590  Array<OneD, NekDouble> e_out_ds;
591  for(i=0; i<(*m_exp).size(); ++i)
592  {
593  e_out_ds = out_d + m_phys_offset[i];
594  (*m_exp)[i]->PhysDeriv_s(inarray+m_phys_offset[i],e_out_ds);
595  }
596  }
597  else if(edir==MultiRegions::eN)
598  {
599  Array<OneD, NekDouble > e_out_dn;
600  for(i=0; i<(*m_exp).size(); i++)
601  {
602  e_out_dn = out_d +m_phys_offset[i];
603  (*m_exp)[i]->PhysDeriv_n(inarray+m_phys_offset[i],e_out_dn);
604  }
605  }
606  else
607  {
608  // convert enum into int
609  int intdir= (int)edir;
610  Array<OneD, NekDouble> e_out_d;
611  int offset;
612  for (int i = 0; i < m_collections.size(); ++i)
613  {
614  offset = m_coll_phys_offset[i];
615  e_out_d = out_d + offset;
616 
617  m_collections[i].ApplyOperator(Collections::ePhysDeriv,
618  intdir,
619  inarray + offset,
620  e_out_d);
621  }
622  }
623  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1098
Collections::CollectionVector m_collections
Definition: ExpList.h:1092

◆ v_PhysDirectionalDeriv()

void Nektar::MultiRegions::ExpList::v_PhysDirectionalDeriv ( const Array< OneD, const NekDouble > &  direction,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Definition at line 697 of file ExpList.cpp.

References m_phys_offset, and Vmath::Vcopy().

Referenced by PhysDirectionalDeriv(), and v_GetNumElmts().

701  {
702  int npts_e;
703  int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
704  int nq = direction.num_elements() / coordim;
705 
706  Array<OneD, NekDouble> e_outarray;
707  Array<OneD, NekDouble> e_MFdiv;
708  Array<OneD, NekDouble> locdir;
709 
710  for(int i = 0; i < (*m_exp).size(); ++i)
711  {
712  npts_e = (*m_exp)[i]->GetTotPoints();
713  locdir = Array<OneD, NekDouble>(npts_e*coordim);
714 
715  for (int k = 0; k<coordim; ++k)
716  {
717  Vmath::Vcopy(npts_e, &direction[k*nq+m_phys_offset[i]], 1,
718  &locdir[k*npts_e], 1);
719  }
720 
721  (*m_exp)[i]->PhysDirectionalDeriv(
722  inarray + m_phys_offset[i],
723  locdir,
724  e_outarray = outarray+m_phys_offset[i] );
725  }
726  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064

◆ v_PhysGalerkinProjection1DScaled()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by PhysGalerkinProjection1DScaled(), and v_GetNumElmts().

2083  {
2084  boost::ignore_unused(scale, inarray, outarray);
2086  "This method is not defined or valid for this class type");
2087  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_PhysInterp1DScaled()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by PhysInterp1DScaled(), and v_GetNumElmts().

2073  {
2074  boost::ignore_unused(scale, inarray, outarray);
2076  "This method is not defined or valid for this class type");
2077  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_ReadGlobalOptimizationParameters()

void Nektar::MultiRegions::ExpList::v_ReadGlobalOptimizationParameters ( )
protectedvirtual

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

Definition at line 3198 of file ExpList.cpp.

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by ReadGlobalOptimizationParameters(), and v_GetNumElmts().

3199  {
3201  "This method is not defined or valid for this class type");
3202  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_Reset()

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::DisContField2D, Nektar::MultiRegions::DisContField1D, and Nektar::MultiRegions::DisContField3D.

Definition at line 1583 of file ExpList.cpp.

References m_exp, and m_graph.

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

1584  {
1585  // Reset matrix managers.
1586  LibUtilities::NekManager<LocalRegions::MatrixKey,
1587  DNekScalMat, LocalRegions::MatrixKey::opLess>::ClearManager();
1588  LibUtilities::NekManager<LocalRegions::MatrixKey,
1589  DNekScalBlkMat, LocalRegions::MatrixKey::opLess>::ClearManager();
1590 
1591  // Loop over all elements and reset geometry information.
1592  for (int i = 0; i < m_exp->size(); ++i)
1593  {
1594  (*m_exp)[i]->GetGeom()->Reset(m_graph->GetCurvedEdges(),
1595  m_graph->GetCurvedFaces());
1596  }
1597 
1598  // Loop over all elements and rebuild geometric factors.
1599  for (int i = 0; i < m_exp->size(); ++i)
1600  {
1601  (*m_exp)[i]->Reset();
1602  }
1603  }
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
NekMatrix< NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag >, BlockMatrixTag > DNekScalBlkMat
Definition: NekTypeDefs.hpp:65
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:1026
NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag > DNekScalMat

◆ v_SetHomo1DSpecVanVisc()

virtual void Nektar::MultiRegions::ExpList::v_SetHomo1DSpecVanVisc ( Array< OneD, NekDouble visc)
inlineprivatevirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1534 of file ExpList.h.

References Nektar::ErrorUtil::efatal, NEKERROR, and v_GetPlane().

Referenced by SetHomo1DSpecVanVisc().

1535  {
1536  boost::ignore_unused(visc);
1538  "This method is not defined or valid for this class type");
1539  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_SetHomoLen()

void Nektar::MultiRegions::ExpList::v_SetHomoLen ( const NekDouble  lhom)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 2045 of file ExpList.cpp.

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by SetHomoLen(), and v_GetNumElmts().

2046  {
2047  boost::ignore_unused(lhom);
2049  "This method is not defined or valid for this class type");
2050  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_SetUpPhysNormals()

void Nektar::MultiRegions::ExpList::v_SetUpPhysNormals ( )
protectedvirtual

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

Definition at line 3007 of file ExpList.cpp.

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by SetUpPhysNormals(), and v_GetNumElmts().

3008  {
3010  "This method is not defined or valid for this class type");
3011  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_SmoothField()

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

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

Referenced by SmoothField(), and v_GetNumElmts().

827  {
828  boost::ignore_unused(field);
829  // Do nothing unless the method is implemented in the appropriate
830  // class, i.e. ContField1D,ContField2D, etc.
831 
832  // So far it has been implemented just for ContField2D and
833  // ContField3DHomogeneous1D
834 
835  // Block in case users try the smoothing with a modal expansion.
836  // Maybe a different techique for the smoothing require
837  // implementation for modal basis.
838 
839  ASSERTL0((*m_exp)[0]->GetBasisType(0)
841  (*m_exp)[0]->GetBasisType(0)
843  "Smoothing is currently not allowed unless you are using "
844  "a nodal base for efficiency reasons. The implemented "
845  "smoothing technique requires the mass matrix inversion "
846  "which is trivial just for GLL_LAGRANGE_SEM and "
847  "GAUSS_LAGRANGE_SEMexpansions.");
848  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
Lagrange Polynomials using the Gauss points .
Definition: BasisType.h:55
Lagrange for SEM basis .
Definition: BasisType.h:54

◆ v_UpdateBndCondExpansion()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by UpdateBndCondExpansion(), and v_GetNumElmts().

2551  {
2552  boost::ignore_unused(i);
2554  "This method is not defined or valid for this class type");
2555  static std::shared_ptr<ExpList> result;
2556  return result;
2557  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_UpdateBndConditions()

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by UpdateBndConditions(), and v_GetNumElmts().

3219  {
3221  "This method is not defined or valid for this class type");
3222  static Array<OneD, SpatialDomains::BoundaryConditionShPtr> result;
3223  return result;
3224  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_Upwind() [1/2]

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by Upwind(), and v_GetNumElmts().

2564  {
2565  boost::ignore_unused(Vec, Fwd, Bwd, Upwind);
2567  "This method is not defined or valid for this class type");
2568  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_Upwind() [2/2]

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

References Nektar::ErrorUtil::efatal, and NEKERROR.

2575  {
2576  boost::ignore_unused(Vn, Fwd, Bwd, Upwind);
2578  "This method is not defined or valid for this class type");
2579  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ v_VectorFlux()

NekDouble Nektar::MultiRegions::ExpList::v_VectorFlux ( const Array< OneD, Array< OneD, NekDouble > > &  inarray)
protectedvirtual

Definition at line 2002 of file ExpList.cpp.

References m_phys_offset.

Referenced by v_GetNumElmts(), and VectorFlux().

2003  {
2004  NekDouble flux = 0.0;
2005  int i = 0;
2006  int j;
2007 
2008  for (i = 0; i < (*m_exp).size(); ++i)
2009  {
2010  Array<OneD, Array<OneD, NekDouble> > tmp(inarray.num_elements());
2011  for (j = 0; j < inarray.num_elements(); ++j)
2012  {
2013  tmp[j] = Array<OneD, NekDouble>(inarray[j] + m_phys_offset[i]);
2014  }
2015  flux += (*m_exp)[i]->VectorFlux(tmp);
2016  }
2017 
2018  return flux;
2019  }
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
double NekDouble

◆ v_WriteTecplotConnectivity()

void Nektar::MultiRegions::ExpList::v_WriteTecplotConnectivity ( std::ostream &  outfile,
int  expansion 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ExpList3DHomogeneous1D.

Definition at line 1743 of file ExpList.cpp.

References ASSERTL0, and m_exp.

Referenced by v_GetNumElmts(), and WriteTecplotConnectivity().

1745  {
1746  int i,j,k,l;
1747  int nbase = (*m_exp)[0]->GetNumBases();
1748  int cnt = 0;
1749 
1750  std::shared_ptr<LocalRegions::ExpansionVector> exp = m_exp;
1751 
1752  if (expansion != -1)
1753  {
1754  exp = std::shared_ptr<LocalRegions::ExpansionVector>(
1756  (*exp)[0] = (*m_exp)[expansion];
1757  }
1758 
1759  if (nbase == 2)
1760  {
1761  for(i = 0; i < (*exp).size(); ++i)
1762  {
1763  const int np0 = (*exp)[i]->GetNumPoints(0);
1764  const int np1 = (*exp)[i]->GetNumPoints(1);
1765 
1766  for(j = 1; j < np1; ++j)
1767  {
1768  for(k = 1; k < np0; ++k)
1769  {
1770  outfile << cnt + (j-1)*np0 + k << " ";
1771  outfile << cnt + (j-1)*np0 + k+1 << " ";
1772  outfile << cnt + j *np0 + k+1 << " ";
1773  outfile << cnt + j *np0 + k << endl;
1774  }
1775  }
1776 
1777  cnt += np0*np1;
1778  }
1779  }
1780  else if (nbase == 3)
1781  {
1782  for(i = 0; i < (*exp).size(); ++i)
1783  {
1784  const int np0 = (*exp)[i]->GetNumPoints(0);
1785  const int np1 = (*exp)[i]->GetNumPoints(1);
1786  const int np2 = (*exp)[i]->GetNumPoints(2);
1787  const int np01 = np0*np1;
1788 
1789  for(j = 1; j < np2; ++j)
1790  {
1791  for(k = 1; k < np1; ++k)
1792  {
1793  for(l = 1; l < np0; ++l)
1794  {
1795  outfile << cnt + (j-1)*np01 + (k-1)*np0 + l << " ";
1796  outfile << cnt + (j-1)*np01 + (k-1)*np0 + l+1 << " ";
1797  outfile << cnt + (j-1)*np01 + k *np0 + l+1 << " ";
1798  outfile << cnt + (j-1)*np01 + k *np0 + l << " ";
1799  outfile << cnt + j *np01 + (k-1)*np0 + l << " ";
1800  outfile << cnt + j *np01 + (k-1)*np0 + l+1 << " ";
1801  outfile << cnt + j *np01 + k *np0 + l+1 << " ";
1802  outfile << cnt + j *np01 + k *np0 + l << endl;
1803  }
1804  }
1805  }
1806  cnt += np0*np1*np2;
1807  }
1808  }
1809  else
1810  {
1811  ASSERTL0(false,"Not set up for this dimension");
1812  }
1813  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
std::vector< ExpansionSharedPtr > ExpansionVector
Definition: Expansion.h:67

◆ v_WriteTecplotField()

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

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

Referenced by v_GetNumElmts(), and WriteTecplotField().

1821  {
1822  if (expansion == -1)
1823  {
1824  int totpoints = GetTotPoints();
1825  if(m_physState == false)
1826  {
1828  }
1829 
1830  for(int i = 0; i < totpoints; ++i)
1831  {
1832  outfile << m_phys[i] << " ";
1833  if(i % 1000 == 0 && i)
1834  {
1835  outfile << std::endl;
1836  }
1837  }
1838  outfile << std::endl;
1839 
1840  }
1841  else
1842  {
1843  int nPoints = (*m_exp)[expansion]->GetTotPoints();
1844 
1845  for (int i = 0; i < nPoints; ++i)
1846  {
1847  outfile << m_phys[i + m_phys_offset[expansion]] << " ";
1848  }
1849 
1850  outfile << std::endl;
1851  }
1852  }
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, CoeffState coeffstate=eLocal)
Definition: ExpList.h:1775
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1069
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:1052
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1078
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1608

◆ v_WriteTecplotHeader()

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

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

Referenced by v_GetNumElmts(), and WriteTecplotHeader().

1612  {
1613  if (GetNumElmts() == 0)
1614  {
1615  return;
1616  }
1617 
1618  int coordim = GetExp(0)->GetCoordim();
1619  char vars[3] = { 'x', 'y', 'z' };
1620 
1621  if (m_expType == e3DH1D)
1622  {
1623  coordim += 1;
1624  }
1625  else if (m_expType == e3DH2D)
1626  {
1627  coordim += 2;
1628  }
1629 
1630  outfile << "Variables = x";
1631  for (int i = 1; i < coordim; ++i)
1632  {
1633  outfile << ", " << vars[i];
1634  }
1635 
1636  if (var.size() > 0)
1637  {
1638  outfile << ", " << var;
1639  }
1640 
1641  outfile << std::endl << std::endl;
1642  }
const std::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2191
int GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Definition: ExpList.h:655

◆ v_WriteTecplotZone()

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

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

Referenced by v_GetNumElmts(), and WriteTecplotZone().

1650  {
1651  int i, j;
1652  int coordim = GetCoordim(0);
1653  int nPoints = GetTotPoints();
1654  int nBases = (*m_exp)[0]->GetNumBases();
1655  int numBlocks = 0;
1656 
1657  Array<OneD, Array<OneD, NekDouble> > coords(3);
1658 
1659  if (expansion == -1)
1660  {
1661  nPoints = GetTotPoints();
1662 
1663  coords[0] = Array<OneD, NekDouble>(nPoints);
1664  coords[1] = Array<OneD, NekDouble>(nPoints);
1665  coords[2] = Array<OneD, NekDouble>(nPoints);
1666 
1667  GetCoords(coords[0], coords[1], coords[2]);
1668 
1669  for (i = 0; i < m_exp->size(); ++i)
1670  {
1671  int numInt = 1;
1672 
1673  for (j = 0; j < nBases; ++j)
1674  {
1675  numInt *= (*m_exp)[i]->GetNumPoints(j)-1;
1676  }
1677 
1678  numBlocks += numInt;
1679  }
1680  }
1681  else
1682  {
1683  nPoints = (*m_exp)[expansion]->GetTotPoints();
1684 
1685  coords[0] = Array<OneD, NekDouble>(nPoints);
1686  coords[1] = Array<OneD, NekDouble>(nPoints);
1687  coords[2] = Array<OneD, NekDouble>(nPoints);
1688 
1689  (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
1690 
1691  numBlocks = 1;
1692  for (j = 0; j < nBases; ++j)
1693  {
1694  numBlocks *= (*m_exp)[expansion]->GetNumPoints(j)-1;
1695  }
1696  }
1697 
1698  if (m_expType == e3DH1D)
1699  {
1700  nBases += 1;
1701  coordim += 1;
1702  int nPlanes = GetZIDs().num_elements();
1703  NekDouble tmp = numBlocks * (nPlanes-1.0) / nPlanes;
1704  numBlocks = (int)tmp;
1705  }
1706  else if (m_expType == e3DH2D)
1707  {
1708  nBases += 2;
1709  coordim += 1;
1710  }
1711 
1712  outfile << "Zone, N=" << nPoints << ", E="
1713  << numBlocks << ", F=FEBlock" ;
1714 
1715  switch(nBases)
1716  {
1717  case 2:
1718  outfile << ", ET=QUADRILATERAL" << std::endl;
1719  break;
1720  case 3:
1721  outfile << ", ET=BRICK" << std::endl;
1722  break;
1723  default:
1724  ASSERTL0(false,"Not set up for this type of output");
1725  break;
1726  }
1727 
1728  // Write out coordinates
1729  for (j = 0; j < coordim; ++j)
1730  {
1731  for (i = 0; i < nPoints; ++i)
1732  {
1733  outfile << coords[j][i] << " ";
1734  if (i % 1000 == 0 && i)
1735  {
1736  outfile << std::endl;
1737  }
1738  }
1739  outfile << std::endl;
1740  }
1741  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1090
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:589
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:1854
double NekDouble
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:2013
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1608

◆ v_WriteVtkPieceData()

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

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

Referenced by v_GetNumElmts(), and WriteVtkPieceData().

1884  {
1885  int i;
1886  int nq = (*m_exp)[expansion]->GetTotPoints();
1887 
1888  // printing the fields of that zone
1889  outfile << " <DataArray type=\"Float64\" Name=\""
1890  << var << "\">" << endl;
1891  outfile << " ";
1892  const Array<OneD, NekDouble> phys = m_phys + m_phys_offset[expansion];
1893  for(i = 0; i < nq; ++i)
1894  {
1895  outfile << (fabs(phys[i]) < NekConstants::kNekZeroTol ? 0 : phys[i]) << " ";
1896  }
1897  outfile << endl;
1898  outfile << " </DataArray>" << endl;
1899  }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1069
static const NekDouble kNekZeroTol
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1104

◆ v_WriteVtkPieceHeader()

void Nektar::MultiRegions::ExpList::v_WriteVtkPieceHeader ( std::ostream &  outfile,
int  expansion,
int  istrip 
)
protectedvirtual

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

Definition at line 1868 of file ExpList.cpp.

References Nektar::ErrorUtil::efatal, and NEKERROR.

Referenced by v_GetNumElmts(), and WriteVtkPieceHeader().

1869  {
1870  boost::ignore_unused(outfile, expansion, istrip);
1872  "Routine not implemented for this expansion.");
1873  }
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
Definition: ErrorUtil.hpp:209

◆ VectorFlux()

NekDouble Nektar::MultiRegions::ExpList::VectorFlux ( const Array< OneD, Array< OneD, NekDouble > > &  inarray)
inline

Definition at line 566 of file ExpList.h.

References v_VectorFlux().

567  {
568  return v_VectorFlux(inarray);
569  }
virtual NekDouble v_VectorFlux(const Array< OneD, Array< OneD, NekDouble > > &inarray)
Definition: ExpList.cpp:2002

◆ WriteTecplotConnectivity()

void Nektar::MultiRegions::ExpList::WriteTecplotConnectivity ( std::ostream &  outfile,
int  expansion = -1 
)
inline

Definition at line 417 of file ExpList.h.

References MULTI_REGIONS_EXPORT, v_WriteTecplotConnectivity(), WriteVtkFooter(), and WriteVtkHeader().

419  {
420  v_WriteTecplotConnectivity(outfile, expansion);
421  }
virtual void v_WriteTecplotConnectivity(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:1743

◆ WriteTecplotField()

void Nektar::MultiRegions::ExpList::WriteTecplotField ( std::ostream &  outfile,
int  expansion = -1 
)
inline

Definition at line 411 of file ExpList.h.

References v_WriteTecplotField().

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

◆ WriteTecplotHeader()

void Nektar::MultiRegions::ExpList::WriteTecplotHeader ( std::ostream &  outfile,
std::string  var = "" 
)
inline

Definition at line 398 of file ExpList.h.

References v_WriteTecplotHeader().

400  {
401  v_WriteTecplotHeader(outfile, var);
402  }
virtual void v_WriteTecplotHeader(std::ostream &outfile, std::string var="")
Definition: ExpList.cpp:1610

◆ WriteTecplotZone()

void Nektar::MultiRegions::ExpList::WriteTecplotZone ( std::ostream &  outfile,
int  expansion = -1 
)
inline

Definition at line 404 of file ExpList.h.

References v_WriteTecplotZone().

407  {
408  v_WriteTecplotZone(outfile, expansion);
409  }
virtual void v_WriteTecplotZone(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:1649

◆ WriteVtkFooter()

void Nektar::MultiRegions::ExpList::WriteVtkFooter ( std::ostream &  outfile)

Definition at line 1862 of file ExpList.cpp.

Referenced by WriteTecplotConnectivity().

1863  {
1864  outfile << " </UnstructuredGrid>" << endl;
1865  outfile << "</VTKFile>" << endl;
1866  }

◆ WriteVtkHeader()

void Nektar::MultiRegions::ExpList::WriteVtkHeader ( std::ostream &  outfile)

Definition at line 1854 of file ExpList.cpp.

Referenced by WriteTecplotConnectivity().

1855  {
1856  outfile << "<?xml version=\"1.0\"?>" << endl;
1857  outfile << "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" "
1858  << "byte_order=\"LittleEndian\">" << endl;
1859  outfile << " <UnstructuredGrid>" << endl;
1860  }

◆ WriteVtkPieceData()

void Nektar::MultiRegions::ExpList::WriteVtkPieceData ( std::ostream &  outfile,
int  expansion,
std::string  var = "v" 
)
inline

◆ WriteVtkPieceFooter()

void Nektar::MultiRegions::ExpList::WriteVtkPieceFooter ( std::ostream &  outfile,
int  expansion 
)

Definition at line 1875 of file ExpList.cpp.

Referenced by WriteVtkPieceHeader().

1876  {
1877  boost::ignore_unused(expansion);
1878  outfile << " </PointData>" << endl;
1879  outfile << " </Piece>" << endl;
1880  }

◆ WriteVtkPieceHeader()

void Nektar::MultiRegions::ExpList::WriteVtkPieceHeader ( std::ostream &  outfile,
int  expansion,
int  istrip = 0 
)
inline

Definition at line 426 of file ExpList.h.

References MULTI_REGIONS_EXPORT, v_WriteVtkPieceHeader(), and WriteVtkPieceFooter().

428  {
429  v_WriteVtkPieceHeader(outfile, expansion, istrip);
430  }
virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip)
Definition: ExpList.cpp:1868

Member Data Documentation

◆ m_blockMat

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

Definition at line 1108 of file ExpList.h.

Referenced by GetBlockMatrix().

◆ m_coeff_offset

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

◆ m_coeffs

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 1052 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().

◆ m_coll_coeff_offset

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

Offset of elemental data into the array m_coeffs.

Definition at line 1095 of file ExpList.h.

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

◆ m_coll_phys_offset

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

Offset of elemental data into the array m_phys.

Definition at line 1098 of file ExpList.h.

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

◆ m_collections

Collections::CollectionVector Nektar::MultiRegions::ExpList::m_collections
protected

◆ m_comm

LibUtilities::CommSharedPtr Nektar::MultiRegions::ExpList::m_comm
protected

◆ m_elmtToExpId

std::unordered_map<int, int> Nektar::MultiRegions::ExpList::m_elmtToExpId
protected

◆ m_exp

std::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 1090 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(), GetShapeDimension(), GetTotPoints(), Nektar::MultiRegions::DisContField1D::IsLeftAdjacentVertex(), PhysEvaluate(), 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(), v_GetMovingFrames(), 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().

◆ m_expType

ExpansionType Nektar::MultiRegions::ExpList::m_expType

Definition at line 1002 of file ExpList.h.

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

◆ m_globalOptParam

NekOptimize::GlobalOptParamSharedPtr Nektar::MultiRegions::ExpList::m_globalOptParam
protected

◆ m_graph

SpatialDomains::MeshGraphSharedPtr Nektar::MultiRegions::ExpList::m_graph
protected

◆ m_ncoeffs

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 1030 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().

◆ m_npoints

int Nektar::MultiRegions::ExpList::m_npoints
protected

◆ m_phys

Array<OneD, NekDouble> Nektar::MultiRegions::ExpList::m_phys
protected

The global expansion evaluated at the quadrature points.

The array of length m_npoints \(=Q_{\mathrm{tot}}\) containing the evaluation of \(u^{\delta}(\boldsymbol{x})\) at the quadrature points \(\boldsymbol{x}_i\).

\[\mathrm{\texttt{m\_phys}}=\boldsymbol{u}_{l} = \underline{\boldsymbol{u}}^e = \left [ \begin{array}{c} \boldsymbol{u}^{1} \ \ \boldsymbol{u}^{2} \ \ \vdots \ \ \boldsymbol{u}^{{{N_{\mathrm{el}}}}} \end{array} \right ],\quad \mathrm{where}\quad \boldsymbol{u}^{e}[i]=u^{\delta}(\boldsymbol{x}_i)\]

Definition at line 1069 of file ExpList.h.

Referenced by ExpList(), Nektar::MultiRegions::ExpList0D::ExpList0D(), Nektar::MultiRegions::ExpList1D::ExpList1D(), Nektar::MultiRegions::ExpList2D::ExpList2D(), Nektar::MultiRegions::ExpList3D::ExpList3D(), GetPhys(), Nektar::MultiRegions::DisContField2D::L2_DGDeriv(), PhysIntegral(), Nektar::MultiRegions::ExpList1DHomogeneous2D::SetCoeffPhys(), Nektar::MultiRegions::ExpList2DHomogeneous1D::SetCoeffPhys(), Nektar::MultiRegions::ExpList3DHomogeneous2D::SetCoeffPhys(), Nektar::MultiRegions::ExpList3DHomogeneous1D::SetCoeffPhys(), SetPhys(), SetPhysArray(), UpdatePhys(), Nektar::MultiRegions::DisContField3D::v_ExtractTracePhys(), Nektar::MultiRegions::DisContField1D::v_ExtractTracePhys(), Nektar::MultiRegions::DisContField2D::v_ExtractTracePhys(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_ExtractTracePhys(), Nektar::MultiRegions::DisContField3D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField1D::v_GetFwdBwdTracePhys(), Nektar::MultiRegions::DisContField2D::v_GetFwdBwdTracePhys(), v_WriteTecplotField(), Nektar::MultiRegions::ExpListHomogeneous2D::v_WriteVtkPieceData(), Nektar::MultiRegions::ExpListHomogeneous1D::v_WriteVtkPieceData(), and v_WriteVtkPieceData().

◆ m_phys_offset

Array<OneD, int> Nektar::MultiRegions::ExpList::m_phys_offset
protected

◆ m_physState

bool Nektar::MultiRegions::ExpList::m_physState
protected

The state of the array m_phys.

Indicates whether the array m_phys, created to contain the evaluation of \(u^{\delta}(\boldsymbol{x})\) at the quadrature points \(\boldsymbol{x}_i\), is filled with these values.

Definition at line 1078 of file ExpList.h.

Referenced by Nektar::MultiRegions::ExpList2D::ExpList2D(), GetPhysState(), PhysIntegral(), SetPhys(), SetPhysState(), UpdatePhys(), Nektar::MultiRegions::DisContField3D::v_ExtractTracePhys(), Nektar::MultiRegions::DisContField1D::v_ExtractTracePhys(), Nektar::MultiRegions::DisContField2D::v_ExtractTracePhys(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_ExtractTracePhys(), and v_WriteTecplotField().

◆ m_session

LibUtilities::SessionReaderSharedPtr Nektar::MultiRegions::ExpList::m_session
protected

Session.

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

◆ m_WaveSpace

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