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")))
registerMooseObject("MooseApp", NearestPositionsDivision)
virtual void initialize() override
Set up any data members that would be necessary to obtain the division indices.
NearestPositionsDivision(const InputParameters ¶meters)
const ExecFlagType & getCurrentExecuteOnFlag() const
Return/set the current execution flag.
static InputParameters validParams()
Divides the mesh based on a nearest-neighbor algorithm applied to the positions from a Positions obje...
Base class for MeshDivision objects.
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
}
bool _mesh_fully_indexed
Whether the mesh is fully covered / indexed, all elements and points have a valid index...
void setNumDivisions(const unsigned int ndivs)
Set the number of divisions.
const FEProblemBase *const _fe_problem
Pointer to the problem, needed to retrieve pointers to various objects.
const Positions *const _nearest_positions_obj
static InputParameters validParams()
Class constructor.
virtual unsigned int divisionIndex(const Point &pt) const override
Return the index of the division to which the point belongs.
const ExecFlagType EXEC_INITIAL