# ben-dickinson01/ode-solvers-ts architecture

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

- Interactive diagram: https://gitdiagram.com/ben-dickinson01/ode-solvers-ts
- Repository: https://github.com/ben-dickinson01/ode-solvers-ts

## Overview

This is a small TypeScript numerical library for solving ordinary differential equations. Its main workflow is to provide a derivative function and initial state to an Euler or RK4 solver, which advances the state through a shared integration loop and returns times and states. Vector operations support the step formulas. Newton–Raphson and bisection are standalone root-finding capabilities intended for possible implicit methods; the README says they are not wired into a solver. The demo exercises the solvers and vector helpers. Edges reflect the excerpts and README; no tests or tooling are mapped.

Main entry points: [`src/solvers.ts`](https://github.com/ben-dickinson01/ode-solvers-ts/blob/main/src/solvers.ts) (Integration loop), [`src/demo.ts`](https://github.com/ben-dickinson01/ode-solvers-ts/blob/main/src/demo.ts) (Demo examples), [`src/vector-methods.ts`](https://github.com/ben-dickinson01/ode-solvers-ts/blob/main/src/vector-methods.ts) (Vector operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ode["ODE solving"]
  node_integration["Integration loop<br/>[solvers.ts]"]
  node_steppers["Euler and RK4<br/>[solvers.ts]"]
  node_solution["Times and states<br/>[solvers.ts]"]
end

subgraph group_numerics["Numerical helpers"]
  node_vectors["Vector operations<br/>[vector-methods.ts]"]
end

subgraph group_roots["Root finding"]
  node_rootfinders["Root finders<br/>[rootfinders.ts]"]
end

subgraph group_examples["Example"]
  node_demo["Demo examples<br/>[demo.ts]"]
end

node_user(("Library user"))

node_user -->|"runs"| node_demo
node_demo -->|"uses solvers"| node_integration
node_demo -->|"uses helpers"| node_vectors
node_integration -->|"calls each step"| node_steppers
node_steppers -->|"uses operations"| node_vectors
node_integration -->|"returns"| node_solution

click node_demo "https://github.com/ben-dickinson01/ode-solvers-ts/blob/main/src/demo.ts"
click node_integration "https://github.com/ben-dickinson01/ode-solvers-ts/blob/main/src/solvers.ts"
click node_steppers "https://github.com/ben-dickinson01/ode-solvers-ts/blob/main/src/solvers.ts"
click node_solution "https://github.com/ben-dickinson01/ode-solvers-ts/blob/main/src/solvers.ts"
click node_vectors "https://github.com/ben-dickinson01/ode-solvers-ts/blob/main/src/vector-methods.ts"
click node_rootfinders "https://github.com/ben-dickinson01/ode-solvers-ts/blob/main/src/rootfinders.ts"

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_integration,node_steppers,node_solution,node_user toneBlue
class node_vectors toneAmber
class node_rootfinders toneMint
class node_demo toneRose
```

## Components

### ODE solving

- [Integration loop](https://github.com/ben-dickinson01/ode-solvers-ts/blob/main/src/solvers.ts): `src/solvers.ts`
- [Euler and RK4](https://github.com/ben-dickinson01/ode-solvers-ts/blob/main/src/solvers.ts): `src/solvers.ts`
- [Times and states](https://github.com/ben-dickinson01/ode-solvers-ts/blob/main/src/solvers.ts): `src/solvers.ts`

### Numerical helpers

- [Vector operations](https://github.com/ben-dickinson01/ode-solvers-ts/blob/main/src/vector-methods.ts): `src/vector-methods.ts`

### Root finding

- [Root finders](https://github.com/ben-dickinson01/ode-solvers-ts/blob/main/src/rootfinders.ts): `src/rootfinders.ts`

### Example

- [Demo examples](https://github.com/ben-dickinson01/ode-solvers-ts/blob/main/src/demo.ts): `src/demo.ts`

### Other components

- **Library user**

## Connections

- Library user → Demo examples: runs (evidence: `README.md`)
- Demo examples → Integration loop: uses solvers (evidence: `src/demo.ts`)
- Demo examples → Vector operations: uses helpers (evidence: `src/demo.ts`)
- Integration loop → Euler and RK4: calls each step (evidence: `src/solvers.ts`)
- Euler and RK4 → Vector operations: uses operations (evidence: `src/solvers.ts`)
- Integration loop → Times and states: returns (evidence: `src/solvers.ts`)
