Skip to content

Commit

Permalink
Ensure pre option overrides executioner. Add test. (idaholab#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
lindsayad committed Sep 8, 2017
1 parent df17742 commit 8fc0232
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 2 deletions.
3 changes: 1 addition & 2 deletions framework/src/utils/PetscSupport.C
Expand Up @@ -616,8 +616,7 @@ storePetscOptions(FEProblemBase & fe_problem, const InputParameters & params)
if (params.isParamValid("mffd_type"))
{
MooseEnum mffd_type = params.get<MooseEnum>("mffd_type");
if (fe_problem.solverParams()._mffd_type == Moose::MFFD_INVALID)
fe_problem.solverParams()._mffd_type = Moose::stringToEnum<Moose::MffdType>(mffd_type);
fe_problem.solverParams()._mffd_type = Moose::stringToEnum<Moose::MffdType>(mffd_type);
}

// The parameters contained in the Action
Expand Down
Binary file not shown.
38 changes: 38 additions & 0 deletions test/tests/utils/mffd/mffd_test.i
@@ -0,0 +1,38 @@
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]

[Variables]
[./u]
[../]
[]

[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]

[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 'right'
value = 1
[../]
[]

[Executioner]
type = Steady
solve_type = 'PJFNK'
mffd_type = 'ds'
[]
8 changes: 8 additions & 0 deletions test/tests/utils/mffd/tests
@@ -0,0 +1,8 @@
[Tests]
[./mffd_test]
type = 'RunApp'
input = 'mffd_test.i'
expect_out = 'Using ds compute h routine'
cli_args = '-snes_view'
[../]
[]

0 comments on commit 8fc0232

Please sign in to comment.