DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
|
Base class for non-linear algebraic solver. More...
#include <nonLinearSolver.h>
Public Types | |
enum | ReturnValueType { SUCCESS = 0 , FAILURE , LINESEARCH_FAILED , MAX_ITER_REACHED , RESTART } |
Public Member Functions | |
virtual | ~nonLinearSolver ()=0 |
Destructor. | |
virtual ReturnValueType | solve (nonlinearSolverProblem &problem, const std::string checkpointFileName="", const bool restart=false)=0 |
Solve non-linear algebraic equation. | |
virtual void | save (const std::string &checkpointFileName)=0 |
Protected Member Functions | |
nonLinearSolver (const unsigned int debugLevel, const unsigned int maxNumberIterations, const double tolerance=0) | |
Constructor. | |
double | getTolerance () const |
Get tolerance. | |
unsigned int | getMaximumNumberIterations () const |
Get maximum number of iterations. | |
unsigned int | getDebugLevel () const |
Get debug level. | |
Protected Attributes | |
const unsigned int | d_debugLevel |
controls the verbosity of the printing | |
const unsigned int | d_maxNumberIterations |
maximum number of nonlinear solve iterations | |
const double | d_tolerance |
nonlinear solve stopping tolerance | |
Base class for non-linear algebraic solver.
|
pure virtual |
Destructor.
|
protected |
Constructor.
|
protected |
Get debug level.
|
protected |
Get maximum number of iterations.
|
protected |
Get tolerance.
|
pure virtual |
Implemented in dftfe::BFGSNonLinearSolver, dftfe::cgPRPNonLinearSolver, and dftfe::LBFGSNonLinearSolver.
|
pure virtual |
Solve non-linear algebraic equation.
problem[in] | nonlinearSolverProblem object. |
checkpointFileName[in] | if string is non-empty, creates checkpoint file named checkpointFileName for every nonlinear iteration. |
restart[in] | boolean specifying whether this is a restart solve. |
Implemented in dftfe::BFGSNonLinearSolver, dftfe::cgPRPNonLinearSolver, and dftfe::LBFGSNonLinearSolver.
|
protected |
controls the verbosity of the printing
|
protected |
maximum number of nonlinear solve iterations
|
protected |
nonlinear solve stopping tolerance