Nektar++
Public Member Functions | 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 (const ExpansionType Type=eNoType)
 The default constructor using a type. More...
 
 ExpList (const ExpList &in, const bool DeclareCoeffPhysArrays=true)
 The copy constructor. More...
 
 ExpList (const ExpList &in, const std::vector< unsigned int > &eIDs, const bool DeclareCoeffPhysArrays=true, const Collections::ImplementationType ImpType=Collections::eNoImpType)
 Constructor copying only elements defined in eIds. More...
 
 ExpList (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &graph, const bool DeclareCoeffPhysArrays=true, const std::string &var="DefaultVar", const Collections::ImplementationType ImpType=Collections::eNoImpType)
 Generate an ExpList from a meshgraph graph and session file. More...
 
 ExpList (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::ExpansionInfoMap &expansions, const bool DeclareCoeffPhysArrays=true, const Collections::ImplementationType ImpType=Collections::eNoImpType)
 Sets up a list of local expansions based on an expansion Map. More...
 
 ExpList (const SpatialDomains::PointGeomSharedPtr &geom)
 Specialised constructors for 0D Expansions Wrapper around LocalRegion::PointExp - used in PrePacing.cpp. More...
 
 ExpList (const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, const ExpListSharedPtr > &bndConstraint, const Array< OneD, const SpatialDomains ::BoundaryConditionShPtr > &bndCond, const LocalRegions::ExpansionVector &locexp, const SpatialDomains::MeshGraphSharedPtr &graph, const LibUtilities::CommSharedPtr &comm, const bool DeclareCoeffPhysArrays=true, const std::string variable="DefaultVar", const Collections::ImplementationType ImpType=Collections::eNoImpType)
 Generate expansions for the trace space expansions used in DisContField. More...
 
 ExpList (const LibUtilities::SessionReaderSharedPtr &pSession, const LocalRegions::ExpansionVector &locexp, const SpatialDomains::MeshGraphSharedPtr &graph, const bool DeclareCoeffPhysArrays, const std::string variable, const Collections::ImplementationType ImpType=Collections::eNoImpType)
 Generate an trace ExpList from a meshgraph graph and session file. More...
 
 ExpList (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::CompositeMap &domain, const SpatialDomains::MeshGraphSharedPtr &graph, const bool DeclareCoeffPhysArrays=true, const std::string variable="DefaultVar", bool SetToOneSpaceDimension=false, const LibUtilities::CommSharedPtr comm=LibUtilities::CommSharedPtr(), const Collections::ImplementationType ImpType=Collections::eNoImpType)
 Constructor based on domain information only for 1D & 2D boundary conditions. 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...
 
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 (int i, NekDouble val)
 Set the i th value of m_phys to value val. 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...
 
void MultiplyByQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 multiply the metric jacobi and quadrature weights More...
 
void DivideByQuadratureMetric (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 Divided by the metric jacobi and quadrature weights. More...
 
void IProductWRTBase (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 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 of all local expansion modes \(\phi_n^e(\boldsymbol{x})\). More...
 
void FwdTransLocalElmt (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)
 
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)
 
void MultiplyByMassMatrix (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void SmoothField (Array< OneD, NekDouble > &field)
 Smooth a field across elements. More...
 
GlobalLinSysKey HelmSolve (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, 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...
 
GlobalLinSysKey LinearAdvectionDiffusionReactionSolve (const Array< OneD, Array< OneD, NekDouble >> &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, 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, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
 Solve Advection Diffusion Reaction. More...
 
void FwdTransBndConstrained (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
void BwdTrans (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 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 GetCoords (const int eid, Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1=NullNekDouble1DArray, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
 
void HomogeneousFwdTrans (const int npts, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool Shuff=true, bool UnShuff=true)
 
void HomogeneousBwdTrans (const int npts, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool Shuff=true, bool UnShuff=true)
 
void DealiasedProd (const int num_dofs, const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray)
 
void DealiasedDotProd (const int num_dofs, const Array< OneD, Array< OneD, NekDouble >> &inarray1, const Array< OneD, Array< OneD, NekDouble >> &inarray2, Array< OneD, Array< OneD, NekDouble >> &outarray)
 
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 (const Array< OneD, NekDouble > coeffs)
 Fill Bnd Condition expansion from the values stored in expansion. More...
 
void FillBndCondFromField (const int nreg, const Array< OneD, NekDouble > coeffs)
 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_\infty\) error of the global 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 ()
 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 associated with the homogeneous expansion. More...
 
NekDouble GetHomoLen (void)
 This function returns the Width of homogeneous direction associated with the homogeneous expansion. More...
 
void SetHomoLen (const NekDouble lhom)
 This function sets the Width of homogeneous direction associated 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...
 
size_t 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::ExpansionSharedPtrGetExpFromGeomId (int n)
 This function returns (a shared pointer to) the local elemental expansion of the \(n^{\mathrm{th}}\) element given a global geometry ID. 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 cachedId=-1, NekDouble maxDistance=1e6)
 This function returns the index of the local elemental expansion containing the arbitrary point given by gloCoord, within a distance tolerance of tol. More...
 
int GetExpIndex (const Array< OneD, const NekDouble > &gloCoords, Array< OneD, NekDouble > &locCoords, NekDouble tol=0.0, bool returnNearestElmt=false, int cachedId=-1, NekDouble maxDistance=1e6)
 
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 local contiguous list of coeffs correspoinding to element n. More...
 
int GetPhys_Offset (int n) const
 Get the start offset position for a local contiguous list of quadrature points in a full array 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 ()
 
const Array< OneD, const NekDouble > & GetBndCondBwdWeight ()
 Get the weight value for boundary conditions. More...
 
void SetBndCondBwdWeight (const int index, const NekDouble value)
 Set the weight value for boundary conditions. More...
 
std::shared_ptr< ExpList > & UpdateBndCondExpansion (int i)
 
void Upwind (const Array< OneD, const NekDouble > &Vn, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
 
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)
 
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 GetElmtNormalLength (Array< OneD, NekDouble > &lengthsFwd, Array< OneD, NekDouble > &lengthsBwd)
 Get the length of elements in boundary normal direction. More...
 
void GetBwdWeight (Array< OneD, NekDouble > &weightAver, Array< OneD, NekDouble > &weightJump)
 Get the weight value for boundary conditions for boundary average and jump calculations. More...
 
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, bool FillBnd=true, bool PutFwdInBwdOnBCs=false, bool DoExchange=true)
 
void FillBwdWithBoundCond (const Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd, bool PutFwdInBwdOnBCs=false)
 
void AddTraceQuadPhysToField (const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &field)
 Add Fwd and Bwd value to field, a reverse procedure of GetFwdBwdTracePhys. More...
 
void AddTraceQuadPhysToOffDiag (const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &field)
 
void GetLocTraceFromTracePts (const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &locTraceFwd, Array< OneD, NekDouble > &locTraceBwd)
 
void FillBwdWithBwdWeight (Array< OneD, NekDouble > &weightave, Array< OneD, NekDouble > &weightjmp)
 Fill Bwd with boundary conditions. More...
 
void PeriodicBwdCopy (const Array< OneD, const NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
 Copy and fill the Periodic boundaries. More...
 
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)
 This function calculates the result of the multiplication of a matrix of type specified by mkey with a vector given by inarray. More...
 
void SetUpPhysNormals ()
 
void GetBoundaryToElmtMap (Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
 
virtual 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)
 
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, std::unordered_map< int, int > zIdToPlane=std::unordered_map< int, int >())
 Extract the data in fielddata into the coeffs. More...
 
void ExtractCoeffsFromFile (const std::string &fileName, LibUtilities::CommSharedPtr comm, const std::string &varName, Array< OneD, NekDouble > &coeffs)
 
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 () const
 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)
 
int GetPoolCount (std::string)
 
void UnsetGlobalLinSys (GlobalLinSysKey, bool)
 
LibUtilities::NekManager< GlobalLinSysKey, GlobalLinSys > & GetGlobalLinSysManager (void)
 
const Array< OneD, const std::pair< int, int > > & GetCoeffsToElmt () const
 Get m_coeffs to elemental value map. More...
 
void AddTraceJacToElmtJac (const Array< OneD, const DNekMatSharedPtr > &FwdMat, const Array< OneD, const DNekMatSharedPtr > &BwdMat, Array< OneD, DNekMatSharedPtr > &fieldMat)
 inverse process of v_GetFwdBwdTracePhys. Given Trace integration of Fwd and Bwd Jacobian, with dimension NtotalTrace*TraceCoef*TracePhys. return Elemental Jacobian matrix with dimension NtotalElement*ElementCoef*ElementPhys. More...
 
void GetMatIpwrtDeriveBase (const Array< OneD, const Array< OneD, NekDouble >> &inarray, const int nDirctn, Array< OneD, DNekMatSharedPtr > &mtxPerVar)
 
void GetMatIpwrtDeriveBase (const TensorOfArray3D< NekDouble > &inarray, Array< OneD, DNekMatSharedPtr > &mtxPerVar)
 
void GetDiagMatIpwrtBase (const Array< OneD, const Array< OneD, NekDouble >> &inarray, Array< OneD, DNekMatSharedPtr > &mtxPerVar)
 
void AddTraceIntegralToOffDiag (const Array< OneD, const NekDouble > &FwdFlux, const Array< OneD, const NekDouble > &BwdFlux, Array< OneD, NekDouble > &outarray)
 
void AddRightIPTPhysDerivBase (const int dir, const Array< OneD, const DNekMatSharedPtr > ElmtJacQuad, Array< OneD, DNekMatSharedPtr > ElmtJacCoef)
 
void AddRightIPTBaseMatrix (const Array< OneD, const DNekMatSharedPtr > ElmtJacQuad, Array< OneD, DNekMatSharedPtr > ElmtJacCoef)
 
const LocTraceToTraceMapSharedPtrGetLocTraceToTraceMap () const
 
std::vector< bool > & GetLeftAdjacentTraces (void)
 
const std::unordered_map< int, int > & GetElmtToExpId (void)
 This function returns the map of index inside m_exp to geom id. More...
 
int GetElmtToExpId (int elmtId)
 This function returns the index inside m_exp for a given geom id. More...
 

Protected Member Functions

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...
 
virtual size_t v_GetNumElmts (void)
 
virtual const Array< OneD, const std::shared_ptr< ExpList > > & v_GetBndCondExpansions (void)
 
virtual const Array< OneD, const NekDouble > & v_GetBndCondBwdWeight ()
 
virtual void v_SetBndCondBwdWeight (const int index, const NekDouble value)
 
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 const std::shared_ptr< LocTraceToTraceMap > & v_GetLocTraceToTraceMap (void) const
 
virtual std::vector< bool > & v_GetLeftAdjacentTraces (void)
 
virtual void v_GetNormals (Array< OneD, Array< OneD, NekDouble >> &normals)
 Populate normals with the normals of all expansions. More...
 
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, bool FillBnd=true, bool PutFwdInBwdOnBCs=false, bool DoExchange=true)
 
virtual void v_FillBwdWithBoundCond (const Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd, bool PutFwdInBwdOnBCs)
 
virtual void v_AddTraceQuadPhysToField (const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &field)
 
virtual void v_AddTraceQuadPhysToOffDiag (const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &field)
 
virtual void v_GetLocTraceFromTracePts (const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &locTraceFwd, Array< OneD, NekDouble > &locTraceBwd)
 
virtual void v_FillBwdWithBwdWeight (Array< OneD, NekDouble > &weightave, Array< OneD, NekDouble > &weightjmp)
 
virtual void v_PeriodicBwdCopy (const Array< OneD, const 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)
 
virtual GlobalLinSysKey v_HelmSolve (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::ConstFactorMap &factors, const StdRegions::VarCoeffMap &varcoeff, const MultiRegions::VarFactorsMap &varfactors, const Array< OneD, const NekDouble > &dirForcing, const bool PhysSpaceForcing)
 
virtual GlobalLinSysKey v_LinearAdvectionDiffusionReactionSolve (const Array< OneD, Array< OneD, NekDouble >> &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, 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, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
 
virtual void v_ImposeDirichletConditions (Array< OneD, NekDouble > &outarray)
 
virtual void v_FillBndCondFromField (const Array< OneD, NekDouble > coeffs)
 
virtual void v_FillBndCondFromField (const int nreg, const Array< OneD, NekDouble > coeffs)
 
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)
 
virtual void v_FwdTrans (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_FwdTransLocalElmt (const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
 
virtual void v_FwdTransBndConstrained (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)
 
virtual void v_GetCoords (Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1=NullNekDouble1DArray, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
 
virtual void v_GetCoords (const int eid, Array< OneD, NekDouble > &xc0, Array< OneD, NekDouble > &xc1, Array< OneD, NekDouble > &xc2)
 
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 int npts, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool Shuff=true, bool UnShuff=true)
 
virtual void v_HomogeneousBwdTrans (const int npts, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool Shuff=true, bool UnShuff=true)
 
virtual void v_DealiasedProd (const int num_dofs, const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray)
 
virtual void v_DealiasedDotProd (const int num_dofs, const Array< OneD, Array< OneD, NekDouble >> &inarray1, const Array< OneD, Array< OneD, NekDouble >> &inarray2, Array< OneD, Array< OneD, NekDouble >> &outarray)
 
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 ()
 : Set up a normal along the trace elements between two elements at elemental level More...
 
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 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, std::unordered_map< int, int > zIdToPlane)
 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_WriteVtkPieceData (std::ostream &outfile, int expansion, std::string var)
 
virtual void v_WriteVtkPieceHeader (std::ostream &outfile, int expansion, int istrip)
 
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)
 
virtual int v_GetPoolCount (std::string)
 
virtual void v_UnsetGlobalLinSys (GlobalLinSysKey, bool)
 
virtual LibUtilities::NekManager< GlobalLinSysKey, GlobalLinSys > & v_GetGlobalLinSysManager (void)
 
void ExtractFileBCs (const std::string &fileName, LibUtilities::CommSharedPtr comm, const std::string &varName, const std::shared_ptr< ExpList > locExpList)
 
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)
 
virtual void v_AddTraceIntegralToOffDiag (const Array< OneD, const NekDouble > &FwdFlux, const Array< OneD, const NekDouble > &BwdFlux, Array< OneD, NekDouble > &outarray)
 

Static Protected Member Functions

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

Protected Attributes

ExpansionType m_expType
 Exapnsion type. More...
 
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< bool > m_collectionsDoInit
 Vector of bools to act as an initialise on first call flag. More...
 
std::vector< int > m_coll_coeff_offset
 Offset of elemental data into the array m_coeffs. More...
 
std::vector< int > m_coll_phys_offset
 Offset of elemental data into the array m_phys. More...
 
Array< OneD, int > m_coeff_offset
 Offset of elemental data into the array m_coeffs. More...
 
Array< OneD, int > m_phys_offset
 Offset of elemental data into the array m_phys. More...
 
Array< OneD, std::pair< int, int > > m_coeffsToElmt
 m_coeffs to elemental value map More...
 
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

void SetupCoeffPhys (bool DeclareCoeffPhysArrays=true, bool SetupOffsets=true)
 Definition of the total number of degrees of freedom and quadrature points and offsets to access data. More...
 
void InitialiseExpVector (const SpatialDomains::ExpansionInfoMap &expmap)
 Define a list of elements using the geometry and basis key information in expmap;. More...
 

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.

Definition at line 102 of file ExpList.h.

Constructor & Destructor Documentation

◆ ExpList() [1/9]

Nektar::MultiRegions::ExpList::ExpList ( const ExpansionType  type = eNoType)

The default constructor using a type.

Creates an empty expansion list.

Definition at line 102 of file ExpList.cpp.

103  : m_expType(type), m_ncoeffs(0), m_npoints(0), m_physState(false),
106  m_WaveSpace(false)
107 {
108 }
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
BlockMatrixMapShPtr m_blockMat
Definition: ExpList.h:1125
bool m_physState
The state of the array m_phys.
Definition: ExpList.h:1100
std::shared_ptr< LocalRegions::ExpansionVector > m_exp
The list of local expansions.
Definition: ExpList.h:1111
int m_ncoeffs
The total number of local degrees of freedom. m_ncoeffs .
Definition: ExpList.h:1056
ExpansionType m_expType
Exapnsion type.
Definition: ExpList.h:1044

◆ ExpList() [2/9]

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

119  : std::enable_shared_from_this<ExpList>(in), m_expType(in.m_expType),
120 
121  m_comm(in.m_comm), m_session(in.m_session), m_graph(in.m_graph),
122  m_ncoeffs(in.m_ncoeffs), m_npoints(in.m_npoints), m_physState(false),
123  m_exp(in.m_exp), m_collections(in.m_collections),
124  m_collectionsDoInit(in.m_collectionsDoInit),
125  m_coll_coeff_offset(in.m_coll_coeff_offset),
126  m_coll_phys_offset(in.m_coll_phys_offset),
127  m_coeff_offset(in.m_coeff_offset), m_phys_offset(in.m_phys_offset),
128  m_blockMat(in.m_blockMat), m_WaveSpace(false),
129  m_elmtToExpId(in.m_elmtToExpId)
130 {
131 
132  // Set up m_coeffs, m_phys and offset arrays.
133  // use this to keep memory declaration in one place
134  SetupCoeffPhys(DeclareCoeffPhysArrays, false);
135 }
void SetupCoeffPhys(bool DeclareCoeffPhysArrays=true, bool SetupOffsets=true)
Definition of the total number of degrees of freedom and quadrature points and offsets to access data...
Definition: ExpList.cpp:1099
Array< OneD, int > m_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1120
std::vector< bool > m_collectionsDoInit
Vector of bools to act as an initialise on first call flag.
Definition: ExpList.h:1114
std::vector< int > m_coll_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1118
LibUtilities::CommSharedPtr m_comm
Communicator.
Definition: ExpList.h:1049
SpatialDomains::MeshGraphSharedPtr m_graph
Mesh associated with this expansion list.
Definition: ExpList.h:1053
std::vector< int > m_coll_coeff_offset
Offset of elemental data into the array m_coeffs.
Definition: ExpList.h:1116
Collections::CollectionVector m_collections
Definition: ExpList.h:1112
std::unordered_map< int, int > m_elmtToExpId
Mapping from geometry ID of element to index inside m_exp.
Definition: ExpList.h:1132
LibUtilities::SessionReaderSharedPtr m_session
Session.
Definition: ExpList.h:1051
Array< OneD, int > m_phys_offset
Offset of elemental data into the array m_phys.
Definition: ExpList.h:1122

References SetupCoeffPhys().

◆ ExpList() [3/9]

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

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

145  : m_expType(in.m_expType), m_comm(in.m_comm), m_session(in.m_session),
146  m_graph(in.m_graph), m_physState(false),
149  m_WaveSpace(false)
150 {
151  for (int i = 0; i < eIDs.size(); ++i)
152  {
153  (*m_exp).push_back((*(in.m_exp))[eIDs[i]]);
154  }
155 
156  // Set up m_coeffs, m_phys and offset arrays.
157  SetupCoeffPhys(DeclareCoeffPhysArrays);
158 
159  // set up collections
160  CreateCollections(ImpType);
161 }
void CreateCollections(Collections::ImplementationType ImpType=Collections::eNoImpType)
Construct collections of elements containing a single element type and polynomial order from the list...
Definition: ExpList.cpp:5103

References CreateCollections(), m_exp, and SetupCoeffPhys().

◆ ExpList() [4/9]

Nektar::MultiRegions::ExpList::ExpList ( const LibUtilities::SessionReaderSharedPtr pSession,
const SpatialDomains::MeshGraphSharedPtr graph,
const bool  DeclareCoeffPhysArrays = true,
const std::string &  var = "DefaultVar",
const Collections::ImplementationType  ImpType = Collections::eNoImpType 
)

Generate an ExpList from a meshgraph graph and session file.

Given a meshgraph graph, containing information about the domain and the spectral/hp element expansion, this constructor fills the list of local expansions \texttt{m_exp} with the proper expansions, calculates the total number of quadrature points \(x_i\) and local expansion coefficients \(\hat{u}^e_n\) and

Parameters
pSessionA session within information about expansion
graphA meshgraph, containing information about the domain and the spectral/hp element expansion.
DeclareCoeffPhysArraysDeclare the coefficient and phys space arrays
ImpTypeDetail about the implementation type to use in operators

Definition at line 182 of file ExpList.cpp.

186  : m_comm(pSession->GetComm()), m_session(pSession), m_graph(graph),
187  m_physState(false),
190  m_WaveSpace(false)
191 {
192  // Retrieve the list of expansions
193  const SpatialDomains::ExpansionInfoMap &expansions =
194  graph->GetExpansionInfo(var);
195 
196  // Initialise Expansionn Vector
197  InitialiseExpVector(expansions);
198 
199  // Setup phys coeff space
200  SetupCoeffPhys(DeclareCoeffPhysArrays);
201 
202  // Initialise collection
203  CreateCollections(ImpType);
204 }
void InitialiseExpVector(const SpatialDomains::ExpansionInfoMap &expmap)
Define a list of elements using the geometry and basis key information in expmap;.
Definition: ExpList.cpp:1142
std::map< int, ExpansionInfoShPtr > ExpansionInfoMap
Definition: MeshGraph.h:143

References CreateCollections(), InitialiseExpVector(), and SetupCoeffPhys().

◆ ExpList() [5/9]

Nektar::MultiRegions::ExpList::ExpList ( const LibUtilities::SessionReaderSharedPtr pSession,
const SpatialDomains::ExpansionInfoMap expansions,
const bool  DeclareCoeffPhysArrays = true,
const Collections::ImplementationType  ImpType = Collections::eNoImpType 
)

Sets up a list of local expansions based on an expansion Map.

Given an expansion vector expansions, containing information about the domain and the spectral/hp element expansion, this constructor fills the list of local expansions \texttt{m_exp} with the proper expansions, calculates the total number of quadrature points \(\boldsymbol{x}_i\) and local expansion coefficients \(\hat{u}^e_n\).

Parameters
pSessionA session within information about expansion
expansionsA vector containing information about the domain and the spectral/hp element expansion.
DeclareCoeffPhysArraysDeclare the coefficient and phys space arrays
ImpTypeDetail about the implementation type to use in operators

Definition at line 224 of file ExpList.cpp.

228  : m_comm(pSession->GetComm()), m_session(pSession), m_physState(false),
231  m_WaveSpace(false)
232 {
233 
234  // Initialise expansion vector
235  InitialiseExpVector(expansions);
236 
237  // Set up m_coeffs, m_phys and offset arrays.
238  SetupCoeffPhys(DeclareCoeffPhysArrays);
239 
240  // Setup Collection
241  CreateCollections(ImpType);
242 }

References CreateCollections(), InitialiseExpVector(), and SetupCoeffPhys().

◆ ExpList() [6/9]

Nektar::MultiRegions::ExpList::ExpList ( const SpatialDomains::PointGeomSharedPtr geom)

Specialised constructors for 0D Expansions Wrapper around LocalRegion::PointExp - used in PrePacing.cpp.

Definition at line 247 of file ExpList.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::LibUtilities::Point, and SetupCoeffPhys().

◆ ExpList() [7/9]

Nektar::MultiRegions::ExpList::ExpList ( const LibUtilities::SessionReaderSharedPtr pSession,
const Array< OneD, const ExpListSharedPtr > &  bndConstraint,
const Array< OneD, const SpatialDomains ::BoundaryConditionShPtr > &  bndCond,
const LocalRegions::ExpansionVector locexp,
const SpatialDomains::MeshGraphSharedPtr graph,
const LibUtilities::CommSharedPtr comm,
const bool  DeclareCoeffPhysArrays = true,
const std::string  variable = "DefaultVar",
const Collections::ImplementationType  ImpType = Collections::eNoImpType 
)

Generate expansions for the trace space expansions used in DisContField.

◆ ExpList() [8/9]

Nektar::MultiRegions::ExpList::ExpList ( const LibUtilities::SessionReaderSharedPtr pSession,
const LocalRegions::ExpansionVector locexp,
const SpatialDomains::MeshGraphSharedPtr graph,
const bool  DeclareCoeffPhysArrays,
const std::string  variable,
const Collections::ImplementationType  ImpType = Collections::eNoImpType 
)

Generate an trace ExpList from a meshgraph graph and session file.

Set expansions for localtrace space expansions used in DisContField as part of Gradient Jump Penalisation

Parameters
pSessionA session within information about expansion
locexpComplete domain expansion list.
graphmesh corresponding to the expansion list.
DeclareCoeffPhysArraysDeclare the coefficient and phys space arrays
variableThe variable name associated with the expansion
ImpTypeDetail about the implementation type to use in operators

Definition at line 779 of file ExpList.cpp.

784  : m_comm(pSession->GetComm()), m_session(pSession), m_graph(graph),
785  m_physState(false),
788  m_WaveSpace(false)
789 {
790  boost::ignore_unused(variable, ImpType);
791  int i, j, elmtid = 0;
792 
799 
805 
806  for (i = 0; i < locexp.size(); ++i)
807  {
808  if ((exp1D = std::dynamic_pointer_cast<LocalRegions::Expansion1D>(
809  locexp[i])))
810  {
811  m_expType = e0D;
812 
813  for (j = 0; j < 2; ++j)
814  {
815  PointGeom = (exp1D->GetGeom1D())->GetVertex(j);
816 
818  PointGeom);
819  exp->SetElmtId(elmtid++);
820  (*m_exp).push_back(exp);
821  }
822  }
823  else if ((exp2D = std::dynamic_pointer_cast<LocalRegions::Expansion2D>(
824  locexp[i])))
825  {
826  m_expType = e1D;
827  LibUtilities::BasisKey edgeKey0 =
828  locexp[i]->GetBasis(0)->GetBasisKey();
829 
830  for (j = 0; j < locexp[i]->GetNtraces(); ++j)
831  {
832  segGeom = exp2D->GetGeom2D()->GetEdge(j);
833 
834  int dir = exp2D->GetGeom2D()->GetDir(j);
835 
836  if (locexp[i]->GetNtraces() == 3)
837  {
838  LibUtilities::BasisKey edgeKey =
839  locexp[i]->GetBasis(dir)->GetBasisKey();
840 
841  LibUtilities::BasisKey nEdgeKey(edgeKey0.GetBasisType(),
842  edgeKey.GetNumModes(),
843  edgeKey.GetPointsKey());
844 
845  exp =
847  nEdgeKey, segGeom);
848  }
849  else
850  {
851  exp =
853  locexp[i]->GetBasis(dir)->GetBasisKey(), segGeom);
854  }
855 
856  exp->SetElmtId(elmtid++);
857  (*m_exp).push_back(exp);
858  }
859  }
860  else if ((exp3D = dynamic_pointer_cast<LocalRegions::Expansion3D>(
861  locexp[i])))
862  {
863  m_expType = e2D;
864 
865  LibUtilities::BasisKey face0_dir0 =
866  locexp[i]->GetBasis(0)->GetBasisKey();
867  LibUtilities::BasisKey face0_dir1 =
868  locexp[i]->GetBasis(1)->GetBasisKey();
869 
870  for (j = 0; j < exp3D->GetNtraces(); ++j)
871  {
872  FaceGeom = exp3D->GetGeom3D()->GetFace(j);
873 
874  int dir0 = exp3D->GetGeom3D()->GetDir(j, 0);
875  int dir1 = exp3D->GetGeom3D()->GetDir(j, 1);
876 
877  LibUtilities::BasisKey face_dir0 =
878  locexp[i]->GetBasis(dir0)->GetBasisKey();
879  LibUtilities::BasisKey face_dir1 =
880  locexp[i]->GetBasis(dir1)->GetBasisKey();
881 
882  if ((QuadGeom =
883  std::dynamic_pointer_cast<SpatialDomains::QuadGeom>(
884  FaceGeom)))
885  {
886  exp =
888  face_dir0, face_dir1, QuadGeom);
889  }
890  else if ((TriGeom = std::dynamic_pointer_cast<
891  SpatialDomains::TriGeom>(FaceGeom)))
892  {
893 
894  LibUtilities::BasisKey nface_dir0(face0_dir0.GetBasisType(),
895  face_dir0.GetNumModes(),
896  face_dir0.GetPointsKey());
897  LibUtilities::BasisKey nface_dir1(face0_dir1.GetBasisType(),
898  face_dir1.GetNumModes(),
899  face_dir1.GetPointsKey());
900  exp =
902  nface_dir0, nface_dir1, TriGeom);
903  }
904  exp->SetElmtId(elmtid++);
905  (*m_exp).push_back(exp);
906  }
907  }
908  }
909 
910  // Set up m_coeffs, m_phys and offset arrays.
911  SetupCoeffPhys(DeclareCoeffPhysArrays);
912 
913  // Set up collections
914  if (m_expType != e0D)
915  {
916  CreateCollections(ImpType);
917  }
918 }
std::shared_ptr< Expansion > ExpansionSharedPtr
Definition: Expansion.h:68
std::shared_ptr< Expansion2D > Expansion2DSharedPtr
Definition: Expansion1D.h:47
std::shared_ptr< Expansion0D > Expansion0DSharedPtr
Definition: Expansion0D.h:48
std::shared_ptr< Expansion1D > Expansion1DSharedPtr
Definition: Expansion1D.h:51
std::shared_ptr< Expansion3D > Expansion3DSharedPtr
Definition: Expansion2D.h:50
std::shared_ptr< QuadGeom > QuadGeomSharedPtr
Definition: HexGeom.h:46
std::shared_ptr< PointGeom > PointGeomSharedPtr
Definition: Geometry.h:59
std::shared_ptr< Geometry2D > Geometry2DSharedPtr
Definition: Geometry.h:65
std::shared_ptr< TriGeom > TriGeomSharedPtr
Definition: TriGeom.h:58
std::shared_ptr< Geometry1D > Geometry1DSharedPtr
Definition: Geometry.h:63

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), CreateCollections(), Nektar::MultiRegions::e0D, Nektar::MultiRegions::e1D, Nektar::MultiRegions::e2D, Nektar::LibUtilities::BasisKey::GetBasisType(), Nektar::LibUtilities::BasisKey::GetNumModes(), Nektar::LibUtilities::BasisKey::GetPointsKey(), m_expType, and SetupCoeffPhys().

◆ ExpList() [9/9]

Nektar::MultiRegions::ExpList::ExpList ( const LibUtilities::SessionReaderSharedPtr pSession,
const SpatialDomains::CompositeMap domain,
const SpatialDomains::MeshGraphSharedPtr graph,
const bool  DeclareCoeffPhysArrays = true,
const std::string  variable = "DefaultVar",
bool  SetToOneSpaceDimension = false,
const LibUtilities::CommSharedPtr  comm = LibUtilities::CommSharedPtr(),
const Collections::ImplementationType  ImpType = Collections::eNoImpType 
)

Constructor based on domain information only for 1D & 2D boundary conditions.

Fills the list of local expansions with the trace from the mesh specified by domain. This CompositeMap contains a list of Composites which define the boundary. It is also used to set up expansion domains in the 1D Pulse Wave solver.

Parameters
pSessionA session within information about expansion
domainA domain, comprising of one or more composite regions,
graphA mesh, containing information about the domain and the spectral/hp element expansion.
DeclareCoeffPhysArraysDeclare the coefficient and phys space arrays. Default is true.
variableThe variable name associated with the expansion
SetToOneSpaceDimensionReduce to one space dimension expansion
commAn optional communicator that can be used with the boundary expansion in case of more global parallel operations. Default to a Null Communicator
ImpTypeDetail about the implementation type to use in operators. Default is eNoImpType.

Definition at line 942 of file ExpList.cpp.

949  : m_comm(comm), m_session(pSession), m_graph(graph), m_physState(false),
952  m_WaveSpace(false)
953 {
954  int j, elmtid = 0;
959 
961 
963 
964  int meshdim = graph->GetMeshDimension();
965 
966  // Retrieve the list of expansions (needed of meshdim == 1
967  const SpatialDomains::ExpansionInfoMap &expansions =
968  graph->GetExpansionInfo(variable);
969 
970  // Retrieve the list of expansions
971  // Process each composite region.
972  for (auto &compIt : domain)
973  {
974  // Process each expansion in the region.
975  for (j = 0; j < compIt.second->m_geomVec.size(); ++j)
976  {
977  if ((PtGeom = std::dynamic_pointer_cast<SpatialDomains::PointGeom>(
978  compIt.second->m_geomVec[j])))
979  {
980  m_expType = e0D;
981 
983  PtGeom);
984  }
985  else if ((SegGeom =
986  std::dynamic_pointer_cast<SpatialDomains::SegGeom>(
987  compIt.second->m_geomVec[j])))
988  {
989  m_expType = e1D;
990 
991  // Retrieve the basis key from the expansion.
992  LibUtilities::BasisKey bkey = LibUtilities::NullBasisKey;
993 
994  if (meshdim == 1)
995  {
996  auto expIt = expansions.find(SegGeom->GetGlobalID());
997  ASSERTL0(expIt != expansions.end(),
998  "Failed to find basis key");
999  bkey = expIt->second->m_basisKeyVector[0];
1000  }
1001  else
1002  {
1003  bkey = graph->GetEdgeBasisKey(SegGeom, variable);
1004  }
1005 
1006  if (SetToOneSpaceDimension)
1007  {
1008  SpatialDomains::SegGeomSharedPtr OneDSegmentGeom =
1009  SegGeom->GenerateOneSpaceDimGeom();
1010 
1011  exp =
1013  bkey, OneDSegmentGeom);
1014  }
1015  else
1016  {
1017 
1018  exp =
1020  bkey, SegGeom);
1021  }
1022  }
1023  else if ((TriGeom =
1024  std::dynamic_pointer_cast<SpatialDomains::TriGeom>(
1025  compIt.second->m_geomVec[j])))
1026  {
1027  m_expType = e2D;
1028 
1029  LibUtilities::BasisKey TriBa =
1030  graph->GetFaceBasisKey(TriGeom, 0, variable);
1031  LibUtilities::BasisKey TriBb =
1032  graph->GetFaceBasisKey(TriGeom, 1, variable);
1033 
1034  if (graph->GetExpansionInfo()
1035  .begin()
1036  ->second->m_basisKeyVector[0]
1037  .GetBasisType() == LibUtilities::eGLL_Lagrange)
1038  {
1039  NEKERROR(ErrorUtil::efatal, "This method needs sorting");
1041 
1042  exp = MemoryManager<
1043  LocalRegions::NodalTriExp>::AllocateSharedPtr(TriBa,
1044  TriBb,
1045  TriNb,
1046  TriGeom);
1047  }
1048  else
1049  {
1050  exp =
1052  TriBa, TriBb, TriGeom);
1053  }
1054  }
1055  else if ((QuadGeom =
1056  std::dynamic_pointer_cast<SpatialDomains::QuadGeom>(
1057  compIt.second->m_geomVec[j])))
1058  {
1059  m_expType = e2D;
1060 
1061  LibUtilities::BasisKey QuadBa =
1062  graph->GetFaceBasisKey(QuadGeom, 0, variable);
1063  LibUtilities::BasisKey QuadBb =
1064  graph->GetFaceBasisKey(QuadGeom, 1, variable);
1065 
1067  QuadBa, QuadBb, QuadGeom);
1068  }
1069  else
1070  {
1072  "dynamic cast to a Geom (possibly 3D) failed");
1073  }
1074 
1075  exp->SetElmtId(elmtid++);
1076  (*m_exp).push_back(exp);
1077  }
1078  }
1079 
1080  // Set up m_coeffs, m_phys and offset arrays.
1081  SetupCoeffPhys(DeclareCoeffPhysArrays);
1082 
1083  if (m_expType != e0D)
1084  {
1085  CreateCollections(ImpType);
1086  }
1087 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:215
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
Definition: ErrorUtil.hpp:209
static const BasisKey NullBasisKey(eNoBasisType, 0, NullPointsKey)
Defines a null basis with no type or points.
@ eNodalTriElec
2D Nodal Electrostatic Points on a Triangle
Definition: PointsType.h:83
@ eGLL_Lagrange
Lagrange for SEM basis .
Definition: BasisType.h:58
std::shared_ptr< SegGeom > SegGeomSharedPtr
Definition: Geometry2D.h:62

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, CreateCollections(), Nektar::MultiRegions::e0D, Nektar::MultiRegions::e1D, Nektar::MultiRegions::e2D, Nektar::ErrorUtil::efatal, Nektar::LibUtilities::eGLL_Lagrange, Nektar::LibUtilities::eNodalTriElec, m_expType, NEKERROR, Nektar::LibUtilities::NullBasisKey(), and SetupCoeffPhys().

◆ ~ExpList()

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

The default destructor.

Definition at line 1315 of file ExpList.cpp.

1316 {
1317 }

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

2142 {
2143  v_AddFwdBwdTraceIntegral(Fwd, Bwd, outarray);
2144 }
virtual void v_AddFwdBwdTraceIntegral(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:4397

References v_AddFwdBwdTraceIntegral().

◆ AddRightIPTBaseMatrix()

void Nektar::MultiRegions::ExpList::AddRightIPTBaseMatrix ( const Array< OneD, const DNekMatSharedPtr ElmtJacQuad,
Array< OneD, DNekMatSharedPtr ElmtJacCoef 
)

Definition at line 5913 of file ExpList.cpp.

5916 {
5917  int nelmt;
5918  int nelmtcoef, nelmtpnts, nelmtcoef0, nelmtpnts0;
5919 
5920  nelmtcoef = GetNcoeffs(0);
5921  nelmtpnts = GetTotPoints(0);
5922 
5923  Array<OneD, NekDouble> innarray(nelmtpnts, 0.0);
5924  Array<OneD, NekDouble> outarray(nelmtcoef, 0.0);
5925 
5926  Array<OneD, NekDouble> MatQ_data;
5927  Array<OneD, NekDouble> MatC_data;
5928 
5929  DNekMatSharedPtr tmpMatQ, tmpMatC;
5930 
5931  nelmtcoef0 = nelmtcoef;
5932  nelmtpnts0 = nelmtpnts;
5933 
5934  for (nelmt = 0; nelmt < (*m_exp).size(); ++nelmt)
5935  {
5936  nelmtcoef = GetNcoeffs(nelmt);
5937  nelmtpnts = GetTotPoints(nelmt);
5938 
5939  tmpMatQ = ElmtJacQuad[nelmt];
5940  tmpMatC = ElmtJacCoef[nelmt];
5941 
5942  MatQ_data = tmpMatQ->GetPtr();
5943  MatC_data = tmpMatC->GetPtr();
5944 
5945  if (nelmtcoef != nelmtcoef0)
5946  {
5947  outarray = Array<OneD, NekDouble>(nelmtcoef, 0.0);
5948  nelmtcoef0 = nelmtcoef;
5949  }
5950 
5951  if (nelmtpnts != nelmtpnts0)
5952  {
5953  innarray = Array<OneD, NekDouble>(nelmtpnts, 0.0);
5954  nelmtpnts0 = nelmtpnts;
5955  }
5956 
5957  for (int np = 0; np < nelmtcoef; np++)
5958  {
5959  Vmath::Vcopy(nelmtpnts, &MatQ_data[0] + np, nelmtcoef, &innarray[0],
5960  1);
5961  (*m_exp)[nelmt]->DivideByQuadratureMetric(innarray, innarray);
5962  (*m_exp)[nelmt]->IProductWRTBase(innarray, outarray);
5963 
5964  Vmath::Vadd(nelmtcoef, &outarray[0], 1, &MatC_data[0] + np,
5965  nelmtcoef, &MatC_data[0] + np, nelmtcoef);
5966  }
5967  }
5968 }
int GetNcoeffs(void) const
Returns the total number of local degrees of freedom .
Definition: ExpList.h:1492
int GetTotPoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1537
std::shared_ptr< DNekMat > DNekMatSharedPtr
Definition: NekTypeDefs.hpp:75
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
Definition: Vmath.cpp:359
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1255

References GetNcoeffs(), GetTotPoints(), Vmath::Vadd(), and Vmath::Vcopy().

◆ AddRightIPTPhysDerivBase()

void Nektar::MultiRegions::ExpList::AddRightIPTPhysDerivBase ( const int  dir,
const Array< OneD, const DNekMatSharedPtr ElmtJacQuad,
Array< OneD, DNekMatSharedPtr ElmtJacCoef 
)

Definition at line 5856 of file ExpList.cpp.

5859 {
5860  int nelmt;
5861  int nelmtcoef, nelmtpnts, nelmtcoef0, nelmtpnts0;
5862 
5863  nelmtcoef = GetNcoeffs(0);
5864  nelmtpnts = GetTotPoints(0);
5865 
5866  Array<OneD, NekDouble> innarray(nelmtpnts, 0.0);
5867  Array<OneD, NekDouble> outarray(nelmtcoef, 0.0);
5868 
5869  Array<OneD, NekDouble> MatQ_data;
5870  Array<OneD, NekDouble> MatC_data;
5871 
5872  DNekMatSharedPtr tmpMatQ, tmpMatC;
5873 
5874  nelmtcoef0 = nelmtcoef;
5875  nelmtpnts0 = nelmtpnts;
5876 
5877  for (nelmt = 0; nelmt < (*m_exp).size(); ++nelmt)
5878  {
5879  nelmtcoef = GetNcoeffs(nelmt);
5880  nelmtpnts = GetTotPoints(nelmt);
5881 
5882  tmpMatQ = ElmtJacQuad[nelmt];
5883  tmpMatC = ElmtJacCoef[nelmt];
5884 
5885  MatQ_data = tmpMatQ->GetPtr();
5886  MatC_data = tmpMatC->GetPtr();
5887 
5888  if (nelmtcoef != nelmtcoef0)
5889  {
5890  outarray = Array<OneD, NekDouble>(nelmtcoef, 0.0);
5891  nelmtcoef0 = nelmtcoef;
5892  }
5893 
5894  if (nelmtpnts != nelmtpnts0)
5895  {
5896  innarray = Array<OneD, NekDouble>(nelmtpnts, 0.0);
5897  nelmtpnts0 = nelmtpnts;
5898  }
5899 
5900  for (int np = 0; np < nelmtcoef; np++)
5901  {
5902  Vmath::Vcopy(nelmtpnts, &MatQ_data[0] + np, nelmtcoef, &innarray[0],
5903  1);
5904  (*m_exp)[nelmt]->DivideByQuadratureMetric(innarray, innarray);
5905  (*m_exp)[nelmt]->IProductWRTDerivBase(dir, innarray, outarray);
5906 
5907  Vmath::Vadd(nelmtcoef, &outarray[0], 1, &MatC_data[0] + np,
5908  nelmtcoef, &MatC_data[0] + np, nelmtcoef);
5909  }
5910  }
5911 }

References GetNcoeffs(), GetTotPoints(), Vmath::Vadd(), and Vmath::Vcopy().

◆ AddTraceIntegral() [1/2]

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

Definition at line 2134 of file ExpList.h.

2136 {
2137  v_AddTraceIntegral(Fn, outarray);
2138 }
virtual void v_AddTraceIntegral(const Array< OneD, const NekDouble > &Fx, const Array< OneD, const NekDouble > &Fy, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:4380

References v_AddTraceIntegral().

◆ AddTraceIntegral() [2/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 2128 of file ExpList.h.

2131 {
2132  v_AddTraceIntegral(Fx, Fy, outarray);
2133 }

References v_AddTraceIntegral().

◆ AddTraceIntegralToOffDiag()

void Nektar::MultiRegions::ExpList::AddTraceIntegralToOffDiag ( const Array< OneD, const NekDouble > &  FwdFlux,
const Array< OneD, const NekDouble > &  BwdFlux,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 1004 of file ExpList.h.

1008  {
1009  v_AddTraceIntegralToOffDiag(FwdFlux, BwdFlux, outarray);
1010  }
virtual void v_AddTraceIntegralToOffDiag(const Array< OneD, const NekDouble > &FwdFlux, const Array< OneD, const NekDouble > &BwdFlux, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:5397

References v_AddTraceIntegralToOffDiag().

◆ AddTraceJacToElmtJac()

void Nektar::MultiRegions::ExpList::AddTraceJacToElmtJac ( const Array< OneD, const DNekMatSharedPtr > &  FwdMat,
const Array< OneD, const DNekMatSharedPtr > &  BwdMat,
Array< OneD, DNekMatSharedPtr > &  fieldMat 
)

inverse process of v_GetFwdBwdTracePhys. Given Trace integration of Fwd and Bwd Jacobian, with dimension NtotalTrace*TraceCoef*TracePhys. return Elemental Jacobian matrix with dimension NtotalElement*ElementCoef*ElementPhys.

Parameters
fieldis a NekDouble array which contains the 2D data from which we wish to extract the backward and forward orientated trace/edge arrays.
FwdThe resulting forwards space.
BwdThe resulting backwards space.

Definition at line 5620 of file ExpList.cpp.

5624 {
5626  std::shared_ptr<LocalRegions::ExpansionVector> traceExp =
5627  tracelist->GetExp();
5628  int ntotTrace = (*traceExp).size();
5629  int nTracePnt, nTraceCoef;
5630 
5631  std::shared_ptr<LocalRegions::ExpansionVector> fieldExp = GetExp();
5632  int nElmtCoef;
5633 
5634  const MultiRegions::LocTraceToTraceMapSharedPtr locTraceToTraceMap =
5636  const Array<OneD, const Array<OneD, int>> LRAdjExpid =
5637  locTraceToTraceMap->GetLeftRightAdjacentExpId();
5638  const Array<OneD, const Array<OneD, bool>> LRAdjflag =
5639  locTraceToTraceMap->GetLeftRightAdjacentExpFlag();
5640 
5641  const Array<OneD, const Array<OneD, Array<OneD, int>>> elmtLRMap =
5642  locTraceToTraceMap->GetTraceCoeffToLeftRightExpCoeffMap();
5643  const Array<OneD, const Array<OneD, Array<OneD, int>>> elmtLRSign =
5644  locTraceToTraceMap->GetTraceCoeffToLeftRightExpCoeffSign();
5645  DNekMatSharedPtr ElmtMat;
5646  Array<OneD, NekDouble> ElmtMat_data;
5647  // int nclAdjExp;
5648  int nrwAdjExp;
5649  int MatIndex, nPnts;
5650  NekDouble sign = 1.0;
5651 
5652  int nTracePntsTtl = tracelist->GetTotPoints();
5653  int nlocTracePts = locTraceToTraceMap->GetNLocTracePts();
5654  int nlocTracePtsFwd = locTraceToTraceMap->GetNFwdLocTracePts();
5655  int nlocTracePtsBwd = nlocTracePts - nlocTracePtsFwd;
5656 
5657  Array<OneD, int> nlocTracePtsLR(2);
5658  nlocTracePtsLR[0] = nlocTracePtsFwd;
5659  nlocTracePtsLR[1] = nlocTracePtsBwd;
5660 
5661  size_t nFwdBwdNonZero = 0;
5662  Array<OneD, int> tmpIndex{2, -1};
5663  for (int i = 0; i < 2; ++i)
5664  {
5665  if (nlocTracePtsLR[i] > 0)
5666  {
5667  tmpIndex[nFwdBwdNonZero] = i;
5668  nFwdBwdNonZero++;
5669  }
5670  }
5671 
5672  Array<OneD, int> nlocTracePtsNonZeroIndex{nFwdBwdNonZero};
5673  for (int i = 0; i < nFwdBwdNonZero; ++i)
5674  {
5675  nlocTracePtsNonZeroIndex[i] = tmpIndex[i];
5676  }
5677 
5678  Array<OneD, NekDouble> TraceFwdPhy(nTracePntsTtl);
5679  Array<OneD, NekDouble> TraceBwdPhy(nTracePntsTtl);
5680  Array<OneD, Array<OneD, NekDouble>> tmplocTrace(2);
5681  for (int k = 0; k < 2; ++k)
5682  {
5683  tmplocTrace[k] = NullNekDouble1DArray;
5684  }
5685 
5686  for (int k = 0; k < nFwdBwdNonZero; ++k)
5687  {
5688  size_t i = nlocTracePtsNonZeroIndex[k];
5689  tmplocTrace[i] = Array<OneD, NekDouble>(nlocTracePtsLR[i]);
5690  }
5691 
5692  int nNumbElmt = fieldMat.size();
5693  Array<OneD, Array<OneD, NekDouble>> ElmtMatDataArray(nNumbElmt);
5694  Array<OneD, int> ElmtCoefArray(nNumbElmt);
5695  for (int i = 0; i < nNumbElmt; i++)
5696  {
5697  ElmtMatDataArray[i] = fieldMat[i]->GetPtr();
5698  ElmtCoefArray[i] = GetNcoeffs(i);
5699  }
5700 
5701  int nTraceCoefMax = 0;
5702  int nTraceCoefMin = std::numeric_limits<int>::max();
5703  Array<OneD, int> TraceCoefArray(ntotTrace);
5704  Array<OneD, int> TracePntArray(ntotTrace);
5705  Array<OneD, int> TraceOffArray(ntotTrace);
5706  Array<OneD, Array<OneD, NekDouble>> FwdMatData(ntotTrace);
5707  Array<OneD, Array<OneD, NekDouble>> BwdMatData(ntotTrace);
5708  for (int nt = 0; nt < ntotTrace; nt++)
5709  {
5710  nTraceCoef = (*traceExp)[nt]->GetNcoeffs();
5711  nTracePnt = tracelist->GetTotPoints(nt);
5712  int noffset = tracelist->GetPhys_Offset(nt);
5713  TraceCoefArray[nt] = nTraceCoef;
5714  TracePntArray[nt] = nTracePnt;
5715  TraceOffArray[nt] = noffset;
5716  FwdMatData[nt] = FwdMat[nt]->GetPtr();
5717  BwdMatData[nt] = BwdMat[nt]->GetPtr();
5718  if (nTraceCoef > nTraceCoefMax)
5719  {
5720  nTraceCoefMax = nTraceCoef;
5721  }
5722  if (nTraceCoef < nTraceCoefMin)
5723  {
5724  nTraceCoefMin = nTraceCoef;
5725  }
5726  }
5727  WARNINGL1(nTraceCoefMax == nTraceCoefMin,
5728  "nTraceCoefMax!=nTraceCoefMin: Effeciency may be low ");
5729 
5730  int traceID, nfieldPnts, ElmtId, noffset;
5731  const Array<OneD, const Array<OneD, int>> LocTracephysToTraceIDMap =
5732  locTraceToTraceMap->GetLocTracephysToTraceIDMap();
5733  const Array<OneD, const int> fieldToLocTraceMap =
5734  locTraceToTraceMap->GetLocTraceToFieldMap();
5735  Array<OneD, Array<OneD, int>> fieldToLocTraceMapLR(2);
5736  noffset = 0;
5737  for (int k = 0; k < nFwdBwdNonZero; ++k)
5738  {
5739  size_t i = nlocTracePtsNonZeroIndex[k];
5740  fieldToLocTraceMapLR[i] = Array<OneD, int>(nlocTracePtsLR[i]);
5741  Vmath::Vcopy(nlocTracePtsLR[i], &fieldToLocTraceMap[0] + noffset, 1,
5742  &fieldToLocTraceMapLR[i][0], 1);
5743  noffset += nlocTracePtsLR[i];
5744  }
5745 
5746  Array<OneD, Array<OneD, int>> MatIndexArray(2);
5747  for (int k = 0; k < nFwdBwdNonZero; ++k)
5748  {
5749  size_t nlr = nlocTracePtsNonZeroIndex[k];
5750  MatIndexArray[nlr] = Array<OneD, int>(nlocTracePtsLR[nlr]);
5751  for (int nloc = 0; nloc < nlocTracePtsLR[nlr]; nloc++)
5752  {
5753  traceID = LocTracephysToTraceIDMap[nlr][nloc];
5754  nTraceCoef = TraceCoefArray[traceID];
5755  ElmtId = LRAdjExpid[nlr][traceID];
5756  noffset = GetPhys_Offset(ElmtId);
5757  nElmtCoef = ElmtCoefArray[ElmtId];
5758  nfieldPnts = fieldToLocTraceMapLR[nlr][nloc];
5759  nPnts = nfieldPnts - noffset;
5760 
5761  MatIndexArray[nlr][nloc] = nPnts * nElmtCoef;
5762  }
5763  }
5764 
5765  for (int nc = 0; nc < nTraceCoefMin; nc++)
5766  {
5767  for (int nt = 0; nt < ntotTrace; nt++)
5768  {
5769  nTraceCoef = TraceCoefArray[nt];
5770  nTracePnt = TracePntArray[nt];
5771  noffset = TraceOffArray[nt];
5772  Vmath::Vcopy(nTracePnt, &FwdMatData[nt][nc], nTraceCoef,
5773  &TraceFwdPhy[noffset], 1);
5774  Vmath::Vcopy(nTracePnt, &BwdMatData[nt][nc], nTraceCoef,
5775  &TraceBwdPhy[noffset], 1);
5776  }
5777 
5778  for (int k = 0; k < nFwdBwdNonZero; ++k)
5779  {
5780  size_t i = nlocTracePtsNonZeroIndex[k];
5781  Vmath::Zero(nlocTracePtsLR[i], tmplocTrace[i], 1);
5782  }
5783 
5784  GetLocTraceFromTracePts(TraceFwdPhy, TraceBwdPhy, tmplocTrace[0],
5785  tmplocTrace[1]);
5786 
5787  for (int k = 0; k < nFwdBwdNonZero; ++k)
5788  {
5789  size_t nlr = nlocTracePtsNonZeroIndex[k];
5790  for (int nloc = 0; nloc < nlocTracePtsLR[nlr]; nloc++)
5791  {
5792  traceID = LocTracephysToTraceIDMap[nlr][nloc];
5793  nTraceCoef = TraceCoefArray[traceID];
5794  ElmtId = LRAdjExpid[nlr][traceID];
5795  nrwAdjExp = elmtLRMap[nlr][traceID][nc];
5796  sign = elmtLRSign[nlr][traceID][nc];
5797  MatIndex = MatIndexArray[nlr][nloc] + nrwAdjExp;
5798 
5799  ElmtMatDataArray[ElmtId][MatIndex] -=
5800  sign * tmplocTrace[nlr][nloc];
5801  }
5802  }
5803  }
5804 
5805  for (int nc = nTraceCoefMin; nc < nTraceCoefMax; nc++)
5806  {
5807  for (int nt = 0; nt < ntotTrace; nt++)
5808  {
5809  nTraceCoef = TraceCoefArray[nt];
5810  nTracePnt = TracePntArray[nt];
5811  noffset = TraceOffArray[nt];
5812  if (nc < nTraceCoef)
5813  {
5814  Vmath::Vcopy(nTracePnt, &FwdMatData[nt][nc], nTraceCoef,
5815  &TraceFwdPhy[noffset], 1);
5816  Vmath::Vcopy(nTracePnt, &BwdMatData[nt][nc], nTraceCoef,
5817  &TraceBwdPhy[noffset], 1);
5818  }
5819  else
5820  {
5821  Vmath::Zero(nTracePnt, &TraceFwdPhy[noffset], 1);
5822  Vmath::Zero(nTracePnt, &TraceBwdPhy[noffset], 1);
5823  }
5824  }
5825 
5826  for (int k = 0; k < nFwdBwdNonZero; ++k)
5827  {
5828  size_t i = nlocTracePtsNonZeroIndex[k];
5829  Vmath::Zero(nlocTracePtsLR[i], tmplocTrace[i], 1);
5830  }
5831  GetLocTraceFromTracePts(TraceFwdPhy, TraceBwdPhy, tmplocTrace[0],
5832  tmplocTrace[1]);
5833 
5834  for (int k = 0; k < nFwdBwdNonZero; ++k)
5835  {
5836  size_t nlr = nlocTracePtsNonZeroIndex[k];
5837  for (int nloc = 0; nloc < nlocTracePtsLR[nlr]; nloc++)
5838  {
5839  traceID = LocTracephysToTraceIDMap[nlr][nloc];
5840  nTraceCoef = TraceCoefArray[traceID];
5841  if (nc < nTraceCoef)
5842  {
5843  ElmtId = LRAdjExpid[nlr][traceID];
5844  nrwAdjExp = elmtLRMap[nlr][traceID][nc];
5845  sign = -elmtLRSign[nlr][traceID][nc];
5846  MatIndex = MatIndexArray[nlr][nloc] + nrwAdjExp;
5847 
5848  ElmtMatDataArray[ElmtId][MatIndex] +=
5849  sign * tmplocTrace[nlr][nloc];
5850  }
5851  }
5852  }
5853  }
5854 }
#define WARNINGL1(condition, msg)
Definition: ErrorUtil.hpp:250
#define sign(a, b)
return the sign(b)*a
Definition: Polylib.cpp:49
std::shared_ptr< ExpList > & GetTrace()
Definition: ExpList.h:2112
const LocTraceToTraceMapSharedPtr & GetLocTraceToTraceMap() const
Definition: ExpList.h:2082
void GetLocTraceFromTracePts(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &locTraceFwd, Array< OneD, NekDouble > &locTraceBwd)
Definition: ExpList.h:2170
const std::shared_ptr< LocalRegions::ExpansionVector > GetExp() const
This function returns the vector of elements in the expansion.
Definition: ExpList.h:2029
int GetPhys_Offset(int n) const
Get the start offset position for a local contiguous list of quadrature points in a full array corres...
Definition: ExpList.h:2044
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::shared_ptr< LocTraceToTraceMap > LocTraceToTraceMapSharedPtr
static Array< OneD, NekDouble > NullNekDouble1DArray
double NekDouble
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:492

References GetExp(), GetLocTraceFromTracePts(), GetLocTraceToTraceMap(), GetNcoeffs(), GetPhys_Offset(), GetTrace(), Nektar::NullNekDouble1DArray, sign, Vmath::Vcopy(), WARNINGL1, and Vmath::Zero().

◆ AddTraceQuadPhysToField()

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

Add Fwd and Bwd value to field, a reverse procedure of GetFwdBwdTracePhys.

Definition at line 2164 of file ExpList.h.

2167 {
2168  v_AddTraceQuadPhysToField(Fwd, Bwd, field);
2169 }
virtual void v_AddTraceQuadPhysToField(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &field)
Definition: ExpList.cpp:4434

References v_AddTraceQuadPhysToField().

◆ AddTraceQuadPhysToOffDiag()

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

Definition at line 809 of file ExpList.h.

812  {
813  v_AddTraceQuadPhysToOffDiag(Fwd, Bwd, field);
814  }
virtual void v_AddTraceQuadPhysToOffDiag(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &field)
Definition: ExpList.cpp:4443

References v_AddTraceQuadPhysToOffDiag().

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

906  {
907  v_AppendFieldData(fielddef, fielddata);
908  }
virtual void v_AppendFieldData(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata)
Definition: ExpList.cpp:3531

References v_AppendFieldData().

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

914  {
915  v_AppendFieldData(fielddef, fielddata, coeffs);
916  }

References v_AppendFieldData().

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

2662 {
2663 }

Referenced by Nektar::MultiRegions::DisContField::DisContField().

◆ BwdTrans()

void Nektar::MultiRegions::ExpList::BwdTrans ( 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.

Given the coefficients of an expansion, this function evaluates the spectral/hp expansion \(u^{\delta}(\boldsymbol{x})\) at the quadrature points \(\boldsymbol{x}_i\).

Definition at line 1677 of file ExpList.h.

1679 {
1680  v_BwdTrans(inarray, outarray);
1681 }
virtual void v_BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:2470

References v_BwdTrans().

Referenced by Nektar::MultiRegions::DisContField::L2_DGDeriv(), MultiplyByMassMatrix(), Nektar::MultiRegions::ContField::v_HelmSolve(), Nektar::MultiRegions::ContField::v_SmoothField(), and v_WriteTecplotField().

◆ ClearGlobalLinSysManager()

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

Definition at line 5295 of file ExpList.cpp.

5296 {
5298 }
virtual void v_ClearGlobalLinSysManager(void)
Definition: ExpList.cpp:3303

References v_ClearGlobalLinSysManager().

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

5104 {
5106  vector<std::pair<LocalRegions::ExpansionSharedPtr, int>>>
5107  collections;
5108 
5109  // Set up initialisation flags
5111  std::vector<bool>(Collections::SIZE_OperatorType, true);
5112 
5113  // Figure out optimisation parameters if provided in
5114  // session file or default given
5115  Collections::CollectionOptimisation colOpt(
5116  m_session, (*m_exp)[0]->GetShapeDimension(), ImpType);
5117  // ImpType = colOpt.GetDefaultImplementationType();
5118 
5119  // turn on autotuning if explicitly specified in xml file
5120  // or command line option is set but only do optimisation
5121  // for volumetric elements (not boundary condition)
5122  bool autotuning = colOpt.IsUsingAutotuning();
5123  if ((autotuning == false) && (ImpType == Collections::eNoImpType))
5124  {
5125  // turn on autotuning if writeoptfile specified
5126  // if m_graph available
5127  if (m_session->GetUpdateOptFile() && m_graph)
5128  {
5129  // only turn on autotuning for volumetric elements
5130  // where Mesh Dimension is equal to the Shape
5131  // Dimension of element.
5132  if (m_graph->GetMeshDimension() == (*m_exp)[0]->GetShapeDimension())
5133  {
5134  autotuning = true;
5135  }
5136  }
5137  }
5138  bool verbose = (m_session->DefinesCmdLineArgument("verbose")) &&
5139  (m_session->GetComm()->GetRank() == 0);
5140  int collmax =
5141  (colOpt.GetMaxCollectionSize() > 0 ? colOpt.GetMaxCollectionSize()
5142  : 2 * m_exp->size());
5143 
5144  // clear vectors in case previously called
5145  m_collections.clear();
5146  m_coll_coeff_offset.clear();
5147  m_coll_phys_offset.clear();
5148 
5149  // Loop over expansions, and create collections for each element type
5150  for (int i = 0; i < m_exp->size(); ++i)
5151  {
5152  collections[(*m_exp)[i]->DetShapeType()].push_back(
5153  std::pair<LocalRegions::ExpansionSharedPtr, int>((*m_exp)[i], i));
5154  }
5155 
5156  for (auto &it : collections)
5157  {
5158  LocalRegions::ExpansionSharedPtr exp = it.second[0].first;
5159 
5160  Collections::OperatorImpMap impTypes = colOpt.GetOperatorImpMap(exp);
5161 
5162  vector<StdRegions::StdExpansionSharedPtr> collExp;
5163 
5164  int prevCoeffOffset = m_coeff_offset[it.second[0].second];
5165  int prevPhysOffset = m_phys_offset[it.second[0].second];
5166  int collcnt;
5167 
5168  m_coll_coeff_offset.push_back(prevCoeffOffset);
5169  m_coll_phys_offset.push_back(prevPhysOffset);
5170 
5171  int collsize = 0;
5172 
5173  if (it.second.size() == 1) // single element case
5174  {
5175  collExp.push_back(it.second[0].first);
5176 
5177  // if no Imp Type provided and No
5178  // setting in xml file. reset
5179  // impTypes using timings
5180  if (autotuning)
5181  {
5182  if (collExp.size() > collsize)
5183  {
5184  impTypes =
5185  colOpt.SetWithTimings(collExp, impTypes, verbose);
5186  collsize = collExp.size();
5187  }
5188  }
5189 
5190  Collections::Collection tmp(collExp, impTypes);
5191  m_collections.push_back(tmp);
5192  }
5193  else
5194  {
5195  // set up first geometry
5196  collExp.push_back(it.second[0].first);
5197  int prevnCoeff = it.second[0].first->GetNcoeffs();
5198  int prevnPhys = it.second[0].first->GetTotPoints();
5199  bool prevDeformed =
5200  it.second[0].first->GetMetricInfo()->GetGtype() ==
5202  collcnt = 1;
5203 
5204  for (int i = 1; i < it.second.size(); ++i)
5205  {
5206  int nCoeffs = it.second[i].first->GetNcoeffs();
5207  int nPhys = it.second[i].first->GetTotPoints();
5208  bool Deformed =
5209  it.second[i].first->GetMetricInfo()->GetGtype() ==
5211  int coeffOffset = m_coeff_offset[it.second[i].second];
5212  int physOffset = m_phys_offset[it.second[i].second];
5213 
5214  // check to see if next elmt is different or
5215  // collmax reached and if so end collection
5216  // and start new one
5217  if (prevCoeffOffset + nCoeffs != coeffOffset ||
5218  prevnCoeff != nCoeffs ||
5219  prevPhysOffset + nPhys != physOffset ||
5220  prevDeformed != Deformed || prevnPhys != nPhys ||
5221  collcnt >= collmax)
5222  {
5223 
5224  // if no Imp Type provided and No
5225  // settign in xml file. reset
5226  // impTypes using timings
5227  if (autotuning)
5228  {
5229  if (collExp.size() > collsize)
5230  {
5231  impTypes = colOpt.SetWithTimings(collExp, impTypes,
5232  verbose);
5233  collsize = collExp.size();
5234  }
5235  }
5236 
5237  Collections::Collection tmp(collExp, impTypes);
5238  m_collections.push_back(tmp);
5239 
5240  // start new geom list
5241  collExp.clear();
5242 
5243  m_coll_coeff_offset.push_back(coeffOffset);
5244  m_coll_phys_offset.push_back(physOffset);
5245  collExp.push_back(it.second[i].first);
5246  collcnt = 1;
5247  }
5248  else // add to list of collections
5249  {
5250  collExp.push_back(it.second[i].first);
5251  collcnt++;
5252  }
5253 
5254  // if end of list finish up collection
5255  if (i == it.second.size() - 1)
5256  {
5257  // if no Imp Type provided and No
5258  // settign in xml file.
5259  if (autotuning)
5260  {
5261  if (collExp.size() > collsize)
5262  {
5263  impTypes = colOpt.SetWithTimings(collExp, impTypes,
5264  verbose);
5265  collsize = collExp.size();
5266  }
5267  }
5268 
5269  Collections::Collection tmp(collExp, impTypes);
5270  m_collections.push_back(tmp);
5271 
5272  collExp.clear();
5273  collcnt = 0;
5274  }
5275 
5276  prevCoeffOffset = coeffOffset;
5277  prevPhysOffset = physOffset;
5278  prevDeformed = Deformed;
5279  prevnCoeff = nCoeffs;
5280  prevnPhys = nPhys;
5281  }
5282  }
5283  }
5284 
5285  // update optimisation file
5286  if ((m_session->GetUpdateOptFile()) && (ImpType == Collections::eNoImpType))
5287  {
5288  colOpt.UpdateOptFile(m_session->GetSessionName(), m_comm);
5289  // turn off writeoptfile option so only first
5290  // instance is timed
5291  m_session->SetUpdateOptFile(false);
5292  }
5293 }
int GetShapeDimension()
This function returns the dimension of the shape of the element eid.
Definition: ExpList.h:1870
std::map< OperatorType, ImplementationType > OperatorImpMap
Definition: Operator.h:112
@ eDeformed
Geometry is curved or has non-constant factors.

References Nektar::SpatialDomains::eDeformed, Nektar::Collections::eNoImpType, Nektar::Collections::CollectionOptimisation::GetMaxCollectionSize(), Nektar::Collections::CollectionOptimisation::GetOperatorImpMap(), GetShapeDimension(), Nektar::Collections::CollectionOptimisation::IsUsingAutotuning(), m_coeff_offset, m_coll_coeff_offset, m_coll_phys_offset, m_collections, m_collectionsDoInit, m_comm, m_exp, m_graph, m_phys_offset, m_session, Nektar::Collections::CollectionOptimisation::SetWithTimings(), Nektar::Collections::SIZE_OperatorType, and Nektar::Collections::CollectionOptimisation::UpdateOptFile().

Referenced by ExpList().

◆ CurlCurl()

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

Definition at line 1790 of file ExpList.h.

1792 {
1793  v_CurlCurl(Vel, Q);
1794 }
virtual void v_CurlCurl(Array< OneD, Array< OneD, NekDouble >> &Vel, Array< OneD, Array< OneD, NekDouble >> &Q)
Definition: ExpList.cpp:1652

References v_CurlCurl().

◆ DealiasedDotProd()

void Nektar::MultiRegions::ExpList::DealiasedDotProd ( const int  num_dofs,
const Array< OneD, Array< OneD, NekDouble >> &  inarray1,
const Array< OneD, Array< OneD, NekDouble >> &  inarray2,
Array< OneD, Array< OneD, NekDouble >> &  outarray 
)
inline

Definition at line 1826 of file ExpList.h.

1830 {
1831  v_DealiasedDotProd(num_dofs, inarray1, inarray2, outarray);
1832 }
virtual void v_DealiasedDotProd(const int num_dofs, const Array< OneD, Array< OneD, NekDouble >> &inarray1, const Array< OneD, Array< OneD, NekDouble >> &inarray2, Array< OneD, Array< OneD, NekDouble >> &outarray)
Definition: ExpList.cpp:4575

References v_DealiasedDotProd().

◆ DealiasedProd()

void Nektar::MultiRegions::ExpList::DealiasedProd ( const int  num_dofs,
const Array< OneD, NekDouble > &  inarray1,
const Array< OneD, NekDouble > &  inarray2,
Array< OneD, NekDouble > &  outarray 
)
inline

Definition at line 1816 of file ExpList.h.

1820 {
1821  v_DealiasedProd(num_dofs, inarray1, inarray2, outarray);
1822 }
virtual void v_DealiasedProd(const int num_dofs, const Array< OneD, NekDouble > &inarray1, const Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:4565

References v_DealiasedProd().

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

◆ DivideByQuadratureMetric()

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

Divided by the metric jacobi and quadrature weights.

Divided by the metric jacobi and quadrature weights

Definition at line 1364 of file ExpList.cpp.

1367 {
1368  Array<OneD, NekDouble> e_outarray;
1369 
1370  for (int i = 0; i < (*m_exp).size(); ++i)
1371  {
1372  (*m_exp)[i]->DivideByQuadratureMetric(inarray + m_phys_offset[i],
1373  e_outarray =
1374  outarray + m_phys_offset[i]);
1375  }
1376 }

References m_phys_offset.

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

1507 {
1508  int returnval = 0;
1509 
1510  for (size_t i = 0; i < (*m_exp).size(); ++i)
1511  {
1512  returnval = (std::max)(returnval, (*m_exp)[i]->EvalBasisNumModesMax());
1513  }
1514 
1515  return returnval;
1516 }

References m_exp.

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

1522 {
1523  Array<OneD, int> returnval((*m_exp).size(), 0);
1524 
1525  for (size_t i = 0; i < (*m_exp).size(); ++i)
1526  {
1527  returnval[i] =
1528  (std::max)(returnval[i], (*m_exp)[i]->EvalBasisNumModesMax());
1529  }
1530 
1531  return returnval;
1532 }

References m_exp.

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

2215 {
2216  v_EvaluateBoundaryConditions(time, varName, x2_in, x3_in);
2217 }
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:5039

References v_EvaluateBoundaryConditions().

Referenced by Nektar::MultiRegions::DisContField::DisContField(), and Nektar::MultiRegions::DisContField3DHomogeneous2D::v_EvaluateBoundaryConditions().

◆ ExponentialFilter()

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

Definition at line 1750 of file ExpList.cpp.

1753 {
1754  Array<OneD, NekDouble> e_array;
1755 
1756  for (int i = 0; i < (*m_exp).size(); ++i)
1757  {
1758  (*m_exp)[i]->ExponentialFilter(e_array = array + m_phys_offset[i],
1759  alpha, exponent, cutoff);
1760  }
1761 }

References m_phys_offset.

◆ ExtractCoeffsFromFile()

void Nektar::MultiRegions::ExpList::ExtractCoeffsFromFile ( const std::string &  fileName,
LibUtilities::CommSharedPtr  comm,
const std::string &  varName,
Array< OneD, NekDouble > &  coeffs 
)

Definition at line 3331 of file ExpList.cpp.

3335 {
3336  string varString = fileName.substr(0, fileName.find_last_of("."));
3337  int j, k, len = varString.length();
3338  varString = varString.substr(len - 1, len);
3339 
3340  std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef;
3341  std::vector<std::vector<NekDouble>> FieldData;
3342 
3343  std::string ft = LibUtilities::FieldIO::GetFileType(fileName, comm);
3346  ft, comm, m_session->GetSharedFilesystem());
3347 
3348  f->Import(fileName, FieldDef, FieldData);
3349 
3350  bool found = false;
3351  for (j = 0; j < FieldDef.size(); ++j)
3352  {
3353  for (k = 0; k < FieldDef[j]->m_fields.size(); ++k)
3354  {
3355  if (FieldDef[j]->m_fields[k] == varName)
3356  {
3357  // Copy FieldData into locExpList
3358  ExtractDataToCoeffs(FieldDef[j], FieldData[j],
3359  FieldDef[j]->m_fields[k], coeffs);
3360  found = true;
3361  }
3362  }
3363  }
3364 
3365  ASSERTL0(found, "Could not find variable '" + varName +
3366  "' in file boundary condition " + fileName);
3367 }
static const std::string GetFileType(const std::string &filename, CommSharedPtr comm)
Determine file type of given input file.
Definition: FieldIO.cpp:97
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:144
void ExtractDataToCoeffs(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, std::string &field, Array< OneD, NekDouble > &coeffs, std::unordered_map< int, int > zIdToPlane=std::unordered_map< int, int >())
Extract the data in fielddata into the coeffs.
Definition: ExpList.cpp:3563
std::shared_ptr< FieldIO > FieldIOSharedPtr
Definition: FieldIO.h:327
FieldIOFactory & GetFieldIOFactory()
Returns the FieldIO factory.
Definition: FieldIO.cpp:72

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

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

3575 {
3576  v_ExtractCoeffsToCoeffs(fromExpList, fromCoeffs, toCoeffs);
3577 }
virtual void v_ExtractCoeffsToCoeffs(const std::shared_ptr< ExpList > &fromExpList, const Array< OneD, const NekDouble > &fromCoeffs, Array< OneD, NekDouble > &toCoeffs)
Definition: ExpList.cpp:3675

References v_ExtractCoeffsToCoeffs().

◆ ExtractDataToCoeffs()

void Nektar::MultiRegions::ExpList::ExtractDataToCoeffs ( LibUtilities::FieldDefinitionsSharedPtr fielddef,
std::vector< NekDouble > &  fielddata,
std::string &  field,
Array< OneD, NekDouble > &  coeffs,
std::unordered_map< int, int >  zIdToPlane = std::unordered_map<int, int>() 
)

Extract the data in fielddata into the coeffs.

Definition at line 3563 of file ExpList.cpp.

3567 {
3568  v_ExtractDataToCoeffs(fielddef, fielddata, field, coeffs, zIdToPlane);
3569 }
virtual void v_ExtractDataToCoeffs(LibUtilities::FieldDefinitionsSharedPtr &fielddef, std::vector< NekDouble > &fielddata, std::string &field, Array< OneD, NekDouble > &coeffs, std::unordered_map< int, int > zIdToPlane)
Extract data from raw field data into expansion list.
Definition: ExpList.cpp:3587

References v_ExtractDataToCoeffs().

Referenced by ExtractCoeffsFromFile().

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

◆ ExtractElmtToBndPhys()

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

Definition at line 2234 of file ExpList.h.

2237 {
2238  v_ExtractElmtToBndPhys(i, elmt, boundary);
2239 }
virtual void v_ExtractElmtToBndPhys(const int i, const Array< OneD, NekDouble > &elmt, Array< OneD, NekDouble > &boundary)
Definition: ExpList.cpp:4835

References v_ExtractElmtToBndPhys().

◆ ExtractFileBCs()

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

◆ ExtractPhysToBnd()

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

Definition at line 2248 of file ExpList.h.

2251 {
2252  v_ExtractPhysToBnd(i, phys, bnd);
2253 }
virtual void v_ExtractPhysToBnd(const int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bnd)
Definition: ExpList.cpp:4912

References v_ExtractPhysToBnd().

◆ ExtractPhysToBndElmt()

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

Definition at line 2241 of file ExpList.h.

2244 {
2245  v_ExtractPhysToBndElmt(i, phys, bndElmt);
2246 }
virtual void v_ExtractPhysToBndElmt(const int i, const Array< OneD, const NekDouble > &phys, Array< OneD, NekDouble > &bndElmt)
Definition: ExpList.cpp:4873

References v_ExtractPhysToBndElmt().

◆ ExtractTracePhys() [1/2]

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

Definition at line 2191 of file ExpList.h.

2192 {
2193  v_ExtractTracePhys(outarray);
2194 }
virtual void v_ExtractTracePhys(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:4485

References v_ExtractTracePhys().

◆ ExtractTracePhys() [2/2]

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

Definition at line 2195 of file ExpList.h.

2198 {
2199  v_ExtractTracePhys(inarray, outarray);
2200 }

References v_ExtractTracePhys().

◆ FillBndCondFromField() [1/2]

void Nektar::MultiRegions::ExpList::FillBndCondFromField ( const Array< OneD, NekDouble coeffs)
inline

Fill Bnd Condition expansion from the values stored in expansion.

Definition at line 1910 of file ExpList.h.

1911 {
1912  v_FillBndCondFromField(coeffs);
1913 }
virtual void v_FillBndCondFromField(const Array< OneD, NekDouble > coeffs)
Definition: ExpList.cpp:4655

References v_FillBndCondFromField().

◆ FillBndCondFromField() [2/2]

void Nektar::MultiRegions::ExpList::FillBndCondFromField ( const int  nreg,
const Array< OneD, NekDouble coeffs 
)
inline

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

Definition at line 1914 of file ExpList.h.

1916 {
1917  v_FillBndCondFromField(nreg, coeffs);
1918 }

References v_FillBndCondFromField().

◆ FillBwdWithBoundCond()

void Nektar::MultiRegions::ExpList::FillBwdWithBoundCond ( const Array< OneD, NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd,
bool  PutFwdInBwdOnBCs = false 
)
inline

Definition at line 2158 of file ExpList.h.

2161 {
2162  v_FillBwdWithBoundCond(Fwd, Bwd, PutFwdInBwdOnBCs);
2163 }
virtual void v_FillBwdWithBoundCond(const Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd, bool PutFwdInBwdOnBCs)
Definition: ExpList.cpp:4425

References v_FillBwdWithBoundCond().

◆ FillBwdWithBwdWeight()

void Nektar::MultiRegions::ExpList::FillBwdWithBwdWeight ( Array< OneD, NekDouble > &  weightave,
Array< OneD, NekDouble > &  weightjmp 
)
inline

Fill Bwd with boundary conditions.

Definition at line 2177 of file ExpList.h.

2179 {
2180  v_FillBwdWithBwdWeight(weightave, weightjmp);
2181 }
virtual void v_FillBwdWithBwdWeight(Array< OneD, NekDouble > &weightave, Array< OneD, NekDouble > &weightjmp)
Definition: ExpList.cpp:5001

References v_FillBwdWithBwdWeight().

Referenced by GetBwdWeight().

◆ FwdTrans()

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

Definition at line 1639 of file ExpList.h.

1641 {
1642  v_FwdTrans(inarray, outarray);
1643 }
virtual void v_FwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:4701

References v_FwdTrans().

◆ FwdTransBndConstrained()

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

Definition at line 1656 of file ExpList.h.

1659 {
1660  v_FwdTransBndConstrained(inarray, outarray);
1661 }
virtual void v_FwdTransBndConstrained(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1818

References v_FwdTransBndConstrained().

◆ FwdTransLocalElmt()

void Nektar::MultiRegions::ExpList::FwdTransLocalElmt ( 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 1647 of file ExpList.h.

1650 {
1651  v_FwdTransLocalElmt(inarray, outarray);
1652 }
virtual void v_FwdTransLocalElmt(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1809

References v_FwdTransLocalElmt().

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

1883 {
1884  int i, cnt1;
1885  int n_exp = 0;
1886  DNekScalMatSharedPtr loc_mat;
1887  DNekScalBlkMatSharedPtr BlkMatrix;
1888  map<int, int> elmt_id;
1889  LibUtilities::ShapeType ShapeType = gkey.GetShapeType();
1890 
1892  {
1893  for (i = 0; i < (*m_exp).size(); ++i)
1894  {
1895  if ((*m_exp)[i]->DetShapeType() == ShapeType)
1896  {
1897  elmt_id[n_exp++] = i;
1898  }
1899  }
1900  }
1901  else
1902  {
1903  n_exp = (*m_exp).size();
1904  for (i = 0; i < n_exp; ++i)
1905  {
1906  elmt_id[i] = i;
1907  }
1908  }
1909 
1910  Array<OneD, unsigned int> nrows(n_exp);
1911  Array<OneD, unsigned int> ncols(n_exp);
1912 
1913  switch (gkey.GetMatrixType())
1914  {
1915  case StdRegions::eBwdTrans:
1916  {
1917  // set up an array of integers for block matrix construction
1918  for (i = 0; i < n_exp; ++i)
1919  {
1920  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
1921  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
1922  }
1923  }
1924  break;
1926  {
1927  // set up an array of integers for block matrix construction
1928  for (i = 0; i < n_exp; ++i)
1929  {
1930  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
1931  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetTotPoints();
1932  }
1933  }
1934  break;
1935  case StdRegions::eMass:
1936  case StdRegions::eInvMass:
1940  {
1941  // set up an array of integers for block matrix construction
1942  for (i = 0; i < n_exp; ++i)
1943  {
1944  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
1945  ncols[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
1946  }
1947  }
1948  break;
1949 
1951  {
1952  // set up an array of integers for block matrix construction
1953  for (i = 0; i < n_exp; ++i)
1954  {
1955  nrows[i] = (*m_exp)[elmt_id.find(i)->second]->GetNcoeffs();
1956  ncols[i] =
1957  (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
1958  }
1959  }
1960  break;
1962  {
1963  // set up an array of integers for block matrix construction
1964  for (i = 0; i < n_exp; ++i)
1965  {
1966  nrows[i] =
1967  (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
1968  ncols[i] =
1969  (*m_exp)[elmt_id.find(i)->second]->NumDGBndryCoeffs();
1970  }
1971  }
1972  break;
1973  default:
1974  {
1976  "Global Matrix creation not defined for this "
1977  "type of matrix");
1978  }
1979  }
1980 
1981  MatrixStorage blkmatStorage = eDIAGONAL;
1982  BlkMatrix = MemoryManager<DNekScalBlkMat>::AllocateSharedPtr(nrows, ncols,
1983  blkmatStorage);
1984 
1985  int nvarcoeffs = gkey.GetNVarCoeffs();
1986  int eid;
1987  Array<OneD, NekDouble> varcoeffs_wk;
1988 
1989  for (i = cnt1 = 0; i < n_exp; ++i)
1990  {
1991  // need to be initialised with zero size for non
1992  // variable coefficient case
1993  StdRegions::VarCoeffMap varcoeffs;
1994 
1995  eid = elmt_id[i];
1996  if (nvarcoeffs > 0)
1997  {
1998  varcoeffs = StdRegions::RestrictCoeffMap(
1999  gkey.GetVarCoeffs(), m_phys_offset[i],
2000  (*m_exp)[i]->GetTotPoints());
2001  }
2002 
2003  LocalRegions::MatrixKey matkey(
2004  gkey.GetMatrixType(), (*m_exp)[eid]->DetShapeType(), *(*m_exp)[eid],
2005  gkey.GetConstFactors(), varcoeffs);
2006 
2007  loc_mat = std::dynamic_pointer_cast<LocalRegions::Expansion>(
2008  (*m_exp)[elmt_id.find(i)->second])
2009  ->GetLocMatrix(matkey);
2010  BlkMatrix->SetBlock(i, i, loc_mat);
2011  }
2012 
2013  return BlkMatrix;
2014 }
VarCoeffMap RestrictCoeffMap(const VarCoeffMap &m, size_t offset, size_t cnt)
Definition: StdRegions.hpp:346
std::map< StdRegions::VarCoeffType, VarCoeffEntry > VarCoeffMap
Definition: StdRegions.hpp:343
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
Definition: NekTypeDefs.hpp:79

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, NEKERROR, and Nektar::StdRegions::RestrictCoeffMap().

Referenced by GetBlockMatrix().

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

3410 {
3411  int startenum = (int)LibUtilities::eSegment;
3412  int endenum = (int)LibUtilities::eHexahedron;
3413  int s = 0;
3415 
3416  ASSERTL1(NumHomoDir == HomoBasis.size(),
3417  "Homogeneous basis is not the same length as NumHomoDir");
3418  ASSERTL1(NumHomoDir == HomoLen.size(),
3419  "Homogeneous length vector is not the same length as NumHomDir");
3420 
3421  // count number of shapes
3422  switch ((*m_exp)[0]->GetShapeDimension())
3423  {
3424  case 1:
3425  startenum = (int)LibUtilities::eSegment;
3426  endenum = (int)LibUtilities::eSegment;
3427  break;
3428  case 2:
3429  startenum = (int)LibUtilities::eTriangle;
3430  endenum = (int)LibUtilities::eQuadrilateral;
3431  break;
3432  case 3:
3433  startenum = (int)LibUtilities::eTetrahedron;
3434  endenum = (int)LibUtilities::eHexahedron;
3435  break;
3436  }
3437 
3438  for (s = startenum; s <= endenum; ++s)
3439  {
3440  std::vector<unsigned int> elementIDs;
3441  std::vector<LibUtilities::BasisType> basis;
3442  std::vector<unsigned int> numModes;
3443  std::vector<std::string> fields;
3444 
3445  bool first = true;
3446  bool UniOrder = true;
3447  int n;
3448 
3449  shape = (LibUtilities::ShapeType)s;
3450 
3451  for (int i = 0; i < (*m_exp).size(); ++i)
3452  {
3453  if ((*m_exp)[i]->GetGeom()->GetShapeType() == shape)
3454  {
3455  elementIDs.push_back((*m_exp)[i]->GetGeom()->GetGlobalID());
3456  if (first)
3457  {
3458  for (int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
3459  {
3460  basis.push_back(
3461  (*m_exp)[i]->GetBasis(j)->GetBasisType());
3462  numModes.push_back(
3463  (*m_exp)[i]->GetBasis(j)->GetNumModes());
3464  }
3465 
3466  // add homogeneous direction details if defined
3467  for (n = 0; n < NumHomoDir; ++n)
3468  {
3469  basis.push_back(HomoBasis[n]->GetBasisType());
3470  numModes.push_back(HomoBasis[n]->GetNumModes());
3471  }
3472 
3473  first = false;
3474  }
3475  else
3476  {
3477  ASSERTL0(
3478  (*m_exp)[i]->GetBasis(0)->GetBasisType() == basis[0],
3479  "Routine is not set up for multiple bases definitions");
3480 
3481  for (int j = 0; j < (*m_exp)[i]->GetNumBases(); ++j)
3482  {
3483  numModes.push_back(
3484  (*m_exp)[i]->GetBasis(j)->GetNumModes());
3485  if (numModes[j] !=
3486  (*m_exp)[i]->GetBasis(j)->GetNumModes())
3487  {
3488  UniOrder = false;
3489  }
3490  }
3491  // add homogeneous direction details if defined
3492  for (n = 0; n < NumHomoDir; ++n)
3493  {
3494  numModes.push_back(HomoBasis[n]->GetNumModes());
3495  }
3496  }
3497  }
3498  }
3499 
3500  if (elementIDs.size() > 0)
3501  {
3504  AllocateSharedPtr(shape, elementIDs, basis, UniOrder,
3505  numModes, fields, NumHomoDir, HomoLen,
3506  homoStrips, HomoSIDs, HomoZIDs, HomoYIDs);
3507  fielddef.push_back(fdef);
3508  }
3509  }
3510 }
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Definition: ErrorUtil.hpp:249
std::shared_ptr< FieldDefinitions > FieldDefinitionsSharedPtr
Definition: FieldIO.h:186

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, ASSERTL1, Nektar::LibUtilities::eHexahedron, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eSegment, Nektar::LibUtilities::eTetrahedron, Nektar::LibUtilities::eTriangle, GetShapeDimension(), and m_exp.

Referenced by v_GetFieldDefinitions().

◆ GeneralMatrixOp()

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

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

2063 {
2064  int nvarcoeffs = gkey.GetNVarCoeffs();
2065 
2066  if ((nvarcoeffs == 0) && (gkey.GetMatrixType() == StdRegions::eHelmholtz))
2067  {
2068  // initialise if required
2069  if (m_collections.size() &&
2071  {
2072  for (int i = 0; i < m_collections.size(); ++i)
2073  {
2074  m_collections[i].Initialise(Collections::eHelmholtz,
2075  gkey.GetConstFactors());
2076  }
2078  }
2079  else
2080  {
2081  for (int i = 0; i < m_collections.size(); ++i)
2082  {
2083  m_collections[i].CheckFactors(Collections::eHelmholtz,
2084  gkey.GetConstFactors(),
2085  m_coll_phys_offset[i]);
2086  }
2087  }
2088 
2089  Array<OneD, NekDouble> tmp;
2090  for (int i = 0; i < m_collections.size(); ++i)
2091  {
2092  m_collections[i].ApplyOperator(
2094  tmp = outarray + m_coll_coeff_offset[i]);
2095  }
2096  }
2097  else
2098  {
2099  Array<OneD, NekDouble> tmp_outarray;
2100  for (int i = 0; i < (*m_exp).size(); ++i)
2101  {
2102  // need to be initialised with zero size for non
2103  // variable coefficient case
2104  StdRegions::VarCoeffMap varcoeffs;
2105 
2106  if (nvarcoeffs > 0)
2107  {
2108  varcoeffs = StdRegions::RestrictCoeffMap(
2109  gkey.GetVarCoeffs(), m_phys_offset[i],
2110  (*m_exp)[i]->GetTotPoints());
2111  }
2112 
2113  StdRegions::StdMatrixKey mkey(
2114  gkey.GetMatrixType(), (*m_exp)[i]->DetShapeType(),
2115  *((*m_exp)[i]), gkey.GetConstFactors(), varcoeffs);
2116 
2117  (*m_exp)[i]->GeneralMatrixOp(
2118  inarray + m_coeff_offset[i],
2119  tmp_outarray = outarray + m_coeff_offset[i], mkey);
2120  }
2121  }
2122 }

References Nektar::Collections::eHelmholtz, Nektar::StdRegions::eHelmholtz, Nektar::MultiRegions::GlobalMatrixKey::GetConstFactors(), Nektar::MultiRegions::GlobalMatrixKey::GetMatrixType(), Nektar::MultiRegions::GlobalMatrixKey::GetNVarCoeffs(), Nektar::MultiRegions::GlobalMatrixKey::GetVarCoeffs(), m_coeff_offset, m_coll_coeff_offset, m_coll_phys_offset, m_collections, m_collectionsDoInit, m_exp, m_phys_offset, and Nektar::StdRegions::RestrictCoeffMap().

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

3765 {
3766  int npoints_e;
3767  NekDouble coeff;
3768 
3769  Array<OneD, NekDouble> outarray_e;
3770 
3771  for (int i = 0; i < (*m_exp).size(); ++i)
3772  {
3773  npoints_e = (*m_exp)[i]->GetTotPoints();
3774 
3775  if (i <= ElementID)
3776  {
3777  coeff = scalar1;
3778  }
3779  else
3780  {
3781  coeff = scalar2;
3782  }
3783 
3784  outarray_e = Array<OneD, NekDouble>(npoints_e, coeff);
3785  Vmath::Vcopy(npoints_e, &outarray_e[0], 1, &outarray[m_phys_offset[i]],
3786  1);
3787  }
3788 }

References m_phys_offset, and Vmath::Vcopy().

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

2436 {
2437  std::shared_ptr<ExpList> vExpList = GetSharedThisPtr();
2438  const map<int, RobinBCInfoSharedPtr> vRobinBCInfo = GetRobinBCInfo();
2439 
2440  MultiRegions::GlobalSysSolnType vType = mkey.GetGlobalSysSolnType();
2441 
2442  if (vType >= eSIZE_GlobalSysSolnType)
2443  {
2444  NEKERROR(ErrorUtil::efatal, "Matrix solution type not defined");
2445  }
2446  std::string vSolnType = MultiRegions::GlobalSysSolnTypeMap[vType];
2447 
2448  return GetGlobalLinSysFactory().CreateInstance(vSolnType, mkey, vExpList,
2449  locToGloMap);
2450 }
std::shared_ptr< ExpList > GetSharedThisPtr()
Returns a shared pointer to the current object.
Definition: ExpList.h:950
std::map< int, RobinBCInfoSharedPtr > GetRobinBCInfo()
Definition: ExpList.h:879
const char *const GlobalSysSolnTypeMap[]
GlobalLinSysFactory & GetGlobalLinSysFactory()

References Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), Nektar::ErrorUtil::efatal, Nektar::MultiRegions::eSIZE_GlobalSysSolnType, Nektar::MultiRegions::GetGlobalLinSysFactory(), Nektar::MultiRegions::GlobalLinSysKey::GetGlobalSysSolnType(), GetRobinBCInfo(), GetSharedThisPtr(), Nektar::MultiRegions::GlobalSysSolnTypeMap, and NEKERROR.

Referenced by Nektar::MultiRegions::DisContField::GetGlobalBndLinSys().

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

2418 {
2419  GlobalLinSysSharedPtr returnlinsys;
2420  std::shared_ptr<ExpList> vExpList = GetSharedThisPtr();
2421 
2422  MultiRegions::GlobalSysSolnType vType = mkey.GetGlobalSysSolnType();
2423 
2424  if (vType >= eSIZE_GlobalSysSolnType)
2425  {
2426  NEKERROR(ErrorUtil::efatal, "Matrix solution type not defined");
2427  }
2428  std::string vSolnType = MultiRegions::GlobalSysSolnTypeMap[vType];
2429 
2430  return GetGlobalLinSysFactory().CreateInstance(vSolnType, mkey, vExpList,
2431  locToGloMap);
2432 }
std::shared_ptr< GlobalLinSys > GlobalLinSysSharedPtr
Pointer to a GlobalLinSys object.
Definition: GlobalLinSys.h:50

References Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), Nektar::ErrorUtil::efatal, Nektar::MultiRegions::eSIZE_GlobalSysSolnType, Nektar::MultiRegions::GetGlobalLinSysFactory(), Nektar::MultiRegions::GlobalLinSysKey::GetGlobalSysSolnType(), GetSharedThisPtr(), Nektar::MultiRegions::GlobalSysSolnTypeMap, and NEKERROR.

Referenced by Nektar::MultiRegions::ContField::GenGlobalLinSys().

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

2133 {
2134  int i, j, n, gid1, gid2, cntdim1, cntdim2;
2135  NekDouble sign1, sign2;
2136  DNekScalMatSharedPtr loc_mat;
2137 
2138  unsigned int glob_rows = 0;
2139  unsigned int glob_cols = 0;
2140  unsigned int loc_rows = 0;
2141  unsigned int loc_cols = 0;
2142 
2143  bool assembleFirstDim = false;
2144  bool assembleSecondDim = false;
2145 
2146  switch (mkey.GetMatrixType())
2147  {
2148  case StdRegions::eBwdTrans:
2149  {
2150  glob_rows = m_npoints;
2151  glob_cols = locToGloMap->GetNumGlobalCoeffs();
2152 
2153  assembleFirstDim = false;
2154  assembleSecondDim = true;
2155  }
2156  break;
2158  {
2159  glob_rows = locToGloMap->GetNumGlobalCoeffs();
2160  glob_cols = m_npoints;
2161 
2162  assembleFirstDim = true;
2163  assembleSecondDim = false;
2164  }
2165  break;
2166  case StdRegions::eMass:
2170  {
2171  glob_rows = locToGloMap->GetNumGlobalCoeffs();
2172  glob_cols = locToGloMap->GetNumGlobalCoeffs();
2173 
2174  assembleFirstDim = true;
2175  assembleSecondDim = true;
2176  }
2177  break;
2178  default:
2179  {
2181  "Global Matrix creation not defined for this "
2182  "type of matrix");
2183  }
2184  }
2185 
2186  COOMatType spcoomat;
2187  CoordType coord;
2188 
2189  int nvarcoeffs = mkey.GetNVarCoeffs();
2190  int eid;
2191 
2192  // fill global matrix
2193  for (n = cntdim1 = cntdim2 = 0; n < (*m_exp).size(); ++n)
2194  {
2195  // need to be initialised with zero size for non
2196  // variable coefficient case
2197  StdRegions::VarCoeffMap varcoeffs;
2198 
2199  eid = n;
2200  if (nvarcoeffs > 0)
2201  {
2202  varcoeffs = StdRegions::RestrictCoeffMap(
2203  mkey.GetVarCoeffs(), m_phys_offset[eid],
2204  (*m_exp)[eid]->GetTotPoints());
2205  }
2206 
2207  LocalRegions::MatrixKey matkey(
2208  mkey.GetMatrixType(), (*m_exp)[eid]->DetShapeType(),
2209  *((*m_exp)[eid]), mkey.GetConstFactors(), varcoeffs);
2210 
2211  loc_mat =
2212  std::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[n])
2213  ->GetLocMatrix(matkey);
2214 
2215  loc_rows = loc_mat->GetRows();
2216  loc_cols = loc_mat->GetColumns();
2217 
2218  for (i = 0; i < loc_rows; ++i)
2219  {
2220  if (assembleFirstDim)
2221  {
2222  gid1 = locToGloMap->GetLocalToGlobalMap(cntdim1 + i);
2223  sign1 = locToGloMap->GetLocalToGlobalSign(cntdim1 + i);
2224  }
2225  else
2226  {
2227  gid1 = cntdim1 + i;
2228  sign1 = 1.0;
2229  }
2230 
2231  for (j = 0; j < loc_cols; ++j)
2232  {
2233  if (assembleSecondDim)
2234  {
2235  gid2 = locToGloMap->GetLocalToGlobalMap(cntdim2 + j);
2236  sign2 = locToGloMap->GetLocalToGlobalSign(cntdim2 + j);
2237  }
2238  else
2239  {
2240  gid2 = cntdim2 + j;
2241  sign2 = 1.0;
2242  }
2243 
2244  // sparse matrix fill
2245  coord = make_pair(gid1, gid2);
2246  if (spcoomat.count(coord) == 0)
2247  {
2248  spcoomat[coord] = sign1 * sign2 * (*loc_mat)(i, j);
2249  }
2250  else
2251  {
2252  spcoomat[coord] += sign1 * sign2 * (*loc_mat)(i, j);
2253  }
2254  }
2255  }
2256  cntdim1 += loc_rows;
2257  cntdim2 += loc_cols;
2258  }
2259 
2261  glob_cols, spcoomat);
2262 }
std::pair< IndexType, IndexType > CoordType
std::map< CoordType, NekDouble > COOMatType

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_exp, m_npoints, m_phys_offset, m_session, NEKERROR, and Nektar::StdRegions::RestrictCoeffMap().

Referenced by Nektar::MultiRegions::ContField::GetGlobalMatrix().

◆ GenGlobalMatrixFull()

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

Definition at line 2264 of file ExpList.cpp.

2266 {
2267  int i, j, n, gid1, gid2, loc_lda, eid;
2268  NekDouble sign1, sign2, value;
2269  DNekScalMatSharedPtr loc_mat;
2270 
2271  int totDofs = locToGloMap->GetNumGlobalCoeffs();
2272  int NumDirBCs = locToGloMap->GetNumGlobalDirBndCoeffs();
2273 
2274  unsigned int rows = totDofs - NumDirBCs;
2275  unsigned int cols = totDofs - NumDirBCs;
2276  NekDouble zero = 0.0;
2277 
2278  DNekMatSharedPtr Gmat;
2279  int bwidth = locToGloMap->GetFullSystemBandWidth();
2280 
2281  int nvarcoeffs = mkey.GetNVarCoeffs();
2282  MatrixStorage matStorage;
2283 
2284  map<int, RobinBCInfoSharedPtr> RobinBCInfo = GetRobinBCInfo();
2285 
2286  switch (mkey.GetMatrixType())
2287  {
2288  // case for all symmetric matices
2291  if ((2 * (bwidth + 1)) < rows)
2292  {
2295  rows, cols, zero, matStorage, bwidth, bwidth);
2296  }
2297  else
2298  {
2299  matStorage = ePOSITIVE_DEFINITE_SYMMETRIC;
2301  rows, cols, zero, matStorage);
2302  }
2303 
2304  break;
2305  default: // Assume general matrix - currently only set up
2306  // for full invert
2307  {
2308  matStorage = eFULL;
2310  rows, cols, zero, matStorage);
2311  }
2312  }
2313 
2314  // fill global symmetric matrix
2315  for (n = 0; n < (*m_exp).size(); ++n)
2316  {
2317  // need to be initialised with zero size for non
2318  // variable coefficient case
2319  StdRegions::VarCoeffMap varcoeffs;
2320 
2321  eid = n;
2322  if (nvarcoeffs > 0)
2323  {
2324  varcoeffs = StdRegions::RestrictCoeffMap(
2325  mkey.GetVarCoeffs(), m_phys_offset[eid],
2326  (*m_exp)[eid]->GetTotPoints());
2327  }
2328 
2329  LocalRegions::MatrixKey matkey(
2330  mkey.GetMatrixType(), (*m_exp)[eid]->DetShapeType(),
2331  *((*m_exp)[eid]), mkey.GetConstFactors(), varcoeffs);
2332 
2333  loc_mat =
2334  std::dynamic_pointer_cast<LocalRegions::Expansion>((*m_exp)[n])
2335  ->GetLocMatrix(matkey);
2336 
2337  if (RobinBCInfo.count(n) != 0) // add robin mass matrix
2338  {
2340 
2341  // declare local matrix from scaled matrix.
2342  int rows = loc_mat->GetRows();
2343  int cols = loc_mat->GetColumns();
2344  const NekDouble *dat = loc_mat->GetRawPtr();
2345  DNekMatSharedPtr new_mat =
2347  Blas::Dscal(rows * cols, loc_mat->Scale(), new_mat->GetRawPtr(), 1);
2348 
2349  // add local matrix contribution
2350  for (rBC = RobinBCInfo.find(n)->second; rBC; rBC = rBC->next)
2351  {
2352  (*m_exp)[n]->AddRobinMassMatrix(
2353  rBC->m_robinID, rBC->m_robinPrimitiveCoeffs, new_mat);
2354  }
2355 
2356  NekDouble one = 1.0;
2357  // redeclare loc_mat to point to new_mat plus the scalar.
2358  loc_mat =
2360  }
2361 
2362  loc_lda = loc_mat->GetColumns();
2363 
2364  for (i = 0; i < loc_lda; ++i)
2365  {
2366  gid1 = locToGloMap->GetLocalToGlobalMap(m_coeff_offset[n] + i) -
2367  NumDirBCs;
2368  sign1 = locToGloMap->GetLocalToGlobalSign(m_coeff_offset[n] + i);
2369  if (gid1 >= 0)
2370  {
2371  for (j = 0; j < loc_lda; ++j)
2372  {
2373  gid2 = locToGloMap->GetLocalToGlobalMap(m_coeff_offset[n] +
2374  j) -
2375  NumDirBCs;
2376  sign2 = locToGloMap->GetLocalToGlobalSign(
2377  m_coeff_offset[n] + j);
2378  if (gid2 >= 0)
2379  {
2380  // When global matrix is symmetric,
2381  // only add the value for the upper
2382  // triangular part in order to avoid
2383  // entries to be entered twice
2384  if ((matStorage == eFULL) || (gid2 >= gid1))
2385  {
2386  value = Gmat->GetValue(gid1, gid2) +
2387  sign1 * sign2 * (*loc_mat)(i, j);
2388  Gmat->SetValue(gid1, gid2, value);
2389  }
2390  }
2391  }
2392  }
2393  }
2394  }
2395 
2396  return Gmat;
2397 }
static void Dscal(const int &n, const double &alpha, double *x, const int &incx)
BLAS level 1: x = alpha x.
Definition: Blas.hpp:168
std::shared_ptr< RobinBCInfo > RobinBCInfoSharedPtr
@ ePOSITIVE_DEFINITE_SYMMETRIC_BANDED
@ ePOSITIVE_DEFINITE_SYMMETRIC

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, m_exp, m_phys_offset, Nektar::MultiRegions::RobinBCInfo::next, and Nektar::StdRegions::RestrictCoeffMap().

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

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

1548 {
1549  int returnval = 0;
1550  size_t cnt;
1551  size_t nbase = (*m_exp)[0]->GetNumBases();
1552 
1553  for (size_t i = 0; i < (*m_exp).size(); ++i)
1554  {
1555  cnt = 1;
1556  for (size_t j = 0; j < nbase; ++j)
1557  {
1558  cnt *= scale * ((*m_exp)[i]->GetNumPoints(j));
1559  }
1560  returnval += cnt;
1561  }
1562  return returnval;
1563 }

◆ GetBCValues()

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

Definition at line 1836 of file ExpList.h.

1839 {
1840  v_GetBCValues(BndVals, TotField, BndID);
1841 }
virtual void v_GetBCValues(Array< OneD, NekDouble > &BndVals, const Array< OneD, NekDouble > &TotField, int BndID)
Definition: ExpList.cpp:4585

References v_GetBCValues().

◆ GetBlockMatrix()

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

Definition at line 2016 of file ExpList.cpp.

2018 {
2019  auto matrixIter = m_blockMat->find(gkey);
2020 
2021  if (matrixIter == m_blockMat->end())
2022  {
2023  return ((*m_blockMat)[gkey] = GenBlockMatrix(gkey));
2024  }
2025  else
2026  {
2027  return matrixIter->second;
2028  }
2029 }
const DNekScalBlkMatSharedPtr GenBlockMatrix(const GlobalMatrixKey &gkey)
This function assembles the block diagonal matrix of local matrices of the type mtype.
Definition: ExpList.cpp:1881

References GenBlockMatrix(), and m_blockMat.

Referenced by MultiplyByBlockMatrix(), MultiplyByElmtInvMass(), and Nektar::MultiRegions::DisContField::v_HelmSolve().

◆ GetBndCondBwdWeight()

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

Get the weight value for boundary conditions.

Definition at line 2086 of file ExpList.h.

2087 {
2088  return v_GetBndCondBwdWeight();
2089 }
virtual const Array< OneD, const NekDouble > & v_GetBndCondBwdWeight()
Definition: ExpList.cpp:4462

References v_GetBndCondBwdWeight().

◆ GetBndCondExpansions()

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

Definition at line 2071 of file ExpList.h.

2072 {
2073  return v_GetBndCondExpansions();
2074 }
virtual const Array< OneD, const std::shared_ptr< ExpList > > & v_GetBndCondExpansions(void)
Definition: ExpList.cpp:3791

References v_GetBndCondExpansions().

Referenced by v_ExtractElmtToBndPhys(), v_ExtractPhysToBnd(), v_ExtractPhysToBndElmt(), v_GetBoundaryNormals(), and Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBoundaryNormals().

◆ GetBndConditions()

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

Definition at line 2202 of file ExpList.h.

2203 {
2204  return v_GetBndConditions();
2205 }
virtual const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & v_GetBndConditions()
Definition: ExpList.cpp:5018

References v_GetBndConditions().

◆ GetBndElmtExpansion()

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

Definition at line 2227 of file ExpList.h.

2230 {
2231  v_GetBndElmtExpansion(i, result, DeclareCoeffPhysArrays);
2232 }
virtual void v_GetBndElmtExpansion(int i, std::shared_ptr< ExpList > &result, const bool DeclareCoeffPhysArrays)
Definition: ExpList.cpp:4825

References v_GetBndElmtExpansion().

◆ GetBoundaryCondition()

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

Definition at line 5070 of file ExpList.cpp.

5073 {
5074  auto collectionIter = collection.find(regionId);
5075  ASSERTL1(collectionIter != collection.end(),
5076  "Unable to locate collection " +
5077  boost::lexical_cast<string>(regionId));
5078 
5080  (*collectionIter).second;
5081  auto conditionMapIter = bndCondMap->find(variable);
5082  ASSERTL1(conditionMapIter != bndCondMap->end(),
5083  "Unable to locate condition map.");
5084 
5085  const SpatialDomains::BoundaryConditionShPtr boundaryCondition =
5086  (*conditionMapIter).second;
5087 
5088  return boundaryCondition;
5089 }
std::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
Definition: Conditions.h:212
std::shared_ptr< BoundaryConditionMap > BoundaryConditionMapShPtr
Definition: Conditions.h:218

References ASSERTL1.

Referenced by Nektar::MultiRegions::DisContField::FindPeriodicTraces(), Nektar::MultiRegions::DisContField::GenerateBoundaryConditionExpansion(), and Nektar::MultiRegions::DisContField3DHomogeneous1D::SetupBoundaryConditions().

◆ GetBoundaryNormals()

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

Definition at line 2255 of file ExpList.h.

2257 {
2258  v_GetBoundaryNormals(i, normals);
2259 }
virtual void v_GetBoundaryNormals(int i, Array< OneD, Array< OneD, NekDouble >> &normals)
Definition: ExpList.cpp:4949

References v_GetBoundaryNormals().

◆ GetBoundaryToElmtMap()

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

◆ GetBwdWeight()

void Nektar::MultiRegions::ExpList::GetBwdWeight ( Array< OneD, NekDouble > &  weightAver,
Array< OneD, NekDouble > &  weightJump 
)

Get the weight value for boundary conditions for boundary average and jump calculations.

Get the weight value on boundaries

Definition at line 3704 of file ExpList.cpp.

3706 {
3707  size_t nTracePts = weightAver.size();
3708  // average for interior traces
3709  for (int i = 0; i < nTracePts; ++i)
3710  {
3711  weightAver[i] = 0.5;
3712  weightJump[i] = 1.0;
3713  }
3714  FillBwdWithBwdWeight(weightAver, weightJump);
3715 }
void FillBwdWithBwdWeight(Array< OneD, NekDouble > &weightave, Array< OneD, NekDouble > &weightjmp)
Fill Bwd with boundary conditions.
Definition: ExpList.h:2177

References FillBwdWithBwdWeight().

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

1969 {
1970  return m_coeffs[i];
1971 }
Array< OneD, NekDouble > m_coeffs
Concatenation of all local expansion coefficients.
Definition: ExpList.h:1076

References m_coeffs.

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

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

1903 {
1904  return m_coeffs;
1905 }

References m_coeffs.

Referenced by Nektar::MultiRegions::ContField::LaplaceSolve(), Nektar::MultiRegions::DisContField3DHomogeneous2D::v_EvaluateBoundaryConditions(), Nektar::MultiRegions::DisContField::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous2D::v_GetBndElmtExpansion(), Nektar::MultiRegions::ContField::v_HelmSolve(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_HomogeneousEnergy(), Nektar::MultiRegions::ContField::v_ImposeDirichletConditions(), and Nektar::MultiRegions::ContField::v_LinearAdvectionDiffusionReactionSolve().

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

1977 {
1978  return m_coeffs[i];
1979 }

References m_coeffs.

◆ GetCoeffsToElmt()

const Array< OneD, const std::pair< int, int > > & Nektar::MultiRegions::ExpList::GetCoeffsToElmt ( ) const
inline

Get m_coeffs to elemental value map.

Definition at line 2077 of file ExpList.h.

2078 {
2079  return m_coeffsToElmt;
2080 }
Array< OneD, std::pair< int, int > > m_coeffsToElmt
m_coeffs to elemental value map
Definition: ExpList.h:1124

References m_coeffsToElmt.

Referenced by Nektar::MultiRegions::LocTraceToTraceMap::TraceLocToElmtLocCoeffMap().

◆ GetComm()

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

Returns the comm object.

Definition at line 960 of file ExpList.h.

961  {
962  return m_comm;
963  }

References m_comm.

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

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

1862 {
1863  ASSERTL2(eid <= (*m_exp).size(), "eid is larger than number of elements");
1864  return (*m_exp)[eid]->GetCoordim();
1865 }
#define ASSERTL2(condition, msg)
Assert Level 2 – Debugging which is used FULLDEBUG compilation mode. This level assert is designed to...
Definition: ErrorUtil.hpp:272

References ASSERTL2, and m_exp.

Referenced by GetExpIndex(), IProductWRTDerivBase(), PhysEvaluate(), v_GetBoundaryNormals(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBoundaryNormals(), v_GetCoords(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetCoords(), v_GetNormals(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_GetNormals(), v_NormVectorIProductWRTBase(), v_Upwind(), v_WriteTecplotZone(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_WriteTecplotZone(), and Nektar::MultiRegions::ExpList2DHomogeneous2D::v_WriteTecplotZone().

◆ GetCoords() [1/2]

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

1731 {
1732  v_GetCoords(coord_0, coord_1, coord_2);
1733 }
virtual void v_GetCoords(Array< OneD, NekDouble > &coord_0, Array< OneD, NekDouble > &coord_1=NullNekDouble1DArray, Array< OneD, NekDouble > &coord_2=NullNekDouble1DArray)
Definition: ExpList.cpp:4752

References v_GetCoords().

Referenced by v_WriteTecplotZone(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_WriteTecplotZone(), Nektar::MultiRegions::ExpList2DHomogeneous2D::v_WriteTecplotZone(), Nektar::MultiRegions::ExpList3DHomogeneous2D::v_WriteTecplotZone(), Nektar::MultiRegions::ExpList2DHomogeneous1D::v_WriteVtkPieceHeader(), Nektar::MultiRegions::ExpList2DHomogeneous2D::v_WriteVtkPieceHeader(), and Nektar::MultiRegions::ExpList3DHomogeneous2D::v_WriteVtkPieceHeader().

◆ GetCoords() [2/2]

void Nektar::MultiRegions::ExpList::GetCoords ( const int  eid,
Array< OneD, NekDouble > &  coord_0,
Array< OneD, NekDouble > &  coord_1 = NullNekDouble1DArray,
Array< OneD, NekDouble > &  coord_2 = NullNekDouble1DArray 
)
inline

Definition at line 1735 of file ExpList.h.

1738 {
1739  v_GetCoords(eid, xc0, xc1, xc2);
1740 }

References v_GetCoords().

◆ GetDiagMatIpwrtBase()

void Nektar::MultiRegions::ExpList::GetDiagMatIpwrtBase ( const Array< OneD, const Array< OneD, NekDouble >> &  inarray,
Array< OneD, DNekMatSharedPtr > &  mtxPerVar 
)

Definition at line 5549 of file ExpList.cpp.

5552 {
5554  int nElmtPntPrevious = 0;
5555  int nElmtCoefPrevious = 0;
5556  int nTotElmt = (*m_exp).size();
5557  int nElmtPnt = (*m_exp)[0]->GetTotPoints();
5558  int nElmtCoef = (*m_exp)[0]->GetNcoeffs();
5559 
5560  Array<OneD, NekDouble> tmpPhys;
5561  Array<OneD, NekDouble> clmnArray, clmnStdMatArray;
5562  Array<OneD, NekDouble> stdMat_data;
5563 
5564  for (int nelmt = 0; nelmt < nTotElmt; nelmt++)
5565  {
5566  nElmtCoef = (*m_exp)[nelmt]->GetNcoeffs();
5567  nElmtPnt = (*m_exp)[nelmt]->GetTotPoints();
5568  LibUtilities::ShapeType ElmtTypeNow = (*m_exp)[nelmt]->DetShapeType();
5569 
5570  if (nElmtPntPrevious != nElmtPnt || nElmtCoefPrevious != nElmtCoef ||
5571  (ElmtTypeNow != ElmtTypePrevious))
5572  {
5574  stdExp = (*m_exp)[nelmt]->GetStdExp();
5575  StdRegions::StdMatrixKey matkey(StdRegions::eBwdMat,
5576  stdExp->DetShapeType(), *stdExp);
5577 
5578  DNekMatSharedPtr BwdMat = stdExp->GetStdMatrix(matkey);
5579  stdMat_data = BwdMat->GetPtr();
5580 
5581  if (nElmtPntPrevious != nElmtPnt)
5582  {
5583  tmpPhys = Array<OneD, NekDouble>(nElmtPnt, 0.0);
5584  }
5585 
5586  ElmtTypePrevious = ElmtTypeNow;
5587  nElmtPntPrevious = nElmtPnt;
5588  nElmtCoefPrevious = nElmtCoef;
5589  }
5590 
5591  (*m_exp)[nelmt]->MultiplyByQuadratureMetric(
5592  inarray[nelmt],
5593  tmpPhys); // weight with metric
5594 
5595  Array<OneD, NekDouble> MatDataArray = mtxPerVar[nelmt]->GetPtr();
5596 
5597  for (int np = 0; np < nElmtPnt; np++)
5598  {
5599  NekDouble factor = tmpPhys[np];
5600  clmnArray = MatDataArray + np * nElmtCoef;
5601  clmnStdMatArray = stdMat_data + np * nElmtCoef;
5602  Vmath::Smul(nElmtCoef, factor, clmnStdMatArray, 1, clmnArray, 1);
5603  }
5604  }
5605 }
std::shared_ptr< StdExpansion > StdExpansionSharedPtr
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
Definition: Vmath.cpp:248

References Nektar::StdRegions::eBwdMat, Nektar::LibUtilities::eNoShapeType, and Vmath::Smul().

◆ GetElmtNormalLength()

void Nektar::MultiRegions::ExpList::GetElmtNormalLength ( Array< OneD, NekDouble > &  lengthsFwd,
Array< OneD, NekDouble > &  lengthsBwd 
)

Get the length of elements in boundary normal direction.

Definition at line 4232 of file ExpList.cpp.

4234 {
4235  int e_npoints;
4236 
4237  Array<OneD, NekDouble> locLeng;
4238  Array<OneD, Array<OneD, NekDouble>> lengintp(2);
4239  Array<OneD, Array<OneD, NekDouble>> lengAdd(2);
4240  Array<OneD, int> LRbndnumbs(2);
4241  Array<OneD, Array<OneD, NekDouble>> lengLR(2);
4242  lengLR[0] = lengthsFwd;
4243  lengLR[1] = lengthsBwd;
4244  Array<OneD, LocalRegions::ExpansionSharedPtr> LRelmts(2);
4247  int e_npoints0 = -1;
4248  if (m_expType == e1D)
4249  {
4250  for (int i = 0; i < m_exp->size(); ++i)
4251  {
4252  loc_exp = (*m_exp)[i];
4253  int offset = m_phys_offset[i];
4254 
4255  int e_nmodes = loc_exp->GetBasis(0)->GetNumModes();
4256  e_npoints = (*m_exp)[i]->GetNumPoints(0);
4257  if (e_npoints0 < e_npoints)
4258  {
4259  for (int nlr = 0; nlr < 2; nlr++)
4260  {
4261  lengintp[nlr] = Array<OneD, NekDouble>(e_npoints, 0.0);
4262  }
4263  e_npoints0 = e_npoints;
4264  }
4265 
4266  LRelmts[0] = loc_exp->GetLeftAdjacentElementExp();
4267  LRelmts[1] = loc_exp->GetRightAdjacentElementExp();
4268 
4269  LRbndnumbs[0] = loc_exp->GetLeftAdjacentElementTrace();
4270  LRbndnumbs[1] = loc_exp->GetRightAdjacentElementTrace();
4271  for (int nlr = 0; nlr < 2; ++nlr)
4272  {
4273  Vmath::Zero(e_npoints0, lengintp[nlr], 1);
4274  lengAdd[nlr] = lengintp[nlr];
4275  int bndNumber = LRbndnumbs[nlr];
4276  loc_elmt = LRelmts[nlr];
4277  if (bndNumber >= 0)
4278  {
4279  locLeng = loc_elmt->GetElmtBndNormDirElmtLen(bndNumber);
4280  lengAdd[nlr] = locLeng;
4281 
4282  int loc_nmodes = loc_elmt->GetBasis(0)->GetNumModes();
4283  if (e_nmodes != loc_nmodes)
4284  {
4285  // Parallel case: need to interpolate.
4286  LibUtilities::PointsKey to_key =
4287  loc_exp->GetBasis(0)->GetPointsKey();
4288  LibUtilities::PointsKey from_key =
4289  loc_elmt->GetBasis(0)->GetPointsKey();
4290  LibUtilities::Interp1D(from_key, locLeng, to_key,
4291  lengintp[nlr]);
4292  lengAdd[nlr] = lengintp[nlr];
4293  }
4294  }
4295 
4296  for (int j = 0; j < e_npoints; ++j)
4297  {
4298  lengLR[nlr][offset + j] = lengAdd[nlr][j];
4299  }
4300  }
4301  }
4302  }
4303  else if (m_expType == e2D)
4304  {
4305  for (int i = 0; i < m_exp->size(); ++i)
4306  {
4307  loc_exp = (*m_exp)[i];
4308  int offset = m_phys_offset[i];
4309 
4310  LibUtilities::BasisKey traceBasis0 =
4311  loc_exp->GetBasis(0)->GetBasisKey();
4312  LibUtilities::BasisKey traceBasis1 =
4313  loc_exp->GetBasis(1)->GetBasisKey();
4314  const int TraceNq0 = traceBasis0.GetNumPoints();
4315  const int TraceNq1 = traceBasis1.GetNumPoints();
4316  e_npoints = TraceNq0 * TraceNq1;
4317  if (e_npoints0 < e_npoints)
4318  {
4319  for (int nlr = 0; nlr < 2; nlr++)
4320  {
4321  lengintp[nlr] = Array<OneD, NekDouble>(e_npoints, 0.0);
4322  }
4323  e_npoints0 = e_npoints;
4324  }
4325 
4326  LRelmts[0] = loc_exp->GetLeftAdjacentElementExp();
4327  LRelmts[1] = loc_exp->GetRightAdjacentElementExp();
4328 
4329  LRbndnumbs[0] = loc_exp->GetLeftAdjacentElementTrace();
4330  LRbndnumbs[1] = loc_exp->GetRightAdjacentElementTrace();
4331  for (int nlr = 0; nlr < 2; ++nlr)
4332  {
4333  Vmath::Zero(e_npoints0, lengintp[nlr], 1);
4334  int bndNumber = LRbndnumbs[nlr];
4335  loc_elmt = LRelmts[nlr];
4336  if (bndNumber >= 0)
4337  {
4338  locLeng = loc_elmt->GetElmtBndNormDirElmtLen(bndNumber);
4339  // Project normals from 3D element onto the
4340  // same orientation as the trace expansion.
4341  StdRegions::Orientation orient =
4342  loc_elmt->GetTraceOrient(bndNumber);
4343 
4344  int fromid0, fromid1;
4346  {
4347  fromid0 = 0;
4348  fromid1 = 1;
4349  }
4350  else
4351  {
4352  fromid0 = 1;
4353  fromid1 = 0;
4354  }
4355 
4356  LibUtilities::BasisKey faceBasis0 =
4357  loc_elmt->GetTraceBasisKey(bndNumber, fromid0);
4358  LibUtilities::BasisKey faceBasis1 =
4359  loc_elmt->GetTraceBasisKey(bndNumber, fromid1);
4360  const int faceNq0 = faceBasis0.GetNumPoints();
4361  const int faceNq1 = faceBasis1.GetNumPoints();
4362  Array<OneD, NekDouble> alignedLeng(faceNq0 * faceNq1);
4363 
4364  AlignFace(orient, faceNq0, faceNq1, locLeng, alignedLeng);
4366  faceBasis0.GetPointsKey(), faceBasis1.GetPointsKey(),
4367  alignedLeng, traceBasis0.GetPointsKey(),
4368  traceBasis1.GetPointsKey(), lengintp[nlr]);
4369  }
4370 
4371  for (int j = 0; j < e_npoints; ++j)
4372  {
4373  lengLR[nlr][offset + j] = lengintp[nlr][j];
4374  }
4375  }
4376  }
4377  }
4378 }
void Interp1D(const BasisKey &fbasis0, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, Array< OneD, NekDouble > &to)
this function interpolates a 1D function evaluated at the quadrature points of the basis fbasis0 to ...
Definition: Interp.cpp:52
void Interp2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
this function interpolates a 2D function evaluated at the quadrature points of the 2D basis,...
Definition: Interp.cpp:106
void AlignFace(const StdRegions::Orientation orient, const int nquad1, const int nquad2, const Array< OneD, const NekDouble > &in, Array< OneD, NekDouble > &out)
Helper function to re-align face to a given orientation.
Definition: ExpList.cpp:3948

References Nektar::MultiRegions::AlignFace(), Nektar::MultiRegions::e1D, Nektar::MultiRegions::e2D, Nektar::StdRegions::eDir1FwdDir2_Dir2FwdDir1, Nektar::LibUtilities::BasisKey::GetNumPoints(), Nektar::LibUtilities::BasisKey::GetPointsKey(), Nektar::LibUtilities::Interp1D(), Nektar::LibUtilities::Interp2D(), m_exp, m_expType, m_phys_offset, and Vmath::Zero().

◆ GetElmtToExpId() [1/2]

int Nektar::MultiRegions::ExpList::GetElmtToExpId ( int  elmtId)
inline

This function returns the index inside m_exp for a given geom id.

Definition at line 1032 of file ExpList.h.

1033  {
1034  auto it = m_elmtToExpId.find(elmtId);
1035  ASSERTL0(it != m_elmtToExpId.end(), "Global geometry ID " +
1036  std::to_string(elmtId) +
1037  " not found in element ID to "
1038  "expansion ID map.")
1039  return it->second;
1040  }

References ASSERTL0, and m_elmtToExpId.

◆ GetElmtToExpId() [2/2]

const std::unordered_map<int, int>& Nektar::MultiRegions::ExpList::GetElmtToExpId ( void  )
inline

This function returns the map of index inside m_exp to geom id.

Definition at line 1026 of file ExpList.h.

1027  {
1028  return m_elmtToExpId;
1029  }

References m_elmtToExpId.

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

2031 {
2032  return m_exp;
2033 }

References m_exp.

Referenced by AddTraceJacToElmtJac(), Nektar::MultiRegions::AssemblyMapCG::AssemblyMapCG(), Nektar::MultiRegions::AssemblyMapDG::AssemblyMapDG(), Nektar::MultiRegions::ContField3DHomogeneous1D::ContField3DHomogeneous1D(), Nektar::MultiRegions::ContField3DHomogeneous2D::ContField3DHomogeneous2D(), Nektar::MultiRegions::AssemblyMapCG::CreateGraph(), Nektar::MultiRegions::DisContField3DHomogeneous1D::DisContField3DHomogeneous1D(), Nektar::MultiRegions::DisContField3DHomogeneous2D::DisContField3DHomogeneous2D(), Nektar::MultiRegions::ExpList2DHomogeneous1D::ExpList2DHomogeneous1D(), Nektar::MultiRegions::ExpList2DHomogeneous2D::ExpList2DHomogeneous2D(), Nektar::MultiRegions::ExpList3DHomogeneous2D::ExpList3DHomogeneous2D(), Nektar::MultiRegions::LocTraceToTraceMap::FindElmtNeighbors(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GenExpList3DHomogeneous1D(), GetExp(), GetExpIndex(), Nektar::MultiRegions::AssemblyCommDG::InitialiseStructure(), Nektar::MultiRegions::LocTraceToTraceMap::LocTraceToTraceMap(), Nektar::MultiRegions::LocTraceToTraceMap::Setup(), Nektar::MultiRegions::AssemblyMapCG::SetUpUniversalC0ContMap(), Nektar::MultiRegions::AssemblyMapDG::SetUpUniversalDGMap(), v_ExtractElmtToBndPhys(), v_ExtractPhysToBnd(), v_ExtractPhysToBndElmt(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBCValues(), Nektar::MultiRegions::DisContField::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBndElmtExpansion(), Nektar::MultiRegions::DisContField3DHomogeneous2D::v_GetBndElmtExpansion(), v_GetBoundaryNormals(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_GetBoundaryNormals(), v_GetCoords(), Nektar::MultiRegions::ExpList3DHomogeneous1D::v_HomogeneousEnergy(), Nektar::MultiRegions::AssemblyMapCG::v_LinearSpaceMap(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_NormVectorIProductWRTBase(), and v_WriteTecplotHeader().

◆ GetExp() [2/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 2510 of file ExpList.cpp.

2512 {
2513  return GetExp(GetExpIndex(gloCoord));
2514 }
int GetExpIndex(const Array< OneD, const NekDouble > &gloCoord, NekDouble tol=0.0, bool returnNearestElmt=false, int cachedId=-1, NekDouble maxDistance=1e6)
This function returns the index of the local elemental expansion containing the arbitrary point given...
Definition: ExpList.cpp:2521

References GetExp(), and GetExpIndex().

◆ GetExp() [3/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 2006 of file ExpList.h.

2007 {
2008  return (*m_exp)[n];
2009 }

References m_exp.

◆ GetExpFromGeomId()

LocalRegions::ExpansionSharedPtr & Nektar::MultiRegions::ExpList::GetExpFromGeomId ( int  n)
inline

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

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

Definition at line 2016 of file ExpList.h.

2017 {
2018  auto it = m_elmtToExpId.find(n);
2019  ASSERTL0(it != m_elmtToExpId.end(), "Global geometry ID " +
2020  std::to_string(n) +
2021  " not found in element ID to "
2022  "expansion ID map.")
2023  return (*m_exp)[it->second];
2024 }

References ASSERTL0, m_elmtToExpId, and m_exp.

◆ GetExpIndex() [1/2]

int Nektar::MultiRegions::ExpList::GetExpIndex ( const Array< OneD, const NekDouble > &  gloCoord,
NekDouble  tol = 0.0,
bool  returnNearestElmt = false,
int  cachedId = -1,
NekDouble  maxDistance = 1e6 
)

This function returns the index of the local elemental expansion containing the arbitrary point given by gloCoord, within a distance tolerance of tol.

If returnNearestElmt is true and no element contains the point, this function returns the nearest element whose bounding box contains the point. The bounding box has a 10% margin in each direction.

Parameters
gloCoord(input) coordinate in physics space
locCoords(output) local coordinate xi in the returned element
toldistance tolerance to judge if a point lies in an element
returnNearestElmtif true and no element contains this point, the nearest element whose bounding box contains this point is returned
cachedIdan initial guess of the most possible element index
maxDistanceif returnNearestElmt is set as true, the nearest element will be returned. But the distance of the nearest element and this point should be <= maxDistance.
Returns
element index; if no element is found, -1 is returned.
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 2521 of file ExpList.cpp.

2524 {
2525  Array<OneD, NekDouble> Lcoords(gloCoord.size());
2526 
2527  return GetExpIndex(gloCoord, Lcoords, tol, returnNearestElmt, cachedId,
2528  maxDistance);
2529 }

Referenced by GetExp(), and PhysEvaluate().

◆ 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,
int  cachedId = -1,
NekDouble  maxDistance = 1e6 
)

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

2535 {
2536  if (GetNumElmts() == 0)
2537  {
2538  return -1;
2539  }
2540 
2541  if (m_elmtToExpId.size() == 0)
2542  {
2543  // Loop in reverse order so that in case where using a
2544  // Homogeneous expansion it sets geometry ids to first part of
2545  // m_exp list. Otherwise will set to second (complex) expansion
2546  for (int i = (*m_exp).size() - 1; i >= 0; --i)
2547  {
2548  m_elmtToExpId[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
2549  }
2550  }
2551 
2552  NekDouble nearpt = 1e6;
2553  NekDouble nearpt_min = 1e6;
2554  int min_id = -1;
2555  Array<OneD, NekDouble> savLocCoords(locCoords.size());
2556 
2557  if (cachedId >= 0 && cachedId < (*m_exp).size())
2558  {
2559  nearpt = 1e12;
2560  if ((*m_exp)[cachedId]->GetGeom()->MinMaxCheck(gloCoords) &&
2561  (*m_exp)[cachedId]->GetGeom()->ContainsPoint(gloCoords, locCoords,
2562  tol, nearpt))
2563  {
2564  return cachedId;
2565  }
2566  else if (returnNearestElmt && (nearpt < nearpt_min))
2567  {
2568  // If it does not lie within, keep track of which element
2569  // is nearest.
2570  min_id = cachedId;
2571  nearpt_min = nearpt;
2572  Vmath::Vcopy(locCoords.size(), locCoords, 1, savLocCoords, 1);
2573  }
2574  }
2575 
2576  NekDouble x = (gloCoords.size() > 0 ? gloCoords[0] : 0.0);
2577  NekDouble y = (gloCoords.size() > 1 ? gloCoords[1] : 0.0);
2578  NekDouble z = (gloCoords.size() > 2 ? gloCoords[2] : 0.0);
2581  GetExp(0)->GetCoordim(), -1, x, y, z);
2582 
2583  // Get the list of elements whose bounding box contains the desired
2584  // point.
2585  std::vector<int> elmts = m_graph->GetElementsContainingPoint(p);
2586 
2587  // Check each element in turn to see if point lies within it.
2588  for (int i = 0; i < elmts.size(); ++i)
2589  {
2590  int id = m_elmtToExpId[elmts[i]];
2591  if (id == cachedId)
2592  {
2593  continue;
2594  }
2595  if ((*m_exp)[id]->GetGeom()->ContainsPoint(gloCoords, locCoords, tol,
2596  nearpt))
2597  {
2598  return id;
2599  }
2600  else if (returnNearestElmt && (nearpt < nearpt_min))
2601  {
2602  // If it does not lie within, keep track of which element
2603  // is nearest.
2604  min_id = id;
2605  nearpt_min = nearpt;
2606  Vmath::Vcopy(locCoords.size(), locCoords, 1, savLocCoords, 1);
2607  }
2608  }
2609 
2610  // If the calling function is with just the nearest element, return
2611  // that. Otherwise return -1 to indicate no matching elemenet found.
2612  if (returnNearestElmt && nearpt_min <= maxDistance)
2613  {
2614 
2615  std::string msg =
2616  "Failed to find point within element to "
2617  "tolerance of " +
2618  boost::lexical_cast<std::string>(tol) + " using local point (" +
2619  boost::lexical_cast<std::string>(locCoords[0]) + "," +
2620  boost::lexical_cast<std::string>(locCoords[1]) + "," +
2621  boost::lexical_cast<std::string>(locCoords[1]) +
2622  ") in element: " + boost::lexical_cast<std::string>(min_id);
2623  WARNINGL1(false, msg.c_str());
2624 
2625  Vmath::Vcopy(locCoords.size(), savLocCoords, 1, locCoords, 1);
2626  return min_id;
2627  }
2628  else
2629  {
2630  return -1;
2631  }
2632 }
size_t GetNumElmts(void)
This function returns the number of elements in the expansion which may be different for a homogeoeno...
Definition: ExpList.h:645
int GetCoordim(int eid)
This function returns the dimension of the coordinates of the element eid.
Definition: ExpList.h:1861

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.

◆ GetExpSize()

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

◆ GetExpType()

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

Returns the type of the expansion.

Definition at line 1310 of file ExpList.cpp.

1311 {
1312  return m_expType;
1313 }

References m_expType.

Referenced by v_CurlCurl().

◆ GetFieldDefinitions() [1/2]

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

Definition at line 891 of file ExpList.h.

892  {
893  return v_GetFieldDefinitions();
894  }
virtual std::vector< LibUtilities::FieldDefinitionsSharedPtr > v_GetFieldDefinitions(void)
Definition: ExpList.cpp:3516

References v_GetFieldDefinitions().

◆ GetFieldDefinitions() [2/2]

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

Definition at line 896 of file ExpList.h.

898  {
899  v_GetFieldDefinitions(fielddef);
900  }

References v_GetFieldDefinitions().

◆ GetFwdBwdTracePhys() [1/2]

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

Definition at line 2145 of file ExpList.h.

2147 {
2148  v_GetFwdBwdTracePhys(Fwd, Bwd);
2149 }
virtual void v_GetFwdBwdTracePhys(Array< OneD, NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
Definition: ExpList.cpp:4406

References v_GetFwdBwdTracePhys().

◆ GetFwdBwdTracePhys() [2/2]

void Nektar::MultiRegions::ExpList::GetFwdBwdTracePhys ( const Array< OneD, const NekDouble > &  field,
Array< OneD, NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd,
bool  FillBnd = true,
bool  PutFwdInBwdOnBCs = false,
bool  DoExchange = true 
)
inline

Definition at line 2150 of file ExpList.h.

2154 {
2155  v_GetFwdBwdTracePhys(field, Fwd, Bwd, FillBnd, PutFwdInBwdOnBCs,
2156  DoExchange);
2157 }

References v_GetFwdBwdTracePhys().

◆ GetGlobalLinSysManager()

LibUtilities::NekManager< GlobalLinSysKey, GlobalLinSys > & Nektar::MultiRegions::ExpList::GetGlobalLinSysManager ( void  )

Definition at line 5316 of file ExpList.cpp.

5317 {
5318  return v_GetGlobalLinSysManager();
5319 }
virtual LibUtilities::NekManager< GlobalLinSysKey, GlobalLinSys > & v_GetGlobalLinSysManager(void)
Definition: ExpList.cpp:3324

References v_GetGlobalLinSysManager().

◆ GetGraph()

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

Definition at line 964 of file ExpList.h.

965  {
966  return m_graph;
967  }

References m_graph.

◆ GetHomogeneousBasis()

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

Definition at line 969 of file ExpList.h.

970  {
971  return v_GetHomogeneousBasis();
972  }
virtual LibUtilities::BasisSharedPtr v_GetHomogeneousBasis(void)
Definition: ExpList.h:1444

References v_GetHomogeneousBasis().

◆ GetHomoLen()

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

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

Definition at line 596 of file ExpList.h.

597  {
598  return v_GetHomoLen();
599  }
virtual NekDouble v_GetHomoLen(void)
Definition: ExpList.cpp:3272

References v_GetHomoLen().

◆ GetLeftAdjacentFaces()

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

Definition at line 2187 of file ExpList.h.

2188 {
2189  return v_GetLeftAdjacentFaces();
2190 }
virtual const std::vector< bool > & v_GetLeftAdjacentFaces(void) const
Definition: ExpList.cpp:4477

References v_GetLeftAdjacentFaces().

◆ GetLeftAdjacentTraces()

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

Definition at line 2261 of file ExpList.h.

2262 {
2263  return v_GetLeftAdjacentTraces();
2264 }
virtual std::vector< bool > & v_GetLeftAdjacentTraces(void)
Definition: ExpList.cpp:3937

References v_GetLeftAdjacentTraces().

◆ GetLocTraceFromTracePts()

void Nektar::MultiRegions::ExpList::GetLocTraceFromTracePts ( const Array< OneD, const NekDouble > &  Fwd,
const Array< OneD, const NekDouble > &  Bwd,
Array< OneD, NekDouble > &  locTraceFwd,
Array< OneD, NekDouble > &  locTraceBwd 
)
inline

Definition at line 2170 of file ExpList.h.

2174 {
2175  v_GetLocTraceFromTracePts(Fwd, Bwd, locTraceFwd, locTraceBwd);
2176 }
virtual void v_GetLocTraceFromTracePts(const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &locTraceFwd, Array< OneD, NekDouble > &locTraceBwd)
Definition: ExpList.cpp:4452

References v_GetLocTraceFromTracePts().

Referenced by AddTraceJacToElmtJac().

◆ GetLocTraceToTraceMap()

const LocTraceToTraceMapSharedPtr & Nektar::MultiRegions::ExpList::GetLocTraceToTraceMap ( ) const
inline

Definition at line 2081 of file ExpList.h.

2083 {
2084  return v_GetLocTraceToTraceMap();
2085 }
virtual const std::shared_ptr< LocTraceToTraceMap > & v_GetLocTraceToTraceMap(void) const
Definition: ExpList.cpp:6045

References v_GetLocTraceToTraceMap().

Referenced by AddTraceJacToElmtJac().

◆ GetMatIpwrtDeriveBase() [1/2]

void Nektar::MultiRegions::ExpList::GetMatIpwrtDeriveBase ( const Array< OneD, const Array< OneD, NekDouble >> &  inarray,
const int  nDirctn,
Array< OneD, DNekMatSharedPtr > &  mtxPerVar 
)

Definition at line 5406 of file ExpList.cpp.

5409 {
5410  int nTotElmt = (*m_exp).size();
5411  int nElmtPnt = (*m_exp)[0]->GetTotPoints();
5412  int nElmtCoef = (*m_exp)[0]->GetNcoeffs();
5413 
5414  Array<OneD, NekDouble> tmpCoef(nElmtCoef, 0.0);
5415  Array<OneD, NekDouble> tmpPhys(nElmtPnt, 0.0);
5416 
5417  for (int nelmt = 0; nelmt < nTotElmt; nelmt++)
5418  {
5419  nElmtCoef = (*m_exp)[nelmt]->GetNcoeffs();
5420  nElmtPnt = (*m_exp)[nelmt]->GetTotPoints();
5421 
5422  if (tmpPhys.size() != nElmtPnt || tmpCoef.size() != nElmtCoef)
5423  {
5424  tmpPhys = Array<OneD, NekDouble>(nElmtPnt, 0.0);
5425  tmpCoef = Array<OneD, NekDouble>(nElmtCoef, 0.0);
5426  }
5427 
5428  for (int ncl = 0; ncl < nElmtPnt; ncl++)
5429  {
5430  tmpPhys[ncl] = inarray[nelmt][ncl];
5431 
5432  (*m_exp)[nelmt]->IProductWRTDerivBase(nDirctn, tmpPhys, tmpCoef);
5433 
5434  for (int nrw = 0; nrw < nElmtCoef; nrw++)
5435  {
5436  (*mtxPerVar[nelmt])(nrw, ncl) = tmpCoef[nrw];
5437  }
5438  // to maintain all the other columes are zero.
5439  tmpPhys[ncl] = 0.0;
5440  }
5441  }
5442 }

◆ GetMatIpwrtDeriveBase() [2/2]

void Nektar::MultiRegions::ExpList::GetMatIpwrtDeriveBase ( const TensorOfArray3D< NekDouble > &  inarray,
Array< OneD, DNekMatSharedPtr > &  mtxPerVar 
)

Definition at line 5444 of file ExpList.cpp.

5446 {
5447  int nTotElmt = (*m_exp).size();
5448 
5449  int nspacedim = m_graph->GetSpaceDimension();
5450  Array<OneD, Array<OneD, NekDouble>> projectedpnts(nspacedim);
5451  Array<OneD, Array<OneD, NekDouble>> tmppnts(nspacedim);
5452  Array<OneD, DNekMatSharedPtr> ArrayStdMat(nspacedim);
5453  Array<OneD, Array<OneD, NekDouble>> ArrayStdMat_data(nspacedim);
5454 
5455  Array<OneD, NekDouble> clmnArray, clmnStdMatArray;
5456 
5458  int nElmtPntPrevious = 0;
5459  int nElmtCoefPrevious = 0;
5460 
5461  int nElmtPnt, nElmtCoef;
5462  for (int nelmt = 0; nelmt < nTotElmt; nelmt++)
5463  {
5464  nElmtCoef = (*m_exp)[nelmt]->GetNcoeffs();
5465  nElmtPnt = (*m_exp)[nelmt]->GetTotPoints();
5466  LibUtilities::ShapeType ElmtTypeNow = (*m_exp)[nelmt]->DetShapeType();
5467 
5468  if (nElmtPntPrevious != nElmtPnt || nElmtCoefPrevious != nElmtCoef ||
5469  (ElmtTypeNow != ElmtTypePrevious))
5470  {
5471  if (nElmtPntPrevious != nElmtPnt)
5472  {
5473  for (int ndir = 0; ndir < nspacedim; ndir++)
5474  {
5475  projectedpnts[ndir] = Array<OneD, NekDouble>(nElmtPnt, 0.0);
5476  tmppnts[ndir] = Array<OneD, NekDouble>(nElmtPnt, 0.0);
5477  }
5478  }
5480  stdExp = (*m_exp)[nelmt]->GetStdExp();
5481  StdRegions::StdMatrixKey matkey(StdRegions::eDerivBase0,
5482  stdExp->DetShapeType(), *stdExp);
5483 
5484  ArrayStdMat[0] = stdExp->GetStdMatrix(matkey);
5485  ArrayStdMat_data[0] = ArrayStdMat[0]->GetPtr();
5486 
5487  if (nspacedim > 1)
5488  {
5489  StdRegions::StdMatrixKey matkey(
5490  StdRegions::eDerivBase1, stdExp->DetShapeType(), *stdExp);
5491 
5492  ArrayStdMat[1] = stdExp->GetStdMatrix(matkey);
5493  ArrayStdMat_data[1] = ArrayStdMat[1]->GetPtr();
5494 
5495  if (nspacedim > 2)
5496  {
5497  StdRegions::StdMatrixKey matkey(StdRegions::eDerivBase2,
5498  stdExp->DetShapeType(),
5499  *stdExp);
5500 
5501  ArrayStdMat[2] = stdExp->GetStdMatrix(matkey);
5502  ArrayStdMat_data[2] = ArrayStdMat[2]->GetPtr();
5503  }
5504  }
5505 
5506  ElmtTypePrevious = ElmtTypeNow;
5507  nElmtPntPrevious = nElmtPnt;
5508  nElmtCoefPrevious = nElmtCoef;
5509  }
5510  else
5511  {
5512  for (int ndir = 0; ndir < nspacedim; ndir++)
5513  {
5514  Vmath::Zero(nElmtPnt, projectedpnts[ndir], 1);
5515  }
5516  }
5517 
5518  for (int ndir = 0; ndir < nspacedim; ndir++)
5519  {
5520  (*m_exp)[nelmt]->AlignVectorToCollapsedDir(
5521  ndir, inarray[ndir][nelmt], tmppnts);
5522  for (int n = 0; n < nspacedim; n++)
5523  {
5524  Vmath::Vadd(nElmtPnt, tmppnts[n], 1, projectedpnts[n], 1,
5525  projectedpnts[n], 1);
5526  }
5527  }
5528 
5529  for (int ndir = 0; ndir < nspacedim; ndir++)
5530  {
5531  // weight with metric
5532  (*m_exp)[nelmt]->MultiplyByQuadratureMetric(projectedpnts[ndir],
5533  projectedpnts[ndir]);
5534  Array<OneD, NekDouble> MatDataArray = mtxPerVar[nelmt]->GetPtr();
5535 
5536  for (int np = 0; np < nElmtPnt; np++)
5537  {
5538  NekDouble factor = projectedpnts[ndir][np];
5539  clmnArray = MatDataArray + np * nElmtCoef;
5540  clmnStdMatArray = ArrayStdMat_data[ndir] + np * nElmtCoef;
5541  Vmath::Svtvp(nElmtCoef, factor, clmnStdMatArray, 1, clmnArray,
5542  1, clmnArray, 1);
5543  }
5544  }
5545  }
5546 }
void Svtvp(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
svtvp (scalar times vector plus vector): z = alpha*x + y
Definition: Vmath.cpp:622

References Nektar::StdRegions::eDerivBase0, Nektar::StdRegions::eDerivBase1, Nektar::StdRegions::eDerivBase2, Nektar::LibUtilities::eNoShapeType, m_graph, Vmath::Svtvp(), Vmath::Vadd(), and Vmath::Zero().

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

1749 {
1750  v_GetMovingFrames(MMFdir, CircCentre, outarray);
1751 }
virtual void v_GetMovingFrames(const SpatialDomains::GeomMMF MMFdir, const Array< OneD, const NekDouble > &CircCentre, Array< OneD, Array< OneD, NekDouble >> &outarray)
Definition: ExpList.cpp:3717

References v_GetMovingFrames().

◆ GetNcoeffs() [1/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 1497 of file ExpList.h.

1498 {
1499  return (*m_exp)[eid]->GetNcoeffs();
1500 }

References m_exp.

◆ GetNcoeffs() [2/2]

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

◆ GetNormals()

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

Definition at line 2124 of file ExpList.h.

2125 {
2126  v_GetNormals(normals);
2127 }
virtual void v_GetNormals(Array< OneD, Array< OneD, NekDouble >> &normals)
Populate normals with the normals of all expansions.
Definition: ExpList.cpp:4015

References v_GetNormals().

◆ GetNpoints()

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

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

Definition at line 1568 of file ExpList.h.

1569 {
1570  return m_npoints;
1571 }

References m_npoints.

Referenced by export_ExpList(), and MultiplyByMassMatrix().

◆ GetNumElmts()

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

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

Definition at line 645 of file ExpList.h.

646  {
647  return v_GetNumElmts();
648  }
virtual size_t v_GetNumElmts(void)
Definition: ExpList.h:1159

References v_GetNumElmts().

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

◆ GetPeriodicEntities()

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

Definition at line 884 of file ExpList.h.

887  {
888  v_GetPeriodicEntities(periodicVerts, periodicEdges, periodicFaces);
889  }
virtual void v_GetPeriodicEntities(PeriodicMap &periodicVerts, PeriodicMap &periodicEdges, PeriodicMap &periodicFaces)
Definition: ExpList.cpp:5061

References v_GetPeriodicEntities().

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

1989 {
1990  return m_phys;
1991 }
Array< OneD, NekDouble > m_phys
The global expansion evaluated at the quadrature points.
Definition: ExpList.h:1092

References m_phys.

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

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

1624 {
1625  return m_physState;
1626 }

References m_physState.

Referenced by export_ExpList().

◆ GetPlane()

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

Definition at line 973 of file ExpList.h.

974  {
975  return v_GetPlane(n);
976  }
virtual std::shared_ptr< ExpList > & v_GetPlane(int n)
Definition: ExpList.cpp:5091

References v_GetPlane().

◆ GetPoolCount()

int Nektar::MultiRegions::ExpList::GetPoolCount ( std::string  poolName)

Added for access to the pool count by external code (e.g. UnitTests) which can't access the static pool across compilation units on Windows builds.

Definition at line 5305 of file ExpList.cpp.

5306 {
5307  return v_GetPoolCount(poolName);
5308 }
virtual int v_GetPoolCount(std::string)
Definition: ExpList.cpp:3309

References v_GetPoolCount().

◆ GetRobinBCInfo()

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

Definition at line 879 of file ExpList.h.

880  {
881  return v_GetRobinBCInfo();
882  }
virtual std::map< int, RobinBCInfoSharedPtr > v_GetRobinBCInfo(void)
Definition: ExpList.cpp:5051

References v_GetRobinBCInfo().

Referenced by GenGlobalBndLinSys(), and GenGlobalMatrixFull().

◆ GetSession()

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

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

1871 {
1872  return (*m_exp)[0]->GetShapeDimension();
1873 }

References m_exp.

Referenced by CreateCollections(), and GeneralGetFieldDefinitions().

◆ GetSharedThisPtr()

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

Returns a shared pointer to the current object.

Definition at line 950 of file ExpList.h.

951  {
952  return shared_from_this();
953  }

Referenced by GenGlobalBndLinSys(), GenGlobalLinSys(), Nektar::MultiRegions::ContField::GetGJPForcing(), and Nektar::MultiRegions::ContField::v_HelmSolve().

◆ GetTotPoints() [1/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 1542 of file ExpList.h.

1543 {
1544  return (*m_exp)[eid]->GetTotPoints();
1545 }

References m_exp.

◆ GetTotPoints() [2/2]

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

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

2113 {
2114  return v_GetTrace();
2115 }
virtual std::shared_ptr< ExpList > & v_GetTrace()
Definition: ExpList.cpp:3916

References v_GetTrace().

Referenced by AddTraceJacToElmtJac(), and Nektar::MultiRegions::DisContField::v_AddTraceIntegral().

◆ GetTraceBndMap()

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

Definition at line 2120 of file ExpList.h.

2121 {
2122  return v_GetTraceBndMap();
2123 }
virtual const Array< OneD, const int > & v_GetTraceBndMap()
Definition: ExpList.cpp:3932

References v_GetTraceBndMap().

◆ GetTraceMap()

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

Definition at line 2116 of file ExpList.h.

2117 {
2118  return v_GetTraceMap();
2119 }
virtual std::shared_ptr< AssemblyMapDG > & v_GetTraceMap()
Definition: ExpList.cpp:3924

References v_GetTraceMap().

Referenced by v_GetTraceBndMap().

◆ GetTransposition()

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

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

Definition at line 589 of file ExpList.h.

590  {
591  return v_GetTransposition();
592  }
virtual LibUtilities::TranspositionSharedPtr v_GetTransposition(void)
Definition: ExpList.cpp:3264

References v_GetTransposition().

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

1585 {
1586  return m_WaveSpace;
1587 }

References m_WaveSpace.

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

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

613  {
614  return v_GetYIDs();
615  }
virtual Array< OneD, const unsigned int > v_GetYIDs(void)
Definition: ExpList.cpp:3295

References v_GetYIDs().

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

583  {
584  return v_GetZIDs();
585  }
virtual Array< OneD, const unsigned int > v_GetZIDs(void)
Definition: ExpList.cpp:3287

References v_GetZIDs().

Referenced by v_WriteTecplotZone().

◆ 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 ( 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 1959 of file ExpList.h.

1961 {
1962  v_GlobalToLocal(inarray, outarray);
1963 }
virtual void v_GlobalToLocal(void)
Definition: ExpList.cpp:4687

References v_GlobalToLocal().

◆ GlobalToLocal() [2/2]

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

Scatters from the global coefficients \(\boldsymbol{\hat{u}}_g\) to the local coefficients \(\boldsymbol{\hat{u}}_l\).

Definition at line 1929 of file ExpList.h.

1930 {
1931  v_GlobalToLocal();
1932 }

References v_GlobalToLocal().

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

3388 {
3389  NekDouble err = 0.0, errh1;
3390  int i;
3391 
3392  for (i = 0; i < (*m_exp).size(); ++i)
3393  {
3394  errh1 = (*m_exp)[i]->H1(inarray + m_phys_offset[i],
3395  soln + m_phys_offset[i]);
3396  err += errh1 * errh1;
3397  }
3398 
3399  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
3400 
3401  return sqrt(err);
3402 }
scalarT< T > sqrt(scalarT< T > in)
Definition: scalar.hpp:294

References m_comm, m_phys_offset, Nektar::LibUtilities::ReduceSum, and tinysimd::sqrt().

◆ HelmSolve()

GlobalLinSysKey Nektar::MultiRegions::ExpList::HelmSolve ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
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 1694 of file ExpList.h.

1700 {
1701  return v_HelmSolve(inarray, outarray, factors, varcoeff, varfactors,
1702  dirForcing, PhysSpaceForcing);
1703 }
virtual GlobalLinSysKey v_HelmSolve(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const StdRegions::ConstFactorMap &factors, const StdRegions::VarCoeffMap &varcoeff, const MultiRegions::VarFactorsMap &varfactors, const Array< OneD, const NekDouble > &dirForcing, const bool PhysSpaceForcing)
Definition: ExpList.cpp:4509

References v_HelmSolve().

◆ HomogeneousBwdTrans()

void Nektar::MultiRegions::ExpList::HomogeneousBwdTrans ( const int  npts,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
bool  Shuff = true,
bool  UnShuff = true 
)
inline

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

567  {
568  return v_HomogeneousEnergy();
569  }
virtual Array< OneD, const NekDouble > v_HomogeneousEnergy(void)
Definition: ExpList.cpp:3256

References v_HomogeneousEnergy().

◆ HomogeneousFwdTrans()

void Nektar::MultiRegions::ExpList::HomogeneousFwdTrans ( const int  npts,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
bool  Shuff = true,
bool  UnShuff = true 
)
inline

Definition at line 1798 of file ExpList.h.

1801 {
1802  v_HomogeneousFwdTrans(npts, inarray, outarray, Shuff, UnShuff);
1803 }
virtual void v_HomogeneousFwdTrans(const int npts, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, bool Shuff=true, bool UnShuff=true)
Definition: ExpList.cpp:4545

References v_HomogeneousFwdTrans().

Referenced by Nektar::MultiRegions::ExpListHomogeneous1D::v_DealiasedDotProd(), Nektar::MultiRegions::ExpListHomogeneous1D::v_DealiasedProd(), Nektar::MultiRegions::ExpListHomogeneous2D::v_DealiasedProd(), Nektar::MultiRegions::ExpList2DHomogeneous2D::v_FwdTrans(), Nektar::MultiRegions::ExpListHomogeneous1D::v_FwdTrans(), Nektar::MultiRegions::ExpListHomogeneous2D::v_FwdTrans(), Nektar::MultiRegions::ExpListHomogeneous1D::v_FwdTransBndConstrained(), Nektar::MultiRegions::ExpListHomogeneous2D::v_FwdTransBndConstrained(), Nektar::MultiRegions::ExpListHomogeneous1D::v_FwdTransLocalElmt(), Nektar::MultiRegions::ExpListHomogeneous2D::v_FwdTransLocalElmt(), Nektar::MultiRegions::ContField3DHomogeneous1D::v_HelmSolve(), Nektar::MultiRegions::ContField3DHomogeneous2D::v_HelmSolve(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_HelmSolve(), Nektar::MultiRegions::DisContField3DHomogeneous2D::v_HelmSolve(), Nektar::MultiRegions::ExpListHomogeneous1D::v_IProductWRTBase(), Nektar::MultiRegions::ExpListHomogeneous1D::v_PhysDeriv(), and Nektar::MultiRegions::ExpListHomogeneous2D::v_PhysDeriv().

◆ ImposeDirichletConditions()

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

Impose Dirichlet Boundary Conditions onto Array.

Definition at line 1906 of file ExpList.h.

1907 {
1908  v_ImposeDirichletConditions(outarray);
1909 }
virtual void v_ImposeDirichletConditions(Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:4646

References v_ImposeDirichletConditions().

◆ InitialiseExpVector()

void Nektar::MultiRegions::ExpList::InitialiseExpVector ( const SpatialDomains::ExpansionInfoMap expmap)
private

Define a list of elements using the geometry and basis key information in expmap;.

Definition at line 1142 of file ExpList.cpp.

1144 {
1145 
1147  SpatialDomains::TriGeomSharedPtr TriangleGeom;
1148  SpatialDomains::QuadGeomSharedPtr QuadrilateralGeom;
1153 
1154  int id = 0;
1156 
1157  m_expType = eNoType;
1158  // Process each expansion in the graph
1159  for (auto &expIt : expmap)
1160  {
1161  const SpatialDomains::ExpansionInfoShPtr expInfo = expIt.second;
1162 
1163  switch (expInfo->m_basisKeyVector.size())
1164  {
1165  case 1: // Segment Expansions
1166  {
1168  "Cannot mix expansion dimensions in one vector");
1169  m_expType = e1D;
1170 
1171  if ((SegmentGeom =
1172  std::dynamic_pointer_cast<SpatialDomains::SegGeom>(
1173  expInfo->m_geomShPtr)))
1174  {
1175  // Retrieve basis key from expansion
1176  LibUtilities::BasisKey bkey = expInfo->m_basisKeyVector[0];
1177 
1178  exp =
1180  bkey, SegmentGeom);
1181  }
1182  else
1183  {
1185  "dynamic cast to a 1D Geom failed");
1186  }
1187  }
1188  break;
1189  case 2:
1190  {
1192  "Cannot mix expansion dimensions in one vector");
1193  m_expType = e2D;
1194 
1195  LibUtilities::BasisKey Ba = expInfo->m_basisKeyVector[0];
1196  LibUtilities::BasisKey Bb = expInfo->m_basisKeyVector[1];
1197 
1198  if ((TriangleGeom =
1199  std::dynamic_pointer_cast<SpatialDomains ::TriGeom>(
1200  expInfo->m_geomShPtr)))
1201  {
1202 
1203  // This is not elegantly implemented needs re-thinking.
1204  if (Ba.GetBasisType() == LibUtilities::eGLL_Lagrange)
1205  {
1206  LibUtilities::BasisKey newBa(LibUtilities::eOrtho_A,
1207  Ba.GetNumModes(),
1208  Ba.GetPointsKey());
1209 
1210  LibUtilities::PointsType TriNb =
1213  AllocateSharedPtr(newBa, Bb, TriNb, TriangleGeom);
1214  }
1215  else
1216  {
1218  AllocateSharedPtr(Ba, Bb, TriangleGeom);
1219  }
1220  }
1221  else if ((QuadrilateralGeom = std::dynamic_pointer_cast<
1222  SpatialDomains::QuadGeom>(expInfo->m_geomShPtr)))
1223  {
1224  exp =
1226  Ba, Bb, QuadrilateralGeom);
1227  }
1228  else
1229  {
1231  "dynamic cast to a 2D Geom failed");
1232  }
1233  }
1234  break;
1235  case 3:
1236  {
1238  "Cannot mix expansion dimensions in one vector");
1239  m_expType = e3D;
1240 
1241  LibUtilities::BasisKey Ba = expInfo->m_basisKeyVector[0];
1242  LibUtilities::BasisKey Bb = expInfo->m_basisKeyVector[1];
1243  LibUtilities::BasisKey Bc = expInfo->m_basisKeyVector[2];
1244 
1245  if ((TetGeom =
1246  std::dynamic_pointer_cast<SpatialDomains::TetGeom>(
1247  expInfo->m_geomShPtr)))
1248  {
1249 
1250  if (Ba.GetBasisType() == LibUtilities::eGLL_Lagrange ||
1251  Ba.GetBasisType() == LibUtilities::eGauss_Lagrange)
1252  {
1254  "LocalRegions::NodalTetExp is not implemented "
1255  "yet");
1256  }
1257  else
1258  {
1259  exp = MemoryManager<
1260  LocalRegions::TetExp>::AllocateSharedPtr(Ba, Bb, Bc,
1261  TetGeom);
1262  }
1263  }
1264  else if ((PrismGeom = std::dynamic_pointer_cast<
1265  SpatialDomains ::PrismGeom>(
1266  expInfo->m_geomShPtr)))
1267  {
1268  exp = MemoryManager<
1269  LocalRegions::PrismExp>::AllocateSharedPtr(Ba, Bb, Bc,
1270  PrismGeom);
1271  }
1272  else if ((PyrGeom = std::dynamic_pointer_cast<
1273  SpatialDomains::PyrGeom>(expInfo->m_geomShPtr)))
1274  {
1275 
1276  exp =
1278  Ba, Bb, Bc, PyrGeom);
1279  }
1280  else if ((HexGeom = std::dynamic_pointer_cast<
1281  SpatialDomains::HexGeom>(expInfo->m_geomShPtr)))
1282  {
1283  exp =
1285  Ba, Bb, Bc, HexGeom);
1286  }
1287  else
1288  {
1290  "dynamic cast to a Geom failed");
1291  }
1292  }
1293  break;
1294  default:
1296  "Dimension of basis key is greater than 3");
1297  }
1298 
1299  // Assign next id
1300  exp->SetElmtId(id++);
1301 
1302  // Add the expansion
1303  (*m_exp).push_back(exp);
1304  }
1305 }
@ eGauss_Lagrange
Lagrange Polynomials using the Gauss points.
Definition: BasisType.h:59
@ eOrtho_A
Principle Orthogonal Functions .
Definition: BasisType.h:44
std::shared_ptr< PrismGeom > PrismGeomSharedPtr
Definition: PrismGeom.h:85
std::shared_ptr< HexGeom > HexGeomSharedPtr
Definition: HexGeom.h:87
std::shared_ptr< PyrGeom > PyrGeomSharedPtr
Definition: PyrGeom.h:77
std::shared_ptr< ExpansionInfo > ExpansionInfoShPtr
Definition: MeshGraph.h:140
std::shared_ptr< TetGeom > TetGeomSharedPtr
Definition: TetGeom.h:85

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL1, Nektar::MultiRegions::e1D, Nektar::MultiRegions::e2D, Nektar::MultiRegions::e3D, Nektar::ErrorUtil::efatal, Nektar::LibUtilities::eGauss_Lagrange, Nektar::LibUtilities::eGLL_Lagrange, Nektar::LibUtilities::eNodalTriElec, Nektar::MultiRegions::eNoType, Nektar::LibUtilities::eOrtho_A, Nektar::LibUtilities::BasisKey::GetBasisType(), Nektar::LibUtilities::BasisKey::GetNumModes(), Nektar::LibUtilities::BasisKey::GetPointsKey(), m_expType, and NEKERROR.

Referenced by ExpList().

◆ Integral() [1/2]

NekDouble Nektar::MultiRegions::ExpList::Integral ( )
inline

Calculates the \(H^1\) error of the global spectral/hp element approximation.

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

536  {
537  ASSERTL1(m_physState == true, "local physical space is not true ");
538  return Integral(m_phys);
539  }
NekDouble Integral()
Calculates the error of the global spectral/hp element approximation.
Definition: ExpList.h:535

References ASSERTL1, m_phys, and m_physState.

◆ Integral() [2/2]

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

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

557  {
558  return v_Integral(inarray);
559  }
virtual NekDouble v_Integral(const Array< OneD, const NekDouble > &inarray)
Definition: ExpList.cpp:3222

References v_Integral().

◆ IProductWRTBase()

void Nektar::MultiRegions::ExpList::IProductWRTBase ( 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 1630 of file ExpList.h.

1633 {
1634  v_IProductWRTBase(inarray, outarray);
1635 }
virtual void v_IProductWRTBase(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:4718

References v_IProductWRTBase().

Referenced by Nektar::MultiRegions::ContField::FwdTrans(), Nektar::MultiRegions::ContField::LaplaceSolve(), MultiplyByMassMatrix(), v_FwdTransLocalElmt(), Nektar::MultiRegions::ContField::v_HelmSolve(), Nektar::MultiRegions::DisContField::v_HelmSolve(), Nektar::MultiRegions::ContField::v_LinearAdvectionDiffusionReactionSolve(), Nektar::MultiRegions::ContField::v_LinearAdvectionReactionSolve(), and Nektar::MultiRegions::ContField::v_SmoothField().

◆ IProductWRTDerivBase() [1/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 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 1453 of file ExpList.cpp.

1456 {
1457  Array<OneD, NekDouble> tmp0, tmp1, tmp2;
1458  // assume coord dimension defines the size of Deriv Base
1459  int dim = GetCoordim(0);
1460 
1461  ASSERTL1(inarray.size() >= dim, "inarray is not of sufficient dimension");
1462 
1463  // initialise if required
1465  {
1466  for (int i = 0; i < m_collections.size(); ++i)
1467  {
1469  }
1471  }
1472 
1473  LibUtilities::Timer timer;
1474 
1475  LIKWID_MARKER_START("IProductWRTDerivBase_coll");
1476  timer.Start();
1477 
1478  switch (dim)
1479  {
1480  case 1:
1481  for (int i = 0; i < m_collections.size(); ++i)
1482  {
1483  m_collections[i].ApplyOperator(
1485  inarray[0] + m_coll_phys_offset[i],
1486  tmp0 = outarray + m_coll_coeff_offset[i]);
1487  }
1488  break;
1489  case 2:
1490  for (int i = 0; i < m_collections.size(); ++i)
1491  {
1492  m_collections[i].ApplyOperator(
1494  inarray[0] + m_coll_phys_offset[i],
1495  tmp0 = inarray[1] + m_coll_phys_offset[i],
1496  tmp1 = outarray + m_coll_coeff_offset[i]);
1497  }
1498  break;
1499  case 3:
1500  for (int i = 0; i < m_collections.size(); ++i)
1501  {
1502  m_collections[i].ApplyOperator(
1504  inarray[0] + m_coll_phys_offset[i],
1505  tmp0 = inarray[1] + m_coll_phys_offset[i],
1506  tmp1 = inarray[2] + m_coll_phys_offset[i],
1507  tmp2 = outarray + m_coll_coeff_offset[i]);
1508  }
1509  break;
1510  default:
1511  NEKERROR(ErrorUtil::efatal, "Dimension of inarray not correct");
1512  break;
1513  }
1514 
1515  timer.Stop();
1516  LIKWID_MARKER_STOP("IProductWRTDerivBase_coll");
1517 
1518  // Elapsed time
1519  timer.AccumulateRegion("Collections:IProductWRTDerivBase", 10);
1520 }
#define LIKWID_MARKER_START(regionTag)
Definition: Likwid.hpp:46
#define LIKWID_MARKER_STOP(regionTag)
Definition: Likwid.hpp:47

References Nektar::LibUtilities::Timer::AccumulateRegion(), ASSERTL1, Nektar::ErrorUtil::efatal, Nektar::Collections::eIProductWRTDerivBase, GetCoordim(), LIKWID_MARKER_START, LIKWID_MARKER_STOP, m_coll_coeff_offset, m_coll_phys_offset, m_collections, m_collectionsDoInit, NEKERROR, Nektar::LibUtilities::Timer::Start(), and Nektar::LibUtilities::Timer::Stop().

◆ IProductWRTDerivBase() [2/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::Expansion::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 1391 of file ExpList.cpp.

1394 {
1395  int i;
1396 
1397  Array<OneD, NekDouble> e_outarray;
1398 
1399  for (i = 0; i < (*m_exp).size(); ++i)
1400  {
1401  (*m_exp)[i]->IProductWRTDerivBase(dir, inarray + m_phys_offset[i],
1402  e_outarray =
1403  outarray + m_coeff_offset[i]);
1404  }
1405 }

References m_coeff_offset, and m_phys_offset.

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

1415 {
1416  int npts_e;
1417  int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
1418  int nq = direction.size() / coordim;
1419 
1420  Array<OneD, NekDouble> e_outarray;
1421  Array<OneD, NekDouble> e_MFdiv;
1422 
1423  Array<OneD, NekDouble> locdir;
1424 
1425  for (int i = 0; i < (*m_exp).size(); ++i)
1426  {
1427  npts_e = (*m_exp)[i]->GetTotPoints();
1428  locdir = Array<OneD, NekDouble>(npts_e * coordim);
1429 
1430  for (int k = 0; k < coordim; ++k)
1431  {
1432  Vmath::Vcopy(npts_e, &direction[k * nq + m_phys_offset[i]], 1,
1433  &locdir[k * npts_e], 1);
1434  }
1435 
1436  (*m_exp)[i]->IProductWRTDirectionalDerivBase(
1437  locdir, inarray + m_phys_offset[i],
1438  e_outarray = outarray + m_coeff_offset[i]);
1439  }
1440 }

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

◆ 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_\infty\) error of the global This function calculates the \(L_2\) error with respect to soln of the global spectral/hp element approximation.

Definition at line 506 of file ExpList.h.

509  {
510  return v_L2(inarray, soln);
511  }
virtual NekDouble v_L2(const Array< OneD, const NekDouble > &phys, const Array< OneD, const NekDouble > &soln=NullNekDouble1DArray)
Definition: ExpList.cpp:3177

References v_L2().

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

◆ LinearAdvectionDiffusionReactionSolve()

GlobalLinSysKey Nektar::MultiRegions::ExpList::LinearAdvectionDiffusionReactionSolve ( const Array< OneD, Array< OneD, NekDouble >> &  velocity,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
const NekDouble  lambda,
const Array< OneD, const NekDouble > &  dirForcing = NullNekDouble1DArray 
)
inline

Solve Advection Diffusion Reaction.

Definition at line 1707 of file ExpList.h.

1712 {
1713  return v_LinearAdvectionDiffusionReactionSolve(velocity, inarray, outarray,
1714  lambda, dirForcing);
1715 }
virtual GlobalLinSysKey v_LinearAdvectionDiffusionReactionSolve(const Array< OneD, Array< OneD, NekDouble >> &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
Definition: ExpList.cpp:4522

References v_LinearAdvectionDiffusionReactionSolve().

◆ 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,
const Array< OneD, const NekDouble > &  dirForcing = NullNekDouble1DArray 
)
inline

Solve Advection Diffusion Reaction.

Definition at line 1716 of file ExpList.h.

1721 {
1722  v_LinearAdvectionReactionSolve(velocity, inarray, outarray, lambda,
1723  dirForcing);
1724 }
virtual void v_LinearAdvectionReactionSolve(const Array< OneD, Array< OneD, NekDouble >> &velocity, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray, const NekDouble lambda, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
Definition: ExpList.cpp:4534

References v_LinearAdvectionReactionSolve().

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

3141 {
3142  NekDouble err = 0.0;
3143 
3144  if (soln == NullNekDouble1DArray)
3145  {
3146  err = Vmath::Vmax(m_npoints, inarray, 1);
3147  }
3148  else
3149  {
3150  for (int i = 0; i < m_npoints; ++i)
3151  {
3152  err = max(err, abs(inarray[i] - soln[i]));
3153  }
3154  }
3155 
3156  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceMax);
3157 
3158  return err;
3159 }
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:945
scalarT< T > abs(scalarT< T > in)
Definition: scalar.hpp:298

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

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

1920 {
1921  v_LocalToGlobal(useComm);
1922 }
virtual void v_LocalToGlobal(bool UseComm)
Definition: ExpList.cpp:4672

References v_LocalToGlobal().

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

1926 {
1927  v_LocalToGlobal(inarray, outarray, useComm);
1928 }

References v_LocalToGlobal().

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

1330 {
1331  // Retrieve the block matrix using the given key.
1332  const DNekScalBlkMatSharedPtr &blockmat = GetBlockMatrix(gkey);
1333  int nrows = blockmat->GetRows();
1334  int ncols = blockmat->GetColumns();
1335 
1336  // Create NekVectors from the given data arrays
1337  NekVector<NekDouble> in(ncols, inarray, eWrapper);
1338  NekVector<NekDouble> out(nrows, outarray, eWrapper);
1339 
1340  // Perform matrix-vector multiply.
1341  out = (*blockmat) * in;
1342 }
const DNekScalBlkMatSharedPtr & GetBlockMatrix(const GlobalMatrixKey &gkey)
Definition: ExpList.cpp:2016

References Nektar::eWrapper, and GetBlockMatrix().

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

1773 {
1774  GlobalMatrixKey mkey(StdRegions::eInvMass);
1775  const DNekScalBlkMatSharedPtr &InvMass = GetBlockMatrix(mkey);
1776 
1777  // Inverse mass matrix
1778  NekVector<NekDouble> out(m_ncoeffs, outarray, eWrapper);
1779  if (inarray.get() == outarray.get())
1780  {
1781  NekVector<NekDouble> in(m_ncoeffs, inarray); // copy data
1782  out = (*InvMass) * in;
1783  }
1784  else
1785  {
1786  NekVector<NekDouble> in(m_ncoeffs, inarray, eWrapper);
1787  out = (*InvMass) * in;
1788  }
1789 }

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

Referenced by v_FwdTransLocalElmt().

◆ MultiplyByInvMassMatrix()

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

Definition at line 1685 of file ExpList.h.

1688 {
1689  v_MultiplyByInvMassMatrix(inarray, outarray);
1690 }
virtual void v_MultiplyByInvMassMatrix(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:4500

References v_MultiplyByInvMassMatrix().

◆ MultiplyByMassMatrix()

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

Definition at line 301 of file ExpList.h.

304  {
305  Array<OneD, NekDouble> tmp(GetNpoints(), 0.0);
306  BwdTrans(inarray, tmp);
307  IProductWRTBase(tmp, outarray);
308  }
void IProductWRTBase(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:1630
int GetNpoints(void) const
Returns the total number of quadrature points m_npoints .
Definition: ExpList.h:1568
void BwdTrans(const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
This function elementally evaluates the backward transformation of the global spectral/hp element exp...
Definition: ExpList.h:1677

References BwdTrans(), GetNpoints(), and IProductWRTBase().

◆ MultiplyByQuadratureMetric()

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

multiply the metric jacobi and quadrature weights

multiply the metric jacobi and quadrature weights

Definition at line 1347 of file ExpList.cpp.

1350 {
1351  Array<OneD, NekDouble> e_outarray;
1352 
1353  for (int i = 0; i < (*m_exp).size(); ++i)
1354  {
1355  (*m_exp)[i]->MultiplyByQuadratureMetric(inarray + m_phys_offset[i],
1356  e_outarray = outarray +
1357  m_phys_offset[i]);
1358  }
1359 }

References m_phys_offset.

◆ NormVectorIProductWRTBase() [1/2]

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

Definition at line 1852 of file ExpList.h.

1854 {
1855  v_NormVectorIProductWRTBase(V, outarray);
1856 }
virtual void v_NormVectorIProductWRTBase(Array< OneD, const NekDouble > &V1, Array< OneD, const NekDouble > &V2, Array< OneD, NekDouble > &outarray, int BndID)
Definition: ExpList.cpp:4593

References v_NormVectorIProductWRTBase().

◆ NormVectorIProductWRTBase() [2/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 1845 of file ExpList.h.

1849 {
1850  v_NormVectorIProductWRTBase(V1, V2, outarray, BndID);
1851 }

References v_NormVectorIProductWRTBase().

◆ PeriodicBwdCopy()

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

Copy and fill the Periodic boundaries.

Definition at line 2182 of file ExpList.h.

2184 {
2185  v_PeriodicBwdCopy(Fwd, Bwd);
2186 }
virtual void v_PeriodicBwdCopy(const Array< OneD, const NekDouble > &Fwd, Array< OneD, NekDouble > &Bwd)
Definition: ExpList.cpp:5008

References v_PeriodicBwdCopy().

◆ PhysDeriv() [1/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 1755 of file ExpList.h.

1759 {
1760  v_PhysDeriv(inarray, out_d0, out_d1, out_d2);
1761 }
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:1555

References v_PhysDeriv().

◆ PhysDeriv() [2/3]

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

Definition at line 1765 of file ExpList.h.

1768 {
1769  v_PhysDeriv(dir, inarray, out_d);
1770 }

References v_PhysDeriv().

◆ PhysDeriv() [3/3]

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

Definition at line 1771 of file ExpList.h.

1774 {
1775  v_PhysDeriv(edir, inarray, out_d);
1776 }

References v_PhysDeriv().

Referenced by v_CurlCurl().

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

1784 {
1785  v_PhysDirectionalDeriv(direction, inarray, outarray);
1786 }
virtual void v_PhysDirectionalDeriv(const Array< OneD, const NekDouble > &direction, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:1720

References v_PhysDirectionalDeriv().

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

2640 {
2641  int dim = GetCoordim(0);
2642  ASSERTL0(dim == coords.size(), "Invalid coordinate dimension.");
2643 
2644  // Grab the element index corresponding to coords.
2645  Array<OneD, NekDouble> xi(dim);
2646  int elmtIdx = GetExpIndex(coords, xi);
2647  ASSERTL0(elmtIdx > 0, "Unable to find element containing point.");
2648 
2649  // Grab that element's physical storage.
2650  Array<OneD, NekDouble> elmtPhys = phys + m_phys_offset[elmtIdx];
2651 
2652  // Evaluate the element at the appropriate point.
2653  return (*m_exp)[elmtIdx]->StdPhysEvaluate(xi, elmtPhys);
2654 }

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

Referenced by export_ExpList().

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

635  {
636  v_PhysGalerkinProjection1DScaled(scale, inarray, outarray);
637  }
virtual void v_PhysGalerkinProjection1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:5970

References v_PhysGalerkinProjection1DScaled().

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

624  {
625  v_PhysInterp1DScaled(scale, inarray, outarray);
626  }
virtual void v_PhysInterp1DScaled(const NekDouble scale, const Array< OneD, NekDouble > &inarray, Array< OneD, NekDouble > &outarray)
Definition: ExpList.cpp:5321

References v_PhysInterp1DScaled().

◆ Reset()

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

Reset geometry information and reset matrices.

Definition at line 383 of file ExpList.h.

384  {
385  v_Reset();
386  }
virtual void v_Reset()
Reset geometry information, metrics, matrix managers and geometry information.
Definition: ExpList.cpp:2673

References v_Reset().

◆ SetBndCondBwdWeight()

void Nektar::MultiRegions::ExpList::SetBndCondBwdWeight ( const int  index,
const NekDouble  value 
)
inline

Set the weight value for boundary conditions.

Definition at line 2090 of file ExpList.h.

2091 {
2092  v_SetBndCondBwdWeight(index, value);
2093 }
virtual void v_SetBndCondBwdWeight(const int index, const NekDouble value)
Definition: ExpList.cpp:4470

References v_SetBndCondBwdWeight().

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

1879 {
1880  m_coeffs[i] = val;
1881 }

References m_coeffs.

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

1887 {
1888  m_coeffs[i] = val;
1889 }

References m_coeffs.

◆ SetCoeffsArray()

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

Set the m_coeffs array to inarray.

Definition at line 1890 of file ExpList.h.

1891 {
1892  m_coeffs = inarray;
1893 }

References m_coeffs.

◆ SetExpType()

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

Returns the type of the expansion.

◆ SetHomo1DSpecVanVisc()

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

This function sets the Spectral Vanishing Viscosity in homogeneous1D expansion.

Definition at line 573 of file ExpList.h.

574  {
576  }
virtual void v_SetHomo1DSpecVanVisc(Array< OneD, NekDouble > visc)
Definition: ExpList.h:1452

References v_SetHomo1DSpecVanVisc().

◆ SetHomoLen()

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

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

Definition at line 603 of file ExpList.h.

604  {
605  return v_SetHomoLen(lhom);
606  }
virtual void v_SetHomoLen(const NekDouble lhom)
Definition: ExpList.cpp:3280

References v_SetHomoLen().

◆ 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 ( 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 1602 of file ExpList.h.

1603 {
1604  ASSERTL0((int)inarray.size() == m_npoints,
1605  "Input array does not have correct number of elements.");
1606  Vmath::Vcopy(m_npoints, &inarray[0], 1, &m_phys[0], 1);
1607  m_physState = true;
1608 }

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

◆ SetPhys() [2/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 1590 of file ExpList.h.

1591 {
1592  m_phys[i] = val;
1593 }

References m_phys.

◆ SetPhysArray()

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

Sets the array m_phys.

Definition at line 1609 of file ExpList.h.

1610 {
1611  m_phys = inarray;
1612 }

References m_phys.

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

1617 {
1618  m_physState = physState;
1619 }

References m_physState.

Referenced by export_ExpList().

◆ SetupCoeffPhys()

void Nektar::MultiRegions::ExpList::SetupCoeffPhys ( bool  DeclareCoeffPhysArrays = true,
bool  SetupOffsets = true 
)
private

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. Two 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. Finally we initialise m_coeffs and m_phys

Definition at line 1099 of file ExpList.cpp.

1100 {
1101  if (SetupOffsets)
1102  {
1103  int i;
1104 
1105  // Set up offset information and array sizes
1106  m_coeff_offset = Array<OneD, int>(m_exp->size());
1107  m_phys_offset = Array<OneD, int>(m_exp->size());
1108 
1109  m_ncoeffs = m_npoints = 0;
1110 
1111  for (i = 0; i < m_exp->size(); ++i)
1112  {
1114  m_phys_offset[i] = m_npoints;
1115  m_ncoeffs += (*m_exp)[i]->GetNcoeffs();
1116  m_npoints += (*m_exp)[i]->GetTotPoints();
1117  }
1118  }
1119 
1120  if (DeclareCoeffPhysArrays)
1121  {
1122  m_coeffs = Array<OneD, NekDouble>(m_ncoeffs, 0.0);
1123  m_phys = Array<OneD, NekDouble>(m_npoints, 0.0);
1124  }
1125 
1126  m_coeffsToElmt = Array<OneD, pair<int, int>>{size_t(m_ncoeffs)};
1127 
1128  for (int i = 0; i < m_exp->size(); ++i)
1129  {
1130  int coeffs_offset = m_coeff_offset[i];
1131 
1132  int loccoeffs = (*m_exp)[i]->GetNcoeffs();
1133 
1134  for (int j = 0; j < loccoeffs; ++j)
1135  {
1136  m_coeffsToElmt[coeffs_offset + j].first = i;
1137  m_coeffsToElmt[coeffs_offset + j].second = j;
1138  }
1139  }
1140 }

References m_coeff_offset, m_coeffs, m_coeffsToElmt, m_exp, m_ncoeffs, m_npoints, m_phys, and m_phys_offset.

Referenced by ExpList().

◆ SetUpPhysNormals()

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

Definition at line 2218 of file ExpList.h.

2219 {
2221 }
virtual void v_SetUpPhysNormals()
: Set up a normal along the trace elements between two elements at elemental level
Definition: ExpList.cpp:4812

References v_SetUpPhysNormals().

Referenced by Nektar::MultiRegions::DisContField::DisContField(), Nektar::MultiRegions::DisContField::GenerateBoundaryConditionExpansion(), and Nektar::MultiRegions::DisContField::SetUpDG().

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

1577 {
1578  m_WaveSpace = wavespace;
1579 }

References m_WaveSpace.

◆ SmoothField()

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

Smooth a field across elements.

Definition at line 1665 of file ExpList.h.

1666 {
1667  v_SmoothField(field);
1668 }
virtual void v_SmoothField(Array< OneD, NekDouble > &field)
Definition: ExpList.cpp:1841

References v_SmoothField().

◆ UnsetGlobalLinSys()

void Nektar::MultiRegions::ExpList::UnsetGlobalLinSys ( GlobalLinSysKey  key,
bool  clearLocalMatrices 
)

Definition at line 5310 of file ExpList.cpp.

5311 {
5312  v_UnsetGlobalLinSys(key, clearLocalMatrices);
5313 }
virtual void v_UnsetGlobalLinSys(GlobalLinSysKey, bool)
Definition: ExpList.cpp:3316

References v_UnsetGlobalLinSys().

◆ UpdateBndCondExpansion()

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

Definition at line 2094 of file ExpList.h.

2095 {
2096  return v_UpdateBndCondExpansion(i);
2097 }
virtual std::shared_ptr< ExpList > & v_UpdateBndCondExpansion(int i)
Definition: ExpList.cpp:3799

References v_UpdateBndCondExpansion().

◆ UpdateBndConditions()

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

Definition at line 2207 of file ExpList.h.

2208 {
2209  return v_UpdateBndConditions();
2210 }
virtual Array< OneD, SpatialDomains::BoundaryConditionShPtr > & v_UpdateBndConditions()
Definition: ExpList.cpp:5029

References v_UpdateBndConditions().

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

2055 {
2056  return m_coeffs;
2057 }

References m_coeffs.

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

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

2065 {
2066  m_physState = true;
2067  return m_phys;
2068 }

References m_phys, and m_physState.

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

2102 {
2103  v_Upwind(Vec, Fwd, Bwd, Upwind);
2104 }
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:3818
void Upwind(const Array< OneD, const NekDouble > &Vn, const Array< OneD, const NekDouble > &Fwd, const Array< OneD, const NekDouble > &Bwd, Array< OneD, NekDouble > &Upwind)
Definition: ExpList.h:2105

References Upwind(), and v_Upwind().

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

2109 {
2110  v_Upwind(Vn, Fwd, Bwd, Upwind);
2111 }

References v_Upwind().

Referenced by Upwind(), and v_Upwind().

◆ 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::DisContField.

Definition at line 4397 of file ExpList.cpp.

4400 {
4401  boost::ignore_unused(Fwd, Bwd, outarray);
4403  "This method is not defined or valid for this class type");
4404 }

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

Referenced by AddFwdBwdTraceIntegral().

◆ v_AddTraceIntegral() [1/2]

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

Reimplemented in Nektar::MultiRegions::DisContField.

Definition at line 4389 of file ExpList.cpp.

4391 {
4392  boost::ignore_unused(Fn, outarray);
4394  "This method is not defined or valid for this class type");
4395 }

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

◆ v_AddTraceIntegral() [2/2]

void Nektar::MultiRegions::ExpList::v_AddTraceIntegral ( const Array< OneD, const NekDouble > &  Fx,
const Array< OneD, const NekDouble > &  Fy,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Definition at line 4380 of file ExpList.cpp.

4383 {
4384  boost::ignore_unused(Fx, Fy, outarray);
4386  "This method is not defined or valid for this class type");
4387 }

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

Referenced by AddTraceIntegral().

◆ v_AddTraceIntegralToOffDiag()

void Nektar::MultiRegions::ExpList::v_AddTraceIntegralToOffDiag ( const Array< OneD, const NekDouble > &  FwdFlux,
const Array< OneD, const NekDouble > &  BwdFlux,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField.

Definition at line 5397 of file ExpList.cpp.

5401 {
5402  boost::ignore_unused(FwdFlux, BwdFlux, outarray);
5403  NEKERROR(ErrorUtil::efatal, "AddTraceIntegralToOffDiag not defined");
5404 }

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

Referenced by AddTraceIntegralToOffDiag().

◆ v_AddTraceQuadPhysToField()

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

Reimplemented in Nektar::MultiRegions::DisContField.

Definition at line 4434 of file ExpList.cpp.

4437 {
4438  boost::ignore_unused(field, Fwd, Bwd);
4440  "v_AddTraceQuadPhysToField is not defined for this class type");
4441 }

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

Referenced by AddTraceQuadPhysToField().

◆ v_AddTraceQuadPhysToOffDiag()

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

Definition at line 4443 of file ExpList.cpp.

4446 {
4447  boost::ignore_unused(field, Fwd, Bwd);
4449  "v_AddTraceQuadPhysToOffDiag is not defined for this class");
4450 }

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

Referenced by AddTraceQuadPhysToOffDiag().

◆ v_AppendFieldData() [1/2]

void Nektar::MultiRegions::ExpList::v_AppendFieldData ( LibUtilities::FieldDefinitionsSharedPtr fielddef,
std::vector< NekDouble > &  fielddata 
)
protectedvirtual

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

Definition at line 3531 of file ExpList.cpp.

3534 {
3535  v_AppendFieldData(fielddef, fielddata, m_coeffs);
3536 }

References m_coeffs.

Referenced by AppendFieldData().

◆ 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::ExpListHomogeneous2D, and Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 3538 of file ExpList.cpp.

3541 {
3542  int i;
3543  // Determine mapping from element ids to location in
3544  // expansion list
3545  // Determine mapping from element ids to location in
3546  // expansion list
3547  map<int, int> ElmtID_to_ExpID;
3548  for (i = 0; i < (*m_exp).size(); ++i)
3549  {
3550  ElmtID_to_ExpID[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
3551  }
3552 
3553  for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
3554  {
3555  int eid = ElmtID_to_ExpID[fielddef->m_elementIDs[i]];
3556  int datalen = (*m_exp)[eid]->GetNcoeffs();
3557  fielddata.insert(fielddata.end(), &coeffs[m_coeff_offset[eid]],
3558  &coeffs[m_coeff_offset[eid]] + datalen);
3559  }
3560 }

References m_coeff_offset.

◆ v_BwdTrans()

void Nektar::MultiRegions::ExpList::v_BwdTrans ( 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::ExpListHomogeneous2D, and Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 2470 of file ExpList.cpp.

2472 {
2473  LibUtilities::Timer timer;
2474 
2475  if (m_expType == e0D)
2476  {
2477  Vmath::Vcopy(m_ncoeffs, inarray, 1, outarray, 1);
2478  }
2479  else
2480  {
2481  // initialise if required
2483  {
2484  for (int i = 0; i < m_collections.size(); ++i)
2485  {
2486  m_collections[i].Initialise(Collections::eBwdTrans);
2487  }
2489  }
2490 
2491  LIKWID_MARKER_START("v_BwdTrans");
2492  timer.Start();
2493 
2494  Array<OneD, NekDouble> tmp;
2495  for (int i = 0; i < m_collections.size(); ++i)
2496  {
2497  m_collections[i].ApplyOperator(
2499  tmp = outarray + m_coll_phys_offset[i]);
2500  }
2501 
2502  timer.Stop();
2503  LIKWID_MARKER_STOP("v_BwdTrans");
2504  }
2505 
2506  // Elapsed time
2507  timer.AccumulateRegion("Collections:BwdTrans", 10);
2508 }

References Nektar::LibUtilities::Timer::AccumulateRegion(), Nektar::MultiRegions::e0D, Nektar::Collections::eBwdTrans, LIKWID_MARKER_START, LIKWID_MARKER_STOP, m_coll_coeff_offset, m_coll_phys_offset, m_collections, m_collectionsDoInit, m_expType, m_ncoeffs, Nektar::LibUtilities::Timer::Start(), Nektar::LibUtilities::Timer::Stop(), and Vmath::Vcopy().

Referenced by BwdTrans().

◆ v_ClearGlobalLinSysManager()

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

Reimplemented in Nektar::MultiRegions::ContField3DHomogeneous2D, Nektar::MultiRegions::ContField3DHomogeneous1D, and Nektar::MultiRegions::ContField.

Definition at line 3303 of file ExpList.cpp.

3304 {
3306  "ClearGlobalLinSysManager not implemented for ExpList.");
3307 }

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

Referenced by ClearGlobalLinSysManager().

◆ v_CurlCurl()

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

Definition at line 1652 of file ExpList.cpp.

1654 {
1655  int nq = GetTotPoints();
1656  Array<OneD, NekDouble> Vx(nq);
1657  Array<OneD, NekDouble> Uy(nq);
1658  Array<OneD, NekDouble> Dummy(nq);
1659 
1660  bool halfMode = false;
1661  if (GetExpType() == e3DH1D)
1662  {
1663  m_session->MatchSolverInfo("ModeType", "HalfMode", halfMode, false);
1664  }
1665 
1666  switch (m_expType)
1667  {
1668  case e2D:
1669  {
1670  PhysDeriv(xDir, Vel[yDir], Vx);
1671  PhysDeriv(yDir, Vel[xDir], Uy);
1672 
1673  Vmath::Vsub(nq, Vx, 1, Uy, 1, Dummy, 1);
1674 
1675  PhysDeriv(Dummy, Q[1], Q[0]);
1676 
1677  Vmath::Smul(nq, -1.0, Q[1], 1, Q[1], 1);
1678  }
1679  break;
1680 
1681  case e3D:
1682  case e3DH1D:
1683  case e3DH2D:
1684  {
1685  Array<OneD, NekDouble> Vz(nq);
1686  Array<OneD, NekDouble> Uz(nq);
1687  Array<OneD, NekDouble> Wx(nq);
1688  Array<OneD, NekDouble> Wy(nq);
1689 
1690  PhysDeriv(Vel[xDir], Dummy, Uy, Uz);
1691  PhysDeriv(Vel[yDir], Vx, Dummy, Vz);
1692  PhysDeriv(Vel[zDir], Wx, Wy, Dummy);
1693 
1694  Vmath::Vsub(nq, Wy, 1, Vz, 1, Q[0], 1);
1695  Vmath::Vsub(nq, Uz, 1, Wx, 1, Q[1], 1);
1696  Vmath::Vsub(nq, Vx, 1, Uy, 1, Q[2], 1);
1697 
1698  PhysDeriv(Q[0], Dummy, Uy, Uz);
1699  PhysDeriv(Q[1], Vx, Dummy, Vz);
1700  PhysDeriv(Q[2], Wx, Wy, Dummy);
1701 
1702  // For halfmode, need to change the sign of z derivatives
1703  if (halfMode)
1704  {
1705  Vmath::Neg(nq, Uz, 1);
1706  Vmath::Neg(nq, Vz, 1);
1707  }
1708 
1709  Vmath::Vsub(nq, Wy, 1, Vz, 1, Q[0], 1);
1710  Vmath::Vsub(nq, Uz, 1, Wx, 1, Q[1], 1);
1711  Vmath::Vsub(nq, Vx, 1, Uy, 1, Q[2], 1);
1712  }
1713  break;
1714  default:
1715  ASSERTL0(0, "Dimension not supported");
1716  break;
1717  }
1718 }
void PhysDeriv(Direction edir, const Array< OneD, const NekDouble > &inarray, Array< OneD, NekDouble > &out_d)
Definition: ExpList.h:1771
ExpansionType GetExpType(void)
Returns the type of the expansion.
Definition: ExpList.cpp:1310
void Neg(int n, T *x, const int incx)
Negate x = -x.
Definition: Vmath.cpp:518
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:419

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

Referenced by CurlCurl().

◆ v_DealiasedDotProd()

void Nektar::MultiRegions::ExpList::v_DealiasedDotProd ( const int  num_dofs,
const Array< OneD, Array< OneD, NekDouble >> &  inarray1,
const Array< OneD, Array< OneD, NekDouble >> &  inarray2,
Array< OneD, Array< OneD, NekDouble >> &  outarray 
)
protectedvirtual

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

Definition at line 4575 of file ExpList.cpp.

4579 {
4580  boost::ignore_unused(npts, inarray1, inarray2, outarray);
4582  "This method is not defined or valid for this class type");
4583 }

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

Referenced by DealiasedDotProd().

◆ v_DealiasedProd()

void Nektar::MultiRegions::ExpList::v_DealiasedProd ( const int  num_dofs,
const Array< OneD, NekDouble > &  inarray1,
const Array< OneD, NekDouble > &  inarray2,
Array< OneD, NekDouble > &  outarray 
)
protectedvirtual

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

Definition at line 4565 of file ExpList.cpp.

4569 {
4570  boost::ignore_unused(npts, inarray1, inarray2, outarray);
4572  "This method is not defined or valid for this class type");
4573 }

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

Referenced by DealiasedProd().

◆ 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 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous2D, Nektar::MultiRegions::DisContField3DHomogeneous1D, and Nektar::MultiRegions::DisContField.

Definition at line 5039 of file ExpList.cpp.

5043 {
5044  boost::ignore_unused(time, varName, x2_in, x3_in);
5046  "This method is not defined or valid for this class type");
5047 }

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

Referenced by EvaluateBoundaryConditions().

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

3679 {
3680  int i;
3681  int offset = 0;
3682 
3683  for (i = 0; i < (*m_exp).size(); ++i)
3684  {
3685  std::vector<unsigned int> nummodes;
3686  vector<LibUtilities::BasisType> basisTypes;
3687  for (int j = 0; j < fromExpList->GetExp(i)->GetNumBases(); ++j)
3688  {
3689  nummodes.push_back(fromExpList->GetExp(i)->GetBasisNumModes(j));
3690  basisTypes.push_back(fromExpList->GetExp(i)->GetBasisType(j));
3691  }
3692 
3693  (*m_exp)[i]->ExtractDataToCoeffs(&fromCoeffs[offset], nummodes, 0,
3694  &toCoeffs[m_coeff_offset[i]],
3695  basisTypes);
3696 
3697  offset += fromExpList->GetExp(i)->GetNcoeffs();
3698  }
3699 }

References m_coeff_offset.

Referenced by ExtractCoeffsToCoeffs().

◆ v_ExtractDataToCoeffs()

void Nektar::MultiRegions::ExpList::v_ExtractDataToCoeffs ( LibUtilities::FieldDefinitionsSharedPtr fielddef,
std::vector< NekDouble > &  fielddata,
std::string &  field,
Array< OneD, NekDouble > &  coeffs,
std::unordered_map< int, int >  zIdToPlane 
)
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::ExpListHomogeneous2D, and Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 3587 of file ExpList.cpp.

3591 {
3592  boost::ignore_unused(zIdToPlane);
3593  int i, expId;
3594  int offset = 0;
3595  int modes_offset = 0;
3596  int datalen = fielddata.size() / fielddef->m_fields.size();
3597 
3598  // Find data location according to field definition
3599  for (i = 0; i < fielddef->m_fields.size(); ++i)
3600  {
3601  if (fielddef->m_fields[i] == field)
3602  {
3603  break;
3604  }
3605  offset += datalen;
3606  }
3607 
3608  ASSERTL0(i != fielddef->m_fields.size(),
3609  "Field (" + field + ") not found in file.");
3610 
3611  if (m_elmtToExpId.size() == 0)
3612  {
3613  // Loop in reverse order so that in case where using a
3614  // Homogeneous expansion it sets geometry ids to first part of
3615  // m_exp list. Otherwise will set to second (complex) expansion
3616  for (i = (*m_exp).size() - 1; i >= 0; --i)
3617  {
3618  m_elmtToExpId[(*m_exp)[i]->GetGeom()->GetGlobalID()] = i;
3619  }
3620  }
3621 
3622  for (i = 0; i < fielddef->m_elementIDs.size(); ++i)
3623  {
3624  // Reset modes_offset in the case where all expansions of
3625  // the same order.
3626  if (fielddef->m_uniOrder == true)
3627  {
3628  modes_offset = 0;
3629  }
3630 
3632  fielddef->m_shapeType, fielddef->m_numModes, modes_offset);
3633 
3634  const int elmtId = fielddef->m_elementIDs[i];
3635  auto eIt = m_elmtToExpId.find(elmtId);
3636 
3637  if (eIt == m_elmtToExpId.end())
3638  {
3639  offset += datalen;
3640  modes_offset += (*m_exp)[0]->GetNumBases();
3641  continue;
3642  }
3643 
3644  expId = eIt->second;
3645 
3646  bool sameBasis = true;
3647  for (int j = 0; j < fielddef->m_basis.size(); ++j)
3648  {
3649  if (fielddef->m_basis[j] != (*m_exp)[expId]->GetBasisType(j))
3650  {
3651  sameBasis = false;
3652  break;
3653  }
3654  }
3655 
3656  if (datalen == (*m_exp)[expId]->GetNcoeffs() && sameBasis)
3657  {
3658  Vmath::Vcopy(datalen, &fielddata[offset], 1,
3659  &coeffs[m_coeff_offset[expId]], 1);
3660  }
3661  else
3662  {
3663  (*m_exp)[expId]->ExtractDataToCoeffs(
3664  &fielddata[offset], fielddef->m_numModes, modes_offset,
3665  &coeffs[m_coeff_offset[expId]], fielddef->m_basis);
3666  }
3667 
3668  offset += datalen;
3669  modes_offset += (*m_exp)[0]->GetNumBases();
3670  }
3671 
3672  return;
3673 }
int GetNumberOfCoefficients(ShapeType shape, std::vector< unsigned int > &modes, int offset=0)
Definition: ShapeType.hpp:310

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

Referenced by ExtractDataToCoeffs().

◆ v_ExtractElmtToBndPhys()

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

Definition at line 4835 of file ExpList.cpp.

4838 {
4839  int n, cnt;
4840  Array<OneD, NekDouble> tmp1, tmp2;
4842 
4843  Array<OneD, int> ElmtID, EdgeID;
4844  GetBoundaryToElmtMap(ElmtID, EdgeID);
4845 
4846  // Initialise result
4847  boundary =
4848  Array<OneD, NekDouble>(GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
4849 
4850  // Skip other boundary regions
4851  for (cnt = n = 0; n < i; ++n)
4852  {
4853  cnt += GetBndCondExpansions()[n]->GetExpSize();
4854  }
4855 
4856  int offsetBnd;
4857  int offsetElmt = 0;
4858  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
4859  {
4860  offsetBnd = GetBndCondExpansions()[i]->GetPhys_Offset(n);
4861 
4862  elmt = GetExp(ElmtID[cnt + n]);
4863  elmt->GetTracePhysVals(
4864  EdgeID[cnt + n], GetBndCondExpansions()[i]->GetExp(n),
4865  tmp1 = element + offsetElmt, tmp2 = boundary + offsetBnd);
4866 
4867  offsetElmt += elmt->GetTotPoints();
4868  }
4869 }
const Array< OneD, const std::shared_ptr< ExpList > > & GetBndCondExpansions()
Definition: ExpList.h:2071
void GetBoundaryToElmtMap(Array< OneD, int > &ElmtID, Array< OneD, int > &EdgeID)
Definition: ExpList.h:2222

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

Referenced by ExtractElmtToBndPhys().

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

4915 {
4916  int n, cnt;
4917  Array<OneD, NekDouble> tmp1;
4919 
4920  Array<OneD, int> ElmtID, EdgeID;
4921  GetBoundaryToElmtMap(ElmtID, EdgeID);
4922 
4923  // Initialise result
4924  bnd =
4925  Array<OneD, NekDouble>(GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
4926 
4927  // Skip other boundary regions
4928  for (cnt = n = 0; n < i; ++n)
4929  {
4930  cnt += GetBndCondExpansions()[n]->GetExpSize();
4931  }
4932 
4933  int offsetBnd;
4934  int offsetPhys;
4935  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
4936  {
4937  offsetPhys = GetPhys_Offset(ElmtID[cnt + n]);
4938  offsetBnd = GetBndCondExpansions()[i]->GetPhys_Offset(n);
4939 
4940  elmt = GetExp(ElmtID[cnt + n]);
4941  elmt->GetTracePhysVals(EdgeID[cnt + n],
4942  GetBndCondExpansions()[i]->GetExp(n),
4943  phys + offsetPhys, tmp1 = bnd + offsetBnd);
4944  }
4945 }

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

Referenced by ExtractPhysToBnd().

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

4876 {
4877  int n, cnt, nq;
4878 
4879  Array<OneD, int> ElmtID, EdgeID;
4880  GetBoundaryToElmtMap(ElmtID, EdgeID);
4881 
4882  // Skip other boundary regions
4883  for (cnt = n = 0; n < i; ++n)
4884  {
4885  cnt += GetBndCondExpansions()[n]->GetExpSize();
4886  }
4887 
4888  // Count number of points
4889  int npoints = 0;
4890  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
4891  {
4892  npoints += GetExp(ElmtID[cnt + n])->GetTotPoints();
4893  }
4894 
4895  // Initialise result
4896  bndElmt = Array<OneD, NekDouble>(npoints, 0.0);
4897 
4898  // Extract data
4899  int offsetPhys;
4900  int offsetElmt = 0;
4901  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
4902  {
4903  nq = GetExp(ElmtID[cnt + n])->GetTotPoints();
4904  offsetPhys = GetPhys_Offset(ElmtID[cnt + n]);
4905  Vmath::Vcopy(nq, &phys[offsetPhys], 1, &bndElmt[offsetElmt], 1);
4906  offsetElmt += nq;
4907  }
4908 }

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

Referenced by ExtractPhysToBndElmt().

◆ v_ExtractTracePhys() [1/2]

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

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D, and Nektar::MultiRegions::DisContField.

Definition at line 4485 of file ExpList.cpp.

4486 {
4487  boost::ignore_unused(outarray);
4489  "This method is not defined or valid for this class type");
4490 }

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

Referenced by ExtractTracePhys().

◆ 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, and Nektar::MultiRegions::DisContField.

Definition at line 4492 of file ExpList.cpp.

4494 {
4495  boost::ignore_unused(inarray, outarray);
4497  "This method is not defined or valid for this class type");
4498 }

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

◆ v_FillBndCondFromField() [1/2]

void Nektar::MultiRegions::ExpList::v_FillBndCondFromField ( const Array< OneD, NekDouble coeffs)
protectedvirtual

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

Definition at line 4655 of file ExpList.cpp.

4656 {
4657  boost::ignore_unused(coeffs);
4659  "This method is not defined or valid for this class type");
4660 }

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

Referenced by FillBndCondFromField().

◆ v_FillBndCondFromField() [2/2]

void Nektar::MultiRegions::ExpList::v_FillBndCondFromField ( const int  nreg,
const Array< OneD, NekDouble coeffs 
)
protectedvirtual

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

Definition at line 4664 of file ExpList.cpp.

4666 {
4667  boost::ignore_unused(nreg, coeffs);
4669  "This method is not defined or valid for this class type");
4670 }

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

◆ v_FillBwdWithBoundCond()

void Nektar::MultiRegions::ExpList::v_FillBwdWithBoundCond ( const Array< OneD, NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd,
bool  PutFwdInBwdOnBCs 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField.

Definition at line 4425 of file ExpList.cpp.

4428 {
4429  boost::ignore_unused(Fwd, Bwd, PutFwdInBwdOnBCs);
4431  "This method is not defined or valid for this class type");
4432 }

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

Referenced by FillBwdWithBoundCond().

◆ v_FillBwdWithBwdWeight()

void Nektar::MultiRegions::ExpList::v_FillBwdWithBwdWeight ( Array< OneD, NekDouble > &  weightave,
Array< OneD, NekDouble > &  weightjmp 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField.

Definition at line 5001 of file ExpList.cpp.

5003 {
5004  boost::ignore_unused(weightave, weightjmp);
5005  NEKERROR(ErrorUtil::efatal, "v_FillBwdWithBwdWeight not defined");
5006 }

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

Referenced by FillBwdWithBwdWeight().

◆ v_FwdTrans()

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

◆ v_FwdTransBndConstrained()

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

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

Definition at line 1818 of file ExpList.cpp.

1821 {
1822  int i;
1823 
1824  Array<OneD, NekDouble> e_outarray;
1825 
1826  for (i = 0; i < (*m_exp).size(); ++i)
1827  {
1828  (*m_exp)[i]->FwdTransBndConstrained(inarray + m_phys_offset[i],
1829  e_outarray =
1830  outarray + m_coeff_offset[i]);
1831  }
1832 }

References m_coeff_offset, and m_phys_offset.

Referenced by FwdTransBndConstrained().

◆ v_FwdTransLocalElmt()

void Nektar::MultiRegions::ExpList::v_FwdTransLocalElmt ( 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::ExpListHomogeneous2D, Nektar::MultiRegions::ExpListHomogeneous1D, and Nektar::MultiRegions::ExpList2DHomogeneous2D.

Definition at line 1809 of file ExpList.cpp.

1811 {
1812  Array<OneD, NekDouble> f(m_ncoeffs);
1813 
1814  IProductWRTBase(inarray, f);
1815  MultiplyByElmtInvMass(f, outarray);
1816 }
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:1771

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

Referenced by FwdTransLocalElmt(), and v_FwdTrans().

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

4587 {
4588  boost::ignore_unused(BndVals, TotField, BndID);
4590  "This method is not defined or valid for this class type");
4591 }

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

Referenced by GetBCValues().

◆ v_GetBndCondBwdWeight()

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

Reimplemented in Nektar::MultiRegions::DisContField.

Definition at line 4462 of file ExpList.cpp.

4463 {
4465  "v_GetBndCondBwdWeight is not defined for this class type");
4466  static Array<OneD, NekDouble> tmp;
4467  return tmp;
4468 }

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

Referenced by GetBndCondBwdWeight().

◆ v_GetBndCondExpansions()

const Array< OneD, const std::shared_ptr< ExpList > > & Nektar::MultiRegions::ExpList::v_GetBndCondExpansions ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous2D, Nektar::MultiRegions::DisContField3DHomogeneous1D, and Nektar::MultiRegions::DisContField.

Definition at line 3791 of file ExpList.cpp.

3792 {
3794  "This method is not defined or valid for this class type");
3795  static Array<OneD, const std::shared_ptr<ExpList>> result;
3796  return result;
3797 }

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

Referenced by GetBndCondExpansions().

◆ v_GetBndConditions()

const Array< OneD, const SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::v_GetBndConditions ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous2D, Nektar::MultiRegions::DisContField3DHomogeneous1D, Nektar::MultiRegions::DisContField, and Nektar::MultiRegions::ContField.

Definition at line 5018 of file ExpList.cpp.

5019 {
5021  "This method is not defined or valid for this class type");
5022  static Array<OneD, const SpatialDomains::BoundaryConditionShPtr> result;
5023  return result;
5024 }

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

Referenced by GetBndConditions().

◆ v_GetBndElmtExpansion()

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

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous2D, Nektar::MultiRegions::DisContField3DHomogeneous1D, and Nektar::MultiRegions::DisContField.

Definition at line 4825 of file ExpList.cpp.

4827 {
4828  boost::ignore_unused(i, result, DeclareCoeffPhysArrays);
4830  "This method is not defined or valid for this class type");
4831 }

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

Referenced by GetBndElmtExpansion().

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

4951 {
4952  int j, n, cnt, nq;
4953  int coordim = GetCoordim(0);
4954  Array<OneD, NekDouble> tmp;
4956 
4957  Array<OneD, int> ElmtID, EdgeID;
4958  GetBoundaryToElmtMap(ElmtID, EdgeID);
4959 
4960  // Initialise result
4961  normals = Array<OneD, Array<OneD, NekDouble>>(coordim);
4962  for (j = 0; j < coordim; ++j)
4963  {
4964  normals[j] = Array<OneD, NekDouble>(
4965  GetBndCondExpansions()[i]->GetTotPoints(), 0.0);
4966  }
4967 
4968  // Skip other boundary regions
4969  for (cnt = n = 0; n < i; ++n)
4970  {
4971  cnt += GetBndCondExpansions()[n]->GetExpSize();
4972  }
4973 
4974  int offset;
4975  for (n = 0; n < GetBndCondExpansions()[i]->GetExpSize(); ++n)
4976  {
4977  offset = GetBndCondExpansions()[i]->GetPhys_Offset(n);
4978  nq = GetBndCondExpansions()[i]->GetExp(n)->GetTotPoints();
4979 
4980  elmt = GetExp(ElmtID[cnt + n]);
4981  const Array<OneD, const Array<OneD, NekDouble>> normalsElmt =
4982  elmt->GetTraceNormal(EdgeID[cnt + n]);
4983  // Copy to result
4984  for (j = 0; j < coordim; ++j)
4985  {
4986  Vmath::Vcopy(nq, normalsElmt[j], 1, tmp = normals[j] + offset, 1);
4987  }
4988  }
4989 }

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

Referenced by GetBoundaryNormals().

◆ v_GetBoundaryToElmtMap()

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

Reimplemented in Nektar::MultiRegions::DisContField, Nektar::MultiRegions::DisContField3DHomogeneous2D, and Nektar::MultiRegions::DisContField3DHomogeneous1D.

Definition at line 4993 of file ExpList.cpp.

4995 {
4996  boost::ignore_unused(ElmtID, EdgeID);
4998  "This method is not defined or valid for this class type");
4999 }

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

Referenced by GetBoundaryToElmtMap().

◆ v_GetCoords() [1/2]

void Nektar::MultiRegions::ExpList::v_GetCoords ( Array< OneD, NekDouble > &  coord_0,
Array< OneD, NekDouble > &  coord_1 = NullNekDouble1DArray,
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::ExpList3DHomogeneous2D, Nektar::MultiRegions::ExpList3DHomogeneous1D, Nektar::MultiRegions::ExpList2DHomogeneous2D, and Nektar::MultiRegions::ExpList2DHomogeneous1D.

Definition at line 4752 of file ExpList.cpp.

4755 {
4756  if (GetNumElmts() == 0)
4757  {
4758  return;
4759  }
4760 
4761  int i;
4762  Array<OneD, NekDouble> e_coord_0;
4763  Array<OneD, NekDouble> e_coord_1;
4764  Array<OneD, NekDouble> e_coord_2;
4765 
4766  switch (GetExp(0)->GetCoordim())
4767  {
4768  case 1:
4769  for (i = 0; i < (*m_exp).size(); ++i)
4770  {
4771  e_coord_0 = coord_0 + m_phys_offset[i];
4772  (*m_exp)[i]->GetCoords(e_coord_0);
4773  }
4774  break;
4775  case 2:
4776  ASSERTL0(coord_1.size() != 0, "output coord_1 is not defined");
4777 
4778  for (i = 0; i < (*m_exp).size(); ++i)
4779  {
4780  e_coord_0 = coord_0 + m_phys_offset[i];
4781  e_coord_1 = coord_1 + m_phys_offset[i];
4782  (*m_exp)[i]->GetCoords(e_coord_0, e_coord_1);
4783  }
4784  break;
4785  case 3:
4786  ASSERTL0(coord_1.size() != 0, "output coord_1 is not defined");
4787  ASSERTL0(coord_2.size() != 0, "output coord_2 is not defined");
4788 
4789  for (i = 0; i < (*m_exp).size(); ++i)
4790  {
4791  e_coord_0 = coord_0 + m_phys_offset[i];
4792  e_coord_1 = coord_1 + m_phys_offset[i];
4793  e_coord_2 = coord_2 + m_phys_offset[i];
4794  (*m_exp)[i]->GetCoords(e_coord_0, e_coord_1, e_coord_2);
4795  }
4796  break;
4797  }
4798 }

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

Referenced by GetCoords().

◆ v_GetCoords() [2/2]

void Nektar::MultiRegions::ExpList::v_GetCoords ( const int  eid,
Array< OneD, NekDouble > &  xc0,
Array< OneD, NekDouble > &  xc1,
Array< OneD, NekDouble > &  xc2 
)
protectedvirtual

◆ v_GetFieldDefinitions() [1/2]

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

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

Definition at line 3523 of file ExpList.cpp.

3525 {
3526  GeneralGetFieldDefinitions(fielddef);
3527 }
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:3404

References GeneralGetFieldDefinitions().

◆ v_GetFieldDefinitions() [2/2]

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

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

Definition at line 3515 of file ExpList.cpp.

3517 {
3518  std::vector<LibUtilities::FieldDefinitionsSharedPtr> returnval;
3519  v_GetFieldDefinitions(returnval);
3520  return returnval;
3521 }

Referenced by GetFieldDefinitions().

◆ v_GetFwdBwdTracePhys() [1/2]

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

Reimplemented in Nektar::MultiRegions::DisContField.

Definition at line 4406 of file ExpList.cpp.

4408 {
4409  boost::ignore_unused(Fwd, Bwd);
4411  "This method is not defined or valid for this class type");
4412 }

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

Referenced by GetFwdBwdTracePhys().

◆ v_GetFwdBwdTracePhys() [2/2]

void Nektar::MultiRegions::ExpList::v_GetFwdBwdTracePhys ( const Array< OneD, const NekDouble > &  field,
Array< OneD, NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd,
bool  FillBnd = true,
bool  PutFwdInBwdOnBCs = false,
bool  DoExchange = true 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField.

Definition at line 4414 of file ExpList.cpp.

4418 {
4419  boost::ignore_unused(field, Fwd, Bwd, FillBnd, PutFwdInBwdOnBCs,
4420  DoExchange);
4422  "This method is not defined or valid for this class type");
4423 }

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

◆ v_GetGlobalLinSysManager()

LibUtilities::NekManager< GlobalLinSysKey, GlobalLinSys > & Nektar::MultiRegions::ExpList::v_GetGlobalLinSysManager ( void  )
protectedvirtual

Definition at line 3324 of file ExpList.cpp.

3325 {
3327  "GetGlobalLinSysManager not implemented for ExpList.");
3328  return NullGlobalLinSysManager;
3329 }
static LibUtilities::NekManager< GlobalLinSysKey, GlobalLinSys > NullGlobalLinSysManager
Definition: ExpList.h:1483

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

Referenced by GetGlobalLinSysManager().

◆ v_GetHomogeneousBasis()

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

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1444 of file ExpList.h.

1445  {
1447  "This method is not defined or valid for this class type");
1449  }
static BasisSharedPtr NullBasisSharedPtr
Definition: Basis.h:369

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

Referenced by GetHomogeneousBasis().

◆ v_GetHomoLen()

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

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 3272 of file ExpList.cpp.

3273 {
3275  "This method is not defined or valid for this class type");
3276  NekDouble len = 0.0;
3277  return len;
3278 }

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

Referenced by GetHomoLen().

◆ v_GetLeftAdjacentFaces()

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

Definition at line 4477 of file ExpList.cpp.

4478 {
4480  "This method is not defined or valid for this class type");
4481  static vector<bool> tmp;
4482  return tmp;
4483 }

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

Referenced by GetLeftAdjacentFaces().

◆ v_GetLeftAdjacentTraces()

std::vector< bool > & Nektar::MultiRegions::ExpList::v_GetLeftAdjacentTraces ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField.

Definition at line 3937 of file ExpList.cpp.

3938 {
3940  "This method is not defined or valid for this class type");
3941  static std::vector<bool> result;
3942  return result;
3943 }

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

Referenced by GetLeftAdjacentTraces().

◆ v_GetLocTraceFromTracePts()

void Nektar::MultiRegions::ExpList::v_GetLocTraceFromTracePts ( const Array< OneD, const NekDouble > &  Fwd,
const Array< OneD, const NekDouble > &  Bwd,
Array< OneD, NekDouble > &  locTraceFwd,
Array< OneD, NekDouble > &  locTraceBwd 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField.

Definition at line 4452 of file ExpList.cpp.

4456 {
4457  boost::ignore_unused(Fwd, Bwd, locTraceFwd, locTraceBwd);
4459  "v_GetLocTraceFromTracePts is not defined for this class");
4460 }

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

Referenced by GetLocTraceFromTracePts().

◆ v_GetLocTraceToTraceMap()

const LocTraceToTraceMapSharedPtr & Nektar::MultiRegions::ExpList::v_GetLocTraceToTraceMap ( void  ) const
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField.

Definition at line 6045 of file ExpList.cpp.

6046 {
6047  NEKERROR(ErrorUtil::efatal, "v_GetLocTraceToTraceMap not coded");
6049 }
static LocTraceToTraceMapSharedPtr NullLocTraceToTraceMapSharedPtr

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

Referenced by GetLocTraceToTraceMap().

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

3720 {
3721  int npts;
3722 
3723  int MFdim = 3;
3724  int nq = outarray[0].size() / MFdim;
3725 
3726  // Assume whole array is of same coordinate dimension
3727  int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
3728 
3729  Array<OneD, Array<OneD, NekDouble>> MFloc(MFdim * coordim);
3730  // Process each expansion.
3731  for (int i = 0; i < m_exp->size(); ++i)
3732  {
3733  npts = (*m_exp)[i]->GetTotPoints();
3734 
3735  for (int j = 0; j < MFdim * coordim; ++j)
3736  {
3737  MFloc[j] = Array<OneD, NekDouble>(npts, 0.0);
3738  }
3739 
3740  // MF from LOCALREGIONS
3741  (*m_exp)[i]->GetMetricInfo()->GetMovingFrames(
3742  (*m_exp)[i]->GetPointsKeys(), MMFdir, CircCentre, MFloc);
3743 
3744  // Get the physical data offset for this expansion.
3745  for (int j = 0; j < MFdim; ++j)
3746  {
3747  for (int k = 0; k < coordim; ++k)
3748  {
3749  Vmath::Vcopy(npts, &MFloc[j * coordim + k][0], 1,
3750  &outarray[j][k * nq + m_phys_offset[i]], 1);
3751  }
3752  }
3753  }
3754 }

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

Referenced by GetMovingFrames().

◆ v_GetNormals()

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

Populate normals with the normals of all expansions.

For each local element, copy the normals stored in the element list into the array normals.

Parameters
normalsMultidimensional array in which to copy normals to. Must have dimension equal to or larger than the spatial dimension of the elements.

Reimplemented in Nektar::MultiRegions::ExpList2DHomogeneous1D.

Definition at line 4015 of file ExpList.cpp.

4016 {
4017  int i, j, k, e_npoints, offset;
4018  Array<OneD, Array<OneD, NekDouble>> locnormals;
4019 
4020  // Assume whole array is of same coordinate dimension
4021  int coordim = GetCoordim(0);
4022 
4023  ASSERTL1(normals.size() >= coordim,
4024  "Output vector does not have sufficient dimensions to "
4025  "match coordim");
4026 
4027  switch (m_expType)
4028  {
4029  case e0D:
4030  {
4031  // Process each expansion.
4032  for (i = 0; i < m_exp->size(); ++i)
4033  {
4034  LocalRegions::ExpansionSharedPtr loc_exp = (*m_exp)[i];
4035 
4037  loc_exp->GetLeftAdjacentElementExp();
4038 
4039  // Get the number of points and normals for this expansion.
4040  e_npoints = 1;
4041  locnormals = loc_elmt->GetTraceNormal(
4042  loc_exp->GetLeftAdjacentElementTrace());
4043 
4044  // Get the physical data offset for this expansion.
4045  offset = m_phys_offset[i];
4046 
4047  // Process each point in the expansion.
4048  for (j = 0; j < e_npoints; ++j)
4049  {
4050  // Process each spatial dimension and copy the
4051  // values into the output array.
4052  for (k = 0; k < coordim; ++k)
4053  {
4054  normals[k][offset] = locnormals[k][0];
4055  }
4056  }
4057  }
4058  }
4059  break;
4060  case e1D:
4061  {
4063  Array<OneD, Array<OneD, NekDouble>> locnormals2;
4064  Array<OneD, Array<OneD, NekDouble>> Norms;
4065 
4066  for (i = 0; i < m_exp->size(); ++i)
4067  {
4068  LocalRegions::ExpansionSharedPtr loc_exp = (*m_exp)[i];
4069 
4071  loc_exp->GetLeftAdjacentElementExp();
4072 
4073  int edgeNumber = loc_exp->GetLeftAdjacentElementTrace();
4074 
4075  // Get the number of points and normals for this expansion.
4076  e_npoints = (*m_exp)[i]->GetNumPoints(0);
4077 
4078  locnormals = loc_elmt->GetTraceNormal(edgeNumber);
4079  int e_nmodes = loc_exp->GetBasis(0)->GetNumModes();
4080  int loc_nmodes = loc_elmt->GetBasis(0)->GetNumModes();
4081 
4082  if (e_nmodes != loc_nmodes)
4083  {
4084  if (loc_exp->GetRightAdjacentElementTrace() >= 0)
4085  {
4087  loc_exp->GetRightAdjacentElementExp();
4088 
4089  int EdgeNumber =
4090  loc_exp->GetRightAdjacentElementTrace();
4091 
4092  // Serial case: right element is connected so we can
4093  // just grab that normal.
4094  locnormals = loc_elmt->GetTraceNormal(EdgeNumber);
4095 
4096  offset = m_phys_offset[i];
4097 
4098  // Process each point in the expansion.
4099  for (j = 0; j < e_npoints; ++j)
4100  {
4101  // Process each spatial dimension and
4102  // copy the values into the output
4103  // array.
4104  for (k = 0; k < coordim; ++k)
4105  {
4106  normals[k][offset + j] = -locnormals[k][j];
4107  }
4108  }
4109  }
4110  else
4111  {
4112  // Parallel case: need to interpolate normal.
4113  Array<OneD, Array<OneD, NekDouble>> normal(coordim);
4114 
4115  for (int p = 0; p < coordim; ++p)
4116  {
4117  normal[p] = Array<OneD, NekDouble>(e_npoints, 0.0);
4118  LibUtilities::PointsKey to_key =
4119  loc_exp->GetBasis(0)->GetPointsKey();
4120  LibUtilities::PointsKey from_key =
4121  loc_elmt->GetBasis(0)->GetPointsKey();
4122  LibUtilities::Interp1D(from_key, locnormals[p],
4123  to_key, normal[p]);
4124  }
4125 
4126  offset = m_phys_offset[i];
4127 
4128  // Process each point in the expansion.
4129  for (j = 0; j < e_npoints; ++j)
4130  {
4131  // Process each spatial dimension and copy the
4132  // values into the output array.
4133  for (k = 0; k < coordim; ++k)
4134  {
4135  normals[k][offset + j] = normal[k][j];
4136  }
4137  }
4138  }
4139  }
4140  else
4141  {
4142  // Get the physical data offset for this expansion.
4143  offset = m_phys_offset[i];
4144 
4145  // Process each point in the expansion.
4146  for (j = 0; j < e_npoints; ++j)
4147  {
4148  // Process each spatial dimension and copy the values
4149  // into the output array.
4150  for (k = 0; k < coordim; ++k)
4151  {
4152  normals[k][offset + j] = locnormals[k][j];
4153  }
4154  }
4155  }
4156  }
4157  }
4158  break;
4159  case e2D:
4160  {
4161  Array<OneD, NekDouble> tmp;
4162 
4163  // Process each expansion.
4164  for (i = 0; i < m_exp->size(); ++i)
4165  {
4166  LocalRegions::ExpansionSharedPtr traceExp = (*m_exp)[i];
4168  traceExp->GetLeftAdjacentElementExp();
4169 
4170  // Get the number of points and normals for this expansion.
4171  int faceNum = traceExp->GetLeftAdjacentElementTrace();
4172  int offset = m_phys_offset[i];
4173 
4174  const Array<OneD, const Array<OneD, NekDouble>> &locNormals =
4175  exp3D->GetTraceNormal(faceNum);
4176 
4177  // Project normals from 3D element onto the same
4178  // orientation as the trace expansion.
4179  StdRegions::Orientation orient = exp3D->GetTraceOrient(faceNum);
4180 
4181  int fromid0, fromid1;
4182 
4184  {
4185  fromid0 = 0;
4186  fromid1 = 1;
4187  }
4188  else
4189  {
4190  fromid0 = 1;
4191  fromid1 = 0;
4192  }
4193 
4194  LibUtilities::BasisKey faceBasis0 =
4195  exp3D->GetTraceBasisKey(faceNum, fromid0);
4196  LibUtilities::BasisKey faceBasis1 =
4197  exp3D->GetTraceBasisKey(faceNum, fromid1);
4198  LibUtilities::BasisKey traceBasis0 =
4199  traceExp->GetBasis(0)->GetBasisKey();
4200  LibUtilities::BasisKey traceBasis1 =
4201  traceExp->GetBasis(1)->GetBasisKey();
4202 
4203  const int faceNq0 = faceBasis0.GetNumPoints();
4204  const int faceNq1 = faceBasis1.GetNumPoints();
4205 
4206  Array<OneD, int> faceids;
4207  exp3D->ReOrientTracePhysMap(orient, faceids, faceNq0, faceNq1);
4208 
4209  Array<OneD, NekDouble> traceNormals(faceNq0 * faceNq1);
4210 
4211  for (j = 0; j < coordim; ++j)
4212  {
4213  Vmath::Scatr(faceNq0 * faceNq1, locNormals[j], faceids,
4214  traceNormals);
4215 
4217  faceBasis0.GetPointsKey(), faceBasis1.GetPointsKey(),
4218  traceNormals, traceBasis0.GetPointsKey(),
4219  traceBasis1.GetPointsKey(), tmp = normals[j] + offset);
4220  }
4221  }
4222  }
4223  break;
4224  default:
4225  {
4227  "This method is not defined or valid for this class type");
4228  }
4229  }
4230 }
void Scatr(int n, const T *x, const int *y, T *z)
Scatter vector z[y[i]] = x[i].
Definition: Vmath.cpp:822

References ASSERTL1, Nektar::MultiRegions::e0D, Nektar::MultiRegions::e1D, Nektar::MultiRegions::e2D, Nektar::StdRegions::eDir1FwdDir2_Dir2FwdDir1, Nektar::ErrorUtil::efatal, GetCoordim(), Nektar::LibUtilities::BasisKey::GetNumPoints(), Nektar::LibUtilities::BasisKey::GetPointsKey(), Nektar::LibUtilities::Interp1D(), Nektar::LibUtilities::Interp2D(), m_exp, m_expType, m_phys_offset, NEKERROR, CellMLToNektar.cellml_metadata::p, and Vmath::Scatr().

Referenced by GetNormals().

◆ v_GetNumElmts()

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

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

Definition at line 1159 of file ExpList.h.

1160  {
1161  return (*m_exp).size();
1162  }

Referenced by GetNumElmts().

◆ v_GetPeriodicEntities()

void Nektar::MultiRegions::ExpList::v_GetPeriodicEntities ( PeriodicMap periodicVerts,
PeriodicMap periodicEdges,
PeriodicMap periodicFaces 
)
protectedvirtual

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

Definition at line 5061 of file ExpList.cpp.

5064 {
5065  boost::ignore_unused(periodicVerts, periodicEdges, periodicFaces);
5067  "This method is not defined or valid for this class type");
5068 }

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

Referenced by GetPeriodicEntities().

◆ v_GetPlane()

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

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 5091 of file ExpList.cpp.

5092 {
5093  boost::ignore_unused(n);
5095  "This method is not defined or valid for this class type");
5096  return NullExpListSharedPtr;
5097 }
static ExpListSharedPtr NullExpListSharedPtr
Definition: ExpList.h:1479

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

Referenced by GetPlane().

◆ v_GetPoolCount()

int Nektar::MultiRegions::ExpList::v_GetPoolCount ( std::string  poolName)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField.

Definition at line 3309 of file ExpList.cpp.

3310 {
3311  boost::ignore_unused(poolName);
3312  NEKERROR(ErrorUtil::efatal, "GetPoolCount not implemented for ExpList.");
3313  return -1;
3314 }

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

Referenced by GetPoolCount().

◆ v_GetRobinBCInfo()

map< int, RobinBCInfoSharedPtr > Nektar::MultiRegions::ExpList::v_GetRobinBCInfo ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous2D, Nektar::MultiRegions::DisContField3DHomogeneous1D, and Nektar::MultiRegions::DisContField.

Definition at line 5051 of file ExpList.cpp.

5052 {
5054  "This method is not defined or valid for this class type");
5055  static map<int, RobinBCInfoSharedPtr> result;
5056  return result;
5057 }

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

Referenced by GetRobinBCInfo().

◆ v_GetTrace()

std::shared_ptr< ExpList > & Nektar::MultiRegions::ExpList::v_GetTrace ( )
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D, and Nektar::MultiRegions::DisContField.

Definition at line 3916 of file ExpList.cpp.

3917 {
3919  "This method is not defined or valid for this class type");
3920  static std::shared_ptr<ExpList> returnVal;
3921  return returnVal;
3922 }

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

Referenced by GetTrace().

◆ v_GetTraceBndMap()

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

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous1D.

Definition at line 3932 of file ExpList.cpp.

3933 {
3934  return GetTraceMap()->GetBndCondIDToGlobalTraceID();
3935 }
std::shared_ptr< AssemblyMapDG > & GetTraceMap(void)
Definition: ExpList.h:2116

References GetTraceMap().

Referenced by GetTraceBndMap().

◆ v_GetTraceMap()

std::shared_ptr< AssemblyMapDG > & Nektar::MultiRegions::ExpList::v_GetTraceMap ( void  )
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField, and Nektar::MultiRegions::DisContField3DHomogeneous1D.

Definition at line 3924 of file ExpList.cpp.

3925 {
3927  "This method is not defined or valid for this class type");
3928  static std::shared_ptr<AssemblyMapDG> result;
3929  return result;
3930 }

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

Referenced by GetTraceMap().

◆ v_GetTransposition()

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

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 3264 of file ExpList.cpp.

3265 {
3267  "This method is not defined or valid for this class type");
3269  return trans;
3270 }
std::shared_ptr< Transposition > TranspositionSharedPtr

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

Referenced by GetTransposition().

◆ v_GetYIDs()

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

Definition at line 3295 of file ExpList.cpp.

3296 {
3298  "This method is not defined or valid for this class type");
3299  Array<OneD, unsigned int> NoModes(1);
3300  return NoModes;
3301 }

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

Referenced by GetYIDs().

◆ v_GetZIDs()

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

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 3287 of file ExpList.cpp.

3288 {
3290  "This method is not defined or valid for this class type");
3291  Array<OneD, unsigned int> NoModes(1);
3292  return NoModes;
3293 }

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

Referenced by GetZIDs().

◆ v_GlobalToLocal() [1/2]

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

Reimplemented in Nektar::MultiRegions::ContField.

Definition at line 4693 of file ExpList.cpp.

4695 {
4696  boost::ignore_unused(inarray, outarray);
4698  "This method is not defined or valid for this class type");
4699 }

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

◆ v_GlobalToLocal() [2/2]

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

Reimplemented in Nektar::MultiRegions::ContField3DHomogeneous2D, Nektar::MultiRegions::ContField3DHomogeneous1D, and Nektar::MultiRegions::ContField.

Definition at line 4687 of file ExpList.cpp.

4688 {
4690  "This method is not defined or valid for this class type");
4691 }

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

Referenced by GlobalToLocal().

◆ v_HelmSolve()

GlobalLinSysKey Nektar::MultiRegions::ExpList::v_HelmSolve ( const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
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::DisContField3DHomogeneous2D, Nektar::MultiRegions::DisContField3DHomogeneous1D, Nektar::MultiRegions::DisContField, Nektar::MultiRegions::ContField3DHomogeneous2D, Nektar::MultiRegions::ContField3DHomogeneous1D, and Nektar::MultiRegions::ContField.

Definition at line 4509 of file ExpList.cpp.

4515 {
4516  boost::ignore_unused(inarray, outarray, factors, varcoeff, varfactors,
4517  dirForcing, PhysSpaceForcing);
4518  NEKERROR(ErrorUtil::efatal, "HelmSolve not implemented.");
4519  return NullGlobalLinSysKey;
4520 }
static GlobalLinSysKey NullGlobalLinSysKey(StdRegions::eNoMatrixType)

References Nektar::ErrorUtil::efatal, NEKERROR, and Nektar::MultiRegions::NullGlobalLinSysKey().

Referenced by HelmSolve().

◆ v_HomogeneousBwdTrans()

void Nektar::MultiRegions::ExpList::v_HomogeneousBwdTrans ( const int  npts,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
bool  Shuff = true,
bool  UnShuff = true 
)
protectedvirtual

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

Definition at line 4555 of file ExpList.cpp.

4559 {
4560  boost::ignore_unused(npts, inarray, outarray, Shuff, UnShuff);
4562  "This method is not defined or valid for this class type");
4563 }

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

Referenced by HomogeneousBwdTrans().

◆ v_HomogeneousEnergy()

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

Reimplemented in Nektar::MultiRegions::ExpList3DHomogeneous1D.

Definition at line 3256 of file ExpList.cpp.

3257 {
3259  "This method is not defined or valid for this class type");
3260  Array<OneD, NekDouble> NoEnergy(1, 0.0);
3261  return NoEnergy;
3262 }

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

Referenced by HomogeneousEnergy().

◆ v_HomogeneousFwdTrans()

void Nektar::MultiRegions::ExpList::v_HomogeneousFwdTrans ( const int  npts,
const Array< OneD, const NekDouble > &  inarray,
Array< OneD, NekDouble > &  outarray,
bool  Shuff = true,
bool  UnShuff = true 
)
protectedvirtual

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

Definition at line 4545 of file ExpList.cpp.

4549 {
4550  boost::ignore_unused(npts, inarray, outarray, Shuff, UnShuff);
4552  "This method is not defined or valid for this class type");
4553 }

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

Referenced by HomogeneousFwdTrans().

◆ v_ImposeDirichletConditions()

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

Reimplemented in Nektar::MultiRegions::ContField3DHomogeneous2D, Nektar::MultiRegions::ContField3DHomogeneous1D, and Nektar::MultiRegions::ContField.

Definition at line 4646 of file ExpList.cpp.

4647 {
4648  boost::ignore_unused(outarray);
4650  "This method is not defined or valid for this class type");
4651 }

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

Referenced by ImposeDirichletConditions().

◆ v_Integral()

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

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}\).

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 3222 of file ExpList.cpp.

3223 {
3224  NekDouble sum = 0.0;
3225  int i = 0;
3226 
3227  for (i = 0; i < (*m_exp).size(); ++i)
3228  {
3229  sum += (*m_exp)[i]->Integral(inarray + m_phys_offset[i]);
3230  }
3231  m_comm->GetRowComm()->AllReduce(sum, LibUtilities::ReduceSum);
3232 
3233  return sum;
3234 }

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

Referenced by Integral().

◆ v_IProductWRTBase()

void Nektar::MultiRegions::ExpList::v_IProductWRTBase ( 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::ExpListHomogeneous2D, and Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 4718 of file ExpList.cpp.

4720 {
4721  // initialise if required
4723  {
4724  for (int i = 0; i < m_collections.size(); ++i)
4725  {
4727  }
4729  }
4730 
4731  Array<OneD, NekDouble> tmp;
4732  for (int i = 0; i < m_collections.size(); ++i)
4733  {
4734 
4736  inarray + m_coll_phys_offset[i],
4737  tmp = outarray + m_coll_coeff_offset[i]);
4738  }
4739 }

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

Referenced by IProductWRTBase().

◆ 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::ExpList3DHomogeneous2D, and Nektar::MultiRegions::ExpList3DHomogeneous1D.

Definition at line 3177 of file ExpList.cpp.

3179 {
3180  NekDouble err = 0.0, errl2;
3181  int i;
3182 
3183  if (soln == NullNekDouble1DArray)
3184  {
3185  for (i = 0; i < (*m_exp).size(); ++i)
3186  {
3187  errl2 = (*m_exp)[i]->L2(inarray + m_phys_offset[i]);
3188  err += errl2 * errl2;
3189  }
3190  }
3191  else
3192  {
3193  for (i = 0; i < (*m_exp).size(); ++i)
3194  {
3195  errl2 = (*m_exp)[i]->L2(inarray + m_phys_offset[i],
3196  soln + m_phys_offset[i]);
3197  err += errl2 * errl2;
3198  }
3199  }
3200 
3201  m_comm->GetRowComm()->AllReduce(err, LibUtilities::ReduceSum);
3202 
3203  return sqrt(err);
3204 }

References m_comm, m_phys_offset, Nektar::NullNekDouble1DArray, Nektar::LibUtilities::ReduceSum, and tinysimd::sqrt().

Referenced by L2().

◆ v_LinearAdvectionDiffusionReactionSolve()

GlobalLinSysKey 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,
const Array< OneD, const NekDouble > &  dirForcing = NullNekDouble1DArray 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField.

Definition at line 4522 of file ExpList.cpp.

4527 {
4528  boost::ignore_unused(velocity, inarray, outarray, lambda, dirForcing);
4530  "LinearAdvectionDiffusionReactionSolve not implemented.");
4531  return NullGlobalLinSysKey;
4532 }

References Nektar::ErrorUtil::efatal, NEKERROR, and Nektar::MultiRegions::NullGlobalLinSysKey().

Referenced by LinearAdvectionDiffusionReactionSolve().

◆ 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,
const Array< OneD, const NekDouble > &  dirForcing = NullNekDouble1DArray 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField.

Definition at line 4534 of file ExpList.cpp.

4539 {
4540  boost::ignore_unused(velocity, inarray, outarray, lambda, dirForcing);
4542  "This method is not defined or valid for this class type");
4543 }

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

Referenced by LinearAdvectionReactionSolve().

◆ v_LocalToGlobal() [1/2]

void Nektar::MultiRegions::ExpList::v_LocalToGlobal ( bool  UseComm)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField3DHomogeneous2D, Nektar::MultiRegions::ContField3DHomogeneous1D, and Nektar::MultiRegions::ContField.

Definition at line 4672 of file ExpList.cpp.

4673 {
4674  boost::ignore_unused(useComm);
4676  "This method is not defined or valid for this class type");
4677 }

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

Referenced by LocalToGlobal().

◆ 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::ContField.

Definition at line 4679 of file ExpList.cpp.

4681 {
4682  boost::ignore_unused(inarray, outarray, useComm);
4684  "This method is not defined or valid for this class type");
4685 }

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

◆ v_MultiplyByInvMassMatrix()

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

Reimplemented in Nektar::MultiRegions::ContField.

Definition at line 4500 of file ExpList.cpp.

4503 {
4504  boost::ignore_unused(inarray, outarray);
4506  "This method is not defined or valid for this class type");
4507 }

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

Referenced by MultiplyByInvMassMatrix().

◆ v_NormVectorIProductWRTBase() [1/2]

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

Definition at line 4603 of file ExpList.cpp.

4605 {
4606  Array<OneD, NekDouble> tmp;
4607  switch (GetCoordim(0))
4608  {
4609  case 1:
4610  {
4611  for (int i = 0; i < GetExpSize(); ++i)
4612  {
4613  (*m_exp)[i]->NormVectorIProductWRTBase(
4614  V[0] + GetPhys_Offset(i),
4615  tmp = outarray + GetCoeff_Offset(i));
4616  }
4617  }
4618  break;
4619  case 2:
4620  {
4621  for (int i = 0; i < GetExpSize(); ++i)
4622  {
4623  (*m_exp)[i]->NormVectorIProductWRTBase(
4624  V[0] + GetPhys_Offset(i), V[1] + GetPhys_Offset(i),
4625  tmp = outarray + GetCoeff_Offset(i));
4626  }
4627  }
4628  break;
4629  case 3:
4630  {
4631  for (int i = 0; i < GetExpSize(); ++i)
4632  {
4633  (*m_exp)[i]->NormVectorIProductWRTBase(
4634  V[0] + GetPhys_Offset(i), V[1] + GetPhys_Offset(i),
4635  V[2] + GetPhys_Offset(i),
4636  tmp = outarray + GetCoeff_Offset(i));
4637  }
4638  }
4639  break;
4640  default:
4641  NEKERROR(ErrorUtil::efatal, "Dimension not supported");
4642  break;
4643  }
4644 }
int GetCoeff_Offset(int n) const
Get the start offset position for a local contiguous list of coeffs correspoinding to element n.
Definition: ExpList.h:2037
int GetExpSize(void)
This function returns the number of elements in the expansion.
Definition: ExpList.h:1996

References Nektar::ErrorUtil::efatal, GetCoeff_Offset(), GetCoordim(), GetExpSize(), GetPhys_Offset(), and NEKERROR.

◆ v_NormVectorIProductWRTBase() [2/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 4593 of file ExpList.cpp.

4597 {
4598  boost::ignore_unused(V1, V2, outarray, BndID);
4600  "This method is not defined or valid for this class type");
4601 }

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

Referenced by NormVectorIProductWRTBase().

◆ v_PeriodicBwdCopy()

void Nektar::MultiRegions::ExpList::v_PeriodicBwdCopy ( const Array< OneD, const NekDouble > &  Fwd,
Array< OneD, NekDouble > &  Bwd 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField.

Definition at line 5008 of file ExpList.cpp.

5010 {
5011  boost::ignore_unused(Fwd, Bwd);
5012  NEKERROR(ErrorUtil::efatal, "v_PeriodicBwdCopy not defined");
5013 }

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

Referenced by PeriodicBwdCopy().

◆ 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::ExpListHomogeneous2D, and Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1555 of file ExpList.cpp.

1559 {
1560  Array<OneD, NekDouble> e_out_d0;
1561  Array<OneD, NekDouble> e_out_d1;
1562  Array<OneD, NekDouble> e_out_d2;
1563  int offset;
1564 
1565  // initialise if required
1567  {
1568  for (int i = 0; i < m_collections.size(); ++i)
1569  {
1570  m_collections[i].Initialise(Collections::ePhysDeriv);
1571  }
1573  }
1574 
1575  LibUtilities::Timer timer;
1576  timer.Start();
1577  for (int i = 0; i < m_collections.size(); ++i)
1578  {
1579  offset = m_coll_phys_offset[i];
1580  e_out_d0 = out_d0 + offset;
1581  e_out_d1 = out_d1 + offset;
1582  e_out_d2 = out_d2 + offset;
1583 
1584  m_collections[i].ApplyOperator(Collections::ePhysDeriv,
1585  inarray + offset, e_out_d0, e_out_d1,
1586  e_out_d2);
1587  }
1588  timer.Stop();
1589  // Elapsed time
1590  timer.AccumulateRegion("Collections:PhysDeriv", 10);
1591 }

References Nektar::LibUtilities::Timer::AccumulateRegion(), Nektar::Collections::ePhysDeriv, m_coll_phys_offset, m_collections, m_collectionsDoInit, Nektar::LibUtilities::Timer::Start(), and Nektar::LibUtilities::Timer::Stop().

Referenced by PhysDeriv(), and v_PhysDeriv().

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

1596 {
1597  Direction edir = DirCartesianMap[dir];
1598  v_PhysDeriv(edir, inarray, out_d);
1599 }
MultiRegions::Direction const DirCartesianMap[]
Definition: ExpList.h:91

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

◆ 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::ExpListHomogeneous2D, and Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1601 of file ExpList.cpp.

1604 {
1605  int i;
1606  if (edir == MultiRegions::eS)
1607  {
1608  Array<OneD, NekDouble> e_out_ds;
1609  for (i = 0; i < (*m_exp).size(); ++i)
1610  {
1611  e_out_ds = out_d + m_phys_offset[i];
1612  (*m_exp)[i]->PhysDeriv_s(inarray + m_phys_offset[i], e_out_ds);
1613  }
1614  }
1615  else if (edir == MultiRegions::eN)
1616  {
1617  Array<OneD, NekDouble> e_out_dn;
1618  for (i = 0; i < (*m_exp).size(); i++)
1619  {
1620  e_out_dn = out_d + m_phys_offset[i];
1621  (*m_exp)[i]->PhysDeriv_n(inarray + m_phys_offset[i], e_out_dn);
1622  }
1623  }
1624  else
1625  {
1626 
1627  // initialise if required
1629  {
1630  for (int i = 0; i < m_collections.size(); ++i)
1631  {
1632  m_collections[i].Initialise(Collections::ePhysDeriv);
1633  }
1635  }
1636 
1637  // convert enum into int
1638  int intdir = (int)edir;
1639  Array<OneD, NekDouble> e_out_d;
1640  int offset;
1641  for (int i = 0; i < m_collections.size(); ++i)
1642  {
1643  offset = m_coll_phys_offset[i];
1644  e_out_d = out_d + offset;
1645 
1646  m_collections[i].ApplyOperator(Collections::ePhysDeriv, intdir,
1647  inarray + offset, e_out_d);
1648  }
1649  }
1650 }

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

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

1724 {
1725  int npts_e;
1726  int coordim = (*m_exp)[0]->GetGeom()->GetCoordim();
1727  int nq = direction.size() / coordim;
1728 
1729  Array<OneD, NekDouble> e_outarray;
1730  Array<OneD, NekDouble> e_MFdiv;
1731  Array<OneD, NekDouble> locdir;
1732 
1733  for (int i = 0; i < (*m_exp).size(); ++i)
1734  {
1735  npts_e = (*m_exp)[i]->GetTotPoints();
1736  locdir = Array<OneD, NekDouble>(npts_e * coordim);
1737 
1738  for (int k = 0; k < coordim; ++k)
1739  {
1740  Vmath::Vcopy(npts_e, &direction[k * nq + m_phys_offset[i]], 1,
1741  &locdir[k * npts_e], 1);
1742  }
1743 
1744  (*m_exp)[i]->PhysDirectionalDeriv(inarray + m_phys_offset[i], locdir,
1745  e_outarray =
1746  outarray + m_phys_offset[i]);
1747  }
1748 }

References m_phys_offset, and Vmath::Vcopy().

Referenced by PhysDirectionalDeriv().

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

Definition at line 5970 of file ExpList.cpp.

5973 {
5974  int cnt, cnt1;
5975 
5976  cnt = cnt1 = 0;
5977 
5978  switch (m_expType)
5979  {
5980  case e2D:
5981  {
5982  for (int i = 0; i < GetExpSize(); ++i)
5983  {
5984  // get new points key
5985  int pt0 = (*m_exp)[i]->GetNumPoints(0);
5986  int pt1 = (*m_exp)[i]->GetNumPoints(1);
5987  int npt0 = (int)pt0 * scale;
5988  int npt1 = (int)pt1 * scale;
5989 
5990  LibUtilities::PointsKey newPointsKey0(
5991  npt0, (*m_exp)[i]->GetPointsType(0));
5992  LibUtilities::PointsKey newPointsKey1(
5993  npt1, (*m_exp)[i]->GetPointsType(1));
5994 
5995  // Project points;
5997  newPointsKey0, newPointsKey1, &inarray[cnt],
5998  (*m_exp)[i]->GetBasis(0)->GetPointsKey(),
5999  (*m_exp)[i]->GetBasis(1)->GetPointsKey(), &outarray[cnt1]);
6000 
6001  cnt += npt0 * npt1;
6002  cnt1 += pt0 * pt1;
6003  }
6004  }
6005  break;
6006  case e3D:
6007  {
6008  for (int i = 0; i < GetExpSize(); ++i)
6009  {
6010  // get new points key
6011  int pt0 = (*m_exp)[i]->GetNumPoints(0);
6012  int pt1 = (*m_exp)[i]->GetNumPoints(1);
6013  int pt2 = (*m_exp)[i]->GetNumPoints(2);
6014  int npt0 = (int)pt0 * scale;
6015  int npt1 = (int)pt1 * scale;
6016  int npt2 = (int)pt2 * scale;
6017 
6018  LibUtilities::PointsKey newPointsKey0(
6019  npt0, (*m_exp)[i]->GetPointsType(0));
6020  LibUtilities::PointsKey newPointsKey1(
6021  npt1, (*m_exp)[i]->GetPointsType(1));
6022  LibUtilities::PointsKey newPointsKey2(
6023  npt2, (*m_exp)[i]->GetPointsType(2));
6024 
6025  // Project points;
6027  newPointsKey0, newPointsKey1, newPointsKey2, &inarray[cnt],
6028  (*m_exp)[i]->GetBasis(0)->GetPointsKey(),
6029  (*m_exp)[i]->GetBasis(1)->GetPointsKey(),
6030  (*m_exp)[i]->GetBasis(2)->GetPointsKey(), &outarray[cnt1]);
6031 
6032  cnt += npt0 * npt1 * npt2;
6033  cnt1 += pt0 * pt1 * pt2;
6034  }
6035  }
6036  break;
6037  default:
6038  {
6039  NEKERROR(ErrorUtil::efatal, "not setup for this expansion");
6040  }
6041  break;
6042  }
6043 }
void PhysGalerkinProject3D(const BasisKey &fbasis0, const BasisKey &fbasis1, const BasisKey &fbasis2, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, const BasisKey &tbasis2, Array< OneD, NekDouble > &to)
void PhysGalerkinProject2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)

References Nektar::MultiRegions::e2D, Nektar::MultiRegions::e3D, Nektar::ErrorUtil::efatal, GetExpSize(), m_exp, m_expType, NEKERROR, Nektar::LibUtilities::PhysGalerkinProject2D(), and Nektar::LibUtilities::PhysGalerkinProject3D().

Referenced by PhysGalerkinProjection1DScaled().

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

Definition at line 5321 of file ExpList.cpp.

5324 {
5325  int cnt, cnt1;
5326 
5327  cnt = cnt1 = 0;
5328 
5329  switch (m_expType)
5330  {
5331  case e2D:
5332  {
5333  for (int i = 0; i < GetExpSize(); ++i)
5334  {
5335  // get new points key
5336  int pt0 = (*m_exp)[i]->GetNumPoints(0);
5337  int pt1 = (*m_exp)[i]->GetNumPoints(1);
5338  int npt0 = (int)pt0 * scale;
5339  int npt1 = (int)pt1 * scale;
5340 
5341  LibUtilities::PointsKey newPointsKey0(
5342  npt0, (*m_exp)[i]->GetPointsType(0));
5343  LibUtilities::PointsKey newPointsKey1(
5344  npt1, (*m_exp)[i]->GetPointsType(1));
5345 
5346  // Interpolate points;
5347  LibUtilities::Interp2D((*m_exp)[i]->GetBasis(0)->GetPointsKey(),
5348  (*m_exp)[i]->GetBasis(1)->GetPointsKey(),
5349  &inarray[cnt], newPointsKey0,
5350  newPointsKey1, &outarray[cnt1]);
5351 
5352  cnt += pt0 * pt1;
5353  cnt1 += npt0 * npt1;
5354  }
5355  }
5356  break;
5357  case e3D:
5358  {
5359  for (int i = 0; i < GetExpSize(); ++i)
5360  {
5361  // get new points key
5362  int pt0 = (*m_exp)[i]->GetNumPoints(0);
5363  int pt1 = (*m_exp)[i]->GetNumPoints(1);
5364  int pt2 = (*m_exp)[i]->GetNumPoints(2);
5365  int npt0 = (int)pt0 * scale;
5366  int npt1 = (int)pt1 * scale;
5367  int npt2 = (int)pt2 * scale;
5368 
5369  LibUtilities::PointsKey newPointsKey0(
5370  npt0, (*m_exp)[i]->GetPointsType(0));
5371  LibUtilities::PointsKey newPointsKey1(
5372  npt1, (*m_exp)[i]->GetPointsType(1));
5373  LibUtilities::PointsKey newPointsKey2(
5374  npt2, (*m_exp)[i]->GetPointsType(2));
5375 
5376  // Interpolate points;
5377  LibUtilities::Interp3D((*m_exp)[i]->GetBasis(0)->GetPointsKey(),
5378  (*m_exp)[i]->GetBasis(1)->GetPointsKey(),
5379  (*m_exp)[i]->GetBasis(2)->GetPointsKey(),
5380  &inarray[cnt], newPointsKey0,
5381  newPointsKey1, newPointsKey2,
5382  &outarray[cnt1]);
5383 
5384  cnt += pt0 * pt1 * pt2;
5385  cnt1 += npt0 * npt1 * npt2;
5386  }
5387  }
5388  break;
5389  default:
5390  {
5391  NEKERROR(ErrorUtil::efatal, "This expansion is not set");
5392  }
5393  break;
5394  }
5395 }
void Interp3D(const BasisKey &fbasis0, const BasisKey &fbasis1, const BasisKey &fbasis2, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, const BasisKey &tbasis2, Array< OneD, NekDouble > &to)
this function interpolates a 3D function evaluated at the quadrature points of the 3D basis,...
Definition: Interp.cpp:167

References Nektar::MultiRegions::e2D, Nektar::MultiRegions::e3D, Nektar::ErrorUtil::efatal, GetExpSize(), Nektar::LibUtilities::Interp2D(), Nektar::LibUtilities::Interp3D(), m_exp, m_expType, and NEKERROR.

Referenced by PhysInterp1DScaled().

◆ 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::DisContField.

Definition at line 2673 of file ExpList.cpp.

2674 {
2675  // Reset matrix managers.
2676  LibUtilities::NekManager<LocalRegions::MatrixKey, DNekScalMat,
2677  LocalRegions::MatrixKey::opLess>::ClearManager();
2678  LibUtilities::NekManager<LocalRegions::MatrixKey, DNekScalBlkMat,
2679  LocalRegions::MatrixKey::opLess>::ClearManager();
2680 
2681  // Loop over all elements and reset geometry information.
2682  for (int i = 0; i < m_exp->size(); ++i)
2683  {
2684  (*m_exp)[i]->GetGeom()->Reset(m_graph->GetCurvedEdges(),
2685  m_graph->GetCurvedFaces());
2686  }
2687 
2688  // Loop over all elements and rebuild geometric factors.
2689  for (int i = 0; i < m_exp->size(); ++i)
2690  {
2691  (*m_exp)[i]->Reset();
2692  }
2693 }
NekMatrix< NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag >, BlockMatrixTag > DNekScalBlkMat
Definition: NekTypeDefs.hpp:68
NekMatrix< NekMatrix< NekDouble, StandardMatrixTag >, ScaledMatrixTag > DNekScalMat

References m_exp, and m_graph.

Referenced by Reset(), and Nektar::MultiRegions::DisContField::v_Reset().

◆ v_SetBndCondBwdWeight()

void Nektar::MultiRegions::ExpList::v_SetBndCondBwdWeight ( const int  index,
const NekDouble  value 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous2D, Nektar::MultiRegions::DisContField3DHomogeneous1D, and Nektar::MultiRegions::DisContField.

Definition at line 4470 of file ExpList.cpp.

4471 {
4472  boost::ignore_unused(index, value);
4474  "v_setBndCondBwdWeight is not defined for this class type");
4475 }

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

Referenced by SetBndCondBwdWeight().

◆ v_SetHomo1DSpecVanVisc()

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

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 1452 of file ExpList.h.

1453  {
1454  boost::ignore_unused(visc);
1456  "This method is not defined or valid for this class type");
1457  }

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

Referenced by SetHomo1DSpecVanVisc().

◆ v_SetHomoLen()

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

Reimplemented in Nektar::MultiRegions::ExpListHomogeneous1D.

Definition at line 3280 of file ExpList.cpp.

3281 {
3282  boost::ignore_unused(lhom);
3284  "This method is not defined or valid for this class type");
3285 }

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

Referenced by SetHomoLen().

◆ v_SetUpPhysNormals()

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

: Set up a normal along the trace elements between two elements at elemental level

Definition at line 4812 of file ExpList.cpp.

4813 {
4814  for (int i = 0; i < m_exp->size(); ++i)
4815  {
4816  for (int j = 0; j < (*m_exp)[i]->GetNtraces(); ++j)
4817  {
4818  (*m_exp)[i]->ComputeTraceNormal(j);
4819  }
4820  }
4821 }

References m_exp.

Referenced by SetUpPhysNormals().

◆ 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::ContField3DHomogeneous1D, and Nektar::MultiRegions::ContField.

Definition at line 1841 of file ExpList.cpp.

1842 {
1843  boost::ignore_unused(field);
1844  // Do nothing unless the method is implemented in the appropriate
1845  // class, i.e. ContField1D,ContField2D, etc.
1846 
1847  // So far it has been implemented just for ContField2D and
1848  // ContField3DHomogeneous1D
1849 
1850  // Block in case users try the smoothing with a modal expansion.
1851  // Maybe a different techique for the smoothing require
1852  // implementation for modal basis.
1853 
1854  ASSERTL0((*m_exp)[0]->GetBasisType(0) == LibUtilities::eGLL_Lagrange ||
1855  (*m_exp)[0]->GetBasisType(0) == LibUtilities::eGauss_Lagrange,
1856  "Smoothing is currently not allowed unless you are using "
1857  "a nodal base for efficiency reasons. The implemented "
1858  "smoothing technique requires the mass matrix inversion "
1859  "which is trivial just for GLL_LAGRANGE_SEM and "
1860  "GAUSS_LAGRANGE_SEMexpansions.");
1861 }

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

Referenced by SmoothField().

◆ v_UnsetGlobalLinSys()

void Nektar::MultiRegions::ExpList::v_UnsetGlobalLinSys ( GlobalLinSysKey  key,
bool  clearLocalMatrices 
)
protectedvirtual

Reimplemented in Nektar::MultiRegions::ContField.

Definition at line 3316 of file ExpList.cpp.

3317 {
3318  boost::ignore_unused(key, clearLocalMatrices);
3320  "UnsetGlobalLinSys not implemented for ExpList.");
3321 }

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

Referenced by UnsetGlobalLinSys().

◆ v_UpdateBndCondExpansion()

std::shared_ptr< ExpList > & Nektar::MultiRegions::ExpList::v_UpdateBndCondExpansion ( int  i)
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous2D, Nektar::MultiRegions::DisContField3DHomogeneous1D, and Nektar::MultiRegions::DisContField.

Definition at line 3799 of file ExpList.cpp.

3800 {
3801  boost::ignore_unused(i);
3803  "This method is not defined or valid for this class type");
3804  static std::shared_ptr<ExpList> result;
3805  return result;
3806 }

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

Referenced by UpdateBndCondExpansion().

◆ v_UpdateBndConditions()

Array< OneD, SpatialDomains::BoundaryConditionShPtr > & Nektar::MultiRegions::ExpList::v_UpdateBndConditions ( )
protectedvirtual

Reimplemented in Nektar::MultiRegions::DisContField3DHomogeneous2D, Nektar::MultiRegions::DisContField3DHomogeneous1D, and Nektar::MultiRegions::DisContField.

Definition at line 5029 of file ExpList.cpp.

5030 {
5032  "This method is not defined or valid for this class type");
5033  static Array<OneD, SpatialDomains::BoundaryConditionShPtr> result;
5034  return result;
5035 }

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

Referenced by UpdateBndConditions().

◆ 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

Upwind the left and right states given by the Arrays Fwd and Bwd using the vector quantity Vec and ouput the upwinded value in the array upwind.

Parameters
VecVelocity field.
FwdLeft state.
BwdRight state.
UpwindOutput vector.

Definition at line 3818 of file ExpList.cpp.

3822 {
3823  switch (m_expType)
3824  {
3825  case e1D:
3826  {
3827  int i, j, k, e_npoints, offset;
3828  Array<OneD, NekDouble> normals;
3829  NekDouble Vn;
3830 
3831  // Assume whole array is of same coordimate dimension
3832  int coordim = GetCoordim(0);
3833 
3834  ASSERTL1(Vec.size() >= coordim,
3835  "Input vector does not have sufficient dimensions to "
3836  "match coordim");
3837 
3838  // Process each expansion
3839  for (i = 0; i < m_exp->size(); ++i)
3840  {
3841  // Get the number of points in the expansion and the normals.
3842  e_npoints = (*m_exp)[i]->GetNumPoints(0);
3843  normals = (*m_exp)[i]->GetPhysNormals();
3844 
3845  // Get the physical data offset of the expansion in m_phys.
3846  offset = m_phys_offset[i];
3847 
3848  // Compute each data point.
3849  for (j = 0; j < e_npoints; ++j)
3850  {
3851  // Calculate normal velocity.
3852  Vn = 0.0;
3853  for (k = 0; k < coordim; ++k)
3854  {
3855  Vn += Vec[k][offset + j] * normals[k * e_npoints + j];
3856  }
3857 
3858  // Upwind based on direction of normal velocity.
3859  if (Vn > 0.0)
3860  {
3861  Upwind[offset + j] = Fwd[offset + j];
3862  }
3863  else
3864  {
3865  Upwind[offset + j] = Bwd[offset + j];
3866  }
3867  }
3868  }
3869  }
3870  break;
3871  default:
3873  "This method is not defined or valid for this class type");
3874  break;
3875  }
3876 }

References ASSERTL1, Nektar::MultiRegions::e1D, Nektar::ErrorUtil::efatal, GetCoordim(), m_exp, m_expType, m_phys_offset, NEKERROR, and Upwind().

Referenced by Upwind().

◆ 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

One-dimensional upwind.

See also
ExpList::Upwind( const Array<OneD, const Array<OneD, NekDouble> >, const Array<OneD, const NekDouble>, const Array<OneD, const NekDouble>, Array<OneD, NekDouble>, int)
Parameters
VnVelocity field.
FwdLeft state.
BwdRight state.
UpwindOutput vector.

Definition at line 3891 of file ExpList.cpp.

3895 {
3896  ASSERTL1(Vn.size() >= m_npoints, "Vn is not of sufficient length");
3897  ASSERTL1(Fwd.size() >= m_npoints, "Fwd is not of sufficient length");
3898  ASSERTL1(Bwd.size() >= m_npoints, "Bwd is not of sufficient length");
3899  ASSERTL1(Upwind.size() >= m_npoints, "Upwind is not of sufficient length");
3900 
3901  // Process each point in the expansion.
3902  for (int j = 0; j < m_npoints; ++j)
3903  {
3904  // Upwind based on one-dimensional velocity.
3905  if (Vn[j] > 0.0)
3906  {
3907  Upwind[j] = Fwd[j];
3908  }
3909  else
3910  {
3911  Upwind[j] = Bwd[j];
3912  }
3913  }
3914 }

References ASSERTL1, m_npoints, and Upwind().

◆ v_VectorFlux()

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

Definition at line 3236 of file ExpList.cpp.

3238 {
3239  NekDouble flux = 0.0;
3240  int i = 0;
3241  int j;
3242 
3243  for (i = 0; i < (*m_exp).size(); ++i)
3244  {
3245  Array<OneD, Array<OneD, NekDouble>> tmp(inarray.size());
3246  for (j = 0; j < inarray.size(); ++j)
3247  {
3248  tmp[j] = Array<OneD, NekDouble>(inarray[j] + m_phys_offset[i]);
3249  }
3250  flux += (*m_exp)[i]->VectorFlux(tmp);
3251  }
3252 
3253  return flux;
3254 }

References m_phys_offset.

Referenced by VectorFlux().

◆ v_WriteTecplotConnectivity()

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

Reimplemented in Nektar::MultiRegions::ExpList3DHomogeneous1D.

Definition at line 2831 of file ExpList.cpp.

2832 {
2833  int i, j, k, l;
2834  int nbase = (*m_exp)[0]->GetNumBases();
2835  int cnt = 0;
2836 
2837  std::shared_ptr<LocalRegions::ExpansionVector> exp = m_exp;
2838 
2839  if (expansion != -1)
2840  {
2841  exp = std::shared_ptr<LocalRegions::ExpansionVector>(
2843  (*exp)[0] = (*m_exp)[expansion];
2844  }
2845 
2846  if (nbase == 2)
2847  {
2848  for (i = 0; i < (*exp).size(); ++i)
2849  {
2850  const int np0 = (*exp)[i]->GetNumPoints(0);
2851  const int np1 = (*exp)[i]->GetNumPoints(1);
2852 
2853  for (j = 1; j < np1; ++j)
2854  {
2855  for (k = 1; k < np0; ++k)
2856  {
2857  outfile << cnt + (j - 1) * np0 + k << " ";
2858  outfile << cnt + (j - 1) * np0 + k + 1 << " ";
2859  outfile << cnt + j * np0 + k + 1 << " ";
2860  outfile << cnt + j * np0 + k << endl;
2861  }
2862  }
2863 
2864  cnt += np0 * np1;
2865  }
2866  }
2867  else if (nbase == 3)
2868  {
2869  for (i = 0; i < (*exp).size(); ++i)
2870  {
2871  const int np0 = (*exp)[i]->GetNumPoints(0);
2872  const int np1 = (*exp)[i]->GetNumPoints(1);
2873  const int np2 = (*exp)[i]->GetNumPoints(2);
2874  const int np01 = np0 * np1;
2875 
2876  for (j = 1; j < np2; ++j)
2877  {
2878  for (k = 1; k < np1; ++k)
2879  {
2880  for (l = 1; l < np0; ++l)
2881  {
2882  outfile << cnt + (j - 1) * np01 + (k - 1) * np0 + l
2883  << " ";
2884  outfile << cnt + (j - 1) * np01 + (k - 1) * np0 + l + 1
2885  << " ";
2886  outfile << cnt + (j - 1) * np01 + k * np0 + l + 1
2887  << " ";
2888  outfile << cnt + (j - 1) * np01 + k * np0 + l << " ";
2889  outfile << cnt + j * np01 + (k - 1) * np0 + l << " ";
2890  outfile << cnt + j * np01 + (k - 1) * np0 + l + 1
2891  << " ";
2892  outfile << cnt + j * np01 + k * np0 + l + 1 << " ";
2893  outfile << cnt + j * np01 + k * np0 + l << endl;
2894  }
2895  }
2896  }
2897  cnt += np0 * np1 * np2;
2898  }
2899  }
2900  else
2901  {
2902  NEKERROR(ErrorUtil::efatal, "Not set up for this dimension");
2903  }
2904 }
std::vector< ExpansionSharedPtr > ExpansionVector
Definition: Expansion.h:70

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

Referenced by WriteTecplotConnectivity().

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

2912 {
2913  if (expansion == -1)
2914  {
2915  int totpoints = GetTotPoints();
2916  if (m_physState == false)
2917  {
2919  }
2920 
2921  for (int i = 0; i < totpoints; ++i)
2922  {
2923  outfile << m_phys[i] << " ";
2924  if (i % 1000 == 0 && i)
2925  {
2926  outfile << std::endl;
2927  }
2928  }
2929  outfile << std::endl;
2930  }
2931  else
2932  {
2933  int nPoints = (*m_exp)[expansion]->GetTotPoints();
2934 
2935  for (int i = 0; i < nPoints; ++i)
2936  {
2937  outfile << m_phys[i + m_phys_offset[expansion]] << " ";
2938  }
2939 
2940  outfile << std::endl;
2941  }
2942 }

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

Referenced by WriteTecplotField().

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

2701 {
2702  if (GetNumElmts() == 0)
2703  {
2704  return;
2705  }
2706 
2707  int coordim = GetExp(0)->GetCoordim();
2708  char vars[3] = {'x', 'y', 'z'};
2709 
2710  if (m_expType == e3DH1D)
2711  {
2712  coordim += 1;
2713  }
2714  else if (m_expType == e3DH2D)
2715  {
2716  coordim += 2;
2717  }
2718 
2719  outfile << "Variables = x";
2720  for (int i = 1; i < coordim; ++i)
2721  {
2722  outfile << ", " << vars[i];
2723  }
2724 
2725  if (var.size() > 0)
2726  {
2727  outfile << ", " << var;
2728  }
2729 
2730  outfile << std::endl << std::endl;
2731 }

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

Referenced by WriteTecplotHeader().

◆ 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::ExpList2DHomogeneous2D, and Nektar::MultiRegions::ExpList2DHomogeneous1D.

Definition at line 2738 of file ExpList.cpp.

2739 {
2740  int i, j;
2741  int coordim = GetCoordim(0);
2742  int nPoints = GetTotPoints();
2743  int nBases = (*m_exp)[0]->GetNumBases();
2744  int numBlocks = 0;
2745 
2746  Array<OneD, Array<OneD, NekDouble>> coords(3);
2747 
2748  if (expansion == -1)
2749  {
2750  nPoints = GetTotPoints();
2751 
2752  coords[0] = Array<OneD, NekDouble>(nPoints);
2753  coords[1] = Array<OneD, NekDouble>(nPoints);
2754  coords[2] = Array<OneD, NekDouble>(nPoints);
2755 
2756  GetCoords(coords[0], coords[1], coords[2]);
2757 
2758  for (i = 0; i < m_exp->size(); ++i)
2759  {
2760  int numInt = 1;
2761 
2762  for (j = 0; j < nBases; ++j)
2763  {
2764  numInt *= (*m_exp)[i]->GetNumPoints(j) - 1;
2765  }
2766 
2767  numBlocks += numInt;
2768  }
2769  }
2770  else
2771  {
2772  nPoints = (*m_exp)[expansion]->GetTotPoints();
2773 
2774  coords[0] = Array<OneD, NekDouble>(nPoints);
2775  coords[1] = Array<OneD, NekDouble>(nPoints);
2776  coords[2] = Array<OneD, NekDouble>(nPoints);
2777 
2778  (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
2779 
2780  numBlocks = 1;
2781  for (j = 0; j < nBases; ++j)
2782  {
2783  numBlocks *= (*m_exp)[expansion]->GetNumPoints(j) - 1;
2784  }
2785  }
2786 
2787  if (m_expType == e3DH1D)
2788  {
2789  nBases += 1;
2790  coordim += 1;
2791  int nPlanes = GetZIDs().size();
2792  NekDouble tmp = numBlocks * (nPlanes - 1.0) / nPlanes;
2793  numBlocks = (int)tmp;
2794  }
2795  else if (m_expType == e3DH2D)
2796  {
2797  nBases += 2;
2798  coordim += 1;
2799  }
2800 
2801  outfile << "Zone, N=" << nPoints << ", E=" << numBlocks << ", F=FEBlock";
2802 
2803  switch (nBases)
2804  {
2805  case 2:
2806  outfile << ", ET=QUADRILATERAL" << std::endl;
2807  break;
2808  case 3:
2809  outfile << ", ET=BRICK" << std::endl;
2810  break;
2811  default:
2812  NEKERROR(ErrorUtil::efatal, "Not set up for this type of output");
2813  break;
2814  }
2815 
2816  // Write out coordinates
2817  for (j = 0; j < coordim; ++j)
2818  {
2819  for (i = 0; i < nPoints; ++i)
2820  {
2821  outfile << coords[j][i] << " ";
2822  if (i % 1000 == 0 && i)
2823  {
2824  outfile << std::endl;
2825  }
2826  }
2827  outfile << std::endl;
2828  }
2829 }
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:1728
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:582

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

Referenced by WriteTecplotZone().

◆ v_WriteVtkPieceData()

void Nektar::MultiRegions::ExpList::v_WriteVtkPieceData ( std::ostream &  outfile,
int  expansion,
std::string  var 
)
protectedvirtual

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

Definition at line 3099 of file ExpList.cpp.

3101 {
3102  int i;
3103  int nq = (*m_exp)[expansion]->GetTotPoints();
3104 
3105  // printing the fields of that zone
3106  outfile << " <DataArray type=\"Float64\" Name=\"" << var << "\">"
3107  << endl;
3108  outfile << " ";
3109 
3110  const Array<OneD, NekDouble> phys = m_phys + m_phys_offset[expansion];
3111 
3112  for (i = 0; i < nq; ++i)
3113  {
3114  outfile << (fabs(phys[i]) < NekConstants::kNekZeroTol ? 0 : phys[i])
3115  << " ";
3116  }
3117  outfile << endl;
3118  outfile << " </DataArray>" << endl;
3119 }
static const NekDouble kNekZeroTol

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

Referenced by WriteVtkPieceData().

◆ v_WriteVtkPieceHeader()

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

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

Definition at line 2958 of file ExpList.cpp.

2960 {
2961  boost::ignore_unused(istrip);
2962  int i, j, k;
2963  int nbase = (*m_exp)[expansion]->GetNumBases();
2964  int ntot = (*m_exp)[expansion]->GetTotPoints();
2965  int nquad[3];
2966 
2967  int ntotminus = 1;
2968  for (i = 0; i < nbase; ++i)
2969  {
2970  nquad[i] = (*m_exp)[expansion]->GetNumPoints(i);
2971  ntotminus *= (nquad[i] - 1);
2972  }
2973 
2974  Array<OneD, NekDouble> coords[3];
2975  coords[0] = Array<OneD, NekDouble>(ntot, 0.0);
2976  coords[1] = Array<OneD, NekDouble>(ntot, 0.0);
2977  coords[2] = Array<OneD, NekDouble>(ntot, 0.0);
2978  (*m_exp)[expansion]->GetCoords(coords[0], coords[1], coords[2]);
2979 
2980  outfile << " <Piece NumberOfPoints=\"" << ntot << "\" NumberOfCells=\""
2981  << ntotminus << "\">" << endl;
2982  outfile << " <Points>" << endl;
2983  outfile << " <DataArray type=\"Float64\" "
2984  << "NumberOfComponents=\"3\" format=\"ascii\">" << endl;
2985  outfile << " ";
2986  for (i = 0; i < ntot; ++i)
2987  {
2988  for (j = 0; j < 3; ++j)
2989  {
2990  outfile << setprecision(8) << scientific << (float)coords[j][i]
2991  << " ";
2992  }
2993  outfile << endl;
2994  }
2995  outfile << endl;
2996  outfile << " </DataArray>" << endl;
2997  outfile << " </Points>" << endl;
2998  outfile << " <Cells>" << endl;
2999  outfile << " <DataArray type=\"Int32\" "
3000  << "Name=\"connectivity\" format=\"ascii\">" << endl;
3001 
3002  int ns = 0; // pow(2,dim) for later usage
3003  string ostr;
3004  switch (m_expType)
3005  {
3006  case e1D:
3007  {
3008  ns = 2;
3009  ostr = "3 ";
3010  for (i = 0; i < nquad[0] - 1; ++i)
3011  {
3012  outfile << i << " " << i + 1 << endl;
3013  }
3014  }
3015  break;
3016  case e2D:
3017  {
3018  ns = 4;
3019  ostr = "9 ";
3020  for (i = 0; i < nquad[0] - 1; ++i)
3021  {
3022  for (j = 0; j < nquad[1] - 1; ++j)
3023  {
3024  outfile << j * nquad[0] + i << " " << j * nquad[0] + i + 1
3025  << " " << (j + 1) * nquad[0] + i + 1 << " "
3026  << (j + 1) * nquad[0] + i << endl;
3027  }
3028  }
3029  }
3030  break;
3031  case e3D:
3032  {
3033  ns = 8;
3034  ostr = "12 ";
3035  for (i = 0; i < nquad[0] - 1; ++i)
3036  {
3037  for (j = 0; j < nquad[1] - 1; ++j)
3038  {
3039  for (k = 0; k < nquad[2] - 1; ++k)
3040  {
3041  outfile
3042  << k * nquad[0] * nquad[1] + j * nquad[0] + i << " "
3043  << k * nquad[0] * nquad[1] + j * nquad[0] + i + 1
3044  << " "
3045  << k * nquad[0] * nquad[1] + (j + 1) * nquad[0] +
3046  i + 1
3047  << " "
3048  << k * nquad[0] * nquad[1] + (j + 1) * nquad[0] + i
3049  << " "
3050  << (k + 1) * nquad[0] * nquad[1] + j * nquad[0] + i
3051  << " "
3052  << (k + 1) * nquad[0] * nquad[1] + j * nquad[0] +
3053  i + 1
3054  << " "
3055  << (k + 1) * nquad[0] * nquad[1] +
3056  (j + 1) * nquad[0] + i + 1
3057  << " "
3058  << (k + 1) * nquad[0] * nquad[1] +
3059  (j + 1) * nquad[0] + i
3060  << " " << endl;
3061  }
3062  }
3063  }
3064  }
3065  break;
3066  default:
3067  break;
3068  }
3069 
3070  outfile << endl;
3071  outfile << " </DataArray>" << endl;
3072  outfile << " <DataArray type=\"Int32\" "
3073  << "Name=\"offsets\" format=\"ascii\">" << endl;
3074  for (i = 0; i < ntotminus; ++i)
3075  {
3076  outfile << i * ns + ns << " ";
3077  }
3078  outfile << endl;
3079  outfile << " </DataArray>" << endl;
3080  outfile << " <DataArray type=\"UInt8\" "
3081  << "Name=\"types\" format=\"ascii\">" << endl;
3082  for (i = 0; i < ntotminus; ++i)
3083  {
3084  outfile << ostr;
3085  }
3086  outfile << endl;
3087  outfile << " </DataArray>" << endl;
3088  outfile << " </Cells>" << endl;
3089  outfile << " <PointData>" << endl;
3090 }

References Nektar::MultiRegions::e1D, Nektar::MultiRegions::e2D, Nektar::MultiRegions::e3D, and m_expType.

Referenced by WriteVtkPieceHeader().

◆ VectorFlux()

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

Definition at line 560 of file ExpList.h.

561  {
562  return v_VectorFlux(inarray);
563  }
virtual NekDouble v_VectorFlux(const Array< OneD, Array< OneD, NekDouble >> &inarray)
Definition: ExpList.cpp:3236

References v_VectorFlux().

◆ WriteTecplotConnectivity()

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

Definition at line 400 of file ExpList.h.

401  {
402  v_WriteTecplotConnectivity(outfile, expansion);
403  }
virtual void v_WriteTecplotConnectivity(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:2831

References v_WriteTecplotConnectivity().

◆ WriteTecplotField()

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

Definition at line 396 of file ExpList.h.

397  {
398  v_WriteTecplotField(outfile, expansion);
399  }
virtual void v_WriteTecplotField(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:2911

References v_WriteTecplotField().

◆ WriteTecplotHeader()

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

Definition at line 388 of file ExpList.h.

389  {
390  v_WriteTecplotHeader(outfile, var);
391  }
virtual void v_WriteTecplotHeader(std::ostream &outfile, std::string var="")
Definition: ExpList.cpp:2700

References v_WriteTecplotHeader().

◆ WriteTecplotZone()

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

Definition at line 392 of file ExpList.h.

393  {
394  v_WriteTecplotZone(outfile, expansion);
395  }
virtual void v_WriteTecplotZone(std::ostream &outfile, int expansion)
Definition: ExpList.cpp:2738

References v_WriteTecplotZone().

◆ WriteVtkFooter()

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

Definition at line 2952 of file ExpList.cpp.

2953 {
2954  outfile << " </UnstructuredGrid>" << endl;
2955  outfile << "</VTKFile>" << endl;
2956 }

◆ WriteVtkHeader()

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

Definition at line 2944 of file ExpList.cpp.

2945 {
2946  outfile << "<?xml version=\"1.0\"?>" << endl;
2947  outfile << "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" "
2948  << "byte_order=\"LittleEndian\">" << endl;
2949  outfile << " <UnstructuredGrid>" << endl;
2950 }

◆ WriteVtkPieceData()

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

Definition at line 413 of file ExpList.h.

415  {
416  v_WriteVtkPieceData(outfile, expansion, var);
417  }
virtual void v_WriteVtkPieceData(std::ostream &outfile, int expansion, std::string var)
Definition: ExpList.cpp:3099

References v_WriteVtkPieceData().

◆ WriteVtkPieceFooter()

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

Definition at line 3092 of file ExpList.cpp.

3093 {
3094  boost::ignore_unused(expansion);
3095  outfile << " </PointData>" << endl;
3096  outfile << " </Piece>" << endl;
3097 }

◆ WriteVtkPieceHeader()

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

Definition at line 406 of file ExpList.h.

408  {
409  v_WriteVtkPieceHeader(outfile, expansion, istrip);
410  }
virtual void v_WriteVtkPieceHeader(std::ostream &outfile, int expansion, int istrip)
Definition: ExpList.cpp:2958

References v_WriteVtkPieceHeader().

Member Data Documentation

◆ m_blockMat

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

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

Referenced by Nektar::MultiRegions::ContField::Assemble(), GetCoeff(), GetCoeffs(), SetCoeff(), Nektar::MultiRegions::ExpList2DHomogeneous1D::SetCoeffPhys(), Nektar::MultiRegions::ExpList2DHomogeneous2D::SetCoeffPhys(), Nektar::MultiRegions::ExpList3DHomogeneous1D::SetCoeffPhys(), Nektar::MultiRegions::ExpList3DHomogeneous2D::SetCoeffPhys(), SetCoeffs(), SetCoeffsArray(), SetupCoeffPhys(), UpdateCoeffs(), v_AppendFieldData(), Nektar::MultiRegions::ExpListHomogeneous1D::v_AppendFieldData(), Nektar::MultiRegions::ExpListHomogeneous2D::v_AppendFieldData(), Nektar::MultiRegions::ContField::v_GlobalToLocal(), Nektar::MultiRegions::ContField::v_LocalToGlobal(), and v_WriteTecplotField().

◆ m_coeffsToElmt

Array<OneD, std::pair<int, int> > Nektar::MultiRegions::ExpList::m_coeffsToElmt
protected

m_coeffs to elemental value map

Definition at line 1124 of file ExpList.h.

Referenced by GetCoeffsToElmt(), and SetupCoeffPhys().

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

Referenced by CreateCollections(), GeneralMatrixOp(), IProductWRTDerivBase(), v_BwdTrans(), and v_IProductWRTBase().

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

Referenced by CreateCollections(), GeneralMatrixOp(), IProductWRTDerivBase(), v_BwdTrans(), v_IProductWRTBase(), and v_PhysDeriv().

◆ m_collections

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

◆ m_collectionsDoInit

std::vector<bool> Nektar::MultiRegions::ExpList::m_collectionsDoInit
protected

Vector of bools to act as an initialise on first call flag.

Definition at line 1114 of file ExpList.h.

Referenced by CreateCollections(), GeneralMatrixOp(), IProductWRTDerivBase(), v_BwdTrans(), v_IProductWRTBase(), and v_PhysDeriv().

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

Referenced by Nektar::MultiRegions::ContField3DHomogeneous1D::ContField3DHomogeneous1D(), Nektar::MultiRegions::ContField3DHomogeneous2D::ContField3DHomogeneous2D(), CreateCollections(), Nektar::MultiRegions::DisContField::DisContField(), Nektar::MultiRegions::DisContField3DHomogeneous1D::DisContField3DHomogeneous1D(), Nektar::MultiRegions::DisContField3DHomogeneous2D::DisContField3DHomogeneous2D(), EvalBasisNumModesMax(), EvalBasisNumModesMaxPerExp(), Nektar::MultiRegions::DisContField::EvaluateHDGPostProcessing(), ExpList(), Nektar::MultiRegions::ExpList2DHomogeneous1D::ExpList2DHomogeneous1D(), Nektar::MultiRegions::ExpList3DHomogeneous2D::ExpList3DHomogeneous2D(), GenBlockMatrix(), GeneralGetFieldDefinitions(), GeneralMatrixOp(), Nektar::MultiRegions::ExpList3DHomogeneous1D::GenExpList3DHomogeneous1D(), GenGlobalMatrix(), GenGlobalMatrixFull(), GetCoordim(), GetElmtNormalLength(), GetExp(), GetExpFromGeomId(), GetExpIndex(), GetNcoeffs(), GetShapeDimension(), GetTotPoints(), Nektar::MultiRegions::DisContField::IsLeftAdjacentTrace(), PhysEvaluate(), SetupCoeffPhys(), Nektar::MultiRegions::DisContField::SetUpDG(), Nektar::MultiRegions::DisContField::v_AddTraceIntegral(), v_ExtractDataToCoeffs(), Nektar::MultiRegions::ExpListHomogeneous1D::v_ExtractDataToCoeffs(), v_GetMovingFrames(), v_GetNormals(), v_PhysGalerkinProjection1DScaled(), v_PhysInterp1DScaled(), v_Reset(), v_SetUpPhysNormals(), v_SmoothField(), Nektar::MultiRegions::ContField::v_UnsetGlobalLinSys(), v_Upwind(), v_WriteTecplotConnectivity(), and v_WriteTecplotZone().

◆ m_expType

ExpansionType Nektar::MultiRegions::ExpList::m_expType
protected

◆ m_graph

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

◆ m_ncoeffs

int Nektar::MultiRegions::ExpList::m_ncoeffs
protected

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

Referenced by GetPhys(), Integral(), Nektar::MultiRegions::ExpList2DHomogeneous1D::SetCoeffPhys(), Nektar::MultiRegions::ExpList2DHomogeneous2D::SetCoeffPhys(), Nektar::MultiRegions::ExpList3DHomogeneous1D::SetCoeffPhys(), Nektar::MultiRegions::ExpList3DHomogeneous2D::SetCoeffPhys(), SetPhys(), SetPhysArray(), SetupCoeffPhys(), UpdatePhys(), Nektar::MultiRegions::DisContField::v_ExtractTracePhys(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_ExtractTracePhys(), Nektar::MultiRegions::DisContField::v_GetFwdBwdTracePhys(), v_WriteTecplotField(), v_WriteVtkPieceData(), Nektar::MultiRegions::ExpListHomogeneous1D::v_WriteVtkPieceData(), and Nektar::MultiRegions::ExpListHomogeneous2D::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 1100 of file ExpList.h.

Referenced by GetPhysState(), Integral(), SetPhys(), SetPhysState(), UpdatePhys(), Nektar::MultiRegions::DisContField::v_ExtractTracePhys(), Nektar::MultiRegions::DisContField3DHomogeneous1D::v_ExtractTracePhys(), and v_WriteTecplotField().

◆ m_session

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

◆ m_WaveSpace

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