diff --git a/test/tests/unit/transfers/gold/two_way_tet10_transfer_master_out.csv b/test/tests/unit/transfers/gold/two_way_tet10_transfer_master_out.csv new file mode 100644 index 00000000..9d1f27dd --- /dev/null +++ b/test/tests/unit/transfers/gold/two_way_tet10_transfer_master_out.csv @@ -0,0 +1,3 @@ +time,l2_difference +0,0 +1,0 diff --git a/test/tests/unit/transfers/tests b/test/tests/unit/transfers/tests index ab25ee5d..45cc6688 100644 --- a/test/tests/unit/transfers/tests +++ b/test/tests/unit/transfers/tests @@ -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' diff --git a/test/tests/unit/transfers/two_way_tet10_transfer_master.i b/test/tests/unit/transfers/two_way_tet10_transfer_master.i new file mode 100644 index 00000000..97fbc646 --- /dev/null +++ b/test/tests/unit/transfers/two_way_tet10_transfer_master.i @@ -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 +[] diff --git a/test/tests/unit/transfers/two_way_tet10_transfer_mfem.i b/test/tests/unit/transfers/two_way_tet10_transfer_mfem.i new file mode 100644 index 00000000..d6733dd1 --- /dev/null +++ b/test/tests/unit/transfers/two_way_tet10_transfer_mfem.i @@ -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 + [] +[]