DFT-EFE
 
Loading...
Searching...
No Matches
dftefe::linearAlgebra::NewtonRaphsonSolver< ValueType > Class Template Reference

A class that implements the Newton-Raphson solver to find root of a function. More...

#include <NewtonRaphsonSolver.h>

Public Member Functions

 NewtonRaphsonSolver (const size_type maxIter, const double tolerance, const double forceTolerance)
 Constructor. More...
 
 ~NewtonRaphsonSolver ()=default
 Default Destructor. More...
 
NewtonRaphsonError solve (NewtonRaphsonSolverFunction< ValueType > &newtonRaphsonSolverFunction)
 Function that initiates the NR solve. More...
 
ValueType getResidual ()
 

Private Attributes

size_type d_maxIter
 
double d_tolerance
 
double d_forceTolerance
 
ValueType d_residual
 
bool d_isSolved
 

Detailed Description

template<typename ValueType>
class dftefe::linearAlgebra::NewtonRaphsonSolver< ValueType >

A class that implements the Newton-Raphson solver to find root of a function.

Template Parameters
ValueTypeThe datatype (float, double, complex<double>, etc.)

Constructor & Destructor Documentation

◆ NewtonRaphsonSolver()

template<typename ValueType >
dftefe::linearAlgebra::NewtonRaphsonSolver< ValueType >::NewtonRaphsonSolver ( const size_type  maxIter,
const double  tolerance,
const double  forceTolerance 
)

Constructor.

Parameters
[in]maxIterMaximum number of iterations to allow the solver to iterate.
[in]toleranceConvergence tolerane on the root
[in]forceToleranceSee if derivative is cose to zero (extremum).

◆ ~NewtonRaphsonSolver()

template<typename ValueType >
dftefe::linearAlgebra::NewtonRaphsonSolver< ValueType >::~NewtonRaphsonSolver ( )
default

Default Destructor.

Member Function Documentation

◆ getResidual()

template<typename ValueType >
ValueType dftefe::linearAlgebra::NewtonRaphsonSolver< ValueType >::getResidual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ solve()

template<typename ValueType >
NewtonRaphsonError dftefe::linearAlgebra::NewtonRaphsonSolver< ValueType >::solve ( NewtonRaphsonSolverFunction< ValueType > &  newtonRaphsonSolverFunction)

Function that initiates the NR solve.

Parameters
[in]newtonRaphsonFunction
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ d_forceTolerance

template<typename ValueType >
double dftefe::linearAlgebra::NewtonRaphsonSolver< ValueType >::d_forceTolerance
private

◆ d_isSolved

template<typename ValueType >
bool dftefe::linearAlgebra::NewtonRaphsonSolver< ValueType >::d_isSolved
private

◆ d_maxIter

template<typename ValueType >
size_type dftefe::linearAlgebra::NewtonRaphsonSolver< ValueType >::d_maxIter
private

◆ d_residual

template<typename ValueType >
ValueType dftefe::linearAlgebra::NewtonRaphsonSolver< ValueType >::d_residual
private

◆ d_tolerance

template<typename ValueType >
double dftefe::linearAlgebra::NewtonRaphsonSolver< ValueType >::d_tolerance
private

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