porepy.viz.data_saving_model_mixin module
This mixin class is used to save data from a model to file.
It is combined with a Model class and provides methods for saving data to file.
We provide basic Exporter functionality, but the user is free to override and extend this class to suit their needs. This could include, e.g., saving data to a database, or to a file format other than vtu.
- class DataSavingMixin[source]
Bases:
object
Class for saving data from a simulation model.
- Contract with other classes:
The model should/may call save_data_time_step() at the end of each time step. The model should/may call finalize_save_data() at the end of the simulation.
- data_to_export()[source]
Return data to be exported.
Return type should comply with pp.exporter.DataInput.
- Returns
List containing all variable names.
- initialize_data_saving()[source]
Initialize data saving.
This method is called by
prepare_simulation()
to initialize the exporter, and any other data saving functionality (e.g., empty data containers to be appended insave_data_time_step()
).- Return type
None
- equation_system: EquationSystem
Equation system manager.
- mdg: MixedDimensionalGrid
Mixed dimensional grid for the simulation.
- time_manager: TimeManager
Time manager for the simulation.