SystemLayout

The buffer layout a system compiles against.

Published Classes

SystemLayout

The variables held in each device buffer, in buffer order, and the swept and fixed parameters.

>>> states = VariableSet.of(Variable, ["x", "y"])
>>> declared = VariableSet.of(Parameter, {"k": 1.0})
>>> layout = SystemLayout(
...     states=states, parameters=ParameterSet.build(declared, ["k"])
... )
>>> layout.dxdt_names
('dx', 'dy')
>>> layout.swept_names
('k',)

See also

cubie.odesystems.variables

The variable sets a layout holds.

class cubie.odesystems.layout.SystemLayout(states: VariableSet = VariableSet(entries=()), parameters: ParameterSet = ParameterSet(entries=()), observables: VariableSet = VariableSet(entries=()), drivers: VariableSet = VariableSet(entries=()), driver_derivatives=())[source]

Bases: object

The variables in each device buffer, in buffer order.

Hold the position of each variable in each device buffer of one specialised system. Pass a parameters array with one row per swept parameter, in the order of parameters.

Parameters:
driver_derivatives: Tuple[Tuple[int, int], ...]
property driver_names: Tuple[str, ...]

Driver names, in the order of the drivers buffer.

drivers: VariableSet
property dxdt_names: Tuple[str, ...]

Names of the state derivatives, in the order of the output.

property num_drivers: int

drivers plus derivatives.

Type:

Length of the drivers buffer

property observable_names: Tuple[str, ...]

Observable names, in the order of the observables buffer.

observables: VariableSet
parameters: ParameterSet
property state_names: Tuple[str, ...]

State names, in the order of the state buffer.

states: VariableSet
property swept_names: Tuple[str, ...]

Swept parameter names, in the order of the parameters array.