#include <SolverNleInterface.h>

Inheritance diagram for SolverNleInterface:

Public Member Functions

 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
 

Public Attributes

int NITER
 
double * F_
 current values of residuals More...
 
double * x_
 current values of unknowns More...
 
Jacobian J
 

Protected Member Functions

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

Protected Attributes

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

Interface to solver of systems of non-linear algebraic equations

#include <libpf/core/SolverNleInterface.h>

Remarks
Warning
Thread safe:
Extendable:
Platform dependencies:

Constructor & Destructor Documentation

◆ ~SolverNleInterface()

SolverNleInterface::~SolverNleInterface ( void  )
protected

◆ SolverNleInterface()

SolverNleInterface::SolverNleInterface ( ObjectiveNleInterface of)

Member Function Documentation

◆ bmpout()

void SolverNleInterface::bmpout ( char *  file_out_name) const

output the Jacobian sparsity signature as a bitmap

See also
Jacobian::bmpout

◆ calculateF()

virtual double SolverNleInterface::calculateF ( void  )
pure virtual

calculates F; returns the norm of the residuals

Implemented in Numeric, and Automatic.

◆ calculateFJ()

virtual double SolverNleInterface::calculateFJ ( void  )
pure virtual

calculates F and J; returns the norm of the residuals

Implemented in Numeric, and Automatic.

◆ clearCounters()

void SolverNleInterface::clearCounters ( void  )
protected

◆ message()

virtual std::string SolverNleInterface::message ( int  code)
pure virtual

convert return code returned by solve method to human-readable message

Implemented in SolverNleQ, and SolverNleRecipes.

◆ nonConverged()

bool SolverNleInterface::nonConverged ( void  )

returns true if the current value of half of the square of norm of the objective function vector is greater than 1e-3, or nan or inf

◆ norm()

virtual double SolverNleInterface::norm ( const double *  x)
pure virtual

return root mean square (RMS) norm

Implemented in SolverNleQ, and SolverNleRecipes.

◆ print_table()

void SolverNleInterface::print_table ( double *  xmin,
double *  xmax,
int  nsteps 
)

print dependence on all unknowns

◆ printMetrics()

void SolverNleInterface::printMetrics ( void  )

print metric counters

◆ printResults()

void SolverNleInterface::printResults ( void  )

print vector of results

◆ residual()

double SolverNleInterface::residual ( int  i)

returns current value of the ith component of the residual vector

◆ resize()

virtual void SolverNleInterface::resize ( int  n)
virtual

sets the number of unknowns

Reimplemented in Numeric, SolverNleQ, SolverNleQNumeric, SolverNleRecipes, and SolverNleRecipesNumeric.

◆ setMaximumIterations()

void SolverNleInterface::setMaximumIterations ( int  m)

sets the maximum number of iterations

◆ setMaximumStepSize()

void SolverNleInterface::setMaximumStepSize ( double  stpmx)

sets the maximum step size, as a fraction of the max between the square root of the sum of squares of the current estimate of the solution, and the number of unknowns the the maximum step size is them used as a bound for the sum of squares of the step in the line search note: this parameter only has an effect for the SolverNleRecipes solver

◆ setTolerances()

virtual void SolverNleInterface::setTolerances ( double  ,
double  ,
double  ,
double   
)
pure virtual

virtual function, has different meaning for the different solvers derived from SolverNleInterface

Implemented in SolverNleRecipes, and SolverNleQ.

◆ size()

int SolverNleInterface::size ( void  ) const

◆ solve()

virtual int SolverNleInterface::solve ( void  )
pure virtual

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

Implemented in SolverNleQ, and SolverNleRecipes.

◆ verifySolution()

virtual void SolverNleInterface::verifySolution ( void  )
pure virtual

evaluate equation set at the current set up estimates for the unknowns; useful to test for convergence after sequential solution

Implemented in Numeric, and Automatic.

Member Data Documentation

◆ F_

double* SolverNleInterface::F_

current values of residuals

◆ J

Jacobian SolverNleInterface::J

◆ MAXITS

int SolverNleInterface::MAXITS
protected

maximum number of Newton iterations

◆ nAuto_

int SolverNleInterface::nAuto_
protected

Number of analytical Jacobian evaluations.

◆ NITER

int SolverNleInterface::NITER

◆ nNewt_

int SolverNleInterface::nNewt_
protected

Number of Newton method applications.

◆ nNume_

int SolverNleInterface::nNume_
protected

Number of numerical Jacobian evaluations.

◆ nQuas_

int SolverNleInterface::nQuas_
protected

Number of Quasi Newton method applications.

◆ nSyst_

int SolverNleInterface::nSyst_
protected

Number of system evaluations.

◆ ofp_

ObjectiveNleInterface* SolverNleInterface::ofp_
protected

◆ STPMX

double SolverNleInterface::STPMX
protected

scaled maximum step length allowed in line searches

◆ verbosityLocal

int SolverNleInterface::verbosityLocal
protected

◆ x_

double* SolverNleInterface::x_

current values of unknowns


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