Interface for objects that need parallel consistent random numbers without patterns over the course of multiple runs. More...
#include <RandomInterface.h>
Public Member Functions | |
RandomInterface (const InputParameters ¶meters, FEProblemBase &problem, THREAD_ID tid, bool is_nodal) | |
~RandomInterface () | |
void | setRandomResetFrequency (ExecFlagType exec_flag) |
This interface should be called from a derived class to enable random number generation in this object. More... | |
unsigned long | getRandomLong () const |
Returns the next random number (long) from the generator tied to this object (elem/node). More... | |
Real | getRandomReal () const |
Returns the next random number (Real) from the generator tied to this object (elem/node). More... | |
unsigned int | getSeed (std::size_t id) |
Get the seed for the passed in elem/node id. More... | |
unsigned int | getMasterSeed () const |
bool | isNodal () const |
ExecFlagType | getResetOnTime () const |
void | setRandomDataPointer (RandomData *random_data) |
Static Public Member Functions | |
static InputParameters | validParams () |
Private Attributes | |
RandomData * | _random_data |
MooseRandom * | _generator |
FEProblemBase & | _ri_problem |
const std::string | _ri_name |
unsigned int | _master_seed |
bool | _is_nodal |
ExecFlagType | _reset_on |
const Node *const & | _curr_node |
const Elem *const & | _curr_element |
Interface for objects that need parallel consistent random numbers without patterns over the course of multiple runs.
Definition at line 28 of file RandomInterface.h.
RandomInterface::RandomInterface | ( | const InputParameters & | parameters, |
FEProblemBase & | problem, | ||
THREAD_ID | tid, | ||
bool | is_nodal | ||
) |
Definition at line 28 of file RandomInterface.C.
RandomInterface::~RandomInterface | ( | ) |
Definition at line 44 of file RandomInterface.C.
|
inline |
Definition at line 66 of file RandomInterface.h.
unsigned long RandomInterface::getRandomLong | ( | ) | const |
Returns the next random number (long) from the generator tied to this object (elem/node).
Definition at line 69 of file RandomInterface.C.
Real RandomInterface::getRandomReal | ( | ) | const |
Returns the next random number (Real) from the generator tied to this object (elem/node).
Definition at line 83 of file RandomInterface.C.
|
inline |
Definition at line 68 of file RandomInterface.h.
unsigned int RandomInterface::getSeed | ( | std::size_t | id | ) |
Get the seed for the passed in elem/node id.
id | - dof object id |
Definition at line 61 of file RandomInterface.C.
|
inline |
Definition at line 67 of file RandomInterface.h.
Referenced by ElementValueSampler::ElementValueSampler(), and NodalValueSampler::NodalValueSampler().
void RandomInterface::setRandomDataPointer | ( | RandomData * | random_data | ) |
Definition at line 54 of file RandomInterface.C.
Referenced by FEProblemBase::registerRandomInterface().
void RandomInterface::setRandomResetFrequency | ( | ExecFlagType | exec_flag | ) |
This interface should be called from a derived class to enable random number generation in this object.
Definition at line 47 of file RandomInterface.C.
|
static |
Definition at line 18 of file RandomInterface.C.
Referenced by NodalUserObject::validParams(), ElementUserObject::validParams(), ResidualObject::validParams(), LinearSystemContributionObject::validParams(), DomainUserObject::validParams(), AuxKernelTempl< Real >::validParams(), and MaterialBase::validParams().
|
private |
Definition at line 84 of file RandomInterface.h.
Referenced by getRandomLong(), and getRandomReal().
|
private |
Definition at line 83 of file RandomInterface.h.
Referenced by getRandomLong(), and getRandomReal().
|
mutableprivate |
Definition at line 74 of file RandomInterface.h.
Referenced by getRandomLong(), getRandomReal(), and setRandomDataPointer().
|
private |
Definition at line 80 of file RandomInterface.h.
Referenced by getRandomLong(), getRandomReal(), and isNodal().
|
private |
Definition at line 79 of file RandomInterface.h.
Referenced by getMasterSeed().
|
private |
Definition at line 73 of file RandomInterface.h.
Referenced by getSeed(), and setRandomDataPointer().
|
private |
Definition at line 81 of file RandomInterface.h.
Referenced by getResetOnTime(), and setRandomResetFrequency().
|
private |
Definition at line 77 of file RandomInterface.h.
Referenced by setRandomResetFrequency().
|
private |
Definition at line 76 of file RandomInterface.h.
Referenced by setRandomResetFrequency().