# gilbertorouxinol/structrun architecture

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

- Interactive diagram: https://gitdiagram.com/gilbertorouxinol/structrun
- Repository: https://github.com/gilbertorouxinol/structrun

## Overview

StructRun is a command-line structural-analysis program for frame-like structures. A user supplies a model file; the program reads model data, builds the structural system, solves for response, and computes member-result quantities. The tree includes text outputs for analysis and diagrams, although the sampled excerpts do not show the output-writing code. The main implementation is concentrated in main.cpp, with r8lib.hpp providing a broad numerical utility interface; detailed solver calls and output wiring are not visible in the excerpts.

Main entry points: [`main.cpp`](https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp) (System solution), [`InputStructures`](https://github.com/gilbertorouxinol/structrun/tree/master/InputStructures) (Model files), [`r8lib.hpp`](https://github.com/gilbertorouxinol/structrun/blob/master/r8lib.hpp) (Numeric utilities), [`OutputStructures`](https://github.com/gilbertorouxinol/structrun/tree/master/OutputStructures) (Analysis outputs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_model["Model setup"]
  node_input["Model files"]
  node_reader["Input parsing<br/>[main.cpp]"]
  node_geometry["Frame geometry<br/>[main.cpp]"]
  node_properties["Materials and loads<br/>[main.cpp]"]
end

subgraph group_analysis["Structural analysis"]
  node_dofs["Degrees of freedom<br/>[main.cpp]"]
  node_transform["Coordinate transforms<br/>[main.cpp]"]
  node_solver["System solution<br/>[main.cpp]"]
  node_numerics["Numeric utilities<br/>[r8lib.hpp]"]
end

subgraph group_results["Results"]
  node_displacements["Displacements<br/>[main.cpp]"]
  node_memberresponse["Member response<br/>[main.cpp]"]
  node_output["Analysis outputs"]
end

node_user(("Analyst"))

node_user -->|"provides model"| node_input
node_input -->|"reads model"| node_reader
node_reader -.->|"builds geometry"| node_geometry
node_reader -.->|"loads properties"| node_properties
node_geometry -.->|"indexes nodes"| node_dofs
node_properties -.->|"supplies element data"| node_transform
node_dofs -.->|"defines system"| node_solver
node_transform -.->|"transforms system"| node_solver
node_solver -.->|"uses utilities"| node_numerics
node_solver -.->|"computes response"| node_displacements
node_displacements -.->|"evaluates members"| node_memberresponse
node_memberresponse -.->|"writes results"| node_output

click node_input "https://github.com/gilbertorouxinol/structrun/tree/master/InputStructures"
click node_reader "https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp"
click node_geometry "https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp"
click node_properties "https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp"
click node_dofs "https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp"
click node_transform "https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp"
click node_solver "https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp"
click node_numerics "https://github.com/gilbertorouxinol/structrun/blob/master/r8lib.hpp"
click node_displacements "https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp"
click node_memberresponse "https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp"
click node_output "https://github.com/gilbertorouxinol/structrun/tree/master/OutputStructures"

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_input,node_reader,node_geometry,node_properties toneBlue
class node_dofs,node_transform,node_solver,node_numerics toneAmber
class node_displacements,node_memberresponse,node_output toneMint
class node_user toneIndigo
```

## Components

### Model setup

- [Model files](https://github.com/gilbertorouxinol/structrun/tree/master/InputStructures): `InputStructures`
- [Input parsing](https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp): `main.cpp`
- [Frame geometry](https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp): `main.cpp`
- [Materials and loads](https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp): `main.cpp`

### Structural analysis

- [Degrees of freedom](https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp): `main.cpp`
- [Coordinate transforms](https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp): `main.cpp`
- [System solution](https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp): `main.cpp`
- [Numeric utilities](https://github.com/gilbertorouxinol/structrun/blob/master/r8lib.hpp): `r8lib.hpp`

### Results

- [Displacements](https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp): `main.cpp`
- [Member response](https://github.com/gilbertorouxinol/structrun/blob/master/main.cpp): `main.cpp`
- [Analysis outputs](https://github.com/gilbertorouxinol/structrun/tree/master/OutputStructures): `OutputStructures`

### Other components

- **Analyst**

## Connections

- Analyst → Model files: provides model
- Model files → Input parsing: reads model (evidence: `main.cpp`)
- Input parsing → Frame geometry: builds geometry (evidence: `main.cpp`)
- Input parsing → Materials and loads: loads properties (evidence: `main.cpp`)
- Frame geometry → Degrees of freedom: indexes nodes (evidence: `main.cpp`)
- Materials and loads → Coordinate transforms: supplies element data (evidence: `main.cpp`)
- Degrees of freedom → System solution: defines system (evidence: `main.cpp`)
- Coordinate transforms → System solution: transforms system (evidence: `main.cpp`)
- System solution → Numeric utilities: uses utilities (evidence: `main.cpp`)
- System solution → Displacements: computes response (evidence: `main.cpp`)
- Displacements → Member response: evaluates members (evidence: `main.cpp`)
- Member response → Analysis outputs: writes results
