Nektar++
|
A global linear system. More...
#include <GlobalLinSysIterativeFull.h>
Public Member Functions | |
GlobalLinSysIterativeFull (const GlobalLinSysKey &pLinSysKey, const boost::weak_ptr< ExpList > &pExpList, const boost::shared_ptr< AssemblyMap > &pLocToGloMap) | |
Constructor for full direct matrix solve. | |
virtual | ~GlobalLinSysIterativeFull () |
Public Member Functions inherited from Nektar::MultiRegions::GlobalLinSysIterative | |
GlobalLinSysIterative (const GlobalLinSysKey &pKey, const boost::weak_ptr< ExpList > &pExpList, const boost::shared_ptr< AssemblyMap > &pLocToGloMap) | |
Constructor for full direct matrix solve. | |
virtual | ~GlobalLinSysIterative () |
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. |
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. |
Static Public Attributes | |
static std::string | className |
Name of class. |
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. | |
virtual void | v_DoMatrixMultiply (const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput) |
virtual void | v_UniqueMap () |
Private Attributes | |
boost::shared_ptr< AssemblyMap > | m_locToGloMap |
Additional Inherited Members | |
Protected Member Functions inherited from Nektar::MultiRegions::GlobalLinSysIterative | |
void | DoAconjugateProjection (const int pNumRows, const Array< OneD, const NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const AssemblyMapSharedPtr &locToGloMap, const int pNumDir) |
A-conjugate projection technique. | |
void | DoConjugateGradient (const int pNumRows, const Array< OneD, const NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const AssemblyMapSharedPtr &locToGloMap, const int pNumDir) |
Actual iterative solve. | |
void | Set_Rhs_Magnitude (const NekVector< NekDouble > &pIn) |
virtual void | v_UniqueMap ()=0 |
Protected Attributes inherited from Nektar::MultiRegions::GlobalLinSysIterative | |
Array< OneD, int > | m_map |
Global to universal unique map. | |
NekDouble | m_tolerance |
Tolerance of iterative solver. | |
NekDouble | m_rhs_magnitude |
dot product of rhs to normalise stopping criterion | |
PreconditionerSharedPtr | m_precon |
MultiRegions::PreconditionerType | m_precontype |
int | m_totalIterations |
bool | m_useProjection |
Whether to apply projection technique. | |
bool | m_root |
Provide verbose output and root if parallel. | |
bool | m_verbose |
boost::circular_buffer< Array < OneD, NekDouble > > | m_prevLinSol |
Storage for solutions to previous linear problems. | |
int | m_numPrevSols |
Total counter of previous solutions. |
A global linear system.
Definition at line 48 of file GlobalLinSysIterativeFull.h.
Nektar::MultiRegions::GlobalLinSysIterativeFull::GlobalLinSysIterativeFull | ( | const GlobalLinSysKey & | pKey, |
const boost::weak_ptr< ExpList > & | pExp, | ||
const boost::shared_ptr< AssemblyMap > & | pLocToGloMap | ||
) |
Constructor for full direct matrix solve.
Constructor for full direct matrix solve.
pKey | Key specifying matrix to solve. |
pExp | Shared pointer to expansion list for applying matrix evaluations. |
pLocToGloMap | Local to global mapping. |
Definition at line 69 of file GlobalLinSysIterativeFull.cpp.
References ASSERTL1, Nektar::MultiRegions::eIterativeFull, Nektar::MultiRegions::GlobalLinSysKey::GetGlobalSysSolnType(), and Nektar::MultiRegions::GlobalLinSys::m_linSysKey.
|
virtual |
Definition at line 85 of file GlobalLinSysIterativeFull.cpp.
|
inlinestatic |
Creates an instance of this class.
Definition at line 52 of file GlobalLinSysIterativeFull.h.
|
privatevirtual |
Definition at line 183 of file GlobalLinSysIterativeFull.cpp.
References ASSERTL0, Nektar::MultiRegions::eGlobal, Nektar::eWrapper, Nektar::MultiRegions::GlobalLinSys::m_expList, Nektar::MultiRegions::GlobalLinSys::m_linSysKey, m_locToGloMap, Vmath::Vadd(), and Vmath::Zero().
|
privatevirtual |
Solve the linear system for given input and output vectors using a specified local to global map.
Solve a global linear system with Dirichlet forcing using a conjugate gradient method. This routine performs handling of the Dirichlet forcing terms and wraps the underlying iterative solver used for the remaining degrees of freedom.
Consider solving for , the matrix system , where is known. To enforce the Dirichlet terms we instead solve
where is the Dirichlet forcing.
pInput | RHS of linear system, . |
pOutput | On input, values of dirichlet degrees of freedom with initial guess on other values. On output, the solution . |
pLocToGloMap | Local to global mapping. |
pDirForcing | Precalculated Dirichlet forcing. |
Definition at line 109 of file GlobalLinSysIterativeFull.cpp.
References ASSERTL0, Nektar::MultiRegions::eGlobal, Nektar::MultiRegions::GlobalLinSys::m_expList, Nektar::MultiRegions::GlobalLinSys::m_linSysKey, m_locToGloMap, Nektar::LibUtilities::ReduceSum, Nektar::MultiRegions::GlobalLinSys::SolveLinearSystem(), Vmath::Vadd(), Vmath::Vcopy(), and Vmath::Vsub().
|
privatevirtual |
Definition at line 251 of file GlobalLinSysIterativeFull.cpp.
References m_locToGloMap, and Nektar::MultiRegions::GlobalLinSysIterative::m_map.
|
static |
Name of class.
Registers the class with the Factory.
Definition at line 63 of file GlobalLinSysIterativeFull.h.
|
private |
Definition at line 76 of file GlobalLinSysIterativeFull.h.
Referenced by v_DoMatrixMultiply(), v_Solve(), and v_UniqueMap().