22 params.
addParam<
unsigned int>(
"seed", 0,
"The seed for the master random number generator");
32 : _random_data(nullptr),
35 _ri_name(parameters.
get<
std::string>(
"_object_name")),
36 _master_seed(parameters.
get<unsigned
int>(
"seed")),
39 _curr_node(problem.assembly(tid, 0).node()),
40 _curr_element(problem.assembly(tid, 0).elem())
71 mooseAssert(
_generator,
"Random Generator is NULL, did you call setRandomResetFrequency()?");
85 mooseAssert(
_generator,
"Random Generator is NULL, did you call setRandomResetFrequency()?");
static uint32_t randl()
This method returns the next random number (long format) from the generator.
unsigned long getRandomLong() const
Returns the next random number (long) from the generator tied to this object (elem/node).
RandomInterface(const InputParameters ¶meters, FEProblemBase &problem, THREAD_ID tid, bool is_nodal)
const Node *const & _curr_node
RandomData * _random_data
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
void registerRandomInterface(RandomInterface &random_interface, const std::string &name)
unsigned int getSeed(std::size_t id)
Get the seed for the passed in elem/node id.
void setRandomResetFrequency(ExecFlagType exec_flag)
This interface should be called from a derived class to enable random number generation in this objec...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const std::string _ri_name
static InputParameters validParams()
const Elem *const & _curr_element
const ExecFlagType EXEC_LINEAR
FEProblemBase & _ri_problem
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Class for containing MooseEnum item information.
void setRandomDataPointer(RandomData *random_data)
unsigned int getSeed(dof_id_type id)
Get the seed for the passed in elem/node id.
static Real rand()
This method returns the next random number (Real format) from the generator.
MooseRandom & getGenerator()
Return the underlying MooseRandom generator object for this data instance.
void ErrorVector unsigned int
Real getRandomReal() const
Returns the next random number (Real) from the generator tied to this object (elem/node).