Skip to content

Commit

Permalink
Rename parameter to "skip_refine_when_use_split"
Browse files Browse the repository at this point in the history
  • Loading branch information
fdkong committed Aug 18, 2021
1 parent 2560eae commit b549897
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions framework/include/mesh/MooseMesh.h
Expand Up @@ -489,9 +489,9 @@ class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterf
void setUniformRefineLevel(unsigned int);

/**
* Whether or not allow uniform refinements when using a pre-split mesh
* Whether or not skip uniform refinements when using a pre-split mesh
*/
bool allowUniformRefineWhenUseSplit() const { return _allow_uniform_refine_when_use_split; }
bool skipRefineWhenUseSplit() const { return _skip_refine_when_use_split; }

/**
* This will add the boundary ids to be ghosted to this processor
Expand Down Expand Up @@ -1127,8 +1127,8 @@ class MooseMesh : public MooseObject, public Restartable, public PerfGraphInterf
/// The level of uniform refinement requested (set to zero if AMR is disabled)
unsigned int _uniform_refine_level;

/// Whether or not to allow uniform refinements when using a pre-split mesh
bool _allow_uniform_refine_when_use_split;
/// Whether or not to skip uniform refinements when using a pre-split mesh
bool _skip_refine_when_use_split;

/// true if mesh is changed (i.e. after adaptivity step)
bool _is_changed;
Expand Down
2 changes: 1 addition & 1 deletion framework/src/actions/SetupMeshCompleteAction.C
Expand Up @@ -55,7 +55,7 @@ SetupMeshCompleteAction::act()
// we pre-split the coarse mesh, and load the pre-split mesh in parallel,
// and then do a few levels of uniform refinements to have a fine mesh that
// potentially resolves physics features.
if (_app.isUseSplit() && !_mesh->allowUniformRefineWhenUseSplit())
if (_app.isUseSplit() && _mesh->skipRefineWhenUseSplit())
return;

// uniform refinement has been done on master, so skip
Expand Down
10 changes: 5 additions & 5 deletions framework/src/mesh/MooseMesh.C
Expand Up @@ -145,9 +145,9 @@ MooseMesh::validParams()
false,
"True to build the lower-dimensional mesh for all sides.");

params.addParam<bool>("allow_uniform_refine_when_use_split",
false,
"True to allow uniform refinements when using a pre-split mesh.");
params.addParam<bool>("skip_refine_when_use_split",
true,
"True to skip uniform refinements when using a pre-split mesh.");

// This indicates that the derived mesh type accepts a MeshGenerator, and should be set to true in
// derived types that do so.
Expand Down Expand Up @@ -177,7 +177,7 @@ MooseMesh::MooseMesh(const InputParameters & parameters)
_partitioner_overridden(false),
_custom_partitioner_requested(false),
_uniform_refine_level(0),
_allow_uniform_refine_when_use_split(getParam<bool>("allow_uniform_refine_when_use_split")),
_skip_refine_when_use_split(getParam<bool>("skip_refine_when_use_split")),
_is_nemesis(getParam<bool>("nemesis")),
_node_to_elem_map_built(false),
_node_to_active_semilocal_elem_map_built(false),
Expand Down Expand Up @@ -246,7 +246,7 @@ MooseMesh::MooseMesh(const MooseMesh & other_mesh)
_partitioner_overridden(other_mesh._partitioner_overridden),
_custom_partitioner_requested(other_mesh._custom_partitioner_requested),
_uniform_refine_level(other_mesh.uniformRefineLevel()),
_allow_uniform_refine_when_use_split(other_mesh._allow_uniform_refine_when_use_split),
_skip_refine_when_use_split(other_mesh._skip_refine_when_use_split),
_is_nemesis(false),
_node_to_elem_map_built(false),
_node_to_active_semilocal_elem_map_built(false),
Expand Down
2 changes: 1 addition & 1 deletion test/tests/mesh/split_uniform_refine/tests
Expand Up @@ -4,7 +4,7 @@
[./square]
type = 'Exodiff'
input = '3d_diffusion.i'
cli_args = '-r 1 Mesh/allow_uniform_refine_when_use_split=true --use-split --split-file square'
cli_args = '-r 1 Mesh/skip_refine_when_use_split=false --use-split --split-file square'
exodiff = '3d_diffusion_out.e'
# Pre-split mesh was generated for this particular configuration.
# MOOSE will check these when we read meshes from cpr files
Expand Down

0 comments on commit b549897

Please sign in to comment.