#include <SolverNleQ.h>

Inheritance diagram for SolverNleQ:

Public Member Functions

 SolverNleQ (int, ObjectiveNleInterface &)
 
void resize (int n) override
 sets the number of unknowns More...
 
double norm (const double *x) override
 return root mean square (RMS) norm More...
 
int solve (void) override
 
std::string message (int code) override
 
void setTolerances (double lambdaMin, double epsilon, double lambda0, double) override
 
- Public Member Functions inherited from SolverNleInterface
 SolverNleInterface (ObjectiveNleInterface &of)
 
int size (void) const
 
virtual void resize (int n)
 sets the number of unknowns More...
 
void print_table (double *xmin, double *xmax, int nsteps)
 print dependence on all unknowns More...
 
void printResults (void)
 print vector of results More...
 
void printMetrics (void)
 print metric counters More...
 
virtual void setTolerances (double, double, double, double)=0
 virtual function, has different meaning for the different solvers derived from SolverNleInterface More...
 
void setMaximumIterations (int m)
 sets the maximum number of iterations More...
 
void setMaximumStepSize (double stpmx)
 
void bmpout (char *file_out_name) const
 
double residual (int i)
 returns current value of the ith component of the residual vector More...
 
virtual double norm (const double *x)=0
 return root mean square (RMS) norm More...
 
virtual double calculateF (void)=0
 calculates F; returns the norm of the residuals More...
 
virtual double calculateFJ (void)=0
 calculates F and J; returns the norm of the residuals More...
 
virtual int solve (void)=0
 
virtual std::string message (int code)=0
 convert return code returned by solve method to human-readable message More...
 
virtual void verifySolution (void)=0
 evaluate equation set at the current set up estimates for the unknowns; useful to test for convergence after sequential solution More...
 
bool nonConverged (void)
 
- Public Member Functions inherited from Diagnostic
 Diagnostic (void)
 
void setVerbosity (int verbosity)
 sets the verbosity level for this instance More...
 
int verbosity (void) const
 

Protected Member Functions

 ~SolverNleQ (void)
 
- Protected Member Functions inherited from SolverNleInterface
 ~SolverNleInterface (void)
 
void clearCounters (void)
 
- Protected Member Functions inherited from Diagnostic
virtual ~Diagnostic ()=default
 

Additional Inherited Members

- Public Attributes inherited from SolverNleInterface
int NITER
 
double * F_
 current values of residuals More...
 
double * x_
 current values of unknowns More...
 
Jacobian J
 
- Protected Attributes inherited from SolverNleInterface
ObjectiveNleInterfaceofp_
 
int MAXITS
 maximum number of Newton iterations More...
 
int verbosityLocal
 
int nSyst_
 Number of system evaluations. More...
 
int nNewt_
 Number of Newton method applications. More...
 
int nQuas_
 Number of Quasi Newton method applications. More...
 
int nAuto_
 Number of analytical Jacobian evaluations. More...
 
int nNume_
 Number of numerical Jacobian evaluations. More...
 
double STPMX
 scaled maximum step length allowed in line searches More...
 
- Protected Attributes inherited from Diagnostic
int verbosityInstance
 

Detailed Description

Resolution of systems of non-linear equations, based on the NLEQ-ERR algorithm in: Peter Deuflhard, "Newton Methods for Nonlinear Problems Affine Invariance and Adaptive Algorithms" Springer Series in Computational Mathematics 35 2011, page 148

parameters: lambda0, epsilon

#include <libpf/core/SolverNleQ.h>

Remarks
Warning
Thread safe:
Extendable:
Platform dependencies:

Constructor & Destructor Documentation

◆ ~SolverNleQ()

SolverNleQ::~SolverNleQ ( void  )
protected

◆ SolverNleQ()

SolverNleQ::SolverNleQ ( int  ,
ObjectiveNleInterface  
)

Member Function Documentation

◆ message()

std::string SolverNleQ::message ( int  code)
overridevirtual

OK: 0 Converged OK

warning level:

error level: 2 Newton exceeded maximum iterations limit 3 Error when evaluating the residuals 4 Quasi-Newton exceeded maximum iterations limit 5 Step reduction limit reached 6 Singular matrix, type 1 7 Singular matrix, type 2

Implements SolverNleInterface.

◆ norm()

double SolverNleQ::norm ( const double *  x)
overridevirtual

return root mean square (RMS) norm

Implements SolverNleInterface.

◆ resize()

void SolverNleQ::resize ( int  n)
overridevirtual

sets the number of unknowns

Reimplemented from SolverNleInterface.

Reimplemented in SolverNleQNumeric.

◆ setTolerances()

void SolverNleQ::setTolerances ( double  lambdaMin,
double  epsilon,
double  lambda0,
double   
)
overridevirtual
Parameters
lambdaMinMinimum step reduction factor
epsilonRequired error accuracy
lambda0Initial step reduction factor

Implements SolverNleInterface.

◆ solve()

int SolverNleQ::solve ( void  )
overridevirtual

Globally convergent Newton's method algorithm zero return code: solved ok negative return code: solved with warnings positive return code: unrecoverable error

Implements SolverNleInterface.


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