dune-pdelab
2.7-git
|
Newton solver for solving non-linear problems. More...
#include <dune/pdelab/solver/newton.hh>
Public Types | |
using | GridOperator = GridOperator_ |
Type of the grid operator. More... | |
using | LinearSolver = LinearSolver_ |
Type of the linear solver. More... | |
using | Domain = typename GridOperator::Traits::Domain |
Type of the domain (solution) More... | |
using | Range = typename GridOperator::Traits::Range |
Type of the range (residual) More... | |
using | Jacobian = typename GridOperator::Traits::Jacobian |
Type of the Jacobian matrix. More... | |
using | Real = typename Dune::FieldTraits< typename Domain::ElementType >::real_type |
Number type. More... | |
using | Result = PDESolverResult< Real > |
Type of results. More... | |
Public Member Functions | |
const Result & | result () const |
Return results. More... | |
virtual void | prepareStep (Domain &solution) |
virtual void | linearSolve () |
virtual void | apply (Domain &solution) |
Solve the nonlinear problem using solution as initial guess and for storing the result. More... | |
virtual void | updateDefect (Domain &solution) |
Update _residual and defect in _result. More... | |
void | setVerbosityLevel (unsigned int verbosity) |
Set how much output you get. More... | |
unsigned int | getVerbosityLevel () const |
Get verbosity level. More... | |
void | setReduction (Real reduction) |
Set reduction Newton needs to achieve. More... | |
Real | getReduction () const |
Get reduction. More... | |
void | setAbsoluteLimit (Real absoluteLimit) |
Set absolute convergence limit. More... | |
Real | getAbsoluteLimit () const |
void | setKeepMatrix (bool b) |
Set whether the jacobian matrix should be kept across calls to apply(). More... | |
void | setUseMaxNorm (bool b) |
Set whether to use the maximum norm for stopping criteria. More... | |
void | setHangingNodeModifications (bool b) |
Does the problem have hanging nodes. More... | |
bool | keepMatrix () const |
Return whether the jacobian matrix is kept across calls to apply(). More... | |
void | discardMatrix () |
Discard the stored Jacobian matrix. More... | |
void | setMinLinearReduction (Real minLinearReduction) |
Set the minimal reduction in the linear solver. More... | |
void | setFixedLinearReduction (bool fixedLinearReduction) |
Set wether to use a fixed reduction in the linear solver. More... | |
void | setReassembleThreshold (Real reassembleThreshold) |
Set a threshold, when the linear operator is reassembled. More... | |
void | setParameters (const ParameterTree ¶meterTree) |
Interpret a parameter tree as a set of options for the newton solver. More... | |
void | setTerminate (std::shared_ptr< TerminateInterface > terminate) |
Set the termination criterion. More... | |
void | setLineSearch (std::shared_ptr< LineSearchInterface< Domain >> lineSearch) |
Set the line search. More... | |
NewtonMethod (const GridOperator &gridOperator, LinearSolver &linearSolver, const std::string &lineSearchStrategy="hackbusch_reusken") | |
Construct Newton using default parameters. More... | |
NewtonMethod (const GridOperator &gridOperator, LinearSolver &linearSolver, const ParameterTree ¶meterTree, const std::string &lineSearchStrategy="hackbusch_reusken") | |
Construct Newton passing a parameter tree. More... | |
Newton solver for solving non-linear problems.
GridOperator_ | Grid operator for evaluation of resdidual and Jacobian |
LinearSolver_ | Solver backend for solving linear system of equations |
using Dune::PDELab::NewtonMethod< GridOperator_, LinearSolver_ >::Domain = typename GridOperator::Traits::Domain |
Type of the domain (solution)
using Dune::PDELab::NewtonMethod< GridOperator_, LinearSolver_ >::GridOperator = GridOperator_ |
Type of the grid operator.
using Dune::PDELab::NewtonMethod< GridOperator_, LinearSolver_ >::Jacobian = typename GridOperator::Traits::Jacobian |
Type of the Jacobian matrix.
using Dune::PDELab::NewtonMethod< GridOperator_, LinearSolver_ >::LinearSolver = LinearSolver_ |
Type of the linear solver.
using Dune::PDELab::NewtonMethod< GridOperator_, LinearSolver_ >::Range = typename GridOperator::Traits::Range |
Type of the range (residual)
using Dune::PDELab::NewtonMethod< GridOperator_, LinearSolver_ >::Real = typename Dune::FieldTraits<typename Domain::ElementType>::real_type |
Number type.
using Dune::PDELab::NewtonMethod< GridOperator_, LinearSolver_ >::Result = PDESolverResult<Real> |
Type of results.
|
inline |
Construct Newton using default parameters.
|
inline |
Construct Newton passing a parameter tree.
|
inlinevirtual |
Solve the nonlinear problem using solution as initial guess and for storing the result.
|
inline |
Discard the stored Jacobian matrix.
|
inline |
|
inline |
Get reduction.
|
inline |
Get verbosity level.
|
inline |
Return whether the jacobian matrix is kept across calls to apply().
|
inlinevirtual |
|
inlinevirtual |
|
inline |
Return results.
|
inline |
Set absolute convergence limit.
|
inline |
Set wether to use a fixed reduction in the linear solver.
|
inline |
Does the problem have hanging nodes.
|
inline |
Set whether the jacobian matrix should be kept across calls to apply().
|
inline |
Set the line search.
See getLineSearch() for already implemented line searches
|
inline |
Set the minimal reduction in the linear solver.
|
inline |
Interpret a parameter tree as a set of options for the newton solver.
Possible parameters:
example configuration:
and invocation in the code:
This can also be used to set single parameters like this
|
inline |
Set a threshold, when the linear operator is reassembled.
We allow to keep the linear operator over several newton iterations. If the reduction in the newton drops below a given threshold the linear operator is reassembled to ensure convergence.
|
inline |
Set reduction Newton needs to achieve.
|
inline |
Set the termination criterion.
|
inline |
Set whether to use the maximum norm for stopping criteria.
|
inline |
Set how much output you get.
|
inlinevirtual |
Update _residual and defect in _result.