14#include "libmesh/mesh_base.h"
15#include "libmesh/elem.h"
23 params.
addClassDescription(
"Divide the mesh using a nearest-point / voronoi algorithm, with the "
24 "points coming from a Positions object");
26 "positions",
"The name of the Positions object to form the nearest-neighbor division with");
32 _nearest_positions_obj(&_fe_problem->getPositionsObject(getParam<PositionsName>(
"positions")))
const ExecFlagType EXEC_INITIAL
registerMooseObject("MooseApp", NearestPositionsDivision)
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
Base class for MeshDivision objects.
static InputParameters validParams()
Class constructor.
const FEProblemBase *const _fe_problem
Pointer to the problem, needed to retrieve pointers to various objects.
void setNumDivisions(const unsigned int ndivs)
Set the number of divisions.
bool _mesh_fully_indexed
Whether the mesh is fully covered / indexed, all elements and points have a valid index.
Divides the mesh based on a nearest-neighbor algorithm applied to the positions from a Positions obje...
static InputParameters validParams()
virtual void initialize() override
Set up any data members that would be necessary to obtain the division indices.
NearestPositionsDivision(const InputParameters ¶meters)
virtual unsigned int divisionIndex(const Point &pt) const override
Return the index of the division to which the point belongs.
const Positions *const _nearest_positions_obj
unsigned int getNearestPositionIndex(const Point &target, bool initial) const
Find the nearest Position index for a given point.
unsigned int getNumPositions(bool initial=false) const
}