Skip to content

Commit

Permalink
Fix framework tests. (idaholab#28819)
Browse files Browse the repository at this point in the history
  • Loading branch information
grmnptr committed Oct 22, 2024
1 parent bda4ab9 commit 7a347dc
Show file tree
Hide file tree
Showing 21 changed files with 76 additions and 42 deletions.
8 changes: 5 additions & 3 deletions framework/src/executioners/LinearFixedPointSteady.C
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,22 @@

#include "libmesh/equation_systems.h"

registerMooseObject("MooseTestApp", LinearFixedPointSteady);
registerMooseObject("MooseApp", LinearFixedPointSteady);

InputParameters
LinearFixedPointSteady::validParams()
{
InputParameters params = LinearFixedPointSolve::validParams();
params += Executioner::validParams();
params.addParam<Real>("time", 0.0, "System time");

return params;
}

LinearFixedPointSteady::LinearFixedPointSteady(const InputParameters & parameters)
: Executioner(parameters),
_solve(*this),
_system_time(getParam<Real>("time")),
_time_step(_fe_problem.timeStep()),
_time(_fe_problem.time())
{
Expand Down Expand Up @@ -62,6 +64,8 @@ LinearFixedPointSteady::execute()

preExecute();

_fe_problem.advanceState();

// first step in any steady state solve is always 1 (preserving backwards compatibility)
_time_step = 1;

Expand Down Expand Up @@ -92,9 +96,7 @@ LinearFixedPointSteady::execute()

#ifdef LIBMESH_ENABLE_AMR
if (r_step != steps)
{
_fe_problem.adaptMesh();
}

_time_step++;
}
Expand Down
6 changes: 0 additions & 6 deletions modules/navier_stokes/src/executioners/SIMPLE.C
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ SIMPLE::execute()
return;
}

if (_problem.adaptivity().isOn())
{
_console << "\nCannot use SIMPLE solves with mesh adaptivity!\nExiting...\n" << std::endl;
return;
}

ExecFlagEnum disabled_flags;
disabled_flags.addAvailableFlags(EXEC_TIMESTEP_BEGIN,
EXEC_TIMESTEP_END,
Expand Down
4 changes: 3 additions & 1 deletion test/tests/linearfvkernels/advection/advection-1d.i
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
number_of_iterations = 1
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Outputs]
Expand Down
4 changes: 3 additions & 1 deletion test/tests/linearfvkernels/advection/advection-2d-rz.i
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,13 @@
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
number_of_iterations = 2
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-10'
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Outputs]
Expand Down
4 changes: 3 additions & 1 deletion test/tests/linearfvkernels/advection/advection-2d.i
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,13 @@
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
number_of_iterations = 1
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-10'
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Outputs]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
number_of_iterations = 1
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Outputs]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,12 @@
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Outputs]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,28 +66,30 @@ reac_coeff=3
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
execute_on = TIMESTEP_END
block = 2
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
execute_on = TIMESTEP_END
block = 2
[]
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Outputs]
[csv]
type = CSV
execute_on = FINAL
execute_on = TIMESTEP_END
[]
[]
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,12 @@
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Outputs]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,12 @@
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Outputs]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,12 @@
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Outputs]
Expand Down
4 changes: 3 additions & 1 deletion test/tests/linearfvkernels/diffusion/diffusion-1d.i
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Outputs]
Expand Down
4 changes: 3 additions & 1 deletion test/tests/linearfvkernels/diffusion/diffusion-2d-rz.i
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Outputs]
Expand Down
4 changes: 3 additions & 1 deletion test/tests/linearfvkernels/diffusion/diffusion-2d.i
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Outputs]
Expand Down
8 changes: 5 additions & 3 deletions test/tests/linearfvkernels/reaction/reaction-1d.i
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,20 @@
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
execute_on = TIMESTEP_END
[]
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Outputs]
[exodus]
type = Exodus
execute_on = FINAL
execute_on = TIMESTEP_END
[]
[]
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Debug]
Expand Down
4 changes: 3 additions & 1 deletion test/tests/outputs/debug/show_execution_linear_fv_flux.i
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Debug]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,12 @@
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Outputs]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Outputs]
Expand Down
4 changes: 3 additions & 1 deletion test/tests/variables/linearfv/diffusion-1d-aux.i
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@
[]

[Executioner]
type = LinearPicardSteady
type = LinearFixedPointSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
absolute_tolerance = 1e-10
[]

[Outputs]
Expand Down
Loading

0 comments on commit 7a347dc

Please sign in to comment.