- blockThe list of subdomains (names or ids) that this object will be restricted to. Leave empty to apply to all subdomains.
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of subdomains (names or ids) that this object will be restricted to. Leave empty to apply to all subdomains.
- coefficient1.Name of scalar coefficient $f$. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number.
Default:1.
C++ Type:MFEMScalarCoefficientName
Controllable:No
Description:Name of scalar coefficient $f$. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number.
- variableVariable labelling the weak form this kernel is added to
C++ Type:VariableName
Unit:(no unit assumed)
Controllable:No
Description:Variable labelling the weak form this kernel is added to
MFEMDomainLFKernel
Overview
Adds the domain integrator for integrating the linear form
where is the test variable and is a scalar forcing coefficient.
This term arises from the weak form of the forcing term
Example Input File Syntax
[Kernels<<<{"href": "../../../syntax/Kernels/index.html"}>>>]
[mass]
type = MFEMMassKernel<<<{"description": "Adds the domain integrator to an MFEM problem for the bilinear form $(k u, v)_\\Omega$ arising from the weak form of the mass operator $ku$.", "href": "MFEMMassKernel.html"}>>>
variable<<<{"description": "Variable labelling the weak form this kernel is added to"}>>> = submesh_potential
[]
[source]
type = MFEMDomainLFKernel<<<{"description": "Adds the domain integrator to an MFEM problem for the linear form $(f, v)_\\Omega$ arising from the weak form of the forcing term $f$.", "href": "MFEMDomainLFKernel.html"}>>>
variable<<<{"description": "Variable labelling the weak form this kernel is added to"}>>> = submesh_potential
coefficient<<<{"description": "Name of scalar coefficient $f$. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number."}>>> = 3.0
[]
[](test/tests/mfem/submeshes/boundary_submesh.i)Input 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
Input Files
- (test/tests/mfem/periodic/periodic.i)
- (test/tests/mfem/transfers/h1_libmesh_parent_mfem_sub/mfem_sub_scalar.i)
- (test/tests/mfem/periodic/periodic_complex.i)
- (test/tests/mfem/functions/parsed_function_source.i)
- (test/tests/mfem/auxkernels/axisymmetric_magnetostatic.i)
- (test/tests/mfem/nonlinear/nldiffusion_common.i)
- (test/tests/mfem/auxkernels/projection.i)
- (test/tests/mfem/submeshes/boundary_submesh.i)
- (test/tests/mfem/transfers/h1_mfem_parent_libmesh_sub/mfem_parent_scalar.i)
- (test/tests/mfem/solvers/pmg_diffusion.i)
- (test/tests/mfem/kernels/dg_diffusion.i)
- (test/tests/mfem/auxkernels/2Dmagnetostatic.i)
(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/periodic/periodic.i)
# Screened Poisson problem -div(grad u) + u = f on a periodic square with no boundary elements,
# with exact solution u = sin(pi x) sin(pi y).
[Mesh]
type = MFEMFileMesh
file = ../mesh/periodic-square.mesh
serial_refine = 2
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = SECOND
[]
[]
[Variables]
[u]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Functions]
[source]
type = ParsedFunction
expression = '(1 + 2 * pi^2) * sin(pi * x) * sin(pi * y)'
[]
[exact]
type = ParsedFunction
expression = 'sin(pi * x) * sin(pi * y)'
[]
[]
[Kernels]
[diffusion]
type = MFEMDiffusionKernel
variable = u
[]
[mass]
type = MFEMMassKernel
variable = u
[]
[source]
type = MFEMDomainLFKernel
variable = u
coefficient = source
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
print_level = 0
[]
[cg]
type = MFEMHyprePCG
preconditioner = boomeramg
l_tol = 1e-12
print_level = 0
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Postprocessors]
[l2_error]
type = MFEML2Error
variable = u
function = exact
[]
[]
[Outputs]
[CSV]
type = CSV
file_base = OutputData/Periodic
[]
[]
(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/periodic/periodic_complex.i)
# Complex screened Poisson problem -div(grad u) + (1 + i) u = f on a periodic square with no
# boundary elements, with exact solution u = sin(pi x) sin(pi y).
[Mesh]
type = MFEMFileMesh
file = ../mesh/periodic-square.mesh
serial_refine = 2
[]
[Problem]
type = MFEMProblem
numeric_type = complex
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = SECOND
[]
[]
[Variables]
[u]
type = MFEMComplexVariable
fespace = H1FESpace
[]
[]
[Functions]
[source_real]
type = ParsedFunction
expression = '(1 + 2 * pi^2) * sin(pi * x) * sin(pi * y)'
[]
[source_imag]
type = ParsedFunction
expression = 'sin(pi * x) * sin(pi * y)'
[]
[exact]
type = ParsedFunction
expression = 'sin(pi * x) * sin(pi * y)'
[]
[]
[Kernels]
[diffusion]
type = MFEMComplexKernel
variable = u
[RealComponent]
type = MFEMDiffusionKernel
[]
[]
[mass]
type = MFEMComplexKernel
variable = u
[RealComponent]
type = MFEMMassKernel
[]
[ImagComponent]
type = MFEMMassKernel
[]
[]
[source]
type = MFEMComplexKernel
variable = u
[RealComponent]
type = MFEMDomainLFKernel
coefficient = source_real
[]
[ImagComponent]
type = MFEMDomainLFKernel
coefficient = source_imag
[]
[]
[]
[Solvers]
[main]
type = MFEMSuperLU
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Postprocessors]
[l2_error]
type = MFEMComplexL2Error
variable = u
function_real = exact
function_imag = 0
[]
[]
[Outputs]
[CSV]
type = CSV
file_base = OutputData/PeriodicComplex
[]
[]
(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/auxkernels/axisymmetric_magnetostatic.i)
[Mesh]
type = MFEMFileMesh
file = ../mesh/hinomaru_offset.e
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[RTFESpace]
type = MFEMVectorFESpace
fec_type = RT
fec_order = CONSTANT
[]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
fec_order = CONSTANT
basis = GaussLegendre
[]
[]
[Variables]
[Atheta]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Functions]
# Meridional radius r = x
[r]
type = MFEMParsedFunction
expression = 'x'
[]
[inv_r]
type = MFEMParsedFunction
expression = '1.0/x'
[]
# Weighted source coefficient r * J_theta = x * 8
[Jtheta_r_wire]
type = MFEMParsedFunction
expression = '8.0*x'
[]
[]
[FunctorMaterials]
[cyl_coeffs]
type = MFEMGenericFunctorMaterial
prop_names = 'diffCoef massCoef'
prop_values = 'r inv_r'
[]
[J_wire]
type = MFEMGenericFunctorMaterial
prop_names = 'Jtheta sourceCoef'
prop_values = '8.0 Jtheta_r_wire'
block = wire
[]
[]
[AuxVariables]
[B]
type = MFEMVariable
fespace = RTFESpace
[]
[J]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[Kernels]
[diffusion]
type = MFEMDiffusionKernel
variable = Atheta
coefficient = diffCoef
[]
[mass]
type = MFEMMassKernel
variable = Atheta
coefficient = massCoef
[]
[source_wire]
type = MFEMDomainLFKernel
variable = Atheta
coefficient = sourceCoef
[]
[]
[AuxKernels]
[B_from_Atheta]
type = MFEMMeridionalCurlAux
variable = B
source = Atheta
[]
[J]
type = MFEMScalarProjectionAux
variable = J
coefficient = Jtheta
[]
[]
[BCs]
[essential]
type = MFEMScalarDirichletBC
variable = Atheta
boundary = skin
[]
[]
[Solvers]
[BoomerAMG]
type = MFEMHypreBoomerAMG
[]
[PCG]
type = MFEMHyprePCG
l_tol = 1e-8
preconditioner = BoomerAMG
[]
[]
[Postprocessors]
[norm] # should be sqrt(8*pi)
type = MFEMVectorL2Error
variable = B
function = '0. 0.'
[]
[]
[Executioner]
type = MFEMSteady
[]
[Outputs]
[ReportedPostprocessors]
type = CSV
file_base = AxisymmetricMagnetostatic
[]
[]
(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
variables = concentration
points = '0.5 0.25 0
0.5 0.50 0
0.5 0.75 0'
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
active = ParaViewDataCollection
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/NLDiffusion
vtk_format = ASCII
[]
[csv]
type = CSV
[]
[]
(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
[]
[VectorPostprocessors]
[line_sample_Az]
type = MFEMVariableLineValueSampler
variables = 'Az'
start_point = '-3 -2 0'
end_point = '3 2 0'
num_points = 101
[]
[line_sample_J]
type = MFEMVariableLineValueSampler
variables = 'J'
start_point = '-2.9 -1.9 0'
end_point = '2.9 1.9 0'
num_points = 101
[]
[line_sample_GAz]
type = MFEMVariableLineValueSampler
variables = 'GAz'
start_point = '-2.9 -1.9 0'
end_point = '2.9 1.9 0'
num_points = 101
[]
[line_sample_GAz_copy]
type = MFEMVariableLineValueSampler
variables = 'GAz(copy)'
start_point = '-2.9 -1.9 0'
end_point = '2.9 1.9 0'
num_points = 101
[]
[]
[Outputs]
[CSV]
type = CSV
file_base = OutputData/Projection/projection
[]
[]
(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/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
[]
[]
[Outputs]
file_base = 'mfem_parent_libmesh_sub_scalar_quads'
csv = true
[]
(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/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/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-12
[]
[]
[VectorPostprocessors]
[line_sample]
type = MFEMVariableLineValueSampler
variables = '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
[]
[]