forked from idaholab/moose
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
An example of restarting the subapp but not the master (idaholab#6297)
- Loading branch information
Showing
7 changed files
with
385 additions
and
0 deletions.
There are no files selected for viewing
84 changes: 84 additions & 0 deletions
84
test/tests/restart/restart_subapp_not_master/complete_solve_no_subapp.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
[Mesh] | ||
type = GeneratedMesh | ||
dim = 2 | ||
xmin = -1 | ||
xmax = 1 | ||
ymin = -1 | ||
ymax = 1 | ||
nx = 2 | ||
ny = 2 | ||
elem_type = QUAD9 | ||
[] | ||
|
||
[Functions] | ||
[./exact_fn] | ||
type = ParsedFunction | ||
value = t*t*(x*x+y*y) | ||
[../] | ||
|
||
[./forcing_fn] | ||
type = ParsedFunction | ||
value = 2*t*(x*x+y*y)-4*t*t | ||
[../] | ||
[] | ||
|
||
[Variables] | ||
[./u] | ||
family = LAGRANGE | ||
order = SECOND | ||
[../] | ||
[] | ||
|
||
[ICs] | ||
[./u_var] | ||
type = FunctionIC | ||
variable = u | ||
function = exact_fn | ||
[../] | ||
[] | ||
|
||
[Kernels] | ||
[./td] | ||
type = TimeDerivative | ||
variable = u | ||
[../] | ||
|
||
[./diff] | ||
type = Diffusion | ||
variable = u | ||
[../] | ||
|
||
[./ffn] | ||
type = UserForcingFunction | ||
variable = u | ||
function = forcing_fn | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
[./all] | ||
type = FunctionDirichletBC | ||
variable = u | ||
boundary = 'left right top bottom' | ||
function = exact_fn | ||
[../] | ||
[] | ||
|
||
[Postprocessors] | ||
[./average] | ||
type = ElementAverageValue | ||
variable = u | ||
[../] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
start_time = 0.0 | ||
end_time = 4.0 | ||
dt = 1.0 | ||
[] | ||
|
||
[Outputs] | ||
file_base = complete_solve_no_subapp | ||
exodus = true | ||
[] |
Binary file added
BIN
+28.1 KB
test/tests/restart/restart_subapp_not_master/gold/complete_solve_no_subapp.e
Binary file not shown.
Binary file added
BIN
+30.2 KB
test/tests/restart/restart_subapp_not_master/gold/two_step_solve_master.e
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[Tests] | ||
# only master, 0 <= t <= 4 | ||
[./complete_solve_no_subapp] | ||
type = 'Exodiff' | ||
input = 'complete_solve_no_subapp.i' | ||
exodiff = 'complete_solve_no_subapp.e' | ||
[../] | ||
# split into sub solve 0 <= t <= 2 && master 2 <= t <= 4 | ||
# also write cp files for restart case | ||
[./two_step_solve_master] | ||
type = 'Exodiff' | ||
input = 'two_step_solve_master.i' | ||
exodiff = 'two_step_solve_master.e' | ||
cli_args = 'Outputs/file_base=two_step_solve_master | ||
MultiApps/full_solve/input_files=two_step_solve_sub.i' | ||
[../] | ||
# split into sub solve 0 <= t <= 2 && master 2 <= t <= 4 | ||
# this time restart the sub but _not_ the master | ||
[./two_step_solve_master_restart] | ||
type = 'Exodiff' | ||
input = 'two_step_solve_master.i' | ||
exodiff = 'two_step_solve_master_restart.e' | ||
cli_args = 'Outputs/file_base=two_step_solve_master_restart | ||
MultiApps/full_solve/input_files=two_step_solve_sub_restart.i' | ||
prereq = two_step_solve_master | ||
skip = 'Segfault #6297' | ||
[../] | ||
[] |
105 changes: 105 additions & 0 deletions
105
test/tests/restart/restart_subapp_not_master/two_step_solve_master.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
[Mesh] | ||
type = GeneratedMesh | ||
dim = 2 | ||
xmin = -1 | ||
xmax = 1 | ||
ymin = -1 | ||
ymax = 1 | ||
nx = 2 | ||
ny = 2 | ||
elem_type = QUAD9 | ||
[] | ||
|
||
[Functions] | ||
[./exact_fn] | ||
type = ParsedFunction | ||
value = t*t*(x*x+y*y) | ||
[../] | ||
|
||
[./forcing_fn] | ||
type = ParsedFunction | ||
value = 2*t*(x*x+y*y)-4*t*t | ||
[../] | ||
[] | ||
|
||
[Variables] | ||
[./u] | ||
family = LAGRANGE | ||
order = SECOND | ||
[../] | ||
[] | ||
|
||
[ICs] | ||
active = '' | ||
[./u_var] | ||
type = FunctionIC | ||
variable = u | ||
function = exact_fn | ||
[../] | ||
[] | ||
|
||
[Kernels] | ||
[./td] | ||
type = TimeDerivative | ||
variable = u | ||
[../] | ||
|
||
[./diff] | ||
type = Diffusion | ||
variable = u | ||
[../] | ||
|
||
[./ffn] | ||
type = UserForcingFunction | ||
variable = u | ||
function = forcing_fn | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
[./all] | ||
type = FunctionDirichletBC | ||
variable = u | ||
boundary = 'left right top bottom' | ||
function = exact_fn | ||
[../] | ||
[] | ||
|
||
[Postprocessors] | ||
[./average] | ||
type = ElementAverageValue | ||
variable = u | ||
execute_on = 'initial timestep_end' | ||
[../] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
start_time = 2.0 | ||
end_time = 4.0 | ||
dt = 1.0 | ||
[] | ||
|
||
[MultiApps] | ||
[./full_solve] | ||
type = FullSolveMultiApp | ||
execute_on = initial | ||
positions = '0 0 0' | ||
##input_files = two_step_solve_sub.i | ||
[../] | ||
[] | ||
|
||
[Transfers] | ||
[./transfer_u] | ||
type = MultiAppProjectionTransfer | ||
multi_app = full_solve | ||
direction = FROM_MULTIAPP | ||
variable = u | ||
source_variable = u | ||
[../] | ||
[] | ||
|
||
[Outputs] | ||
##file_base = two_step_solve_master | ||
exodus = true | ||
[] |
86 changes: 86 additions & 0 deletions
86
test/tests/restart/restart_subapp_not_master/two_step_solve_sub.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
[Mesh] | ||
type = GeneratedMesh | ||
dim = 2 | ||
xmin = -1 | ||
xmax = 1 | ||
ymin = -1 | ||
ymax = 1 | ||
nx = 2 | ||
ny = 2 | ||
elem_type = QUAD9 | ||
[] | ||
|
||
[Functions] | ||
[./exact_fn] | ||
type = ParsedFunction | ||
value = t*t*(x*x+y*y) | ||
[../] | ||
|
||
[./forcing_fn] | ||
type = ParsedFunction | ||
value = 2*t*(x*x+y*y)-4*t*t | ||
[../] | ||
[] | ||
|
||
[Variables] | ||
[./u] | ||
family = LAGRANGE | ||
order = SECOND | ||
[../] | ||
[] | ||
|
||
[ICs] | ||
[./u_var] | ||
type = FunctionIC | ||
variable = u | ||
function = exact_fn | ||
[../] | ||
[] | ||
|
||
[Kernels] | ||
[./td] | ||
type = TimeDerivative | ||
variable = u | ||
[../] | ||
|
||
[./diff] | ||
type = Diffusion | ||
variable = u | ||
[../] | ||
|
||
[./ffn] | ||
type = UserForcingFunction | ||
variable = u | ||
function = forcing_fn | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
[./all] | ||
type = FunctionDirichletBC | ||
variable = u | ||
boundary = 'left right top bottom' | ||
function = exact_fn | ||
[../] | ||
[] | ||
|
||
[Postprocessors] | ||
[./average] | ||
type = ElementAverageValue | ||
variable = u | ||
[../] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
start_time = 0.0 | ||
end_time = 2.0 | ||
dt = 1.0 | ||
[] | ||
|
||
[Outputs] | ||
[./checkpoint] | ||
type = Checkpoint | ||
num_files = 3 | ||
[../] | ||
[] |
82 changes: 82 additions & 0 deletions
82
test/tests/restart/restart_subapp_not_master/two_step_solve_sub_restart.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
[Mesh] | ||
file = two_step_solve_master_out_full_solve0_cp/0002_mesh.cpr | ||
[] | ||
|
||
[Problem] | ||
restart_file_base = two_step_solve_master_out_full_solve0_cp/0002 | ||
[] | ||
|
||
[Functions] | ||
[./exact_fn] | ||
type = ParsedFunction | ||
value = t*t*(x*x+y*y) | ||
[../] | ||
|
||
[./forcing_fn] | ||
type = ParsedFunction | ||
value = 2*t*(x*x+y*y)-4*t*t | ||
[../] | ||
[] | ||
|
||
[Variables] | ||
[./u] | ||
family = LAGRANGE | ||
order = SECOND | ||
[../] | ||
[] | ||
|
||
[ICs] | ||
[./u_var] | ||
type = FunctionIC | ||
variable = u | ||
function = exact_fn | ||
[../] | ||
[] | ||
|
||
[Kernels] | ||
[./td] | ||
type = TimeDerivative | ||
variable = u | ||
[../] | ||
|
||
[./diff] | ||
type = Diffusion | ||
variable = u | ||
[../] | ||
|
||
[./ffn] | ||
type = UserForcingFunction | ||
variable = u | ||
function = forcing_fn | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
[./all] | ||
type = FunctionDirichletBC | ||
variable = u | ||
boundary = 'left right top bottom' | ||
function = exact_fn | ||
[../] | ||
[] | ||
|
||
[Postprocessors] | ||
[./average] | ||
type = ElementAverageValue | ||
variable = u | ||
[../] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
start_time = 0.0 | ||
end_time = 2.0 | ||
dt = 1.0 | ||
[] | ||
|
||
[Outputs] | ||
[./checkpoint] | ||
type = Checkpoint | ||
num_files = 3 | ||
[../] | ||
[] |