Nektar++
|
A global linear system. More...
#include <GlobalLinSysStaticCond.h>
Public Member Functions | |
GlobalLinSysStaticCond (const GlobalLinSysKey &mkey, const boost::weak_ptr< ExpList > &pExpList, const boost::shared_ptr< AssemblyMap > &locToGloMap) | |
Constructor for full direct matrix solve. | |
virtual | ~GlobalLinSysStaticCond () |
Public Member Functions inherited from Nektar::MultiRegions::GlobalLinSys | |
GlobalLinSys (const GlobalLinSysKey &pKey, const boost::weak_ptr< ExpList > &pExpList, const boost::shared_ptr< AssemblyMap > &pLocToGloMap) | |
Constructor for full direct matrix solve. | |
virtual | ~GlobalLinSys () |
const GlobalLinSysKey & | GetKey (void) const |
Returns the key associated with the system. | |
const boost::weak_ptr< ExpList > & | GetLocMat (void) const |
void | InitObject () |
void | Initialise (const boost::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. | |
boost::shared_ptr< GlobalLinSys > | GetSharedThisPtr () |
Returns a shared pointer to the current object. | |
int | GetNumBlocks () |
DNekScalMatSharedPtr | GetBlock (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. |
Protected Member Functions | |
virtual DNekScalBlkMatSharedPtr | v_PreSolve (int scLevel, NekVector< NekDouble > &F_GlobBnd) |
virtual void | v_BasisTransform (Array< OneD, NekDouble > &pInOut, int offset) |
virtual void | v_BasisInvTransform (Array< OneD, NekDouble > &pInOut) |
virtual void | v_AssembleSchurComplement (boost::shared_ptr< AssemblyMap > pLoctoGloMap) |
virtual int | v_GetNumBlocks () |
Get the number of blocks in this system. | |
virtual GlobalLinSysStaticCondSharedPtr | v_Recurse (const GlobalLinSysKey &mkey, const boost::weak_ptr< ExpList > &pExpList, const DNekScalBlkMatSharedPtr pSchurCompl, const DNekScalBlkMatSharedPtr pBinvD, const DNekScalBlkMatSharedPtr pC, const DNekScalBlkMatSharedPtr pInvD, const boost::shared_ptr< AssemblyMap > &locToGloMap)=0 |
virtual void | v_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 () |
virtual void | v_Initialise (const boost::shared_ptr< AssemblyMap > &locToGloMap) |
Initialise this object. | |
void | SetupTopLevel (const boost::shared_ptr< AssemblyMap > &locToGloMap) |
Set up the storage for the Schur complement or the top level of the multi-level Schur complement. | |
void | ConstructNextLevelCondensedSystem (const boost::shared_ptr< AssemblyMap > &locToGloMap) |
Protected Member Functions inherited from Nektar::MultiRegions::GlobalLinSys | |
virtual DNekScalMatSharedPtr | v_GetBlock (unsigned int n) |
Retrieves the block matrix from n-th expansion using the matrix key provided by the m_linSysKey. | |
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. | |
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. |
Protected Attributes | |
GlobalLinSysStaticCondSharedPtr | m_recursiveSchurCompl |
Schur complement for Direct Static Condensation. | |
DNekScalBlkMatSharedPtr | m_schurCompl |
Block Schur complement matrix. | |
DNekScalBlkMatSharedPtr | m_BinvD |
Block matrix. | |
DNekScalBlkMatSharedPtr | m_C |
Block matrix. | |
DNekScalBlkMatSharedPtr | m_invD |
Block matrix. | |
boost::shared_ptr< AssemblyMap > | m_locToGloMap |
Local to global map. | |
Array< OneD, NekDouble > | m_wsp |
Workspace array for matrix multiplication. | |
Protected Attributes inherited from Nektar::MultiRegions::GlobalLinSys | |
const GlobalLinSysKey | m_linSysKey |
Key associated with this linear system. | |
const boost::weak_ptr< ExpList > | m_expList |
Local Matrix System. | |
const map< int, RobinBCInfoSharedPtr > | m_robinBCInfo |
Robin boundary info. |
A global linear system.
Solves a linear system using single- or multi-level static condensation.
Definition at line 55 of file GlobalLinSysStaticCond.h.
Nektar::MultiRegions::GlobalLinSysStaticCond::GlobalLinSysStaticCond | ( | const GlobalLinSysKey & | pKey, |
const boost::weak_ptr< ExpList > & | pExpList, | ||
const boost::shared_ptr< AssemblyMap > & | pLocToGloMap | ||
) |
Constructor for full direct matrix solve.
For a matrix system of the form
where and are invertible, store and assemble a static condensation system, according to a given local to global mapping. #m_linSys is constructed by AssembleSchurComplement().
mKey | Associated matrix key. |
pLocMatSys | LocalMatrixSystem |
locToGloMap | Local to global mapping. |
Definition at line 74 of file GlobalLinSysStaticCond.cpp.
|
virtual |
Definition at line 95 of file GlobalLinSysStaticCond.cpp.
|
protected |
Definition at line 345 of file GlobalLinSysStaticCond.cpp.
References ASSERTL0, Nektar::eDIAGONAL, Nektar::eWrapper, Nektar::MultiRegions::GlobalLinSys::m_expList, Nektar::MultiRegions::GlobalLinSys::m_linSysKey, m_recursiveSchurCompl, m_schurCompl, sign, and v_Recurse().
Referenced by v_Initialise().
|
protected |
Set up the storage for the Schur complement or the top level of the multi-level Schur complement.
For the first level in multi-level static condensation, or the only level in the case of single-level static condensation, allocate the condensed matrices and populate them with the local matrices retrieved from the expansion list.
Definition at line 296 of file GlobalLinSysStaticCond.cpp.
References Nektar::eDIAGONAL, Nektar::StdRegions::eHybridDGHelmBndLam, Nektar::MultiRegions::GlobalMatrixKey::GetMatrixType(), m_BinvD, m_C, Nektar::MultiRegions::GlobalLinSys::m_expList, m_invD, Nektar::MultiRegions::GlobalLinSys::m_linSysKey, m_schurCompl, Nektar::MultiRegions::GlobalLinSys::v_GetBlock(), and Nektar::MultiRegions::GlobalLinSys::v_GetStaticCondBlock().
Referenced by v_InitObject(), and Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_InitObject().
|
inlineprotectedvirtual |
Reimplemented in Nektar::MultiRegions::GlobalLinSysPETScStaticCond, Nektar::MultiRegions::GlobalLinSysXxtStaticCond, and Nektar::MultiRegions::GlobalLinSysDirectStaticCond.
Definition at line 87 of file GlobalLinSysStaticCond.h.
Referenced by v_Initialise().
|
inlineprotectedvirtual |
Reimplemented in Nektar::MultiRegions::GlobalLinSysIterativeStaticCond.
Definition at line 81 of file GlobalLinSysStaticCond.h.
Referenced by v_Solve().
|
inlineprotectedvirtual |
Reimplemented in Nektar::MultiRegions::GlobalLinSysIterativeStaticCond.
Definition at line 74 of file GlobalLinSysStaticCond.h.
Referenced by v_Solve().
|
protectedvirtual |
Get the number of blocks in this system.
At the top level this corresponds to the number of elements in the expansion list.
Reimplemented from Nektar::MultiRegions::GlobalLinSys.
Definition at line 284 of file GlobalLinSysStaticCond.cpp.
References m_schurCompl.
|
protectedvirtual |
Initialise this object.
If at the last level of recursion (or the only level in the case of single-level static condensation), assemble the Schur complement. For other levels, in the case of multi-level static condensation, the next level of the condensed system is computed.
pLocToGloMap | Local to global mapping. |
Reimplemented from Nektar::MultiRegions::GlobalLinSys.
Definition at line 266 of file GlobalLinSysStaticCond.cpp.
References ConstructNextLevelCondensedSystem(), m_locToGloMap, m_wsp, and v_AssembleSchurComplement().
|
protectedvirtual |
Reimplemented from Nektar::MultiRegions::GlobalLinSys.
Definition at line 83 of file GlobalLinSysStaticCond.cpp.
References Nektar::MultiRegions::GlobalLinSys::Initialise(), m_locToGloMap, and SetupTopLevel().
|
inlineprotectedvirtual |
Reimplemented in Nektar::MultiRegions::GlobalLinSysIterativeStaticCond.
Definition at line 67 of file GlobalLinSysStaticCond.h.
References m_schurCompl.
Referenced by v_Solve().
|
protectedpure virtual |
|
protectedvirtual |
Solve the linear system for given input and output vectors using a specified local to global map.
Implements Nektar::MultiRegions::GlobalLinSys.
Definition at line 104 of file GlobalLinSysStaticCond.cpp.
References Nektar::eWrapper, Vmath::Fill(), Nektar::NekVector< DataType >::GetPtr(), m_BinvD, m_C, m_invD, m_recursiveSchurCompl, m_wsp, Nektar::MultiRegions::GlobalLinSys::SolveLinearSystem(), v_BasisInvTransform(), v_BasisTransform(), v_PreSolve(), Vmath::Vadd(), Vmath::Vcopy(), and Vmath::Vsub().
|
protected |
Block matrix.
Definition at line 109 of file GlobalLinSysStaticCond.h.
Referenced by Nektar::MultiRegions::GlobalLinSysDirectStaticCond::GlobalLinSysDirectStaticCond(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::GlobalLinSysIterativeStaticCond(), Nektar::MultiRegions::GlobalLinSysPETScStaticCond::GlobalLinSysPETScStaticCond(), Nektar::MultiRegions::GlobalLinSysXxtStaticCond::GlobalLinSysXxtStaticCond(), SetupTopLevel(), Nektar::MultiRegions::GlobalLinSysDirectStaticCond::v_AssembleSchurComplement(), Nektar::MultiRegions::GlobalLinSysPETScStaticCond::v_AssembleSchurComplement(), and v_Solve().
|
protected |
Block matrix.
Definition at line 111 of file GlobalLinSysStaticCond.h.
Referenced by Nektar::MultiRegions::GlobalLinSysDirectStaticCond::GlobalLinSysDirectStaticCond(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::GlobalLinSysIterativeStaticCond(), Nektar::MultiRegions::GlobalLinSysPETScStaticCond::GlobalLinSysPETScStaticCond(), Nektar::MultiRegions::GlobalLinSysXxtStaticCond::GlobalLinSysXxtStaticCond(), SetupTopLevel(), Nektar::MultiRegions::GlobalLinSysDirectStaticCond::v_AssembleSchurComplement(), Nektar::MultiRegions::GlobalLinSysPETScStaticCond::v_AssembleSchurComplement(), and v_Solve().
|
protected |
Block matrix.
Definition at line 113 of file GlobalLinSysStaticCond.h.
Referenced by Nektar::MultiRegions::GlobalLinSysDirectStaticCond::GlobalLinSysDirectStaticCond(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::GlobalLinSysIterativeStaticCond(), Nektar::MultiRegions::GlobalLinSysPETScStaticCond::GlobalLinSysPETScStaticCond(), Nektar::MultiRegions::GlobalLinSysXxtStaticCond::GlobalLinSysXxtStaticCond(), SetupTopLevel(), Nektar::MultiRegions::GlobalLinSysDirectStaticCond::v_AssembleSchurComplement(), Nektar::MultiRegions::GlobalLinSysPETScStaticCond::v_AssembleSchurComplement(), and v_Solve().
|
protected |
Local to global map.
Definition at line 115 of file GlobalLinSysStaticCond.h.
Referenced by Nektar::MultiRegions::GlobalLinSysXxtStaticCond::GlobalLinSysXxtStaticCond(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_AssembleSchurComplement(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_DoMatrixMultiply(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_GetStaticCondBlock(), v_Initialise(), v_InitObject(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_InitObject(), and Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_UniqueMap().
|
protected |
Schur complement for Direct Static Condensation.
Definition at line 105 of file GlobalLinSysStaticCond.h.
Referenced by ConstructNextLevelCondensedSystem(), and v_Solve().
|
protected |
Block Schur complement matrix.
Definition at line 107 of file GlobalLinSysStaticCond.h.
Referenced by ConstructNextLevelCondensedSystem(), Nektar::MultiRegions::GlobalLinSysDirectStaticCond::GlobalLinSysDirectStaticCond(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::GlobalLinSysIterativeStaticCond(), Nektar::MultiRegions::GlobalLinSysPETScStaticCond::GlobalLinSysPETScStaticCond(), Nektar::MultiRegions::GlobalLinSysXxtStaticCond::GlobalLinSysXxtStaticCond(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::PrepareLocalSchurComplement(), SetupTopLevel(), Nektar::MultiRegions::GlobalLinSysDirectStaticCond::v_AssembleSchurComplement(), Nektar::MultiRegions::GlobalLinSysXxtStaticCond::v_AssembleSchurComplement(), Nektar::MultiRegions::GlobalLinSysPETScStaticCond::v_AssembleSchurComplement(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_AssembleSchurComplement(), v_GetNumBlocks(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_GetStaticCondBlock(), Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_InitObject(), v_PreSolve(), and Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_PreSolve().
Workspace array for matrix multiplication.
Definition at line 117 of file GlobalLinSysStaticCond.h.
Referenced by Nektar::MultiRegions::GlobalLinSysIterativeStaticCond::v_DoMatrixMultiply(), v_Initialise(), and v_Solve().