# gyselax/gysela-mini-app_insitu architecture

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

- Interactive diagram: https://gitdiagram.com/gyselax/gysela-mini-app_insitu
- Repository: https://github.com/gyselax/gysela-mini-app_insitu

## Overview

Gysela-mini-app is a mini-application for testing in-situ/in-transit GYSELA I/O and compression, alongside Python analysis and fluid-moment diagnostics. The main workflow is to run the C++ compression app with GYSELA and PDI YAML configuration, optionally launch benchmark branches, and evaluate compression results. The graph includes documented and indexed module relationships; unsampled implementation details and data-flow links are omitted where evidence is limited.

Main entry points: [`processing/compression/compression_config.py`](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/compression/compression_config.py) (Compression configuration), [`simulations/compression/launch_benchmark.py`](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/simulations/compression/launch_benchmark.py) (Benchmark launcher), [`src/compression/gys_compress.cpp`](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/src/compression/gys_compress.cpp) (Compression app), [`processing/compression/compression_methods/neural_network.py`](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/compression/compression_methods/neural_network.py) (Neural compressors)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_benchmark["Benchmark orchestration"]
  node_launcher["Benchmark launcher"]
  node_caseparams["Benchmark parameters"]
end

subgraph group_cpp["C++ simulation"]
  node_gysapp["Compression app<br/>[gys_compress.cpp]"]
  node_predcorr["Compression solver"]
  node_spline["Spline definitions"]
  node_geometry["5D geometry<br/>[geometry.hpp]"]
  node_cppmoments["C++ fluid moments<br/>[fluid_moments.cpp]"]
  node_cppmomentapi["Moment operators<br/>[fluid_moments.hpp]"]
end

subgraph group_pycomp["Python compression"]
  node_evaluate["Compression evaluation"]
  node_config["Compression configuration"]
  node_compressor["Compressor interface<br/>[compressor.py]"]
  node_pca["PCA compressor<br/>[PCA.py]"]
  node_nn["Neural compressors<br/>[neural_network.py]"]
  node_noise["Random-noise compressor<br/>[random_noise.py]"]
end

subgraph group_analysis["Diagnostics and analysis"]
  node_compdiags["Compression diagnostics"]
  node_moments["Python fluid moments<br/>[fluid_moments.py]"]
  node_verify["Moment verification"]
  node_timing["Timing statistics"]
  node_analytics["Analytics<br/>[analytics.py]"]
  node_optimized["Optimized analytics"]
  node_measure["Measurement tools<br/>[measure.py]"]
  node_cli["Diagnostics CLI<br/>[cli.py]"]
end

node_user(("Operator"))

node_user -->|"runs with YAML"| node_gysapp
node_user -->|"starts benchmark"| node_launcher
node_launcher -->|"uses templates"| node_caseparams
node_launcher -->|"invokes evaluation"| node_evaluate
node_gysapp -->|"uses solver"| node_predcorr
node_gysapp -->|"uses definitions"| node_spline
node_config -->|"references method"| node_pca
node_config -->|"references method"| node_nn
node_config -->|"references method"| node_noise
node_pca -->|"uses interface"| node_compressor
node_nn -->|"uses interface"| node_compressor
node_evaluate -->|"runs online evaluation"| node_nn
node_compdiags -->|"uses settings"| node_config
node_verify -->|"computes moments"| node_moments
node_analytics -->|"uses moment calculations"| node_moments
node_cppmoments -->|"implements operators"| node_cppmomentapi
node_cppmomentapi -->|"uses dimensions"| node_geometry
node_cli -->|"dispatches command"| node_timing
node_cli -->|"dispatches command"| node_verify

click node_gysapp "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/src/compression/gys_compress.cpp"
click node_predcorr "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/src/compression/predcorr_compress.cpp"
click node_spline "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/src/spline_definitions.hpp"
click node_geometry "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/src/geometry.hpp"
click node_cppmoments "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/src/fluid_moments/fluid_moments.cpp"
click node_cppmomentapi "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/src/fluid_moments/fluid_moments.hpp"
click node_launcher "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/simulations/compression/launch_benchmark.py"
click node_caseparams "https://github.com/gyselax/gysela-mini-app_insitu/tree/devel/simulations/compression/params"
click node_evaluate "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/compression/evaluate_compression.py"
click node_config "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/compression/compression_config.py"
click node_compressor "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/compression/compressor.py"
click node_pca "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/compression/compression_methods/PCA.py"
click node_nn "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/compression/compression_methods/neural_network.py"
click node_noise "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/compression/compression_methods/random_noise.py"
click node_compdiags "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/compression/compression_diagnostics.py"
click node_moments "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/fluid_moments.py"
click node_verify "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/utils/verify_fluid_moments.py"
click node_timing "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/utils/read_timing_stats.py"
click node_analytics "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/analytics.py"
click node_optimized "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/optimised_analytics.py"
click node_measure "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/measure.py"
click node_cli "https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/utils/cli.py"

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_launcher,node_caseparams toneBlue
class node_gysapp,node_predcorr,node_spline,node_geometry,node_cppmoments,node_cppmomentapi toneAmber
class node_evaluate,node_config,node_compressor,node_pca,node_nn,node_noise toneMint
class node_compdiags,node_moments,node_verify,node_timing,node_analytics,node_optimized,node_measure,node_cli toneRose
class node_user toneIndigo
```

## Components

### Benchmark orchestration

- [Benchmark launcher](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/simulations/compression/launch_benchmark.py): `simulations/compression/launch_benchmark.py`
- [Benchmark parameters](https://github.com/gyselax/gysela-mini-app_insitu/tree/devel/simulations/compression/params): `simulations/compression/params`

### C++ simulation

- [Compression app](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/src/compression/gys_compress.cpp): `src/compression/gys_compress.cpp`
- [Compression solver](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/src/compression/predcorr_compress.cpp): `src/compression/predcorr_compress.cpp`
- [Spline definitions](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/src/spline_definitions.hpp): `src/spline_definitions.hpp`
- [5D geometry](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/src/geometry.hpp): `src/geometry.hpp`
- [C++ fluid moments](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/src/fluid_moments/fluid_moments.cpp): `src/fluid_moments/fluid_moments.cpp`
- [Moment operators](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/src/fluid_moments/fluid_moments.hpp): `src/fluid_moments/fluid_moments.hpp`

### Python compression

- [Compression evaluation](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/compression/evaluate_compression.py): `processing/compression/evaluate_compression.py`
- [Compression configuration](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/compression/compression_config.py): `processing/compression/compression_config.py`
- [Compressor interface](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/compression/compressor.py): `processing/compression/compressor.py`
- [PCA compressor](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/compression/compression_methods/PCA.py): `processing/compression/compression_methods/PCA.py`
- [Neural compressors](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/compression/compression_methods/neural_network.py): `processing/compression/compression_methods/neural_network.py`
- [Random-noise compressor](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/compression/compression_methods/random_noise.py): `processing/compression/compression_methods/random_noise.py`

### Diagnostics and analysis

- [Compression diagnostics](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/compression/compression_diagnostics.py): `processing/compression/compression_diagnostics.py`
- [Python fluid moments](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/fluid_moments.py): `processing/fluid_moments.py`
- [Moment verification](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/utils/verify_fluid_moments.py): `processing/utils/verify_fluid_moments.py`
- [Timing statistics](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/utils/read_timing_stats.py): `processing/utils/read_timing_stats.py`
- [Analytics](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/analytics.py): `processing/analytics.py`
- [Optimized analytics](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/optimised_analytics.py): `processing/optimised_analytics.py`
- [Measurement tools](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/measure.py): `processing/measure.py`
- [Diagnostics CLI](https://github.com/gyselax/gysela-mini-app_insitu/blob/devel/processing/utils/cli.py): `processing/utils/cli.py`

### Other components

- **Operator**

## Connections

- Operator → Compression app: runs with YAML (evidence: `README.md`)
- Operator → Benchmark launcher: starts benchmark (evidence: `README.md`)
- Benchmark launcher → Benchmark parameters: uses templates (evidence: `README.md`)
- Benchmark launcher → Compression evaluation: invokes evaluation (evidence: `simulations/compression/launch_benchmark.py`)
- Compression app → Compression solver: uses solver (evidence: `src/compression/gys_compress.cpp`)
- Compression app → Spline definitions: uses definitions (evidence: `src/compression/gys_compress.cpp`)
- Compression configuration → PCA compressor: references method (evidence: `processing/compression/compression_config.py`)
- Compression configuration → Neural compressors: references method (evidence: `processing/compression/compression_config.py`)
- Compression configuration → Random-noise compressor: references method (evidence: `processing/compression/compression_config.py`)
- PCA compressor → Compressor interface: uses interface (evidence: `processing/compression/compression_methods/PCA.py`)
- Neural compressors → Compressor interface: uses interface (evidence: `processing/compression/compression_methods/neural_network.py`)
- Compression evaluation → Neural compressors: runs online evaluation (evidence: `processing/compression/evaluate_compression.py`)
- Compression diagnostics → Compression configuration: uses settings (evidence: `processing/compression/compression_diagnostics.py`)
- Moment verification → Python fluid moments: computes moments (evidence: `processing/utils/verify_fluid_moments.py`)
- Analytics → Python fluid moments: uses moment calculations (evidence: `processing/analytics.py`)
- C++ fluid moments → Moment operators: implements operators (evidence: `src/fluid_moments/fluid_moments.cpp`)
- Moment operators → 5D geometry: uses dimensions (evidence: `src/fluid_moments/fluid_moments.hpp`)
- Diagnostics CLI → Timing statistics: dispatches command (evidence: `processing/utils/cli.py`)
- Diagnostics CLI → Moment verification: dispatches command (evidence: `processing/utils/cli.py`)
