# tyrrellgit/tmflow architecture

> Architecture diagram of the GitHub repository tyrrellgit/tmflow, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tyrrellgit/tmflow
- Repository: https://github.com/tyrrellgit/tmflow

## Overview

tmflow is a Rust library for ODE flow propagation: users define a vector field once, then call the propagation driver with an initial box and a chosen integrator. The main result is a trajectory with bounding boxes and measures; the verified backend encloses reachable sets, while RK4 provides a non-rigorous point reference. The graph reflects the documented Taylor-model stages and sampled implementations. The driver and Integrator trait source were not sampled, so their internal details are limited to documented behavior.

Main entry points: [`src/integrators/taylor.rs`](https://github.com/tyrrellgit/tmflow/blob/master/src/integrators/taylor.rs) (Verified TM Integrator), [`src/system.rs`](https://github.com/tyrrellgit/tmflow/blob/master/src/system.rs) (System Trait), [`src/driver.rs`](https://github.com/tyrrellgit/tmflow/blob/master/src/driver.rs) (Propagation Driver), [`src/integrator.rs`](https://github.com/tyrrellgit/tmflow/blob/master/src/integrator.rs) (Integrator Trait)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Propagation API"]
  node_driver["Propagation Driver<br/>[driver.rs]"]
  node_trajectory["Trajectory<br/>[driver.rs]"]
end

subgraph group_systems["ODE Systems"]
  node_system_trait["System Trait<br/>[system.rs]"]
  node_vanderpol["Van der Pol<br/>[vanderpol.rs]"]
end

subgraph group_integrators["Integration"]
  node_integrator_trait["Integrator Trait<br/>[integrator.rs]"]
  node_rk4["RK4 Reference<br/>[rk4.rs]"]
  node_tm_integrator["Verified TM Integrator<br/>[taylor.rs]"]
end

subgraph group_arithmetic["Scalar Arithmetic"]
  node_scalar["Scalar Algebra<br/>[scalar.rs]"]
  node_interval["Interval Arithmetic<br/>[interval.rs]"]
  node_taylor_model["Taylor Models<br/>[taylor_model.rs]"]
  node_jet["Time-Taylor Jets<br/>[jet.rs]"]
end

node_user(("Library User"))

node_user -->|"provides box and steps"| node_driver
node_driver -->|"dispatches steps"| node_integrator_trait
node_driver -->|"builds result"| node_trajectory
node_driver -->|"requests bounds"| node_integrator_trait
node_integrator_trait -->|"implemented by"| node_rk4
node_integrator_trait -->|"implemented by"| node_tm_integrator
node_rk4 -->|"evaluates field"| node_system_trait
node_tm_integrator -->|"evaluates field"| node_system_trait
node_vanderpol -->|"implements"| node_system_trait
node_system_trait -->|"evaluates over"| node_scalar
node_tm_integrator -->|"bounds Picard enclosure"| node_interval
node_tm_integrator -->|"computes time series"| node_jet
node_jet -->|"evaluates series"| node_system_trait
node_tm_integrator -->|"propagates set models"| node_taylor_model
node_taylor_model -->|"uses coefficients and remainder"| node_interval
node_interval -->|"implements"| node_scalar
node_taylor_model -->|"implements"| node_scalar
node_jet -->|"implements"| node_scalar

click node_driver "https://github.com/tyrrellgit/tmflow/blob/master/src/driver.rs"
click node_trajectory "https://github.com/tyrrellgit/tmflow/blob/master/src/driver.rs"
click node_system_trait "https://github.com/tyrrellgit/tmflow/blob/master/src/system.rs"
click node_vanderpol "https://github.com/tyrrellgit/tmflow/blob/master/src/systems/vanderpol.rs"
click node_integrator_trait "https://github.com/tyrrellgit/tmflow/blob/master/src/integrator.rs"
click node_rk4 "https://github.com/tyrrellgit/tmflow/blob/master/src/integrators/rk4.rs"
click node_tm_integrator "https://github.com/tyrrellgit/tmflow/blob/master/src/integrators/taylor.rs"
click node_scalar "https://github.com/tyrrellgit/tmflow/blob/master/src/scalar.rs"
click node_interval "https://github.com/tyrrellgit/tmflow/blob/master/src/interval.rs"
click node_taylor_model "https://github.com/tyrrellgit/tmflow/blob/master/src/taylor_model.rs"
click node_jet "https://github.com/tyrrellgit/tmflow/blob/master/src/jet.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_driver,node_trajectory,node_user toneBlue
class node_system_trait,node_vanderpol toneAmber
class node_integrator_trait,node_rk4,node_tm_integrator toneMint
class node_scalar,node_interval,node_taylor_model,node_jet toneRose
```

## Components

### Propagation API

- [Propagation Driver](https://github.com/tyrrellgit/tmflow/blob/master/src/driver.rs): `src/driver.rs`
- [Trajectory](https://github.com/tyrrellgit/tmflow/blob/master/src/driver.rs): `src/driver.rs`

### ODE Systems

- [System Trait](https://github.com/tyrrellgit/tmflow/blob/master/src/system.rs): `src/system.rs`
- [Van der Pol](https://github.com/tyrrellgit/tmflow/blob/master/src/systems/vanderpol.rs): `src/systems/vanderpol.rs`

### Integration

- [Integrator Trait](https://github.com/tyrrellgit/tmflow/blob/master/src/integrator.rs): `src/integrator.rs`
- [RK4 Reference](https://github.com/tyrrellgit/tmflow/blob/master/src/integrators/rk4.rs): `src/integrators/rk4.rs`
- [Verified TM Integrator](https://github.com/tyrrellgit/tmflow/blob/master/src/integrators/taylor.rs): `src/integrators/taylor.rs`

### Scalar Arithmetic

- [Scalar Algebra](https://github.com/tyrrellgit/tmflow/blob/master/src/scalar.rs): `src/scalar.rs`
- [Interval Arithmetic](https://github.com/tyrrellgit/tmflow/blob/master/src/interval.rs): `src/interval.rs`
- [Taylor Models](https://github.com/tyrrellgit/tmflow/blob/master/src/taylor_model.rs): `src/taylor_model.rs`
- [Time-Taylor Jets](https://github.com/tyrrellgit/tmflow/blob/master/src/jet.rs): `src/jet.rs`

### Other components

- **Library User**

## Connections

- Library User → Propagation Driver: provides box and steps
- Propagation Driver → Integrator Trait: dispatches steps
- Propagation Driver → Trajectory: builds result
- Propagation Driver → Integrator Trait: requests bounds
- Integrator Trait → RK4 Reference: implemented by
- Integrator Trait → Verified TM Integrator: implemented by
- RK4 Reference → System Trait: evaluates field
- Verified TM Integrator → System Trait: evaluates field
- Van der Pol → System Trait: implements
- System Trait → Scalar Algebra: evaluates over
- Verified TM Integrator → Interval Arithmetic: bounds Picard enclosure
- Verified TM Integrator → Time-Taylor Jets: computes time series
- Time-Taylor Jets → System Trait: evaluates series
- Verified TM Integrator → Taylor Models: propagates set models
- Taylor Models → Interval Arithmetic: uses coefficients and remainder
- Interval Arithmetic → Scalar Algebra: implements
- Taylor Models → Scalar Algebra: implements
- Time-Taylor Jets → Scalar Algebra: implements
