Skip to content

Commit

Permalink
Add test to check for required inputs for move node. Refs idaholab#21468
Browse files Browse the repository at this point in the history
  • Loading branch information
aprilnovak committed Jun 30, 2022
1 parent ec787b4 commit cad1023
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions framework/src/meshgenerators/MoveNodeGenerator.C
Expand Up @@ -24,7 +24,7 @@ MoveNodeGenerator::validParams()

params.addParam<std::vector<Point>>("new_position", "New position in vector space");
params.addParam<std::vector<Point>>("shift_position",
"Shifts to apply to the position in vector space");
"Shifts to apply to the position in vector space");

params.addClassDescription("Modifies the position of one or more nodes");

Expand All @@ -39,8 +39,8 @@ MoveNodeGenerator::MoveNodeGenerator(const InputParameters & parameters)
_shift_position(nullptr)
{
if (isParamValid("shift_position") == isParamValid("new_position"))
mooseError("You must specify either 'shift_position' or 'new_position'!; "
"you have specified either both or none");
mooseError("You must specify either 'shift_position' or 'new_position'! "
"You have specified either both or none");

if (isParamValid("new_position"))
{
Expand Down
7 changes: 7 additions & 0 deletions test/tests/meshgenerators/move_node_generator/tests
Expand Up @@ -45,4 +45,11 @@
cli_args = "Mesh/inactive='missingNode modifyNode' --mesh-only"
requirement = "The system shall error if the node position and node id arrays do not match in size"
[]
[failure_overspecified]
type = RunException
input = test3.i
cli_args = 'Mesh/modifNode/new_position="-1 0 0 0 1 0 0 2 0" --mesh-only'
expect_err = "You must specify either 'shift_position' or 'new_position'! You have specified either both or none"
requirement = "The system shall error if both shifts and positions are specified"
[]
[]

0 comments on commit cad1023

Please sign in to comment.