- fileThe name of the mesh file to read.
C++ Type:MeshFileName
Controllable:No
Description:The name of the mesh file to read.
MFEMFileMesh
Overview
MFEMFileMesh reads an mfem::ParMesh from file for use in an MFEMProblem. Exodus files are supported, along with other mesh formats listed here.
Example Input File Syntax
[Problem<<<{"href": "../../../syntax/Problem/index.html"}>>>]
type = MFEMProblem
[]
[Mesh<<<{"href": "../../../syntax/Mesh/index.html"}>>>]
type = MFEMFileMesh
file = ../mesh/mug.e
[](test/tests/mfem/kernels/diffusion.i)Input Parameters
- allow_renumberingTrueIf allow_renumbering=false, node and element numbers are kept fixed until deletion
Default:True
C++ Type:bool
Controllable:No
Description:If allow_renumbering=false, node and element numbers are kept fixed until deletion
- displacementOptional variable to use for mesh displacement.
C++ Type:std::string
Controllable:No
Description:Optional variable to use for mesh displacement.
- ghosting_patch_sizeThe number of nearest neighbors considered for ghosting purposes when 'iteration' patch update strategy is used. Default is 5 * patch_size.
C++ Type:unsigned int
Controllable:No
Description:The number of nearest neighbors considered for ghosting purposes when 'iteration' patch update strategy is used. Default is 5 * patch_size.
- nonconformingFalseEnsures the mesh is non-conforming: necessary for refining quad/hex meshes and load (re)balancing.
Default:False
C++ Type:bool
Controllable:No
Description:Ensures the mesh is non-conforming: necessary for refining quad/hex meshes and load (re)balancing.
- parallel_refine0Number of parallel refinements to perform on the mesh.
Default:0
C++ Type:unsigned int
Controllable:No
Description:Number of parallel refinements to perform on the mesh.
- parallel_typeDEFAULTDEFAULT: Use libMesh::ReplicatedMesh unless --distributed-mesh is specified on the command line REPLICATED: Always use libMesh::ReplicatedMesh DISTRIBUTED: Always use libMesh::DistributedMesh
Default:DEFAULT
C++ Type:MooseEnum
Options:DEFAULT, REPLICATED, DISTRIBUTED
Controllable:No
Description:DEFAULT: Use libMesh::ReplicatedMesh unless --distributed-mesh is specified on the command line REPLICATED: Always use libMesh::ReplicatedMesh DISTRIBUTED: Always use libMesh::DistributedMesh
- reorder_meshFalseDetermines whether we reorder the mesh to improve dynamic partitioning. Only Hilbert sorting is supported at present.
Default:False
C++ Type:bool
Controllable:No
Description:Determines whether we reorder the mesh to improve dynamic partitioning. Only Hilbert sorting is supported at present.
- serial_refine0Number of serial refinements to perform on the mesh. Equivalent to uniform_refine.
Default:0
C++ Type:unsigned int
Controllable:No
Description:Number of serial refinements to perform on the mesh. Equivalent to uniform_refine.
- skip_refine_when_use_splitTrueTrue to skip uniform refinements when using a pre-split mesh.
Default:True
C++ Type:bool
Controllable:No
Description:True to skip uniform refinements when using a pre-split mesh.
- uniform_refine0Number of serial refinements to perform on the mesh. Equivalent to serial_refine
Default:0
C++ Type:unsigned int
Controllable:No
Description:Number of serial refinements to perform on the mesh. Equivalent to serial_refine
Optional Parameters
- add_nodeset_idsThe listed nodeset ids will be assumed valid for the mesh. This permits setting up boundary restrictions for node initially containing no sides. Names for this nodesets may be provided using add_nodeset_names. In this case this list and add_nodeset_names must contain the same number of items.
C++ Type:std::vector<short>
Controllable:No
Description:The listed nodeset ids will be assumed valid for the mesh. This permits setting up boundary restrictions for node initially containing no sides. Names for this nodesets may be provided using add_nodeset_names. In this case this list and add_nodeset_names must contain the same number of items.
- add_nodeset_namesThe listed nodeset names will be assumed valid for the mesh. This permits setting up boundary restrictions for nodesets initially containing no sides. Ids for this nodesets may be provided using add_nodesets_ids. In this case this list and add_nodesets_ids must contain the same number of items.
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The listed nodeset names will be assumed valid for the mesh. This permits setting up boundary restrictions for nodesets initially containing no sides. Ids for this nodesets may be provided using add_nodesets_ids. In this case this list and add_nodesets_ids must contain the same number of items.
- add_sideset_idsThe listed sideset ids will be assumed valid for the mesh. This permits setting up boundary restrictions for sidesets initially containing no sides. Names for this sidesets may be provided using add_sideset_names. In this case this list and add_sideset_names must contain the same number of items.
C++ Type:std::vector<short>
Controllable:No
Description:The listed sideset ids will be assumed valid for the mesh. This permits setting up boundary restrictions for sidesets initially containing no sides. Names for this sidesets may be provided using add_sideset_names. In this case this list and add_sideset_names must contain the same number of items.
- add_sideset_namesThe listed sideset names will be assumed valid for the mesh. This permits setting up boundary restrictions for sidesets initially containing no sides. Ids for this sidesets may be provided using add_sideset_ids. In this case this list and add_sideset_ids must contain the same number of items.
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The listed sideset names will be assumed valid for the mesh. This permits setting up boundary restrictions for sidesets initially containing no sides. Ids for this sidesets may be provided using add_sideset_ids. In this case this list and add_sideset_ids must contain the same number of items.
- add_subdomain_idsThe listed subdomain ids will be assumed valid for the mesh. This permits setting up subdomain restrictions for subdomains initially containing no elements, which can occur, for example, in additive manufacturing simulations which dynamically add and remove elements. Names for this subdomains may be provided using add_subdomain_names. In this case this list and add_subdomain_names must contain the same number of items.
C++ Type:std::vector<unsigned short>
Controllable:No
Description:The listed subdomain ids will be assumed valid for the mesh. This permits setting up subdomain restrictions for subdomains initially containing no elements, which can occur, for example, in additive manufacturing simulations which dynamically add and remove elements. Names for this subdomains may be provided using add_subdomain_names. In this case this list and add_subdomain_names must contain the same number of items.
- add_subdomain_namesThe listed subdomain names will be assumed valid for the mesh. This permits setting up subdomain restrictions for subdomains initially containing no elements, which can occur, for example, in additive manufacturing simulations which dynamically add and remove elements. IDs for this subdomains may be provided using add_subdomain_ids. Otherwise IDs are automatically assigned. In case add_subdomain_ids is set too, both lists must contain the same number of items.
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The listed subdomain names will be assumed valid for the mesh. This permits setting up subdomain restrictions for subdomains initially containing no elements, which can occur, for example, in additive manufacturing simulations which dynamically add and remove elements. IDs for this subdomains may be provided using add_subdomain_ids. Otherwise IDs are automatically assigned. In case add_subdomain_ids is set too, both lists must contain the same number of items.
Pre-Declaration Of Future Mesh Sub-Entities Parameters
- alpha_rotationThe number of degrees that the domain should be alpha-rotated using the Euler angle ZXZ convention from https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix in order to align with a canonical physical space of your choosing.
C++ Type:Real
Unit:(no unit assumed)
Range:-180
Controllable:No
Description:The number of degrees that the domain should be alpha-rotated using the Euler angle ZXZ convention from https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix in order to align with a canonical physical space of your choosing.
- beta_rotationThe number of degrees that the domain should be beta-rotated using the Euler angle ZXZ convention from https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix in order to align with a canonical physical space of your choosing.
C++ Type:Real
Unit:(no unit assumed)
Range:-180
Controllable:No
Description:The number of degrees that the domain should be beta-rotated using the Euler angle ZXZ convention from https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix in order to align with a canonical physical space of your choosing.
- gamma_rotationThe number of degrees that the domain should be gamma-rotated using the Euler angle ZXZ convention from https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix in order to align with a canonical physical space of your choosing.
C++ Type:Real
Unit:(no unit assumed)
Range:-180
Controllable:No
Description:The number of degrees that the domain should be gamma-rotated using the Euler angle ZXZ convention from https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix in order to align with a canonical physical space of your choosing.
- length_unitHow much distance one mesh length unit represents, e.g. 1 cm, 1 nm, 1 ft, 5inches
C++ Type:std::string
Controllable:No
Description:How much distance one mesh length unit represents, e.g. 1 cm, 1 nm, 1 ft, 5inches
- up_directionSpecify what axis corresponds to the up direction in physical space (the opposite of the gravity vector if you will). If this parameter is provided, we will perform a single 90 degree rotation of the domain--if the provided axis is 'x' or 'z', we will not rotate if the axis is 'y'--such that a point which was on the provided axis will now lie on the y-axis, e.g. the y-axis is our canonical up direction. If you want finer grained control than this, please use the 'alpha_rotation', 'beta_rotation', and 'gamma_rotation' parameters.
C++ Type:MooseEnum
Options:X, Y, Z
Controllable:No
Description:Specify what axis corresponds to the up direction in physical space (the opposite of the gravity vector if you will). If this parameter is provided, we will perform a single 90 degree rotation of the domain--if the provided axis is 'x' or 'z', we will not rotate if the axis is 'y'--such that a point which was on the provided axis will now lie on the y-axis, e.g. the y-axis is our canonical up direction. If you want finer grained control than this, please use the 'alpha_rotation', 'beta_rotation', and 'gamma_rotation' parameters.
Transformations Relative To Parent Application Frame Of Reference Parameters
- coord_blockBlock IDs for the coordinate systems. If this parameter is specified, then it must encompass all the subdomains on the mesh.
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:Block IDs for the coordinate systems. If this parameter is specified, then it must encompass all the subdomains on the mesh.
- coord_typeXYZType of the coordinate system per block param
Default:XYZ
C++ Type:MultiMooseEnum
Options:XYZ, RZ, RSPHERICAL
Controllable:No
Description:Type of the coordinate system per block param
- rz_coord_axisYThe rotation axis (X | Y) for axisymmetric coordinates
Default:Y
C++ Type:MooseEnum
Options:X, Y
Controllable:No
Description:The rotation axis (X | Y) for axisymmetric coordinates
- rz_coord_blocksBlocks using general axisymmetric coordinate systems
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:Blocks using general axisymmetric coordinate systems
- rz_coord_directionsAxis directions for each block in 'rz_coord_blocks'
C++ Type:std::vector<libMesh::VectorValue<Real>>
Unit:(no unit assumed)
Controllable:No
Description:Axis directions for each block in 'rz_coord_blocks'
- rz_coord_originsAxis origin points for each block in 'rz_coord_blocks'
C++ Type:std::vector<libMesh::Point>
Controllable:No
Description:Axis origin points for each block in 'rz_coord_blocks'
Coordinate System Parameters
- build_all_side_lowerd_meshFalseTrue to build the lower-dimensional mesh for all sides.
Default:False
C++ Type:bool
Controllable:No
Description:True to build the lower-dimensional mesh for all sides.
- construct_node_list_from_side_listTrueWhether or not to generate nodesets from the sidesets (currently often required).
Default:True
C++ Type:bool
Controllable:No
Description:Whether or not to generate nodesets from the sidesets (currently often required).
- displace_node_list_by_side_listTrueWhether to renumber existing nodesets with ids matching sidesets that lack names matching sidesets, when constructing nodesets from sidesets via the default 'construct_node_list_from_side_list' option, rather than to merge them with the sideset.
Default:True
C++ Type:bool
Controllable:No
Description:Whether to renumber existing nodesets with ids matching sidesets that lack names matching sidesets, when constructing nodesets from sidesets via the default 'construct_node_list_from_side_list' option, rather than to merge them with the sideset.
Automatic Definition Of Mesh Element Sides Entities Parameters
- centroid_partitioner_directionSpecifies the sort direction if using the centroid partitioner. Available options: x, y, z, radial
C++ Type:MooseEnum
Options:x, y, z, radial
Controllable:No
Description:Specifies the sort direction if using the centroid partitioner. Available options: x, y, z, radial
- partitionerdefaultSpecifies a mesh partitioner to use when splitting the mesh for a parallel computation.
Default:default
C++ Type:MooseEnum
Options:default, metis, parmetis, linear, centroid, hilbert_sfc, morton_sfc, custom
Controllable:No
Description:Specifies a mesh partitioner to use when splitting the mesh for a parallel computation.
Partitioning 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.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
Advanced Parameters
- max_leaf_size10The maximum number of points in each leaf of the KDTree used in the nearest neighbor search. As the leaf size becomes larger,KDTree construction becomes faster but the nearest neighbor searchbecomes slower.
Default:10
C++ Type:unsigned int
Controllable:No
Description:The maximum number of points in each leaf of the KDTree used in the nearest neighbor search. As the leaf size becomes larger,KDTree construction becomes faster but the nearest neighbor searchbecomes slower.
- patch_size40The number of nodes to consider in the NearestNode neighborhood.
Default:40
C++ Type:unsigned int
Controllable:No
Description:The number of nodes to consider in the NearestNode neighborhood.
- patch_update_strategyneverHow often to update the geometric search 'patch'. The default is to never update it (which is the most efficient but could be a problem with lots of relative motion). 'always' will update the patch for all secondary nodes at the beginning of every timestep which might be time consuming. 'auto' will attempt to determine at the start of which timesteps the patch for all secondary nodes needs to be updated automatically.'iteration' updates the patch at every nonlinear iteration for a subset of secondary nodes for which penetration is not detected. If there can be substantial relative motion between the primary and secondary surfaces during the nonlinear iterations within a timestep, it is advisable to use 'iteration' option to ensure accurate contact detection.
Default:never
C++ Type:MooseEnum
Options:never, always, auto, iteration
Controllable:No
Description:How often to update the geometric search 'patch'. The default is to never update it (which is the most efficient but could be a problem with lots of relative motion). 'always' will update the patch for all secondary nodes at the beginning of every timestep which might be time consuming. 'auto' will attempt to determine at the start of which timesteps the patch for all secondary nodes needs to be updated automatically.'iteration' updates the patch at every nonlinear iteration for a subset of secondary nodes for which penetration is not detected. If there can be substantial relative motion between the primary and secondary surfaces during the nonlinear iterations within a timestep, it is advisable to use 'iteration' option to ensure accurate contact detection.
Geometric Search Parameters
Input Files
- (test/tests/mfem/ics/vector_ic.i)
- (test/tests/mfem/transfers/sibling_transfers/mfem_sub_between_diffusion.i)
- (test/tests/mfem/ics/transient_scalar_ic.i)
- (test/tests/mfem/kernels/mixed_heattransfer.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/mfem_parent_embedded_submesh.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/parent_complex.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/mfem_parent_vector.i)
- (test/tests/mfem/kernels/darcy.i)
- (test/tests/mfem/nonlinear/nlheatconduction_qf.i)
- (test/tests/mfem/vectorpostprocessors/point_value_sampler/point_value_sampler_boundary_warn.i)
- (test/tests/mfem/kernels/irrotational.i)
- (test/tests/mfem/timesteppers/mfem_multiple_timesteppers.i)
- (test/tests/mfem/functions/quadrature_function_source.i)
- (test/tests/mfem/kernels/gravity.i)
- (test/tests/mfem/submeshes/nl_hphi_magnetodynamic.i)
- (test/tests/mfem/kernels/diffusion_eigenproblem.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/sub_complex.i)
- (test/tests/mfem/submeshes/open_coil_source.i)
- (test/tests/mfem/complex/mixed_sesquilinear_ic.i)
- (test/tests/mfem/kernels/diffusion_amr.i)
- (test/tests/mfem/solvers/pmg_diffusion.i)
- (test/tests/mfem/ics/scalar_ic.i)
- (test/tests/mfem/transfers/l2_mfem_parent_libmesh_sub/mfem_parent_scalar.i)
- (test/tests/mfem/kernels/dg_diffusion.i)
- (test/tests/mfem/transfers/h1_libmesh_parent_mfem_sub/mfem_sub_scalar.i)
- (test/tests/mfem/submeshes/av_magnetostatic.i)
- (test/tests/mfem/kernels/linearelasticity.i)
- (test/tests/mfem/complex/mixed_sesquilinear_real_imag.i)
- (test/tests/mfem/problemcomposers/custom_composer_and_operator.i)
- (test/tests/mfem/vectorpostprocessors/point_value_sampler/point_value_sampler_boundary_tol.i)
- (test/tests/mfem/submeshes/boundary_submesh.i)
- (test/tests/mfem/nonlinear/nlheattransfer.i)
- (test/tests/mfem/multiapps/problem.i)
- (test/tests/mfem/transfers/displaced/mfem_child.i)
- (test/tests/mfem/submeshes/domain_submesh_transfer.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/mfem_sub_embedded_submesh.i)
- (test/tests/mfem/auxkernels/projection.i)
- (test/tests/mfem/kernels/curlcurl.i)
- (test/tests/mfem/transfers/displaced/mfem_parent.i)
- (test/tests/mfem/transfers/l2_libmesh_parent_mfem_sub/mfem_sub_scalar.i)
- (test/tests/mfem/complex/complex_waveguide.i)
- (test/tests/mfem/transfers/mfem_sub_mfem_sub/sub_send.i)
- (test/tests/mfem/timesteppers/mfem_multiple_timesequences.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/parent.i)
- (test/tests/mfem/variables/displacement_state.i)
- (test/tests/mfem/complex/mixed_sesquilinear.i)
- (test/tests/mfem/submeshes/cut_closed_coil.i)
- (test/tests/mfem/kernels/heattransfer.i)
- (test/tests/mfem/transfers/mfem_sub_mfem_sub/parent.i)
- (test/tests/mfem/kernels/graddiv.i)
- (test/tests/mfem/submeshes/domain_submesh.i)
- (test/tests/mfem/transfers/h1_mfem_parent_libmesh_sub/mfem_parent_scalar.i)
- (test/tests/mfem/auxkernels/2Dmagnetostatic.i)
- (test/tests/mfem/kernels/gravity_qf.i)
- (test/tests/mfem/kernels/diffusion.i)
- (test/tests/mfem/nonlinear/nldiffusion_common.i)
- (test/tests/mfem/submeshes/hphi_magnetodynamic.i)
- (test/tests/mfem/auxkernels/crossproduct.i)
- (test/tests/mfem/nonlinear/nlheatconduction.i)
- (test/tests/mfem/complex/complex.i)
- (test/tests/mfem/transfers/mfem_sub_mfem_sub/sub_recv.i)
- (test/tests/mfem/submeshes/hphi_magnetostatic.i)
- (test/tests/mfem/vectorpostprocessors/coefficient_value_sampler/coefficient_value_sampler_boundary.i)
- (test/tests/mfem/functions/cylindrical_coefficients.i)
- (test/tests/mfem/submeshes/magnetostatic.i)
- (test/tests/mfem/variables/mfem_variables_from_moose.i)
- (test/tests/mfem/transfers/sibling_transfers/mfem_main_between_multiapp.i)
- (test/tests/mfem/functions/parsed_function_source.i)
- (test/tests/mfem/vectorpostprocessors/coefficient_value_sampler/coefficient_value_sampler.i)
- (test/tests/mfem/kernels/maxwell_eigenproblem.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/sub.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/mfem_sub_vector.i)
- (test/tests/mfem/vectorpostprocessors/point_value_sampler/point_value_sampler_point_not_found.i)
(test/tests/mfem/kernels/diffusion.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[BCs]
[bottom]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'bottom'
coefficient = 1.0
[]
[top]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'top'
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = concentration
[]
[]
[Solvers]
inactive = 'jacobi'
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[jacobi]
type = MFEMOperatorJacobiSmoother
[]
[main]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Postprocessors]
[solution_l2_norm]
type = MFEML2Error
variable = concentration
function = 0
[]
[]
[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/ics/vector_ic.i)
[Mesh]
type = MFEMFileMesh
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/transfers/sibling_transfers/mfem_sub_between_diffusion.i)
[Problem]
type = MFEMProblem
solve = false
[]
[Mesh]
type = MFEMFileMesh
file = ../../mesh/square_quad9.e
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
fec_order = CONSTANT
[]
[]
[AuxVariables]
[sent_nodal]
type = MFEMVariable
fespace = H1FESpace
[]
[received_nodal]
type = MFEMVariable
fespace = H1FESpace
[]
[sent_elem]
type = MFEMVariable
fespace = L2FESpace
[]
[received_elem]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[Functions]
[sent_nodal_var_func]
type = ParsedFunction
expression = '1 + 2*x*x + 3*y*y*y'
[]
[sent_elem_var_func]
type = ParsedFunction
expression = '2 + 2*x*x + 3*y*y*y'
[]
[received_nodal_var_func]
type = ParsedFunction
expression = '3 + 2*x*x + 3*y*y*y'
[]
[received_elem_var_func]
type = ParsedFunction
expression = '4 + 2*x*x + 3*y*y*y'
[]
[]
[ICs]
[sent_nodal_var_ic]
type = MFEMScalarIC
variable = 'sent_nodal'
coefficient = sent_nodal_var_func
[]
[sent_elem_var_ic]
type = MFEMScalarIC
variable = 'sent_elem'
coefficient = sent_elem_var_func
[]
[received_nodal_var_ic]
type = MFEMScalarIC
variable = 'received_nodal'
coefficient = -1
[]
[received_elem_var_ic]
type = MFEMScalarIC
variable = 'received_elem'
coefficient = -1
[]
[]
[Executioner]
type = MFEMTransient
num_steps = 1
device = cpu
[]
[VectorPostprocessors]
[nodal_sample]
type = MFEMVariableLineValueSampler
variable = 'received_nodal'
start_point = '0.0 0.0 0.0'
end_point = '1.0 1.0 0.0'
num_points = 14
execute_on = TIMESTEP_END
[]
[elem_sample]
type = MFEMVariableLineValueSampler
variable = 'received_elem'
start_point = '0.0 0.0 0.0'
end_point = '1.0 1.0 0.0'
num_points = 14
execute_on = TIMESTEP_END
[]
[]
[Outputs]
csv = true
inactive = ParaViewDataCollection
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
vtk_format = ASCII
[]
[]
(test/tests/mfem/ics/transient_scalar_ic.i)
[Mesh]
type = MFEMFileMesh
file = ../mesh/cylinder-hex-q2.gen
[]
[Problem]
type = MFEMProblem
[]
[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
[]
[]
[AuxVariables]
[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
[]
[]
[Kernels]
[h1_laplacian]
type = MFEMDiffusionKernel
variable = h1_scalar
[]
[dh1_dt]
type = MFEMTimeDerivativeMassKernel
variable = h1_scalar
[]
[]
[BCs]
[bottom]
type = MFEMScalarDirichletBC
variable = h1_scalar
boundary = '1'
coefficient = height
[]
[top_dirichlet]
type = MFEMScalarDirichletBC
variable = h1_scalar
boundary = '2'
coefficient = height
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
type = MFEMHypreGMRES
preconditioner = boomeramg
use_initial_guess = true # problem is solved by initial condition
[]
[]
[Executioner]
type = MFEMTransient
device = cpu
dt = 2.0
start_time = 0.0
end_time = 2.0
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/TransientScalarIC
vtk_format = ASCII
[]
[]
(test/tests/mfem/kernels/mixed_heattransfer.i)
# Mixed heat transfer problem.
# Based on Firedrake Irksome demo_mixed_heat example:
# https://www.firedrakeproject.org/Irksome/demos/demo_mixed_heat.py.html
[Mesh]
type = MFEMFileMesh
file = ../mesh/square.e
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[HDivFESpace]
type = MFEMVectorFESpace
fec_type = RT
fec_order = FIRST
[]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
fec_order = FIRST
[]
[]
[Variables]
[time_integrated_heat_flux]
type = MFEMVariable
fespace = HDivFESpace
time_derivative = heat_flux
[]
[temperature]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[Kernels]
[dT_dt,T']
type = MFEMTimeDerivativeMassKernel
variable = temperature
[]
[divh,T']
type = MFEMVectorFEDivergenceKernel
trial_variable = heat_flux
variable = temperature
[]
[h,h']
type = MFEMTimeDerivativeVectorFEMassKernel
variable = time_integrated_heat_flux
[]
[-T,div.h']
type = MFEMVectorFEDivergenceKernel
trial_variable = temperature
variable = time_integrated_heat_flux
coefficient = -1.0
transpose = true
[]
[]
[BCs]
[gamma_T_right]
type = MFEMVectorFEBoundaryFluxIntegratedBC
variable = time_integrated_heat_flux
coefficient = 0.0
boundary = 2
[]
[gamma_T_left]
type = MFEMVectorFEBoundaryFluxIntegratedBC
variable = time_integrated_heat_flux
coefficient = -1.0
boundary = 4
[]
[gamma_h_topbottom]
type = MFEMVectorNormalDirichletBC
variable = time_integrated_heat_flux
vector_coefficient = '0.0 0.0'
boundary = '1 3'
[]
[]
[Solvers]
[main]
type = MFEMSuperLU
[]
[]
[Executioner]
type = MFEMTransient
device = cpu
assembly_level = legacy
dt = 0.03
start_time = 0.0
end_time = 0.09
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/MixedHeatTransfer
vtk_format = ASCII
[]
[]
(test/tests/mfem/transfers/mfem_parent_mfem_sub/mfem_parent_embedded_submesh.i)
[Mesh]
type = MFEMFileMesh
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/transfers/mfem_parent_mfem_sub/parent_complex.i)
[Mesh]
type = MFEMFileMesh
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/mfem_parent_vector.i)
[Mesh]
type = MFEMFileMesh
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/kernels/darcy.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[Solvers]
[main]
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/nonlinear/nlheatconduction_qf.i)
# Nonlinear heat conduction (MFEM Example 16), with the temperature-dependent diffusivity routed
# through a scalar quadrature function coefficient. The stored values are re-projected on each
# nonlinear iteration, reproducing the reference solve in nlheatconduction.i.
kappa = 0.5
alpha = 1e-2
[Mesh]
type = MFEMFileMesh
file = ../mesh/star.mesh
uniform_refine = 1
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = SECOND
[]
[]
[Variables]
[temperature]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Functions]
[initial]
type = ParsedFunction
expression = 'if((x*x + y*y > 0.251), 1.0, 2.0)'
[]
[diffusivity_temperature_dependence]
type = MFEMParsedFunction
expression = 'alpha * temperature'
symbol_names = 'alpha temperature'
symbol_values = '${alpha} temperature'
[]
[]
[ICs]
[diffused_ic]
type = MFEMScalarIC
coefficient = initial
variable = temperature
[]
[]
[QuadratureFunctions]
[qf_k]
type = MFEMScalarQuadratureFunction
coefficient = diffusivity_temperature_dependence
# the quadrature rule order matches the one used by DiffusionIntegrator for
# second-order H1 elements on quadrilaterals (2 * fe_order + dim - 1 = 5)
order = 5
[]
[]
[Solvers]
[nl]
type = MFEMNewtonNonlinearSolver
max_its = 30
abs_tol = 1.0e-5
rel_tol = 1.0e-5
print_level = 1
[]
[main]
type = MFEMMUMPS
print_level = 0
[]
[]
[Kernels]
[nl_diffusion]
type = MFEMNLDiffusionKernel
variable = temperature
k_coefficient = qf_k
dk_du_coefficient = ${alpha}
[]
[linear_diffusion]
type = MFEMDiffusionKernel
variable = temperature
coefficient = ${kappa}
[]
[dT_dt]
type = MFEMTimeDerivativeMassKernel
variable = temperature
[]
[]
[Executioner]
type = MFEMTransient
device = cpu
assembly_level = legacy
dt = 1e-2
start_time = 0.0
end_time = 0.5
[]
[VectorPostprocessors]
[centre_temperature]
type = MFEMVariablePointValueSampler
variable = 'temperature'
points = '0.0 0.0 0.0'
execute_on = TIMESTEP_END
[]
[]
[Outputs]
file_base = NLHeatConductionQF
csv = true
time_step_interval = 10
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/NLHeatConductionQF
vtk_format = ASCII
[]
[]
(test/tests/mfem/vectorpostprocessors/point_value_sampler/point_value_sampler_boundary_warn.i)
# Sampling various variables that are not continuous across
# element boundaries in order to check that warnings are emitted.
[Mesh]
type = MFEMFileMesh
file = ../../mesh/mug.e
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[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
basis = GaussLegendre
[]
[]
[Variables]
[nd_vector]
type = MFEMVariable
fespace = HCurlFESpace
[]
[rt_vector]
type = MFEMVariable
fespace = HDivFESpace
[]
[l2_scalar]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[Functions]
[parsed_function]
type = ParsedFunction
expression = 'x + y*y + z*z*z'
[]
[parsed_vector_function]
type = ParsedVectorFunction
expression_x = 'x'
expression_y = 'y'
expression_z = 'z'
[]
[]
[ICs]
[nd_ic]
type = MFEMVectorIC
variable = nd_vector
vector_coefficient = parsed_vector_function
[]
[rt_ic]
type = MFEMVectorIC
variable = rt_vector
vector_coefficient = parsed_vector_function
[]
[l2_scalar_ic]
type = MFEMScalarIC
variable = l2_scalar
coefficient = parsed_function
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[VectorPostprocessors]
[point_sample]
type = MFEMVariablePointValueSampler
variable = 'l2_scalar'
# this is a point very close to an internal element face
points = '0.1 1e-13 -2.3125'
[]
[]
(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 = MFEMFileMesh
file = ../mesh/vortex.msh
[]
[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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
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/timesteppers/mfem_multiple_timesteppers.i)
[Problem]
type = MFEMProblem
[]
[Mesh]
type = MFEMFileMesh
file = ../mesh/square.e
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[u]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = u
coefficient = 0.1
[]
[time]
type = MFEMTimeDerivativeMassKernel
variable = u
[]
[]
[Functions]
[dts]
type = PiecewiseLinear
x = '0 0.85 2'
y = '0.2 0.15 0.2'
[]
[]
[BCs]
[left]
type = MFEMScalarDirichletBC
variable = u
boundary = left
coefficient = 0
[]
[right]
type = MFEMScalarDirichletBC
variable = u
boundary = right
coefficient = 1
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
type = MFEMHyprePCG
preconditioner = boomeramg
l_tol = 1e-8
l_max_its = 100
[]
[]
[Executioner]
type = MFEMTransient
device = cpu
end_time = 0.8
# Use as many different time steppers as we could to test the compositionDT,
# SolutionTimeAdaptiveDT give slightly different dt per run, set rel_err = 1e-2
# to ensure the test won't fail due to the small difference in the high-digit.
[TimeSteppers]
[ConstDT1]
type = ConstantDT
dt = 0.2
[]
[FunctionDT]
type = FunctionDT
function = dts
[]
[LogConstDT]
type = LogConstantDT
log_dt = 0.2
first_dt = 0.1
[]
[IterationAdapDT]
type = IterationAdaptiveDT
dt = 0.5
[]
[Timesequence]
type = TimeSequenceStepper
time_sequence = '0 0.25 0.3 0.5 0.8'
[]
[]
[]
[Postprocessors]
[timestep]
type = TimePostprocessor
execute_on = 'timestep_end'
[]
[]
[Outputs]
csv = true
file_base='mfem_multiple_timesteppers'
[]
(test/tests/mfem/functions/quadrature_function_source.i)
[Mesh]
type = MFEMFileMesh
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'
[]
[]
[QuadratureFunctions]
[qf_source]
type = MFEMScalarQuadratureFunction
coefficient = source
# match the default integration rule order used by DomainLFIntegrator
# for first-order elements (oa * fe_order + ob = 2 * 1 + 0)
order = 2
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = variable
[]
[source]
type = MFEMDomainLFKernel
variable = variable
coefficient = qf_source
block = wire
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
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/QuadratureFunctionSource
[]
(test/tests/mfem/kernels/gravity.i)
[Mesh]
type = MFEMFileMesh
file = ../mesh/beam-tet.mesh
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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
fespace = H1FESpace
l_max_its = 20
l_tol = 1e-5
print_level = 2
[]
[main]
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/nl_hphi_magnetodynamic.i)
# Solve for the magnetic field around a closed superconductor subject to
# global current constraint.
conductor_domains = 'TorusCore TorusSheath'
vacuum_permeability = 1.0
n_value = 20.0
j_c = 1.0
e_c = 1.0
[Problem]
type = MFEMProblem
[]
[Mesh]
type = MFEMFileMesh
file = ../mesh/split_embedded_concentric_torus.e
[]
[SubMeshes]
[conductor]
type = MFEMDomainSubMesh
block = ${conductor_domains}
submesh_boundary = conductor_surface
[]
[]
[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
submesh = conductor
[]
[CoilHCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
submesh = conductor
[]
[]
[Variables]
[coil_induced_h_field]
type = MFEMVariable
fespace = CoilHCurlFESpace
[]
[]
[AuxVariables]
[coil_external_h_field]
type = MFEMVariable
fespace = CoilHCurlFESpace
[]
[j_field]
type = MFEMVariable
fespace = HDivFESpace
[]
[]
[AuxKernels]
[update_j_field]
type = MFEMCurlAux
variable = j_field
source = coil_induced_h_field
scale_factor = 1.0
execute_on = TIMESTEP_END
[]
[]
[Functions]
[resistivity]
type = MFEMParsedFunction
expression = '(e_c/j_c) * (j/j_c)^(n_val-1)'
symbol_names = 'j e_c j_c n_val'
symbol_values = 'coil_induced_h_field_curl_mag ${e_c} ${j_c} ${n_value}'
[]
[j_dresistivity_dj]
type = MFEMParsedFunction
expression = '(n_val-1) * resistivity'
symbol_names = 'n_val resistivity'
symbol_values = '${n_value} resistivity'
[]
[]
[FunctorMaterials]
[Vacuum]
type = MFEMGenericFunctorMaterial
prop_names = 'permeability'
prop_values = '${vacuum_permeability}'
[]
[]
[BCs]
[conductor_bdr]
type = MFEMVectorTangentialDirichletBC
variable = coil_induced_h_field
vector_coefficient = coil_external_h_field
boundary = conductor_surface
[]
[]
[Kernels]
[dBdt]
type = MFEMTimeDerivativeVectorFEMassKernel
variable = coil_induced_h_field
coefficient = permeability
[]
[curlE]
type = MFEMNLCurlCurlKernel
variable = coil_induced_h_field
k_coefficient = resistivity
curlu_dk_dcurlu_coefficient = j_dresistivity_dj
block = ${conductor_domains}
[]
[]
[Solvers]
[ams]
type = MFEMHypreAMS
fespace = CoilHCurlFESpace
[]
[pcg]
type = MFEMHyprePCG
preconditioner = ams
l_tol = 1e-12
l_max_its = 100
print_level = 0
[]
[newton]
type = MFEMNewtonNonlinearSolver
max_its = 150
abs_tol = 1e-5
print_level = 1
[]
[]
[Executioner]
type = MFEMTransient
dt = 0.5
start_time = 0.0
end_time = 2.0
[]
[MultiApps]
[hphi_magnetostatic]
type = FullSolveMultiApp
input_files = hphi_magnetostatic.i
execute_on = INITIAL
[]
[]
[Transfers]
[from_external_field]
type = MultiAppMFEMShapeEvaluationTransfer
source_variables = h_field
variables = coil_external_h_field
from_multi_app = hphi_magnetostatic
[]
[]
[Postprocessors]
[CoilPower]
type = MFEMVectorFEInnerProductIntegralPostprocessor
coefficient = resistivity
dual_variable = j_field
primal_variable = j_field
block = 'TorusCore TorusSheath'
[]
[]
[Outputs]
inactive = ConductorParaViewDataCollection
[ReportedPostprocessors]
type = CSV
file_base = OutputData/HPhiMagnetodynamicNLClosedCoilCSV
[]
[ConductorParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/HPhiMagnetodynamicNLClosedCoil
vtk_format = ASCII
submesh = conductor
[]
[]
(test/tests/mfem/kernels/diffusion_eigenproblem.i)
[Mesh]
type = MFEMFileMesh
file = ../mesh/star.mesh
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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
print_level = 0
[]
[LOBPCG]
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/transfers/mfem_parent_mfem_sub/sub_complex.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[]
[Solvers]
[main]
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/submeshes/open_coil_source.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
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/complex/mixed_sesquilinear_ic.i)
a=1.0
b=2.0
c=3.0
d=4.0
e=5.0
f=6.0
omega=10.0
[Mesh]
type = MFEMFileMesh
file = ../mesh/square.msh
[]
[Problem]
type = MFEMProblem
numeric_type = complex
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = SECOND
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = SECOND
[]
[]
[Variables]
[V]
type = MFEMComplexVariable
fespace = H1FESpace
[]
[A]
type = MFEMComplexVariable
fespace = HCurlFESpace
[]
[]
[Functions]
[V_exact_real]
type = ParsedFunction
expression = '${a}*x^2+${b}*y^2+${c}*z^2'
[]
[V_exact_imag]
type = ParsedFunction
expression = '${d}*x^2+${e}*y^2+${f}*z^2'
[]
[A_exact_real]
type = ParsedVectorFunction
expression_x = '-2*${d}*x/${omega}'
expression_y = '-2*${e}*y/${omega}'
expression_z = '-2*${f}*z/${omega}'
[]
[A_exact_imag]
type = ParsedVectorFunction
expression_x = '2*${a}*x/${omega}'
expression_y = '2*${b}*y/${omega}'
expression_z = '2*${c}*z/${omega}'
[]
[]
[ICs]
[A_vector_ic]
type = MFEMComplexVectorIC
variable = A
vector_coefficient_real = A_exact_real
vector_coefficient_imag = A_exact_imag
[]
[]
[BCs]
[dbc_V]
type = MFEMComplexScalarDirichletBC
variable = V
coefficient_real = V_exact_real
coefficient_imag = V_exact_imag
[]
[]
[Kernels]
[diff_V]
type = MFEMComplexKernel
variable = V
[RealComponent]
type = MFEMDiffusionKernel
coefficient = 1.0
[]
[]
[mass_A]
type = MFEMMixedSesquilinearFormKernel
trial_variable = A
variable = V
[ImagComponent]
type = MFEMMixedVectorWeakDivergenceKernel
coefficient = -${omega}
[]
[]
[]
[Solvers]
[main]
type = MFEMMUMPS
[]
[]
[Executioner]
type = MFEMSteady
assembly_level = legacy
[]
[Postprocessors]
[error]
type = MFEMComplexL2Error
variable = V
function_real = V_exact_real
function_imag = V_exact_imag
[]
[]
[Outputs]
csv = true
file_base = OutputData/MixedSesquilinearIC
[]
(test/tests/mfem/kernels/diffusion_amr.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
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/solvers/pmg_diffusion.i)
# Diffusion solve using a p-multigrid (geometric multigrid) preconditioner.
#
# PDE: -Laplacian(u) = f on [0,1]^2
# Exact solution: u = sin(pi x)sin(pi y)
# Forcing: f = 2 pi^2 sin(pi x)sin(pi y)
# BCs: u = 0 on all four sides (exact solution is zero on boundary)
#
# Multigrid hierarchy (two levels):
# level 0 (coarse): H1 order 1
# level 1 (fine): H1 order 2 - variable lives here via fespace = h1_hierarchy
#
# Solvers:
# coarse_solver = coarse (CG + BoomerAMG on the coarse system)
# smoothers = chebyshev (Chebyshev smoother at the fine level; SPD by construction)
[Mesh]
type = MFEMFileMesh
file = ../mesh/square.e
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[FESpaceHierarchies]
[h1_hierarchy]
type = MFEMFESpaceHierarchy
fespace = H1FESpace
# One refinement entry adds the fine p=2 level, giving two total levels.
refinements = 2
[]
[]
[Variables]
[concentration]
type = MFEMVariable
fespace_hierarchy = h1_hierarchy
[]
[]
[BCs]
[zero]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'bottom right top left'
[]
[]
[Functions]
[u_exact]
type = ParsedFunction
expression = sin(pi*x)*sin(pi*y)
[]
[forcing]
type = ParsedFunction
expression = 2*pi^2*sin(pi*x)*sin(pi*y)
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = concentration
[]
[rhs]
type = MFEMDomainLFKernel
variable = concentration
coefficient = forcing
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
print_level = 0
[]
[coarse]
type = MFEMCGSolver
preconditioner = boomeramg
l_max_its = 10
l_tol = 1e-2
print_level = -1
[]
[chebyshev]
type = MFEMOperatorChebyshevSmoother
order = 2
[]
[pmg]
type = MFEMGeometricMultigridSolver
variable = concentration
smoothers = chebyshev
coarse_solver = coarse
[]
[main]
type = MFEMCGSolver
preconditioner = pmg
l_tol = 1e-10
l_max_its = 200
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Postprocessors]
[l2_error]
type = MFEML2Error
variable = concentration
function = u_exact
[]
[]
[Outputs]
[csv]
type = CSV
file_base = OutputData/PMGDiffusion
[]
[]
(test/tests/mfem/ics/scalar_ic.i)
[Mesh]
type = MFEMFileMesh
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/transfers/l2_mfem_parent_libmesh_sub/mfem_parent_scalar.i)
[Mesh]
type = MFEMFileMesh
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
[]
(test/tests/mfem/kernels/dg_diffusion.i)
[Mesh]
type = MFEMFileMesh
file = ../mesh/star.mesh
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
[]
[]
[Variables]
[concentration]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = concentration
[]
[forcing]
type = MFEMDomainLFKernel
variable = concentration
[]
[dg_diff]
type = MFEMDGDiffusionKernel
variable = concentration
[]
[]
[BCs]
[dg_diff_bc]
type = MFEMDGDiffusionBC
variable = concentration
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
type = MFEMCGSolver
preconditioner = boomeramg
l_tol = 1e-16
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/DG_Diffusion
vtk_format = ASCII
[]
[]
(test/tests/mfem/transfers/h1_libmesh_parent_mfem_sub/mfem_sub_scalar.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[gmres]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
(test/tests/mfem/submeshes/av_magnetostatic.i)
# Magnetostatic problem solved on a closed conductor subject to
# global loop voltage constraint.
[Mesh]
type = MFEMFileMesh
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'
[]
[]
[Solvers]
[ams]
type = MFEMHypreAMS
fespace = HCurlFESpace
[]
[main]
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/kernels/linearelasticity.i)
[Mesh]
type = MFEMFileMesh
file = ../mesh/beam-tet.mesh
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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
l_max_its = 500
l_tol = 1e-8
print_level = 2
[]
[main]
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/complex/mixed_sesquilinear_real_imag.i)
a=1.0
b=2.0
c=3.0
d=4.0
e=5.0
f=6.0
omega=10.0
alpha=1.0
beta=0.5
[Mesh]
type = MFEMFileMesh
file = ../mesh/square.msh
[]
[Problem]
type = MFEMProblem
numeric_type = complex
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = SECOND
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[]
[Variables]
[V]
type = MFEMComplexVariable
fespace = H1FESpace
[]
[A]
type = MFEMComplexVariable
fespace = HCurlFESpace
[]
[]
[Functions]
[V_exact_real]
type = ParsedFunction
expression = '${a}*x*y+${b}*x*z+${c}*y*z'
[]
[V_exact_imag]
type = ParsedFunction
expression = '${d}*x*y+${e}*x*z+${f}*y*z'
[]
[A_exact_real]
type = ParsedVectorFunction
expression_x = '-(${beta}*(${a}*y+${b}*z)+${alpha}*(${d}*y+${e}*z))/${omega}'
expression_y = '-(${beta}*(${a}*x+${c}*z)+${alpha}*(${d}*x+${f}*z))/${omega}'
expression_z = '-(${beta}*(${b}*x+${c}*y)+${alpha}*(${e}*x+${f}*y))/${omega}'
[]
[A_exact_imag]
type = ParsedVectorFunction
expression_x = '(${alpha}*(${a}*y+${b}*z)-${beta}*(${d}*y+${e}*z))/${omega}'
expression_y = '(${alpha}*(${a}*x+${c}*z)-${beta}*(${d}*x+${f}*z))/${omega}'
expression_z = '(${alpha}*(${b}*x+${c}*y)-${beta}*(${e}*x+${f}*y))/${omega}'
[]
[]
[BCs]
[dbc_V]
type = MFEMComplexScalarDirichletBC
variable = V
coefficient_real = V_exact_real
coefficient_imag = V_exact_imag
[]
[dbc_A_tan]
type = MFEMComplexVectorTangentialDirichletBC
variable = A
vector_coefficient_real = A_exact_real
vector_coefficient_imag = A_exact_imag
[]
[]
[Kernels]
[diff_V]
type = MFEMComplexKernel
variable = V
[RealComponent]
type = MFEMDiffusionKernel
coefficient = 1.0
[]
[]
[curlcurl_A]
type = MFEMComplexKernel
variable = A
[RealComponent]
type = MFEMCurlCurlKernel
coefficient = 1.0
[]
[]
[mass_A]
type = MFEMComplexKernel
variable = A
[ImagComponent]
type = MFEMVectorFEMassKernel
coefficient = ${omega}
[]
[]
[mixed_grad_V]
type = MFEMMixedSesquilinearFormKernel
trial_variable = V
variable = A
[RealComponent]
type = MFEMMixedVectorGradientKernel
coefficient = ${alpha}
[]
[ImagComponent]
type = MFEMMixedVectorGradientKernel
coefficient = ${beta}
[]
[]
[]
[Solvers]
[main]
type = MFEMMUMPS
[]
[]
[Executioner]
type = MFEMSteady
assembly_level = legacy
[]
[Postprocessors]
[error_V]
type = MFEMComplexL2Error
variable = V
function_real = V_exact_real
function_imag = V_exact_imag
[]
[error_A]
type = MFEMComplexVectorL2Error
variable = A
function_real = A_exact_real
function_imag = A_exact_imag
[]
[]
[Outputs]
csv = true
file_base = OutputData/MixedSesquilinearRealImag
[]
(test/tests/mfem/problemcomposers/custom_composer_and_operator.i)
[Mesh]
type = MFEMFileMesh
file = ../mesh/star.mesh
uniform_refine = 2
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1]
type = MFEMScalarFESpace
fec_type = H1
fec_order = SECOND
[]
[]
[Variables]
[u]
type = MFEMVariable
fespace = H1
[]
[]
[Solvers]
[main]
type = MFEMMUMPS
[]
[]
[ProblemComposers]
[default_steady]
type = CustomProblemComposer
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Postprocessors]
[solution_l2_norm]
type = MFEML2Error
variable = u
function = 0
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'timestep_end'
file_base = OutputData/custom_composer_and_operator/l2norm
[]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/custom_composer_and_operator
vtk_format = ASCII
[]
[]
(test/tests/mfem/vectorpostprocessors/point_value_sampler/point_value_sampler_boundary_tol.i)
[Mesh]
type = MFEMFileMesh
file = ../../mesh/mug.e
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[h1_scalar]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[VectorPostprocessors]
[point_sample]
type = MFEMVariablePointValueSampler
variable = 'h1_scalar'
# this point is considered found
# unless tolerance is tightened, then it is outside the mesh
points = '0.01 0.01 -2.37501'
[]
[]
(test/tests/mfem/submeshes/boundary_submesh.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
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/nonlinear/nlheattransfer.i)
[Problem]
type = MFEMProblem
[]
[Mesh]
type = MFEMFileMesh
file = ../mesh/stacked_hexes.e
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[temperature]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[ICs]
[temperature_ic]
type = MFEMScalarIC
coefficient = 200.0
variable = temperature
[]
[]
[Functions]
[T_inf]
type = MFEMParsedFunction
expression = 'temperature + 1'
symbol_names = 'temperature'
symbol_values = 'temperature'
[]
[htc]
type = MFEMParsedFunction
expression = 'temperature/100 + 1'
symbol_names = 'temperature'
symbol_values = 'temperature'
[]
[dhtc_dT]
type = MFEMParsedFunction
expression = '1 / 100'
symbol_names = 'temperature'
symbol_values = 'temperature'
[]
[dT_inf_dT]
type = MFEMParsedFunction
expression = '1'
symbol_names = 'temperature'
symbol_values = 'temperature'
[]
[]
[Solvers]
[nl]
type = MFEMNewtonNonlinearSolver
max_its = 150
abs_tol = 1e-12
rel_tol = 1.0e-8
print_level = 1
[]
[linear]
type = MFEMMUMPS
print_level = 0
[]
[]
[Kernels]
[dT_dt]
type = MFEMTimeDerivativeMassKernel
variable = temperature
[]
[diffusion]
type = MFEMDiffusionKernel
variable = temperature
[]
[]
[BCs]
active = nonlinear
[nonlinear]
type = MFEMNLConvectiveHeatFluxBC
variable = temperature
boundary = 'right'
T_infinity = T_inf
d_T_infinity_dT_coefficient = dT_inf_dT
heat_transfer_coefficient = htc
d_heat_transfer_dT_coefficient = dhtc_dT
[]
[linearized]
type = MFEMNLConvectiveHeatFluxBC
variable = temperature
boundary = 'right'
T_infinity = 201.0
heat_transfer_coefficient = 3.0
d_heat_transfer_dT_coefficient = 0.0
[]
[]
[VectorPostprocessors]
[line_sample]
type = MFEMVariableLineValueSampler
variable = 'temperature'
start_point = '0.0 0.5 0.5'
end_point = '1.0 0.5 0.5'
num_points = 3
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = MFEMTransient
device = cpu
assembly_level = legacy
dt = 1
num_steps = 3
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/NLHeatTransfer
vtk_format = ASCII
[]
[CSV]
type = CSV
file_base = NLHeatTransfer
time_step_interval = 3
[]
[]
(test/tests/mfem/multiapps/problem.i)
[Problem]
type = MFEMProblem
verbose_multiapps = true
[]
[Mesh]
type = MFEMFileMesh
file = ../mesh/square.e
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[u]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = u
[]
[td]
type = MFEMTimeDerivativeMassKernel
variable = u
[]
[]
[BCs]
[left]
type = MFEMScalarDirichletBC
variable = u
boundary = left
coefficient = 0
[]
[right]
type = MFEMScalarDirichletBC
variable = u
boundary = right
coefficient = 1
[]
[]
[Functions]
[exact_solution]
type = ParsedFunction
# Exact solution for u_t - u_xx = 0 on x in [0,1] with u(0,t)=0 and u(1,t)=1.
# Write u(x,t) = x + w(x,t), so w has homogeneous Dirichlet data, then expand
# w in a sine series with n-th term: (-1)^n*(2/n/pi)*sin(n*pi*x)*exp(-n^2*pi^2*t).
# This expression keeps the first five terms of that series.
expression = 'x + 2*(-sin(pi*x)*exp(-pi^2*t) + sin(2*pi*x)*exp(-4*pi^2*t)/2 - sin(3*pi*x)*exp(-9*pi^2*t)/3 + sin(4*pi*x)*exp(-16*pi^2*t)/4 - sin(5*pi*x)*exp(-25*pi^2*t)/5)/pi'
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
type = MFEMHyprePCG
preconditioner = boomeramg
l_tol = 1e-12
l_max_its = 100
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
execute_on = TIMESTEP_END
[]
[error]
type = MFEML2Error
variable = u
function = exact_solution
execute_on = TIMESTEP_END
[]
[]
(test/tests/mfem/transfers/displaced/mfem_child.i)
[Problem]
type = MFEMProblem
solve = false
[]
[Mesh]
type = MFEMFileMesh
file = base_strip.e
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[AuxVariables]
[indicator_field]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Functions]
[background]
type = ParsedFunction
expression = '1+x*x'
[]
[]
[ICs]
[background_ic]
type = MFEMScalarIC
coefficient = background
variable = indicator_field
[]
[]
[Executioner]
type = MFEMTransient
dt = 0.05
num_steps = 10
device = cpu
[]
(test/tests/mfem/submeshes/domain_submesh_transfer.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
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/transfers/mfem_parent_mfem_sub/mfem_sub_embedded_submesh.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[gmres]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-8
l_max_its = 1000
[]
[]
[Executioner]
type = MFEMSteady
[]
(test/tests/mfem/auxkernels/projection.i)
[Mesh]
type = MFEMFileMesh
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
[]
[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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
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/curlcurl.i)
# Definite Maxwell problem solved with Nedelec elements of the first kind
# based on MFEM Example 3.
[Mesh]
type = MFEMFileMesh
file = ../mesh/small_fichera.mesh
[]
[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
[]
[]
[Solvers]
active = 'gmres ams'
[ams]
type = MFEMHypreAMS
fespace = HCurlFESpace
[]
[matrix_free_ams]
type = MFEMMatrixFreeAMS
[]
[gmres]
type = MFEMHypreGMRES
preconditioner = ams
l_tol = 1e-12
[]
[cg]
type = MFEMCGSolver
preconditioner = matrix_free_ams
l_tol = 1e-12
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/CurlCurl
vtk_format = ASCII
[]
[]
(test/tests/mfem/transfers/displaced/mfem_parent.i)
[Problem]
type = MFEMProblem
solve = false
[]
[Mesh]
type = MFEMFileMesh
file = base_strip.e
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[AuxVariables]
[indicator_nodal]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Executioner]
type = MFEMTransient
dt = 0.05
num_steps = 10
[]
[MultiApps]
[solid_domain]
type = TransientMultiApp
input_files = libmesh_child.i
execute_on = 'initial timestep_begin'
[]
[]
[Transfers]
[pull_indicator_nodal]
type = MultiApplibMeshToMFEMShapeEvaluationTransfer
from_multi_app = solid_domain
source_variables = solid_indicator
variables = indicator_nodal
displaced_source_mesh = true
execute_on = 'initial timestep_begin'
[]
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/Displaced
vtk_format = ASCII
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(test/tests/mfem/transfers/l2_libmesh_parent_mfem_sub/mfem_sub_scalar.i)
[Mesh]
type = MFEMFileMesh
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/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 = MFEMFileMesh
file = ../mesh/waveguide.g
[]
[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
[]
[]
[]
[Solvers]
[main]
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/mfem_sub_mfem_sub/sub_send.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
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/timesteppers/mfem_multiple_timesequences.i)
[Problem]
type = MFEMProblem
[]
[Mesh]
type = MFEMFileMesh
file = ../mesh/square.e
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[u]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = u
coefficient = 0.1
[]
[time]
type = MFEMTimeDerivativeMassKernel
variable = u
[]
[]
[BCs]
[left]
type = MFEMScalarDirichletBC
variable = u
boundary = left
coefficient = 0
[]
[right]
type = MFEMScalarDirichletBC
variable = u
boundary = right
coefficient = 1
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
type = MFEMHyprePCG
preconditioner = boomeramg
l_tol = 1e-8
l_max_its = 100
[]
[]
[Executioner]
type = MFEMTransient
device = cpu
end_time = 0.8
# Use as many different time sequence steppers as we could to test the compositionDT
[TimeSteppers]
[ConstDT1]
type = ConstantDT
dt = 0.2
[]
[ConstDT2]
type = ConstantDT
dt = 0.1
[]
[LogConstDT]
type = LogConstantDT
log_dt = 0.2
first_dt = 0.1
[]
[Timesequence1]
type = TimeSequenceStepper
time_sequence = '0 0.25 0.3 0.5 0.8'
[]
[Timesequence2]
type = CSVTimeSequenceStepper
file_name = timesequence.csv
column_name = time
[]
[Timesequence3]
type = ExodusTimeSequenceStepper
mesh = timesequence.e
[]
[]
[]
[Postprocessors]
[timestep]
type = TimePostprocessor
execute_on = 'timestep_end'
[]
[]
[Outputs]
csv = true
file_base='mfem_multiple_timesequences'
[]
(test/tests/mfem/transfers/mfem_parent_mfem_sub/parent.i)
[Mesh]
type = MFEMFileMesh
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/variables/displacement_state.i)
[Mesh]
type = MFEMFileMesh
file = ../mesh/beam-tet.mesh
displacement = displacement
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[h1_vector]
type = MFEMVectorFESpace
fec_type = H1
fec_order = FIRST
range_dim = 3
ordering = vdim
[]
[]
[Variables]
[displacement]
type = MFEMVariable
fespace = h1_vector
[]
[]
[Functions]
[initial_displacement]
type = ParsedVectorFunction
# Ten percent axial strain keeps the deformation modest while making the L2 norm sensitive to
# both the displacement field and the displaced mesh geometry.
expression_x = '0.1*x'
expression_y = 0
expression_z = 0
[]
[]
[ICs]
[displacement]
type = MFEMVectorIC
variable = displacement
vector_coefficient = initial_displacement
[]
[]
[Executioner]
type = MFEMTransient
device = cpu
# Two unit time steps exercise persistent displacement state during ordinary and recovery runs.
dt = 1
end_time = 2
[]
[Postprocessors]
[displacement_norm]
type = MFEMVectorL2Error
variable = displacement
function = '0 0 0'
[]
[]
[Outputs]
csv = true
file_base = displacement_state
[]
(test/tests/mfem/complex/mixed_sesquilinear.i)
a=1.0
b=2.0
c=3.0
omega=10.0
[Mesh]
type = MFEMFileMesh
file = ../mesh/square.msh
[]
[Problem]
type = MFEMProblem
numeric_type = complex
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[]
[Variables]
[V]
type = MFEMComplexVariable
fespace = H1FESpace
[]
[A]
type = MFEMComplexVariable
fespace = HCurlFESpace
[]
[]
[Functions]
[V_exact_real]
type = ParsedFunction
expression = '${a}*x+${b}*y+${c}*z'
[]
[A_exact_imag]
type = ParsedVectorFunction
expression_x = '${a}/${omega}'
expression_y = '${b}/${omega}'
expression_z = '${c}/${omega}'
[]
[]
[BCs]
[dbc_V]
type = MFEMComplexScalarDirichletBC
variable = V
coefficient_real = V_exact_real
coefficient_imag = 0.0
[]
[dbc_A_tan]
type = MFEMComplexVectorTangentialDirichletBC
variable = A
vector_coefficient_real = '0 0 0'
vector_coefficient_imag = A_exact_imag
[]
[]
[Kernels]
[curlcurl_A]
type = MFEMComplexKernel
variable = A
[RealComponent]
type = MFEMCurlCurlKernel
coefficient = 1.0
[]
[]
[mixed_grad_V]
type = MFEMMixedSesquilinearFormKernel
trial_variable = V
variable = A
[RealComponent]
type = MFEMMixedVectorGradientKernel
coefficient = 1.0
[]
[]
[mass_A]
type = MFEMComplexKernel
variable = A
[ImagComponent]
type = MFEMVectorFEMassKernel
coefficient = ${omega}
[]
[]
[diff_V]
type = MFEMComplexKernel
variable = V
[RealComponent]
type = MFEMDiffusionKernel
coefficient = 1.0
[]
[]
[mixed_mass_A]
type = MFEMMixedSesquilinearFormKernel
trial_variable = A
variable = V
[ImagComponent]
type = MFEMMixedVectorWeakDivergenceKernel
coefficient = -${omega}
[]
[]
[]
[Solvers]
[main]
type = MFEMMUMPS
[]
[]
[Executioner]
type = MFEMSteady
assembly_level = legacy
[]
[Postprocessors]
[error_V]
type = MFEMComplexL2Error
variable = V
function_real = V_exact_real
function_imag = 0.0
[]
[error_A]
type = MFEMComplexVectorL2Error
variable = A
function_real = '0 0 0'
function_imag = A_exact_imag
[]
[]
[Outputs]
csv = true
file_base = OutputData/MixedSesquilinear
[]
(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 = MFEMFileMesh
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'
[]
[]
[Solvers]
[main]
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/heattransfer.i)
[Mesh]
type = MFEMFileMesh
file = ../mesh/mug.e
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[temperature]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[AuxVariables]
inactive = average_temperature
[average_temperature]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[AuxKernels]
inactive = average_field
[average_field]
type = MFEMScalarTimeAverageAux
variable = average_temperature
source = temperature
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = temperature
[]
[dT_dt]
type = MFEMTimeDerivativeMassKernel
variable = temperature
[]
[]
[BCs]
active = 'bottom top_convective'
[bottom]
type = MFEMScalarDirichletBC
variable = temperature
boundary = '1'
coefficient = 1.0
[]
[top_convective]
type = MFEMConvectiveHeatFluxBC
variable = temperature
boundary = '2'
T_infinity = .5
heat_transfer_coefficient = 5
[]
[top_dirichlet]
type = MFEMScalarDirichletBC
variable = temperature
boundary = '2'
[]
[]
[Solvers]
inactive = 'jacobi'
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[jacobi]
type = MFEMOperatorJacobiSmoother
[]
[main]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[]
[Executioner]
type = MFEMTransient
device = cpu
assembly_level = legacy
dt = 2.0
start_time = 0.0
end_time = 6.0
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/HeatTransfer
vtk_format = ASCII
[]
[]
(test/tests/mfem/transfers/mfem_sub_mfem_sub/parent.i)
[Mesh]
type = MFEMFileMesh
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/kernels/graddiv.i)
# Grad-div problem using method of manufactured solutions,
# based on MFEM Example 4.
[Mesh]
type = MFEMFileMesh
file = ../mesh/beam-tet.mesh
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
[]
[]
[Solvers]
[ADS]
type = MFEMHypreADS
fespace = HDivFESpace
[]
[main]
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/submeshes/domain_submesh.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
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/transfers/h1_mfem_parent_libmesh_sub/mfem_parent_scalar.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[gmres]
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/auxkernels/2Dmagnetostatic.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[PCG]
type = MFEMHyprePCG
preconditioner = boomeramg
l_tol = 1e-8
[]
[]
[VectorPostprocessors]
[line_sample]
type = MFEMVariableLineValueSampler
variable = 'B'
start_point = '0 1.99 0'
end_point = '0 -1.99 0'
num_points = 10
[]
[]
[Executioner]
type = MFEMSteady
[]
[Outputs]
[ReportedPostprocessors]
type = CSV
file_base = 2DMagnetostatic
[]
[]
(test/tests/mfem/kernels/gravity_qf.i)
# Linear elasticity beam under gravity, with the vector body-force density routed through a
# vector quadrature function coefficient in place of the source material coefficient.
[Mesh]
type = MFEMFileMesh
file = ../mesh/beam-tet.mesh
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
[]
[]
[QuadratureFunctions]
[qf_gravity]
type = MFEMVectorQuadratureFunction
vector_coefficient = gravitational_force_density
# the quadrature rule order matches the one used by VectorDomainLFIntegrator
# for first-order elements (2 * fe_order = 2)
order = 2
updates = none
[]
[]
[Kernels]
[diff]
type = MFEMLinearElasticityKernel
variable = displacement
lambda = lambda
mu = mu
[]
[gravity]
type = MFEMVectorDomainLFKernel
variable = displacement
vector_coefficient = qf_gravity
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
fespace = H1FESpace
l_max_its = 20
l_tol = 1e-5
print_level = 2
[]
[main]
type = MFEMHyprePCG
preconditioner = boomeramg
l_max_its = 100
l_tol = 1e-10
l_abs_tol = 0.0
print_level = 2
[]
[]
[Executioner]
type = MFEMSteady
device = "cpu"
[]
[Postprocessors]
[displacement_l2_norm]
type = MFEMVectorL2Error
variable = displacement
function = '0 0 0'
[]
[]
[Outputs]
csv = true
file_base = OutputData/GravityQF
[]
(test/tests/mfem/kernels/diffusion.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[BCs]
[bottom]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'bottom'
coefficient = 1.0
[]
[top]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'top'
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = concentration
[]
[]
[Solvers]
inactive = 'jacobi'
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[jacobi]
type = MFEMOperatorJacobiSmoother
[]
[main]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Postprocessors]
[solution_l2_norm]
type = MFEML2Error
variable = concentration
function = 0
[]
[]
[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/nonlinear/nldiffusion_common.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[VectorPostprocessors]
active = ''
[point_sample]
type = MFEMVariablePointValueSampler
variable = concentration
points = '0.5 0.25 0
0.5 0.50 0
0.5 0.75 0'
execute_on = 'timestep_end'
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
active = ParaViewDataCollection
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/NLDiffusion
vtk_format = ASCII
[]
[csv]
type = CSV
execute_on = 'timestep_end'
[]
[]
(test/tests/mfem/submeshes/hphi_magnetodynamic.i)
# Solve for the magnetic field around a closed conductor subject to
# global current constraint.
conductor_domains = 'TorusCore TorusSheath'
conductor_resistivity = 1.0
vacuum_permeability = 1.0
[Problem]
type = MFEMProblem
[]
[Mesh]
type = MFEMFileMesh
file = ../mesh/split_embedded_concentric_torus.e
[]
[FunctorMaterials]
[Conductor]
type = MFEMGenericFunctorMaterial
prop_names = 'resistivity'
prop_values = ${conductor_resistivity}
block = ${conductor_domains}
[]
[Vacuum]
type = MFEMGenericFunctorMaterial
prop_names = 'permeability'
prop_values = '${vacuum_permeability}'
[]
[]
[SubMeshes]
[conductor]
type = MFEMDomainSubMesh
block = ${conductor_domains}
submesh_boundary = conductor_surface
[]
[]
[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
[]
[CoilHCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
submesh = conductor
[]
[]
[Variables]
[coil_induced_h_field]
type = MFEMVariable
fespace = CoilHCurlFESpace
[]
[]
[AuxVariables]
[h_field]
type = MFEMVariable
fespace = HCurlFESpace
[]
[coil_external_h_field]
type = MFEMVariable
fespace = CoilHCurlFESpace
[]
[j_field]
type = MFEMVariable
fespace = HDivFESpace
[]
[]
[AuxKernels]
[update_j_field]
type = MFEMCurlAux
variable = j_field
source = h_field
scale_factor = 1.0
execute_on = TIMESTEP_END
[]
[]
[BCs]
[conductor_bdr]
type = MFEMVectorTangentialDirichletBC
variable = coil_induced_h_field
vector_coefficient = coil_external_h_field
boundary = conductor_surface
[]
[]
[Kernels]
[dBdt]
type = MFEMTimeDerivativeVectorFEMassKernel
variable = coil_induced_h_field
coefficient = permeability
[]
[curlE]
type = MFEMCurlCurlKernel
variable = coil_induced_h_field
coefficient = resistivity
[]
[]
[Solvers]
[ams]
type = MFEMHypreAMS
fespace = CoilHCurlFESpace
[]
[main]
type = MFEMHyprePCG
preconditioner = ams
l_tol = 1e-9
l_max_its = 100
[]
[]
[Executioner]
type = MFEMTransient
dt = 0.5
start_time = 0.0
end_time = 2.0
[]
[MultiApps]
[hphi_magnetostatic]
type = FullSolveMultiApp
input_files = hphi_magnetostatic.i
execute_on = INITIAL
[]
[]
[Transfers]
[from_external_field]
type = MultiAppMFEMCopyTransfer
source_variables = h_field
variables = h_field
from_multi_app = hphi_magnetostatic
[]
[submesh_transfer_to_coil]
type = MFEMSubMeshTransfer
from_variable = h_field
to_variable = coil_external_h_field
execute_on = TIMESTEP_BEGIN
[]
[submesh_transfer_from_coil]
type = MFEMSubMeshTransfer
from_variable = coil_induced_h_field
to_variable = h_field
execute_on = TIMESTEP_END
[]
[]
[Postprocessors]
[CoilPower]
type = MFEMVectorFEInnerProductIntegralPostprocessor
coefficient = resistivity
dual_variable = j_field
primal_variable = j_field
block = 'TorusCore TorusSheath'
[]
[]
[Outputs]
[ReportedPostprocessors]
type = CSV
file_base = OutputData/HPhiMagnetodynamicClosedCoilCSV
[]
[VacuumParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/HPhiMagnetodynamicClosedCoil
vtk_format = ASCII
[]
[]
(test/tests/mfem/auxkernels/crossproduct.i)
[Mesh]
type = MFEMFileMesh
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/nonlinear/nlheatconduction.i)
# Implementation of MFEM Example 16, for a time dependent nonlinear heat equation problem of the
# form
# dT/dt = \nabla \cdot (\kappa + \alpha T) \nabla T
kappa = 0.5
alpha = 1e-2
[Mesh]
type = MFEMFileMesh
file = ../mesh/star.mesh
uniform_refine = 1
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = SECOND
[]
[]
[Variables]
[temperature]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[AuxVariables]
inactive = average_temperature
[average_temperature]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[AuxKernels]
inactive = average_field
[average_field]
type = MFEMScalarTimeAverageAux
variable = average_temperature
source = temperature
[]
[]
[Functions]
[initial]
type = ParsedFunction
expression = 'if((x*x + y*y > 0.251), 1.0, 2.0)'
[]
[diffusivity_temperature_dependence]
type = MFEMParsedFunction
expression = 'alpha * temperature'
symbol_names = 'alpha temperature'
symbol_values = '${alpha} temperature'
[]
[]
[ICs]
[diffused_ic]
type = MFEMScalarIC
coefficient = initial
variable = temperature
[]
[]
[Solvers]
[nl]
type = MFEMNewtonNonlinearSolver
max_its = 30
abs_tol = 1.0e-5
rel_tol = 1.0e-5
print_level = 1
[]
[main]
type = MFEMMUMPS
print_level = 0
[]
[]
[Kernels]
[nl_diffusion]
type = MFEMNLDiffusionKernel
variable = temperature
k_coefficient = diffusivity_temperature_dependence
dk_du_coefficient = ${alpha}
[]
[linear_diffusion]
type = MFEMDiffusionKernel
variable = temperature
coefficient = ${kappa}
[]
[dT_dt]
type = MFEMTimeDerivativeMassKernel
variable = temperature
[]
[]
[Executioner]
type = MFEMTransient
device = cpu
assembly_level = legacy
dt = 1e-2
start_time = 0.0
end_time = 0.5
[]
[VectorPostprocessors]
[centre_temperature]
type = MFEMVariablePointValueSampler
variable = 'temperature'
points = '0.0 0.0 0.0'
execute_on = TIMESTEP_END
[]
[]
[Outputs]
file_base = NLHeatConduction
csv = true
time_step_interval = 10
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/NLHeatConduction
vtk_format = ASCII
[]
[]
(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 = MFEMFileMesh
file = ../mesh/inline-quad.mesh
[]
[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
[]
[]
[]
[Solvers]
[main]
type = MFEMSuperLU
[]
[]
[Executioner]
type = MFEMSteady
assembly_level = legacy
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/Complex2DQuad
vtk_format = ASCII
[]
[]
(test/tests/mfem/transfers/mfem_sub_mfem_sub/sub_recv.i)
[Mesh]
type = MFEMFileMesh
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/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 = MFEMFileMesh
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'
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
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/vectorpostprocessors/coefficient_value_sampler/coefficient_value_sampler_boundary.i)
[Mesh]
type = MFEMFileMesh
file = two_block_quad.mesh
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FunctorMaterials]
[left]
type = MFEMGenericFunctorMaterial
block = 1
prop_names = piecewise_coefficient
prop_values = 10
[]
[right]
type = MFEMGenericFunctorMaterial
block = 2
prop_names = piecewise_coefficient
prop_values = 10
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[VectorPostprocessors]
[boundary_sample]
type = MFEMScalarCoefficientPointValueSampler
coefficient = piecewise_coefficient
points = '0.5 0.5 0'
[]
[]
[Outputs]
csv = true
[]
(test/tests/mfem/functions/cylindrical_coefficients.i)
[Mesh]
type = MFEMFileMesh
file = ../mesh/star.mesh
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[u]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Functions]
[cylindrical]
type = MFEMCoordinateTransformations
coord_type = RZ
inv_r_eps = 0
[]
[]
[FunctorMaterials]
[material]
type = MFEMGenericFunctorMaterial
prop_names = 'diffCoef massCoef'
prop_values = 'cylindrical_r cylindrical_inv_r'
[]
[]
[BCs]
[Dirichlet]
type = MFEMScalarDirichletBC
variable = u
coefficient = 10
[]
[]
[Kernels]
[diffusion]
type = MFEMDiffusionKernel
variable = u
coefficient = diffCoef
[]
[mass]
type = MFEMMassKernel
variable = u
coefficient = massCoef
[]
[]
[Solvers]
[main]
type = MFEMMUMPS
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[VectorPostprocessors]
[LineSampler]
type = MFEMVariableLineValueSampler
variable = 'u'
start_point = '-1 0 0'
end_point = '1 0 0'
num_points = 10
[]
[]
[Outputs]
csv = true
file_base = OutputData/CylindricalCoefficients
[]
(test/tests/mfem/submeshes/magnetostatic.i)
# Definite Maxwell problem solved with Nedelec elements of the first kind
# based on MFEM Example 3.
[Mesh]
type = MFEMFileMesh
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
[]
[]
[Solvers]
[ams]
type = MFEMHypreAMS
fespace = HCurlFESpace
singular = true
[]
[main]
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/variables/mfem_variables_from_moose.i)
[Mesh]
type = MFEMFileMesh
file = ../mesh/mug.e
[]
[Problem]
type = MFEMProblem
solve = false
[]
[Variables]
[h1]
family = LAGRANGE
order = SECOND
[]
[hcurl]
family = NEDELEC_ONE
order = SECOND
[]
[hdiv]
family = RAVIART_THOMAS
order = SECOND
[]
[l2]
family = L2_LAGRANGE
order = FIRST
[]
[h1_3]
family = LAGRANGE_VEC
order = SECOND
[]
[l2_3]
family = L2_LAGRANGE_VEC
order = FIRST
[]
[]
[AuxVariables]
[l2_aux]
family = MONOMIAL
order = CONSTANT
[]
[l2_3_aux]
family = MONOMIAL_VEC
order = CONSTANT
[]
[]
[Executioner]
type = MFEMTransient
device = cpu
dt = 1.0
start_time = 0.0
end_time = 1.0
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/VariableSetupTest
[]
[]
(test/tests/mfem/transfers/sibling_transfers/mfem_main_between_multiapp.i)
# Base input for testing between-multiapp transfers. It has the following complexities:
# - multiapps may not be run with the same number of ranks
# - both nodal and elemental variables
# - transfers between mixes of nodal and elemental variables
# Tests derived from this input may add or remove complexities through command line arguments
[Problem]
type = MFEMProblem
solve = false
[]
[Mesh]
type = MFEMFileMesh
file = ../../mesh/square_quad9.e
[]
[MultiApps]
[mfem_send]
type = TransientMultiApp
input_files = mfem_sub_between_diffusion.i
[]
[mfem_recv]
type = TransientMultiApp
input_files = mfem_sub_between_diffusion.i
cli_args = Outputs/inactive=''
[]
[]
[Transfers]
# Nodal to nodal variables
[mfem_to_mfem_nodal_nodal]
type = MultiAppMFEMShapeEvaluationTransfer
from_multi_app = mfem_send
to_multi_app = mfem_recv
source_variables = sent_nodal
variables = received_nodal
[]
[]
[Executioner]
type = MFEMTransient
num_steps = 2
[]
# Positions used to create multiple subapps for the 1 to N tests
[Positions]
[mfem_send_locs]
type = InputPositions
positions = '0 0 0'
[]
[mfem_recv_locs]
type = InputPositions
positions = '0 0 0
0.1 0.4 0
0.7 0.2 0'
[]
[]
[Outputs]
file_base = OutputData/MFEMtoMFEMSiblingTransfer
[]
(test/tests/mfem/functions/parsed_function_source.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
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/vectorpostprocessors/coefficient_value_sampler/coefficient_value_sampler.i)
[Mesh]
type = MFEMFileMesh
file = ../../mesh/inline-quad.mesh
[]
[Problem]
type = MFEMProblem
solve = false
[]
[Functions]
[linear_coefficient]
type = MFEMParsedFunction
expression = 'x + 2*y'
[]
[]
[FunctorMaterials]
[material]
type = MFEMGenericFunctorMaterial
prop_names = material_coefficient
prop_values = linear_coefficient
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[VectorPostprocessors]
[function_sample]
type = MFEMScalarCoefficientPointValueSampler
coefficient = linear_coefficient
points = '0.125 0.125 0
0.375 0.625 0
0.875 0.875 0'
[]
[material_sample]
type = MFEMScalarCoefficientPointValueSampler
coefficient = material_coefficient
points = '0.125 0.125 0
0.375 0.625 0
0.875 0.875 0'
[]
[]
[Outputs]
csv = true
[]
(test/tests/mfem/kernels/maxwell_eigenproblem.i)
[Mesh]
type = MFEMFileMesh
file = ../mesh/beam-tet.mesh
[]
[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
[]
[]
[Solvers]
[ams]
type = MFEMHypreAMS
fespace = HCurlFESpace
print_level = 0
singular = true
[]
[AME]
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]
csv = true
file_base = OutputData/MaxwellEigenproblem
[]
(test/tests/mfem/transfers/mfem_parent_mfem_sub/sub.i)
[Mesh]
type = MFEMFileMesh
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
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
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/transfers/mfem_parent_mfem_sub/mfem_sub_vector.i)
[Mesh]
type = MFEMFileMesh
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_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_sub_h1_vector_var
vector_coefficient = vector_field
[]
[hcurl_vector_ic]
type = MFEMVectorIC
variable = mfem_sub_hcurl_vector_var
vector_coefficient = vector_field
[]
[hdiv_vector_ic]
type = MFEMVectorIC
variable = mfem_sub_hdiv_vector_var
vector_coefficient = vector_field
[]
[l2_vector_ic]
type = MFEMVectorIC
variable = mfem_sub_l2_vector_var
vector_coefficient = vector_field
[]
[]
[Executioner]
type = Steady
[]
(test/tests/mfem/vectorpostprocessors/point_value_sampler/point_value_sampler_point_not_found.i)
[Mesh]
type = MFEMFileMesh
file = ../../mesh/mug.e
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[h1_scalar]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[VectorPostprocessors]
[point_sample]
type = MFEMVariablePointValueSampler
variable = 'h1_scalar'
points = '0 0 1000'
[]
[]