Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tet10 Two-way Transfer Test #43

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
time,l2_difference
0,0
1,0
7 changes: 7 additions & 0 deletions test/tests/unit/transfers/tests
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
requirement = 'Apollo shall have the ability to transfer from MFEM to MOOSE using second-order hex27 elements.'
max_parallel = 1
[]
[./TwoWayTet10Transfer]
type = 'CSVDiff'
input = 'two_way_tet10_transfer_master.i'
csvdiff = 'two_way_tet10_transfer_master_out.csv'
requirement = 'Apollo shall have the ability to transfer between MOOSE and MFEM using second-order tet10 elements.'
max_parallel = 1
[]
[./OneWayTet10Transfer]
type = 'CSVDiff'
input = 'one_way_tet10_transfer_master.i'
Expand Down
118 changes: 118 additions & 0 deletions test/tests/unit/transfers/two_way_tet10_transfer_master.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
[Mesh]
type = CoupledMFEMMesh
file = gold/mug-tet10.e
dim = 3
[]

[Variables]
[./moose_diffused]
family = LAGRANGE
order = SECOND
[../]
[]

[AuxVariables]
[./temperature_moose]
family = LAGRANGE
order = SECOND
[../]

[./temperature_mfem]
family = LAGRANGE
order = SECOND
[../]
[]

[Kernels]
[diff]
type = Diffusion
variable = moose_diffused
[]
[]

[BCs]
[bottom]
type = DirichletBC
variable = moose_diffused
boundary = 'bottom'
value = 1
[]

[top]
type = DirichletBC
variable = moose_diffused
boundary = 'top'
value = 0
[]
[]

[Postprocessors]
[./l2_difference]
type = ElementL2Difference
variable = temperature_mfem
other_variable = temperature_moose
[../]
[]

[ICs]
[./temperature_moose_ic]
type = FunctionIC
variable = temperature_moose
function = 42.0+1000.0*x*x
[../]

[./temperature_mfem_ic]
type = ConstantIC
variable = temperature_mfem
value = 0.0
[../]
[]

[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0 0 0'
input_files = 'two_way_tet10_transfer_mfem.i'
execute_on = timestep_begin
[]
[]

[Transfers]
[push_temperature]
type = MultiAppNearestNodeTransfer

# Transfer to the sub-app from this app.
to_multi_app = sub_app

# The name of the variable in this app to transfer.
source_variable = temperature_moose

# The name of the auxiliary variable in the sub-app.
variable = temperature
[]

[pull_temperature]
type = MultiAppNearestNodeTransfer

# Transfer from the sub-app to this app.
from_multi_app = sub_app

# The name of the variable in the sub-app.
source_variable = temperature

# The name of the auxiliary variable in this app.
variable = temperature_mfem
[]
[]

[Executioner]
type = Transient
dt = 1.0
start_time = 0.0
end_time = 1.0
[]

[Outputs]
csv = true
exodus = true
[]
83 changes: 83 additions & 0 deletions test/tests/unit/transfers/two_way_tet10_transfer_mfem.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
[Mesh]
type = CoupledMFEMMesh
file = gold/mug-tet10.e
dim = 3
[]

[Problem]
type = MFEMProblem
use_glvis = true
[]

[Formulation]
type = CustomFormulation
[]

[AuxVariables]
[./mfem_diffused]
family = LAGRANGE
order = SECOND
[../]
[./temperature]
family = LAGRANGE
order = SECOND
[../]
[]

[Functions]
[./value_bottom]
type = ParsedFunction
value = 1.0
[../]
[./value_top]
type = ParsedFunction
value = 0.0
[../]
[]

[BCs]
[./bottom]
type = MFEMFunctionDirichletBC
variable = mfem_diffused
boundary = '1'
function = value_bottom
[../]
[./low_terminal]
type = MFEMFunctionDirichletBC
variable = mfem_diffused
boundary = '2'
function = value_top
[../]
[]

[Coefficients]
[./one]
type = MFEMConstantCoefficient
value = 1.0
[../]
[]

[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = mfem_diffused
coefficient = one
[]
[]

[Executioner]
type = Transient
dt = 1.0
start_time = 0.0
end_time = 1.0

l_tol = 1e-16
l_max_its = 1000
[]

[Outputs]
[VisItDataCollection]
type = MFEMVisItDataCollection
file_base = OutputData/Diffusion
[]
[]
Loading