cideMOD.cell.warehouse

Functions

total_size(o[, handlers])

Returns the approximate memory footprint an object and all of its contents.

Classes

Warehouse(save_path, problem[, delay])

class cideMOD.cell.warehouse.Warehouse(save_path, problem, delay=1)[source]

Bases: object

add_global_variable(name)[source]
add_global_variable_info(name: str, fnc, header=None, default=False, dtype='scalar', postprocessing_fnc=None, fmt='%1.8e') None[source]
add_internal_variable(name)[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

clean()[source]
get_global_variable(name: str)[source]
get_global_variable_fnc(name: str)[source]
get_global_variable_value(name: str)[source]
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.

set_storing_time(times, deactivate_delay=True)[source]

This method specify the points in time where the internal variables are stored.

setup()[source]

This method prepare the outputs to be stored

setup_internal_variable(name, source, length=None)[source]
store(time, force=False)[source]
write_globals(clean=True, timings=False, individual_txt=True, sep='\t')[source]
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}