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");
72 for (
auto i : make_range(n_positions))
registerMooseObject("MooseApp", FunctorPositions)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
const ExecFlagType EXEC_TIMESTEP_BEGIN
const ExecFlagType EXEC_LINEAR
A MultiMooseEnum object to hold "execute_on" flags.
virtual MooseMesh & mesh() override
Positions from groups of three functors.
FunctorPositions(const InputParameters ¶meters)
static InputParameters validParams()
void initialize() override
In charge of computing / loading the positions.
std::vector< const Moose::Functor< Real > * > _pos_functors
Vector of pointers to the functors for each coordinate (inner-ordering is coordinates)
const std::string & type() const
Get the type of this class.
const std::string & name() const
Get the name of the class.
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 ...
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
void errorIfDistributedMesh(std::string name) const
Generate a unified error message if the underlying libMesh mesh is a DistributedMesh.
An interface for accessing Moose::Functors for systems that do not care about automatic differentiati...
static InputParameters validParams()
Positions objects are under the hood Reporters.
void clearPositions()
Clear all positions vectors.
std::vector< Point > & _positions
For now, only the 1D vector will be shared across all ranks.
static InputParameters validParams()
virtual void finalize() override
In charge of reduction across all ranks & sorting for consistent output.
bool _initialized
Whether the positions object has been initialized. This must be set by derived objects.
virtual MooseMesh & mesh()=0
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
SubProblem & _subproblem
Reference to the Subproblem for this user 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...