33 const bool mesh_is_serial =
mesh.is_serial();
36 if (it ==
end && mesh_is_serial)
45 libmesh_assert_greater (n, 0);
48 LOG_SCOPE (
"partition_range()",
"LinearPartitioner");
51 std::set<dof_id_type> element_ids;
58 (std::distance(it,
end) / n);
64 elem->processor_id() = cast_int<processor_id_type>(e/blksize);
66 elem->processor_id() = 0;
81 element_ids.insert(elem->id());
83 mesh.comm().set_union(element_ids);
89 for (
auto eid : element_ids)
91 Elem * elem =
mesh.query_elem_ptr(eid);
95 elem->
processor_id() = cast_int<processor_id_type>(e/blksize);
108 const unsigned int n)
111 mesh.active_elements_begin(),
112 mesh.active_elements_end(),
The base class for all geometric element types.
void single_partition_range(MeshBase::element_iterator it, MeshBase::element_iterator end)
SimpleRange< I > as_range(const std::pair< I, I > &p)
virtual void partition_range(MeshBase &mesh, MeshBase::element_iterator it, MeshBase::element_iterator end, const unsigned int n) override
processor_id_type processor_id() const
virtual void _do_partition(MeshBase &mesh, const unsigned int n) override