- coefficientThe scalar coefficient. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number.
C++ Type:MFEMScalarCoefficientName
Controllable:No
Description:The scalar coefficient. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number.
- variableThe variable to apply the initial condition on.
C++ Type:VariableName
Unit:(no unit assumed)
Controllable:No
Description:The variable to apply the initial condition on.
MFEMScalarIC
Overview
MFEMScalarIC is used to set initial conditions of scalar valued MFEM variables from an mfem::Coefficient. The initial condition will be applied on all subdomains in the mesh.
Example Input File Syntax
[ICs<<<{"href": "../../../syntax/ICs/index.html"}>>>]
[l2_scalar_ic]
type = MFEMScalarIC<<<{"description": "Sets the initial values of an MFEM scalar variable from a user-specified scalar coefficient.", "href": "MFEMScalarIC.html"}>>>
variable<<<{"description": "The variable to apply the initial condition on."}>>> = l2_scalar
coefficient<<<{"description": "The scalar coefficient. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number."}>>> = 2.0
[]
[h1_scalar_ic]
type = MFEMScalarIC<<<{"description": "Sets the initial values of an MFEM scalar variable from a user-specified scalar coefficient.", "href": "MFEMScalarIC.html"}>>>
variable<<<{"description": "The variable to apply the initial condition on."}>>> = h1_scalar
coefficient<<<{"description": "The scalar coefficient. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number."}>>> = height
[]
[](test/tests/mfem/ics/scalar_ic.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/vectorpostprocessors/line_value_sampler/line_value_sampler_diffusion.i)
- (test/tests/mfem/kernels/nldiffusion.i)
- (test/tests/mfem/vectorpostprocessors/point_value_sampler/point_value_sampler_diffusion.i)
- (test/tests/mfem/kernels/nl_heatconduction.i)
- (test/tests/mfem/kernels/nl_heattransfer.i)
- (test/tests/mfem/ics/transient_scalar_ic.i)
- (test/tests/mfem/transfers/sibling_transfers/mfem_sub_between_diffusion.i)
- (test/tests/mfem/transfers/l2_libmesh_parent_mfem_sub/mfem_sub_scalar.i)
- (test/tests/mfem/ics/scalar_ic.i)
- (test/tests/mfem/transfers/displaced/mfem_child.i)
- (test/tests/mfem/transfers/l2_mfem_parent_libmesh_sub/mfem_parent_scalar.i)
- (test/tests/mfem/functions/parsed_function_source.i)
(test/tests/mfem/ics/scalar_ic.i)
[Mesh]
type = MFEMMesh
file = ../mesh/cylinder-hex-q2.gen
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
fec_order = CONSTANT
basis = GaussLegendre
[]
[]
[Variables]
[h1_scalar]
type = MFEMVariable
fespace = H1FESpace
[]
[l2_scalar]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[Functions]
[height]
type = ParsedFunction
expression = 'z'
[]
[]
[ICs]
[l2_scalar_ic]
type = MFEMScalarIC
variable = l2_scalar
coefficient = 2.0
[]
[h1_scalar_ic]
type = MFEMScalarIC
variable = h1_scalar
coefficient = height
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/ScalarIC
vtk_format = ASCII
[]
[]
(test/tests/mfem/vectorpostprocessors/line_value_sampler/line_value_sampler_diffusion.i)
# MFEM diffusion problem sampled with MFEMLineValueSampler.
[Mesh]
type = MFEMMesh
file = ../../mesh/mug.e
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[]
[Variables]
[concentration]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[AuxVariables]
[concentration_gradient]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxKernels]
[grad]
type = MFEMGradAux
variable = concentration_gradient
source = concentration
execute_on = TIMESTEP_END
[]
[]
[ICs]
[diffused_ic]
type = MFEMScalarIC
coefficient = one
variable = concentration
[]
[]
[Functions]
[one]
type = ParsedFunction
expression = 1.0
[]
[]
[BCs]
[bottom]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'bottom'
coefficient = 1.0
[]
[top]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'top'
[]
[]
[FunctorMaterials]
[Substance]
type = MFEMGenericFunctorMaterial
prop_names = diffusivity
prop_values = 1.0
block = 'the_domain'
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = concentration
coefficient = diffusivity
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[jacobi]
type = MFEMOperatorJacobiSmoother
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[VectorPostprocessors]
[line_sample]
type = MFEMLineValueSampler
variable = 'concentration'
start_point = '2.125 0 -2.375'
end_point = '2.125 0 2.625'
num_points = 11
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(test/tests/mfem/kernels/nldiffusion.i)
[Mesh]
type = MFEMMesh
file = ../mesh/square.e
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[concentration]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[ICs]
[diffused_ic]
type = MFEMScalarIC
coefficient = initial
variable = concentration
[]
[]
[Functions]
[initial]
type = ParsedFunction
expression = 2*y+1
[]
[]
[BCs]
[top]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'top'
coefficient = 3.0
[]
[bottom]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'bottom'
coefficient = 1.0
[]
[]
[Kernels]
active = 'nl'
[nl]
type = MFEMNLDiffusionKernel
variable = concentration
k_coefficient = concentration
dk_du_coefficient = 1.0
[]
[force]
type = MFEMDomainLFKernel
variable = concentration
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
print_level = 0
[]
[jacobi]
type = MFEMOperatorJacobiSmoother
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
print_level = 1
l_tol = 1e-16
l_max_its = 1000
[]
[Executioner]
type = MFEMSteady
device = cpu
nl_max_its = 100
nl_abs_tol = 1.0e-10
nl_rel_tol = 1.0e-9
print_level = 1
[]
[Outputs]
active = ParaViewDataCollection
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/NLDiffusion
vtk_format = ASCII
[]
[]
(test/tests/mfem/vectorpostprocessors/point_value_sampler/point_value_sampler_diffusion.i)
# MFEM diffusion problem sampled with MFEMPointValueSampler.
[Mesh]
type = MFEMMesh
file = ../../mesh/mug.e
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[]
[Variables]
[concentration]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[AuxVariables]
[concentration_gradient]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxKernels]
[grad]
type = MFEMGradAux
variable = concentration_gradient
source = concentration
execute_on = TIMESTEP_END
[]
[]
[ICs]
[diffused_ic]
type = MFEMScalarIC
coefficient = one
variable = concentration
[]
[]
[Functions]
[one]
type = ParsedFunction
expression = 1.0
[]
[]
[BCs]
[bottom]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'bottom'
coefficient = 1.0
[]
[top]
type = MFEMScalarDirichletBC
variable = concentration
boundary = 'top'
[]
[]
[FunctorMaterials]
[Substance]
type = MFEMGenericFunctorMaterial
prop_names = diffusivity
prop_values = 1.0
block = 'the_domain'
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = concentration
coefficient = diffusivity
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[jacobi]
type = MFEMOperatorJacobiSmoother
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[VectorPostprocessors]
[point_sample]
type = MFEMPointValueSampler
variable = 'concentration'
points = '2.125 0 -1.375 2.125 0 1.125'
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(test/tests/mfem/kernels/nl_heatconduction.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 = MFEMMesh
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
[]
[]
[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
[]
[]
[Solver]
type = MFEMMUMPS
print_level = 0
[]
[Executioner]
type = MFEMTransient
device = cpu
assembly_level = legacy
dt = 1e-2
start_time = 0.0
end_time = 0.5
nl_max_its = 30
nl_abs_tol = 1.0e-5
nl_rel_tol = 1.0e-5
print_level = 1
[]
[VectorPostprocessors]
[centre_temperature]
type = MFEMPointValueSampler
variable = 'temperature'
points = '0.0 0.0 0.0'
execute_on = TIMESTEP_END
[]
[]
[Outputs]
file_base = OutputData/NLHeatConduction
csv = true
time_step_interval = 10
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/NLHeatConduction
vtk_format = ASCII
[]
[]
(test/tests/mfem/kernels/nl_heattransfer.i)
[Problem]
type = MFEMProblem
[]
[Mesh]
type = MFEMMesh
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'
[]
[]
[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
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 = MFEMLineValueSampler
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
[]
[]
[Solver]
type = MFEMMUMPS
print_level = 0
[]
[Executioner]
type = MFEMTransient
device = cpu
assembly_level = legacy
dt = 1
num_steps = 3
nl_max_its = 150
nl_abs_tol = 1e-12
print_level = 1
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/NLHeatTransfer
vtk_format = ASCII
[]
[CSV]
type = CSV
file_base = OutputData/NLHeatTransfer
time_step_interval = 3
[]
[]
(test/tests/mfem/ics/transient_scalar_ic.i)
[Mesh]
type = MFEMMesh
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
coefficient = 1.0
[]
[dh1_dt]
type = MFEMTimeDerivativeMassKernel
variable = h1_scalar
coefficient = 1.0
[]
[]
[BCs]
[bottom]
type = MFEMScalarDirichletBC
variable = h1_scalar
boundary = '1'
coefficient = height
[]
[top_dirichlet]
type = MFEMScalarDirichletBC
variable = h1_scalar
boundary = '2'
coefficient = height
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-8
l_max_its = 100
[]
[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/transfers/sibling_transfers/mfem_sub_between_diffusion.i)
[Problem]
type = MFEMProblem
solve = false
[]
[Mesh]
type = MFEMMesh
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 = MFEMLineValueSampler
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 = MFEMLineValueSampler
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/transfers/l2_libmesh_parent_mfem_sub/mfem_sub_scalar.i)
[Mesh]
type = MFEMMesh
file = ../../mesh/square_quad9.e
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
fec_order = CONSTANT
[]
[]
[Variables]
[temperature]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[Functions]
[parsed_function]
type = ParsedFunction
expression = 'x*x + y*y'
[]
[]
[ICs]
[libmesh_scalar_var_ic]
type = MFEMScalarIC
variable = 'temperature'
coefficient = parsed_function
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
(test/tests/mfem/ics/scalar_ic.i)
[Mesh]
type = MFEMMesh
file = ../mesh/cylinder-hex-q2.gen
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
fec_order = CONSTANT
basis = GaussLegendre
[]
[]
[Variables]
[h1_scalar]
type = MFEMVariable
fespace = H1FESpace
[]
[l2_scalar]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[Functions]
[height]
type = ParsedFunction
expression = 'z'
[]
[]
[ICs]
[l2_scalar_ic]
type = MFEMScalarIC
variable = l2_scalar
coefficient = 2.0
[]
[h1_scalar_ic]
type = MFEMScalarIC
variable = h1_scalar
coefficient = height
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Outputs]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/ScalarIC
vtk_format = ASCII
[]
[]
(test/tests/mfem/transfers/displaced/mfem_child.i)
[Problem]
type = MFEMProblem
solve = false
[]
[Mesh]
type = MFEMMesh
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/transfers/l2_mfem_parent_libmesh_sub/mfem_parent_scalar.i)
[Mesh]
type = MFEMMesh
file = ../../mesh/square_quad9.e
[]
[Problem]
type = MFEMProblem
solve = false
[]
[FESpaces]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
fec_order = CONSTANT
[]
[]
[Variables]
[mfem_scalar_var]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[AuxVariables]
[libmesh_scalar_var]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[Functions]
[parsed_function]
type = ParsedFunction
expression = 'x*x + y*y'
[]
[]
[ICs]
[libmesh_scalar_var_ic]
type = MFEMScalarIC
variable = 'mfem_scalar_var'
coefficient = parsed_function
[]
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[MultiApps]
[libmesh_app]
type = FullSolveMultiApp
input_files = libmesh_sub_scalar.i
execute_on = 'INITIAL'
[]
[]
[Transfers]
[transfer_from_libmesh]
type = MultiApplibMeshToMFEMShapeEvaluationTransfer
source_variables = libmesh_scalar_var
variables = libmesh_scalar_var
from_multi_app = libmesh_app
[]
[]
[Postprocessors]
[Difference]
type = MFEML2Error
variable = mfem_scalar_var
function = libmesh_scalar_var
execute_on = TIMESTEP_END
[]
[]
[Outputs]
file_base = 'mfem_parent_libmesh_sub_scalar_quads'
csv = true
[]
(test/tests/mfem/functions/parsed_function_source.i)
[Mesh]
type = MFEMMesh
file = ../mesh/hinomaru.e
[]
[Problem]
type = MFEMProblem
[]
[FESpaces]
[H1FESpace]
type = MFEMScalarFESpace
fec_type = H1
fec_order = FIRST
[]
[]
[Variables]
[variable]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[ICs]
[ic]
type = MFEMScalarIC
variable = variable
coefficient = material
[]
[]
[BCs]
[bc]
type = MFEMScalarDirichletBC
variable = variable
boundary = skin
[]
[]
[FunctorMaterials]
[material]
type = MFEMGenericFunctorMaterial
prop_names = material
prop_values = -100
[]
[]
[Functions]
[r]
type = ParsedFunction
expression = hypot(x,y)
[]
[p]
type = ParsedFunction
expression = atan2(y,x)
[]
[source]
type = MFEMParsedFunction
expression = v*sin(w*p)
symbol_names = 'p w v'
symbol_values = 'p 4 variable'
[]
[solution]
type = MFEMParsedFunction
expression = if(r<=1,-c*sin(w*p)*(r^w-r^2)/(w^2-4),0)
symbol_names = 'r p w c'
symbol_values = 'r p 4 material'
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = variable
[]
[source]
type = MFEMDomainLFKernel
variable = variable
coefficient = source
block = wire
[]
[]
[Preconditioner]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[]
[Solver]
type = MFEMHyprePCG
preconditioner = boomeramg
l_tol = 1e-16
[]
[Executioner]
type = MFEMSteady
device = cpu
[]
[Postprocessors]
[error]
type = MFEML2Error
variable = variable
function = solution
[]
[]
[Outputs]
csv = true
file_base = OutputData/ParsedFunctionSource
[]