- orderOrder of the quadrature rule the projected values are stored on. This must match the integration rule used by the objects consuming this coefficient.
C++ Type:int
Range:order>=0
Controllable:No
Description:Order of the quadrature rule the projected values are stored on. This must match the integration rule used by the objects consuming this coefficient.
- vector_coefficientVector coefficient to project onto the quadrature points. 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).
C++ Type:MFEMVectorCoefficientName
Controllable:No
Description:Vector coefficient to project onto the quadrature points. 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).
MFEMVectorQuadratureFunction
Overview
MFEMVectorQuadratureFunction is the vector-valued counterpart of MFEMScalarQuadratureFunction: it declares a named vector MFEM coefficient holding precomputed values of a source vector coefficient at the quadrature points of an MFEM QuadratureSpace, and can be used wherever a vector coefficient name is accepted. The source is supplied through the vector_coefficient parameter, and the vector dimension of the stored values is taken from it.
The lazy re-projection behaviour, the updates parameter, and the requirement that the consuming integration rule match the order parameter (with MOOSE erroring and suggesting a matching order otherwise) are all identical to the scalar case; see MFEMScalarQuadratureFunction for details.
Example Input File Syntax
# Linear elasticity beam under gravity, with the vector body-force density routed through a
# vector quadrature function coefficient in place of the source material coefficient.
[Mesh<<<{"href": "../../../syntax/Mesh/index.html"}>>>]
type = MFEMMesh
file = ../mesh/beam-tet.mesh
uniform_refine<<<{"description": "Specify the level of uniform refinement applied to the initial mesh"}>>> = 2
displacement = "displacement"
[]
[Problem<<<{"href": "../../../syntax/Problem/index.html"}>>>]
type = MFEMProblem
[]
[FESpaces<<<{"href": "../../../syntax/FESpaces/index.html"}>>>]
[H1FESpace]
type = MFEMVectorFESpace<<<{"description": "Convenience class to construct vector finite element spaces, abstracting away some of the mathematical complexity of specifying the dimensions.", "href": "../fespaces/MFEMVectorFESpace.html"}>>>
fec_type<<<{"description": "Specifies the family of FE shape functions."}>>> = H1
fec_order<<<{"description": "Order of the FE shape function to use."}>>> = FIRST
range_dim<<<{"description": "The number of components of the vectors in reference space. Zero (the default) means it will be the same as the problem dimension. Note that MFEM does not currently support 2D vectors in 1D space for ND and RT elements."}>>> = 3
ordering<<<{"description": "Ordering style to use for vector DoFs."}>>> = "vdim"
[]
[]
[Variables<<<{"href": "../../../syntax/Variables/index.html"}>>>]
[displacement]
type = MFEMVariable<<<{"description": "Class for adding MFEM variables to the problem (`mfem::ParGridFunction`s).", "href": "../variables/MFEMVariable.html"}>>>
fespace<<<{"description": "The finite element space this variable is defined on."}>>> = H1FESpace
[]
[]
[BCs<<<{"href": "../../../syntax/BCs/index.html"}>>>]
[dirichlet]
type = MFEMVectorDirichletBC<<<{"description": "Applies a Dirichlet condition to all components of a vector variable.", "href": "../bcs/MFEMVectorDirichletBC.html"}>>>
variable<<<{"description": "Variable on which to apply the boundary condition"}>>> = displacement
boundary<<<{"description": "The list of boundaries (ids or names) from the mesh where this object applies. Defaults to all boundaries."}>>> = '1'
[]
[]
[FunctorMaterials<<<{"href": "../../../syntax/FunctorMaterials/index.html"}>>>]
[Rigidium]
type = MFEMGenericFunctorMaterial<<<{"description": "Declares material scalar properties based on names and coefficients prescribed by input parameters.", "href": "../functormaterials/MFEMGenericFunctorMaterial.html"}>>>
prop_names<<<{"description": "The names of the properties this material will have"}>>> = 'lambda mu'
prop_values<<<{"description": "The corresponding names of coefficients associated with the named properties. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number."}>>> = '50.0 50.0'
block<<<{"description": "The list of subdomains (names or ids) that this object will be restricted to. Leave empty to apply to all subdomains."}>>> = 1
[]
[Bendium]
type = MFEMGenericFunctorMaterial<<<{"description": "Declares material scalar properties based on names and coefficients prescribed by input parameters.", "href": "../functormaterials/MFEMGenericFunctorMaterial.html"}>>>
prop_names<<<{"description": "The names of the properties this material will have"}>>> = 'lambda mu'
prop_values<<<{"description": "The corresponding names of coefficients associated with the named properties. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number."}>>> = '1.0 1.0'
block<<<{"description": "The list of subdomains (names or ids) that this object will be restricted to. Leave empty to apply to all subdomains."}>>> = 2
[]
[RigidiumWeightDensity]
type = MFEMGenericFunctorVectorMaterial<<<{"description": "Declares material vector properties based on names and coefficients prescribed by input parameters.", "href": "../functormaterials/MFEMGenericFunctorVectorMaterial.html"}>>>
prop_names<<<{"description": "The names of the properties this material will have"}>>> = 'gravitational_force_density'
prop_values<<<{"description": "The corresponding names of coefficients associated with the named properties. 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)."}>>> = '{0.0 0.0 -1e-2}'
block<<<{"description": "The list of subdomains (names or ids) that this object will be restricted to. Leave empty to apply to all subdomains."}>>> = 1
[]
[BendiumWeightDensity]
type = MFEMGenericFunctorVectorMaterial<<<{"description": "Declares material vector properties based on names and coefficients prescribed by input parameters.", "href": "../functormaterials/MFEMGenericFunctorVectorMaterial.html"}>>>
prop_names<<<{"description": "The names of the properties this material will have"}>>> = 'gravitational_force_density'
prop_values<<<{"description": "The corresponding names of coefficients associated with the named properties. 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)."}>>> = '{0.0 0.0 -5e-3}'
block<<<{"description": "The list of subdomains (names or ids) that this object will be restricted to. Leave empty to apply to all subdomains."}>>> = 2
[]
[]
[QuadratureFunctions<<<{"href": "../../../syntax/QuadratureFunctions/index.html"}>>>]
[qf_gravity]
type = MFEMVectorQuadratureFunction<<<{"description": "Declares a vector MFEM coefficient holding precomputed values of a source vector coefficient at quadrature points. Values are (re)projected lazily when the coefficient is used.", "href": "MFEMVectorQuadratureFunction.html"}>>>
vector_coefficient<<<{"description": "Vector coefficient to project onto the quadrature points. 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)."}>>> = gravitational_force_density
# the quadrature rule order matches the one used by VectorDomainLFIntegrator
# for first-order elements (2 * fe_order = 2)
order<<<{"description": "Order of the quadrature rule the projected values are stored on. This must match the integration rule used by the objects consuming this coefficient."}>>> = 2
updates<<<{"description": "When the stored values are re-projected from the source coefficient: 'none' projects exactly once, 'time' re-projects when the simulation time changes, 'nonlinear' additionally re-projects whenever solution variables change (i.e. on each nonlinear iteration)."}>>> = none
[]
[]
[Kernels<<<{"href": "../../../syntax/Kernels/index.html"}>>>]
[diff]
type = MFEMLinearElasticityKernel<<<{"description": "The isotropic linear elasticity operator with weak form $(c_{ikjl} \\nabla u_j, \\nabla v_i)$, to be added to an MFEM problem, where $c_{ikjl}$ is the isotropic elasticity tensor, $c_{ikjl} = \\lambda \\delta_{ik} \\delta_{jl} + \\mu \\left( \\delta_{ij} \\delta_{kl} + \\delta_{il} \\delta_{jk} \\right)$, $\\lambda$ is the first Lame parameter, $\\lambda = \\frac{E\\nu}{(1-2\\nu)(1+\\nu)}$, $\\mu$ is the second Lame parameter, $\\mu = \\frac{E}{2(1+\\nu)}$, where $E$ is Young's modulus and $\\nu$ is Poisson's ratio.", "href": "../kernels/MFEMLinearElasticityKernel.html"}>>>
variable<<<{"description": "Variable labelling the weak form this kernel is added to"}>>> = displacement
lambda<<<{"description": "Name of MFEM Lame constant lambda to multiply the div(u)*I term by. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number."}>>> = lambda
mu<<<{"description": "Name of MFEM Lame constant mu to multiply the gradients term by. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number."}>>> = mu
[]
[gravity]
type = MFEMVectorDomainLFKernel<<<{"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": "../kernels/MFEMVectorDomainLFKernel.html"}>>>
variable<<<{"description": "Variable labelling the weak form this kernel is added to"}>>> = displacement
vector_coefficient<<<{"description": "Name of body force density 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)."}>>> = qf_gravity
[]
[]
[Solvers<<<{"href": "../../../syntax/Solvers/index.html"}>>>]
[boomeramg]
type = MFEMHypreBoomerAMG<<<{"description": "Hypre BoomerAMG solver and preconditioner for the iterative solution of MFEM equation systems.", "href": "../solvers/MFEMHypreBoomerAMG.html"}>>>
fespace<<<{"description": "H1 FESpace to use in HypreBoomerAMG setup for elasticity problems."}>>> = H1FESpace
l_max_its<<<{"description": "Set the maximum number of iterations."}>>> = 20
l_tol<<<{"description": "Set the relative tolerance."}>>> = 1e-5
print_level<<<{"description": "Set the solver verbosity."}>>> = 2
[]
[main]
type = MFEMHyprePCG<<<{"description": "Hypre solver for the iterative solution of MFEM equation systems using the preconditioned conjugate gradient method.", "href": "../solvers/MFEMHyprePCG.html"}>>>
preconditioner<<<{"description": "Optional choice of preconditioner to use."}>>> = boomeramg
l_max_its<<<{"description": "Set the maximum number of iterations."}>>> = 100
l_tol<<<{"description": "Set the relative tolerance."}>>> = 1e-10
l_abs_tol<<<{"description": "Set the absolute tolerance."}>>> = 0.0
print_level<<<{"description": "Set the solver verbosity."}>>> = 2
[]
[]
[Executioner<<<{"href": "../../../syntax/Executioner/index.html"}>>>]
type = MFEMSteady
device = "cpu"
[]
[Postprocessors<<<{"href": "../../../syntax/Postprocessors/index.html"}>>>]
[displacement_l2_norm]
type = MFEMVectorL2Error<<<{"description": "Computes L2 error $\\left\\Vert \\vec u_{ex} - \\vec u_{h}\\right\\Vert_{\\rm L2}$ for vector gridfunctions.", "href": "../postprocessors/MFEMVectorL2Error.html"}>>>
variable<<<{"description": "Name of the vector variable of which to find the norm of the error."}>>> = displacement
function<<<{"description": "The analytic solution to compare against. 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)."}>>> = '0 0 0'
[]
[]
[Outputs<<<{"href": "../../../syntax/Outputs/index.html"}>>>]
csv<<<{"description": "Output the scalar variable and postprocessors to a *.csv file using the default CSV output."}>>> = true
file_base<<<{"description": "Common file base name to be utilized with all output objects"}>>> = OutputData/GravityQF
[](test/tests/mfem/kernels/gravity_qf.i)Input Parameters
- updatesNONLINEARWhen the stored values are re-projected from the source coefficient: 'none' projects exactly once, 'time' re-projects when the simulation time changes, 'nonlinear' additionally re-projects whenever solution variables change (i.e. on each nonlinear iteration).
Default:NONLINEAR
C++ Type:MooseEnum
Controllable:No
Description:When the stored values are re-projected from the source coefficient: 'none' projects exactly once, 'time' re-projects when the simulation time changes, 'nonlinear' additionally re-projects whenever solution variables change (i.e. on each nonlinear iteration).
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.