tfel
Loading...
Searching...
No Matches
tfel::math::TinyLevenbergMarquardtSolver< N, NumericType, Child, ExternalWorkSpace > Struct Template Reference

A class based on the curiously recurring template pattern (CRTP) to solve system of non linear equations using the Newton-Raphson algorithm. More...

#include </home/runner/work/tfel/tfel/include/TFEL/Math/TinyLevenbergMarquardtSolver.hxx>

Inheritance diagram for tfel::math::TinyLevenbergMarquardtSolver< N, NumericType, Child, ExternalWorkSpace >:

Public Member Functions

 TinyLevenbergMarquardtSolver ()=default
 default constructor
 TinyLevenbergMarquardtSolver (TinyLevenbergMarquardtSolver &) noexcept=default
 default constructor
 TinyLevenbergMarquardtSolver (TinyLevenbergMarquardtSolver &&) noexcept=default
 default constructor
TinyLevenbergMarquardtSolver & operator= (TinyLevenbergMarquardtSolver &&) noexcept=default
 default constructor
TinyLevenbergMarquardtSolver & operator= (const TinyLevenbergMarquardtSolver &) noexcept=default
 default constructor
 ~TinyLevenbergMarquardtSolver () noexcept=default
 destructor
TFEL_HOST_DEVICE constexpr void executeInitialisationTaskBeforeResolution () noexcept
 this method is called at the beginning of the solveNonLinearSystem method.
TFEL_HOST_DEVICE constexpr void executeInitialisationTaskBeforeBeginningOfCoreAlgorithm () noexcept
 this method is called at the beginning of the solveNonLinearSystem2 method.
TFEL_HOST_DEVICE bool computeNewCorrection ()
 compute a new correction to the unknowns
TFEL_HOST_DEVICE bool computeLevenbergMarquardtCorrection ()

Protected Attributes

NumericType levmar_mu0
NumericType levmar_p0
NumericType levmar_p1
NumericType levmar_p2
NumericType levmar_m

Detailed Description

template<unsigned short N, typename NumericType, typename Child, template< unsigned short, typename > typename ExternalWorkSpace = StackAllocatedTinyLevenbergMarquardtSolverWorkspace>
struct tfel::math::TinyLevenbergMarquardtSolver< N, NumericType, Child, ExternalWorkSpace >

A class based on the curiously recurring template pattern (CRTP) to solve system of non linear equations using the Newton-Raphson algorithm.

Template Parameters
Nsize of the system of non linear equations.
NumericTypenumeric type.
Childbase class.
ExternalWorkSpaceclass containing data members used by the solver.

By default, the Child class must:

  1. Set the values of epsilon and iterMax data members and the initial guess of the unknowns, i.e. by setting the value of the zeros data member.
  2. Provide a method called computeResidual which must computes the residual, i.e. the data member fzeros and the jacobian matrix, i.e. the data member jacobian using the current estimate of the solution, i.e. the data member zeros.

The documentation for this struct was generated from the following files: