Added new reading routines (engine state,

4d double, 4d int); fixed error in RestartInfo
output; added the maximum length of the engine
state string into sim_constants.h
This commit is contained in:
2024-08-27 14:46:48 +02:00
parent c14a5245b1
commit c33629cb88
6 changed files with 165 additions and 13 deletions
+3
View File
@@ -9,9 +9,12 @@ class Hdf5Reader {
Hdf5Reader(std::string directory, std::string filename);
Hdf5Reader(std::string absolute_filename);
blitz::Array<double, 4> readD4Double(std::string path);
blitz::Array<double, 3> readD3Double(std::string path);
blitz::Array<double, 2> readD2Double(std::string path);
blitz::Array<double, 1> readD1Double(std::string path);
std::stringstream readEngineString(std::string path);
blitz::Array<long int, 4> readD4LongInt(std::string path);
private:
std::string absolute_filename_;
+1 -3
View File
@@ -24,11 +24,9 @@ class Hdf5Writer {
void write(const std::string& data, std::string path);
void writeRNG(const std::string& data, std::string path_base);
// void writeRNG(const std::string path_base);
std::string AbsoluteFileName() const;
private:
// right now from observations of the size of the statestring, whether best choice: uncertain
// also not sure if this length is platform-independent
const size_t stateStringSizeMax_ = 6730;
std::string absolute_filename_;
void createFolder(std::string directory);
void createFile(std::string absolute_filename);
+4
View File
@@ -10,6 +10,10 @@ static const double minimal_macroscopic_cross_section =
std::numeric_limits<double>::min() * 1E5;
static const double random_lower_limit = 1E-15;
static const double compare_epsilon = 1E-10;
// maximum length for the string produced by the "<<"-operator
// of the mt19973 engine. ("empirical" value, might be too low,
// or depend on the system)
static const size_t engine_string_length_max = 6730;
} // namespace SimConstants