16#include "libmesh/elem.h"
25 params.
addParam<
unsigned int>(
"seed", 0,
"Seed for the random generator");
40std::unique_ptr<Partitioner>
50 for (
auto & elem_ptr :
mesh.active_element_ptr_range())
registerMooseObject("MooseApp", RandomPartitioner)
std::unique_ptr< T > clone(const T &object)
Clones the object object.
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
MooseApp & _app
The MOOSE application this is associated with.
Base class for MOOSE partitioner.
static InputParameters validParams()
static Real rand()
This method returns the next random number (Real format) from the generator.
static void seed(unsigned int seed)
The method seeds the random number generator.
Partitions a mesh randomly using element ids as the seed for the generator.
virtual void _do_partition(MeshBase &mesh, const unsigned int n) override
virtual std::unique_ptr< Partitioner > clone() const override
RandomPartitioner(const InputParameters ¶ms)
virtual ~RandomPartitioner()
static InputParameters validParams()
const unsigned int _num_procs
Total number of processors.