21 "Sample one or more functors at points specified by a Positions object.");
24 "Positions object specifying the points where you want to evaluate the functors");
26 "functors",
"The functors we want to evaluate at the positions");
27 params.
addRequiredParam<
bool>(
"discontinuous",
"Indicate whether the functors are discontinuous");
34 _positions(_fe_problem.getPositionsObject(getParam<PositionsName>(
"positions")))
36 const auto & functor_names = getParam<std::vector<MooseFunctorName>>(
"functors");
37 for (
const auto & functor_name : functor_names)
38 _functors.push_back(&getFunctor<Real>(functor_name));
44 std::vector<std::string> functor_string_names;
45 for (
const auto & functor_name : functor_names)
46 functor_string_names.push_back(functor_name);
66 const auto old_size =
_points.size();
69 mooseError(
"The points array has grown since initialize() was called");
71 for (
const auto i : index_range(
_points))
91 for (
const auto j : index_range(
_functors))
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
const ExecFlagType EXEC_INITIAL
std::array< Real, 2 > values
registerMooseObject("MooseApp", PositionsFunctorValueSampler)
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
libMesh::BoundingBox getInflatedProcessorBoundingBox(Real inflation_multiplier=0.01) const
Get a (slightly inflated) processor bounding box.
Base class for sampling objects (variables, functors etc) at points.
std::vector< Point > _points
The points to evaluate at.
const Elem * getLocalElemContainingPoint(const Point &p)
Find the local element that contains the point.
std::vector< std::vector< Real > > _point_values
Vector of values per point.
const Real & _pp_value
Postprocessor multiplying the variables.
std::vector< short > _found_points
Whether or not the Point was found on this processor (short because bool and char don't work with MPI...
MooseMesh & _mesh
The Mesh we're using.
static InputParameters validParams()
bool _discontinuous_at_faces
Whether values are requested for objects that are discontinuous on faces.
virtual void initialize()
Called before execute() is ever called so that data can be cleared.
Samples one or more functor(s) at points given by a Positions object.
static InputParameters validParams()
PositionsFunctorValueSampler(const InputParameters ¶meters)
virtual void execute() override
Execute method.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
std::vector< const Moose::Functor< Real > * > _functors
Functors to sample.
const Positions & _positions
Positions to sample the functors at.
const std::vector< Point > & getPositions(bool initial) const
{ Getters for the positions vector for the desired dimension 1D will be the only one guaranteed to su...
void setupVariables(const std::vector< std::string > &variable_names)
You MUST call this in the constructor of the child class and pass down the name of the variables.
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
A structure that is used to evaluate Moose functors at an arbitrary physical point contained within a...