Nektar++
|
A global linear system. More...
#include <GlobalLinSysPETScFull.h>
Public Member Functions | |
GlobalLinSysPETScFull (const GlobalLinSysKey &pLinSysKey, const boost::weak_ptr< ExpList > &pExpList, const boost::shared_ptr< AssemblyMap > &pLocToGloMap) | |
Constructor for full direct matrix solve. More... | |
virtual | ~GlobalLinSysPETScFull () |
Public Member Functions inherited from Nektar::MultiRegions::GlobalLinSysPETSc | |
GlobalLinSysPETSc (const GlobalLinSysKey &pKey, const boost::weak_ptr< ExpList > &pExp, const boost::shared_ptr< AssemblyMap > &pLocToGloMap) | |
Constructor for full direct matrix solve. More... | |
virtual | ~GlobalLinSysPETSc () |
virtual void | v_SolveLinearSystem (const int pNumRows, const Array< OneD, const NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const AssemblyMapSharedPtr &locToGloMap, const int pNumDir) |
Solve linear system using PETSc. More... | |
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. More... | |
virtual | ~GlobalLinSys () |
const GlobalLinSysKey & | GetKey (void) const |
Returns the key associated with the system. More... | |
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. More... | |
boost::shared_ptr< GlobalLinSys > | GetSharedThisPtr () |
Returns a shared pointer to the current object. More... | |
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. More... | |
Static Public Member Functions | |
static GlobalLinSysSharedPtr | create (const GlobalLinSysKey &pLinSysKey, const boost::weak_ptr< ExpList > &pExpList, const boost::shared_ptr< AssemblyMap > &pLocToGloMap) |
Creates an instance of this class. More... | |
Static Public Attributes | |
static std::string | className |
Name of class. More... | |
Private Member Functions | |
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. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Nektar::MultiRegions::GlobalLinSysPETSc | |
void | SetUpScatter () |
Set up PETSc local (equivalent to Nektar++ global) and global (equivalent to universal) scatter maps. More... | |
void | SetUpMatVec () |
Construct PETSc matrix and vector handles. More... | |
void | SetUpSolver (NekDouble tolerance) |
Set up KSP solver object. More... | |
void | CalculateReordering (const Array< OneD, const int > &glo2uniMap, const Array< OneD, const int > &glo2unique, const AssemblyMapSharedPtr &pLocToGloMap) |
Calculate a reordering of universal IDs for PETSc. More... | |
Protected Member Functions inherited from Nektar::MultiRegions::GlobalLinSys | |
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 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... | |
Protected Attributes inherited from Nektar::MultiRegions::GlobalLinSysPETSc | |
Mat | m_matrix |
Vec | m_x |
Vec | m_b |
Vec | m_locVec |
KSP | m_ksp |
vector< int > | m_reorderedMap |
VecScatter | m_ctx |
int | m_nLocal |
Protected Attributes inherited from Nektar::MultiRegions::GlobalLinSys | |
const GlobalLinSysKey | m_linSysKey |
Key associated with this linear system. More... | |
const boost::weak_ptr< ExpList > | m_expList |
Local Matrix System. More... | |
const map< int, RobinBCInfoSharedPtr > | m_robinBCInfo |
Robin boundary info. More... | |
A global linear system.
Definition at line 53 of file GlobalLinSysPETScFull.h.
Nektar::MultiRegions::GlobalLinSysPETScFull::GlobalLinSysPETScFull | ( | const GlobalLinSysKey & | pLinSysKey, |
const boost::weak_ptr< ExpList > & | pExpList, | ||
const boost::shared_ptr< AssemblyMap > & | pLocToGloMap | ||
) |
Constructor for full direct matrix solve.
Definition at line 61 of file GlobalLinSysPETScFull.cpp.
References Nektar::MultiRegions::GlobalLinSysPETSc::CalculateReordering(), Nektar::MultiRegions::GlobalLinSys::GetBlock(), Nektar::MultiRegions::GlobalLinSys::m_expList, Nektar::MultiRegions::GlobalLinSysPETSc::m_matrix, Nektar::MultiRegions::GlobalLinSysPETSc::m_reorderedMap, Nektar::MultiRegions::GlobalLinSysPETSc::SetUpMatVec(), Nektar::MultiRegions::GlobalLinSysPETSc::SetUpScatter(), and Nektar::MultiRegions::GlobalLinSysPETSc::SetUpSolver().
|
virtual |
Definition at line 125 of file GlobalLinSysPETScFull.cpp.
|
inlinestatic |
Creates an instance of this class.
Definition at line 58 of file GlobalLinSysPETScFull.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr().
|
privatevirtual |
Solve the linear system for given input and output vectors using a specified local to global map.
Solve the linear system using a full global matrix system.
Implements Nektar::MultiRegions::GlobalLinSys.
Definition at line 134 of file GlobalLinSysPETScFull.cpp.
References Nektar::MultiRegions::eGlobal, Nektar::MultiRegions::GlobalLinSys::m_expList, Nektar::MultiRegions::GlobalLinSys::m_linSysKey, Nektar::LibUtilities::ReduceSum, Nektar::MultiRegions::GlobalLinSys::SolveLinearSystem(), Vmath::Vadd(), and Vmath::Vsub().
|
static |
Name of class.
Registers the class with the Factory.
Definition at line 68 of file GlobalLinSysPETScFull.h.