14#define NEWTON_CONST_D 0
39 typename F::d_type
type;
41#include "basics/warnings/push.h"
42#include "basics/warnings/ignore_warning_dangling_field.h"
55 DEBUGL(NEWTON_CONST_D,
"Newton solver with implicit computation of the Jacobian built");
71 DEBUGL(NEWTON_CONST_D,
"Newton solver with explicit Jacobian built");
73#include "basics/warnings/pop.h"
77 virtual void show_messages();
79 virtual void hide_messages();
88#include "basics/warnings/push.h"
89#include "basics/warnings/ignore_warning_dangling_field.h"
97#include "basics/warnings/pop.h"
virtual void setLinearSolver_(F *Jacobian)
Set linear solver.
std::function< Vector< typename F::d_type >(Vector< typename F::d_type >)> & A_
Function that evaluates the matrix A applied to vector X.
bool definedJacA_
Flag that states if the Jacobian matrix has been set.
uint dimY_
Size of the data.
uint iterMax_
Maximum number of iterations.
std::function< F(Vector< typename F::d_type >)> * JacA_
Function that evaluates the Jacobian of matrix A applied to vector X.
std::unique_ptr< concepts::Operator< typename F::d_type > > linearSolver_
Internal linear solver.
Newton(std::function< Vector< typename F::d_type >(Vector< typename F::d_type >)> A, std::function< F(Vector< typename F::d_type >)> JacA, uint dimY, uint dimX, Real tol=1e-8, Real iterMax=50)
Real dx_
Step for the computation of the pseudo-Jacobian.
Real tol_
Tolerance for the functional.
bool verbose_
Internal flag for verbosity.
uint dimX_
Size of the unknown.
Newton(std::function< Vector< typename F::d_type >(Vector< typename F::d_type >)> A, Real dx, uint dimY, uint dimX, Real tol=1e-8, Real iterMax=1000)
F type
Type of data, e.g. matrix entries.
#define DEBUGL(doit, msg)
Set< F > makeSet(uint n, const F &first,...)