81 boost::ignore_unused(factor);
88 int ntotal = nGlobal - nDir;
93 int NttlNonlinIte = 0;
94 for (; NttlNonlinIte <
m_maxiter; ++NttlNonlinIte)
121 " # Nonlinear solver not converge in DoImplicitSolve");
122 cout << right << scientific << setw(nwidthcolm)
123 << setprecision(nwidthcolm - 6)
126 <<
" with " << setw(3) << NttlNonlinIte <<
" Non-Its)" << endl;
129 return NttlNonlinIte;
136 bool converged =
false;
138 int ntotal = Residual.size();
181 boost::ignore_unused(pInput);
183 ASSERTL0(0 == nDir,
"0 != nDir not tested");
#define ASSERTL0(condition, msg)
#define WARNINGL0(condition, msg)
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
NekDouble m_NonlinIterTolRelativeL2
Array< OneD, NekDouble > m_Residual
NekDouble m_LinSysRelativeTolInNonlin
Array< OneD, NekDouble > m_DeltSltn
Array< OneD, NekDouble > m_SourceVec
NekLinSysIterSharedPtr m_linsol
Array< OneD, NekDouble > m_Solution
static NekNonlinSysSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nDimen, const NekSysKey &pKey)
virtual void v_SetupNekNonlinSystem(const int nGlobal, const Array< OneD, const NekDouble > &pInput, const Array< OneD, const NekDouble > &pSource, const int nDir) override
NekDouble CalcInexactNewtonForcing(const int &k, const NekDouble &resnormOld, const NekDouble &resnorm)
NekNonlinSysNewton(const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nscale, const NekSysKey &pKey)
virtual void v_InitObject() override
static std::string className
virtual int v_SolveSystem(const int nGlobal, const Array< OneD, const NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const int nDir, const NekDouble tol, const NekDouble factor) override
bool m_InexactNewtonForcing
virtual bool v_ConvergenceCheck(const int nIteration, const Array< OneD, const NekDouble > &Residual, const NekDouble tol) override
bool m_root
Root if parallel.
LibUtilities::CommSharedPtr m_rowComm
Communicate.
virtual void v_InitObject()
NekSysOperators m_operator
Operators.
int m_SysDimen
The dimension of the system.
bool m_converged
Whether the iteration has been converged.
int m_maxiter
Maximum iterations.
void DoNekSysResEval(InArrayType &inarray, OutArrayType &outarray, const bool &flag=false) const
NekNonlinSysFactory & GetNekNonlinSysFactory()
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
The above copyright notice and this permission notice shall be included.
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)
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
scalarT< T > sqrt(scalarT< T > in)