- variableThe name of the variable that this object applies to
C++ Type:AuxVariableName
Unit:(no unit assumed)
Controllable:No
Description:The name of the variable that this object applies to
- vector_coefficientName of the vector coefficient to project. 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:Name of the vector coefficient to project. 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).
MFEMVectorProjectionAux
Overview
AuxKernel for projecting a vector coefficient onto a vector auxiliary variable in, e.g., or .
The vector coefficient may optionally be scaled by a scalar coefficient , set by the coefficient parameter, in which case is stored. Since either coefficient may be a variable, this allows a vector variable to be rescaled by a spatially varying factor. If the scalar coefficient is declared as a block restricted material property, the product is zero outside the blocks the property is defined on, since a piecewise coefficient evaluates to zero on subdomains it has not been assigned to. This is the recommended way of restricting the result to part of the mesh.
Note that MFEMGradAux and MFEMCurlAux should be preferred over projection of vector coefficients representing the gradient of scalar variables and curl of vector variables respectively where available for performance reasons.
Example Input File Syntax
[AuxKernels<<<{"href": "../../../syntax/AuxKernels/index.html"}>>>]
[J]
type = MFEMScalarProjectionAux<<<{"description": "Projects a scalar coefficient onto a scalar MFEM auxvariable", "href": "MFEMScalarProjectionAux.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = J
coefficient<<<{"description": "Name of the scalar coefficient to project. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number."}>>> = J_source
[]
[GAz]
type = MFEMGradAux<<<{"description": "Calculates the gradient of an H1 conforming source variable and stores the result on an H(curl) conforming ND result auxvariable", "href": "MFEMGradAux.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = GAz
source<<<{"description": "Scalar H1 MFEMVariable to take the gradient of."}>>> = Az
[]
[GAz(copy)]
type = MFEMVectorProjectionAux<<<{"description": "Projects a vector coefficient $\\vec u$, optionally scaled by a scalar coefficient $k$, onto a vector MFEM auxvariable, storing $k \\vec u$.", "href": "MFEMVectorProjectionAux.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = GAz(copy)
vector_coefficient<<<{"description": "Name of the vector coefficient to project. 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)."}>>> = GAz
[]
[](test/tests/mfem/auxkernels/projection.i)Scaling of the projected vector coefficient by scalar coefficients, including one taking the value of a postprocessor, is shown below:
[AuxKernels<<<{"href": "../../../syntax/AuxKernels/index.html"}>>>]
[copy]
type = MFEMVectorProjectionAux<<<{"description": "Projects a vector coefficient $\\vec u$, optionally scaled by a scalar coefficient $k$, onto a vector MFEM auxvariable, storing $k \\vec u$.", "href": "MFEMVectorProjectionAux.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = unscaled
vector_coefficient<<<{"description": "Name of the vector coefficient to project. 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)."}>>> = source_field
[]
[scale_by_function]
type = MFEMVectorProjectionAux<<<{"description": "Projects a vector coefficient $\\vec u$, optionally scaled by a scalar coefficient $k$, onto a vector MFEM auxvariable, storing $k \\vec u$.", "href": "MFEMVectorProjectionAux.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = function_scaled
vector_coefficient<<<{"description": "Name of the vector coefficient to project. 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)."}>>> = source_field
coefficient<<<{"description": "Name of the scalar coefficient k to scale the vector coefficient by. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number."}>>> = ramp
[]
[scale_by_postprocessor]
type = MFEMVectorProjectionAux<<<{"description": "Projects a vector coefficient $\\vec u$, optionally scaled by a scalar coefficient $k$, onto a vector MFEM auxvariable, storing $k \\vec u$.", "href": "MFEMVectorProjectionAux.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = postprocessor_scaled
vector_coefficient<<<{"description": "Name of the vector coefficient to project. 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)."}>>> = source_field
coefficient<<<{"description": "Name of the scalar coefficient k to scale the vector coefficient by. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number."}>>> = DummyComparison
[]
[complex_scale_by_function]
type = MFEMComplexVectorProjectionAux<<<{"description": "Projects a real and imaginary vector coefficient, optionally scaled by a real scalar coefficient, onto a complex vector MFEM auxvariable.", "href": "MFEMComplexVectorProjectionAux.html"}>>>
variable<<<{"description": "The name of the variable that this object applies to"}>>> = complex_function_scaled
vector_coefficient_real<<<{"description": "Name of the real part of the vector coefficient to project. 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)."}>>> = source_field
vector_coefficient_imag<<<{"description": "Name of the imaginary part of the vector coefficient to project. 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)."}>>> = imag_source
coefficient<<<{"description": "Name of the real scalar coefficient k to scale both parts of the vector coefficient by. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number."}>>> = ramp
[]
[](test/tests/mfem/auxkernels/scaledvector.i)Input Parameters
- coefficient1.Name of the scalar coefficient k to scale the vector coefficient 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 the scalar coefficient k to scale the vector coefficient by. A functor is any of the following: a variable, an MFEM material property, a function, a postprocessor or a number.
- 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
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.
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.