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

A global linear system. More...

#include <GlobalLinSysDirect.h>

Inheritance diagram for Nektar::MultiRegions::GlobalLinSysDirect:
[legend]

Public Member Functions

 GlobalLinSysDirect (const GlobalLinSysKey &pKey, const std::weak_ptr< ExpList > &pExp, const std::shared_ptr< AssemblyMap > &pLocToGloMap)
 Constructor for full direct matrix solve. More...
 
 ~GlobalLinSysDirect () override
 
- Public Member Functions inherited from Nektar::MultiRegions::GlobalLinSys
 GlobalLinSys (const GlobalLinSysKey &pKey, const std::weak_ptr< ExpList > &pExpList, const std::shared_ptr< AssemblyMap > &pLocToGloMap)
 Constructor for full direct matrix solve. More...
 
virtual ~GlobalLinSys ()
 
const GlobalLinSysKeyGetKey (void) const
 Returns the key associated with the system. More...
 
const std::weak_ptr< ExpList > & GetLocMat (void) const
 
void InitObject ()
 
void Initialise (const std::shared_ptr< AssemblyMap > &pLocToGloMap)
 
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. More...
 
std::shared_ptr< GlobalLinSysGetSharedThisPtr ()
 Returns a shared pointer to the current object. More...
 
int GetNumBlocks ()
 
DNekScalMatSharedPtr GetBlock (unsigned int n)
 
void DropBlock (unsigned int n)
 
DNekScalBlkMatSharedPtr GetStaticCondBlock (unsigned int n)
 
void DropStaticCondBlock (unsigned int n)
 
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. More...
 

Protected Attributes

DNekLinSysSharedPtr m_linSys
 Basic linear system object. More...
 
- Protected Attributes inherited from Nektar::MultiRegions::GlobalLinSys
const GlobalLinSysKey m_linSysKey
 Key associated with this linear system. More...
 
const std::weak_ptr< ExpListm_expList
 Local Matrix System. More...
 
const std::map< int, RobinBCInfoSharedPtrm_robinBCInfo
 Robin boundary info. More...
 
bool m_verbose
 

Additional Inherited Members

- Protected Member Functions inherited from Nektar::MultiRegions::GlobalLinSys
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. More...
 
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. More...
 
virtual void v_InitObject ()
 
virtual void v_Initialise (const std::shared_ptr< AssemblyMap > &pLocToGloMap)
 
virtual int v_GetNumBlocks ()
 Get the number of blocks in this system. More...
 
virtual DNekScalMatSharedPtr v_GetBlock (unsigned int n)
 Retrieves the block matrix from n-th expansion using the matrix key provided by the m_linSysKey. More...
 
virtual void v_DropBlock (unsigned int n)
 Releases the local block matrix from NekManager of n-th expansion using the matrix key provided by the m_linSysKey. More...
 
virtual DNekScalBlkMatSharedPtr v_GetStaticCondBlock (unsigned int n)
 Retrieves a the static condensation block matrices from n-th expansion using the matrix key provided by the m_linSysKey. More...
 
virtual void v_DropStaticCondBlock (unsigned int n)
 Releases the static condensation block matrices from NekManager of n-th expansion using the matrix key provided by the m_linSysKey. More...
 
PreconditionerSharedPtr CreatePrecon (AssemblyMapSharedPtr asmMap)
 Create a preconditioner object from the parameters defined in the supplied assembly map. More...
 

Detailed Description

A global linear system.

Solves a linear system using direct methods.

Consider a linear system \(\boldsymbol{M\hat{u}}_g=\boldsymbol{\hat{f}}\) to be solved, where \(\boldsymbol{M}\) is a matrix of type specified by mkey. This function assembles the global system matrix \(\boldsymbol{M}\) out of the elemental submatrices \(\boldsymbol{M}^e\). This is equivalent to:

\[ \boldsymbol{M}=\boldsymbol{\mathcal{A}}^T \underline{\boldsymbol{M}}^e\boldsymbol{\mathcal{A}}.\]

where the matrix \(\boldsymbol{\mathcal{A}}\) is a sparse permutation matrix of size \(N_{\mathrm{eof}}\times N_{\mathrm{dof}}\). However, due to the size and sparsity of the matrix \(\boldsymbol{\mathcal{A}}\), it is more efficient to assemble the global matrix using the mapping array map \([e][i]\) contained in the input argument locToGloMap. The global assembly is then evaluated as:

\[ \boldsymbol{M}\left[\mathrm{\texttt{map}}[e][i]\right] \left[\mathrm{\texttt{map}}[e][j]\right] =\mathrm{\texttt{sign}}[e][i]\cdot \mathrm{\texttt{sign}}[e][j] \cdot\boldsymbol{M}^e[i][j]\]

where the values sign \([e][i]\) ensure the correct connectivity.

Solves a linear system using single- or multi-level static condensation.

Definition at line 46 of file GlobalLinSysDirect.h.

Constructor & Destructor Documentation

◆ GlobalLinSysDirect()

Nektar::MultiRegions::GlobalLinSysDirect::GlobalLinSysDirect ( const GlobalLinSysKey pKey,
const std::weak_ptr< ExpList > &  pExp,
const std::shared_ptr< AssemblyMap > &  pLocToGloMap 
)

Constructor for full direct matrix solve.

Definition at line 46 of file GlobalLinSysDirect.cpp.

49 : GlobalLinSys(pKey, pExp, pLocToGloMap)
50{
51}
GlobalLinSys(const GlobalLinSysKey &pKey, const std::weak_ptr< ExpList > &pExpList, const std::shared_ptr< AssemblyMap > &pLocToGloMap)
Constructor for full direct matrix solve.

◆ ~GlobalLinSysDirect()

Nektar::MultiRegions::GlobalLinSysDirect::~GlobalLinSysDirect ( )
override

Definition at line 53 of file GlobalLinSysDirect.cpp.

54{
55}

Member Data Documentation

◆ m_linSys

DNekLinSysSharedPtr Nektar::MultiRegions::GlobalLinSysDirect::m_linSys
protected