22 params.
addParam<
unsigned int>(
"seed", 0,
"The seed for the master random number generator");
32 : _random_data(nullptr),
35 _ri_name(parameters.getObjectName()),
36 _master_seed(parameters.get<unsigned
int>(
"seed")),
39 _curr_node(problem.assembly(tid, 0).node()),
40 _curr_element(problem.assembly(tid, 0).elem())
44#ifdef MOOSE_KOKKOS_ENABLED
46 : _random_data(object._random_data),
47 _generator(object._generator),
48 _ri_problem(object._ri_problem),
49 _ri_name(object._ri_name),
50 _master_seed(object._master_seed),
51 _is_nodal(object._is_nodal),
52 _reset_on(object._reset_on),
53 _curr_node(object._curr_node),
54 _curr_element(object._curr_element)
86 mooseAssert(
_generator,
"Random Generator is NULL, did you call setRandomResetFrequency()?");
100 mooseAssert(
_generator,
"Random Generator is NULL, did you call setRandomResetFrequency()?");
const ExecFlagType EXEC_LINEAR
void ErrorVector unsigned int
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
void registerRandomInterface(RandomInterface &random_interface, const std::string &name)
Class for containing MooseEnum item information.
static Real rand()
This method returns the next random number (Real format) from the generator.
static uint32_t randl()
This method returns the next random number (long format) from the generator.
MooseRandom & getGenerator()
Return the underlying MooseRandom generator object for this data instance.
unsigned int getSeed(dof_id_type id)
Get the seed for the passed in elem/node id.
Interface for objects that need parallel consistent random numbers without patterns over the course o...
const Elem *const & _curr_element
Real getRandomReal() const
Returns the next random number (Real) from the generator tied to this object (elem/node).
RandomInterface(const InputParameters ¶meters, FEProblemBase &problem, THREAD_ID tid, bool is_nodal)
RandomData * _random_data
void setRandomResetFrequency(ExecFlagType exec_flag)
This interface should be called from a derived class to enable random number generation in this objec...
const std::string _ri_name
unsigned int getSeed(std::size_t id)
Get the seed for the passed in elem/node id.
static InputParameters validParams()
unsigned long getRandomLong() const
Returns the next random number (long) from the generator tied to this object (elem/node).
const Node *const & _curr_node
FEProblemBase & _ri_problem
void setRandomDataPointer(RandomData *random_data)