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.
addParam<
bool>(
"discontinuous",
false,
"Indicate that the functors are discontinuous");
35 _positions(_fe_problem.getPositionsObject(getParam<PositionsName>(
"positions")))
37 const auto & functor_names = getParam<std::vector<MooseFunctorName>>(
"functors");
38 for (
const auto & functor_name : functor_names)
39 _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");
An interface for accessing Moose::Functors for systems that do not care about automatic differentiati...
registerMooseObject("MooseApp", PositionsFunctorValueSampler)
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
virtual void initialize()
Initialize the datastructures.
std::vector< Point > _points
The points to evaluate at.
Samples one or more functor(s) at points given by a Positions object.
A structure that is used to evaluate Moose functors at an arbitrary physical point contained within a...
const Positions & _positions
Positions to sample the functors at.
static InputParameters validParams()
std::vector< std::vector< Real > > _point_values
Vector of values per point.
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...
static InputParameters validParams()
const Elem * getLocalElemContainingPoint(const Point &p)
Find the local element that contains the point.
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...
std::vector< const Moose::Functor< Real > * > _functors
Functors to sample.
const Real & _pp_value
Postprocessor multiplying the variables.
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...
bool _discontinuous_at_faces
Whether values are requested for objects that are discontinuous on faces.
Base class for sampling objects (variables, functors etc) at points.
virtual void initialize() override
Initialize the datastructures.
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
libMesh::BoundingBox getInflatedProcessorBoundingBox(Real inflation_multiplier=0.01) const
Get a (slightly inflated) processor bounding box.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
MooseMesh & _mesh
The Mesh we're using.
virtual void execute() override
Execute method.
PositionsFunctorValueSampler(const InputParameters ¶meters)
auto index_range(const T &sizable)
const ExecFlagType EXEC_INITIAL