14 #include "libmesh/elem.h" 34 paramError(
"rank",
"Cannot be larger than the available number of MPI ranks");
37 std::unique_ptr<Partitioner>
46 for (
auto & elem_ptr :
mesh.active_element_ptr_range())
47 elem_ptr->processor_id() =
_rank;
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
static InputParameters validParams()
registerMooseObject("MooseApp", SingleRankPartitioner)
const Parallel::Communicator & _communicator
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
processor_id_type size() const
uint8_t processor_id_type
const processor_id_type _rank
Rank to assign every element to.
static InputParameters validParams()
MooseApp & _app
The MOOSE application this is associated with.
SingleRankPartitioner(const InputParameters ¶ms)
Base class for MOOSE partitioner.
virtual void _do_partition(MeshBase &mesh, const unsigned int n) override
Partitions a mesh to one MPI rank.
std::unique_ptr< T > clone(const T &object)
Clones the object object.
virtual std::unique_ptr< Partitioner > clone() const override