DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
dftfe::nonLinearSolver Class Referenceabstract

Base class for non-linear algebraic solver. More...

#include <nonLinearSolver.h>

Inheritance diagram for dftfe::nonLinearSolver:
dftfe::BFGSNonLinearSolver dftfe::LBFGSNonLinearSolver dftfe::cgPRPNonLinearSolver

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
 

Detailed Description

Base class for non-linear algebraic solver.

Author
Sambit Das

Member Enumeration Documentation

◆ ReturnValueType

Enumerator
SUCCESS 
FAILURE 
LINESEARCH_FAILED 
MAX_ITER_REACHED 
RESTART 

Constructor & Destructor Documentation

◆ ~nonLinearSolver()

virtual dftfe::nonLinearSolver::~nonLinearSolver ( )
pure virtual

Destructor.

◆ nonLinearSolver()

dftfe::nonLinearSolver::nonLinearSolver ( const unsigned int debugLevel,
const unsigned int maxNumberIterations,
const double tolerance = 0 )
protected

Constructor.

Member Function Documentation

◆ getDebugLevel()

unsigned int dftfe::nonLinearSolver::getDebugLevel ( ) const
protected

Get debug level.

Returns
Debug level.

◆ getMaximumNumberIterations()

unsigned int dftfe::nonLinearSolver::getMaximumNumberIterations ( ) const
protected

Get maximum number of iterations.

Returns
Maximum number of iterations.

◆ getTolerance()

double dftfe::nonLinearSolver::getTolerance ( ) const
protected

Get tolerance.

Returns
Value of the tolerance.

◆ save()

virtual void dftfe::nonLinearSolver::save ( const std::string & checkpointFileName)
pure virtual

◆ solve()

virtual ReturnValueType dftfe::nonLinearSolver::solve ( nonlinearSolverProblem & problem,
const std::string checkpointFileName = "",
const bool restart = false )
pure virtual

Solve non-linear algebraic equation.

Parameters
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.
Returns
Return value indicating success or failure.

Implemented in dftfe::BFGSNonLinearSolver, dftfe::cgPRPNonLinearSolver, and dftfe::LBFGSNonLinearSolver.

Member Data Documentation

◆ d_debugLevel

const unsigned int dftfe::nonLinearSolver::d_debugLevel
protected

controls the verbosity of the printing

◆ d_maxNumberIterations

const unsigned int dftfe::nonLinearSolver::d_maxNumberIterations
protected

maximum number of nonlinear solve iterations

◆ d_tolerance

const double dftfe::nonLinearSolver::d_tolerance
protected

nonlinear solve stopping tolerance


The documentation for this class was generated from the following file: