- end_pointThe ending of the line
C++ Type:libMesh::Point
Controllable:No
Description:The ending of the line
- num_pointsThe number of points to sample along the line
C++ Type:unsigned int
Controllable:No
Description:The number of points to sample along the line
- start_pointThe beginning of the line
C++ Type:libMesh::Point
Controllable:No
Description:The beginning of the line
- variableThe variable that this VectorPostprocessor samples
C++ Type:VariableName
Unit:(no unit assumed)
Controllable:No
Description:The variable that this VectorPostprocessor samples
MFEMVariableLineValueSampler
Overview
This class performs interpolation of real scalar and vector variables along a specified line using MFEM's FindPointsGSLIB gslib interpolation.
Example Input File Syntax
[VectorPostprocessors<<<{"href": "../../../syntax/VectorPostprocessors/index.html"}>>>]
[line_sample]
type = MFEMVariableLineValueSampler<<<{"description": "Sample an MFEM variable along a specified line.", "href": "MFEMVariableLineValueSampler.html"}>>>
variable<<<{"description": "The variable that this VectorPostprocessor samples"}>>> = 'concentration'
start_point<<<{"description": "The beginning of the line"}>>> = '2.125 0 -2.375'
end_point<<<{"description": "The ending of the line"}>>> = '2.125 0 2.625'
num_points<<<{"description": "The number of points to sample along the line"}>>> = 101
[]
[](test/tests/mfem/kernels/diffusion.i)Input Parameters
- contains_complete_historyFalseSet this flag to indicate that the values in all vectors declared by this VPP represent a time history (e.g. with each invocation, new values are added and old values are never removed). This changes the output so that only a single file is output and updated with each invocation
Default:False
C++ Type:bool
Controllable:No
Description:Set this flag to indicate that the values in all vectors declared by this VPP represent a time history (e.g. with each invocation, new values are added and old values are never removed). This changes the output so that only a single file is output and updated with each invocation
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Options:XFEM_MARK, FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, LINEAR_CONVERGENCE, NONLINEAR, NONLINEAR_CONVERGENCE, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, MULTIAPP_FIXED_POINT_CONVERGENCE, MULTISYSTEM_FIXED_POINT_ITERATION_END, FINAL, CUSTOM
Controllable:No
Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
- mesh_boundary_tolerance1e-08Distance from point to mesh boundary below which the point is considered to be on the boundary rather than outside the mesh.
Default:1e-08
C++ Type:Real
Unit:(no unit assumed)
Controllable:No
Description:Distance from point to mesh boundary below which the point is considered to be on the boundary rather than outside the mesh.
- parallel_typeREPLICATEDSet how the data is represented within the VectorPostprocessor (VPP); 'distributed' indicates that data within the VPP is distributed and no auto communication is performed, this setting will result in parallel output within the CSV output; 'replicated' indicates that the data within the VPP is correct on processor 0, the data will automatically be broadcast to all processors unless the '_auto_broadcast' param is set to false within the validParams function.
Default:REPLICATED
C++ Type:MooseEnum
Options:DISTRIBUTED, REPLICATED
Controllable:No
Description:Set how the data is represented within the VectorPostprocessor (VPP); 'distributed' indicates that data within the VPP is distributed and no auto communication is performed, this setting will result in parallel output within the CSV output; 'replicated' indicates that the data within the VPP is correct on processor 0, the data will automatically be broadcast to all processors unless the '_auto_broadcast' param is set to false within the validParams function.
- point_orderingVDIMOrdering style to use for point vector DoFs.
Default:VDIM
C++ Type:MooseEnum
Options:NODES, VDIM
Controllable:No
Description:Ordering style to use for point vector DoFs.
- side_interpolation_typeARITHMETICAverage type used when sampling L2 functions at element boundaries.
Default:ARITHMETIC
C++ Type:MooseEnum
Options:NONE, ARITHMETIC, HARMONIC
Controllable:No
Description:Average type used when sampling L2 functions at element boundaries.
Optional 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.
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
Advanced Parameters
Input Files
- (test/tests/mfem/submeshes/domain_submesh.i)
- (test/tests/mfem/transfers/sibling_transfers/mfem_sub_between_diffusion.i)
- (test/tests/mfem/auxkernels/projection.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/parent.i)
- (test/tests/mfem/nonlinear/nlheattransfer.i)
- (test/tests/mfem/ics/vector_ic.i)
- (test/tests/mfem/transfers/mfem_parent_mfem_sub/sub.i)
- (test/tests/mfem/transfers/mfem_sub_mfem_sub/sub_send.i)
- (test/tests/mfem/functions/cylindrical_coefficients.i)
- (test/tests/mfem/ics/transient_scalar_ic.i)
- (test/tests/mfem/auxkernels/2Dmagnetostatic.i)
- (test/tests/mfem/kernels/heattransfer.i)
- (test/tests/mfem/submeshes/magnetostatic.i)
- (test/tests/mfem/submeshes/domain_submesh_transfer.i)
- (test/tests/mfem/kernels/curlcurl.i)
- (test/tests/mfem/transfers/mfem_sub_mfem_sub/sub_recv.i)
- (test/tests/mfem/auxkernels/innerproduct.i)
- (test/tests/mfem/auxkernels/crossproduct.i)
- (test/tests/mfem/kernels/graddiv.i)
- (test/tests/mfem/kernels/mixed_heattransfer.i)
- (test/tests/mfem/ics/scalar_ic.i)
- (test/tests/mfem/kernels/diffusion.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
[]
[]
[VectorPostprocessors]
[line_sample]
type = MFEMVariableLineValueSampler
variable = 'concentration'
start_point = '2.125 0 -2.375'
end_point = '2.125 0 2.625'
num_points = 101
[]
[]
[Outputs]
active = CSV
[CSV]
type = CSV
file_base = OutputData/diffusion
[]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/ParaViewDataCollection
vtk_format = ASCII
[]
[VisItDataCollection]
type = MFEMVisItDataCollection
file_base = OutputData/VisItDataCollection
[]
[ConduitDataCollection]
type = MFEMConduitDataCollection
file_base = OutputData/ConduitDataCollection/Run
protocol = conduit_bin
[]
[]
(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
[]
[VectorPostprocessors]
[line_sample]
type = MFEMVariableLineValueSampler
variable = 'submesh_potential'
start_point = '0 -0.5 -0.5'
end_point = '0 0.5 0.5'
num_points = 101
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'timestep_end'
file_base = OutputData/domain_potential
[]
[]
(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/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
variable = 'Az'
start_point = '-3 -2 0'
end_point = '3 2 0'
num_points = 101
execute_on = 'final'
[]
[line_sample_J]
type = MFEMVariableLineValueSampler
variable = 'J'
start_point = '-2.9 -1.9 0'
end_point = '2.9 1.9 0'
num_points = 101
execute_on = 'final'
[]
[line_sample_GAz]
type = MFEMVariableLineValueSampler
variable = 'GAz'
start_point = '-2.9 -1.9 0'
end_point = '2.9 1.9 0'
num_points = 101
execute_on = 'final'
[]
[line_sample_GAz_copy]
type = MFEMVariableLineValueSampler
variable = 'GAz(copy)'
start_point = '-2.9 -1.9 0'
end_point = '2.9 1.9 0'
num_points = 101
execute_on = 'final'
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'final'
file_base = OutputData/Projection/projection
[]
[]
(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
[]
[]
[VectorPostprocessors]
[line_sample]
type = MFEMVariableLineValueSampler
variable = 'u'
start_point = '0 0 0'
end_point = '1 1 0.1'
num_points = 101
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'timestep_end'
file_base = OutputData/parent
[]
[]
(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/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
[]
[VectorPostprocessors]
[line_sample_h1_vector]
type = MFEMVariableLineValueSampler
variable = 'h1_vector'
start_point = '-1 0 -0.5'
end_point = '1 0 0.5'
num_points = 101
[]
[line_sample_nd_vector]
type = MFEMVariableLineValueSampler
variable = 'nd_vector'
start_point = '-0.99 -0.01 -0.49'
end_point = '0.99 0.01 0.49'
num_points = 114
[]
[line_sample_rt_vector]
type = MFEMVariableLineValueSampler
variable = 'rt_vector'
start_point = '-0.99 -0.01 -0.49'
end_point = '0.99 0.01 0.49'
num_points = 114
[]
[line_sample_l2_vector]
type = MFEMVariableLineValueSampler
variable = 'l2_vector'
start_point = '-0.99 -0.01 -0.49'
end_point = '0.99 0.01 0.49'
num_points = 114
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'timestep_end'
file_base = OutputData/VectorIC/vector_ic
[]
[]
(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
[]
[]
[VectorPostprocessors]
[line_sample]
type = MFEMVariableLineValueSampler
variable = 'u'
start_point = '0 0 0'
end_point = '1 1 0.1'
num_points = 101
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'timestep_end'
file_base = OutputData/sub
[]
[]
(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]
[transfer_var]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[BCs]
[back]
type = MFEMScalarDirichletBC
variable = transfer_var
boundary = 1
coefficient = 1.0
[]
[bottom]
type = MFEMScalarDirichletBC
variable = transfer_var
boundary = 2
[]
[]
[Kernels]
[diff]
type = MFEMDiffusionKernel
variable = transfer_var
[]
[]
[Solvers]
[boomeramg]
type = MFEMHypreBoomerAMG
[]
[main]
type = MFEMHypreGMRES
preconditioner = boomeramg
l_tol = 1e-16
l_max_its = 1000
[]
[]
[Executioner]
type = MFEMSteady
[]
[VectorPostprocessors]
[line_sample]
type = MFEMVariableLineValueSampler
variable = 'transfer_var'
start_point = '0 0 0'
end_point = '1 1 0.1'
num_points = 101
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'timestep_end'
file_base = OutputData/send
[]
[]
(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/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
[]
[VectorPostprocessors]
[line_sample_h1_scalar]
type = MFEMVariableLineValueSampler
variable = 'h1_scalar'
start_point = '-1 0 -0.5'
end_point = '1 0 0.5'
num_points = 101
[]
[line_sample_l2_scalar]
type = MFEMVariableLineValueSampler
variable = 'l2_scalar'
start_point = '-0.99 -0.01 -0.49'
end_point = '0.99 0.01 0.49'
num_points = 114
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'timestep_end'
file_base = OutputData/ScalarIC/scalar_ic
[]
[]
(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/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
[]
[VectorPostprocessors]
[line_sample]
type = MFEMVariableLineValueSampler
variable = 'temperature'
start_point = '2.125 0 -2.375'
end_point = '2.125 0 2.625'
num_points = 101
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'timestep_end'
file_base = OutputData/HeatTransfer/heattransfer
[]
[]
(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
[]
[]
[VectorPostprocessors]
[line_sample]
type = MFEMVariableLineValueSampler
variable = 'electric_potential'
start_point = '0 0.5 -0.5'
end_point = '0 0.5 0.5'
num_points = 101
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'timestep_end'
file_base = OutputData/electric_potential
[]
[]
(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
[]
[]
[VectorPostprocessors]
[line_sample]
type = MFEMVariableLineValueSampler
variable = 'potential'
start_point = '0 0.5 -0.5'
end_point = '0 0.5 0.5'
num_points = 101
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'timestep_end'
file_base = OutputData/domain_submesh_transfer
[]
[]
(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]
[HCurlFESpace]
type = MFEMVectorFESpace
fec_type = ND
fec_order = FIRST
[]
[HDivFESpace]
type = MFEMVectorFESpace
fec_type = RT
fec_order = CONSTANT
[]
[]
[Variables]
[e_field]
type = MFEMVariable
fespace = HCurlFESpace
[]
[]
[AuxVariables]
[db_dt_field]
type = MFEMVariable
fespace = HDivFESpace
[]
[]
[AuxKernels]
[curl]
type = MFEMCurlAux
variable = db_dt_field
source = e_field
scale_factor = -1.0
execute_on = TIMESTEP_END
[]
[]
[Functions]
[exact_e_field]
type = ParsedVectorFunction
expression_x = 'sin(kappa * y)'
expression_y = 'sin(kappa * z)'
expression_z = 'sin(kappa * x)'
symbol_names = kappa
symbol_values = 3.1415926535
[]
[forcing_field]
type = ParsedVectorFunction
expression_x = '(1. + kappa * kappa) * sin(kappa * y)'
expression_y = '(1. + kappa * kappa) * sin(kappa * z)'
expression_z = '(1. + kappa * kappa) * sin(kappa * x)'
symbol_names = kappa
symbol_values = 3.1415926535
[]
[]
[BCs]
[tangential_E_bdr]
type = MFEMVectorTangentialDirichletBC
variable = e_field
vector_coefficient = exact_e_field
[]
[]
[Kernels]
[curlcurl]
type = MFEMCurlCurlKernel
variable = e_field
[]
[mass]
type = MFEMVectorFEMassKernel
variable = e_field
[]
[source]
type = MFEMVectorFEDomainLFKernel
variable = e_field
vector_coefficient = forcing_field
[]
[]
[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
[]
[VectorPostprocessors]
[line_sample_e_field]
type = MFEMVariableLineValueSampler
variable = 'e_field'
start_point = '-0.99 -0.99 0.99'
end_point = '0.99 0.99 -0.99'
num_points = 114
[]
[line_sample_db_dt_field]
type = MFEMVariableLineValueSampler
variable = 'db_dt_field'
start_point = '-0.99 -0.99 0.99'
end_point = '0.99 0.99 -0.99'
num_points = 114
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'timestep_end'
file_base = OutputData/CurlCurl/curlcurl
[]
[]
(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]
[transfer_var]
type = MFEMVariable
fespace = H1FESpace
[]
[]
[Executioner]
type = MFEMSteady
[]
[VectorPostprocessors]
[line_sample]
type = MFEMVariableLineValueSampler
variable = 'transfer_var'
start_point = '0 0 0'
end_point = '1 1 0.1'
num_points = 101
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'timestep_end'
file_base = OutputData/recv
[]
[]
(test/tests/mfem/auxkernels/innerproduct.i)
!include ../kernels/curlcurl.i
[FESpaces]
[L2FESpace]
type = MFEMScalarFESpace
fec_type = L2
fec_order = CONSTANT
[]
[]
[AuxVariables]
[joule_heating]
type = MFEMVariable
fespace = L2FESpace
[]
[]
[AuxKernels]
[joule_Q_aux]
type = MFEMInnerProductAux
variable = joule_heating
first_source_vec = e_field
second_source_vec = e_field
execute_on = TIMESTEP_END
[]
[]
[VectorPostprocessors]
active=line_sample
[line_sample]
type=MFEMVariableLineValueSampler
variable=joule_heating
start_point="-0.99 -0.99 0.99"
end_point="0.99 0.99 -0.99"
num_points=114
[]
[]
(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
[]
[VectorPostprocessors]
[line_sample_e_field]
type = MFEMVariableLineValueSampler
variable = 'e_field'
start_point = '0.01 0.01 0.01'
end_point = '0.99 0.99 0.99'
num_points = 101
execute_on = 'final'
[]
[line_sample_b_field]
type = MFEMVariableLineValueSampler
variable = 'b_field'
start_point = '0.01 0.01 0.01'
end_point = '0.99 0.99 0.99'
num_points = 101
execute_on = 'final'
[]
[line_sample_lorentz_force]
type = MFEMVariableLineValueSampler
variable = 'lorentz_force'
start_point = '0.01 0.01 0.01'
end_point = '0.99 0.99 0.99'
num_points = 101
execute_on = 'final'
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'final'
file_base = OutputData/CrossProduct/crossproduct
[]
[]
(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"
[]
[VectorPostprocessors]
[F_line_sample]
type = MFEMVariableLineValueSampler
variable = 'F'
start_point = '0.01 0.013 0.014'
end_point = '7.98 0.99 0.97'
num_points = 114
[]
[divF_line_sample]
type = MFEMVariableLineValueSampler
variable = 'divF'
start_point = '0.01 0.013 0.014'
end_point = '7.98 0.99 0.97'
num_points = 114
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'timestep_end'
file_base = OutputData/GradDiv/graddiv
[]
[]
(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
[]
[VectorPostprocessors]
[temperature_line_sample]
type = MFEMVariableLineValueSampler
variable = 'temperature'
start_point = '0.01 0.01 0'
end_point = '0.99 0.99 0'
num_points = 114
[]
[time_integrated_heat_flux_line_sample]
type = MFEMVariableLineValueSampler
variable = 'time_integrated_heat_flux'
start_point = '0.01 0.01 0'
end_point = '0.99 0.99 0'
num_points = 114
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'timestep_end'
file_base = OutputData/MixedHeatTransfer/mht
[]
[]
(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
[]
[VectorPostprocessors]
[line_sample_h1_scalar]
type = MFEMVariableLineValueSampler
variable = 'h1_scalar'
start_point = '-1 0 -0.5'
end_point = '1 0 0.5'
num_points = 101
[]
[line_sample_l2_scalar]
type = MFEMVariableLineValueSampler
variable = 'l2_scalar'
start_point = '-0.99 -0.01 -0.49'
end_point = '0.99 0.01 0.49'
num_points = 114
[]
[]
[Outputs]
[CSV]
type = CSV
execute_on = 'timestep_end'
file_base = OutputData/ScalarIC/scalar_ic
[]
[]
(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
[]
[]
[VectorPostprocessors]
[line_sample]
type = MFEMVariableLineValueSampler
variable = 'concentration'
start_point = '2.125 0 -2.375'
end_point = '2.125 0 2.625'
num_points = 101
[]
[]
[Outputs]
active = CSV
[CSV]
type = CSV
file_base = OutputData/diffusion
[]
[ParaViewDataCollection]
type = MFEMParaViewDataCollection
file_base = OutputData/ParaViewDataCollection
vtk_format = ASCII
[]
[VisItDataCollection]
type = MFEMVisItDataCollection
file_base = OutputData/VisItDataCollection
[]
[ConduitDataCollection]
type = MFEMConduitDataCollection
file_base = OutputData/ConduitDataCollection/Run
protocol = conduit_bin
[]
[]