22 #ifndef __H2D_SOLVER_NEWTON_H_
23 #define __H2D_SOLVER_NEWTON_H_
26 #include "discrete_problem.h"
27 #include "exceptions.h"
70 template<
typename Scalar>
78 void init_linear_solver();
83 virtual bool isOkay()
const;
88 void solve(Scalar* coeff_vec = NULL);
100 void solve_keep_jacobian(Scalar* coeff_vec = NULL);
112 void set_max_allowed_residual_norm(
double max_allowed_residual_norm_to_set);
116 void set_min_allowed_damping_coeff(
double min_allowed_damping_coeff_to_set);
119 virtual void set_iterative_method(
const char* iterative_method_name);
122 virtual void set_preconditioner(
const char* preconditioner_name);
131 void set_residual_as_function();
135 void set_newton_tol(
double newton_tol);
139 void set_newton_max_iter(
int newton_max_iter);
143 virtual void set_time(
double time);
144 virtual void set_time_step(
double time_step);
147 virtual void set_spaces(Hermes::vector<
const Space<Scalar>*> spaces);
149 virtual Hermes::vector<const Space<Scalar>*> get_spaces()
const;
155 void set_manual_damping_coeff(
bool onOff,
double coeff = 1.0);
161 void set_initial_auto_damping_coeff(
double coeff);
169 void set_auto_damping_ratio(
double ratio);
176 void set_sufficient_improvement_factor(
double ratio);
183 void set_necessary_successful_steps_to_increase(
unsigned int steps);
196 void init_attributes();
209 bool residual_as_function;
215 double min_allowed_damping_coeff;
217 double currentDampingCofficient;