cideMOD.cell.warehouse
Functions
|
Returns the approximate memory footprint an object and all of its contents. |
Classes
|
- class cideMOD.cell.warehouse.Warehouse(save_path, problem, delay=1)[source]
Bases:
object- add_global_variable_info(name: str, fnc, header=None, default=False, dtype='scalar', postprocessing_fnc=None, fmt='%1.8e') None[source]
- add_internal_variable_info(name: str, subdomains: str, dtype: str = 'scalar', function_space: str = 'P1', default=False, postprocessing_fnc=None)[source]
- check_globals_memory_size(estimate=True)[source]
Returns memory size of stored global variables in MB
- Parameters:
estimate (bool, optional) – Wether to do a fast estimate or the slow exact measure, by default True
- Returns:
memory size in MB
- Return type:
float
- reset(save_path=None, deep_reset=False)[source]
This method resets the warehouse in order to be ready for running another simulation with the same configuration.
- Parameters:
save_path (str, optional) – Path to the new results folder.
deep_reset (bool) – Whether or not a deep reset will be performed. It means that the Problem setup stage will be run again as the mesh has been changed. Default to False.
- set_delay(delay)[source]
This method set the delay between timestep where the internal variables are stored. If delay <= 0 they are not stored. If delay is 0, it is posible to force the storage.
- cideMOD.cell.warehouse.total_size(o, handlers={})[source]
Returns the approximate memory footprint an object and all of its contents.
Automatically finds the contents of the following builtin containers and their subclasses: tuple, list, deque, dict, set and frozenset. To search other containers, add handlers to iterate over their contents:
- handlers = {SomeContainerClass: iter,
OtherContainerClass: OtherContainerClass.get_elements}