31template <
typename LinearSolver,
typename JacobianMatrixUpdate,
32 typename ResidualUpdate,
typename SolutionUpdate>
40 !std::is_same_v<T, T>,
41 "For the type T in the expression !std::is_same_v<T, T>: Could not "
42 "find overload for FirstArgument<T>. Expected T to be a callable "
43 "with one argument. Could be a missing overload of FirstArgument "
48 template <
typename C,
typename R,
typename Arg,
typename... Args>
51 using type = std::remove_reference_t<Arg>;
56 decltype(&std::remove_reference_t<F>::operator())>::type;
63 JacobianMatrixUpdate jacobian_update,
64 ResidualUpdate residual_update,
65 SolutionUpdate solution_update,
73 solver_parameters.residuum_tolerance),
75 solver_parameters.increment_tolerance)
123 ERR(
"The local Newton method did not converge within the given "
124 "number of iterations. Iteration: {:d}, increment {:g}, "
127 iteration - 1, increment.norm(), residual.norm());
void ERR(fmt::format_string< Args... > fmt, Args &&... args)
ResidualUpdate _residual_update
JacobianMatrixUpdate _jacobian_update
const int _maximum_iterations
Maximum number of iterations.
FirstArgumentType< JacobianMatrixUpdate > JacobianMatrix
NewtonRaphson(LinearSolver &linear_solver, JacobianMatrixUpdate jacobian_update, ResidualUpdate residual_update, SolutionUpdate solution_update, NewtonRaphsonSolverParameters const &solver_parameters)
LinearSolver & _linear_solver
const double _residuum_tolerance_squared
Error tolerance for the residuum.
SolutionUpdate _solution_update
FirstArgumentType< ResidualUpdate > ResidualVector
typename FirstArgument< decltype(&std::remove_reference_t< F >::operator())>::type FirstArgumentType
std::optional< int > solve(JacobianMatrix &jacobian) const
const double _increment_tolerance_squared
Error tolerance for the increment.
double increment_tolerance
double residuum_tolerance
std::remove_reference_t< Arg > type