50 "NekNonlinSysIterNewton solver.");
58 int inexactNewtonForcing = 0;
59 pSession->LoadParameter(
"InexactNewtonForcing", inexactNewtonForcing, 0);
92 int NttlNonlinIte = 0;
114 m_linsol->SetNekLinSysTolerance(LinSysRelativeIteTol);
117 cout <<
"Newton Non-It=" << NttlNonlinIte
123 <<
" LinSysRelativeIteTol=" << LinSysRelativeIteTol << endl;
124 cout <<
"Will apply Newton correction with Newton Scale = "
135 WARNINGL0(
false,
"Newton step rejected.");
145 " # Nonlinear solver not converge in DoImplicitSolve");
146 cout << right << scientific << setw(nwidthcolm)
147 << setprecision(nwidthcolm - 6)
151 <<
" with " << setw(3) << NttlNonlinIte <<
" Non-Its)" << endl;
154 return NttlNonlinIte;
158 const int ntotal, [[maybe_unused]]
const NekDouble oldResNorm)
166 const int &nIteration,
const NekDouble &resnormOld,
174 if (nIteration == 0 || resnormOld <= 0.0)
#define ASSERTL0(condition, msg)
#define WARNINGL0(condition, msg)
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
Array< OneD, NekDouble > m_Residual
Array< OneD, NekDouble > m_Solution
void v_InitObject() override
Array< OneD, NekDouble > m_SourceVec
NekLinSysIterSharedPtr m_linsol
void ConvergenceCheck(const int nIteration, const Array< OneD, const NekDouble > &Residual)
int m_NekNonlinSysMaxIterations
Array< OneD, NekDouble > m_DeltSltn
NekDouble m_NekLinSysTolerance
virtual bool v_ApplyNewtonUpdate(const int ntotal, const NekDouble oldResNorm)
NekDouble m_forcingEtaMax
int v_SolveSystem(const int nGlobal, const Array< OneD, const NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const int nDir) override
bool m_inexactNewtonForcing
NekDouble m_forcingEtaInit
void v_InitObject() override
static NekNonlinSysIterSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nDimen, const NekSysKey &pKey)
NekNonlinSysIterNewton(const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nDimen, const NekSysKey &pKey)
static std::string className
bool m_haveUpdatedResidual
NekDouble CalcInexactNewtonForcing(const int &nIteration, const NekDouble &resnormOld, const NekDouble &resnorm)
NekDouble m_forcingEtaMin
NekSysOperators m_operator
NekDouble m_rhs_magnitude
void DoNekSysResEval(InArrayType &inarray, OutArrayType &outarray, const bool &flag=false) const
NekNonlinSysIterFactory & GetNekNonlinSysIterFactory()
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
void Svtvp(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Svtvp (scalar times vector plus vector): z = alpha*x + y.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
scalarT< T > sqrt(scalarT< T > in)