STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::namelist::RandomControls Class Reference

Object to encapsulate random number generation controls. Like other namelist encapsualtors, this object can take input file data as part of its construction, or by a series of setters. Validation of each piece of data is handled as it appears either in the contructor or via setters. Getter functions dispense the internal information to any application using STORMM libraries. More...

#include <nml_random.h>

Public Member Functions

int getRandomSeed () const
 Get the random seed supplied (and possibly, as corrected) from user input.
 
int getStreamCount () const
 Get the number of random streams.
 
int getProductionStride () const
 Get the quantity of random numbers produced, per stream, each time a cache is filled.
 
int getWarmupCycleCount () const
 Get the number of warmup cycles for the prime stream generator.
 
const NamelistEmulatorgetTranscript () const
 Get the original namelist emulator object as a transcript of the user input.
 
void setRandomSeed (const int igseed_in)
 Set the random seed.
 
void setStreamCount (const int streams_in)
 Set the quantity of random number streams.
 
void setProductionStride (const int stride_in)
 Set the random number production batch size, the quantity of random numbers that each stream will produce each time a cache is filled.
 
void setWarmupCycles (const int cycles_in)
 Set the number of warmup cycles through which to process the prime stream's random generator state prior to producing numbers in that stream or spawning new streams.
 
 RandomControls (ExceptionResponse policy_in=ExceptionResponse::DIE, WrapTextSearch wrap=WrapTextSearch::NO)
 The constructor can prepare an object with default settings or read the corresponding namelist to accept user input.
 
 RandomControls (const TextFile &tf, int *start_line, bool *found_nml, ExceptionResponse policy_in=ExceptionResponse::DIE, WrapTextSearch wrap=WrapTextSearch::NO)
 
 RandomControls (const RandomControls &original)=default
 As with other control objects, copy and move constructors, plus copy and move assignment operators, can all take their default forms.
 
 RandomControls (RandomControls &&original)=default
 
RandomControlsoperator= (const RandomControls &original)=default
 
RandomControlsoperator= (RandomControls &&original)=default
 

Detailed Description

Object to encapsulate random number generation controls. Like other namelist encapsualtors, this object can take input file data as part of its construction, or by a series of setters. Validation of each piece of data is handled as it appears either in the contructor or via setters. Getter functions dispense the internal information to any application using STORMM libraries.

Constructor & Destructor Documentation

◆ RandomControls()

stormm::namelist::RandomControls::RandomControls ( ExceptionResponse policy_in = ExceptionResponse::DIE,
WrapTextSearch wrap = WrapTextSearch::NO )

The constructor can prepare an object with default settings or read the corresponding namelist to accept user input.

Parameters
tfInput file translated into RAM
start_lineLine of the input file to begin searching for the &solvent namelist
found_nmlIndication that the namelist was found (passed back to calling function)
policy_inRequested error handling behavior
wrapIndicate that the search for a &random namelist should carry on from the beginning of an input file if no such namelist is found starting from the original starting point

Member Function Documentation

◆ setProductionStride()

void stormm::namelist::RandomControls::setProductionStride ( const int stride_in)

Set the random number production batch size, the quantity of random numbers that each stream will produce each time a cache is filled.

Parameters
stride_inThe requested stride size

◆ setRandomSeed()

void stormm::namelist::RandomControls::setRandomSeed ( const int igseed_in)

Set the random seed.

Parameters
igseed_inThe new choice of random seed (will be checked for validity)

◆ setStreamCount()

void stormm::namelist::RandomControls::setStreamCount ( const int streams_in)

Set the quantity of random number streams.

Parameters
streams_inThe requested number of streams

◆ setWarmupCycles()

void stormm::namelist::RandomControls::setWarmupCycles ( const int cycles_in)

Set the number of warmup cycles through which to process the prime stream's random generator state prior to producing numbers in that stream or spawning new streams.

Parameters
cycles_inRequested number of cycles

The documentation for this class was generated from the following files: