wolfgpu.simplesimu.infiltrations ================================ .. py:module:: wolfgpu.simplesimu.infiltrations Module Contents --------------- .. py:class:: InfiltrationInterpolation(*args, **kwds) Bases: :py:obj:`enum.Enum` .. autoapi-inheritance-diagram:: wolfgpu.simplesimu.infiltrations.InfiltrationInterpolation :parts: 1 :private-bases: Describes the way the infiltration are computed across an infiltration time interval. .. py:attribute:: NONE :value: 0 The infiltration is constant over the infiltration time interval. .. py:attribute:: LINEAR :value: 1 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. .. py:class:: InfiltrationChronology This is optimized for access where inserts and reads are not frequently mixed togehter. .. py:attribute:: _chronology :type: dict[float, list[float]] .. py:attribute:: _nb_zones :value: None .. py:attribute:: _timeline :value: None .. py:attribute:: _dirty :value: False .. py:method:: _sorted_timeline() .. py:method:: from_array(npa) :classmethod: .. py:method:: from_list(chronology: list[float, list[float]]) :classmethod: .. py:property:: nb_zones :type: int .. py:property:: nb_entries :type: int .. py:method:: to_array() .. py:method:: get_row_at_time(time: float) -> Tuple[float, List[float]] Get infiltration chronology row active at time `time`. :param time: a positive number of seconds. .. py:method:: get_active_entry_start_time(time: float) -> float .. py:method:: set(time: float, quantities: list[float]) Sets or replaces an entry in the chronology. :param 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. :param 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. .. py:method:: _get_closest_row_time_by_time(time: float) Can return None if no row is active. This happens when `time` is before all the chronology entries.