30 const std::vector<Point> &
getPositions(
bool initial)
const;
39 mooseAssert(
initialized(initial),
"Position should be initialized");
44 const Point &
getPosition(
unsigned int index,
bool initial)
const;
Reporter object that has a single execution of the "execute" method for each execute flag.
const InputParameters & parameters() const
Get the parameters of the object.
Positions objects are under the hood Reporters.
bool initialized(bool initial) const
Whether the positions object has been initialized.
virtual ~Positions()=default
const Point & getPosition(unsigned int index, bool initial) const
Getter for a single position at a known index.
std::unique_ptr< KDTree > _positions_kd_tree
const bool _need_sort
Whether positions should be sorted.
const std::vector< Point > *const _initial_positions
For initialization of the positions, another position reporter may be used.
bool arePositionsCoplanar() const
Report if the positions are co-planar or not.
std::unique_ptr< KDTree > _initial_positions_kd_tree
KDTree to be able to find the nearest position to a point in a fast and scalable manner.
unsigned int getNearestPositionIndex(const Point &target, bool initial) const
Find the nearest Position index for a given point.
virtual void residualSetup() override
Gets called just before the residual is computed and before this object is asked to do its job.
virtual void meshChanged() override
By default, Positions will call initial setup on mesh changed.
unsigned int getNumPositions(bool initial=false) const
}
Real getMinDistanceBetweenPositions() const
Find the minimum distance between positions.
bool _need_broadcast
Whether generation of positions is distributed or not (and therefore needs a broadcast)
const std::vector< std::vector< std::vector< Point > > > & getPositionsVector3D() const
std::vector< std::vector< std::vector< std::vector< Point > > > > _positions_4d
4D storage for all the positions : space & time
std::vector< std::vector< Point > > _positions_2d
2D storage for all the positions
virtual void jacobianSetup() override
Gets called just before the Jacobian is computed and before this object is asked to do its job.
void clearPositions()
Clear all positions vectors.
const std::vector< std::vector< std::vector< std::vector< Point > > > > & getPositionsVector4D() const
const std::vector< std::vector< Point > > & getPositionsVector2D() const
virtual void initialize() override=0
In charge of computing / loading the positions.
virtual void timestepSetup() override
By default, Positions will not be modified very regularly.
const Point & getNearestPosition(const Point &target, bool initial) const
Find the nearest Position for a given point.
std::vector< Point > & _positions
For now, only the 1D vector will be shared across all ranks.
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 unrollMultiDPositions()
Unrolls the multi-dimensional position vectors.
static InputParameters validParams()
std::vector< std::vector< std::vector< Point > > > _positions_3d
3D storage for all the positions
virtual void execute() override
By default, we wont execute often but "executing" will mean loading the positions.
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 void initialSetup()
Gets called at the beginning of the simulation before this object is asked to do its job.