21 "positions_functors",
"Functors providing the XYZ coordinates of the positions");
23 params.
set<
bool>(
"auto_sort") =
false;
25 params.
set<
bool>(
"auto_broadcast") =
false;
30 "Computes positions from groups of three functors specified by the user");
38 const auto & functor_names = getParam<std::vector<MooseFunctorName>>(
"positions_functors");
41 if (functor_names.size() % 3 != 0)
43 "The list of functors must be divisible by three, the number of coordinates");
45 for (
const auto &
name : functor_names)
64 const Point p(0, 0, 0);
66 auto *
const elem = (*pl)(p);
68 mooseError(
"Origin point not in local mesh, cannot evaluate the functor there");
An interface for accessing Moose::Functors for systems that do not care about automatic differentiati...
A MultiMooseEnum object to hold "execute_on" flags.
static InputParameters validParams()
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
void clearPositions()
Clear all positions vectors.
static InputParameters validParams()
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
Positions objects are under the hood Reporters.
A structure that is used to evaluate Moose functors at an arbitrary physical point contained within a...
bool _initialized
Whether the positions object has been initialized. This must be set by derived objects.
void errorIfDistributedMesh(std::string name) const
Generate a unified error message if the underlying libMesh mesh is a DistributedMesh.
FunctorPositions(const InputParameters ¶meters)
const std::string & name() const
Get the name of the class.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
std::vector< const Moose::Functor< Real > * > _pos_functors
Vector of pointers to the functors for each coordinate (inner-ordering is coordinates) ...
const ExecFlagType EXEC_TIMESTEP_BEGIN
void initialize() override
In charge of computing / loading the positions.
std::vector< Point > & _positions
For now, only the 1D vector will be shared across all ranks.
const std::string & type() const
Get the type of this class.
const ExecFlagType EXEC_LINEAR
registerMooseObject("MooseApp", FunctorPositions)
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
IntRange< T > make_range(T beg, T end)
virtual MooseMesh & mesh() override
virtual void finalize() override
In charge of reduction across all ranks & sorting for consistent output.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
static InputParameters validParams()
Positions from groups of three functors.