- assembly_levellegacyMatrix assembly level.
Default:legacy
C++ Type:MooseEnum
Controllable:No
Description:Matrix assembly level.
- deviceRun app on the chosen device.
C++ Type:std::string
Controllable:No
Description:Run app on the chosen device.
- nl_abs_tol1e-50Nonlinear Absolute Tolerance
Default:1e-50
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Nonlinear Absolute Tolerance
- nl_max_its1Max Nonlinear Iterations
Default:1
C++ Type:unsigned int
Controllable:No
Description:Max Nonlinear Iterations
- nl_rel_tol1e-08Nonlinear Relative Tolerance
Default:1e-08
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Nonlinear Relative Tolerance
- print_level1Print level
Default:1
C++ Type:unsigned int
Controllable:No
Description:Print level
- time0System time
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:System time
- verboseFalseSet to true to print additional information
Default:False
C++ Type:bool
Controllable:No
Description:Set to true to print additional information
MFEMSteady
Overview
MFEMSteady is the Executioner class used to solve time independent MFEM finite element problems, calling the MFEMProblemSolve solve object to execute one or more MFEM ProblemOperators.
As in all Executioner classes using the MFEMProblemSolve solve object, the desired device and assembly level to use during problem set-up and solution can be selected.
Example Input File Syntax
[Executioner<<<{"href": "../../../syntax/Executioner/index.html"}>>>]
type = MFEMSteady
device = cpu
[](test/tests/mfem/kernels/diffusion.i)Input Parameters
- accept_on_max_fixed_point_iterationFalseTrue to treat reaching the maximum number of fixed point iterations as converged.
Default:False
C++ Type:bool
Controllable:No
Description:True to treat reaching the maximum number of fixed point iterations as converged.
- custom_abs_tol1e-50The absolute nonlinear residual to shoot for during fixed point iterations. This check is performed based on postprocessor defined by the custom_pp residual.
Default:1e-50
C++ Type:double
Unit:(no unit assumed)
Range:custom_abs_tol>0
Controllable:No
Description:The absolute nonlinear residual to shoot for during fixed point iterations. This check is performed based on postprocessor defined by the custom_pp residual.
- custom_ppPostprocessor for custom fixed point convergence check.
C++ Type:PostprocessorName
Unit:(no unit assumed)
Controllable:No
Description:Postprocessor for custom fixed point convergence check.
- custom_rel_tol1e-08The relative nonlinear residual drop to shoot for during fixed point iterations. This check is performed based on the postprocessor defined by custom_pp residual.
Default:1e-08
C++ Type:double
Unit:(no unit assumed)
Range:custom_rel_tol>0
Controllable:No
Description:The relative nonlinear residual drop to shoot for during fixed point iterations. This check is performed based on the postprocessor defined by custom_pp residual.
- direct_pp_valueFalseTrue to use direct postprocessor value (scaled by value on first iteration). False (default) to use difference in postprocessor value between fixed point iterations.
Default:False
C++ Type:bool
Controllable:No
Description:True to use direct postprocessor value (scaled by value on first iteration). False (default) to use difference in postprocessor value between fixed point iterations.
- disable_fixed_point_residual_norm_checkFalseDisable the residual norm evaluation thus the three parameters fixed_point_rel_tol, fixed_point_abs_tol and fixed_point_force_norms.
Default:False
C++ Type:bool
Controllable:No
Description:Disable the residual norm evaluation thus the three parameters fixed_point_rel_tol, fixed_point_abs_tol and fixed_point_force_norms.
- fixed_point_abs_tol1e-50The absolute nonlinear residual to shoot for during fixed point iterations. This check is performed based on the main app's nonlinear residual.
Default:1e-50
C++ Type:double
Unit:(no unit assumed)
Range:fixed_point_abs_tol>0
Controllable:No
Description:The absolute nonlinear residual to shoot for during fixed point iterations. This check is performed based on the main app's nonlinear residual.
- fixed_point_algorithmpicardThe fixed point algorithm to converge the sequence of problems.
Default:picard
C++ Type:MooseEnum
Options:picard, secant, steffensen
Controllable:No
Description:The fixed point algorithm to converge the sequence of problems.
- fixed_point_force_normsFalseForce the evaluation of both the TIMESTEP_BEGIN and TIMESTEP_END norms regardless of the existence of active MultiApps with those execute_on flags, default: false.
Default:False
C++ Type:bool
Controllable:No
Description:Force the evaluation of both the TIMESTEP_BEGIN and TIMESTEP_END norms regardless of the existence of active MultiApps with those execute_on flags, default: false.
- fixed_point_max_its1Specifies the maximum number of fixed point iterations.
Default:1
C++ Type:unsigned int
Controllable:No
Description:Specifies the maximum number of fixed point iterations.
- fixed_point_min_its1Specifies the minimum number of fixed point iterations.
Default:1
C++ Type:unsigned int
Controllable:No
Description:Specifies the minimum number of fixed point iterations.
- fixed_point_rel_tol1e-08The relative nonlinear residual drop to shoot for during fixed point iterations. This check is performed based on the main app's nonlinear residual.
Default:1e-08
C++ Type:double
Unit:(no unit assumed)
Range:fixed_point_rel_tol>0
Controllable:No
Description:The relative nonlinear residual drop to shoot for during fixed point iterations. This check is performed based on the main app's nonlinear residual.
Multiapp Fixed Point Iterations Parameters
- auto_advanceFalseWhether to automatically advance sub-applications regardless of whether their solve converges, for transient executioners only.
Default:False
C++ Type:bool
Controllable:No
Description:Whether to automatically advance sub-applications regardless of whether their solve converges, for transient executioners only.
- multiapp_fixed_point_convergenceName of the Convergence object to use to assess convergence of the MultiApp fixed point solve. If not provided, a default Convergence will be constructed internally from the executioner parameters.
C++ Type:ConvergenceName
Controllable:No
Description:Name of the Convergence object to use to assess convergence of the MultiApp fixed point solve. If not provided, a default Convergence will be constructed internally from the executioner parameters.
- relaxation_factor1Fraction of newly computed value to keep.Set between 0 and 2.
Default:1
C++ Type:double
Unit:(no unit assumed)
Range:relaxation_factor>0 & relaxation_factor<2
Controllable:No
Description:Fraction of newly computed value to keep.Set between 0 and 2.
- transformed_postprocessorsList of main app postprocessors to transform during fixed point iterations
C++ Type:std::vector<PostprocessorName>
Unit:(no unit assumed)
Controllable:No
Description:List of main app postprocessors to transform during fixed point iterations
- transformed_variablesList of main app variables to transform during fixed point iterations
C++ Type:std::vector<std::string>
Controllable:No
Description:List of main app variables to transform during fixed point iterations
Fixed Point Iterations Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
Advanced Parameters
- max_xfem_update4294967295Maximum number of times to update XFEM crack topology in a step due to evolving cracks
Default:4294967295
C++ Type:unsigned int
Controllable:No
Description:Maximum number of times to update XFEM crack topology in a step due to evolving cracks
- update_xfem_at_timestep_beginFalseShould XFEM update the mesh at the beginning of the timestep
Default:False
C++ Type:bool
Controllable:No
Description:Should XFEM update the mesh at the beginning of the timestep
Xfem Fixed Point Iterations Parameters
Restart Parameters
Input Files
- (test/tests/mfem/kernels/diffusion.i)
- (test/tests/mfem/complex/complex.i)
- (test/tests/mfem/kernels/graddiv.i)
- (test/tests/mfem/kernels/linearelasticity.i)
- (test/tests/mfem/vectorpostprocessors/line_value_sampler/line_value_sampler_curlcurl.i)
- (test/tests/mfem/transfers/mfem_sub_mfem_sub/sub_send.i)
- (test/tests/mfem/submeshes/cut_closed_coil.i)
- (test/tests/mfem/kernels/maxwell_eigenproblem.i)
- (test/tests/mfem/kernels/diffusion_eigenproblem.i)
- (test/tests/mfem/kernels/nldiffusion.i)
- (test/tests/mfem/complex/complex_waveguide.i)
- (test/tests/mfem/transfers/h1_libmesh_parent_mfem_sub/mfem_sub_scalar.i)
- (test/tests/mfem/auxkernels/projection.i)
- (test/tests/mfem/kernels/diffusion_amr.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/parent.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/sub_complex.i)
- (test/tests/mfem/vectorpostprocessors/point_value_sampler/point_value_sampler_diffusion.i)
- (test/tests/mfem/transfers/l2_libmesh_parent_mfem_sub/mfem_sub_scalar.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/mfem_parent_embedded_submesh.i)
- (test/tests/mfem/functions/parsed_function_source.i)
- (test/tests/mfem/submeshes/domain_submesh_transfer.i)
- (test/tests/mfem/ics/scalar_ic.i)
- (test/tests/mfem/vectorpostprocessors/point_value_sampler/point_value_sampler_curlcurl.i)
- (test/tests/mfem/vectorpostprocessors/line_value_sampler/line_value_sampler_diffusion.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/mfem_sub_embedded_submesh.i)
- (test/tests/mfem/kernels/curlcurl.i)
- (test/tests/mfem/ics/vector_ic.i)
- (test/tests/mfem/kernels/gravity.i)
- (test/tests/mfem/submeshes/hphi_magnetostatic.i)
- (test/tests/mfem/transfers/mfem_sub_mfem_sub/sub_recv.i)
- (test/tests/mfem/transfers/mfem_sub_mfem_sub/parent.i)
- (test/tests/mfem/submeshes/domain_submesh.i)
- (test/tests/mfem/kernels/irrotational.i)
- (test/tests/mfem/submeshes/magnetostatic.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/mfem_parent_vector.i)
- (test/tests/mfem/auxkernels/2Dmagnetostatic.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/parent_complex.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/sub.i)
- (test/tests/mfem/submeshes/boundary_submesh.i)
- (test/tests/mfem/auxkernels/crossproduct.i)
- (test/tests/mfem/submeshes/open_coil_source.i)
- (test/tests/mfem/submeshes/av_magnetostatic.i)
- (test/tests/mfem/transfers/h1_mfem_parent_libmesh_sub/mfem_parent_scalar.i)
- (test/tests/mfem/kernels/darcy.i)
- (test/tests/mfem/transfers/l2_mfem_parent_libmesh_sub/mfem_parent_scalar.i)
(test/tests/mfem/kernels/diffusion.i)
[Mesh]
type = MFEMMesh
file = ../mesh/mug.e
dim = 3
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[]
[Variables]
[concentration]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[AuxVariables]
[concentration_gradient]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxKernels]
[grad]
type = MFEMGradAux
variable = concentration_gradient
source = concentration
execute_on = TIMESTEP_END
[]
[]
[BCs]
[bottom]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'bottom'
coefficient = 1.0
[]
[top]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'top'
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = concentration
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[jacobi]
type = MFEMOperatorJacobiSmoother
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
active = ParaViewDataCollection
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/Diffusion
vtk_format = ASCII
[]
[VisItDataCollection]
type = MFEMVisItDataCollection
file_base = OutputData/VisItDataCollection
[]
[ConduitDataCollection]
type = MFEMConduitDataCollection
file_base = OutputData/ConduitDataCollection/Run
protocol = conduit_bin
[]
[]
(test/tests/mfem/kernels/diffusion.i)
[Mesh]
type = MFEMMesh
file = ../mesh/mug.e
dim = 3
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[]
[Variables]
[concentration]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[AuxVariables]
[concentration_gradient]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxKernels]
[grad]
type = MFEMGradAux
variable = concentration_gradient
source = concentration
execute_on = TIMESTEP_END
[]
[]
[BCs]
[bottom]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'bottom'
coefficient = 1.0
[]
[top]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'top'
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = concentration
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[jacobi]
type = MFEMOperatorJacobiSmoother
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
active = ParaViewDataCollection
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/Diffusion
vtk_format = ASCII
[]
[VisItDataCollection]
type = MFEMVisItDataCollection
file_base = OutputData/VisItDataCollection
[]
[ConduitDataCollection]
type = MFEMConduitDataCollection
file_base = OutputData/ConduitDataCollection/Run
protocol = conduit_bin
[]
[]
(test/tests/mfem/complex/complex.i)
mu = 1.0
epsilon = 1.0
sigma = 20.0
omega = 10.0
kappa_r = 12.7201964951406889525742371916
kappa_i = -7.86151377757423297509831172647
[Mesh]
type = MFEMMesh
file = ../mesh/inline-quad.mesh
dim = 2
[]
[Problem]
type = MFEMProblem
numeric_type = complex
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[u]
type = MFEMComplexVariable
fespace = H1FESpace
[]
[]
[Functions]
[u0_r]
type = ParsedFunction
expression = exp(y*${kappa_i})*cos(y*${kappa_r})
[]
[u0_i]
type = ParsedFunction
expression = -exp(y*${kappa_i})*sin(y*${kappa_r})
[]
[stiffnessCoef]
type = ParsedFunction
expression = 1.0/${mu}
[]
[massCoef]
type = ParsedFunction
expression = -${omega}*${omega}*${epsilon}
[]
[lossCoef]
type = ParsedFunction
expression = ${omega}*${sigma}
[]
[]
[BCs]
[dbc]
type = MFEMComplexScalarDirichletBC
variable = u
coefficient_real = u0_r
coefficient_imag = u0_i
[]
[]
[Kernels]
[diffusion_complex]
type = MFEMComplexKernel
variable = u
[RealComponent]
type = MFEMDiffusionKernel
coefficient = stiffnessCoef
[]
[ImagComponent]
type = MFEMDiffusionKernel
coefficient = 0.0
[]
[]
[mass_complex]
type = MFEMComplexKernel
variable = u
[RealComponent]
type = MFEMMassKernel
coefficient = massCoef
[]
[ImagComponent]
type = MFEMMassKernel
coefficient = lossCoef
[]
[]
[]
[Solver]
type = MFEMSuperLU
[]
[Executioner]
type = MFEMSteady
assembly_level = legacy
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/Complex2DQuad
vtk_format = ASCII
[]
[]
(test/tests/mfem/kernels/graddiv.i)
# Grad-div problem using method of manufactured solutions,
# based on MFEM Example 4.
[Mesh]
type = MFEMMesh
file = ../mesh/beam-tet.mesh
dim = 3
uniform_refine = 1
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[HDivFESpace]
type = MFEMVectorFESpace
fec_type = RT
fec_order = CONSTANT
ordering = "vdim"
[]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
fec_order = CONSTANT
basis = GaussLegendre
[]
[]
[Variables]
[F]
type = MFEMVariable
fespace = HDivFESpace
[]
[]
[AuxVariables]
[divF]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[AuxKernels]
[div]
type = MFEMDivAux
variable = divF
source = F
execute_on = TIMESTEP_END
[]
[]
[Functions]
[f]
type = ParsedVectorFunction
expression_x = '(1. + 2*kappa * kappa) * cos(kappa * x) * sin(kappa * y)'
expression_y = '(1. + 2*kappa * kappa) * cos(kappa * y) * sin(kappa * x)'
expression_z = '0'
symbol_names = kappa
symbol_values = 3.1415926535
[]
[F_exact]
type = ParsedVectorFunction
expression_x = 'cos(kappa * x) * sin(kappa * y)'
expression_y = 'cos(kappa * y) * sin(kappa * x)'
expression_z = '0'
symbol_names = kappa
symbol_values = 3.1415926535
[]
[]
[BCs]
[dirichlet]
type = MFEMVectorNormalDirichletBC
variable = F
boundary = '1 2 3'
vector_coefficient = F_exact
[]
[]
[Kernels]
[divdiv]
type = MFEMDivDivKernel
variable = F
[]
[mass]
type = MFEMVectorFEMassKernel
variable = F
[]
[source]
type = MFEMVectorFEDomainLFKernel
variable = F
vector_coefficient = f
[]
[]
[Preconditioner]
[ADS]
type = MFEMHypreADS
fespace = HDivFESpace
[]
[]
[Solver]
type = MFEMCGSolver
preconditioner = ADS
l_tol = 1e-16
l_max_its = 1000
print_level = 2
[]
[Executioner]
type = MFEMSteady
device = "cpu"
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/GradDiv
vtk_format = ASCII
[]
[]
(test/tests/mfem/kernels/linearelasticity.i)
[Mesh]
type = MFEMMesh
file = ../mesh/beam-tet.mesh
dim = 3
uniform_refine = 2
displacement = "displacement"
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMVectorFESpace
fec_type = H1
fec_order = FIRST
range_dim = 3
ordering = "vdim"
[]
[]
[Variables]
[displacement]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[BCs]
[dirichlet]
type = MFEMVectorDirichletBC
variable = displacement
boundary = '1'
[]
[pull_down]
type = MFEMVectorBoundaryIntegratedBC
variable = displacement
boundary = '2'
vector_coefficient = '0.0 0.0 -0.01'
[]
[]
[FunctorMaterials]
[Rigidium]
type = MFEMGenericFunctorMaterial
prop_names = 'lambda mu'
prop_values = '50.0 50.0'
block = 1
[]
[Bendium]
type = MFEMGenericFunctorMaterial
prop_names = 'lambda mu'
prop_values = '1.0 1.0'
block = 2
[]
[]
[Kernels]
[diff]
type = MFEMLinearElasticityKernel
variable = displacement
lambda = lambda
mu = mu
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
l_max_its = 500
l_tol = 1e-8
print_level = 2
[]
[]
[Solver]
type = MFEMHyprePCG
#preconditioner = boomeramg
l_max_its = 5000
l_tol = 1e-8
l_abs_tol = 0.0
print_level = 2
[]
[Executioner]
type = MFEMSteady
device = "cpu"
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/LinearElasticity
vtk_format = ASCII
[]
[]
(test/tests/mfem/vectorpostprocessors/line_value_sampler/line_value_sampler_curlcurl.i)
# Definite Maxwell problem solved with Nedelec elements of the first kind
# based on MFEM Example 3. Sampled with MFEMLineValueSampler.
[Mesh]
type = MFEMMesh
file = ../../mesh/small_fichera.mesh
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[HDivFESpace]
type = MFEMVectorFESpace
fec_type = RT
fec_order = CONSTANT
[]
[]
[Variables]
[e_field]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxVariables]
[db_dt_field]
type = MFEMVariable
fespace = HDivFESpace
[]
[]
[AuxKernels]
[curl]
type = MFEMCurlAux
variable = db_dt_field
source = e_field
scale_factor = -1.0
execute_on = TIMESTEP_END
[]
[]
[Functions]
[exact_e_field]
type = ParsedVectorFunction
expression_x = 'sin(kappa * y)'
expression_y = 'sin(kappa * z)'
expression_z = 'sin(kappa * x)'
symbol_names = kappa
symbol_values = 3.1415926535
[]
[forcing_field]
type = ParsedVectorFunction
expression_x = '(1. + kappa * kappa) * sin(kappa * y)'
expression_y = '(1. + kappa * kappa) * sin(kappa * z)'
expression_z = '(1. + kappa * kappa) * sin(kappa * x)'
symbol_names = kappa
symbol_values = 3.1415926535
[]
[]
[BCs]
[tangential_E_bdr]
type = MFEMVectorTangentialDirichletBC
variable = e_field
vector_coefficient = exact_e_field
[]
[]
[Kernels]
[curlcurl]
type = MFEMCurlCurlKernel
variable = e_field
[]
[mass]
type = MFEMVectorFEMassKernel
variable = e_field
[]
[source]
type = MFEMVectorFEDomainLFKernel
variable = e_field
vector_coefficient = forcing_field
[]
[]
[Preconditioner]
[ams]
type = MFEMHypreAMS
fespace = HCurlFESpace
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = ams
l_tol = 1e-6
[]
[VectorPostprocessors]
[line_sample]
type = MFEMLineValueSampler
variable = 'e_field'
start_point = '1 1 -1'
end_point = '1 1 1'
num_points = 11
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(test/tests/mfem/transfers/mfem_sub_mfem_sub/sub_send.i)
[Mesh]
type = MFEMMesh
file = ../../mesh/square.msh
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[send]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[BCs]
[back]
type = MFEMScalarDirichletBC
variable = send
boundary = 1
coefficient = 1.0
[]
[bottom]
type = MFEMScalarDirichletBC
variable = send
boundary = 2
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = send
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/DiffusionSendApp
vtk_format = ASCII
[]
[]
[Executioner]
type = MFEMSteady
[]
(test/tests/mfem/submeshes/cut_closed_coil.i)
# Solve for the electric field on a closed conductor subject to
# global loop voltage constraint.
initial_coil_domains = 'TorusCore TorusSheath'
coil_cut_surface = 'Cut'
coil_loop_voltage = -1.0
coil_conductivity = 1.0
[Problem]
type = MFEMProblem
[]
[Mesh]
type = MFEMMesh
file = ../mesh/embedded_concentric_torus.e
[]
[FunctorMaterials]
[Conductor]
type = MFEMGenericFunctorMaterial
prop_names = conductivity
prop_values = ${coil_conductivity}
[]
[]
[ICs]
[coil_external_potential_ic]
type = MFEMScalarBoundaryIC
variable = coil_external_potential
boundary = ${coil_cut_surface}
coefficient = ${coil_loop_voltage}
[]
[]
[SubMeshes]
[cut]
type = MFEMCutTransitionSubMesh
cut_boundary = ${coil_cut_surface}
block = ${initial_coil_domains}
transition_subdomain = transition_dom
transition_subdomain_boundary = transition_bdr
closed_subdomain = coil_dom
[]
[coil]
type = MFEMDomainSubMesh
block = coil_dom
[]
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[CoilH1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
submesh = coil
[]
[CoilHCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
submesh = coil
[]
[TransitionH1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
submesh = cut
[]
[TransitionHCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
submesh = cut
[]
[]
[Variables]
[coil_induced_potential]
type = MFEMVariable
fespace = CoilH1FESpace
[]
[]
[AuxVariables]
[coil_external_potential]
type = MFEMVariable
fespace = CoilH1FESpace
[]
[transition_external_potential]
type = MFEMVariable
fespace = TransitionH1FESpace
[]
[transition_external_e_field]
type = MFEMVariable
fespace = TransitionHCurlFESpace
[]
[induced_potential]
type = MFEMVariable
fespace = H1FESpace
[]
[induced_e_field]
type = MFEMVariable
fespace = HCurlFESpace
[]
[external_e_field]
type = MFEMVariable
fespace = HCurlFESpace
[]
[e_field]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxKernels]
[update_induced_e_field]
type = MFEMGradAux
variable = induced_e_field
source = induced_potential
scale_factor = -1.0
execute_on = TIMESTEP_END
[]
[update_external_e_field]
type = MFEMGradAux
variable = transition_external_e_field
source = transition_external_potential
scale_factor = -1.0
execute_on = TIMESTEP_END
[]
[update_total_e_field]
type = MFEMSumAux
variable = e_field
source_variables = 'induced_e_field external_e_field'
execute_on = TIMESTEP_END
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = coil_induced_potential
coefficient = conductivity
[]
[source]
type = MFEMMixedGradGradKernel
trial_variable = coil_external_potential
variable = coil_induced_potential
coefficient = conductivity
block = 'transition_dom'
[]
[]
[Solver]
type = MFEMSuperLU
[]
[Executioner]
type = MFEMSteady
[]
[Transfers]
[submesh_transfer_from_coil]
type = MFEMSubMeshTransfer
from_variable = coil_induced_potential
to_variable = induced_potential
execute_on = TIMESTEP_END
[]
[submesh_transfer_to_transition]
type = MFEMSubMeshTransfer
from_variable = coil_external_potential
to_variable = transition_external_potential
execute_on = TIMESTEP_END
[]
[submesh_transfer_from_transition]
type = MFEMSubMeshTransfer
from_variable = transition_external_e_field
to_variable = external_e_field
execute_on = TIMESTEP_END
[]
[]
[Outputs]
[GlobalParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/WholePotentialCoil
vtk_format = ASCII
[]
[TransitionParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/CutPotentialCoil
vtk_format = ASCII
submesh = cut
[]
[CoilParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/Coil
vtk_format = ASCII
submesh = coil
[]
[]
(test/tests/mfem/kernels/maxwell_eigenproblem.i)
[Mesh]
type = MFEMMesh
file = ../mesh/beam-tet.mesh
dim = 3
[]
[Problem]
type = MFEMEigenproblem
num_modes = 5
[]
[FESpaces]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[]
[Variables]
[E]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[BCs]
[all]
type = MFEMVectorTangentialDirichletBC
variable = E
vector_coefficient = '0 0 0'
[]
[]
[Kernels]
[diff]
type = MFEMCurlCurlKernel
variable = E
[]
[]
[Preconditioner]
[ams]
type = MFEMHypreAMS
fespace = HCurlFESpace
print_level = 0
singular = true
[]
[]
[Solver]
type = MFEMHypreAME
preconditioner = ams
print_level = 0
l_tol = 1e-8
l_max_its = 100
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[VectorPostprocessors]
[eigenvalues]
type = MFEMEigenvaluesPostprocessor
[]
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
file_base = OutputData/MaxwellEigenproblem
[]
(test/tests/mfem/kernels/diffusion_eigenproblem.i)
[Mesh]
type = MFEMMesh
file = ../mesh/star.mesh
dim = 2
serial_refine = 1
[]
[Problem]
type = MFEMEigenproblem
num_modes = 5
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[u]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[BCs]
[all]
type = MFEMScalarDirichletBC
variable = u
coefficient = 1.0
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = u
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
print_level = 0
[]
[]
[Solver]
type = MFEMHypreLOBPCG
preconditioner = boomeramg
print_level = 0
l_tol = 1e-10
l_max_its = 300
random_seed = 75
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[VectorPostprocessors]
[eigenvalues]
type = MFEMEigenvaluesPostprocessor
[]
[]
[Outputs]
[ReportedPostprocessors]
type = CSV
file_base = OutputData/DiffusionEigenproblem
[]
[]
(test/tests/mfem/kernels/nldiffusion.i)
[Mesh]
type = MFEMMesh
file = ../mesh/square.e
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[concentration]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[ICs]
[diffused_ic]
type = MFEMScalarIC
coefficient = initial
variable = concentration
[]
[]
[Functions]
[initial]
type = ParsedFunction
expression = 2*y+1
[]
[]
[BCs]
[top]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'top'
coefficient = 3.0
[]
[bottom]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'bottom'
coefficient = 1.0
[]
[]
[Kernels]
active = 'nl'
[nl]
type = MFEMNLDiffusionKernel
variable = concentration
k_coefficient = concentration
dk_du_coefficient = 1.0
[]
[force]
type = MFEMDomainLFKernel
variable = concentration
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
print_level = 0
[]
[jacobi]
type = MFEMOperatorJacobiSmoother
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
print_level = 1
l_tol = 1e-16
l_max_its = 1000
[]
[Executioner]
type = MFEMSteady
device = cpu
nl_max_its = 100
nl_abs_tol = 1.0e-10
nl_rel_tol = 1.0e-9
print_level = 1
[]
[Outputs]
active = ParaViewDataCollection
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/NLDiffusion
vtk_format = ASCII
[]
[]
(test/tests/mfem/complex/complex_waveguide.i)
freq = 900e6
angfreq = ${fparse 2*pi*freq}
epsilon0 = 8.8541878176e-12
mu0 = ${fparse 4e-7*pi}
magnetic_reluctivity = ${fparse 1/mu0}
elec_cond_mouse = 0.97
elec_cond_air = 1e-323
[Mesh]
type = MFEMMesh
file = ../mesh/waveguide.g
dim = 3
[]
[Problem]
type = MFEMProblem
numeric_type = complex
[]
[FESpaces]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[HDivFESpace]
type = MFEMVectorFESpace
fec_type = RT
fec_order = CONSTANT
[]
[]
[Variables]
[E]
type = MFEMComplexVariable
fespace = HCurlFESpace
[]
[]
[Functions]
[mass_coef_mouse]
type = ParsedFunction
expression = -43*${epsilon0}*${angfreq}^2
[]
[loss_coef_mouse]
type = ParsedFunction
expression = ${angfreq}*${elec_cond_mouse}
[]
[mass_coef_air]
type = ParsedFunction
expression = -${epsilon0}*${angfreq}^2
[]
[loss_coef_air]
type = ParsedFunction
expression = ${angfreq}*${elec_cond_air}
[]
[]
[FunctorMaterials]
[Mouse]
type = MFEMGenericFunctorMaterial
prop_names = 'massCoef lossCoef MagReluctivity'
prop_values = 'mass_coef_mouse loss_coef_mouse ${magnetic_reluctivity}'
block = 1
[]
[Air]
type = MFEMGenericFunctorMaterial
prop_names = 'massCoef lossCoef MagReluctivity'
prop_values = 'mass_coef_air loss_coef_air ${magnetic_reluctivity}'
block = 2
[]
[]
[BCs]
[tangential_E]
type = MFEMComplexVectorTangentialDirichletBC
variable = E
boundary = '2 3 4'
[]
[WaveguidePortIn]
type = MFEMRWTE10IntegratedBC
variable = E
boundary = '5'
input_port = true
port_length_vector = "24.76e-2 0.0 0.0"
port_width_vector = "0.0 12.38e-2 0.0"
frequency = ${freq}
epsilon = ${epsilon0}
mu = ${mu0}
[]
[WaveguidePortOut]
type = MFEMRWTE10IntegratedBC
variable = E
boundary = '6'
input_port = false
port_length_vector = "24.76e-2 0.0 0.0"
port_width_vector = "0.0 12.38e-2 0.0"
frequency = ${freq}
epsilon = ${epsilon0}
mu = ${mu0}
[]
[]
[Kernels]
[curlcurl]
type = MFEMComplexKernel
variable = E
[RealComponent]
type = MFEMCurlCurlKernel
coefficient = MagReluctivity
[]
[]
[mass_loss]
type = MFEMComplexKernel
variable = E
[RealComponent]
type = MFEMVectorFEMassKernel
coefficient = massCoef
[]
[ImagComponent]
type = MFEMVectorFEMassKernel
coefficient = lossCoef
[]
[]
[]
[Solver]
type = MFEMMUMPS
[]
[Executioner]
type = MFEMSteady
assembly_level = legacy
[]
[Postprocessors]
[ObstructionAbsorption]
type = MFEMComplexVectorPeriodAveragedPostprocessor
coefficient = ${elec_cond_mouse}
dual_variable = E
primal_variable = E
block = 1
[]
[]
[Outputs]
[ReportedPostprocessors]
type = CSV
file_base = OutputData/ComplexWaveguide
[]
[]
(test/tests/mfem/transfers/h1_libmesh_parent_mfem_sub/mfem_sub_scalar.i)
[Mesh]
type = MFEMMesh
file = ../../mesh/square_quad9.e
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[mfem_scalar_var]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[BCs]
[sides]
type = MFEMScalarDirichletBC
variable = mfem_scalar_var
coefficient = 1.0
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = mfem_scalar_var
[]
[source]
type = MFEMDomainLFKernel
variable = mfem_scalar_var
coefficient = 2.0
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
(test/tests/mfem/auxkernels/projection.i)
[Mesh]
type = MFEMMesh
file = ../mesh/hinomaru.e
dim = 2
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
fec_order = CONSTANT
basis = GaussLegendre
[]
[]
[Variables]
[Az]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[AuxVariables]
[J]
type = MFEMVariable
fespace = L2FESpace
[]
[GAz]
type = MFEMVariable
fespace = HCurlFESpace
[]
[GAz(copy)]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[Kernels]
[diffusion]
type = MFEMDiffusionKernel
variable = Az
[]
[source]
type = MFEMDomainLFKernel
variable = Az
coefficient = J_source
[]
[]
[AuxKernels]
[J]
type = MFEMScalarProjectionAux
variable = J
coefficient = J_source
[]
[GAz]
type = MFEMGradAux
variable = GAz
source = Az
[]
[GAz(copy)]
type = MFEMVectorProjectionAux
variable = GAz(copy)
vector_coefficient = GAz
[]
[]
[BCs]
[essential]
type = MFEMScalarDirichletBC
variable = Az
boundary = outer
coefficient = 1
[]
[]
[FunctorMaterials]
[J_wire]
type = MFEMGenericFunctorMaterial
prop_names = J_source
prop_values = 8.0
block = wire
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHyprePCG
preconditioner = boomeramg
l_tol = 1e-16
[]
[Executioner]
type = MFEMSteady
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/Projection
vtk_format = ASCII
[]
[]
(test/tests/mfem/kernels/diffusion_amr.i)
[Mesh]
type = MFEMMesh
file = ../mesh/square.msh
nonconforming = true
[]
[Adaptivity]
[Indicators]
[l2zz]
type = MFEML2ZienkiewiczZhuIndicator
variable = concentration
kernel = diff
[]
[]
[Markers]
[ref]
type = MFEMRefinementMarker
threshold = 0.7
indicator = l2zz
max_h_level = 1
[]
[]
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[]
[Variables]
[concentration]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[AuxVariables]
[concentration_gradient]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxKernels]
[grad]
type = MFEMGradAux
variable = concentration_gradient
source = concentration
execute_on = TIMESTEP_END
[]
[]
[BCs]
[top]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 4
coefficient = 1
[]
[bottom]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 2
[]
[]
[Functions]
[D]
type = ParsedFunction
expression = 1+1/(1+exp(20*y-10))
[]
[solution]
type = ParsedFunction
expression = (20*y+log(exp(20*y)+2*exp(10))-log(1+2*exp(10)))/(30+log(2+exp(10))-log(1+2*exp(10)))
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = concentration
coefficient = D
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Postprocessors]
[error]
type = MFEML2Error
variable = concentration
function = solution
[]
[]
[Outputs]
csv = true
file_base = OutputData/DiffusionHRefinement
[]
(test/tests/mfem/transfers/mfem_parent_mfem_sub/parent.i)
[Mesh]
type = MFEMMesh
file = ../../mesh/square.msh
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[AuxVariables]
[u]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Executioner]
type = MFEMSteady
[]
[MultiApps]
[subapp]
type = FullSolveMultiApp
input_files = sub.i
execute_on = INITIAL
[]
[]
[Transfers]
active = 'copy_from_sub'
[copy_from_sub]
type = MultiAppMFEMCopyTransfer
source_variables = u
variables = u
from_multi_app = subapp
[]
[general_transfer_from_sub]
type = MultiAppMFEMShapeEvaluationTransfer
source_variables = u
variables = u
from_multi_app = subapp
[]
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/Diffusion
vtk_format = ASCII
[]
[]
(test/tests/mfem/transfers/mfem_parent_mfem_sub/sub_complex.i)
[Mesh]
type = MFEMMesh
file = ../../mesh/square.msh
[]
[Problem]
type = MFEMProblem
numeric_type = complex
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[u]
type = MFEMComplexVariable
fespace = H1FESpace
[]
[]
[BCs]
[bottom]
type = MFEMComplexScalarDirichletBC
variable = u
boundary = 2
coefficient_real = 1
coefficient_imag = 1
[]
[top]
type = MFEMComplexScalarDirichletBC
variable = u
boundary = 4
[]
[]
[Kernels]
[diff]
type = MFEMComplexKernel
variable = u
[RealComponent]
type = MFEMDiffusionKernel
[]
[ImagComponent]
type = MFEMDiffusionKernel
[]
[]
[]
[Solver]
type = MFEMSuperLU
[]
[Executioner]
type = MFEMSteady
[]
[MultiApps]
active = ''
[subapp]
type = FullSolveMultiApp
input_files = parent_complex.i
execute_on = FINAL
[]
[]
[Transfers]
active = ''
[to_sub]
type = MultiAppMFEMCopyTransfer
source_variables = u
variables = u
to_multi_app = subapp
[]
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/DiffusionSubComplex
vtk_format = ASCII
[]
[]
(test/tests/mfem/vectorpostprocessors/point_value_sampler/point_value_sampler_diffusion.i)
# MFEM diffusion problem sampled with MFEMPointValueSampler.
[Mesh]
type = MFEMMesh
file = ../../mesh/mug.e
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[]
[Variables]
[concentration]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[AuxVariables]
[concentration_gradient]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxKernels]
[grad]
type = MFEMGradAux
variable = concentration_gradient
source = concentration
execute_on = TIMESTEP_END
[]
[]
[ICs]
[diffused_ic]
type = MFEMScalarIC
coefficient = one
variable = concentration
[]
[]
[Functions]
[one]
type = ParsedFunction
expression = 1.0
[]
[]
[BCs]
[bottom]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'bottom'
coefficient = 1.0
[]
[top]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'top'
[]
[]
[FunctorMaterials]
[Substance]
type = MFEMGenericFunctorMaterial
prop_names = diffusivity
prop_values = 1.0
block = 'the_domain'
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = concentration
coefficient = diffusivity
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[jacobi]
type = MFEMOperatorJacobiSmoother
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[VectorPostprocessors]
[point_sample]
type = MFEMPointValueSampler
variable = 'concentration'
points = '2.125 0 -1.375 2.125 0 1.125'
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(test/tests/mfem/transfers/l2_libmesh_parent_mfem_sub/mfem_sub_scalar.i)
[Mesh]
type = MFEMMesh
file = ../../mesh/square_quad9.e
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
fec_order = CONSTANT
[]
[]
[Variables]
[temperature]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[Functions]
[parsed_function]
type = ParsedFunction
expression = 'x*x + y*y'
[]
[]
[ICs]
[libmesh_scalar_var_ic]
type = MFEMScalarIC
variable = 'temperature'
coefficient = parsed_function
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
(test/tests/mfem/transfers/mfem_parent_mfem_sub/mfem_parent_embedded_submesh.i)
[Mesh]
type = MFEMMesh
file = ../../mesh/cylinder-hex-q2.gen
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[potential]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Executioner]
type = MFEMSteady
[]
[MultiApps]
[mfem_app]
type = FullSolveMultiApp
input_files = mfem_sub_embedded_submesh.i
execute_on = 'INITIAL'
[]
[]
[Transfers]
[h1_transfer_from_subapp]
type = MultiAppMFEMShapeEvaluationTransfer
source_variables = submesh_potential
variables = potential
from_multi_app = mfem_app
[]
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/EmbeddedSubmesh
vtk_format = ASCII
[]
[]
(test/tests/mfem/functions/parsed_function_source.i)
[Mesh]
type = MFEMMesh
file = ../mesh/hinomaru.e
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[variable]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[ICs]
[ic]
type = MFEMScalarIC
variable = variable
coefficient = material
[]
[]
[BCs]
[bc]
type = MFEMScalarDirichletBC
variable = variable
boundary = skin
[]
[]
[FunctorMaterials]
[material]
type = MFEMGenericFunctorMaterial
prop_names = material
prop_values = -100
[]
[]
[Functions]
[r]
type = ParsedFunction
expression = hypot(x,y)
[]
[p]
type = ParsedFunction
expression = atan2(y,x)
[]
[source]
type = MFEMParsedFunction
expression = v*sin(w*p)
symbol_names = 'p w v'
symbol_values = 'p 4 variable'
[]
[solution]
type = MFEMParsedFunction
expression = if(r<=1,-c*sin(w*p)*(r^w-r^2)/(w^2-4),0)
symbol_names = 'r p w c'
symbol_values = 'r p 4 material'
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = variable
[]
[source]
type = MFEMDomainLFKernel
variable = variable
coefficient = source
block = wire
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHyprePCG
preconditioner = boomeramg
l_tol = 1e-16
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Postprocessors]
[error]
type = MFEML2Error
variable = variable
function = solution
[]
[]
[Outputs]
csv = true
file_base = OutputData/ParsedFunctionSource
[]
(test/tests/mfem/submeshes/domain_submesh_transfer.i)
[Mesh]
type = MFEMMesh
file = ../mesh/cylinder-hex-q2.gen
[]
[Problem]
type = MFEMProblem
[]
[SubMeshes]
[wire]
type = MFEMDomainSubMesh
block = interior
[]
[]
[FESpaces]
[SubMeshH1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
submesh = wire
[]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[submesh_potential]
type = MFEMVariable
fespace = SubMeshH1FESpace
[]
[]
[AuxVariables]
[potential]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[BCs]
[top]
type = MFEMScalarDirichletBC
variable = submesh_potential
boundary = front
coefficient = 1.0
[]
[bottom]
type = MFEMScalarDirichletBC
variable = submesh_potential
boundary = back
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = submesh_potential
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-8
l_max_its = 1000
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Transfers]
[submesh_transfer]
type = MFEMSubMeshTransfer
from_variable = submesh_potential
to_variable = potential
[]
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/DomainPotentialTransfer
vtk_format = ASCII
[]
[]
(test/tests/mfem/ics/scalar_ic.i)
[Mesh]
type = MFEMMesh
file = ../mesh/cylinder-hex-q2.gen
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
fec_order = CONSTANT
basis = GaussLegendre
[]
[]
[Variables]
[h1_scalar]
type = MFEMVariable
fespace = H1FESpace
[]
[l2_scalar]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[Functions]
[height]
type = ParsedFunction
expression = 'z'
[]
[]
[ICs]
[l2_scalar_ic]
type = MFEMScalarIC
variable = l2_scalar
coefficient = 2.0
[]
[h1_scalar_ic]
type = MFEMScalarIC
variable = h1_scalar
coefficient = height
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/ScalarIC
vtk_format = ASCII
[]
[]
(test/tests/mfem/vectorpostprocessors/point_value_sampler/point_value_sampler_curlcurl.i)
# Definite Maxwell problem solved with Nedelec elements of the first kind
# based on MFEM Example 3. Sampled with MFEMPointValueSampler.
[Mesh]
type = MFEMMesh
file = ../../mesh/small_fichera.mesh
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[HDivFESpace]
type = MFEMVectorFESpace
fec_type = RT
fec_order = CONSTANT
[]
[]
[Variables]
[e_field]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxVariables]
[db_dt_field]
type = MFEMVariable
fespace = HDivFESpace
[]
[]
[AuxKernels]
[curl]
type = MFEMCurlAux
variable = db_dt_field
source = e_field
scale_factor = -1.0
execute_on = TIMESTEP_END
[]
[]
[Functions]
[exact_e_field]
type = ParsedVectorFunction
expression_x = 'sin(kappa * y)'
expression_y = 'sin(kappa * z)'
expression_z = 'sin(kappa * x)'
symbol_names = kappa
symbol_values = 3.1415926535
[]
[forcing_field]
type = ParsedVectorFunction
expression_x = '(1. + kappa * kappa) * sin(kappa * y)'
expression_y = '(1. + kappa * kappa) * sin(kappa * z)'
expression_z = '(1. + kappa * kappa) * sin(kappa * x)'
symbol_names = kappa
symbol_values = 3.1415926535
[]
[]
[BCs]
[tangential_E_bdr]
type = MFEMVectorTangentialDirichletBC
variable = e_field
vector_coefficient = exact_e_field
[]
[]
[Kernels]
[curlcurl]
type = MFEMCurlCurlKernel
variable = e_field
[]
[mass]
type = MFEMVectorFEMassKernel
variable = e_field
[]
[source]
type = MFEMVectorFEDomainLFKernel
variable = e_field
vector_coefficient = forcing_field
[]
[]
[Preconditioner]
[ams]
type = MFEMHypreAMS
fespace = HCurlFESpace
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = ams
l_tol = 1e-6
[]
[VectorPostprocessors]
[point_sample]
type = MFEMPointValueSampler
variable = 'e_field'
points = '1 1 -0.5 1 1 0.5'
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(test/tests/mfem/vectorpostprocessors/line_value_sampler/line_value_sampler_diffusion.i)
# MFEM diffusion problem sampled with MFEMLineValueSampler.
[Mesh]
type = MFEMMesh
file = ../../mesh/mug.e
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[]
[Variables]
[concentration]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[AuxVariables]
[concentration_gradient]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxKernels]
[grad]
type = MFEMGradAux
variable = concentration_gradient
source = concentration
execute_on = TIMESTEP_END
[]
[]
[ICs]
[diffused_ic]
type = MFEMScalarIC
coefficient = one
variable = concentration
[]
[]
[Functions]
[one]
type = ParsedFunction
expression = 1.0
[]
[]
[BCs]
[bottom]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'bottom'
coefficient = 1.0
[]
[top]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'top'
[]
[]
[FunctorMaterials]
[Substance]
type = MFEMGenericFunctorMaterial
prop_names = diffusivity
prop_values = 1.0
block = 'the_domain'
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = concentration
coefficient = diffusivity
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[jacobi]
type = MFEMOperatorJacobiSmoother
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[VectorPostprocessors]
[line_sample]
type = MFEMLineValueSampler
variable = 'concentration'
start_point = '2.125 0 -2.375'
end_point = '2.125 0 2.625'
num_points = 11
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(test/tests/mfem/transfers/mfem_parent_mfem_sub/mfem_sub_embedded_submesh.i)
[Mesh]
type = MFEMMesh
file = ../../mesh/cylinder-hex-q2.gen
[]
[Problem]
type = MFEMProblem
[]
[SubMeshes]
[wire]
type = MFEMDomainSubMesh
block = interior
[]
[]
[FESpaces]
[SubMeshH1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
submesh = wire
[]
[]
[Variables]
[submesh_potential]
type = MFEMVariable
fespace = SubMeshH1FESpace
[]
[]
[BCs]
[top]
type = MFEMScalarDirichletBC
variable = submesh_potential
boundary = front
coefficient = 1.0
[]
[bottom]
type = MFEMScalarDirichletBC
variable = submesh_potential
boundary = back
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = submesh_potential
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-8
l_max_its = 1000
[]
[Executioner]
type = MFEMSteady
[]
(test/tests/mfem/kernels/curlcurl.i)
# Definite Maxwell problem solved with Nedelec elements of the first kind
# based on MFEM Example 3.
[Mesh]
type = MFEMMesh
file = ../mesh/small_fichera.mesh
dim = 3
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
inactive = "L2FESpace"
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[HDivFESpace]
type = MFEMVectorFESpace
fec_type = RT
fec_order = CONSTANT
[]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
fec_order = CONSTANT
[]
[]
[Variables]
[e_field]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxVariables]
inactive = "joule_heating"
[db_dt_field]
type = MFEMVariable
fespace = HDivFESpace
[]
[joule_heating]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[AuxKernels]
inactive = "joule_Q_aux"
[curl]
type = MFEMCurlAux
variable = db_dt_field
source = e_field
scale_factor = -1.0
execute_on = TIMESTEP_END
[]
[joule_Q_aux]
type = MFEMInnerProductAux
variable = joule_heating
first_source_vec = e_field
second_source_vec = e_field
execute_on = TIMESTEP_END
[]
[]
[Functions]
[exact_e_field]
type = ParsedVectorFunction
expression_x = 'sin(kappa * y)'
expression_y = 'sin(kappa * z)'
expression_z = 'sin(kappa * x)'
symbol_names = kappa
symbol_values = 3.1415926535
[]
[forcing_field]
type = ParsedVectorFunction
expression_x = '(1. + kappa * kappa) * sin(kappa * y)'
expression_y = '(1. + kappa * kappa) * sin(kappa * z)'
expression_z = '(1. + kappa * kappa) * sin(kappa * x)'
symbol_names = kappa
symbol_values = 3.1415926535
[]
[]
[BCs]
[tangential_E_bdr]
type = MFEMVectorTangentialDirichletBC
variable = e_field
vector_coefficient = exact_e_field
[]
[]
[Kernels]
[curlcurl]
type = MFEMCurlCurlKernel
variable = e_field
[]
[mass]
type = MFEMVectorFEMassKernel
variable = e_field
[]
[source]
type = MFEMVectorFEDomainLFKernel
variable = e_field
vector_coefficient = forcing_field
[]
[]
[Preconditioner]
[ams]
type = MFEMHypreAMS
fespace = HCurlFESpace
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = ams
l_tol = 1e-12
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/CurlCurl
vtk_format = ASCII
[]
[]
(test/tests/mfem/ics/vector_ic.i)
[Mesh]
type = MFEMMesh
file = ../mesh/cylinder-hex-q2.gen
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[H1VectorFESpace]
type = MFEMVectorFESpace
fec_type = H1
fec_order = FIRST
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[HDivFESpace]
type = MFEMVectorFESpace
fec_type = RT
fec_order = CONSTANT
[]
[L2VectorFESpace]
type = MFEMVectorFESpace
fec_type = L2
fec_order = CONSTANT
basis = GaussLegendre
[]
[]
[Variables]
[h1_vector]
type = MFEMVariable
fespace = H1VectorFESpace
[]
[nd_vector]
type = MFEMVariable
fespace = HCurlFESpace
[]
[rt_vector]
type = MFEMVariable
fespace = HDivFESpace
[]
[l2_vector]
type = MFEMVariable
fespace = L2VectorFESpace
[]
[]
[Functions]
[external_vector_field]
type = ParsedVectorFunction
expression_x = 'sin(kappa * y)'
expression_y = 'sin(kappa * z)'
expression_z = 'sin(kappa * x)'
symbol_names = kappa
symbol_values = 3.1415926535
[]
[]
[ICs]
[h1_vector_ic]
type = MFEMVectorIC
variable = h1_vector
vector_coefficient = external_vector_field
[]
[l2_vector_ic]
type = MFEMVectorIC
variable = l2_vector
vector_coefficient = external_vector_field
[]
[nd_vector_ic]
type = MFEMVectorIC
variable = nd_vector
vector_coefficient = external_vector_field
[]
[rt_vector_ic]
type = MFEMVectorIC
variable = rt_vector
vector_coefficient = external_vector_field
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/VectorIC
vtk_format = ASCII
[]
[]
(test/tests/mfem/kernels/gravity.i)
[Mesh]
type = MFEMMesh
file = ../mesh/beam-tet.mesh
dim = 3
uniform_refine = 2
displacement = "displacement"
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMVectorFESpace
fec_type = H1
fec_order = FIRST
range_dim = 3
ordering = "vdim"
[]
[]
[Variables]
[displacement]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[BCs]
[dirichlet]
type = MFEMVectorDirichletBC
variable = displacement
boundary = '1'
[]
[]
[FunctorMaterials]
[Rigidium]
type = MFEMGenericFunctorMaterial
prop_names = 'lambda mu'
prop_values = '50.0 50.0'
block = 1
[]
[Bendium]
type = MFEMGenericFunctorMaterial
prop_names = 'lambda mu'
prop_values = '1.0 1.0'
block = 2
[]
[RigidiumWeightDensity]
type = MFEMGenericFunctorVectorMaterial
prop_names = 'gravitational_force_density'
prop_values = '{0.0 0.0 -1e-2}'
block = 1
[]
[BendiumWeightDensity]
type = MFEMGenericFunctorVectorMaterial
prop_names = 'gravitational_force_density'
prop_values = '{0.0 0.0 -5e-3}'
block = 2
[]
[]
[Kernels]
[diff]
type = MFEMLinearElasticityKernel
variable = displacement
lambda = lambda
mu = mu
[]
[gravity]
type = MFEMVectorDomainLFKernel
variable = displacement
vector_coefficient = gravitational_force_density
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
fespace = H1FESpace
l_max_its = 20
l_tol = 1e-5
print_level = 2
[]
[]
[Solver]
type = MFEMHyprePCG
preconditioner = boomeramg
l_max_its = 100
l_tol = 1e-4
l_abs_tol = 0.0
print_level = 2
[]
[Executioner]
type = MFEMSteady
device = "cpu"
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/Gravity
vtk_format = ASCII
[]
[]
(test/tests/mfem/submeshes/hphi_magnetostatic.i)
# Solve for the magnetic field around a closed conductor subject to
# global current constraint.
initial_vacuum_domains = 'Exterior'
vacuum_cut_surface = 'Cut'
conductor_current = 1.0
vacuum_permeability = 1.0
[Problem]
type = MFEMProblem
[]
[Mesh]
type = MFEMMesh
file = ../mesh/split_embedded_concentric_torus.e
[]
[FunctorMaterials]
[Conductor]
type = MFEMGenericFunctorMaterial
prop_names = permeability
prop_values = ${vacuum_permeability}
[]
[]
[ICs]
[vacuum_cut_potential_ic]
type = MFEMScalarBoundaryIC
variable = vacuum_cut_potential
boundary = ${vacuum_cut_surface}
coefficient = ${conductor_current}
[]
[]
[SubMeshes]
[cut]
type = MFEMCutTransitionSubMesh
cut_boundary = ${vacuum_cut_surface}
block = ${initial_vacuum_domains}
transition_subdomain = transition_dom
transition_subdomain_boundary = transition_bdr
closed_subdomain = vacuum_dom
[]
[vacuum]
type = MFEMDomainSubMesh
block = vacuum_dom
[]
[]
[FESpaces]
[VacuumH1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
submesh = vacuum
[]
[VacuumHCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
submesh = vacuum
[]
[TransitionH1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
submesh = cut
[]
[TransitionHCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
submesh = cut
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[]
[Variables]
[vacuum_magnetic_potential]
type = MFEMVariable
fespace = VacuumH1FESpace
[]
[]
[AuxVariables]
[vacuum_cut_potential]
type = MFEMVariable
fespace = VacuumH1FESpace
[]
[transition_cut_potential]
type = MFEMVariable
fespace = TransitionH1FESpace
[]
[transition_cut_function_field]
type = MFEMVariable
fespace = TransitionHCurlFESpace
[]
[background_h_field]
type = MFEMVariable
fespace = VacuumHCurlFESpace
[]
[cut_function_field]
type = MFEMVariable
fespace = VacuumHCurlFESpace
[]
[vacuum_h_field]
type = MFEMVariable
fespace = VacuumHCurlFESpace
[]
[h_field]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxKernels]
[update_background_h_field]
type = MFEMGradAux
variable = background_h_field
source = vacuum_magnetic_potential
scale_factor = -1.0
execute_on = TIMESTEP_END
[]
[update_transition_cut_function_field]
type = MFEMGradAux
variable = transition_cut_function_field
source = transition_cut_potential
scale_factor = -1.0
execute_on = TIMESTEP_END
[]
[update_total_h_field]
type = MFEMSumAux
variable = vacuum_h_field
source_variables = 'background_h_field cut_function_field'
execute_on = TIMESTEP_END
[]
[]
[BCs]
# Set zero of magnetic potential on symmetry plane
[Exterior]
type = MFEMScalarDirichletBC
variable = vacuum_magnetic_potential
boundary = 'Cut'
coefficient = 0.0
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = vacuum_magnetic_potential
coefficient = permeability
[]
[source]
type = MFEMMixedGradGradKernel
trial_variable = vacuum_cut_potential
variable = vacuum_magnetic_potential
coefficient = permeability
block = 'transition_dom'
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-8
l_max_its = 100
[]
[Executioner]
type = MFEMSteady
[]
[Transfers]
[submesh_transfer_to_transition]
type = MFEMSubMeshTransfer
from_variable = vacuum_cut_potential
to_variable = transition_cut_potential
execute_on = TIMESTEP_END
[]
[submesh_transfer_from_transition]
type = MFEMSubMeshTransfer
from_variable = transition_cut_function_field
to_variable = cut_function_field
execute_on = TIMESTEP_END
[]
[submesh_transfer_from_vacuum]
type = MFEMSubMeshTransfer
from_variable = vacuum_h_field
to_variable = h_field
execute_on = TIMESTEP_END
[]
[]
[Postprocessors]
[MagneticEnergy]
type = MFEMVectorFEInnerProductIntegralPostprocessor
coefficient = ${fparse 0.5*vacuum_permeability}
dual_variable = vacuum_h_field
primal_variable = vacuum_h_field
block = 'Exterior'
[]
[]
[Outputs]
[ReportedPostprocessors]
type = CSV
file_base = OutputData/HPhiMagnetostaticClosedCoilCSV
[]
[VacuumParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/HPhiMagnetostaticClosedCoil
vtk_format = ASCII
submesh = vacuum
[]
[]
(test/tests/mfem/transfers/mfem_sub_mfem_sub/sub_recv.i)
[Mesh]
type = MFEMMesh
file = ../../mesh/square.msh
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[AuxVariables]
[recv]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Executioner]
type = MFEMSteady
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/DiffusionRecvApp
vtk_format = ASCII
[]
[]
(test/tests/mfem/transfers/mfem_sub_mfem_sub/parent.i)
[Mesh]
type = MFEMMesh
file = ../../mesh/square.msh
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[MultiApps]
[recv_app]
type = FullSolveMultiApp
input_files = sub_recv.i
execute_on = FINAL
[]
[send_app]
type = FullSolveMultiApp
input_files = sub_send.i
execute_on = INITIAL
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Transfers]
active = 'copy_between_sub'
[copy_between_sub]
type = MultiAppMFEMCopyTransfer
source_variables = send
variables = recv
from_multi_app = send_app
to_multi_app = recv_app
[]
[general_transfer_between_sub]
type = MultiAppMFEMShapeEvaluationTransfer
source_variables = send
variables = recv
from_multi_app = send_app
to_multi_app = recv_app
[]
[]
(test/tests/mfem/submeshes/domain_submesh.i)
[Mesh]
type = MFEMMesh
file = ../mesh/cylinder-hex-q2.gen
[]
[Problem]
type = MFEMProblem
[]
[SubMeshes]
[wire]
type = MFEMDomainSubMesh
block = interior
[]
[]
[FESpaces]
[SubMeshH1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
submesh = wire
[]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[submesh_potential]
type = MFEMVariable
fespace = SubMeshH1FESpace
[]
[]
[BCs]
[top]
type = MFEMScalarDirichletBC
variable = submesh_potential
boundary = front
coefficient = 1.0
[]
[bottom]
type = MFEMScalarDirichletBC
variable = submesh_potential
boundary = back
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = submesh_potential
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-8
l_max_its = 1000
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/DomainPotential
vtk_format = ASCII
submesh = wire
[]
[]
(test/tests/mfem/kernels/irrotational.i)
# 2D irrotational vortex with Nedelec elements of the first kind.
centre_x = -0.75
centre_y = 0.1
[Mesh]
type = MFEMMesh
file = ../mesh/vortex.msh
dim = 2
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = SEVENTH
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = SEVENTH
[]
[]
[Variables]
[velocity_potential]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[AuxVariables]
[velocity]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[Functions]
[speed]
type = ParsedFunction
expression = '1 / sqrt((x-x0)^2 + (y-y0)^2)'
symbol_names = 'x0 y0'
symbol_values = '${centre_x} ${centre_y}'
[]
[theta]
type = ParsedFunction
expression = 'atan2(y-y0, x-x0)'
symbol_names = 'x0 y0'
symbol_values = '${centre_x} ${centre_y}'
[]
[exact_velocity]
type = ParsedVectorFunction
expression_x = '-v * sin(th)'
expression_y = 'v * cos(th)'
symbol_names = 'v th'
symbol_values = 'speed theta'
[]
[]
[BCs]
[potential_velocity_boundary]
type = MFEMScalarDirichletBC
variable = velocity_potential
boundary = '1'
coefficient = theta
[]
[]
[Kernels]
[laplacian]
type = MFEMDiffusionKernel
variable = velocity_potential
[]
[]
[AuxKernels]
[grad]
type = MFEMGradAux
variable = velocity
source = velocity_potential
execute_on = TIMESTEP_END
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Postprocessors]
[potential_error]
type = MFEML2Error
variable = velocity_potential
function = theta
[]
[velocity_error]
type = MFEMVectorL2Error
variable = velocity
function = exact_velocity
[]
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/Irrotational
vtk_format = ASCII
[]
[L2CSV]
type = CSV
file_base = OutputData/Irrotational
[]
[]
(test/tests/mfem/submeshes/magnetostatic.i)
# Definite Maxwell problem solved with Nedelec elements of the first kind
# based on MFEM Example 3.
[Mesh]
type = MFEMMesh
file = ../mesh/cylinder-hex-q2.gen
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[HDivFESpace]
type = MFEMVectorFESpace
fec_type = RT
fec_order = CONSTANT
[]
[]
[Variables]
[a_field]
type = MFEMVariable
fespace = HCurlFESpace
[]
[electric_potential]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[AuxVariables]
[b_field]
type = MFEMVariable
fespace = HDivFESpace
[]
[]
[AuxKernels]
[curl]
type = MFEMCurlAux
variable = b_field
source = a_field
execute_on = TIMESTEP_END
[]
[]
[BCs]
[tangential_a_bdr]
type = MFEMVectorTangentialDirichletBC
variable = a_field
boundary = '1 2 3'
[]
[]
[Kernels]
inactive = coefficient_source
[curlcurl]
type = MFEMCurlCurlKernel
variable = a_field
[]
[auxvar_source]
type = MFEMMixedVectorGradientKernel
trial_variable = electric_potential
variable = a_field
block = 1
[]
[coefficient_source]
type = MFEMVectorFEDomainLFKernel
vector_coefficient = electric_potential_grad
variable = a_field
block = 1
[]
[]
[Preconditioner]
[ams]
type = MFEMHypreAMS
fespace = HCurlFESpace
singular = true
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = ams
l_tol = 1e-12
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[MultiApps]
[subapp]
type = FullSolveMultiApp
input_files = open_coil_source.i
execute_on = INITIAL
[]
[]
[Transfers]
[from_sub]
type = MultiAppMFEMCopyTransfer
source_variables = electric_potential
variables = electric_potential
from_multi_app = subapp
[]
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/Magnetostatic
vtk_format = ASCII
[]
[]
(test/tests/mfem/transfers/mfem_parent_mfem_sub/mfem_parent_vector.i)
[Mesh]
type = MFEMMesh
file = ../../mesh/cube.e
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[H1FESpace]
type = MFEMVectorFESpace
fec_type = H1
fec_order = FIRST
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[HDivFESpace]
type = MFEMVectorFESpace
fec_type = RT
fec_order = CONSTANT
[]
[L2FESpace]
type = MFEMVectorFESpace
fec_type = L2
fec_order = CONSTANT
[]
[]
[Variables]
[mfem_parent_h1_vector_var]
type = MFEMVariable
fespace = H1FESpace
[]
[mfem_parent_hcurl_vector_var]
type = MFEMVariable
fespace = HCurlFESpace
[]
[mfem_parent_hdiv_vector_var]
type = MFEMVariable
fespace = HDivFESpace
[]
[mfem_parent_l2_vector_var]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[AuxVariables]
[mfem_sub_h1_vector_var]
type = MFEMVariable
fespace = H1FESpace
[]
[mfem_sub_hcurl_vector_var]
type = MFEMVariable
fespace = HCurlFESpace
[]
[mfem_sub_hdiv_vector_var]
type = MFEMVariable
fespace = HDivFESpace
[]
[mfem_sub_l2_vector_var]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[Functions]
[vector_field]
type = ParsedVectorFunction
expression_x = 'sin(pi * y)'
expression_y = 'sin(pi * z)'
expression_z = 'sin(pi * x)'
[]
[]
[ICs]
[h1_vector_ic]
type = MFEMVectorIC
variable = mfem_parent_h1_vector_var
vector_coefficient = vector_field
[]
[hcurl_vector_ic]
type = MFEMVectorIC
variable = mfem_parent_hcurl_vector_var
vector_coefficient = vector_field
[]
[hdiv_vector_ic]
type = MFEMVectorIC
variable = mfem_parent_hdiv_vector_var
vector_coefficient = vector_field
[]
[l2_vector_ic]
type = MFEMVectorIC
variable = mfem_parent_l2_vector_var
vector_coefficient = vector_field
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[MultiApps]
[mfem_app]
type = FullSolveMultiApp
input_files = mfem_sub_vector.i
execute_on = 'INITIAL'
[]
[]
[Transfers]
[transfer_from_subapp]
type = MultiAppMFEMShapeEvaluationTransfer
source_variables = 'mfem_sub_h1_vector_var mfem_sub_hcurl_vector_var mfem_sub_hdiv_vector_var mfem_sub_l2_vector_var'
variables = 'mfem_sub_h1_vector_var mfem_sub_hcurl_vector_var mfem_sub_hdiv_vector_var mfem_sub_l2_vector_var'
from_multi_app = mfem_app
[]
[]
[Postprocessors]
[H1_Var_L2_Error]
type = MFEMVectorL2Error
variable = mfem_parent_h1_vector_var
function = mfem_sub_h1_vector_var
execute_on = TIMESTEP_END
[]
[HCurl_Var_L2_Error]
type = MFEMVectorL2Error
variable = mfem_parent_hcurl_vector_var
function = mfem_sub_hcurl_vector_var
execute_on = TIMESTEP_END
[]
[HDiv_Var_L2_Error]
type = MFEMVectorL2Error
variable = mfem_parent_hdiv_vector_var
function = mfem_sub_hdiv_vector_var
execute_on = TIMESTEP_END
[]
[L2_Var_L2_Error]
type = MFEMVectorL2Error
variable = mfem_parent_l2_vector_var
function = mfem_sub_l2_vector_var
execute_on = TIMESTEP_END
[]
[]
[Outputs]
file_base = 'mfem_parent_mfem_sub_vector_h1_hcurl_hdiv_l2_hex'
csv = true
[]
(test/tests/mfem/auxkernels/2Dmagnetostatic.i)
[Mesh]
type = MFEMMesh
file = ../mesh/hinomaru.e
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
#For compatible pairing H1 order p -> ND order p -> RT order p-1
[RTFESpace]
type = MFEMVectorFESpace
fec_type = RT
fec_order = CONSTANT
[]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
fec_order = CONSTANT
basis = GaussLegendre
[]
[]
[Variables]
[Az]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[FunctorMaterials]
[J_wire]
type = MFEMGenericFunctorMaterial
prop_names = J_source
prop_values = 8.0
block = wire
[]
[]
[AuxVariables]
[J]
type = MFEMVariable
fespace = L2FESpace
[]
[gradAz]
type = MFEMVariable
fespace = HCurlFESpace
[]
[B]
type = MFEMVariable
fespace = RTFESpace
[]
[]
[Kernels]
[diffusion]
type = MFEMDiffusionKernel
variable = Az
[]
[source]
type = MFEMDomainLFKernel
variable = Az
coefficient = J_source
[]
[]
[AuxKernels]
[J]
type = MFEMScalarProjectionAux
variable = J
coefficient = J_source
[]
[gradAz]
type = MFEMGradAux
variable = gradAz
source = Az
[]
[B_from_gradAz]
type = MFEMNDtoRTAux
variable = B
source = gradAz
scale_factor = 1.0
[]
[]
[BCs]
[essential]
type = MFEMScalarDirichletBC
variable = Az
boundary = outer
coefficient = 1
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHyprePCG
preconditioner = boomeramg
l_tol = 1e-8
[]
[VectorPostprocessors]
[line_sample]
type = MFEMLineValueSampler
variable = 'B'
start_point = '0 2 0'
end_point = '0 -2 0'
num_points = 10
[]
[]
[Executioner]
type = MFEMSteady
[]
[Outputs]
[ReportedPostprocessors]
type = CSV
file_base = 2DMagnetostatic
[]
[]
(test/tests/mfem/transfers/mfem_parent_mfem_sub/parent_complex.i)
[Mesh]
type = MFEMMesh
file = ../../mesh/square.msh
[]
[Problem]
type = MFEMProblem
solve = false
numeric_type = complex
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[AuxVariables]
[u]
type = MFEMComplexVariable
fespace = H1FESpace
[]
[]
[Executioner]
type = MFEMSteady
[]
[MultiApps]
[subapp]
type = FullSolveMultiApp
input_files = sub_complex.i
execute_on = INITIAL
[]
[]
[Transfers]
active = 'copy_from_sub'
[copy_from_sub]
type = MultiAppMFEMCopyTransfer
source_variables = u
variables = u
from_multi_app = subapp
[]
[general_transfer_from_sub]
type = MultiAppMFEMShapeEvaluationTransfer
source_variables = u
variables = u
from_multi_app = subapp
[]
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/DiffusionComplex
vtk_format = ASCII
[]
[]
(test/tests/mfem/transfers/mfem_parent_mfem_sub/sub.i)
[Mesh]
type = MFEMMesh
file = ../../mesh/square.msh
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[u]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[BCs]
[bottom]
type = MFEMScalarDirichletBC
variable = u
boundary = 2
coefficient = 1.0
[]
[top]
type = MFEMScalarDirichletBC
variable = u
boundary = 4
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = u
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[Executioner]
type = MFEMSteady
[]
[MultiApps]
active = ''
[subapp]
type = FullSolveMultiApp
input_files = parent.i
execute_on = FINAL
[]
[]
[Transfers]
active = ''
[to_sub]
type = MultiAppMFEMCopyTransfer
source_variables = u
variables = u
to_multi_app = subapp
[]
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/DiffusionSub
vtk_format = ASCII
[]
[]
(test/tests/mfem/submeshes/boundary_submesh.i)
[Mesh]
type = MFEMMesh
file = ../mesh/cylinder-hex-q2.gen
uniform_refine = 1
[]
[Problem]
type = MFEMProblem
[]
[SubMeshes]
[exterior]
type = MFEMBoundarySubMesh
boundary = curved_surface
[]
[]
[FESpaces]
[SubMeshH1FESpace]
type = MFEMGenericFESpace
fec_name = H1_2D_P1
submesh = exterior
[]
[]
[Variables]
[submesh_potential]
type = MFEMVariable
fespace = SubMeshH1FESpace
[]
[]
[Kernels]
[mass]
type = MFEMMassKernel
variable = submesh_potential
[]
[source]
type = MFEMDomainLFKernel
variable = submesh_potential
coefficient = 3.0
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-8
l_max_its = 1000
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/BoundaryPotential
vtk_format = ASCII
submesh = exterior
[]
[]
(test/tests/mfem/auxkernels/crossproduct.i)
[Mesh]
type = MFEMMesh
file = ../mesh/ref-cube.mesh
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[HDivFESpace]
type = MFEMVectorFESpace
fec_type = RT
fec_order = CONSTANT
[]
[L2VectorFESpace]
type = MFEMVectorFESpace
fec_type = L2
fec_order = CONSTANT
[]
[]
[Variables]
[e_field]
type = MFEMVariable
fespace = HCurlFESpace
[]
[b_field]
type = MFEMVariable
fespace = HDivFESpace
[]
[]
[AuxVariables]
[lorentz_force]
type = MFEMVariable
fespace = L2VectorFESpace
[]
[]
[Functions]
[external_e_field]
type = ParsedVectorFunction
expression_x = '1'
expression_y = '0'
expression_z = '0'
[]
[external_b_field]
type = ParsedVectorFunction
expression_x = '0'
expression_y = '1'
expression_z = '0'
[]
[]
[ICs]
[e_field_ic]
type = MFEMVectorIC
variable = e_field
vector_coefficient = external_e_field
[]
[b_field_ic]
type = MFEMVectorIC
variable = b_field
vector_coefficient = external_b_field
[]
[]
[AuxKernels]
[cross]
type = MFEMCrossProductAux
variable = lorentz_force
first_source_vec = e_field
second_source_vec = b_field
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/CrossProduct
vtk_format = ASCII
[]
[]
(test/tests/mfem/submeshes/open_coil_source.i)
[Mesh]
type = MFEMMesh
file = ../mesh/cylinder-hex-q2.gen
[]
[Problem]
type = MFEMProblem
[]
[SubMeshes]
[wire]
type = MFEMDomainSubMesh
block = 1
[]
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[SubMeshH1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
submesh = wire
[]
[]
[Variables]
[electric_potential]
type = MFEMVariable
fespace = H1FESpace
[]
[submesh_potential]
type = MFEMVariable
fespace = SubMeshH1FESpace
[]
[]
[BCs]
[high_terminal]
type = MFEMScalarDirichletBC
variable = submesh_potential
boundary = '1'
coefficient = 1.0
[]
[low_terminal]
type = MFEMScalarDirichletBC
variable = submesh_potential
boundary = '2'
coefficient = 0.0
[]
[]
[FunctorMaterials]
[Substance]
type = MFEMGenericFunctorMaterial
prop_names = conductivity
prop_values = 1.0
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = submesh_potential
coefficient = conductivity
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-12
[]
[Executioner]
type = MFEMSteady
[]
[Transfers]
[submesh_potential_transfer]
type = MFEMSubMeshTransfer
from_variable = submesh_potential
to_variable = electric_potential
[]
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/OpenCoilSourceSubMesh
vtk_format = ASCII
submesh = wire
[]
[]
(test/tests/mfem/submeshes/av_magnetostatic.i)
# Magnetostatic problem solved on a closed conductor subject to
# global loop voltage constraint.
[Mesh]
type = MFEMMesh
file = ../mesh/embedded_concentric_torus.e
[]
[Problem]
type = MFEMProblem
[]
[SubMeshes]
inactive = 'fluxcut'
[fluxcut]
type = MFEMCutTransitionSubMesh
cut_boundary = 'MeasurementPlane'
block = 'TorusCore TorusSheath'
transition_subdomain = transition_dom
transition_subdomain_boundary = transition_bdr
closed_subdomain = coil_dom
[]
[]
[FESpaces]
inactive = 'FluxFESpace'
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[HDivFESpace]
type = MFEMVectorFESpace
fec_type = RT
fec_order = CONSTANT
[]
[FluxFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
submesh = fluxcut
[]
[]
[Variables]
[a_field]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxVariables]
inactive = 'flux_e_field'
[b_field]
type = MFEMVariable
fespace = HDivFESpace
[]
[e_field]
type = MFEMVariable
fespace = HCurlFESpace
[]
[flux_e_field]
type = MFEMVariable
fespace = FluxFESpace
[]
[]
[AuxKernels]
[curl]
type = MFEMCurlAux
variable = b_field
source = a_field
scale_factor = 1.0
execute_on = TIMESTEP_END
[]
[]
[Functions]
[exact_a_field]
type = ParsedVectorFunction
expression_x = '0'
expression_y = '0'
expression_z = '0'
[]
[]
[BCs]
[tangential_a_bdr]
type = MFEMVectorTangentialDirichletBC
variable = a_field
vector_coefficient = exact_a_field
boundary = 'Exterior'
[]
[]
[FunctorMaterials]
inactive = 'ConductorBoundary'
[Vacuum]
type = MFEMGenericFunctorMaterial
prop_names = reluctivity
prop_values = 1.0
[]
[Conductor]
type = MFEMGenericFunctorMaterial
prop_names = conductivity
prop_values = 1.0
block = 'TorusCore TorusSheath'
[]
[ConductorBoundary]
type = MFEMGenericFunctorMaterial
prop_names = conductivity_boundary
prop_values = 1.0
boundary = 'MeasurementPlane'
[]
[]
[Kernels]
[mass]
type = MFEMVectorFEMassKernel
variable = a_field
coefficient = 1e-10
[]
[curlcurl]
type = MFEMCurlCurlKernel
variable = a_field
coefficient = reluctivity
[]
[source]
type = MFEMMixedVectorMassKernel
variable = a_field
trial_variable = e_field
coefficient = conductivity
block = 'TorusCore TorusSheath'
[]
[]
[Preconditioner]
[ams]
type = MFEMHypreAMS
fespace = HCurlFESpace
[]
[]
[Solver]
type = MFEMHyprePCG
preconditioner = ams
l_tol = 1e-14
l_max_its = 1000
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[MultiApps]
[coil]
type = FullSolveMultiApp
input_files = cut_closed_coil.i
execute_on = INITIAL
[]
[]
[Transfers]
inactive = 'submesh_transfer_to_fluxsurface'
[from_coil]
type = MultiAppMFEMCopyTransfer
source_variables = e_field
variables = e_field
from_multi_app = coil
[]
[submesh_transfer_to_fluxsurface]
type = MFEMSubMeshTransfer
from_variable = e_field
to_variable = flux_e_field
execute_on = TIMESTEP_END
[]
[]
[Postprocessors]
inactive = 'CoilCurrent'
[CoilPower]
type = MFEMVectorFEInnerProductIntegralPostprocessor
coefficient = conductivity
dual_variable = e_field
primal_variable = e_field
block = 'TorusCore TorusSheath'
[]
[CoilCurrent]
type = MFEMVectorBoundaryFluxIntegralPostprocessor
coefficient = conductivity_boundary
variable = flux_e_field
boundary = 'MeasurementPlane'
[]
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/MagnetostaticClosedCoil
vtk_format = ASCII
[]
[ReportedPostprocessors]
type = CSV
file_base = OutputData/AVMagnetostaticClosedCoilCSV
[]
[]
(test/tests/mfem/transfers/h1_mfem_parent_libmesh_sub/mfem_parent_scalar.i)
[Mesh]
type = MFEMMesh
file = ../../mesh/square_quad9.e
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[mfem_scalar_var]
type = MFEMVariable
fespace = H1FESpace
[]
[libmesh_scalar_var]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[BCs]
[sides]
type = MFEMScalarDirichletBC
variable = mfem_scalar_var
coefficient = 1.0
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = mfem_scalar_var
[]
[source]
type = MFEMDomainLFKernel
variable = mfem_scalar_var
coefficient = 2.0
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[jacobi]
type = MFEMOperatorJacobiSmoother
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-12
l_max_its = 1000
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[MultiApps]
[libmesh_app]
type = FullSolveMultiApp
input_files = libmesh_sub_scalar.i
execute_on = 'INITIAL'
[]
[]
[Transfers]
[transfer_from_libmesh]
type = MultiApplibMeshToMFEMShapeEvaluationTransfer
source_variables = libmesh_scalar_var
variables = libmesh_scalar_var
from_multi_app = libmesh_app
[]
[]
[Postprocessors]
[Difference]
type = MFEML2Error
variable = mfem_scalar_var
function = libmesh_scalar_var
execute_on = TIMESTEP_END
[]
[]
[Outputs]
file_base = 'mfem_parent_libmesh_sub_scalar_quads'
csv = true
[]
(test/tests/mfem/kernels/darcy.i)
[Mesh]
type = MFEMMesh
file = ../mesh/star.mesh
uniform_refine = 2
[]
[Problem]
type = MFEMProblem
[]
[Functions]
[exact_velocity]
type = ParsedVectorFunction
expression_x = '-exp(x) * sin(y)'
expression_y = '-exp(x) * cos(y)'
[]
[exact_pressure]
type = ParsedFunction
expression = 'exp(x) * sin(y)'
[]
[exact_pressure_rhs]
type = ParsedFunction
expression = '-exp(x) * sin(y)'
[]
[]
[FESpaces]
[HDivFESpace]
type = MFEMVectorFESpace
fec_type = RT
fec_order = SECOND
[]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
fec_order = SECOND
basis = GaussLegendre
[]
[]
[Variables]
[velocity]
type = MFEMVariable
fespace = HDivFESpace
[]
[pressure]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[BCs]
[flux_boundaries]
type = MFEMVectorFEBoundaryFluxIntegratedBC
variable = velocity
coefficient = exact_pressure_rhs
[]
[]
[Kernels]
[VelocityMass]
type = MFEMVectorFEMassKernel
variable = velocity
[]
[PressureGrad]
type = MFEMVectorFEDivergenceKernel
trial_variable = pressure
variable = velocity
coefficient = -1
transpose = true
[]
[VelocityDiv]
type = MFEMVectorFEDivergenceKernel
trial_variable = velocity
variable = pressure
coefficient = -1
[]
[]
[Solver]
type = MFEMMUMPS
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Postprocessors]
[velocity_error]
type = MFEMVectorL2Error
variable = velocity
function = exact_velocity
[]
[pressure_error]
type = MFEML2Error
variable = pressure
function = exact_pressure
[]
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/Darcy
vtk_format = ASCII
[]
[DarcyErrorCSV]
type = CSV
file_base = OutputData/Darcy
[]
[]
(test/tests/mfem/transfers/l2_mfem_parent_libmesh_sub/mfem_parent_scalar.i)
[Mesh]
type = MFEMMesh
file = ../../mesh/square_quad9.e
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
fec_order = CONSTANT
[]
[]
[Variables]
[mfem_scalar_var]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[AuxVariables]
[libmesh_scalar_var]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[Functions]
[parsed_function]
type = ParsedFunction
expression = 'x*x + y*y'
[]
[]
[ICs]
[libmesh_scalar_var_ic]
type = MFEMScalarIC
variable = 'mfem_scalar_var'
coefficient = parsed_function
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[MultiApps]
[libmesh_app]
type = FullSolveMultiApp
input_files = libmesh_sub_scalar.i
execute_on = 'INITIAL'
[]
[]
[Transfers]
[transfer_from_libmesh]
type = MultiApplibMeshToMFEMShapeEvaluationTransfer
source_variables = libmesh_scalar_var
variables = libmesh_scalar_var
from_multi_app = libmesh_app
[]
[]
[Postprocessors]
[Difference]
type = MFEML2Error
variable = mfem_scalar_var
function = libmesh_scalar_var
execute_on = TIMESTEP_END
[]
[]
[Outputs]
file_base = 'mfem_parent_libmesh_sub_scalar_quads'
csv = true
[]