tfel
Loading...
Searching...
No Matches
tfel::math::TinyBroyden2Solver< 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 second Broyden algorithm. More...

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

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

Public Member Functions

 TinyBroyden2Solver ()=default
 default constructor
 TinyBroyden2Solver (TinyBroyden2Solver &) noexcept=default
 default constructor
 TinyBroyden2Solver (TinyBroyden2Solver &&) noexcept=default
 default constructor
TinyBroyden2Solver & operator= (TinyBroyden2Solver &&) noexcept=default
 default constructor
TinyBroyden2Solver & operator= (const TinyBroyden2Solver &) noexcept=default
 default constructor
TFEL_HOST_DEVICE void updateJacobianInvert ()
 update the inverse of the jacobian matrix
TFEL_HOST_DEVICE bool computeNewCorrection ()
 compute a new correction to the unknowns
 ~TinyBroyden2Solver () noexcept=default
 destructor

Detailed Description

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

A class based on the curiously recurring template pattern (CRTP) to solve system of non linear equations using the second Broyden 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. Initialize the invert of the jacobian matrix, i.e. the jacobian data member
  3. Provide a method called computeResidual which must computes the residual, i.e. the data member fzeros using the current estimate of the solution, i.e. the data member zeros.

Member Function Documentation

◆ updateJacobianInvert()

template<unsigned short N, typename NumericType, typename Child, template< unsigned short, typename > typename ExternalWorkSpace>
void tfel::math::TinyBroyden2Solver< N, NumericType, Child, ExternalWorkSpace >::updateJacobianInvert ( )

update the inverse of the jacobian matrix

This method is called by computeNewCorrection before the updateOrCheckJacobian method of the derived class.


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