11 #include "NonlinearSystem.h"
19 InputParameters params = validParams<GeneralUserObject>();
20 params.addClassDescription(
"Tool for terminating the reinitialization of the level set equation "
21 "based on the criteria defined by Olsson et. al. (2007).");
22 params.addRequiredParam<Real>(
23 "tol",
"The limit at which the reinitialization problem is considered converged.");
24 params.addParam<
int>(
"min_steps", 3,
"The minimum number of time steps to consider.");
29 : GeneralUserObject(params),
30 _solution_diff(_fe_problem.getNonlinearSystem().addVector(
"solution_diff", false, PARALLEL)),
31 _tol(getParam<Real>(
"tol")),
32 _min_t_steps(getParam<int>(
"min_steps"))
39 _solution_diff = *_fe_problem.getNonlinearSystem().currentSolution();
42 _console <<
"Computed convergence criteria: " << delta << std::endl;
46 else if (delta <
_tol)
47 _fe_problem.terminateSolve();