Go to the documentation of this file.
16 #include "libmesh/elem.h"
27 params.
addParam<
unsigned int>(
"seed", 0,
"Seed for the random generator");
42 std::unique_ptr<Partitioner>
45 return libmesh_make_unique<RandomPartitioner>(
_pars);
52 for (
auto & elem_ptr : mesh.active_element_ptr_range())
virtual ~RandomPartitioner()
Partitions a mesh randomly using element ids as the seed for the generator.
RandomPartitioner(const InputParameters ¶ms)
static double rand()
This method returns the next random number (double format) from the generator.
static void seed(unsigned int seed)
The method seeds the random number generator.
static InputParameters validParams()
virtual std::unique_ptr< Partitioner > clone() const override
const unsigned int _num_procs
Total number of processors.
virtual void _do_partition(MeshBase &mesh, const unsigned int n) override
static InputParameters validParams()
Base class for MOOSE partitioner.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
defineLegacyParams(RandomPartitioner)
registerMooseObject("MooseApp", RandomPartitioner)