Skip to content

Commit

Permalink
Sqa reqs for BCs, dirackernels, images, indicators, interfaces, marke…
Browse files Browse the repository at this point in the history
…rs and materials (idaholab#55 idaholab#59 and idaholab#173).
  • Loading branch information
sveerara committed Jun 4, 2019
1 parent 11d6761 commit c344487
Show file tree
Hide file tree
Showing 18 changed files with 196 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/tests/bcs/nonreflecting_bc/tests
Original file line number Diff line number Diff line change
@@ -1,34 +1,46 @@
[tests]
design = "NonReflectingBC.md"
issues = "#12"
[./non_reflecting_bc]
type = 'Exodiff'
input = 'non_reflecting_bc_test.i'
exodiff = 'non_reflecting_bc_test_out.e'
compiler = 'GCC CLANG'
max_parallel = 1
skip = "regold after moose PR"

requirement = "The NonReflectingBC class shall accurately model absorption of shear and compressive waves that incident on the boundary."
[../]
[./displacements_error]
type = RunException
input = 'non_reflecting_bc_error.i'
cli_args = "BCs/test/displacements=disp_x"
expect_err = "The number of variables listed in the \'displacements\' parameter in \"test\" block must match the mesh dimension."

requirement = "The NonReflectingBC class shall produce an error if the number of the displacement variables is not the same as the mesh dimension."
[../]
[./velocities_error]
type = RunException
input = 'non_reflecting_bc_error.i'
cli_args = "BCs/test/velocities=disp_x"
expect_err = "The number of variables listed in the \'velocities\' parameter in \"test\" block must match the mesh dimension."

requirement = "The NonReflectingBC class shall produce an error if the number of velocity variables is not the same as the mesh dimension."
[../]
[./accelerations_error]
type = RunException
input = 'non_reflecting_bc_error.i'
cli_args = "BCs/test/accelerations=disp_x"
expect_err = "The number of variables listed in the \'accelerations\' parameter in \"test\" block must match the mesh dimension."

requirement = "The NonReflectingBC class shall produce an error if the number of acceleration variables is not the same as the mesh dimension."
[../]
[./component_error]
type = RunException
input = 'non_reflecting_bc_error.i'
cli_args = "BCs/test/component=1980"
expect_err = "The \'component\' parameter in \"test\" block should be less than mesh dimension."

requirement = "The NonReflectingBC class shall produce an error if the size of the component vector is not the same as the mesh dimension."
[../]
[]
6 changes: 6 additions & 0 deletions test/tests/bcs/seismic_displacement/tests
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
[Tests]
design = "BCs/SeismicDisplacement/index.md"
issues = "#28"
[./seismic_displacment]
type = Exodiff
input = seismic_displacement.i
exodiff = seismic_displacement_out.e

requirement = "The SeismicDisplacement action shall prescribe the user-provided displacement at the boundary."
[../]
[./action_wrong_size_error]
type = RunException
input = seismic_displacement_error.i
cli_args = "BCs/SeismicDisplacement/top_x/displacements=disp_x"
expect_err = "In the \"top_x\" block the 'displacements', 'velocities', 'accelerations', 'input_functions', and 'input_components' should be of the same size."

requirement = "The SeismicDisplacement action shall produce an error if the displacements, velocities, accelerations, input functions and input components are not of the same length."
[../]
[]
20 changes: 20 additions & 0 deletions test/tests/bcs/seismic_force/tests
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[tests]
design = "BCs/SeismicForce/index.md"
issues = "#11"
[./seismic_force_test_x_y]
type = 'Exodiff'
input = 'seismic_force_test_x_y.i'
exodiff = 'seismic_force_test_x_y_out.e'
max_parallel = 1
method = 'opt'

requirement = "The SeismicForce class shall accurately convert the user-provided input velocities to shear tractions at the boundary."
[../]
[./seismic_force_test_z]
# A minimum time step size of 0.01 is required for this problem.
Expand All @@ -15,46 +19,62 @@
method = 'opt'
rel_err = 1e-5
abs_zero = 1e-9

requirement = "The SeismicForce class shall accurately convert the user-provided input velocity to normal traction at the boundary."
[../]
[./seismic_force_compenent_mesh_error]
type = RunException
input = seismic_force_error.i
cli_args = 'BCs/front/component=1980 BCs/front/vel_component=1'
expect_err = "Invalid value for 'component' \(1980\) given in \"front\" block, it must be a value from 0 to 1."

requirement = "The SeismicForce class shall produce an error if the value provided for 'component' is greater than mesh dimension - 1."
[../]
[./seismic_force_vel_compenent_mesh_error]
type = RunException
input = seismic_force_error.i
cli_args = 'BCs/front/component=1 BCs/front/vel_component=1980'
expect_err = "Invalid value for 'vel_component' \(1980\) given in \"front\" block, it must be a value from 0 to 1."

requirement = "The SeismicForce class shall produce an error if the value provided for 'vel_component' is greater than mesh dimension - 1."
[../]
[./seismic_force_no_velocity_error]
type = RunException
input = seismic_force_error.i
cli_args = 'BCs/front/component=1 BCs/front/vel_component=1'
expect_err = "A function \('velocity_function'\) or variable \('velocity'\) describing the input velocity must be supplied in the \"front\" block."

requirement = "The SeismicForce class shall produce an error if a function or variable describing the input velocity is not supplied as input by the user."
[../]
[./action_no_velocity_error]
type = RunException
input = seismic_force_action_error.i
expect_err = "A list of functions \('velocity_functions'\) or variables \('velocities'\) describing the input velocity must be supplied in the \"front\" block."

requirement = "The SeismicForce action shall produce an error if a list of functions or variables describing the input velocity are not supplied as input by the user."
[../]
[./action_var_velocity_size_error]
type = RunException
input = seismic_force_action_error.i
cli_args = "BCs/SeismicForce/front/velocities=vel_x"
expect_err = "The number of components listed in 'input_components' must equal the number of variables in 'velocities' in the \"front\" block."

requirement = "The SeismicForce action shall produce an error if the length of the 'input_components' vector is not the same as that of the 'velocities' vector."
[../]
[./action_func_velocity_size_error]
type = RunException
input = seismic_force_action_error.i
cli_args = "BCs/SeismicForce/front/velocity_functions=func_x"
expect_err = "The number of components listed in 'input_components' must equal the number of functions in 'velocity_functions' in the \"front\" block."

requirement = "The SeismicForce action shall produce an error if the length of the 'input_components' vector is not the same as that of the 'velocity_functions' vector."
[../]
[./action_displacement_size_error]
type = RunException
input = seismic_force_action_error.i
cli_args = "BCs/SeismicForce/front/velocities='vel_x vel_y' BCs/SeismicForce/front/displacements='disp_x'"
expect_err = "The number of supplied 'displacements' must equal the mesh dimension in the \"front\" block."

requirement = "The SeismicForce action shall produce an error if the length of the displacements vector is different from the mesh dimension."
[../]
[]
14 changes: 14 additions & 0 deletions test/tests/dirackernels/function_point_force/tests
Original file line number Diff line number Diff line change
@@ -1,39 +1,53 @@
[tests]
design = "FunctionPointForce.md"
issues = "#6"
[./function_point_force_1]
type = 'Exodiff'
input = 'force_one_point.i'
exodiff = 'force_one_point_out.e'
abs_zero = 1e-06
compiler = 'GCC CLANG'

requirement = "The FunctionPointForce class shall accurately apply the force at any point within an element."
[../]
[./function_point_force_multi]
type = 'Exodiff'
input = 'force_multi_point.i'
exodiff = 'force_multi_point_out.e'
abs_zero = 1e-06
compiler = 'GCC CLANG'

requirement = "The FunctionPointForce class shall accurately apply a force at multiple points within the computational domain."
[../]
[./function_point_no_point_error]
type = RunException
input = force_error.i
expect_err = "Either the 'point' or a set of points \('x_position'\) should be given as input in the \"src\" block."

requirement = "The FunctionPointForce class shall produce an error if neither a point nor a set of points, supplied through the x, y and z position functions, are provided as input."
[../]
[./function_point_no_number_error]
type = RunException
input = force_error.i
cli_args = "DiracKernels/src/x_position='x'"
expect_err = "The 'number' parameter is required in the \"src\" block when 'x_position' function is provided."

requirement = "The FunctionPointForce class shall produce an error if the 'number' parameter is not supplied by the user when providing a set of points through the position functions."
[../]
[./function_point_no_y_position_error]
type = RunException
input = force_error.i
cli_args = "DiracKernels/src/x_position='x' DiracKernels/src/number=1"
expect_err = "The number of position functions should be equal to mesh dimension in the \"src\" block."

requirement = "The FunctionPointForce class shall produce an error x and y position functions are not provided as input for a 2D mesh."
[../]
[./function_point_no_z_position_error]
type = RunException
input = force_error.i
cli_args = "DiracKernels/src/x_position='x' DiracKernels/src/y_position='y' DiracKernels/src/number=1"
expect_err = "The number of position functions should be equal to mesh dimension in the \"src\" block."

requirement = "The FunctionPointForce class shall produce an error x, y and z position functions are not provided as input for a 3D mesh."
[../]
[]
30 changes: 30 additions & 0 deletions test/tests/dirackernels/seismic_source/tests
Original file line number Diff line number Diff line change
@@ -1,44 +1,60 @@
[Tests]
design = "SeismicSource.md"
issues = "19"
[./one_seismic_source]
type = 'Exodiff'
input = 'one_seismic_source.i'
exodiff = 'one_seismic_source_out.e'
abs_zero = 1e-06
compiler = 'GCC CLANG'

requirement = "The SeismicSource action and the SeismicSource class shall accurately apply a point source at the user-provided point within the computational domain."
[../]
[./synchronous_rupture]
type = 'Exodiff'
input = 'synchronous_rupture.i'
exodiff = 'synchronous_rupture_out.e'

requirement = "The SeismicSource action and the SeismicSource class shall accurately apply multiple point source at the user-provided points within the computational domain, and also trigger all these point sources to rupture at the same time instant."
[../]
[./asynchronous_rupture]
type = 'Exodiff'
input = 'asynchronous_rupture.i'
exodiff = 'asynchronous_rupture_out.e'

requirement = "The SeismicSource action and the SeismicSource class shall accurately apply multiple point sources at the user-provided points within the computational domain, and also trigger the point sources to rupture with a time delay calculated based on the rupture velocity and the distance of the point source from the epicenter."
[../]
[./displacement_error]
type = 'RunException'
input = 'seismic_source_error.i'
cli_args = 'DiracKernels/SeismicSource/one_source/displacements=disp_x'
expect_err = "Error in one_source. The number of displacement variables must match the mesh dimension."

requirement = "The SeismicSource class shall produce an error when the number of provided displacement variables does not match the mesh dimension."
[../]
[./point_error]
type = 'RunException'
input = 'seismic_source_error.i'
expect_err = "Error in mastodon_seismic_source0. Either a point of a set of points should be given as input."

requirement = "The SeismicSource class shall produce an error if neither the point nor the set of points at which the source is located is not supplied as input.."
[../]
[./number_error]
type = 'RunException'
input = 'seismic_source_error.i'
cli_args = "DiracKernels/SeismicSource/one_source/position_function='pos'"
expect_err = "Error in mastodon_seismic_source0. Please specify number of source points defined in the function."

requirement = "The SeismicSource class shall produce an error when a position_function is used to define the set of source points, but the number of source points is not supplied as input."
[../]
[./position_number_error]
type = 'RunException'
input = 'seismic_source_error.i'
cli_args = "DiracKernels/SeismicSource/one_source/position_function='pos'
DiracKernels/SeismicSource/one_source/number=3"
expect_err = "Error in mastodon_seismic_source0. The number of position functions should be equal to mesh dimension."

requirement = "The SeismicSource class shall produce an error when the number of position functions does not match the mesh dimension."
[../]
[./no_rupture_speed_error]
type = 'RunException'
Expand All @@ -47,6 +63,8 @@
DiracKernels/SeismicSource/one_source/number=3
DiracKernels/SeismicSource/one_source/epicenter='0.2 0.2 0.2'"
expect_err = "Error in mastodon_seismic_source0. Either both rupture speed and epicenter should be provided or neither should be provided."

requirement = "The SeismicSource class shall produce an error if only the epicenter is provided as input, but not the rupture speed."
[../]
[./no_epicenter_error]
type = 'RunException'
Expand All @@ -55,6 +73,8 @@
DiracKernels/SeismicSource/one_source/number=3
DiracKernels/SeismicSource/one_source/rupture_speed=1"
expect_err = "Error in mastodon_seismic_source0. Either both rupture speed and epicenter should be provided or neither should be provided."

requirement = "The SeismicSource class shall produce an error if only the rupture speed is provided as input, but not the epicenter."
[../]
[./epicenter_number_error]
type = 'RunException'
Expand All @@ -64,6 +84,8 @@
DiracKernels/SeismicSource/one_source/rupture_speed=1
DiracKernels/SeismicSource/one_source/epicenter=0.2"
expect_err = "Error in mastodon_seismic_source0. Epicenter should be same size as mesh dimension."

requirement = "The SeismicSource class shall produce an error if the length of the epicenter vector is not the same as the mesh dimension."
[../]
[./point_rupture_speed]
type = 'RunException'
Expand All @@ -73,6 +95,8 @@
DiracKernels/SeismicSource/one_source/rupture_speed=1
DiracKernels/SeismicSource/one_source/epicenter=0.2"
expect_err = "Error in mastodon_seismic_source0. Rupture speed and epicenter should only be provided when multiple point sources are specified."

requirement = "The SeismicSource class shall produce an error if the epicenter and rupture speed are provided as input for a single seismic source."
[../]
[./negative_speed_error]
type = 'RunException'
Expand All @@ -82,15 +106,21 @@
DiracKernels/SeismicSource/one_source/rupture_speed=-1
DiracKernels/SeismicSource/one_source/epicenter='0.2 0.2 0.2'"
expect_err = "Error in mastodon_seismic_source0. Rupture speed has to be positive."

requirement = "The SeismicSource class shall produce an error if the user-provided rupture speed is not positive."
[../]
[./2D_non_strike_error]
type = 'RunException'
input = '2D_seismic_source_error.i'
expect_err = "Error in mastodon_seismic_source0. A non-zero strike angle for 2D models will create an out-of-plane earthquake wave. This is currently not supported."

requirement = "The SeismicSource class shall produce a warning if a non-zero strike angle is provided as input for 2D models, indicating that out-of-plane earthquake waves would be generated."
[../]
[./1D_error]
type = 'RunException'
input = '1D_seismic_source_error.i'
expect_err = "Error in mastodon_seismic_source0. Only mesh dimensions of 2 and 3 are currently supported."

requirement = "The SeismicSource class shall produce an error if it is used on a 1D mesh."
[../]
[]
4 changes: 4 additions & 0 deletions test/tests/images/tests
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
input = three_layer.i
exodiff = three_layer_out.e
vtk = true

design = "ImageFunction.md"
issues = "#2"
requirement = "The ImageFunction class shall accurately read the layer variable values from the 2D soil layer profile presented in the image."
[../]
[]
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@
min_parallel = 2
vtk = true
method = opt

design = "LayerInterfaceIndicator.md ShearWaveIndicator.md"
issues = "#2"
requirement = "The LayerInterfaceIndicator and ShearWaveIndicator classes shall accurately mesh the soil domain taking into account the variation in shear wave velocity across soil layers, as well as the location soil layer interfaces."
[../]
[]
4 changes: 4 additions & 0 deletions test/tests/indicators/interface_indicator/tests
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
input = interface_indicator.i
exodiff = interface_indicator_out.e
vtk = true

design = "LayerInterfaceIndicator.md"
issues = "#2"
requirement = "The LayerInterfaceIndicator class shall accurately mesh the soil domain taking into account the location soil layer interfaces."
[../]
[]
4 changes: 4 additions & 0 deletions test/tests/indicators/shear_wave_indicator/tests
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
input = shear_wave_indicator.i
exodiff = shear_wave_indicator_out.e
vtk = true

design = "ShearWaveIndicator.md"
issues = "#2"
requirement = "The ShearWaveIndicator class shall accurately mesh the soil domain taking into account the variation in shear wave velocity across soil layers."
[../]
[]
6 changes: 6 additions & 0 deletions test/tests/interfaces/layered_material/tests
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
[Tests]
design = "LayeredMaterialInterface.md"
issues = "#13"
[./doc_string_error]
type = RunException
input = doc_string_error.i
expect_err = "The documentation for the 'layer_ids' parameter must be modified using InputParameters::setDocString in the validParams function to include information on the parameters which the layer ids correspond."
allow_test_objects = True

requirement = "The LayeredMaterialInterface class shall produce an error if the parent class does not set the documentation for the 'layer_ids' parameter."
[../]
[./type_error]
type = RunException
input = type_error.i
expect_err = "The LayeredMaterialInterface requires that the template class be a Material object."
allow_test_objects = True

requirement = "The LayeredMaterialInterface class shall produce an error if the template class is not a Material object."
[../]
[]
4 changes: 4 additions & 0 deletions test/tests/markers/minimum_element_size/tests
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
exodiff = minimum_element_size_out.e
vtk = true
[../]

design = "MinimumElementSizeMarker.md"
issues = "#2"
requirement = "The MinimumElementSizeMarker shall accurately mark an element for mesh refinement if the minimum element size is greater than that recommended by the ShearWaveIndicator."
[]
Loading

0 comments on commit c344487

Please sign in to comment.