21 std::ofstream m_global_ini_file_content;
22 std::vector<std::string> m_save_fields{
"Temperature"};
23 void gatherIniFileContent(
45 if (sim->m_simulation_config.getStringParameters(
"snapshot_save_file") ==
"None")
50 m_global_ini_file_content.open(
51 sim->m_simulation_config.getStringParameters(
"snapshot_save_file"),
52 std::ios::binary | std::ios::out | std::ios::trunc);
56 std::unordered_map<std::string, std::any>
ini_file_content{sim->m_simulation_config.data()};
59 m_global_ini_file_content <<
"SimulationConfig" <<
"$" <<
key <<
" = "
64 m_global_ini_file_content.close();
65 std::cout <<
"\033[32m[SnapshotCreator] Successfully created snapshot file!\033[0m\n";
82 m_global_ini_file_content <<
"FIELDDATA:\n";
85 m_global_ini_file_content <<
field_name <<
"," << sim->elapsed_time <<
",";
89 m_global_ini_file_content <<
field[
i] << std::setprecision(15) <<
",";
91 m_global_ini_file_content <<
field[
field.
size() - 1] << std::setprecision(15) <<
"\n";
93 m_global_ini_file_content <<
"INIFILEDATA:\n";
109 module->writeToGlobalIniContent(m_global_ini_file_content);
114 submodule->writeToGlobalIniContent(m_global_ini_file_content);
Concrete implementation of a matrix class representing a Compressed Sparse Rows (CSR) matrix....
Definition CsrMatrix.h:35
CsrSparseMatrix()
Constructor for an empty CsrSparseMatrix object. Leaves all storage arrays empty but sets the flag to...
Definition CsrMatrix.h:92
std::pair< int, int > size() const
Function that returns the size of the matrix as a pair in (rows, columns) format.
Definition GenericMatrix.h:118
Class which creates MoCSI snapshot files. Saves all the specified fields from m_save_fields and all t...
Definition SnapshotCreator.h:19
SnapshotCreator(SimulationClassBase< T > *sim, std::vector< std::shared_ptr< GenericManagingModule< double > > > &all_modules, std::vector< std::shared_ptr< GenericSubmodule< double > > > &all_submodules)
Constructor of the Snapshot Creator.
Definition SnapshotCreator.h:38