OGS 6.2.1-499-g3b941532c.dirty.20191012113459
NumLib::NonlinearSolverBase Class Referenceabstract

Detailed Description

Common interface for nonlinear solvers.

Definition at line 36 of file NonlinearSolver.h.

#include <NonlinearSolver.h>

Inheritance diagram for NumLib::NonlinearSolverBase:

Public Member Functions

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

Constructor & Destructor Documentation

◆ ~NonlinearSolverBase()

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

Member Function Documentation

◆ assemble()

virtual void NumLib::NonlinearSolverBase::assemble ( std::vector< GlobalVector *> const &  x,
int const  process_id 
) 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.
process_idthe process' id which will be assembled.

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

◆ solve()

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

Assemble and solve the equation system.

Parameters
xin: the initial guess, out: the solution.
postIterationCallbackcalled after each iteration if set.
process_idusually used in staggered schemes.
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: