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 (const RandomInterface &object, const Moose::Kokkos::FunctorCopy &key) | |
| Special constructor used for Kokkos functor copy during parallel dispatch. More... | |
| ~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 | ( | const RandomInterface & | object, |
| const Moose::Kokkos::FunctorCopy & | key | ||
| ) |
Special constructor used for Kokkos functor copy during parallel dispatch.
Definition at line 45 of file RandomInterface.C.
| RandomInterface::~RandomInterface | ( | ) |
Definition at line 59 of file RandomInterface.C.
|
inline |
Definition at line 73 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 84 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 98 of file RandomInterface.C.
|
inline |
Definition at line 75 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 76 of file RandomInterface.C.
|
inline |
Definition at line 74 of file RandomInterface.h.
Referenced by ElementValueSampler::ElementValueSampler(), and NodalValueSampler::NodalValueSampler().
| void RandomInterface::setRandomDataPointer | ( | RandomData * | random_data | ) |
Definition at line 69 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 62 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(), AuxKernelBase::validParams(), and MaterialBase::validParams().
|
private |
Definition at line 91 of file RandomInterface.h.
Referenced by getRandomLong(), and getRandomReal().
|
private |
Definition at line 90 of file RandomInterface.h.
Referenced by getRandomLong(), and getRandomReal().
|
mutableprivate |
Definition at line 81 of file RandomInterface.h.
Referenced by getRandomLong(), getRandomReal(), and setRandomDataPointer().
|
private |
Definition at line 87 of file RandomInterface.h.
Referenced by getRandomLong(), getRandomReal(), and isNodal().
|
private |
Definition at line 86 of file RandomInterface.h.
Referenced by getMasterSeed().
|
private |
Definition at line 80 of file RandomInterface.h.
Referenced by getSeed(), and setRandomDataPointer().
|
private |
Definition at line 88 of file RandomInterface.h.
Referenced by getResetOnTime(), and setRandomResetFrequency().
|
private |
Definition at line 84 of file RandomInterface.h.
Referenced by setRandomResetFrequency().
|
private |
Definition at line 83 of file RandomInterface.h.
Referenced by setRandomResetFrequency().
1.8.14