OGS
NumLib::NonlinearSystem< NonlinearSolverTag::Newton > Class Referenceabstract

Detailed Description

A System of nonlinear equations to be solved with the Newton-Raphson method.

The Newton-Raphson method will iterate the linearized equation \( \mathtt{Jac} \cdot (-\Delta x_i) = \mathtt{res} \).

Definition at line 35 of file NonlinearSystem.h.

#include <NonlinearSystem.h>

Inheritance diagram for NumLib::NonlinearSystem< NonlinearSolverTag::Newton >:
[legend]
Collaboration diagram for NumLib::NonlinearSystem< NonlinearSolverTag::Newton >:
[legend]

Public Member Functions

virtual void assemble (std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id)=0
 
virtual std::vector< GlobalIndexTypegetIndicesOfResiduumWithoutInitialCompensation () const =0
 
virtual void getResidual (GlobalVector const &x, GlobalVector const &x_prev, GlobalVector &res) const =0
 
virtual void getJacobian (GlobalMatrix &Jac) const =0
 
virtual void computeKnownSolutions (GlobalVector const &x, int const process_id)=0
 Pre-compute known solutions and possibly store them internally.
 
virtual void applyKnownSolutions (GlobalVector &x) const =0
 
virtual void applyKnownSolutionsNewton (GlobalMatrix &Jac, GlobalVector &res, GlobalVector const &x, GlobalVector &minus_delta_x) const =0
 
virtual void applyKnownSolutionsPETScSNES (GlobalMatrix &Jac, GlobalVector &res, GlobalVector &x) const =0
 
virtual void updateConstraints (GlobalVector &, GlobalVector &, int)=0
 
- Public Member Functions inherited from NumLib::EquationSystem
virtual bool isLinear () const =0
 
virtual bool requiresNormalization () const =0
 
virtual void preIteration (const unsigned iter, GlobalVector const &x)
 
virtual IterationResult postIteration (GlobalVector const &x)
 
virtual MathLib::MatrixSpecifications getMatrixSpecifications (const int process_id) const =0
 
virtual ~EquationSystem ()=default
 

Member Function Documentation

◆ applyKnownSolutions()

virtual void NumLib::NonlinearSystem< NonlinearSolverTag::Newton >::applyKnownSolutions ( GlobalVector & x) const
pure virtual

Apply known solutions to the solution vector x.

Precondition
computeKnownSolutions() must have been called before.

◆ applyKnownSolutionsNewton()

virtual void NumLib::NonlinearSystem< NonlinearSolverTag::Newton >::applyKnownSolutionsNewton ( GlobalMatrix & Jac,
GlobalVector & res,
GlobalVector const & x,
GlobalVector & minus_delta_x ) const
pure virtual

Apply known solutions to the linearized equation system \( \mathit{Jac} \cdot (-\Delta x) = \mathit{res} \).

Precondition
computeKnownSolutions() must have been called before.

◆ applyKnownSolutionsPETScSNES()

virtual void NumLib::NonlinearSystem< NonlinearSolverTag::Newton >::applyKnownSolutionsPETScSNES ( GlobalMatrix & Jac,
GlobalVector & res,
GlobalVector & x ) const
pure virtual

Apply known solutions to the linearized equation system \( \mathit{Jac} \cdot (-\Delta x) = \mathit{res} \).

Precondition
computeKnownSolutions() must have been called before.

◆ assemble()

virtual void NumLib::NonlinearSystem< NonlinearSolverTag::Newton >::assemble ( std::vector< GlobalVector * > const & x,
std::vector< GlobalVector * > const & x_prev,
int const process_id )
pure virtual

Assembles the linearized equation system at the point x. The linearized system is \(A(x) \cdot x = b(x)\). Here the matrix \(A(x)\) and the vector \(b(x)\) are assembled.

◆ computeKnownSolutions()

virtual void NumLib::NonlinearSystem< NonlinearSolverTag::Newton >::computeKnownSolutions ( GlobalVector const & x,
int const process_id )
pure virtual

Pre-compute known solutions and possibly store them internally.

◆ getIndicesOfResiduumWithoutInitialCompensation()

virtual std::vector< GlobalIndexType > NumLib::NonlinearSystem< NonlinearSolverTag::Newton >::getIndicesOfResiduumWithoutInitialCompensation ( ) const
pure virtual
Returns
The global indices for the entries of the global residuum vector that do not need initial non-equilibrium compensation.

◆ getJacobian()

virtual void NumLib::NonlinearSystem< NonlinearSolverTag::Newton >::getJacobian ( GlobalMatrix & Jac) const
pure virtual

Writes the Jacobian of the residual to Jac.

Precondition
assemble() must have been called before.

◆ getResidual()

virtual void NumLib::NonlinearSystem< NonlinearSolverTag::Newton >::getResidual ( GlobalVector const & x,
GlobalVector const & x_prev,
GlobalVector & res ) const
pure virtual

Writes the residual at point x to res.

Precondition
assemble() must have been called before with the same argument x.
Todo
Remove argument x.

◆ updateConstraints()

virtual void NumLib::NonlinearSystem< NonlinearSolverTag::Newton >::updateConstraints ( GlobalVector & ,
GlobalVector & ,
int  )
pure virtual

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