Skip to content

Commit

Permalink
Add requirement docs to 'tests/controls'
Browse files Browse the repository at this point in the history
(refs #9638)
  • Loading branch information
aeslaughter committed Sep 4, 2018
1 parent 3688eee commit 0211e32
Show file tree
Hide file tree
Showing 23 changed files with 91 additions and 15 deletions.
2 changes: 1 addition & 1 deletion python/MooseDocs/extensions/sqa.py
Expand Up @@ -100,7 +100,7 @@ def defaultSettings():
"the 'link' setting must be true.")
config['link-issues'] = (True, "Enable/disable the link of the test issues only, " \
"the 'link' setting must be true.")
config['link-prerequisites'] = (True, "Enable/disable the link of the test prerequisites, " \
config['link-prerequisites'] = (True, "Enable/disable the link of the test prerequisites, "\
"the 'link' setting must be true.")

return config
Expand Down
6 changes: 5 additions & 1 deletion test/tests/controls/control_connection/tests
@@ -1,12 +1,16 @@
[Tests]
[./direct]
issues = '#9087 #5676'
design = 'syntax/Controls/index.md'
[./direct]
type = Exodiff
input = control_connection.i
exodiff = control_connection_out.e
requirement = "The MOOSE control system shall allow parameters from differing objects, with differing names to be associated and changed together."
[../]
[./alias]
type = Exodiff
input = alias_connection.i
exodiff = alias_connection_out.e
requirement = "The MOOSE control system shall allow parameters from objects to be assigned aliases for the purpose of changing the value."
[../]
[]
3 changes: 3 additions & 0 deletions test/tests/controls/dependency/tests
@@ -1,7 +1,10 @@
[Tests]
issues = '#9483 #5676'
design = 'syntax/Controls/index.md'
[./test]
type = 'CSVDiff'
input = 'test.i'
csvdiff = 'test_out.csv'
requirement = "The Control system shall support explicitly defined dependencies."
[../]
[]
8 changes: 8 additions & 0 deletions test/tests/controls/error/tests
@@ -1,10 +1,13 @@
[Tests]
issues = '#5676'
design = 'syntax/Controls/index.md'
[./non_controllable_error]
# Test non-controllable parameter error
type = RunException
input = 'non_controllable_error.i'
expect_err = "The desired parameter 'Kernels/diff/non_controllable"
match_literal = true
requirement = "The Control system shall error if an attempt to alter a non-controllable parameter is performed."
[../]

[./multiple_params_found_warning]
Expand All @@ -13,6 +16,7 @@
input = 'multiple_parameters_found.i'
expect_out = "The following controlled parameters are being retrieved"
allow_warnings = true
requirement = "The Control system shall error if multiple controllable parameters exists, but only a single parameter is expected to be controlled."
[../]

[./no_param_found]
Expand All @@ -21,6 +25,7 @@
input = 'no_parameter_found.i'
expect_err = "The desired parameter 'unknown_param_name' was not located"
match_literal = true
requirement = "The Control system shall error if an unknown parameter is supplied for control."
[../]

[./tid_warehouse_error]
Expand All @@ -29,19 +34,22 @@
input = 'tid_warehouse_error.i'
expect_err = "Attempting to access a thread id \(12345\) greater than the number allowed by the storage item \(1\)"
method = 'dbg'
requirement = "The Control system shall error if a thread id greater than the number of threads available is supplied when retrieving a Control object."
[../]

[./disable_executioner]
# Test that certain objects (e.g., Executioner) may not be disabled
type = RunException
input = 'disable_executioner.i'
expect_err = "The desired parameter 'Executioner::\*/enable"
requirement = "The Control system shall error if an attempt is made to disable the Executioner."
[../]

[./non_existing_dependency]
# Test that non existing dependency errors out properly
type = RunException
input = 'non_existing_dependency.i'
expect_err = "The Control \"no-control\" was not created, did you make a spelling mistake or forget to include it in your input file\?"
requirement = "The Control system shall error if an invalid control name is supplied to the Control dependency resolution procedure."
[../]
[]
4 changes: 4 additions & 0 deletions test/tests/controls/moose_base_naming_access/tests
@@ -1,15 +1,19 @@
[Tests]
issues = '#5676'
design = 'syntax/Controls/index.md'
[./base_object_param]
# Test that all aspects of the name may be specified using base class name
type = Exodiff
input = base_object_param.i
exodiff = base_object_param_out.e
requirement = "The Control system shall support the modification of a single parameter using the objects base class name, object name, and parameter name."
[../]

[./base_param]
# Test that all objects with the same name change, in the same system may be changed
type = Exodiff
input = base_param.i
exodiff = base_param_out.e
requirement = "The Control system shall support the modification of multiple parameters using the objects base class and the parameter name."
[../]
[]
7 changes: 7 additions & 0 deletions test/tests/controls/output/tests
@@ -1,25 +1,32 @@
[Tests]
issues = '#5676'
design = 'syntax/Controls/index.md source/outputs/ControlOutput.md'
[./test]
type = RunApp
input = controllable.i
expect_out = "Controls:.*Active Controls:.*Active Controls:"
requirement = "The Control system shall include a means to output information regarding the controlled parameters."
[../]
[./clear]
type = RunApp
input = controllable_clear.i
expect_out = "Controls:.*Active Controls:"
absent_out = "Controls:.*Active Controls:.*Active Controls:"
requirement = "The Control system shall include a means to output information regarding the controlled parameters, including only showing information regarding a parameter if it has changed since the last output."
[../]
[./cli_args]
type = RunApp
input = controllable.i
cli_args = "--show-controls"
expect_out = "Controls:.*Active Controls:"
absent_out = "Controls:.*Active Controls:.*Active Controls:"
requirement = "MOOSE shall include a command line flag for displaying controllable parameter information."

[../]
[./active]
type = RunApp
input = controllable.i
expect_out = "Active\sObjects:.*Problem::"
requirement = "The Control system shall include a means to output information regarding the objects with controllable parameters."
[../]
[]
10 changes: 0 additions & 10 deletions test/tests/controls/real_function_control/real_function_control.i
@@ -1,13 +1,3 @@
###########################################################
# This is a test of the Control Logic System. This test
# uses the RealFunctionControl to change a Kernel
# coefficient based on an analytical function at the end
# of each timestep.
#
# @Requirement F8.10
###########################################################


[Mesh]
type = GeneratedMesh
dim = 2
Expand Down
6 changes: 4 additions & 2 deletions test/tests/controls/real_function_control/tests
@@ -1,15 +1,17 @@
[Tests]
issues = '#5676'
design = 'syntax/Controls/index.md source/controls/RealFunctionControl.md'
[./single]
type = 'CSVDiff'
input = 'real_function_control.i'
csvdiff = 'real_function_control_out.csv'
group = 'requirements'
requirement = "The Control system shall allow a scalar parameter to be controlled with a function."
[../]

[./multiple]
type = 'CSVDiff'
input = 'multi_real_function_control.i'
csvdiff = 'multi_real_function_control_out.csv'
group = 'requirements'
requirement = "The Control system shall allow multiple scalar parameters to be controlled with a function."
[../]
[]
6 changes: 6 additions & 0 deletions test/tests/controls/syntax_based_naming_access/tests
@@ -1,29 +1,35 @@
[Tests]
issues = '#5676'
design = 'syntax/Controls/index.md'
[./param]
# Test that all parameters with the same name change
type = Exodiff
input = param.i
exodiff = param_out.e
requirement = "The Control system shall allow multiple parameters to be changed by the parameter name alone using input syntax format."
[../]

[./object_param]
# Test that all objects with the same name change
type = Exodiff
input = object_param.i
exodiff = object_param_out.e
requirement = "The Control system shall allow multiple parameters to be changed given the object and parameter names using input syntax format."
[../]

[./system_object_param]
# Test that all aspects of the name may be specified using base class name
type = Exodiff
input = system_object_param.i
exodiff = system_object_param_out.e
requirement = "The Control system shall allow for a single parameter to be changes given the input syntax, object name, and parameter name."
[../]

[./system_asterisk_param]
# Test that all objects with the same name change, in the same system may be changed
type = Exodiff
input = system_asterisk_param.i
exodiff = system_asterisk_param_out.e
requirement = "The Control system shall allow for multiple parameters to be changed given input syntax and a parameter name."
[../]
[]
7 changes: 6 additions & 1 deletion test/tests/controls/tag_based_naming_access/tests
@@ -1,32 +1,37 @@
[Tests]
# The following tests replecate the 'syntax_based_naming_access' using tags,
# thus the naming is the same to correspond with the differing syntax

issues = '#5676'
design = 'syntax/Controls/index.md'
[./param]
# Test that all parameters with the same name change
type = Exodiff
input = param.i
exodiff = param_out.e
requirement = "The Control system shall allow multiple parameters to be changed by the parameter name alone using a tag."
[../]

[./object_param]
# Test that all objects with the same name change
type = Exodiff
input = object_param.i
exodiff = object_param_out.e
requirement = "The Control system shall allow multiple parameters to be changed given a tag and parameter names, given a tag assigned across input blocks."
[../]

[./system_object_param]
# Test that all aspects of the name may be specified using base class name
type = Exodiff
input = system_object_param.i
exodiff = system_object_param_out.e
requirement = "The Control system shall allow for a single parameter to be changes given a tag and parameter name, given a tag assigned to a single object."
[../]

[./system_asterisk_param]
# Test that all objects with the same name change, in the same system may be changed
type = Exodiff
input = system_asterisk_param.i
exodiff = system_asterisk_param_out.e
requirement = "The Control system shall allow for multiple parameters to be changed given a tag and a parameter name, given a tag assigned within a single input block on multiple objects."
[../]
[]
3 changes: 3 additions & 0 deletions test/tests/controls/time_periods/aux_kernels/tests
@@ -1,8 +1,11 @@
[Tests]
issues = '#5676'
design = 'syntax/Controls/index.md source/controls/TimePeriod.md'
[./test]
# Test the ability to control multiple AuxKernels
type = Exodiff
input = 'control.i'
exodiff = 'control_out.e'
requirement = "The Control system shall be capable of activating or deactivating AuxKernel objects with time."
[../]
[]
4 changes: 4 additions & 0 deletions test/tests/controls/time_periods/aux_scalar_kernels/tests
@@ -1,15 +1,19 @@
[Tests]
issues = '#5676'
design = 'syntax/Controls/index.md source/controls/TimePeriod.md'
[./multi_same_times]
# Test the ability to control multiple AuxScalarKernels with the same start/end times
type = CSVDiff
input = 'control.i'
csvdiff = 'control_out.csv'
requirement = "The Control system shall be capable of activating or deactivating AuxScalarKernel objects with time, given identical start end times."
[../]

[./multi_different_times]
# Test the ability to control multiple AuxScalarKernels with different start/end times
type = CSVDiff
input = 'control_different.i'
csvdiff = 'control_different_out.csv'
requirement = "The Control system shall be capable of activating or deactivating AuxScalarKernel objects with time, given differing start end times."
[../]
[]
4 changes: 4 additions & 0 deletions test/tests/controls/time_periods/bcs/tests
@@ -1,12 +1,16 @@
[Tests]
issues = '#5676'
design = 'syntax/Controls/index.md source/controls/TimePeriod.md'
[./dirichlet]
type = Exodiff
input = bcs.i
exodiff = bcs_out.e
requirement = "The Control system shall be capable of activating or deactivating NodalBC objects with time."
[../]
[./integrated]
type = Exodiff
input = bcs_integrated.i
exodiff = bcs_integrated_out.e
requirement = "The Control system shall be capable of activating or deactivating IntegratedBC objects with time."
[../]
[]
3 changes: 3 additions & 0 deletions test/tests/controls/time_periods/constraints/tests
@@ -1,8 +1,11 @@
[Tests]
issues = '#5676'
design = 'syntax/Controls/index.md source/controls/TimePeriod.md'
[./test]
# Test ability to disable/enable constraints
type = Exodiff
input = 'constraints.i'
exodiff = 'constraints_out.e'
requirement = "The Control system shall be capable of activating or deactivating Constraint objects with time."
[../]
[]
5 changes: 5 additions & 0 deletions test/tests/controls/time_periods/dampers/tests
@@ -1,22 +1,27 @@
[Tests]
issues = '#5676'
design = 'syntax/Controls/index.md source/controls/TimePeriod.md'
[./enable_false]
# Tests that MooseObject parameter operates correctly when set to 'false'
type = RunApp
input = 'enable_disable.i'
absent_out = '6\s*Nonlinear'
cli_args = "Dampers/const_damp/enable=false"
requirement = "MOOSE shall support the disabling an object using an input parameter."
[../]
[./enable_true]
# Tests that MooseObject parameter operates correctly when set to 'true'
type = RunApp
input = 'enable_disable.i'
expect_out = '6\s*Nonlinear'
cli_args = "Dampers/const_damp/enable=true"
requirement = "MOOSE shall support the enabling an object using an input parameter."
[../]
[./control]
# Test that a damper may be disabled during simulation
type = CSVDiff
input = 'control.i'
csvdiff = control_out.csv
requirement = "The Control system shall be capable of activating or deactivating Damper objects with time."
[../]
[]
3 changes: 3 additions & 0 deletions test/tests/controls/time_periods/dgkernels/tests
@@ -1,7 +1,10 @@
[Tests]
issues = '#5676'
design = 'syntax/Controls/index.md source/controls/TimePeriod.md'
[./test]
type = Exodiff
input = dgkernels.i
exodiff = dgkernels_out.e
requirement = "The Control system shall be capable of activating or deactivating DGKernel objects with time."
[../]
[]
3 changes: 3 additions & 0 deletions test/tests/controls/time_periods/dirackernels/tests
@@ -1,7 +1,10 @@
[Tests]
issues = '#5676'
design = 'syntax/Controls/index.md source/controls/TimePeriod.md'
[./test]
type = Exodiff
input = 'dirac.i'
exodiff = 'dirac_out.e'
requirement = "The Control system shall be capable of activating or deactivating DiracKernel objects with time."
[../]
[]

0 comments on commit 0211e32

Please sign in to comment.