Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter groups and suppressions for a few systems #29608

Open
wants to merge 13 commits into
base: next
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion framework/doc/content/source/predictors/AdamsPredictor.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ B = - \dfrac{\Delta t}{\Delta t_{old}} (1 + \dfrac{\Delta t}{2\Delta t_{old}} +
!equation
C = \dfrac{\Delta t}{\Delta t_{old}} \dfrac{\Delta t}{2\Delta t_{older}}

with $\dfrac{\Delta t}$, $\dfrac{\Delta t_{old}}$ and $\dfrac{\Delta t_{older}}$
with $\Delta t$, $\Delta t_{old}$ and $\Delta t_{older}$
being the current, previous and antepenultimate time steps sizes.

## Example input syntax
Expand Down
4 changes: 0 additions & 4 deletions framework/include/mesh/FileMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,4 @@ class FileMesh : public MooseMesh

/// Auxiliary object for restart
std::unique_ptr<libMesh::ExodusII_IO> _exreader;

/// The requested dimension of the mesh. For some file meshes, this is not required may be implied
/// from the element type(s).
const unsigned int _dim;
};
8 changes: 7 additions & 1 deletion framework/include/mesh/MooseMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -2071,7 +2071,13 @@ MooseMesh::buildTypedMesh(unsigned int dim)
}

if (dim == libMesh::invalid_uint)
dim = getParam<MooseEnum>("dim");
{
if (isParamValid("dim"))
dim = getParam<MooseEnum>("dim");
else
// Legacy selection of the default for the 'dim' parameter
dim = 1;
}

auto mesh = std::make_unique<T>(_communicator, dim);

Expand Down
5 changes: 5 additions & 0 deletions framework/src/actioncomponents/ActionComponent.C
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ ActionComponent::validParams()
InputParameters params = Action::validParams();
params.addClassDescription("Base class for components that are defined using actions.");
params.addParam<bool>("verbose", false, "Whether the component setup should be verbose");

// These parameters should not appear. Let's suppress them for now
params.suppressParameter<std::vector<std::string>>("active");
params.suppressParameter<std::vector<std::string>>("inactive");

return params;
}

Expand Down
2 changes: 1 addition & 1 deletion framework/src/actions/MooseObjectAction.C
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ MooseObjectAction::validParams()
params.addRequiredParam<std::string>(
"type", "A string representing the Moose Object that will be built by this Action");
params.addParam<bool>("isObjectAction", true, "Indicates that this is a MooseObjectAction.");
params.addParamNamesToGroup("isObjectAction", "Advanced");
params.suppressParameter<bool>("isObjectAction");
params.addClassDescription("Base class for all the actions creating a MOOSE object");
return params;
}
Expand Down
9 changes: 5 additions & 4 deletions framework/src/executioners/FEProblemSolve.C
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ FEProblemSolve::feProblemDefaultConvergenceParams()
"before requesting halting the current evaluation and requesting "
"timestep cut for transient simulations");

params.addParamNamesToGroup("nl_max_its nl_forced_its nl_max_funcs nl_abs_tol nl_rel_tol "
"nl_rel_step_tol nl_div_tol nl_abs_div_tol n_max_nonlinear_pingpong",
"Nonlinear Solver");
params.addParamNamesToGroup(
"nl_max_its nl_forced_its nl_max_funcs nl_abs_tol nl_rel_tol "
"nl_rel_step_tol nl_abs_step_tol nl_div_tol nl_abs_div_tol n_max_nonlinear_pingpong",
"Nonlinear Solver");

return params;
}
Expand Down Expand Up @@ -195,7 +196,7 @@ FEProblemSolve::validParams()
"reuse_preconditioner_max_linear_its",
"Linear Solver");
params.addParamNamesToGroup(
"solve_type nl_abs_step_tol snesmf_reuse_base use_pre_SMO_residual "
"solve_type snesmf_reuse_base use_pre_SMO_residual "
"num_grids residual_and_jacobian_together splitting nonlinear_convergence",
"Nonlinear Solver");
params.addParamNamesToGroup(
Expand Down
4 changes: 4 additions & 0 deletions framework/src/functormaterials/FunctorMaterial.C
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ FunctorMaterial::validParams()

// Remove MaterialBase parameters that are not used
params.suppressParameter<bool>("compute");
params.suppressParameter<std::vector<BoundaryName>>("boundary");
params.suppressParameter<MooseEnum>("constant_on");
params.suppressParameter<MaterialPropertyName>("prop_getter_suffix");
params.suppressParameter<bool>("use_interpolated_state");

return params;
}
Expand Down
2 changes: 1 addition & 1 deletion framework/src/interfaces/TaggingInterface.C
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ TaggingInterface::validParams()

params.addParamNamesToGroup(
"vector_tags matrix_tags extra_vector_tags extra_matrix_tags absolute_value_vector_tags",
"Tagging");
"Contribution to tagged field data");

return params;
}
Expand Down
3 changes: 3 additions & 0 deletions framework/src/materials/MaterialPropertyInterface.C
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ MaterialPropertyInterface::validParams()
false,
"For the old and older state use projected material properties interpolated at the "
"quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.");
params.addParamNamesToGroup("use_interpolated_state prop_getter_suffix",
"Material property retrieval");

return params;
}

Expand Down
14 changes: 10 additions & 4 deletions framework/src/mesh/FileMesh.C
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ FileMesh::validParams()
{
InputParameters params = MooseMesh::validParams();
params.addRequiredParam<MeshFileName>("file", "The name of the mesh file to read");
MooseEnum dims("1=1 2 3", "1");
params.addParam<MooseEnum>("dim",
dims,
"This is only required for certain mesh formats where "
"the dimension of the mesh cannot be autodetected. "
"In particular you must supply this for GMSH meshes. "
"Note: This is completely ignored for ExodusII meshes!");
params.addParam<bool>("clear_spline_nodes",
false,
"If clear_spline_nodes=true, IsoGeometric Analyis spline nodes "
Expand All @@ -39,14 +46,12 @@ FileMesh::validParams()
}

FileMesh::FileMesh(const InputParameters & parameters)
: MooseMesh(parameters),
_file_name(getParam<MeshFileName>("file")),
_dim(getParam<MooseEnum>("dim"))
: MooseMesh(parameters), _file_name(getParam<MeshFileName>("file"))
{
}

FileMesh::FileMesh(const FileMesh & other_mesh)
: MooseMesh(other_mesh), _file_name(other_mesh._file_name), _dim(other_mesh._dim)
: MooseMesh(other_mesh), _file_name(other_mesh._file_name)
{
}

Expand All @@ -63,6 +68,7 @@ FileMesh::buildMesh()
{
TIME_SECTION("buildMesh", 2, "Reading Mesh");

// This dimension should get overriden if the mesh reader can determine the dimension
GiudGiud marked this conversation as resolved.
Show resolved Hide resolved
getMesh().set_mesh_dimension(getParam<MooseEnum>("dim"));

if (_is_nemesis)
Expand Down
3 changes: 1 addition & 2 deletions framework/src/mesh/GeneratedMesh.C
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ GeneratedMesh::validParams()
MooseEnum elem_types(LIST_GEOM_ELEM); // no default

MooseEnum dims("1=1 2 3");
params.addRequiredParam<MooseEnum>(
"dim", dims, "The dimension of the mesh to be generated"); // Make this parameter required
params.addRequiredParam<MooseEnum>("dim", dims, "The dimension of the mesh to be generated");

params.addParam<unsigned int>("nx", 1, "Number of elements in the X direction");
params.addParam<unsigned int>("ny", 1, "Number of elements in the Y direction");
Expand Down
20 changes: 7 additions & 13 deletions framework/src/mesh/MooseMesh.C
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,13 @@ MooseMesh::validParams()
true,
"If allow_renumbering=false, node and element numbers are kept fixed until deletion");

// TODO: this parameter does not belong here, it's only for FileMesh
params.addParam<bool>("nemesis",
false,
"If nemesis=true and file=foo.e, actually reads "
"foo.e.N.0, foo.e.N.1, ... foo.e.N.N-1, "
"where N = # CPUs, with NemesisIO.");

MooseEnum dims("1=1 2 3", "1");
params.addParam<MooseEnum>("dim",
dims,
"This is only required for certain mesh formats where "
"the dimension of the mesh cannot be autodetected. "
"In particular you must supply this for GMSH meshes. "
"Note: This is completely ignored for ExodusII meshes!");

params.addParam<MooseEnum>(
"partitioner",
partitioning(),
Expand Down Expand Up @@ -204,9 +197,13 @@ MooseMesh::validParams()
params.registerBase("MooseMesh");

// groups
params.addParamNamesToGroup("patch_update_strategy patch_size max_leaf_size", "Geometric search");
params.addParamNamesToGroup("nemesis", "Advanced");
params.addParamNamesToGroup(
"dim nemesis patch_update_strategy construct_node_list_from_side_list patch_size",
"Advanced");
"add_subdomain_ids add_subdomain_names add_sideset_ids add_sideset_names",
"Pre-declaration of future mesh sub-entities");
params.addParamNamesToGroup("construct_node_list_from_side_list build_all_side_lowerd_mesh",
"Automatic definition of mesh element sides entities");
params.addParamNamesToGroup("partitioner centroid_partitioner_direction", "Partitioning");

return params;
Expand Down Expand Up @@ -2812,9 +2809,6 @@ MooseMesh::determineUseDistributedMesh()
std::unique_ptr<MeshBase>
MooseMesh::buildMeshBaseObject(unsigned int dim)
{
if (dim == libMesh::invalid_uint)
dim = getParam<MooseEnum>("dim");

std::unique_ptr<MeshBase> mesh;
if (_use_distributed_mesh)
mesh = buildTypedMesh<DistributedMesh>(dim);
Expand Down
2 changes: 1 addition & 1 deletion framework/src/meshgenerators/AdvancedExtruderGenerator.C
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ AdvancedExtruderGenerator::generate()
// Original copyright: Copyright (C) 2002-2019 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
// Original license is LGPL so it can be used here.

auto mesh = buildMeshBaseObject();
auto mesh = buildMeshBaseObject(_input->mesh_dimension() + 1);
mesh->set_mesh_dimension(_input->mesh_dimension() + 1);

// Check if the element integer names are existent in the input mesh.
Expand Down
2 changes: 1 addition & 1 deletion framework/src/meshgenerators/GeneratedMeshGenerator.C
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ std::unique_ptr<MeshBase>
GeneratedMeshGenerator::generate()
{
// Have MOOSE construct the correct libMesh::Mesh object using Mesh block and CLI parameters.
auto mesh = buildMeshBaseObject();
auto mesh = buildMeshBaseObject(_dim);

if (isParamValid("extra_element_integers"))
{
Expand Down
4 changes: 4 additions & 0 deletions framework/src/meshgenerators/MeshGenerator.C
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ MeshGenerator::validParams()
params.addPrivateParam<bool>("_has_generate_data", false);
params.addPrivateParam<MooseMesh *>("_moose_mesh", nullptr);
params.addPrivateParam<bool>(data_only_param, false);
// Controls are not created early enough
params.suppressParameter<std::vector<std::string>>("control_tags");

return params;
}
Expand All @@ -70,6 +72,8 @@ MeshGenerator::MeshGenerator(const InputParameters & parameters)
if (_save_with_name == system.mainMeshGeneratorName())
paramError(
"save_with_name", "The user-defined mesh name: '", _save_with_name, "' is a reserved name");
if (getParam<bool>("nemesis") && !getParam<bool>("output"))
paramError("nemesis", "Should only be set to true if 'output=true'");
}

void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ElementIntegralVariablePostprocessor::validParams()
params.addRequiredCoupledVar("variable", "The name of the variable that this object operates on");
params.addClassDescription("Computes a volume integral of the specified variable");
params.addParam<bool>(
"use_absolute_value", false, "Whether to use abolsute value of the variable or not");
"use_absolute_value", false, "Whether to use absolute value of the variable or not");
return params;
}

Expand Down
5 changes: 3 additions & 2 deletions framework/src/problems/FEProblemBase.C
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,9 @@ FEProblemBase::validParams()
params.addParamNamesToGroup(
"null_space_dimension transpose_null_space_dimension near_null_space_dimension",
"Null space removal");
params.addParamNamesToGroup("extra_tag_vectors extra_tag_matrices extra_tag_solutions",
"Tagging");
params.addParamNamesToGroup(
"extra_tag_vectors extra_tag_matrices extra_tag_solutions not_zeroed_tag_vectors",
"Contribution to tagged field data");
params.addParamNamesToGroup(
"allow_invalid_solution show_invalid_solution_console immediately_print_invalid_solution",
"Solution validity control");
Expand Down
6 changes: 4 additions & 2 deletions framework/src/splits/Split.C
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ Split::validParams()
params.addParam<std::vector<SubdomainName>>(
"blocks", {}, "Mesh blocks Split operates on (omitting this implies \"all blocks\"");
params.addParam<std::vector<BoundaryName>>(
"sides", {}, "Sidesets Split operates on (omitting this implies \"no sidesets\"");
"sides", {}, "Sidesets Split operates on (omitting this implies \"all sidesets\")");
params.addParam<std::vector<BoundaryName>>(
"unsides",
{},
"Sidesets Split excludes (omitting this implies \"do not exclude any sidesets\"");
"Sidesets Split excludes (omitting this implies \"do not exclude any sidesets\")");
params.addParam<std::vector<std::string>>(
"splitting", {}, "The names of the splits (subsystems) in the decomposition of this split");
params.addParam<std::vector<BoundaryName>>(
Expand All @@ -40,6 +40,8 @@ Split::validParams()
params.addParam<std::vector<NonlinearVariableName>>(
"unside_by_var_var_name",
"A map from boundary name to unside by variable, e.g. only unside for a given variable.");
params.addParamNamesToGroup("sides unsides unside_by_var_boundary_name unside_by_var_var_name",
"Sideset restriction");

MooseEnum SplittingTypeEnum("additive multiplicative symmetric_multiplicative schur", "additive");
params.addParam<MooseEnum>("splitting_type", SplittingTypeEnum, "Split decomposition type");
Expand Down
6 changes: 6 additions & 0 deletions framework/src/times/Times.C
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ Times::validParams()
params.addRequiredParam<bool>("auto_broadcast",
"Wether Times should be broadcasted across all ranks");
params.addParamNamesToGroup("auto_broadcast auto_sort unique_times unique_tolerance", "Advanced");

// Unlikely to ever be used as Times do not loop over the mesh and use material properties,
// let alone stateful
params.suppressParameter<MaterialPropertyName>("prop_getter_suffix");
params.suppressParameter<bool>("use_interpolated_state");

params.registerBase("Times");
return params;
}
Expand Down
7 changes: 4 additions & 3 deletions framework/src/userobjects/UserObject.C
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ UserObject::validParams()
params.registerBase("UserObject");
params.registerSystemAttributeName("UserObject");

params.addParamNamesToGroup("use_displaced_mesh allow_duplicate_execution_on_initial "
"force_preaux force_postaux force_preic execution_order_group",
"Advanced");
params.addParamNamesToGroup("execute_on force_preaux force_postaux force_preic "
"allow_duplicate_execution_on_initial execution_order_group",
"Execution scheduling");
params.addParamNamesToGroup("use_displaced_mesh", "Advanced");
return params;
}

Expand Down
3 changes: 2 additions & 1 deletion framework/src/utils/MooseAppCoordTransform.C
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ MooseAppCoordTransform::validParams()
"than this, please use the 'alpha_rotation', 'beta_rotation', and 'gamma_rotation' "
"parameters.");
params.addParamNamesToGroup(
"block coord_type rz_coord_axis rz_coord_blocks rz_coord_origins rz_coord_directions",
"block coord_type coord_block rz_coord_axis rz_coord_blocks rz_coord_origins "
"rz_coord_directions",
"Coordinate system");
params.addParamNamesToGroup(
"length_unit alpha_rotation beta_rotation gamma_rotation up_direction",
Expand Down
3 changes: 1 addition & 2 deletions framework/src/variables/MooseVariableBase.C
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ MooseVariableBase::validParams()
"nl0",
"If this variable is a solver variable, this is the "
"solver system to which it should be added.");
params.addParamNamesToGroup("scaling eigen", "Advanced");

params.addParam<bool>("use_dual", false, "True to use dual basis for Lagrange multipliers");
params.addParamNamesToGroup("scaling eigen use_dual", "Advanced");

params.registerBase("MooseVariableBase");
params.addPrivateParam<SystemBase *>("_system_base");
Expand Down
1 change: 1 addition & 0 deletions modules/doc/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Extensions:
constraints: syntax/Constraints/index.md
controllogic: syntax/ControlLogic/index.md
controls: syntax/Controls/index.md
convergence: syntax/Convergence/index.md
GiudGiud marked this conversation as resolved.
Show resolved Hide resolved
correctors: syntax/Correctors/index.md
covariances: syntax/Covariance/index.md
dampers: syntax/Dampers/index.md
Expand Down
10 changes: 10 additions & 0 deletions modules/fluid_properties/src/fluidproperties/FluidProperties.C
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ FluidProperties::validParams()
params.set<std::string>("fp_type") = "unspecified-type";
params.addParamNamesToGroup("fp_type allow_imperfect_jacobians", "Advanced");
params.registerBase("FluidProperties");

// Suppress unused parameters
params.suppressParameter<bool>("use_displaced_mesh");
params.suppressParameter<ExecFlagEnum>("execute_on");
params.suppressParameter<bool>("allow_duplicate_execution_on_initial");
params.suppressParameter<bool>("force_preic");
params.suppressParameter<bool>("force_preaux");
params.suppressParameter<bool>("force_postaux");
params.suppressParameter<int>("execution_order_group");

return params;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ IdealRealGasMixtureFluidProperties::validParams()
"fp_secondary", "Name of fluid properties user object(s) for secondary vapor component(s)");
params.addParam<Real>("_T_mix_max", 1300., "Maximum temperature of the mixture");

// This is necessary because initialize() must be called before any interface
// can be used (which can occur as early as initialization of variables).
params.set<ExecFlagEnum>("execute_on") = EXEC_INITIAL;

return params;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Navier Stokes Flow / WCNSLinearFVFlowPhysics
# Navier Stokes Flow Segregated / WCNSLinearFVFlowPhysics

!syntax description /Physics/NavierStokes/FlowSegregated/WCNSLinearFVFlowPhysics

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Navier Stokes Linear Scalar Transport / WCNSLinearFVScalarTransportPhysics
# Navier Stokes Scalar Transport Segregated / WCNSLinearFVScalarTransportPhysics

!syntax description /Physics/NavierStokes/ScalarTransportSegregated/WCNSLinearFVScalarTransportPhysics

Expand Down
4 changes: 2 additions & 2 deletions modules/navier_stokes/src/executioners/SIMPLESolveBase.C
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ SIMPLESolveBase::validParams()
params.addParamNamesToGroup(
"momentum_equation_relaxation momentum_petsc_options momentum_petsc_options_iname "
"momentum_petsc_options_value momentum_petsc_options_value momentum_absolute_tolerance "
"momentum_l_tol momentum_l_abs_tol momentum_l_max_its",
"momentum_l_tol momentum_l_abs_tol momentum_l_max_its momentum_systems",
"Momentum Equation");

/*
Expand Down Expand Up @@ -121,7 +121,7 @@ SIMPLESolveBase::validParams()
params.addParamNamesToGroup(
"pressure_variable_relaxation pressure_petsc_options pressure_petsc_options_iname "
"pressure_petsc_options_value pressure_petsc_options_value pressure_absolute_tolerance "
"pressure_l_tol pressure_l_abs_tol pressure_l_max_its",
"pressure_l_tol pressure_l_abs_tol pressure_l_max_its pressure_system",
"Pressure Equation");

/*
Expand Down
Loading