37 m_reverse_index_initialized(false)
41 shared_ptr<SimShell::Session::ISession>
44 shared_ptr<Session::ISession> session;
45 auto prefs = MergedPreferences::Create(ws, proj);
50 session = make_shared<Session::SimSession>(prefs, sim_state);
52 catch (exception& e) {
53 throw Exception(
"Could not open \"" + m_path +
"\": " + e.what());
61 if (!m_reverse_index_initialized)
62 InitializeReverseIndex();
68 }
catch (exception& e) {
69 throw Exception(
"GetSimState(): Could not open \"" + m_path +
"\": " + e.what());
78 for (
auto& pair : tissue_file.
TimeSteps()) {
79 result.push_back(pair.first);
81 }
catch (exception& e) {
82 throw Exception(
"GetTimeSteps(): Could not open \"" + m_path +
"\": " + e.what());
87 void StartupFileHdf5::InitializeReverseIndex()
const
91 m_reverse_index[t] = i++;
93 m_reverse_index_initialized =
true;
Interface for Hdf5 tissue file format.
Namespace for miscellaneous utilities.
virtual std::vector< int > GetTimeSteps() const
Namespace for SimPT shell package.
StartupFileHdf5(const std::string &path)
Constructor.
Extremely simple Exception root class.
Interface for VirtualLeaf::Hdf5File.
Contains facilities for storing the simulation Mesh to HDF5 files.
std::vector< std::pair< int, double > > TimeSteps()
Reads the time steps contained in the HDF5 file.
Namespace for generic workspace classes.
virtual std::shared_ptr< SimShell::Session::ISession > CreateSession(std::shared_ptr< SimShell::Ws::IProject > proj, std::shared_ptr< SimShell::Ws::IWorkspace > ws) const
Interface for MergedPreferences.
bool Close()
Closes the HDF5 file associated with exporter, dissociates it from this exporter object and returns t...
Interfaces for simulator session.
Contains the state of the whole Simulator at a given simulation step.
virtual SimPT_Sim::SimState GetSimState(int timestep) const
Base class representing the file types used to initiate a session.
Header file for Exception class.