version 3.10.0
Loading...
Searching...
No Matches
Dumux::Optimization::Detail::LevenbergMarquardt< Assembler, LinearSolver > Class Template Reference

A nonlinear least squares solver with \(n\) model parameters and \(m\) observations. More...

#include <dumux/nonlinear/leastsquares.hh>

Inheritance diagram for Dumux::Optimization::Detail::LevenbergMarquardt< Assembler, LinearSolver >:

Description

template<class Assembler, class LinearSolver>
class Dumux::Optimization::Detail::LevenbergMarquardt< Assembler, LinearSolver >
Template Parameters
Assemblera class that assembles the linear system of equations in each iteration
LinearSolvera class that solves the linear system of equations
Note
The assembler has to assemble the actual least squares problem (i.e. the normal equations)

Public Member Functions

 LevenbergMarquardt (std::shared_ptr< Assembler > assembler, std::shared_ptr< LinearSolver > linearSolver, int verbosity=0)
 
bool apply (Variables &vars) override
 Solve the nonlinear least squares problem.
 

Private Member Functions

void newtonEndStep (Variables &vars, const SolutionVector &uLastIter) override
 
void lineSearchUpdate_ (Variables &vars, const SolutionVector &uLastIter, const ResidualVector &deltaU) override
 
bool apply (Variables &vars) override
 Run the Newton method to solve a non-linear system. The solver is responsible for all the strategic decisions.
 
virtual void newtonEndStep (Variables &vars, const SolutionVector &uLastIter)
 Indicates that one Newton iteration was finished.
 

Constructor & Destructor Documentation

◆ LevenbergMarquardt()

template<class Assembler, class LinearSolver>
Dumux::Optimization::Detail::LevenbergMarquardt< Assembler, LinearSolver >::LevenbergMarquardt ( std::shared_ptr< Assembler > assembler,
std::shared_ptr< LinearSolver > linearSolver,
int verbosity = 0 )
inline

Member Function Documentation

◆ apply()

template<class Assembler, class LinearSolver>
bool Dumux::Optimization::Detail::LevenbergMarquardt< Assembler, LinearSolver >::apply ( Variables & vars)
inlineoverride
Parameters
varsinstance of the Variables class representing a numerical solution, defining primary and possibly secondary variables and information on the time level.
Returns
bool true if the solver converged
Postcondition
If converged, the given Variables will represent the solution. If the solver does not converge, the Variables will represent the best solution so far (lowest value of the objective function)

◆ lineSearchUpdate_()

template<class Assembler, class LinearSolver>
void Dumux::Optimization::Detail::LevenbergMarquardt< Assembler, LinearSolver >::lineSearchUpdate_ ( Variables & vars,
const SolutionVector & uLastIter,
const ResidualVector & deltaU )
inlineoverrideprivate

◆ newtonEndStep()

template<class Assembler, class LinearSolver>
void Dumux::Optimization::Detail::LevenbergMarquardt< Assembler, LinearSolver >::newtonEndStep ( Variables & vars,
const SolutionVector & uLastIter )
inlineoverrideprivate

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