- 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 k to multiply the integrator by. 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 k to multiply the integrator by. 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
MFEMCurlCurlKernel
Overview
Adds the domain integrator for integrating the bilinear form
where and is a scalar coefficient.
This term arises from the weak form of the curl curl operator
Example Input File Syntax
[Kernels<<<{"href": "../../../syntax/Kernels/index.html"}>>>]
[curlcurl]
type = MFEMCurlCurlKernel<<<{"description": "Adds the domain integrator to an MFEM problem for the bilinear form $(k\\vec\\nabla \\times \\vec u, \\vec\\nabla \\times \\vec v)_\\Omega$ arising from the weak form of the curl curl operator $k\\vec\\nabla \\times \\vec\\nabla \\times \\vec u$.", "href": "MFEMCurlCurlKernel.html"}>>>
variable<<<{"description": "Variable labelling the weak form this kernel is added to"}>>> = e_field
[]
[mass]
type = MFEMVectorFEMassKernel<<<{"description": "Adds the domain integrator to an MFEM problem for the bilinear form $(k \\vec u, \\vec v)_\\Omega$ arising from the weak form of the mass operator $k \\vec u$.", "href": "MFEMVectorFEMassKernel.html"}>>>
variable<<<{"description": "Variable labelling the weak form this kernel is added to"}>>> = e_field
[]
[source]
type = MFEMVectorFEDomainLFKernel<<<{"description": "Adds the domain integrator to an MFEM problem for the linear form $(\\vec f, \\vec v)_\\Omega$ arising from the weak form of the forcing term $\\vec f$.", "href": "MFEMVectorFEDomainLFKernel.html"}>>>
variable<<<{"description": "Variable labelling the weak form this kernel is added to"}>>> = e_field
vector_coefficient<<<{"description": "The name of the vector coefficient f. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a numeric vector value (enclosed in curly braces)."}>>> = forcing_field
[]
[](test/tests/mfem/kernels/curlcurl.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/submeshes/hphi_magnetodynamic.i)
- (test/tests/mfem/kernels/curlcurl.i)
- (test/tests/mfem/complex/mixed_sesquilinear.i)
- (test/tests/mfem/submeshes/av_magnetostatic.i)
- (test/tests/mfem/complex/mixed_sesquilinear_real_imag.i)
- (test/tests/mfem/submeshes/magnetostatic.i)
- (test/tests/mfem/complex/complex_waveguide.i)
- (test/tests/mfem/kernels/maxwell_eigenproblem.i)
(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/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/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/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/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/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/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/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/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
[]