Skip to content
Permalink
Browse files

Merge pull request #13158 from acasagran/iteradaptdt_params_13157

IterationAdaptiveDT parameter check fix
  • Loading branch information...
permcody committed Apr 2, 2019
2 parents 5b9aba4 + 99a64c6 commit faaf2168ddcaaa597283bb195b8215812e7b35be
@@ -131,8 +131,14 @@ IterationAdaptiveDT::IterationAdaptiveDT(const InputParameters & parameters)
if (isParamValid("timestep_limiting_function"))
_max_function_change =
isParamValid("max_function_change") ? getParam<Real>("max_function_change") : -1;
else if (isParamValid("max_function_change"))
mooseError("'timestep_limiting_function' must be used for 'max_function_change' to be used");
else
{
if (isParamValid("max_function_change"))
mooseError("'timestep_limiting_function' must be used for 'max_function_change' to be used");
if (_force_step_every_function_point)
mooseError("'timestep_limiting_function' must be used for 'force_step_every_function_point' "
"to be used");
}
}

void
@@ -58,9 +58,6 @@
type = IterationAdaptiveDT
dt = 0.9
optimal_iterations = 10
force_step_every_function_point = true
max_function_change = 1e20
timestep_limiting_function = knot
[../]
[]

@@ -1,58 +1,96 @@
[Tests]
issues = '#5535'
design = 'source/timesteppers/IterationAdaptiveDT.md'
[./test_hit_knot]
type = 'Exodiff'
input = 'hit_function_knot.i'
cli_args = 'Executioner/TimeStepper/timestep_limiting_function=knot Executioner/TimeStepper/max_function_change=1e20
Executioner/TimeStepper/force_step_every_function_point=true'
exodiff = 'hit_function_knot_out.e'
requirement = "MOOSE shall support the ability to force time steps consistent with points specified in a function."
[../]
[./test_hit_knot_err1]
type = 'RunException'
input = 'hit_function_knot.i'
cli_args = 'Executioner/TimeStepper/force_step_every_function_point=true'
expect_err = "'timestep_limiting_function' must be used for 'force_step_every_function_point' to be used"
requirement = "MOOSE shall check that a timestep limiting function has
been defined when a user specifies the 'force_step_every_function_point'
parameter as true."
[../]
[./test_hit_knot_err2]
type = 'RunException'
input = 'hit_function_knot.i'
cli_args = 'Executioner/TimeStepper/max_function_change=1e20'
expect_err = "'timestep_limiting_function' must be used for 'max_function_change' to be used"
requirement = "MOOSE shall check that a timestep limiting function has
been defined when a user specifies a value for the 'max_function_change' parameter."
[../]

[./test_grow_init_dt]
type = 'Exodiff'
input = 'adapt_tstep_grow_init_dt.i'
exodiff = 'adapt_tstep_grow_init_dt_out.e'
requirement = "MOOSE shall support the ability to grow the time step size
when specifying the initial value of dt in the TimeStepper."
[../]

[./test_grow_init_dt_restart]
type = 'Exodiff'
input = 'adapt_tstep_grow_init_dt_restart.i'
exodiff = 'adapt_tstep_grow_init_dt_restart_out.e'
prereq = 'test_grow_init_dt'
requirement = "MOOSE shall support the ability to grow the time step size
when specifying the initial value of dt in the TimeStepper after a restart."
[../]

[./test_grow_dtfunc]
type = 'Exodiff'
input = 'adapt_tstep_grow_dtfunc.i'
exodiff = 'adapt_tstep_grow_dtfunc_out.e'
requirement = "MOOSE shall support the ability to grow the time step size
when specifying the values of t and dt in the TimeStepper."
[../]

[./test_grow_dtfunc_restart]
type = 'Exodiff'
input = 'adapt_tstep_grow_dtfunc_restart.i'
exodiff = 'adapt_tstep_grow_dtfunc_restart_out.e'
prereq = 'test_grow_dtfunc'
requirement = "MOOSE shall support the ability to grow the time step size
when specifying the values of t and dt in the TimeStepper after a restart."
[../]

[./test_shrink_init_dt]
type = 'Exodiff'
input = 'adapt_tstep_shrink_init_dt.i'
exodiff = 'adapt_tstep_shrink_init_dt_out.e'
requirement = "MOOSE shall support the ability to limit the time step size
based on the optimal iterations and linear_iteration ratio."
[../]

[./test_shrink_init_dt_restart]
type = 'Exodiff'
input = 'adapt_tstep_shrink_init_dt_restart.i'
exodiff = 'adapt_tstep_shrink_init_dt_restart_out.e'
prereq = 'test_shrink_init_dt'
requirement = "MOOSE shall support the ability to limit the time step size
based on the optimal iterations and linear_iteration ratio after a restart."
[../]

[./test_pps_lim]
type = 'Exodiff'
input = 'adapt_tstep_pps_lim.i'
exodiff = 'adapt_tstep_pps_lim_out.e'
requirement = "MOOSE shall support the ability to limit the time step size
based on a postprocessor value."
[../]

[./test_reject_large_dt]
type = 'Exodiff'
input = 'adapt_tstep_reject_large_dt.i'
exodiff = 'adapt_tstep_reject_large_dt_out.e'
requirement = "MOOSE shall support the ability to reject a time step based
on a threshold value for the ratio of the ideal step size to the limit."
[../]
[]

0 comments on commit faaf216

Please sign in to comment.
You can’t perform that action at this time.