60 :
NekSys(pSession, vRowComm, 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")
86 pSession->LoadParameter(
"NekLinSysMaxIterations",
m_maxiter,
90 if (pSession->DefinesGlobalSysSolnInfo(variable,
"LinSysMaxStorage"))
93 pSession->GetGlobalSysSolnInfo(variable,
"LinSysMaxStorage")
117 int nmap = map.size();
118 if (
m_map.size() != nmap)
133 if (
m_map.size() > 0)
144 NekDouble new_rhs_mag = (vExchange > 1.0e-6) ? vExchange : 1.0;
163 vExchange[0] =
Vmath::Dot(pIn.size(), wk, pIn);
170 NekDouble new_rhs_mag = (vExchange[0] > 1e-6) ? vExchange[0] : 1.0;
Provides a generic Factory class.
virtual void v_InitObject() override
NekDouble m_rhs_magnitude
Dot product of rhs to normalise stopping criterion.
void Set_Rhs_Magnitude(const NekVector< NekDouble > &pIn)
NekLinSysIter(const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nDimen, const NekSysKey &pKey)
Array< OneD, int > m_map
Global to universal unique map.
void setUniversalUniqueMap()
LibUtilities::CommSharedPtr m_rowComm
Communicate.
virtual void v_InitObject()
NekDouble m_tolerance
Tolerance of iterative solver.
NekSysOperators m_operator
Operators.
int m_SysDimen
The dimension of the system.
int m_maxiter
Maximum iterations.
NekDouble m_NekLinSysTolerance
int m_NekLinSysMaxIterations
void DoAssembleLoc(InArrayType &xn, OutArrayType &xn1, const bool &flag=false) const
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)
dot2 (vector times vector times vector): z = w*x*y
T Dot(int n, const T *w, const T *x)
dot (vector times vector): z = w*x
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)