OGS 6.2.1-76-gbb689931b
NumLib::NonlinearSolverBase Class Referenceabstract

Detailed Description

Common interface for nonlinear solvers.

Definition at line 35 of file NonlinearSolver.h.

#include <NonlinearSolver.h>

Inheritance diagram for NumLib::NonlinearSolverBase:

Public Member Functions

virtual void assemble (GlobalVector const &x) const =0
 
virtual NonlinearSolverStatus solve (GlobalVector &x, std::function< void(int, GlobalVector const &)> const &postIterationCallback)=0
 
virtual ~NonlinearSolverBase ()=default
 

Constructor & Destructor Documentation

◆ ~NonlinearSolverBase()

virtual NumLib::NonlinearSolverBase::~NonlinearSolverBase ( )
virtualdefault

Member Function Documentation

◆ assemble()

virtual void NumLib::NonlinearSolverBase::assemble ( GlobalVector const &  x) const
pure virtual

Only assemble the equation system.

Note
This method is needed to preload CrankNicolson time discretization scheme. It is not used for the general solver steps; in those only the solve() method is needed.
Parameters
xthe state at which the equation system will be assembled.

Implemented in NumLib::NonlinearSolver< NonlinearSolverTag::Picard >, and NumLib::NonlinearSolver< NonlinearSolverTag::Newton >.

◆ solve()

virtual NonlinearSolverStatus NumLib::NonlinearSolverBase::solve ( GlobalVector &  x,
std::function< void(int, GlobalVector const &)> const &  postIterationCallback 
)
pure virtual

Assemble and solve the equation system.

Parameters
xin: the initial guess, out: the solution.
postIterationCallbackcalled after each iteration if set.
Return values
trueif the equation system could be solved
falseotherwise

Implemented in NumLib::NonlinearSolver< NonlinearSolverTag::Picard >, and NumLib::NonlinearSolver< NonlinearSolverTag::Newton >.


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