wolfgpu.simplesimu.durations

Module Contents

class wolfgpu.simplesimu.durations.SimulationDurationType(*args, **kwds)[source]

Bases: enum.Enum

Inheritance diagram of wolfgpu.simplesimu.durations.SimulationDurationType

A type of duration.

This was introduced to abstract the duration of a simulation.

SECONDS = 0[source]

A duration expressed in seconds.

STEPS = 1[source]

A duration expressed in steps.

class wolfgpu.simplesimu.durations.SimulationDuration(_type: SimulationDurationType, duration: float | int)[source]

In the GPU simulator, we represent durations about the simulation either as number of simulation steps either as simulation time (in seconds). This class can represent both.

type[source]
duration[source]
to_dict()[source]
classmethod from_dict(d)[source]
classmethod from_seconds(seconds) SimulationDuration[source]
classmethod from_steps(steps) SimulationDuration[source]
classmethod from_str(d: str) SimulationDuration[source]
classmethod zero_like(d) SimulationDuration[source]
is_zero()[source]
class wolfgpu.simplesimu.durations.ReportFrequencyType(*args, **kwds)[source]

Bases: enum.Enum

Inheritance diagram of wolfgpu.simplesimu.durations.ReportFrequencyType

When specifying the report period, one can use two different units.

ITERATION = 1[source]

Report period in iterations

SIMULATION_TIME = 0[source]

Report period in simulation time (seconds)

class wolfgpu.simplesimu.durations.TimeStepStrategy(*args, **kwds)[source]

Bases: enum.Enum

Inheritance diagram of wolfgpu.simplesimu.durations.TimeStepStrategy

Describes the way the time step is computed on each simulation step.

FIXED_TIME_STEP = 1[source]

The time step is constant over all simulation steps.

OPTIMIZED_TIME_STEP = 2[source]

The time step is the maximum of the minimum time steps authorized by the Courant formula.