Skip to content

Commit

Permalink
Add tests for improvements to MultiAppCopyTransfer
Browse files Browse the repository at this point in the history
  • Loading branch information
aeslaughter committed Jul 18, 2019
1 parent c9f290f commit 6dacb2c
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 0 deletions.
34 changes: 34 additions & 0 deletions test/tests/transfers/multiapp_copy_transfer/aux_to_aux/from_sub.i
@@ -0,0 +1,34 @@
[Problem]
solve = false
[]

[Mesh]
type = GeneratedMesh
dim = 2
[]

[MultiApps/sub]
type = TransientMultiApp
input_files = sub.i
[]

[Transfers/from_sub]
type = MultiAppCopyTransfer
direction = from_multiapp
multi_app = sub
source_variable = aux
variable = x
[]

[AuxVariables/x]
[]

[Executioner]
type = Transient
num_steps = 1
[]

[Outputs]
execute_on = 'FINAL'
exodus = true
[]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
22 changes: 22 additions & 0 deletions test/tests/transfers/multiapp_copy_transfer/aux_to_aux/sub.i
@@ -0,0 +1,22 @@
[Problem]
type = FEProblem
solve = false
[]

[Mesh]
type = GeneratedMesh
dim = 2
[]

[AuxVariables/aux]
initial_condition = 1980
[]

[Executioner]
type = Transient
[]

[Outputs]
execute_on = 'FINAL'
exodus = true
[]
44 changes: 44 additions & 0 deletions test/tests/transfers/multiapp_copy_transfer/aux_to_aux/tests
@@ -0,0 +1,44 @@
[Tests]
issues = '#13754'
design = 'MultiAppCopyTransfer.md'

[transfer]
requirement = "The system shall support the transfer of auxiliary field variables between identical meshes:"
[from_sub_to_master]
type = Exodiff
input = from_sub.i
exodiff = 'from_sub_out.e from_sub_out_sub0.e'

detail = 'from a sub-application and'
[]

[to_sub_to_master]
type = Exodiff
input = to_sub.i
exodiff = 'to_sub_out.e to_sub_out_sub0.e'

detail = 'to a sub-application.'
[]
[]

[errors]
requirement = "The system shall error if a variable, during a direct copy of auxiliary field variables, does not exist"
[error_from_sub_to_master]
type = RunException
input = from_sub.i
cli_args = 'sub0:AuxVariables/active="" sub0:Outputs/exodus=false'
expect_err = "The variable 'aux' does not exist."

detail = "in the sub-application when transferring form it and"
[]

[error_to_sub_to_master]
type = RunException
input = to_sub.i
cli_args = 'AuxVariables/active="" Outputs/exodus=false'
expect_err = "The variable 'x' does not exist."

detail = "in the master application when transferring for it."
[]
[]
[]
35 changes: 35 additions & 0 deletions test/tests/transfers/multiapp_copy_transfer/aux_to_aux/to_sub.i
@@ -0,0 +1,35 @@
[Problem]
solve = false
[]

[Mesh]
type = GeneratedMesh
dim = 2
[]

[MultiApps/sub]
type = TransientMultiApp
input_files = sub.i
[]

[Transfers/from_sub]
type = MultiAppCopyTransfer
direction = to_multiapp
multi_app = sub
source_variable = x
variable = aux
[]

[AuxVariables/x]
initial_condition = 1949
[]

[Executioner]
type = Transient
num_steps = 1
[]

[Outputs]
execute_on = 'FINAL'
exodus = true
[]

0 comments on commit 6dacb2c

Please sign in to comment.