Nektar++
|
A global linear system. More...
#include <GlobalLinSysXxtStaticCond.h>
Public Member Functions | |
GlobalLinSysXxtStaticCond (const GlobalLinSysKey &mkey, const std::weak_ptr< ExpList > &pExpList, const std::shared_ptr< AssemblyMap > &locToGloMap) | |
Constructor for full direct matrix solve. More... | |
GlobalLinSysXxtStaticCond (const GlobalLinSysKey &mkey, const std::weak_ptr< ExpList > &pExpList, const DNekScalBlkMatSharedPtr pSchurCompl, const DNekScalBlkMatSharedPtr pBinvD, const DNekScalBlkMatSharedPtr pC, const DNekScalBlkMatSharedPtr pInvD, const std::shared_ptr< AssemblyMap > &locToGloMap) | |
Constructor for full direct matrix solve. More... | |
~GlobalLinSysXxtStaticCond () override | |
Public Member Functions inherited from Nektar::MultiRegions::GlobalLinSysXxt | |
GlobalLinSysXxt (const GlobalLinSysKey &pKey, const std::weak_ptr< ExpList > &pExp, const std::shared_ptr< AssemblyMap > &pLocToGloMap) | |
Constructor for full direct matrix solve. More... | |
~GlobalLinSysXxt () 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 GlobalLinSysKey & | GetKey (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< GlobalLinSys > | GetSharedThisPtr () |
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... | |
Public Member Functions inherited from Nektar::MultiRegions::GlobalLinSysStaticCond | |
GlobalLinSysStaticCond (const GlobalLinSysKey &mkey, const std::weak_ptr< ExpList > &pExpList, const std::shared_ptr< AssemblyMap > &locToGloMap) | |
Constructor for full direct matrix solve. More... | |
~GlobalLinSysStaticCond () override | |
Static Public Member Functions | |
static GlobalLinSysSharedPtr | create (const GlobalLinSysKey &pLinSysKey, const std::weak_ptr< ExpList > &pExpList, const std::shared_ptr< AssemblyMap > &pLocToGloMap) |
Creates an instance of this class. More... | |
Static Public Attributes | |
static std::string | className |
Name of class. More... | |
static std::string | className2 |
Protected Member Functions | |
void | v_AssembleSchurComplement (std::shared_ptr< AssemblyMap > locToGloMap) override |
Assemble the Schur complement matrix. More... | |
GlobalLinSysStaticCondSharedPtr | v_Recurse (const GlobalLinSysKey &mkey, const std::weak_ptr< ExpList > &pExpList, const DNekScalBlkMatSharedPtr pSchurCompl, const DNekScalBlkMatSharedPtr pBinvD, const DNekScalBlkMatSharedPtr pC, const DNekScalBlkMatSharedPtr pInvD, const std::shared_ptr< AssemblyMap > &locToGloMap) override |
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... | |
Protected Member Functions inherited from Nektar::MultiRegions::GlobalLinSysStaticCond | |
virtual void | v_PreSolve (int scLevel, Array< OneD, NekDouble > &F_bnd) |
virtual void | v_BasisFwdTransform (Array< OneD, NekDouble > &pInOut) |
virtual void | v_CoeffsBwdTransform (Array< OneD, NekDouble > &pInOut) |
virtual void | v_CoeffsFwdTransform (const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput) |
virtual void | v_AssembleSchurComplement (std::shared_ptr< AssemblyMap > pLoctoGloMap) |
int | v_GetNumBlocks () override |
Get the number of blocks in this system. More... | |
virtual GlobalLinSysStaticCondSharedPtr | v_Recurse (const GlobalLinSysKey &mkey, const std::weak_ptr< ExpList > &pExpList, const DNekScalBlkMatSharedPtr pSchurCompl, const DNekScalBlkMatSharedPtr pBinvD, const DNekScalBlkMatSharedPtr pC, const DNekScalBlkMatSharedPtr pInvD, const std::shared_ptr< AssemblyMap > &locToGloMap)=0 |
void | v_Solve (const Array< OneD, const NekDouble > &in, Array< OneD, NekDouble > &out, const AssemblyMapSharedPtr &locToGloMap, const Array< OneD, const NekDouble > &dirForcing=NullNekDouble1DArray) override |
Solve the linear system for given input and output vectors using a specified local to global map. More... | |
void | v_InitObject () override |
void | v_Initialise (const std::shared_ptr< AssemblyMap > &locToGloMap) override |
Initialise this object. More... | |
void | SetupTopLevel (const std::shared_ptr< AssemblyMap > &locToGloMap) |
Set up the storage for the Schur complement or the top level of the multi-level Schur complement. More... | |
void | ConstructNextLevelCondensedSystem (const std::shared_ptr< AssemblyMap > &locToGloMap) |
Private Member Functions | |
void | v_SolveLinearSystem (const int pNumRows, const Array< OneD, const NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const AssemblyMapSharedPtr &locToGloMap, const int pNumDir) override |
Solve the linear system for given input and output vectors. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Nektar::MultiRegions::GlobalLinSysXxt | |
struct Xxt::crs_data * | m_crsData |
Array< OneD, unsigned int > | m_Ai |
Array< OneD, unsigned int > | m_Aj |
Array< OneD, double > | m_Ar |
Protected Attributes inherited from Nektar::MultiRegions::GlobalLinSys | |
const GlobalLinSysKey | m_linSysKey |
Key associated with this linear system. More... | |
const std::weak_ptr< ExpList > | m_expList |
Local Matrix System. More... | |
const std::map< int, RobinBCInfoSharedPtr > | m_robinBCInfo |
Robin boundary info. More... | |
bool | m_verbose |
Protected Attributes inherited from Nektar::MultiRegions::GlobalLinSysStaticCond | |
GlobalLinSysStaticCondSharedPtr | m_recursiveSchurCompl |
Schur complement for Direct Static Condensation. More... | |
DNekScalBlkMatSharedPtr | m_schurCompl |
Block Schur complement matrix. More... | |
DNekScalBlkMatSharedPtr | m_BinvD |
Block \( BD^{-1} \) matrix. More... | |
DNekScalBlkMatSharedPtr | m_C |
Block \( C \) matrix. More... | |
DNekScalBlkMatSharedPtr | m_invD |
Block \( D^{-1} \) matrix. More... | |
std::weak_ptr< AssemblyMap > | m_locToGloMap |
Local to global map. More... | |
Array< OneD, NekDouble > | m_wsp |
Workspace array for matrix multiplication. More... | |
Array< OneD, const NekDouble > | m_sign |
A global linear system.
Definition at line 55 of file GlobalLinSysXxtStaticCond.h.
Nektar::MultiRegions::GlobalLinSysXxtStaticCond::GlobalLinSysXxtStaticCond | ( | const GlobalLinSysKey & | pKey, |
const std::weak_ptr< ExpList > & | pExpList, | ||
const std::shared_ptr< AssemblyMap > & | pLocToGloMap | ||
) |
Constructor for full direct matrix solve.
For a matrix system of the form
\[ \left[ \begin{array}{cc} \boldsymbol{A} & \boldsymbol{B}\\ \boldsymbol{C} & \boldsymbol{D} \end{array} \right] \left[ \begin{array}{c} \boldsymbol{x_1}\\ \boldsymbol{x_2} \end{array}\right] = \left[ \begin{array}{c} \boldsymbol{y_1}\\ \boldsymbol{y_2} \end{array}\right], \]
where \(\boldsymbol{D}\) and \((\boldsymbol{A-BD^{-1}C})\) 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 81 of file GlobalLinSysXxtStaticCond.cpp.
References ASSERTL1, Nektar::MultiRegions::eXxtMultiLevelStaticCond, Nektar::MultiRegions::eXxtStaticCond, and Nektar::MultiRegions::GlobalLinSysKey::GetGlobalSysSolnType().
Nektar::MultiRegions::GlobalLinSysXxtStaticCond::GlobalLinSysXxtStaticCond | ( | const GlobalLinSysKey & | mkey, |
const std::weak_ptr< ExpList > & | pExpList, | ||
const DNekScalBlkMatSharedPtr | pSchurCompl, | ||
const DNekScalBlkMatSharedPtr | pBinvD, | ||
const DNekScalBlkMatSharedPtr | pC, | ||
const DNekScalBlkMatSharedPtr | pInvD, | ||
const std::shared_ptr< AssemblyMap > & | locToGloMap | ||
) |
Constructor for full direct matrix solve.
Definition at line 101 of file GlobalLinSysXxtStaticCond.cpp.
References Nektar::MultiRegions::GlobalLinSysStaticCond::m_BinvD, Nektar::MultiRegions::GlobalLinSysStaticCond::m_C, Nektar::MultiRegions::GlobalLinSysStaticCond::m_invD, Nektar::MultiRegions::GlobalLinSysStaticCond::m_locToGloMap, and Nektar::MultiRegions::GlobalLinSysStaticCond::m_schurCompl.
|
override |
Definition at line 121 of file GlobalLinSysXxtStaticCond.cpp.
|
inlinestatic |
Creates an instance of this class.
Definition at line 60 of file GlobalLinSysXxtStaticCond.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and CellMLToNektar.cellml_metadata::p.
|
overrideprotectedvirtual |
Assemble the Schur complement matrix.
Construct the local matrix row index, column index and value index arrays and initialize the XXT data structure with this information.
locToGloMap | Local to global mapping information. |
Reimplemented from Nektar::MultiRegions::GlobalLinSysStaticCond.
Definition at line 130 of file GlobalLinSysXxtStaticCond.cpp.
References Xxt::Init(), Nektar::MultiRegions::GlobalLinSysXxt::m_Ai, Nektar::MultiRegions::GlobalLinSysXxt::m_Aj, Nektar::MultiRegions::GlobalLinSysXxt::m_Ar, Nektar::MultiRegions::GlobalLinSysXxt::m_crsData, Nektar::MultiRegions::GlobalLinSys::m_expList, Nektar::MultiRegions::GlobalLinSysStaticCond::m_schurCompl, Nektar::MultiRegions::GlobalLinSys::m_verbose, and Xxt::nektar_crs_stats().
|
overrideprotectedvirtual |
Implements Nektar::MultiRegions::GlobalLinSysStaticCond.
Definition at line 213 of file GlobalLinSysXxtStaticCond.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr().
|
overrideprivatevirtual |
Solve the linear system for given input and output vectors.
Implements Nektar::MultiRegions::GlobalLinSys.
Definition at line 228 of file GlobalLinSysXxtStaticCond.cpp.
References Nektar::MultiRegions::GlobalLinSysXxt::m_crsData, Xxt::Solve(), Vmath::Vmul(), and Vmath::Zero().
|
static |
Name of class.
Registers the class with the Factory.
Definition at line 73 of file GlobalLinSysXxtStaticCond.h.
|
static |
Definition at line 74 of file GlobalLinSysXxtStaticCond.h.