Skip to content

Commit

Permalink
Merge pull request #27422 from pbehne/mesh_only_warning
Browse files Browse the repository at this point in the history
Set petsc's options_left option to false for mesh-only mode.
  • Loading branch information
GiudGiud authored Apr 21, 2024
2 parents f3d2ba2 + c29ecbd commit 84c0298
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions framework/src/base/MooseApp.C
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#include "RestartableDataWriter.h"
#include "StringInputStream.h"
#include "MooseMain.h"
#include "PetscSupport.h"

// Regular expression includes
#include "pcrecpp.h"
Expand Down Expand Up @@ -983,6 +984,9 @@ MooseApp::setupOptions()
_syntax.addDependency("mesh_only", "setup_mesh_complete");
_syntax.addDependency("determine_system_type", "mesh_only");
_action_warehouse.setFinalTask("mesh_only");
// Turn off Petsc's warning about unused petsc options since we do not use petsc in mesh-only
// mode
Moose::PetscSupport::setSinglePetscOption("-options_left", "0");
}
else if (isParamValid("split_mesh"))
{
Expand Down
5 changes: 3 additions & 2 deletions test/tests/mesh/mesh_only/tests
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
recover = false
method = '!dbg'
expect_out = 'Mesh Information'
issues = '#11917 #11921'
requirement = 'The system shall print out information about the mesh when writing out the mesh.'
absent_out = 'Option left: name:--mesh-only'
issues = '#11917 #11921 #26002'
requirement = 'The system shall print out information about the mesh when writing out the mesh and avoid emitting petsc warnings in mesh-only mode.'
[]

[mesh_only_warning]
Expand Down

0 comments on commit 84c0298

Please sign in to comment.