Skip to content

Commit

Permalink
Add test with negative time and sub-cycling. Close idaholab#15766
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentlaboure authored and loganharbour committed Oct 31, 2020
1 parent 965d0ca commit 04d3d90
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
64 changes: 64 additions & 0 deletions test/tests/multiapps/sub_cycling/main_negative.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]

[Variables]
[./u]
[../]
[]

[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]

[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]

[Executioner]
type = Transient
start_time = -1.0
end_time = 0
dt = 0.5

solve_type = 'PJFNK'

petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]

[Outputs]
exodus = true
[]

[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0 0 0'
input_files = sub.i
sub_cycling = true
[../]
[]
57 changes: 57 additions & 0 deletions test/tests/multiapps/sub_cycling/sub_negative.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]

[Variables]
[./u]
[../]
[]

[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]

[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]

[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'

start_time = -1.0
end_time = 0

[TimeStepper]
type = IterationAdaptiveDT
cutback_factor = 0.666
dt = 0.2
[]
[]

[Outputs]
exodus = true
[]
9 changes: 9 additions & 0 deletions test/tests/multiapps/sub_cycling/tests
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,13 @@

requirement = "The system shall support the execution of sub-application that operate with adaptive time steps that differ from the master application."
[]
[test_negative_time]
# test that sub-cycling with negative times does not make the main and sub-app out-of-sync
type = 'Exodiff'
input = 'main_negative.i'
exodiff = 'main_negative_out.e main_negative_out_sub0.e'

issues = '#15766'
requirement = "The system shall support sub-cycling with negative times by particularly ensuring that the sub-app does not advance further than the main app."
[]
[]

0 comments on commit 04d3d90

Please sign in to comment.