43 namespace LibUtilities
56 NekLinSysIter::NekLinSysIter(
60 :
NekSys(pSession, vComm, nDimen, pKey)
62 std::vector<std::string> variables(1);
63 variables[0] = pSession->GetVariable(0);
64 string variable = variables[0];
66 if (pSession->DefinesGlobalSysSolnInfo(variable,
"NekLinSysTolerance"))
69 pSession->GetGlobalSysSolnInfo(variable,
"NekLinSysTolerance")
74 pSession->LoadParameter(
"NekLinSysTolerance",
m_tolerance,
78 if (pSession->DefinesGlobalSysSolnInfo(variable,
"NekLinSysMaxIterations"))
81 pSession->GetGlobalSysSolnInfo(variable,
"NekLinSysMaxIterations").c_str());
85 pSession->LoadParameter(
"NekLinSysMaxIterations",
m_maxiter,
89 if (pSession->DefinesGlobalSysSolnInfo(variable,
"LinSysMaxStorage"))
92 pSession->GetGlobalSysSolnInfo(variable,
"LinSysMaxStorage")
115 int nmap = map.size();
116 if (
m_map.size() != nmap)
131 if (
m_map.size() > 0)
142 NekDouble new_rhs_mag = (vExchange[0] > 1e-6) ? vExchange[0] : 1.0;
Provides a generic Factory class.
NekDouble m_rhs_magnitude
Dot product of rhs to normalise stopping criterion.
void Set_Rhs_Magnitude(const NekVector< NekDouble > &pIn)
virtual void v_InitObject()
Array< OneD, int > m_map
Global to universal unique map.
void setUniversalUniqueMap()
virtual void v_InitObject()
NekDouble m_tolerance
Tolerance of iterative solver.
int m_SysDimen
The dimension of the system.
LibUtilities::CommSharedPtr m_Comm
Communicate.
int m_maxiter
Maximum iterations.
NekDouble m_NekLinSysTolerance
int m_NekLinSysMaxIterations
unsigned int GetDimension() const
Returns the number of dimensions for the point.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
NekLinSysIterFactory & GetNekLinSysIterFactory()
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
static const NekDouble kNekUnsetDouble
The above copyright notice and this permission notice shall be included.
T Dot2(int n, const T *w, const T *x, const int *y)
vvtvp (vector times vector times vector): z = w*x*y
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)