19 #ifndef LIBMESH_CENTROID_PARTITIONER_H 20 #define LIBMESH_CENTROID_PARTITIONER_H 83 virtual std::unique_ptr<Partitioner>
clone ()
const override 85 return libmesh_make_unique<CentroidPartitioner>(*this);
104 const unsigned int n)
override;
112 const unsigned int n)
override;
126 static bool sort_x (
const std::pair<Point, Elem *> & lhs,
127 const std::pair<Point, Elem *> & rhs);
133 static bool sort_y (
const std::pair<Point, Elem *> & lhs,
134 const std::pair<Point, Elem *> & rhs);
140 static bool sort_z (
const std::pair<Point, Elem *> & lhs,
141 const std::pair<Point, Elem *> & rhs);
147 static bool sort_radial (
const std::pair<Point, Elem *> & lhs,
148 const std::pair<Point, Elem *> & rhs);
164 #endif // LIBMESH_CENTROID_PARTITIONER_H
virtual void _do_partition(MeshBase &mesh, const unsigned int n) override
std::vector< std::pair< Point, Elem * > > _elem_centroids
Base class for all concrete Partitioner instantiations.
CentroidPartitioner & operator=(const CentroidPartitioner &)=default
virtual void partition_range(MeshBase &mesh, MeshBase::element_iterator it, MeshBase::element_iterator end, const unsigned int n) override
virtual ~CentroidPartitioner()=default
static bool sort_radial(const std::pair< Point, Elem *> &lhs, const std::pair< Point, Elem *> &rhs)
static bool sort_y(const std::pair< Point, Elem *> &lhs, const std::pair< Point, Elem *> &rhs)
void set_sort_method(const CentroidSortMethod sm)
CentroidSortMethod _sort_method
CentroidSortMethod sort_method() const
static bool sort_x(const std::pair< Point, Elem *> &lhs, const std::pair< Point, Elem *> &rhs)
virtual std::unique_ptr< Partitioner > clone() const override
static bool sort_z(const std::pair< Point, Elem *> &lhs, const std::pair< Point, Elem *> &rhs)
CentroidPartitioner(const CentroidSortMethod sm=X)
void compute_centroids(MeshBase::element_iterator it, MeshBase::element_iterator end)