10#ifdef MOOSE_MFEM_ENABLED
27 return const_cast<mfem::ParMesh &
>(
28 problem.getMFEMVariableMesh(parameters.
get<VariableName>(
"variable")));
36 MFEMExecutedObject::addRequiredDependencyParam<VariableName>(
37 params,
"variable",
"The variable that this VectorPostprocessor samples");
38 MooseEnum avg_type(getL2AverageTypeOptions(),
"ARITHMETIC");
41 "Average type used when sampling L2 functions at element boundaries.");
46 const std::vector<Point> & points)
48 _var_name(getParam<VariableName>(
"variable"))
50 _finder.SetL2AvgType(
static_cast<mfem::FindPointsGSLIB::AvgType
>(
51 getParam<MooseEnum>(
"side_interpolation_type").getEnum<L2AverageType>()));
60 if (continuity_type == mfem::FiniteElementCollection::CONTINUOUS)
63 const auto & point_codes =
_finder.GetCode();
66 switch (continuity_type)
68 case mfem::FiniteElementCollection::DISCONTINUOUS:
70 " found a point on an element boundary but the FE space is discontinuous at "
71 "element boundaries: ",
75 case mfem::FiniteElementCollection::TANGENTIAL:
79 " on an element boundary. The H(curl) finite element space has a continuous "
80 "tangential trace there, but the normal component may differ between "
81 "elements. The element selected by GSLIB will supply the sampled value.");
83 case mfem::FiniteElementCollection::NORMAL:
87 " on an element boundary. The H(div) finite element space has a continuous "
88 "normal trace there, but the tangential component may differ between "
89 "elements. The element selected by GSLIB will supply the sampled value.");
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
CreateMooseEnumClass(Mortar3DSubpatchPlane, GEOMETRIC_NORMAL, AVERAGED_NODAL_NORMAL)
Abstract base class for sampling MFEM quantities at points.
mfem::FindPointsGSLIB _finder
GSLIB point finder used to locate and interpolate the query points.
static InputParameters validParams()
PointLocationCode
Classification returned by GSLIB for a query point's location.
const std::vector< Point > _query_points
Original query points used for point-location diagnostics.
void initialSetup() override
Checks that all query points were found.
virtual int getFESpaceContinuityType() const =0
Return the continuity type of the sampled variable's finite element collection.
static InputParameters validParams()
void initialSetup() override
Checks point locations and warns when sampled components may be discontinuous at boundaries.
MFEMVariableSamplerBase(const InputParameters ¶meters, const std::vector< Point > &points)
std::string typeAndName() const
Get the class's combined type and name; useful in error handling.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Generic class for solving transient nonlinear problems.