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.
Conservative transfers: added a test
that uses MultiAppCopyTransfer. But the code should work for other field transferes Refs idaholab#12948
- Loading branch information
Showing
5 changed files
with
143 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+39.7 KB
test/tests/transfers/multiapp_conservative_transfer/gold/master_out.e
Binary file not shown.
Binary file added
BIN
+31.2 KB
test/tests/transfers/multiapp_conservative_transfer/gold/master_out_sub0.e
Binary file not shown.
75 changes: 75 additions & 0 deletions
75
test/tests/transfers/multiapp_conservative_transfer/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,75 @@ | ||
[Mesh] | ||
type = GeneratedMesh | ||
dim = 2 | ||
nx = 10 | ||
ny = 10 | ||
[] | ||
|
||
[Variables] | ||
[./u] | ||
[../] | ||
[] | ||
|
||
[Kernels] | ||
[./diff] | ||
type = Diffusion | ||
variable = u | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
[./left] | ||
type = DirichletBC | ||
variable = u | ||
boundary = left | ||
value = 0 | ||
[../] | ||
[./right] | ||
type = DirichletBC | ||
variable = u | ||
boundary = right | ||
value = 1 | ||
[../] | ||
[] | ||
|
||
[Executioner] | ||
type = Steady | ||
solve_type = 'PJFNK' | ||
petsc_options_iname = '-pc_type -pc_hypre_type' | ||
petsc_options_value = 'hypre boomeramg' | ||
[] | ||
|
||
[MultiApps] | ||
[./sub] | ||
type = FullSolveMultiApp | ||
input_files = sub.i | ||
execute_on = timestep_end | ||
[../] | ||
[] | ||
|
||
[Postprocessors] | ||
[./from_postprocessor] | ||
type = ElementIntegralVariablePostprocessor | ||
variable = u | ||
execute_on = 'INITIAL nonlinear TIMESTEP_END' | ||
[../] | ||
[] | ||
|
||
[Transfers] | ||
[./to_sub] | ||
type = MultiAppCopyTransfer | ||
direction = to_multiapp | ||
source_variable = u | ||
variable = u | ||
preserve_transfer = true | ||
multi_app = sub | ||
[../] | ||
[] | ||
|
||
[Outputs] | ||
exodus = true | ||
[./console] | ||
type = Console | ||
execute_postprocessors_on = 'INITIAL nonlinear TIMESTEP_END' | ||
[../] | ||
[] |
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,57 @@ | ||
[Mesh] | ||
type = GeneratedMesh | ||
dim = 2 | ||
nx = 10 | ||
ny = 10 | ||
[] | ||
|
||
[Variables] | ||
[./u] | ||
[../] | ||
[] | ||
|
||
[Kernels] | ||
[./diff] | ||
type = Diffusion | ||
variable = u | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
[./left] | ||
type = DirichletBC | ||
variable = u | ||
boundary = left | ||
value = 0 | ||
[../] | ||
[./right] | ||
type = DirichletBC | ||
variable = u | ||
boundary = right | ||
value = 1 | ||
[../] | ||
[] | ||
|
||
[Postprocessors] | ||
[./to_postprocessor] | ||
type = ElementIntegralVariablePostprocessor | ||
variable = u | ||
execute_on = 'INITIAL nonlinear TIMESTEP_END' | ||
[../] | ||
[] | ||
|
||
[Problem] | ||
type = FEProblem | ||
[] | ||
|
||
[Executioner] | ||
type = Steady | ||
solve_type = 'PJFNK' | ||
nl_abs_tol = 1e-12 | ||
petsc_options_iname = '-pc_type -pc_hypre_type' | ||
petsc_options_value = 'hypre boomeramg' | ||
[] | ||
|
||
[Outputs] | ||
exodus = true | ||
[] |
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,11 @@ | ||
[Tests] | ||
issues = '#12948' | ||
design = '/MultiAppCopyTransfer.md' | ||
[./conservative_transfer] | ||
# Tests transfer between linear Lagrange nonlinear variable | ||
type = Exodiff | ||
input = master.i | ||
exodiff = 'master_out.e master_out_sub0.e' | ||
requirement = 'MOOSE shall support conservative transfers' | ||
[../] | ||
[] |