10#ifdef MOOSE_MFEM_ENABLED
18#include "mfem/fem/fespace.hpp"
27 const std::vector<Point> & points)
29 _var(*getMFEMProblem().getGridFunction(_var_name)),
30 _interp_vals(points.size())
33 const auto val_dim =
_var.VectorDim();
34 for (
const auto i : make_range(val_dim))
37 declared.resize(points.size());
45 return _var.FESpace()->FEColl()->GetContType();
59 const auto val_dims =
_var.VectorDim();
61 const auto val_fespace_ordering =
_var.FESpace()->GetOrdering();
62 for (
const auto i_dim : make_range(val_dims))
63 for (
const auto i_point : make_range(num_points))
mfem::FindPointsGSLIB _finder
GSLIB point finder used to locate and interpolate the query points.
std::vector< std::reference_wrapper< VectorPostprocessorValue > > _declared_points
Declared VPP output vectors for spatial coordinates ("x_0", "x_1", ...).
Base class for sampling real or complex MFEM variables at points.
static InputParameters validParams()
const VariableName _var_name
Name of the variable being sampled.
int getFESpaceContinuityType() const override
Return the continuity type of the sampled variable's finite element collection.
void execute() override
Interpolate the real variable at all query points.
mfem::Vector _interp_vals
Values interpolated from the grid function.
static InputParameters validParams()
const mfem::GridFunction & _var
Grid function being sampled.
std::vector< std::reference_wrapper< VectorPostprocessorValue > > _declared_vals
VectorPostprocessor output columns for the variable components.
MFEMVariableValueSamplerBase(const InputParameters ¶meters, const std::vector< Point > &points)
void finalizeValues() override
Copies interpolated values into the subclass VPP vectors.
VectorPostprocessorValue & declareVector(const std::string &vector_name)
Register a new vector to fill up.
std::size_t MFEMIndex(const std::size_t i_dim, const std::size_t i_point, const std::size_t num_dims, const std::size_t num_points, const mfem::Ordering::Type ordering)
Convert an index of a vector of libMesh::Points to an MFEM vector index, given an MFEM ordering.