Skip to content

Commit

Permalink
Re-organize exception checking for refinement mesh generators
Browse files Browse the repository at this point in the history
Add test for new exception
refs idaholab#18913 idaholab#18686
  • Loading branch information
GiudGiud committed Jul 7, 2023
1 parent 3fcc59a commit c4aeb74
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 13 deletions.
23 changes: 17 additions & 6 deletions test/tests/meshgenerators/refine_block_generator/tests
Expand Up @@ -31,11 +31,22 @@
[]
[]

[invalid_block]
type = RunException
input = test_single.i
cli_args = 'Mesh/refine/block="missing"'
expect_err = "The block 'missing' was not found within the mesh"
requirement = "The system shall error if attempting to refine a block that does not exist in the mesh."
[errors]
requirement = "The system shall error if "
[invalid_block]
type = RunException
input = test_single.i
cli_args = 'Mesh/refine/block="missing"'
expect_err = "The block 'missing' was not found within the mesh"
detail = "attempting to refine a block that does not exist in the mesh, and "
[]
[wrong_size_inputs]
type = RunException
input = test_single.i
cli_args = 'Mesh/refine/refinement="1 2"'
expect_err = "The blocks and refinement vectors should be the same size"
detail = "specifying a vector of refinement levels that does not match the vector of "
"subdomains to refine."
[]
[]
[]
25 changes: 18 additions & 7 deletions test/tests/meshgenerators/refine_sideset_generator/tests
Expand Up @@ -29,12 +29,23 @@
detail = 'both the neighboring elements of, and the elements along, a specified boundary'
[]
[]
[failureBoundary]
type = 'RunException'
input = 'test_multi.i'
recover = false
cli_args = "Mesh/refine/boundaries='foo' --mesh-only"
expect_err = "The boundary *"
requirement = 'The system shall error if the specified boundary to be refined does not exist'
[errors]
requirement = "The system shall error if "
[missing_boundary]
type = 'RunException'
input = 'test_multi.i'
recover = false
cli_args = "Mesh/refine/boundaries='foo' --mesh-only"
expect_err = "The boundary *"
requirement = 'the specified boundary to be refined does not exist and'
[]
[wrong_size_inputs]
type = RunException
input = test_left.i
cli_args = 'Mesh/refine/refinement="1 2"'
expect_err = "The blocks and refinement vectors should be the same size"
detail = "specifying a vector of refinement levels that does not match the vector of "
"boundaries to refine."
[]
[]
[]

0 comments on commit c4aeb74

Please sign in to comment.