43 namespace LibUtilities
 
   50 string NekNonlinSysNewton::className =
 
   52         "Newton", NekNonlinSysNewton::create, 
"NekNonlinSysNewton solver.");
 
   54 NekNonlinSysNewton::NekNonlinSysNewton(
 
   82     boost::ignore_unused(factor);
 
   91     int ntotal      = nGlobal - nDir;
 
   94     int NttlNonlinIte = 0;
 
  106                                  LinSysRelativeIteTol);
 
  122                   "     # Nonlinear solver not converge in DoImplicitSolve");
 
  123         cout << right << scientific << setw(nwidthcolm)
 
  124              << setprecision(nwidthcolm - 6)
 
  127              << 
" with " << setw(3) << NttlNonlinIte << 
" Non-Its)" << endl;
 
  131     return NttlNonlinIte;
 
  138     bool converged     = 
false;
 
  140     int ntotal         = Residual.size();
 
  172         resnormOld = resnorm;
 
  198                 forcing = max(forcing, 1.0E-6);
 
  209     boost::ignore_unused(nGlobal, nDir);
 
  211     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
virtual void v_SetupNekNonlinSystem(const int nGlobal, const Array< OneD, const NekDouble > &pInput, const Array< OneD, const NekDouble > &pSource, const int nDir) override
void CalcInexactNewtonForcing(const int &k, NekDouble &resnormOld, const NekDouble &resnorm, NekDouble &forcing)
virtual void v_InitObject() override
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
int 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.
virtual void v_InitObject()
NekSysOperators m_operator
Operators.
int m_SysDimen
The dimension of the system.
LibUtilities::CommSharedPtr m_Comm
Communicate.
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)