50 "NekNonlinSysIterNewton solver.");
82 int NttlNonlinIte = 0;
97 m_linsol->SetNekLinSysTolerance(LinSysRelativeIteTol);
110 " # Nonlinear solver not converge in DoImplicitSolve");
111 cout << right << scientific << setw(nwidthcolm)
112 << setprecision(nwidthcolm - 6)
116 <<
" with " << setw(3) << NttlNonlinIte <<
" Non-Its)" << endl;
119 return NttlNonlinIte;
123 const int &nIteration,
const NekDouble &resnormOld,
132 static const NekDouble forcingGamma = 1.0;
133 static const NekDouble forcingAlpha = 0.5 * (1.0 +
sqrt(5.0));
135 forcingGamma * pow((resnorm / resnormOld), forcingAlpha);
#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
int v_SolveSystem(const int nGlobal, const Array< OneD, const NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const int nDir) override
void v_InitObject() override
static NekNonlinSysIterSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nDimen, const NekSysKey &pKey)
static std::string className
NekDouble CalcInexactNewtonForcing(const int &nIteration, const NekDouble &resnormOld, const NekDouble &resnorm)
NekNonlinSysIterNewton(const LibUtilities::SessionReaderSharedPtr &pSession, const LibUtilities::CommSharedPtr &vRowComm, const int nscale, const NekSysKey &pKey)
bool m_InexactNewtonForcing
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 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)