19 random_interface.isNodal(),
20 random_interface.getResetOnTime(),
21 random_interface.getMasterSeed())
29 : _rd_problem(fe_problem),
30 _rd_mesh(fe_problem.
mesh()),
34 _current_master_seed(
std::numeric_limits<unsigned
int>::
max()),
43 "Call to updateSeeds() is stale! Check your initialize() or timestepSetup() calls");
95 unsigned int parallel_seed = 0;
112 for (
const auto node_ptr :
115 auto id = node_ptr->id();
119 auto elem_id_it = node_to_elem.find(
id);
121 if (elem_id_it != node_to_elem.end())
123 for (
auto elem_id : elem_id_it->second)
125 const auto * elem_ptr =
mesh.elem_ptr(elem_id);
127 if (elem_ptr && processor_id == elem_ptr->processor_id())
144 auto id = elem_ptr->id();
148 if (processor_id == elem_ptr->processor_id())
Interface for objects that need parallel consistent random numbers without patterns over the course o...
static uint32_t randl()
This method returns the next random number (long format) from the generator.
std::unordered_map< dof_id_type, unsigned int > _seeds
void saveState()
This method saves the current state of all generators which can be restored at a later time (i...
unsigned int _master_seed
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
auto max(const L &left, const R &right)
uint8_t processor_id_type
processor_id_type n_processors() const
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
unsigned int _current_master_seed
void restoreState()
This method restores the last saved generator state.
virtual int & timeStep() const
const std::unordered_map< dof_id_type, std::vector< dof_id_type > > & nodeToElemMap()
If not already created, creates a map from every node to all elements to which they are connected...
Class for containing MooseEnum item information.
static void seed(unsigned int seed)
The method seeds the random number generator.
unsigned int getSeed(dof_id_type id)
Get the seed for the passed in elem/node id.
void updateSeeds(ExecFlagType exec_flag)
This method is called to reset or update the seeds based on the reset_on flag and the passed executio...
FEProblemBase & _rd_problem
processor_id_type processor_id() const
virtual bool isDistributedMesh() const
Returns the final Mesh distribution type.
RandomData(FEProblemBase &fe_problem, const RandomInterface &random_interface)
void ErrorVector unsigned int
const unsigned int MASTER
const ExecFlagType EXEC_INITIAL