36 const std::string & name_in,
37 const unsigned int number_in) :
39 Parent (es, name_in, number_in),
42 _n_nonlinear_iterations (0),
43 _final_nonlinear_residual (1.e20)
49 es.
parameters.
set<
unsigned int>(
"linear solver maximum iterations") = 10000;
51 es.
parameters.
set<
unsigned int>(
"nonlinear solver maximum iterations") = 50;
52 es.
parameters.
set<
unsigned int>(
"nonlinear solver maximum function evaluations") = 10000;
102 const unsigned int maxits =
103 es.
parameters.
get<
unsigned int>(
"nonlinear solver maximum iterations");
105 const unsigned int maxfuncs =
106 es.
parameters.
get<
unsigned int>(
"nonlinear solver maximum function evaluations");
108 const Real abs_resid_tol =
111 const Real rel_resid_tol =
114 const Real abs_step_tol =
117 const Real rel_step_tol =
121 const unsigned int maxlinearits =
122 es.
parameters.
get<
unsigned int>(
"linear solver maximum iterations");
124 const Real linear_tol =
127 const Real linear_min_tol =
144 diff_solver->absolute_residual_tolerance = abs_resid_tol;
145 diff_solver->relative_residual_tolerance = rel_resid_tol;
146 diff_solver->absolute_step_tolerance = abs_step_tol;
147 diff_solver->relative_step_tolerance = rel_step_tol;
149 diff_solver->initial_linear_tolerance = linear_tol;
150 diff_solver->minimum_linear_tolerance = linear_min_tol;
159 START_LOG(
"solve()",
"System");
180 const std::pair<unsigned int, Real> rval =
192 STOP_LOG(
"solve()",
"System");
203 return std::make_pair(this->
diff_solver->max_linear_iterations,
204 this->diff_solver->relative_residual_tolerance);
206 this->nonlinear_solver->relative_residual_tolerance);
223 libmesh_error_msg(
"ERROR: cannot specify both a function and object to compute the Jacobian!");
226 libmesh_error_msg(
"ERROR: cannot specify both a function and object to compute the Residual!");
229 libmesh_error_msg(
"ERROR: cannot specify both a function and object to compute the combined Residual & Jacobian!");
247 libmesh_error_msg(
"Error! Unable to compute residual and/or Jacobian!");
273 libmesh_error_msg(
"Error! Unable to compute residual and/or Jacobian!");
276 libmesh_assert(get_jacobian);
void set_solver_parameters()
Manages multiples systems of equations.
std::unique_ptr< NonlinearSolver< Number > > nonlinear_solver
const EquationSystems & get_equation_systems() const
virtual void clear() override
virtual void reinit() override
NumericVector< Number > * rhs
NonlinearImplicitSystem(EquationSystems &es, const std::string &name, const unsigned int number)
virtual void clear() override
unsigned int _n_nonlinear_iterations
virtual ~NonlinearImplicitSystem()
Manages consistently variables, degrees of freedom, and coefficient vectors.
Real _final_nonlinear_residual
std::unique_ptr< NumericVector< Number > > solution
std::unique_ptr< DiffSolver > diff_solver
unsigned get_current_nonlinear_iteration_number() const
virtual void solve() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void assembly(bool get_residual, bool get_jacobian, bool apply_heterogeneous_constraints=false, bool apply_no_constraints=false) override
T & set(const std::string &)
SparseMatrix< Number > * matrix
virtual void reinit() override
const T & get(const std::string &) const
std::unique_ptr< NumericVector< Number > > current_local_solution
bool on_command_line(std::string arg)
const std::string & name() const
virtual std::pair< unsigned int, Real > get_linear_solve_parameters() const override