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:2638

◆ 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:2619

◆ 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:2619

◆ 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:2305

◆ 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:2305

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

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

1580  {
1581 
1582  }

◆ 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:2910

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

References v_ClearGlobalLinSysManager().

3442  {
3444  }
virtual void v_ClearGlobalLinSysManager(void)
Definition: ExpList.cpp:2098

◆ 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 3304 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().

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

◆ 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:2766

◆ 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:3237

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

References v_ExtractCoeffsToCoeffs().

Referenced by AppendFieldData().

2343  {
2344  v_ExtractCoeffsToCoeffs(fromExpList,fromCoeffs,toCoeffs);
2345  }
virtual void v_ExtractCoeffsToCoeffs(const std::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
Definition: ExpList.cpp:2444

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

References v_ExtractDataToCoeffs().

Referenced by AppendFieldData().

2338  {
2339  v_ExtractDataToCoeffs(fielddef,fielddata,field,coeffs);
2340  }
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:2355

◆ 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:3035

◆ 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 2104 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().

2109  {
2110  string varString = fileName.substr(0, fileName.find_last_of("."));
2111  int j, k, len = varString.length();
2112  varString = varString.substr(len-1, len);
2113 
2114  std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
2115  std::vector<std::vector<NekDouble> > FieldData;
2116 
2117  std::string ft = LibUtilities::FieldIO::GetFileType(fileName, comm);
2119  .CreateInstance(ft, comm, m_session->GetSharedFilesystem());
2120 
2121  f->Import(fileName, FieldDef, FieldData);
2122 
2123  bool found = false;
2124  for (j = 0; j < FieldDef.size(); ++j)
2125  {
2126  for (k = 0; k < FieldDef[j]->m_fields.size(); ++k)
2127  {
2128  if (FieldDef[j]->m_fields[k] == varName)
2129  {
2130  // Copy FieldData into locExpList
2131  locExpList->ExtractDataToCoeffs(
2132  FieldDef[j], FieldData[j],
2133  FieldDef[j]->m_fields[k],
2134  locExpList->UpdateCoeffs());
2135  found = true;
2136  }
2137  }
2138  }
2139 
2140  ASSERTL0(found, "Could not find variable '"+varName+
2141  "' in file boundary condition "+fileName);
2142  locExpList->BwdTrans_IterPerExp(
2143  locExpList->GetCoeffs(),
2144  locExpList->UpdatePhys());
2145  }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
FieldIOFactory & GetFieldIOFactory()
Returns the FieldIO factory.
Definition: FieldIO.cpp:71
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:96
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:3114

◆ 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:3074

◆ 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:2675

◆ 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:2675

◆ 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:2861

◆ 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:2861

◆ 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:2918

◆ 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 2183 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().

2191  {
2192  int startenum = (int) LibUtilities::eSegment;
2193  int endenum = (int) LibUtilities::eHexahedron;
2194  int s = 0;
2196 
2197  ASSERTL1(NumHomoDir == HomoBasis.num_elements(),"Homogeneous basis is not the same length as NumHomoDir");
2198  ASSERTL1(NumHomoDir == HomoLen.size(),"Homogeneous length vector is not the same length as NumHomDir");
2199 
2200  // count number of shapes
2201  switch((*m_exp)[0]->GetShapeDimension())
2202  {
2203  case 1:
2204  startenum = (int) LibUtilities::eSegment;
2205  endenum = (int) LibUtilities::eSegment;
2206  break;
2207  case 2:
2208  startenum = (int) LibUtilities::eTriangle;
2209  endenum = (int) LibUtilities::eQuadrilateral;
2210  break;
2211  case 3:
2212  startenum = (int) LibUtilities::eTetrahedron;
2213  endenum = (int) LibUtilities::eHexahedron;
2214  break;
2215  }
2216 
2217  for(s = startenum; s <= endenum; ++s)
2218  {
2219  std::vector<unsigned int> elementIDs;
2220  std::vector<LibUtilities::BasisType> basis;
2221  std::vector<unsigned int> numModes;
2222  std::vector<std::string> fields;
2223 
2224  bool first = true;
2225  bool UniOrder = true;
2226  int n;
2227 
2228  shape = (LibUtilities::ShapeType) s;
2229 
2230  for(int i = 0; i < (*m_exp).size(); ++i)
2231  {
2232  if((*m_exp)[i]->GetGeom()->GetShapeType() == shape)
2233  {
2234  elementIDs.push_back((*m_exp)[i]->GetGeom()->GetGlobalID());
2235  if(first)
2236  {
2237  for(int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2238  {
2239  basis.push_back((*m_exp)[i]->GetBasis(j)->GetBasisType());
2240  numModes.push_back((*m_exp)[i]->GetBasis(j)->GetNumModes());
2241  }
2242 
2243  // add homogeneous direction details if defined
2244  for(n = 0 ; n < NumHomoDir; ++n)
2245  {
2246  basis.push_back(HomoBasis[n]->GetBasisType());
2247  numModes.push_back(HomoBasis[n]->GetNumModes());
2248  }
2249 
2250  first = false;
2251  }
2252  else
2253  {
2254  ASSERTL0((*m_exp)[i]->GetBasis(0)->GetBasisType() == basis[0],"Routine is not set up for multiple bases definitions");
2255 
2256  for(int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
2257  {
2258  numModes.push_back((*m_exp)[i]->GetBasis(j)->GetNumModes());
2259  if(numModes[j] != (*m_exp)[i]->GetBasis(j)->GetNumModes())
2260  {
2261  UniOrder = false;
2262  }
2263  }
2264  // add homogeneous direction details if defined
2265  for(n = 0 ; n < NumHomoDir; ++n)
2266  {
2267  numModes.push_back(HomoBasis[n]->GetNumModes());
2268  }
2269  }
2270  }
2271  }
2272 
2273 
2274  if(elementIDs.size() > 0)
2275  {
2278  AllocateSharedPtr(shape, elementIDs, basis,
2279  UniOrder, numModes,fields,
2280  NumHomoDir, HomoLen, homoStrips,
2281  HomoSIDs, HomoZIDs, HomoYIDs);
2282  fielddef.push_back(fdef);
2283  }
2284  }
2285  }
#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:2942

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

References m_phys_offset, and Vmath::Vcopy().

Referenced by AppendFieldData().

2525  {
2526  int npoints_e;
2527  NekDouble coeff;
2528 
2529  Array<OneD, NekDouble> outarray_e;
2530 
2531  for(int i = 0 ; i < (*m_exp).size(); ++i)
2532  {
2533  npoints_e = (*m_exp)[i]->GetTotPoints();
2534 
2535  if(i <= ElementID)
2536  {
2537  coeff = scalar1;
2538  }
2539  else
2540  {
2541  coeff = scalar2;
2542  }
2543 
2544  outarray_e = Array<OneD, NekDouble>(npoints_e, coeff);
2545  Vmath::Vcopy(npoints_e, &outarray_e[0], 1,
2546  &outarray[m_phys_offset[i]], 1);
2547  }
2548  }
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:2787

◆ 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:2551

◆ 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:3216

◆ 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:3024

◆ GetBoundaryCondition()

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

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

3274  {
3275  auto collectionIter = collection.find(regionId);
3276  ASSERTL1(collectionIter != collection.end(),
3277  "Unable to locate collection " +
3278  boost::lexical_cast<string>(regionId));
3279 
3281  = (*collectionIter).second;
3282  auto conditionMapIter = bndCondMap->find(variable);
3283  ASSERTL1(conditionMapIter != bndCondMap->end(),
3284  "Unable to locate condition map.");
3285 
3286  const SpatialDomains::BoundaryConditionShPtr boundaryCondition
3287  = (*conditionMapIter).second;
3288 
3289  return boundaryCondition;
3290  }
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:3152

◆ 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(), GetExp(), 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:2963

◆ 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(), 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 ASSERTL0, GetCoordim(), and m_exp.

1432  {
1433  Array<OneD, NekDouble> stdCoord(GetCoordim(0),0.0);
1434  for (int i = 0; i < (*m_exp).size(); ++i)
1435  {
1436  if ((*m_exp)[i]->GetGeom()->ContainsPoint(gloCoord))
1437  {
1438  return (*m_exp)[i];
1439  }
1440  }
1441  ASSERTL0(false, "Cannot find element for this point.");
1442  return (*m_exp)[0]; // avoid warnings
1443  }
#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 GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:2013

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

Referenced by GetNumElmts(), and PhysEvaluate().

1455  {
1456  Array<OneD, NekDouble> Lcoords(gloCoord.num_elements());
1457 
1458  return GetExpIndex(gloCoord,Lcoords,tol,returnNearestElmt);
1459  }
int GetExpIndex(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false)
Definition: ExpList.cpp:1451

◆ 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 1462 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.

1467  {
1468  if (GetNumElmts() == 0)
1469  {
1470  return -1;
1471  }
1472 
1473  if (m_elmtToExpId.size() == 0)
1474  {
1475  // Loop in reverse order so that in case where using a
1476  // Homogeneous expansion it sets geometry ids to first part of
1477  // m_exp list. Otherwise will set to second (complex) expansion
1478  for(int i = (*m_exp).size()-1; i >= 0; --i)
1479  {
1480  m_elmtToExpId[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
1481  }
1482  }
1483 
1484  NekDouble x = (gloCoords.num_elements() > 0 ? gloCoords[0] : 0.0);
1485  NekDouble y = (gloCoords.num_elements() > 1 ? gloCoords[1] : 0.0);
1486  NekDouble z = (gloCoords.num_elements() > 2 ? gloCoords[2] : 0.0);
1489  GetExp(0)->GetCoordim(), -1, x, y, z);
1490 
1491  // Get the list of elements whose bounding box contains the desired
1492  // point.
1493  std::vector<int> elmts = m_graph->GetElementsContainingPoint(p);
1494 
1495  NekDouble nearpt = 1e6;
1496  NekDouble nearpt_min = 1e6;
1497  int min_id = 0;
1498  Array<OneD, NekDouble> savLocCoords(locCoords.num_elements());
1499 
1500  // Check each element in turn to see if point lies within it.
1501  for (int i = 0; i < elmts.size(); ++i)
1502  {
1503  if ((*m_exp)[m_elmtToExpId[elmts[i]]]->
1504  GetGeom()->ContainsPoint(gloCoords,
1505  locCoords,
1506  tol, nearpt))
1507  {
1508  return m_elmtToExpId[elmts[i]];
1509  }
1510  else
1511  {
1512  // If it does not lie within, keep track of which element
1513  // is nearest.
1514  if(nearpt < nearpt_min)
1515  {
1516  min_id = m_elmtToExpId[elmts[i]];
1517  nearpt_min = nearpt;
1518  Vmath::Vcopy(locCoords.num_elements(),locCoords, 1,
1519  savLocCoords, 1);
1520  }
1521  }
1522  }
1523 
1524  // If the calling function is with just the nearest element, return
1525  // that. Otherwise return -1 to indicate no matching elemenet found.
1526  if(returnNearestElmt)
1527  {
1528 
1529  std::string msg = "Failed to find point within element to "
1530  "tolerance of "
1531  + boost::lexical_cast<std::string>(tol)
1532  + " using local point ("
1533  + boost::lexical_cast<std::string>(locCoords[0]) +","
1534  + boost::lexical_cast<std::string>(locCoords[1]) +","
1535  + boost::lexical_cast<std::string>(locCoords[1])
1536  + ") in element: "
1537  + boost::lexical_cast<std::string>(min_id);
1538  WARNINGL1(false,msg.c_str());
1539 
1540  Vmath::Vcopy(locCoords.num_elements(),savLocCoords, 1,
1541  locCoords, 1);
1542  return min_id;
1543  }
1544  else
1545  {
1546  return -1;
1547  }
1548  }
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:2291

◆ 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:2291

◆ 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:2648

◆ 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:2648

◆ 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:2046

◆ 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:2666

◆ 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:2468

◆ 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:2611

◆ 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:3260

◆ 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:3292

◆ 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:3250

◆ 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:2590

◆ 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:2606

◆ 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:2598

◆ 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:2038

◆ 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:2069

◆ 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:2061

◆ 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:2894

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

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

Referenced by L2().

2167  {
2168  NekDouble err = 0.0, errh1;
2169  int i;
2170 
2171  for (i = 0; i < (*m_exp).size(); ++i)
2172  {
2173  errh1 = (*m_exp)[i]->H1(inarray + m_phys_offset[i],
2174  soln + m_phys_offset[i]);
2175  err += errh1*errh1;
2176  }
2177 
2178  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
2179 
2180  return sqrt(err);
2181  }
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:2701

◆ 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:2755

◆ 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:2030

◆ 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:2744

◆ 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:2852

◆ 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:1997

◆ 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:1967

◆ 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:2716

◆ 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:2730

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

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

Referenced by WriteVtkPieceData().

1931  {
1932  NekDouble err = 0.0;
1933 
1934  if (soln == NullNekDouble1DArray)
1935  {
1936  err = Vmath::Vmax(m_npoints, inarray, 1);
1937  }
1938  else
1939  {
1940  for (int i = 0; i < m_npoints; ++i)
1941  {
1942  err = max(err, abs(inarray[i] - soln[i]));
1943  }
1944  }
1945 
1946  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceMax);
1947 
1948  return err;
1949  }
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:2876

◆ 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:2876

◆ 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:2691

◆ 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:2796

◆ 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:2796

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

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

Referenced by export_ExpList(), and GetNumElmts().

1557  {
1558  int dim = GetCoordim(0);
1559  ASSERTL0(dim == coords.num_elements(),
1560  "Invalid coordinate dimension.");
1561 
1562  // Grab the element index corresponding to coords.
1563  Array<OneD, NekDouble> xi(dim);
1564  int elmtIdx = GetExpIndex(coords, xi);
1565  ASSERTL0(elmtIdx > 0, "Unable to find element containing point.");
1566 
1567  // Grab that element's physical storage.
1568  Array<OneD, NekDouble> elmtPhys = phys + m_phys_offset[elmtIdx];
1569 
1570  // Evaluate the element at the appropriate point.
1571  return (*m_exp)[elmtIdx]->StdPhysEvaluate(xi, elmtPhys);
1572  }
int GetExpIndex(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false)
Definition: ExpList.cpp:1451
#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:2088

◆ 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:2078

◆ 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:1592

◆ 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:2054

◆ 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:2559

◆ 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:3227

◆ 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:2568

◆ 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:2568

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

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

Referenced by AddFwdBwdTraceIntegral(), and v_GetNumElmts().

2642  {
2643  boost::ignore_unused(Fwd, Bwd, outarray);
2645  "This method is not defined or valid for this class type");
2646  }
#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 2619 of file ExpList.cpp.

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

Referenced by AddTraceIntegral(), and v_GetNumElmts().

2623  {
2624  boost::ignore_unused(Fx, Fy, 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_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 2629 of file ExpList.cpp.

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

2632  {
2633  boost::ignore_unused(Fn, outarray);
2635  "This method is not defined or valid for this class type");
2636  }
#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 2305 of file ExpList.cpp.

References m_coeffs.

Referenced by AppendFieldData(), and v_GetNumElmts().

2306  {
2307  v_AppendFieldData(fielddef,fielddata,m_coeffs);
2308  }
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:2305

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

References m_coeff_offset.

2311  {
2312  int i;
2313  // Determine mapping from element ids to location in
2314  // expansion list
2315  // Determine mapping from element ids to location in
2316  // expansion list
2317  map<int, int> ElmtID_to_ExpID;
2318  for(i = 0; i < (*m_exp).size(); ++i)
2319  {
2320  ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2321  }
2322 
2323  for(i = 0; i < fielddef->m_elementIDs.size(); ++i)
2324  {
2325  int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
2326  int datalen = (*m_exp)[eid]->GetNcoeffs();
2327  fielddata.insert(fielddata.end(),&coeffs[m_coeff_offset[eid]],&coeffs[m_coeff_offset[eid]]+datalen);
2328  }
2329 
2330  }
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 2910 of file ExpList.cpp.

References v_BwdTrans_IterPerExp().

Referenced by BwdTrans(), and v_GetNumElmts().

2913  {
2914  boost::ignore_unused(coeffstate);
2915  v_BwdTrans_IterPerExp(inarray,outarray);
2916  }
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 2098 of file ExpList.cpp.

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

Referenced by ClearGlobalLinSysManager(), and v_GetNumElmts().

2099  {
2101  "This method is not defined or valid for this class type");
2102  }
#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 2776 of file ExpList.cpp.

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

Referenced by DealiasedDotProd(), and v_GetNumElmts().

2781  {
2782  boost::ignore_unused(inarray1, inarray2, outarray, coeffstate);
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_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 2766 of file ExpList.cpp.

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

Referenced by DealiasedProd(), and v_GetNumElmts().

2770  {
2771  boost::ignore_unused(inarray1, inarray2, outarray, coeffstate);
2773  "This method is not defined or valid for this class type");
2774  }
#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 3237 of file ExpList.cpp.

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

Referenced by EvaluateBoundaryConditions(), and v_GetNumElmts().

3242  {
3243  boost::ignore_unused(time, varName, x2_in, x3_in);
3245  "This method is not defined or valid for this class type");
3246  }
#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 2444 of file ExpList.cpp.

References m_coeff_offset.

Referenced by ExtractCoeffsToCoeffs(), and v_GetNumElmts().

2445  {
2446  int i;
2447  int offset = 0;
2448 
2449  for(i = 0; i < (*m_exp).size(); ++i)
2450  {
2451  std::vector<unsigned int> nummodes;
2452  vector<LibUtilities::BasisType> basisTypes;
2453  for(int j= 0; j < fromExpList->GetExp(i)->GetNumBases(); ++j)
2454  {
2455  nummodes.push_back(fromExpList->GetExp(i)->GetBasisNumModes(j));
2456  basisTypes.push_back(fromExpList->GetExp(i)->GetBasisType(j));
2457  }
2458 
2459  (*m_exp)[i]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes,0,
2460  &toCoeffs[m_coeff_offset[i]],
2461  basisTypes);
2462 
2463  offset += fromExpList->GetExp(i)->GetNcoeffs();
2464  }
2465  }
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 2355 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().

2360  {
2361  int i, expId;
2362  int offset = 0;
2363  int modes_offset = 0;
2364  int datalen = fielddata.size()/fielddef->m_fields.size();
2365 
2366  // Find data location according to field definition
2367  for(i = 0; i < fielddef->m_fields.size(); ++i)
2368  {
2369  if(fielddef->m_fields[i] == field)
2370  {
2371  break;
2372  }
2373  offset += datalen;
2374  }
2375 
2376  ASSERTL0(i != fielddef->m_fields.size(),
2377  "Field (" + field + ") not found in file.");
2378 
2379  if (m_elmtToExpId.size() == 0)
2380  {
2381  // Loop in reverse order so that in case where using a
2382  // Homogeneous expansion it sets geometry ids to first part of
2383  // m_exp list. Otherwise will set to second (complex) expansion
2384  for(i = (*m_exp).size()-1; i >= 0; --i)
2385  {
2386  m_elmtToExpId[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2387  }
2388  }
2389 
2390  for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
2391  {
2392  // Reset modes_offset in the case where all expansions of
2393  // the same order.
2394  if (fielddef->m_uniOrder == true)
2395  {
2396  modes_offset = 0;
2397  }
2398 
2400  fielddef->m_shapeType, fielddef->m_numModes, modes_offset);
2401 
2402  const int elmtId = fielddef->m_elementIDs[i];
2403  auto eIt = m_elmtToExpId.find(elmtId);
2404 
2405  if (eIt == m_elmtToExpId.end())
2406  {
2407  offset += datalen;
2408  modes_offset += (*m_exp)[0]->GetNumBases();
2409  continue;
2410  }
2411 
2412  expId = eIt->second;
2413 
2414  bool sameBasis = true;
2415  for (int j = 0; j < fielddef->m_basis.size(); ++j)
2416  {
2417  if (fielddef->m_basis[j] != (*m_exp)[expId]->GetBasisType(j))
2418  {
2419  sameBasis = false;
2420  break;
2421  }
2422  }
2423 
2424  if (datalen == (*m_exp)[expId]->GetNcoeffs() && sameBasis)
2425  {
2426  Vmath::Vcopy(datalen, &fielddata[offset], 1,
2427  &coeffs[m_coeff_offset[expId]], 1);
2428  }
2429  else
2430  {
2431  (*m_exp)[expId]->ExtractDataToCoeffs(
2432  &fielddata[offset], fielddef->m_numModes,
2433  modes_offset, &coeffs[m_coeff_offset[expId]],
2434  fielddef->m_basis);
2435  }
2436 
2437  offset += datalen;
2438  modes_offset += (*m_exp)[0]->GetNumBases();
2439  }
2440 
2441  return;
2442  }
#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 3035 of file ExpList.cpp.

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

Referenced by ExtractElmtToBndPhys(), and v_GetNumElmts().

3038  {
3039  int n, cnt;
3040  Array<OneD, NekDouble> tmp1, tmp2;
3042 
3043  Array<OneD, int> ElmtID,EdgeID;
3044  GetBoundaryToElmtMap(ElmtID,EdgeID);
3045 
3046  // Initialise result
3047  boundary = Array<OneD, NekDouble>
3048  (GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
3049 
3050  // Skip other boundary regions
3051  for (cnt = n = 0; n < i; ++n)
3052  {
3053  cnt += GetBndCondExpansions()[n]->GetExpSize();
3054  }
3055 
3056  int offsetBnd;
3057  int offsetElmt = 0;
3058  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
3059  {
3060  offsetBnd = GetBndCondExpansions()[i]->GetPhys_Offset(n);
3061 
3062  elmt = GetExp(ElmtID[cnt+n]);
3063  elmt->GetTracePhysVals(EdgeID[cnt+n],
3064  GetBndCondExpansions()[i]->GetExp(n),
3065  tmp1 = element + offsetElmt,
3066  tmp2 = boundary + offsetBnd);
3067 
3068  offsetElmt += elmt->GetTotPoints();
3069  }
3070  }
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 3114 of file ExpList.cpp.

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

Referenced by ExtractPhysToBnd(), and v_GetNumElmts().

3117  {
3118  int n, cnt;
3119  Array<OneD, NekDouble> tmp1;
3121 
3122  Array<OneD, int> ElmtID,EdgeID;
3123  GetBoundaryToElmtMap(ElmtID,EdgeID);
3124 
3125  // Initialise result
3126  bnd = Array<OneD, NekDouble>
3127  (GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
3128 
3129  // Skip other boundary regions
3130  for (cnt = n = 0; n < i; ++n)
3131  {
3132  cnt += GetBndCondExpansions()[n]->GetExpSize();
3133  }
3134 
3135  int offsetBnd;
3136  int offsetPhys;
3137  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
3138  {
3139  offsetPhys = GetPhys_Offset(ElmtID[cnt+n]);
3140  offsetBnd = GetBndCondExpansions()[i]->GetPhys_Offset(n);
3141 
3142  elmt = GetExp(ElmtID[cnt+n]);
3143  elmt->GetTracePhysVals(EdgeID[cnt+n],
3144  GetBndCondExpansions()[i]->GetExp(n),
3145  phys + offsetPhys,
3146  tmp1 = bnd + offsetBnd);
3147  }
3148  }
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 3074 of file ExpList.cpp.

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

Referenced by ExtractPhysToBndElmt(), and v_GetNumElmts().

3077  {
3078  int n, cnt, nq;
3079 
3080  Array<OneD, int> ElmtID,EdgeID;
3081  GetBoundaryToElmtMap(ElmtID,EdgeID);
3082 
3083  // Skip other boundary regions
3084  for (cnt = n = 0; n < i; ++n)
3085  {
3086  cnt += GetBndCondExpansions()[n]->GetExpSize();
3087  }
3088 
3089  // Count number of points
3090  int npoints = 0;
3091  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
3092  {
3093  npoints += GetExp(ElmtID[cnt+n])->GetTotPoints();
3094  }
3095 
3096  // Initialise result
3097  bndElmt = Array<OneD, NekDouble> (npoints, 0.0);
3098 
3099  // Extract data
3100  int offsetPhys;
3101  int offsetElmt = 0;
3102  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
3103  {
3104  nq = GetExp(ElmtID[cnt+n])->GetTotPoints();
3105  offsetPhys = GetPhys_Offset(ElmtID[cnt+n]);
3106  Vmath::Vcopy(nq, &phys[offsetPhys], 1,
3107  &bndElmt[offsetElmt], 1);
3108  offsetElmt += nq;
3109  }
3110  }
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 2675 of file ExpList.cpp.

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

Referenced by ExtractTracePhys(), and v_GetNumElmts().

2676  {
2677  boost::ignore_unused(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_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 2682 of file ExpList.cpp.

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

2685  {
2686  boost::ignore_unused(inarray, outarray);
2688  "This method is not defined or valid for this class type");
2689  }
#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 2861 of file ExpList.cpp.

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

Referenced by FillBndCondFromField(), and v_GetNumElmts().

2862  {
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_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 2869 of file ExpList.cpp.

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

2870  {
2871  boost::ignore_unused(nreg);
2873  "This method is not defined or valid for this class type");
2874  }
#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 2918 of file ExpList.cpp.

References v_FwdTrans_IterPerExp().

Referenced by FwdTrans(), and v_GetNumElmts().

2921  {
2922  boost::ignore_unused(coeffstate);
2923  v_FwdTrans_IterPerExp(inarray,outarray);
2924  }
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 2942 of file ExpList.cpp.

References GeneralMatrixOp_IterPerExp().

Referenced by GeneralMatrixOp(), and v_GetNumElmts().

2947  {
2948  boost::ignore_unused(coeffstate);
2949  GeneralMatrixOp_IterPerExp(gkey,inarray,outarray);
2950  }
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 2787 of file ExpList.cpp.

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

Referenced by GetBCValues(), and v_GetNumElmts().

2790  {
2791  boost::ignore_unused(BndVals, TotField, BndID);
2793  "This method is not defined or valid for this class type");
2794  }
#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 2551 of file ExpList.cpp.

References ASSERTL0.

Referenced by GetBndCondExpansions(), and v_GetNumElmts().

2552  {
2553  ASSERTL0(false,
2554  "This method is not defined or valid for this class type");
2555  static Array<OneD,const std::shared_ptr<ExpList> > result;
2556  return result;
2557  }
#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 3216 of file ExpList.cpp.

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

Referenced by GetBndConditions(), and v_GetNumElmts().

3217  {
3219  "This method is not defined or valid for this class type");
3220  static Array<OneD, const SpatialDomains::BoundaryConditionShPtr>
3221  result;
3222  return result;
3223  }
#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 3024 of file ExpList.cpp.

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

Referenced by GetBndElmtExpansion(), and v_GetNumElmts().

3027  {
3028  boost::ignore_unused(i, result, DeclareCoeffPhysArrays);
3030  "This method is not defined or valid for this class type");
3031  }
#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 3152 of file ExpList.cpp.

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

Referenced by GetBoundaryNormals(), and v_GetNumElmts().

3154  {
3155  int j, n, cnt, nq;
3156  int coordim = GetCoordim(0);
3157  Array<OneD, NekDouble> tmp;
3159 
3160  Array<OneD, int> ElmtID,EdgeID;
3161  GetBoundaryToElmtMap(ElmtID,EdgeID);
3162 
3163  // Initialise result
3164  normals = Array<OneD, Array<OneD, NekDouble> > (coordim);
3165  for (j = 0; j < coordim; ++j)
3166  {
3167  normals[j] = Array<OneD, NekDouble> (
3168  GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
3169  }
3170 
3171  // Skip other boundary regions
3172  for (cnt = n = 0; n < i; ++n)
3173  {
3174  cnt += GetBndCondExpansions()[n]->GetExpSize();
3175  }
3176 
3177  int offset;
3178  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
3179  {
3180  offset = GetBndCondExpansions()[i]->GetPhys_Offset(n);
3181  nq = GetBndCondExpansions()[i]->GetExp(n)->GetTotPoints();
3182 
3183  elmt = GetExp(ElmtID[cnt+n]);
3184  const Array<OneD, const Array<OneD, NekDouble> > normalsElmt
3185  = elmt->GetSurfaceNormal(EdgeID[cnt+n]);
3186  // Copy to result
3187  for (j = 0; j < coordim; ++j)
3188  {
3189  Vmath::Vcopy(nq, normalsElmt[j], 1,
3190  tmp = normals[j] + offset, 1);
3191  }
3192  }
3193  }
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 3197 of file ExpList.cpp.

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

Referenced by GetBoundaryToElmtMap(), and v_GetNumElmts().

3199  {
3200  boost::ignore_unused(ElmtID, EdgeID);
3202  "This method is not defined or valid for this class type");
3203  }
#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 2963 of file ExpList.cpp.

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

Referenced by GetCoords(), and v_GetNumElmts().

2966  {
2967  if (GetNumElmts() == 0)
2968  {
2969  return;
2970  }
2971 
2972  int i;
2973  Array<OneD, NekDouble> e_coord_0;
2974  Array<OneD, NekDouble> e_coord_1;
2975  Array<OneD, NekDouble> e_coord_2;
2976 
2977  switch(GetExp(0)->GetCoordim())
2978  {
2979  case 1:
2980  for(i= 0; i < (*m_exp).size(); ++i)
2981  {
2982  e_coord_0 = coord_0 + m_phys_offset[i];
2983  (*m_exp)[i]->GetCoords(e_coord_0);
2984  }
2985  break;
2986  case 2:
2987  ASSERTL0(coord_1.num_elements() != 0,
2988  "output coord_1 is not defined");
2989 
2990  for(i= 0; i < (*m_exp).size(); ++i)
2991  {
2992  e_coord_0 = coord_0 + m_phys_offset[i];
2993  e_coord_1 = coord_1 + m_phys_offset[i];
2994  (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1);
2995  }
2996  break;
2997  case 3:
2998  ASSERTL0(coord_1.num_elements() != 0,
2999  "output coord_1 is not defined");
3000  ASSERTL0(coord_2.num_elements() != 0,
3001  "output coord_2 is not defined");
3002 
3003  for(i= 0; i < (*m_exp).size(); ++i)
3004  {
3005  e_coord_0 = coord_0 + m_phys_offset[i];
3006  e_coord_1 = coord_1 + m_phys_offset[i];
3007  e_coord_2 = coord_2 + m_phys_offset[i];
3008  (*m_exp)[i]->GetCoords(e_coord_0,e_coord_1,e_coord_2);
3009  }
3010  break;
3011  }
3012  }
#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 2291 of file ExpList.cpp.

Referenced by GetFieldDefinitions(), and v_GetNumElmts().

2292  {
2293  std::vector<LibUtilities::FieldDefinitionsSharedPtr> returnval;
2294  v_GetFieldDefinitions(returnval);
2295  return returnval;
2296  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:2291

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

References GeneralGetFieldDefinitions().

2299  {
2300  GeneralGetFieldDefinitions(fielddef);
2301  }
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:2183

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

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

Referenced by GetFwdBwdTracePhys(), and v_GetNumElmts().

2650  {
2651  boost::ignore_unused(Fwd, Bwd);
2653  "This method is not defined or valid for this class type");
2654  }
#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 2656 of file ExpList.cpp.

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

2660  {
2661  boost::ignore_unused(field, Fwd, Bwd);
2663  "This method is not defined or valid for this class type");
2664  }
#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:362

◆ v_GetHomoLen()

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

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 2046 of file ExpList.cpp.

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

Referenced by GetHomoLen(), and v_GetNumElmts().

2047  {
2049  "This method is not defined or valid for this class type");
2050  NekDouble len = 0.0;
2051  return len;
2052  }
#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 2666 of file ExpList.cpp.

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

Referenced by GetLeftAdjacentFaces(), and v_GetNumElmts().

2667  {
2669  "This method is not defined or valid for this class type");
2670  static vector<bool> tmp;
2671  return tmp;
2672  }
#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 2468 of file ExpList.cpp.

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

Referenced by GetMovingFrames(), and v_GetNumElmts().

2472  {
2473  int npts;
2474 
2475  int MFdim = 3;
2476  int nq = outarray[0].num_elements()/MFdim;
2477 
2478  // Assume whole array is of same coordinate dimension
2479  int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
2480 
2481  Array<OneD, Array<OneD, NekDouble> > MFloc(MFdim*coordim);
2482  // Process each expansion.
2483  for(int i = 0; i < m_exp->size(); ++i)
2484  {
2485  npts = (*m_exp)[i]->GetTotPoints();
2486 
2487  for (int j=0; j< MFdim*coordim; ++j)
2488  {
2489  MFloc[j] = Array<OneD, NekDouble>(npts, 0.0);
2490  }
2491 
2492  // MF from LOCALREGIONS
2493  (*m_exp)[i]->GetMetricInfo()->GetMovingFrames(
2494  (*m_exp)[i]->GetPointsKeys(),
2495  MMFdir,
2496  CircCentre,
2497  MFloc );
2498 
2499  // Get the physical data offset for this expansion.
2500  for (int j = 0; j < MFdim; ++j)
2501  {
2502  for (int k = 0; k < coordim; ++k)
2503  {
2504  Vmath::Vcopy(npts,
2505  &MFloc[j*coordim+k][0], 1,
2506  &outarray[j][k*nq+m_phys_offset[i]], 1);
2507  }
2508  }
2509  }
2510 
2511  }
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 2611 of file ExpList.cpp.

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

Referenced by GetNormals(), and v_GetNumElmts().

2613  {
2614  boost::ignore_unused(normals);
2616  "This method is not defined or valid for this class type");
2617  }
#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 3260 of file ExpList.cpp.

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

Referenced by GetPeriodicEntities(), and v_GetNumElmts().

3264  {
3265  boost::ignore_unused(periodicVerts, periodicEdges, periodicFaces);
3267  "This method is not defined or valid for this class type");
3268  }
#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 3292 of file ExpList.cpp.

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

Referenced by GetPlane(), and v_SetHomo1DSpecVanVisc().

3293  {
3294  boost::ignore_unused(n);
3296  "This method is not defined or valid for this class type");
3297  return NullExpListSharedPtr;
3298  }
#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 3250 of file ExpList.cpp.

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

Referenced by GetRobinBCInfo(), and v_GetNumElmts().

3251  {
3253  "This method is not defined or valid for this class type");
3254  static map<int,RobinBCInfoSharedPtr> result;
3255  return result;
3256  }
#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 2590 of file ExpList.cpp.

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

Referenced by GetTrace(), and v_GetNumElmts().

2591  {
2593  "This method is not defined or valid for this class type");
2594  static std::shared_ptr<ExpList> returnVal;
2595  return returnVal;
2596  }
#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 2606 of file ExpList.cpp.

References GetTraceMap().

Referenced by GetTraceBndMap(), and v_GetNumElmts().

2607  {
2608  return GetTraceMap()->GetBndCondTraceToGlobalTraceMap();
2609  }
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 2598 of file ExpList.cpp.

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

Referenced by GetTraceMap(), and v_GetNumElmts().

2599  {
2601  "This method is not defined or valid for this class type");
2602  static std::shared_ptr<AssemblyMapDG> result;
2603  return result;
2604  }
#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 2038 of file ExpList.cpp.

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

Referenced by GetTransposition(), and v_GetNumElmts().

2039  {
2041  "This method is not defined or valid for this class type");
2043  return trans;
2044  }
#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 2069 of file ExpList.cpp.

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

Referenced by GetYIDs(), and v_GetNumElmts().

2070  {
2072  "This method is not defined or valid for this class type");
2073  Array<OneD, unsigned int> NoModes(1);
2074  return NoModes;
2075  }
#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 2061 of file ExpList.cpp.

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

Referenced by GetZIDs(), and v_GetNumElmts().

2062  {
2064  "This method is not defined or valid for this class type");
2065  Array<OneD, unsigned int> NoModes(1);
2066  return NoModes;
2067  }
#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 2894 of file ExpList.cpp.

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

Referenced by GlobalToLocal(), and v_GetNumElmts().

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

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

2903  {
2904  boost::ignore_unused(inarray, outarray);
2906  "This method is not defined or valid for this class type");
2907  }
#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 2701 of file ExpList.cpp.

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

Referenced by HelmSolve(), and v_GetNumElmts().

2710  {
2711  boost::ignore_unused(inarray, outarray, flags, factors, varcoeff,
2712  varfactors, dirForcing, PhysSpaceForcing);
2713  NEKERROR(ErrorUtil::efatal, "HelmSolve not implemented.");
2714  }
#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 2755 of file ExpList.cpp.

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

Referenced by HomogeneousBwdTrans(), and v_GetNumElmts().

2760  {
2761  boost::ignore_unused(inarray, outarray, coeffstate, Shuff, UnShuff);
2763  "This method is not defined or valid for this class type");
2764  }
#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 2030 of file ExpList.cpp.

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

Referenced by HomogeneousEnergy(), and v_GetNumElmts().

2031  {
2033  "This method is not defined or valid for this class type");
2034  Array<OneD, NekDouble> NoEnergy(1,0.0);
2035  return NoEnergy;
2036  }
#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 2744 of file ExpList.cpp.

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

Referenced by HomogeneousFwdTrans(), and v_GetNumElmts().

2749  {
2750  boost::ignore_unused(inarray, outarray, coeffstate, Shuff, UnShuff);
2752  "This method is not defined or valid for this class type");
2753  }
#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 2852 of file ExpList.cpp.

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

Referenced by ImposeDirichletConditions(), and v_GetNumElmts().

2853  {
2854  boost::ignore_unused(outarray);
2856  "This method is not defined or valid for this class type");
2857  }
#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 1997 of file ExpList.cpp.

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

Referenced by Integral(), and v_GetNumElmts().

1998  {
1999  NekDouble err = 0.0;
2000  int i = 0;
2001 
2002  for (i = 0; i < (*m_exp).size(); ++i)
2003  {
2004  err += (*m_exp)[i]->Integral(inarray + m_phys_offset[i]);
2005  }
2006  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
2007 
2008  return err;
2009  }
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 2926 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().

2930  {
2931  boost::ignore_unused(coeffstate);
2932  Array<OneD,NekDouble> tmp;
2933  for (int i = 0; i < m_collections.size(); ++i)
2934  {
2935 
2937  inarray + m_coll_phys_offset[i],
2938  tmp = outarray + m_coll_coeff_offset[i]);
2939  }
2940  }
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 1967 of file ExpList.cpp.

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

Referenced by L2(), and v_GetNumElmts().

1970  {
1971  NekDouble err = 0.0, errl2;
1972  int i;
1973 
1974  if (soln == NullNekDouble1DArray)
1975  {
1976  for (i = 0; i < (*m_exp).size(); ++i)
1977  {
1978  errl2 = (*m_exp)[i]->L2(inarray + m_phys_offset[i]);
1979  err += errl2*errl2;
1980  }
1981  }
1982  else
1983  {
1984  for (i = 0; i < (*m_exp).size(); ++i)
1985  {
1986  errl2 = (*m_exp)[i]->L2(inarray + m_phys_offset[i],
1987  soln + m_phys_offset[i]);
1988  err += errl2*errl2;
1989  }
1990  }
1991 
1992  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
1993 
1994  return sqrt(err);
1995  }
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 2716 of file ExpList.cpp.

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

Referenced by LinearAdvectionDiffusionReactionSolve(), and v_GetNumElmts().

2723  {
2724  boost::ignore_unused(velocity, inarray, outarray, lambda,
2725  coeffstate, dirForcing);
2727  "This method is not defined or valid for this class type");
2728  }
#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 2730 of file ExpList.cpp.

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

Referenced by LinearAdvectionReactionSolve(), and v_GetNumElmts().

2737  {
2738  boost::ignore_unused(velocity, inarray, outarray, lambda,
2739  coeffstate, dirForcing);
2741  "This method is not defined or valid for this class type");
2742  }
#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 2876 of file ExpList.cpp.

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

Referenced by LocalToGlobal(), and v_GetNumElmts().

2877  {
2878  boost::ignore_unused(useComm);
2880  "This method is not defined or valid for this class type");
2881  }
#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 2884 of file ExpList.cpp.

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

2887  {
2888  boost::ignore_unused(inarray, outarray, useComm);
2890  "This method is not defined or valid for this class type");
2891  }
#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 2691 of file ExpList.cpp.

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

Referenced by MultiplyByInvMassMatrix(), and v_GetNumElmts().

2695  {
2696  boost::ignore_unused(inarray, outarray, coeffstate);
2698  "This method is not defined or valid for this class type");
2699  }
#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 2796 of file ExpList.cpp.

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

Referenced by NormVectorIProductWRTBase(), and v_GetNumElmts().

2800  {
2801  boost::ignore_unused(V1, V2, outarray, BndID);
2803  "This method is not defined or valid for this class type");
2804  }
#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 2806 of file ExpList.cpp.

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

2809  {
2810  Array< OneD, NekDouble> tmp;
2811  switch (GetCoordim(0))
2812  {
2813  case 1:
2814  {
2815  for(int i = 0; i < GetExpSize(); ++i)
2816  {
2817  (*m_exp)[i]->NormVectorIProductWRTBase(
2818  V[0] + GetPhys_Offset(i),
2819  tmp = outarray + GetCoeff_Offset(i));
2820  }
2821  }
2822  break;
2823  case 2:
2824  {
2825  for(int i = 0; i < GetExpSize(); ++i)
2826  {
2827  (*m_exp)[i]->NormVectorIProductWRTBase(
2828  V[0] + GetPhys_Offset(i),
2829  V[1] + GetPhys_Offset(i),
2830  tmp = outarray + GetCoeff_Offset(i));
2831  }
2832  }
2833  break;
2834  case 3:
2835  {
2836  for(int i = 0; i < GetExpSize(); ++i)
2837  {
2838  (*m_exp)[i]->NormVectorIProductWRTBase(
2839  V[0] + GetPhys_Offset(i),
2840  V[1] + GetPhys_Offset(i),
2841  V[2] + GetPhys_Offset(i),
2842  tmp = outarray + GetCoeff_Offset(i));
2843  }
2844  }
2845  break;
2846  default:
2847  ASSERTL0(false,"Dimension not supported");
2848  break;
2849  }
2850  }
#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 2088 of file ExpList.cpp.

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

Referenced by PhysGalerkinProjection1DScaled(), and v_GetNumElmts().

2092  {
2093  boost::ignore_unused(scale, inarray, outarray);
2095  "This method is not defined or valid for this class type");
2096  }
#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 2078 of file ExpList.cpp.

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

Referenced by PhysInterp1DScaled(), and v_GetNumElmts().

2082  {
2083  boost::ignore_unused(scale, inarray, outarray);
2085  "This method is not defined or valid for this class type");
2086  }
#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 3207 of file ExpList.cpp.

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

Referenced by ReadGlobalOptimizationParameters(), and v_GetNumElmts().

3208  {
3210  "This method is not defined or valid for this class type");
3211  }
#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 1592 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().

1593  {
1594  // Reset matrix managers.
1595  LibUtilities::NekManager<LocalRegions::MatrixKey,
1596  DNekScalMat, LocalRegions::MatrixKey::opLess>::ClearManager();
1597  LibUtilities::NekManager<LocalRegions::MatrixKey,
1598  DNekScalBlkMat, LocalRegions::MatrixKey::opLess>::ClearManager();
1599 
1600  // Loop over all elements and reset geometry information.
1601  for (int i = 0; i < m_exp->size(); ++i)
1602  {
1603  (*m_exp)[i]->GetGeom()->Reset(m_graph->GetCurvedEdges(),
1604  m_graph->GetCurvedFaces());
1605  }
1606 
1607  // Loop over all elements and rebuild geometric factors.
1608  for (int i = 0; i < m_exp->size(); ++i)
1609  {
1610  (*m_exp)[i]->Reset();
1611  }
1612  }
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 2054 of file ExpList.cpp.

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

Referenced by SetHomoLen(), and v_GetNumElmts().

2055  {
2056  boost::ignore_unused(lhom);
2058  "This method is not defined or valid for this class type");
2059  }
#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 3016 of file ExpList.cpp.

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

Referenced by SetUpPhysNormals(), and v_GetNumElmts().

3017  {
3019  "This method is not defined or valid for this class type");
3020  }
#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 2559 of file ExpList.cpp.

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

Referenced by UpdateBndCondExpansion(), and v_GetNumElmts().

2560  {
2561  boost::ignore_unused(i);
2563  "This method is not defined or valid for this class type");
2564  static std::shared_ptr<ExpList> result;
2565  return result;
2566  }
#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 3227 of file ExpList.cpp.

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

Referenced by UpdateBndConditions(), and v_GetNumElmts().

3228  {
3230  "This method is not defined or valid for this class type");
3231  static Array<OneD, SpatialDomains::BoundaryConditionShPtr> result;
3232  return result;
3233  }
#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 2568 of file ExpList.cpp.

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

Referenced by Upwind(), and v_GetNumElmts().

2573  {
2574  boost::ignore_unused(Vec, Fwd, Bwd, Upwind);
2576  "This method is not defined or valid for this class type");
2577  }
#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 2579 of file ExpList.cpp.

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

2584  {
2585  boost::ignore_unused(Vn, Fwd, Bwd, Upwind);
2587  "This method is not defined or valid for this class type");
2588  }
#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 2011 of file ExpList.cpp.

References m_phys_offset.

Referenced by v_GetNumElmts(), and VectorFlux().

2012  {
2013  NekDouble flux = 0.0;
2014  int i = 0;
2015  int j;
2016 
2017  for (i = 0; i < (*m_exp).size(); ++i)
2018  {
2019  Array<OneD, Array<OneD, NekDouble> > tmp(inarray.num_elements());
2020  for (j = 0; j < inarray.num_elements(); ++j)
2021  {
2022  tmp[j] = Array<OneD, NekDouble>(inarray[j] + m_phys_offset[i]);
2023  }
2024  flux += (*m_exp)[i]->VectorFlux(tmp);
2025  }
2026 
2027  return flux;
2028  }
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 1752 of file ExpList.cpp.

References ASSERTL0, and m_exp.

Referenced by v_GetNumElmts(), and WriteTecplotConnectivity().

1754  {
1755  int i,j,k,l;
1756  int nbase = (*m_exp)[0]->GetNumBases();
1757  int cnt = 0;
1758 
1759  std::shared_ptr<LocalRegions::ExpansionVector> exp = m_exp;
1760 
1761  if (expansion != -1)
1762  {
1763  exp = std::shared_ptr<LocalRegions::ExpansionVector>(
1765  (*exp)[0] = (*m_exp)[expansion];
1766  }
1767 
1768  if (nbase == 2)
1769  {
1770  for(i = 0; i < (*exp).size(); ++i)
1771  {
1772  const int np0 = (*exp)[i]->GetNumPoints(0);
1773  const int np1 = (*exp)[i]->GetNumPoints(1);
1774 
1775  for(j = 1; j < np1; ++j)
1776  {
1777  for(k = 1; k < np0; ++k)
1778  {
1779  outfile << cnt + (j-1)*np0 + k << " ";
1780  outfile << cnt + (j-1)*np0 + k+1 << " ";
1781  outfile << cnt + j *np0 + k+1 << " ";
1782  outfile << cnt + j *np0 + k << endl;
1783  }
1784  }
1785 
1786  cnt += np0*np1;
1787  }
1788  }
1789  else if (nbase == 3)
1790  {
1791  for(i = 0; i < (*exp).size(); ++i)
1792  {
1793  const int np0 = (*exp)[i]->GetNumPoints(0);
1794  const int np1 = (*exp)[i]->GetNumPoints(1);
1795  const int np2 = (*exp)[i]->GetNumPoints(2);
1796  const int np01 = np0*np1;
1797 
1798  for(j = 1; j < np2; ++j)
1799  {
1800  for(k = 1; k < np1; ++k)
1801  {
1802  for(l = 1; l < np0; ++l)
1803  {
1804  outfile << cnt + (j-1)*np01 + (k-1)*np0 + l << " ";
1805  outfile << cnt + (j-1)*np01 + (k-1)*np0 + l+1 << " ";
1806  outfile << cnt + (j-1)*np01 + k *np0 + l+1 << " ";
1807  outfile << cnt + (j-1)*np01 + k *np0 + l << " ";
1808  outfile << cnt + j *np01 + (k-1)*np0 + l << " ";
1809  outfile << cnt + j *np01 + (k-1)*np0 + l+1 << " ";
1810  outfile << cnt + j *np01 + k *np0 + l+1 << " ";
1811  outfile << cnt + j *np01 + k *np0 + l << endl;
1812  }
1813  }
1814  }
1815  cnt += np0*np1*np2;
1816  }
1817  }
1818  else
1819  {
1820  ASSERTL0(false,"Not set up for this dimension");
1821  }
1822  }
#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 1829 of file ExpList.cpp.

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

Referenced by v_GetNumElmts(), and WriteTecplotField().

1830  {
1831  if (expansion == -1)
1832  {
1833  int totpoints = GetTotPoints();
1834  if(m_physState == false)
1835  {
1837  }
1838 
1839  for(int i = 0; i < totpoints; ++i)
1840  {
1841  outfile << m_phys[i] << " ";
1842  if(i % 1000 == 0 && i)
1843  {
1844  outfile << std::endl;
1845  }
1846  }
1847  outfile << std::endl;
1848 
1849  }
1850  else
1851  {
1852  int nPoints = (*m_exp)[expansion]->GetTotPoints();
1853 
1854  for (int i = 0; i < nPoints; ++i)
1855  {
1856  outfile << m_phys[i + m_phys_offset[expansion]] << " ";
1857  }
1858 
1859  outfile << std::endl;
1860  }
1861  }
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 1619 of file ExpList.cpp.

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

Referenced by v_GetNumElmts(), and WriteTecplotHeader().

1621  {
1622  if (GetNumElmts() == 0)
1623  {
1624  return;
1625  }
1626 
1627  int coordim = GetExp(0)->GetCoordim();
1628  char vars[3] = { 'x', 'y', 'z' };
1629 
1630  if (m_expType == e3DH1D)
1631  {
1632  coordim += 1;
1633  }
1634  else if (m_expType == e3DH2D)
1635  {
1636  coordim += 2;
1637  }
1638 
1639  outfile << "Variables = x";
1640  for (int i = 1; i < coordim; ++i)
1641  {
1642  outfile << ", " << vars[i];
1643  }
1644 
1645  if (var.size() > 0)
1646  {
1647  outfile << ", " << var;
1648  }
1649 
1650  outfile << std::endl << std::endl;
1651  }
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 1658 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().

1659  {
1660  int i, j;
1661  int coordim = GetCoordim(0);
1662  int nPoints = GetTotPoints();
1663  int nBases = (*m_exp)[0]->GetNumBases();
1664  int numBlocks = 0;
1665 
1666  Array<OneD, Array<OneD, NekDouble> > coords(3);
1667 
1668  if (expansion == -1)
1669  {
1670  nPoints = GetTotPoints();
1671 
1672  coords[0] = Array<OneD, NekDouble>(nPoints);
1673  coords[1] = Array<OneD, NekDouble>(nPoints);
1674  coords[2] = Array<OneD, NekDouble>(nPoints);
1675 
1676  GetCoords(coords[0], coords[1], coords[2]);
1677 
1678  for (i = 0; i < m_exp->size(); ++i)
1679  {
1680  int numInt = 1;
1681 
1682  for (j = 0; j < nBases; ++j)
1683  {
1684  numInt *= (*m_exp)[i]->GetNumPoints(j)-1;
1685  }
1686 
1687  numBlocks += numInt;
1688  }
1689  }
1690  else
1691  {
1692  nPoints = (*m_exp)[expansion]->GetTotPoints();
1693 
1694  coords[0] = Array<OneD, NekDouble>(nPoints);
1695  coords[1] = Array<OneD, NekDouble>(nPoints);
1696  coords[2] = Array<OneD, NekDouble>(nPoints);
1697 
1698  (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
1699 
1700  numBlocks = 1;
1701  for (j = 0; j < nBases; ++j)
1702  {
1703  numBlocks *= (*m_exp)[expansion]->GetNumPoints(j)-1;
1704  }
1705  }
1706 
1707  if (m_expType == e3DH1D)
1708  {
1709  nBases += 1;
1710  coordim += 1;
1711  int nPlanes = GetZIDs().num_elements();
1712  NekDouble tmp = numBlocks * (nPlanes-1.0) / nPlanes;
1713  numBlocks = (int)tmp;
1714  }
1715  else if (m_expType == e3DH2D)
1716  {
1717  nBases += 2;
1718  coordim += 1;
1719  }
1720 
1721  outfile << "Zone, N=" << nPoints << ", E="
1722  << numBlocks << ", F=FEBlock" ;
1723 
1724  switch(nBases)
1725  {
1726  case 2:
1727  outfile << ", ET=QUADRILATERAL" << std::endl;
1728  break;
1729  case 3:
1730  outfile << ", ET=BRICK" << std::endl;
1731  break;
1732  default:
1733  ASSERTL0(false,"Not set up for this type of output");
1734  break;
1735  }
1736 
1737  // Write out coordinates
1738  for (j = 0; j < coordim; ++j)
1739  {
1740  for (i = 0; i < nPoints; ++i)
1741  {
1742  outfile << coords[j][i] << " ";
1743  if (i % 1000 == 0 && i)
1744  {
1745  outfile << std::endl;
1746  }
1747  }
1748  outfile << std::endl;
1749  }
1750  }
#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 1891 of file ExpList.cpp.

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

Referenced by v_GetNumElmts(), and WriteVtkPieceData().

1893  {
1894  int i;
1895  int nq = (*m_exp)[expansion]->GetTotPoints();
1896 
1897  // printing the fields of that zone
1898  outfile << " <DataArray type=\"Float64\" Name=\""
1899  << var << "\">" << endl;
1900  outfile << " ";
1901  const Array<OneD, NekDouble> phys = m_phys + m_phys_offset[expansion];
1902  for(i = 0; i < nq; ++i)
1903  {
1904  outfile << (fabs(phys[i]) < NekConstants::kNekZeroTol ? 0 : phys[i]) << " ";
1905  }
1906  outfile << endl;
1907  outfile << " </DataArray>" << endl;
1908  }
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 1877 of file ExpList.cpp.

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

Referenced by v_GetNumElmts(), and WriteVtkPieceHeader().

1878  {
1879  boost::ignore_unused(outfile, expansion, istrip);
1881  "Routine not implemented for this expansion.");
1882  }
#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:2011

◆ 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:1752

◆ 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:1829

◆ 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:1619

◆ 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:1658

◆ WriteVtkFooter()

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

Definition at line 1871 of file ExpList.cpp.

Referenced by WriteTecplotConnectivity().

1872  {
1873  outfile << " </UnstructuredGrid>" << endl;
1874  outfile << "</VTKFile>" << endl;
1875  }

◆ WriteVtkHeader()

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

Definition at line 1863 of file ExpList.cpp.

Referenced by WriteTecplotConnectivity().

1864  {
1865  outfile << "<?xml version=\"1.0\"?>" << endl;
1866  outfile << "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" "
1867  << "byte_order=\"LittleEndian\">" << endl;
1868  outfile << " <UnstructuredGrid>" << endl;
1869  }

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

Referenced by WriteVtkPieceHeader().

1885  {
1886  boost::ignore_unused(expansion);
1887  outfile << " </PointData>" << endl;
1888  outfile << " </Piece>" << endl;
1889  }

◆ 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:1877

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