14 #ifndef OHMMS_RANDOMNUMBERCONTROL_H__ 15 #define OHMMS_RANDOMNUMBERCONTROL_H__ 24 #include <libxml/xpath.h> 51 bool get(std::ostream& os)
const override;
52 bool put(std::istream& is)
override;
53 bool put(xmlNodePtr cur)
override;
54 void reset()
override;
static void read(const std::string &fname, Communicate *comm)
read in parallel or serial
helper functions for EinsplineSetBuilder
static void read_parallel(hdf_archive &hin, Communicate *comm)
read random state from a hdf file in parallel
bool NeverBeenInitialized
static PrimeNumberSet< uint_type > PrimeNumbers
initialize the static data members
std::vector< std::unique_ptr< T > > UPtrVector
static void write(const std::string &fname, Communicate *comm)
write in parallel or serial
xmlNodePtr initialize(xmlXPathContextPtr)
Declaration of OhmmsElementBase and define xml-related macros.
Wrapping information on parallelism.
void reset() override
reset the generator
static void write_parallel(const RefVector< RandomBase< FullPrecRealType >> &rng, hdf_archive &hout, Communicate *comm)
write random state to a hdf file in parallel
Abstract class to provide xml-compatible I/O interfaces for the derived classes.
QMCTraits::FullPrecRealType FullPrecRealType
RandomBase< FullPrecRealType >::uint_type uint_type
class RandomNumberControl
static UPtrVector< RandomBase< FullPrecRealType > > Children
std::vector< std::reference_wrapper< T > > RefVector
bool put(std::istream &is) override
generic input
QTFull::RealType FullPrecRealType
define a class to generate prime numbers for random number generators
static void write_rank_0(const RefVector< RandomBase< FullPrecRealType >> &rng, hdf_archive &hout, Communicate *comm)
rank 0 gathers the random states from all the other ranks and write them to a hdf file ...
static void make_seeds()
reset the generator
static void make_children()
Declare a global Random Number Generator.
RandomNumberControl(const char *aname="random")
constructors and destructors
static void read_rank_0(hdf_archive &hin, Communicate *comm)
rank 0 reads random states from a hdf file and distributes them to all the other ranks ...