SystemLayout
The buffer layout a system compiles against.
Published Classes
SystemLayoutThe 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.variablesThe 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:
objectThe 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:
states (cubie.odesystems.variables.VariableSet) – The states, in the order of the state buffer.
parameters (cubie.odesystems.variables.ParameterSet) – Every parameter, swept or fixed, in the system’s parameter order.
observables (cubie.odesystems.variables.VariableSet) – The observables, in the order of the observables buffer.
drivers (cubie.odesystems.variables.VariableSet) – The drivers, in the order of the drivers buffer.
driver_derivatives (Tuple[Tuple[int, int], ...]) – The driver index and order of each driver derivative the equations read, in drivers-buffer order. The layout places them after the drivers.
- drivers: VariableSet
- property observable_names: Tuple[str, ...]
Observable names, in the order of the observables buffer.
- observables: VariableSet
- parameters: ParameterSet
- states: VariableSet