34#ifndef NEKTAR_LIB_MULTIREGIONS_GLOBALLINSYS_H
35#define NEKTAR_LIB_MULTIREGIONS_GLOBALLINSYS_H
64 const std::weak_ptr<ExpList> &,
const std::shared_ptr<AssemblyMap> &>
69class GlobalLinSys :
public std::enable_shared_from_this<GlobalLinSys>
75 const std::shared_ptr<AssemblyMap> &pLocToGloMap);
86 const inline std::weak_ptr<ExpList> &
GetLocMat(
void)
const;
89 inline void Initialise(
const std::shared_ptr<AssemblyMap> &pLocToGloMap);
102 return shared_from_this();
116 const int pNumDir = 0);
140 const int pNumDir) = 0;
143 virtual void v_Initialise(
const std::shared_ptr<AssemblyMap> &pLocToGloMap);
184 v_Solve(in, out, locToGloMap, dirForcing);
204 const std::shared_ptr<AssemblyMap> &pLocToGloMap)
#define MULTI_REGIONS_EXPORT
Provides a generic Factory class.
virtual void v_SolveLinearSystem(const int pNumRows, const Array< OneD, const NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const AssemblyMapSharedPtr &locToGloMap, const int pNumDir)=0
Solve a basic matrix system.
virtual int v_GetNumBlocks()
Get the number of blocks in this system.
const std::weak_ptr< ExpList > m_expList
Local Matrix System.
void DropStaticCondBlock(unsigned int n)
static std::string lookupIds[]
LocalRegions::MatrixKey GetBlockMatrixKey(unsigned int n)
std::shared_ptr< GlobalLinSys > GetSharedThisPtr()
Returns a shared pointer to the current object.
const GlobalLinSysKey & GetKey(void) const
Returns the key associated with the system.
const std::map< int, RobinBCInfoSharedPtr > m_robinBCInfo
Robin boundary info.
virtual void v_Solve(const Array< OneD, const NekDouble > &in, Array< OneD, NekDouble > &out, const AssemblyMapSharedPtr &locToGloMap, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)=0
Solve a linear system based on mapping.
GlobalLinSys(const GlobalLinSysKey &pKey, const std::weak_ptr< ExpList > &pExpList, const std::shared_ptr< AssemblyMap > &pLocToGloMap)
Constructor for full direct matrix solve.
void Solve(const Array< OneD, const NekDouble > &in, Array< OneD, NekDouble > &out, const AssemblyMapSharedPtr &locToGloMap, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray)
Solve the linear system for given input and output vectors using a specified local to global map.
virtual void v_InitObject()
void SolveLinearSystem(const int pNumRows, const Array< OneD, const NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const AssemblyMapSharedPtr &locToGloMap, const int pNumDir=0)
Solve the linear system for given input and output vectors.
const GlobalLinSysKey m_linSysKey
Key associated with this linear system.
virtual DNekScalMatSharedPtr v_GetBlock(unsigned int n)
Retrieves the block matrix from n-th expansion using the matrix key provided by the m_linSysKey.
DNekScalMatSharedPtr GetBlock(unsigned int n)
virtual void v_DropBlock(unsigned int n)
Releases the local block matrix from NekManager of n-th expansion using the matrix key provided by th...
const std::weak_ptr< ExpList > & GetLocMat(void) const
PreconditionerSharedPtr CreatePrecon(AssemblyMapSharedPtr asmMap)
Create a preconditioner object from the parameters defined in the supplied assembly map.
virtual DNekScalBlkMatSharedPtr v_GetStaticCondBlock(unsigned int n)
Retrieves a the static condensation block matrices from n-th expansion using the matrix key provided ...
virtual void v_Initialise(const std::shared_ptr< AssemblyMap > &pLocToGloMap)
virtual void v_DropStaticCondBlock(unsigned int n)
Releases the static condensation block matrices from NekManager of n-th expansion using the matrix ke...
void Initialise(const std::shared_ptr< AssemblyMap > &pLocToGloMap)
DNekScalBlkMatSharedPtr GetStaticCondBlock(unsigned int n)
void DropBlock(unsigned int n)
Describe a linear system.
LibUtilities::NekFactory< std::string, GlobalLinSys, const GlobalLinSysKey &, const std::weak_ptr< ExpList > &, const std::shared_ptr< AssemblyMap > & > GlobalLinSysFactory
Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class.
std::shared_ptr< GlobalLinSys > GlobalLinSysSharedPtr
Pointer to a GlobalLinSys object.
std::map< GlobalLinSysKey, GlobalLinSysSharedPtr > GlobalLinSysMap
Mapping between GlobalLinSys objects and their associated keys.
GlobalLinSysFactory & GetGlobalLinSysFactory()
std::shared_ptr< Preconditioner > PreconditionerSharedPtr
std::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
std::shared_ptr< GlobalLinSysMap > GlobalLinSysMapShPtr
Pointer to a GlobalLinSys/key map.
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
static Array< OneD, NekDouble > NullNekDouble1DArray