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;
virtual ~Positions()=default
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.
virtual void execute() override
By default, we wont execute often but "executing" will mean loading the positions.
static InputParameters validParams()
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.
Reporter object that has a single execution of the "execute" method for for each execute flag...
void clearPositions()
Clear all positions vectors.
Positions objects are under the hood Reporters.
const Point & getPosition(unsigned int index, bool initial) const
Getter for a single position at a known index.
Positions(const InputParameters ¶meters)
void unrollMultiDPositions()
Unrolls the multi-dimensional position vectors.
bool _initialized
Whether the positions object has been initialized. This must be set by derived objects.
std::vector< std::vector< Point > > _positions_2d
2D storage for all the positions
unsigned int getNearestPositionIndex(const Point &target, bool initial) const
Find the nearest Position index for a given point.
std::vector< Point > & _positions
For now, only the 1D vector will be shared across all ranks.
bool initialized(bool initial) const
Whether the positions object has been initialized.
std::vector< std::vector< std::vector< Point > > > _positions_3d
3D storage for all the positions
unsigned int getNumPositions(bool initial=false) const
}
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 _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
virtual void jacobianSetup() override
Gets called just before the Jacobian is computed and before this object is asked to do its job...
std::unique_ptr< KDTree > _positions_kd_tree
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void meshChanged() override
By default, Positions will call initial setup on mesh changed.
const bool _need_sort
Whether positions should be sorted.
virtual void residualSetup() override
Gets called just before the residual is computed and before this object is asked to do its job...
virtual void finalize() override
In charge of reduction across all ranks & sorting for consistent output.
const std::vector< Point > *const _initial_positions
For initialization of the positions, another position reporter may be used.
const InputParameters & parameters() const
Get the parameters of the object.
bool arePositionsCoplanar() const
Report if the positions are co-planar or not.
Real getMinDistanceBetweenPositions() const
Find the minimum distance between positions.
const std::vector< std::vector< std::vector< std::vector< Point > > > > & getPositionsVector4D() const
virtual void initialize() override=0
In charge of computing / loading the positions.
virtual void initialSetup()
Gets called at the beginning of the simulation before this object is asked to do its job...
const std::vector< std::vector< Point > > & getPositionsVector2D() const
std::vector< std::vector< std::vector< std::vector< Point > > > > _positions_4d
4D storage for all the positions : space & time