34 #ifndef NEKTAR_LIB_MULTIREGIONS_GLOBALLINSYSITERATIVE_H
35 #define NEKTAR_LIB_MULTIREGIONS_GLOBALLINSYSITERATIVE_H
44 namespace MultiRegions
56 const std::weak_ptr<ExpList> &pExpList,
57 const std::shared_ptr<AssemblyMap> &pLocToGloMap);
116 const bool isAconjugate);
124 const int pGlobalBndDofs,
126 const int pNumDirBndDofs,
127 const bool isAconjugate);
134 const bool &controlFlag)
136 boost::ignore_unused(controlFlag);
144 const bool &controlFlag)
146 boost::ignore_unused(controlFlag);
148 m_precon->DoPreconditioner(pInput, pOutput);
#define MULTI_REGIONS_EXPORT
GlobalLinSysIterative(const GlobalLinSysKey &pKey, const std::weak_ptr< ExpList > &pExpList, const std::shared_ptr< AssemblyMap > &pLocToGloMap)
Constructor for full direct matrix solve.
static std::string IteratSolverdef
Array< OneD, int > m_ipivot
std::vector< Array< OneD, NekDouble > > m_prevBasis
LibUtilities::NekLinSysIterSharedPtr m_linsol
PreconditionerSharedPtr m_precon
void DoProjection(const int pNumRows, const Array< OneD, const NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const int pNumDir, const NekDouble tol, const bool isAconjugate)
projection technique
void UpdateKnownSolutions(const int pGlobalBndDofs, const Array< OneD, const NekDouble > &pSolution, const int pNumDirBndDofs, const bool isAconjugate)
Array< OneD, NekDouble > m_coeffMatrixFactor
int ResetKnownSolutionsToLatestOne()
std::vector< Array< OneD, NekDouble > > m_prevLinSol
Storage for solutions to previous linear problems.
void DoMatrixMultiplyFlag(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const bool &controlFlag)
static std::string IteratSolverlookupIds[]
virtual ~GlobalLinSysIterative()
virtual void v_DoMatrixMultiply(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput)=0
bool m_useProjection
Whether to apply projection technique.
NekDouble m_tolerance
Tolerance of iterative solver.
virtual void v_UniqueMap()=0
void DoPreconditionerFlag(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const bool &controlFlag)
Array< OneD, int > m_map
Global to universal unique map.
NekDouble m_rhs_magnitude
dot product of rhs to normalise stopping criterion
DNekMatSharedPtr m_coeffMatrix
LibUtilities::NekSysOperators m_NekSysOp
virtual void v_SolveLinearSystem(const int pNumRows, const Array< OneD, const NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const AssemblyMapSharedPtr &locToGloMap, const int pNumDir)
Solve the matrix system.
MultiRegions::PreconditionerType m_precontype
std::string m_linSysIterSolver
Iterative solver: Conjugate Gradient, GMRES.
void Set_Rhs_Magnitude(const NekVector< NekDouble > &pIn)
int m_maxiter
maximum iterations
bool m_root
Root if parallel.
NekDouble m_rhs_mag_sm
cnt to how many times rhs_magnitude is called
Describe a linear system.
std::shared_ptr< NekLinSysIter > NekLinSysIterSharedPtr
std::shared_ptr< Preconditioner > PreconditionerSharedPtr
std::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
The above copyright notice and this permission notice shall be included.
std::shared_ptr< DNekMat > DNekMatSharedPtr