wolfgpu.simplesimu.infiltrations

Module Contents

class wolfgpu.simplesimu.infiltrations.InfiltrationInterpolation(*args, **kwds)[source]

Bases: enum.Enum

Inheritance diagram of wolfgpu.simplesimu.infiltrations.InfiltrationInterpolation

Describes the way the infiltration are computed across an infiltration time interval.

NONE = 0[source]

The infiltration is constant over the infiltration time interval.

LINEAR = 1[source]

The infiltration is interpolated over the infiltration time interval. The initial value is the one associated with interval, the final value is the one associated with the next interval.

class wolfgpu.simplesimu.infiltrations.InfiltrationChronology[source]

This is optimized for access where inserts and reads are not frequently mixed togehter.

_chronology: dict[float, list[float]][source]
_nb_zones = None[source]
_timeline = None[source]
_dirty = False[source]
_sorted_timeline()[source]
classmethod from_array(npa)[source]
classmethod from_list(chronology: list[float, list[float]])[source]
property nb_zones: int[source]
property nb_entries: int[source]
to_array()[source]
get_row_at_time(time: float) Tuple[float, List[float]][source]

Get infiltration chronology row active at time time.

Parameters:

time – a positive number of seconds.

get_active_entry_start_time(time: float) float[source]
set(time: float, quantities: list[float])[source]

Sets or replaces an entry in the chronology.

Parameters:
  • time – the moment at which the water must be injected. It is expressed in seconds. If there’s already something at that moment, it will be discarded.

  • quantities – A list giving the quantities of water to inject at the given time. Each quantity in the list corresponds to a infiltration zone of the infiltration map.

_get_closest_row_time_by_time(time: float)[source]

Can return None if no row is active. This happens when time is before all the chronology entries.