Skip to content

Conversation

@sniffo
Copy link
Contributor

@sniffo sniffo commented Dec 2, 2024

Changes the record class method in the History class such that it records the self.datasets[element] dataframes as entries in a dictionary with the time_stamp as keys that map to corresponding dataframe for each element.

The self.dicts property is introduced to account for this - this is a nested dictionary with the eptm.elements as keys and the above dictionaries as the values.

This allows for appending the dataframes at each time step without having to load onto memory the increasingly large self.datasets[element] dataframes.

The update_datasets class method is introduced in order to concatenate all the dataframes within self.datasets[element] at the end of the simulation.

This will be accompanied by changes to the EulerSolver.solve class method to run History.update_datasets at the final time point.

Changes the `record` class method in the History class such that it records the datasets dataframes as entries in a dictionary with the `time_stamp` as keys that map to corresponding dataframe for each element. 
The `self.dicts` property is introduced to account for this - this is a nested dictionary with the `eptm.elements` as keys and the above dictionaries as the values. 
This allows for appending the dataframes at each time step without having to load onto memory the increasingly large `self.datasets[element]` dataframes. 
The `update_datasets` class method is introduced in order to concatenate all the dataframes within `self.datasets[element]` at the end of the simulation. 
This will be accompanied by changes to the `EulerSolver` class method `solve` to run `History.update_datasets` athe the final time point.
Includes the `History.update_datasets` class method so that it runs at the last iteration of the `EulerSolver.solve` class method to generate the dataframes for History.datasets
edit record method to make simulations faster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant