/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/timestepping/solver/newton.hh Source File#
|
DiFfRG
|
newton.hh
Go to the documentation of this file.
25 Newton(double abstol_ = 1e-10, double reltol_ = 1e-6, double assemble_threshold_ = 0., uint max_steps_ = 21,
27 : abstol(abstol_), reltol(reltol_), assemble_threshold(assemble_threshold_), max_steps(max_steps_),
60 if (!std::isfinite(residual_vector.l2_norm())) throw std::runtime_error("Initial residual non-finite!");
205 tbb::parallel_for(tbb::blocked_range<uint>(0, eest_tmp.size()), [&](tbb::blocked_range<uint> r) {
A newton solver, using local error estimates for each vector component.
Definition newton.hh:21
Newton(double abstol_=1e-10, double reltol_=1e-6, double assemble_threshold_=0., uint max_steps_=21, uint n_stepsize_iterations_=21)
Definition newton.hh:25
double get_EEst()
Calculate the current error estimate.
Definition newton.hh:196
std::function< void(const VectorType &)> update_jacobian
Definition newton.hh:158
void set_ignore_nonconv(bool x)
Make the newton algorithm return a success even if the evolution did not fulfill the convergence crit...
Definition newton.hh:154
std::function< void(VectorType &, const VectorType &)> residual
Definition newton.hh:156
uint get_step()
Get the number of steps taken in the latest iteration.
Definition newton.hh:168
uint get_jacobians()
Get the number of jacobians created in the latest iteration.
Definition newton.hh:173
void reinit(const VectorType &u)
Should it be necessary, one can force a recalculation of the jacobian hereby.
Definition newton.hh:35
double threshold(const double thr)
Set the jacobian recalculation threshold, i.e. below which reduction we force a jacobian update.
Definition newton.hh:127
std::function< void(VectorType &, const VectorType &)> lin_solve
Definition newton.hh:157
void operator()(VectorType &iterate)
Perform a newton iteration on the input vector.
Definition newton.hh:42
Definition complex_math.hh:10
Generated by