13 #include <Eigen/Dense>
31 template <
typename LinearSolver,
typename JacobianMatrix,
32 typename JacobianMatrixUpdate,
typename ResidualVector,
33 typename ResidualUpdate,
typename SolutionUpdate>
38 JacobianMatrixUpdate jacobian_update,
39 ResidualUpdate residual_update,
40 SolutionUpdate solution_update,
48 solver_parameters.residuum_tolerance),
50 solver_parameters.increment_tolerance)
56 std::optional<int>
solve(JacobianMatrix& jacobian)
const
59 ResidualVector increment;
60 ResidualVector residual;
98 ERR(
"The local Newton method did not converge within the given "
99 "number of iterations. Iteration: {:d}, increment {:g}, "
102 iteration - 1, increment.norm(), residual.norm());
void ERR(char const *fmt, Args const &... args)
SolutionUpdate _solution_update
NewtonRaphson(LinearSolver &linear_solver, JacobianMatrixUpdate jacobian_update, ResidualUpdate residual_update, SolutionUpdate solution_update, NewtonRaphsonSolverParameters const &solver_parameters)
const double _increment_tolerance_squared
Error tolerance for the increment.
const int _maximum_iterations
Maximum number of iterations.
const double _residuum_tolerance_squared
Error tolerance for the residuum.
LinearSolver & _linear_solver
std::optional< int > solve(JacobianMatrix &jacobian) const
JacobianMatrixUpdate _jacobian_update
ResidualUpdate _residual_update
double increment_tolerance
double residuum_tolerance