# gaillot18/stage-m1-chps architecture

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

- Interactive diagram: https://gitdiagram.com/gaillot18/stage-m1-chps
- Repository: https://github.com/gaillot18/stage-m1-chps

## Overview

This repository is a C suite for finite-difference numerical solutions of Poisson, wave, and heat-equation PDEs, with implementations intended for accuracy and performance comparison. The user supplies mesh and time parameters to a problem/version program; it computes an approximate solution, compares against an exact solution where available, and reports error and runtime. The major branches are the documented sequential, OpenMP, MPI, direct-Cholesky, and CHOLMOD variants. The README documents the shared workflow; unsampled solver implementations are represented by their exact source directories, and uncertain call edges are omitted.

Main entry points: [`Fonctions-communes/calcul-mat.c`](https://github.com/gaillot18/stage-m1-chps/blob/master/Fonctions-communes/calcul-mat.c) (Array Operations), [`Probleme-Ondes/Sources/sequentiel-1/resolution.c`](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-Ondes/Sources/sequentiel-1/resolution.c) (Explicit Wave Solver), [`Probleme-1D/Sources/base/main.c`](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-1D/Sources/base/main.c) (Gauss Base), [`Probleme-1D/Sources/parallele-1/main.c`](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-1D/Sources/parallele-1/main.c) (OpenMP Jacobi)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_poisson1d["1D Poisson"]
  node_p1base["Gauss Base<br/>[main.c]"]
  node_p1jacobi["Sequential Jacobi<br/>[main.c]"]
  node_p1omp["OpenMP Jacobi<br/>[main.c]"]
  node_p1mpi["MPI Jacobi<br/>[main.c]"]
  node_p1chol["Cholesky Direct<br/>[main.c]"]
end

subgraph group_poisson2d["2D Poisson"]
  node_p2base["Gauss Base<br/>[main.c]"]
  node_p2jacobi["Sequential Jacobi<br/>[main.c]"]
  node_p2omp["OpenMP Jacobi<br/>[main.c]"]
  node_p2mpi["Blocking MPI<br/>[main.c]"]
  node_p2mpi_nb["Nonblocking MPI<br/>[main.c]"]
  node_p2chol["Cholesky Direct<br/>[main.c]"]
  node_p2cholmod["CHOLMOD Cholesky<br/>[resolution.c]"]
end

subgraph group_heat["Heat Equation"]
  node_heat_exp["Explicit Sequential<br/>[main.c]"]
  node_heat_omp["Explicit OpenMP<br/>[main.c]"]
  node_heat_mpi["Explicit MPI<br/>[main.c]"]
  node_heat_impl["Implicit CHOLMOD<br/>[resolution.c]"]
  node_heat_semi["Semi-implicit CHOLMOD<br/>[resolution.c]"]
end

subgraph group_waves["Wave Equation"]
  node_wave["Explicit Wave Solver<br/>[resolution.c]"]
end

subgraph group_common["Shared Numerics"]
  node_mat["Array Operations<br/>[calcul-mat.c]"]
  node_display["Display Helpers<br/>[affichage.c]"]
  node_convert["Result Conversion<br/>[convert.c]"]
end

node_user(("Problem User"))

node_user -->|"sets parameters"| node_p1base
node_user -->|"sets parameters"| node_p1jacobi
node_user -->|"sets parameters"| node_p1omp
node_user -->|"sets parameters"| node_p1mpi
node_user -->|"sets parameters"| node_p1chol
node_user -->|"sets parameters"| node_p2base
node_user -->|"sets parameters"| node_p2jacobi
node_user -->|"sets parameters"| node_p2omp
node_user -->|"sets parameters"| node_p2mpi
node_user -->|"sets parameters"| node_p2mpi_nb
node_user -->|"sets parameters"| node_p2chol
node_user -->|"sets parameters"| node_p2cholmod
node_user -->|"sets parameters"| node_heat_exp
node_user -->|"sets parameters"| node_heat_omp
node_user -->|"sets parameters"| node_heat_mpi
node_user -->|"sets parameters"| node_heat_impl
node_user -->|"sets parameters"| node_heat_semi
node_user -->|"sets parameters"| node_wave
node_p1omp -->|"computes norms"| node_mat
node_wave -->|"uses norms"| node_mat
node_wave -->|"writes results"| node_convert
node_p1base -.->|"uses helpers"| node_display
node_p2base -.->|"uses helpers"| node_display
node_p1chol -.->|"uses operations"| node_mat
node_p2chol -.->|"uses operations"| node_mat

click node_p1base "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-1D/Sources/base/main.c"
click node_p1jacobi "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-1D/Sources/sequentiel-1/main.c"
click node_p1omp "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-1D/Sources/parallele-1/main.c"
click node_p1mpi "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-1D/Sources/parallele-2/main.c"
click node_p1chol "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-1D/Sources/sequentiel-2/main.c"
click node_p2base "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-2D/Sources/base/main.c"
click node_p2jacobi "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-2D/Sources/sequentiel-1/main.c"
click node_p2omp "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-2D/Sources/parallele-1/main.c"
click node_p2mpi "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-2D/Sources/parallele-2/main.c"
click node_p2mpi_nb "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-2D/Sources/parallele-3/main.c"
click node_p2chol "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-2D/Sources/sequentiel-2/main.c"
click node_p2cholmod "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-2D/Sources/sequentiel-3/resolution.c"
click node_heat_exp "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-Chaleur/Sources/sequentiel-1/main.c"
click node_heat_omp "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-Chaleur/Sources/parallele-1/main.c"
click node_heat_mpi "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-Chaleur/Sources/parallele-2/main.c"
click node_heat_impl "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-Chaleur/Sources/sequentiel-2/resolution.c"
click node_heat_semi "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-Chaleur/Sources/sequentiel-3/resolution.c"
click node_wave "https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-Ondes/Sources/sequentiel-1/resolution.c"
click node_mat "https://github.com/gaillot18/stage-m1-chps/blob/master/Fonctions-communes/calcul-mat.c"
click node_display "https://github.com/gaillot18/stage-m1-chps/blob/master/Fonctions-communes/affichage.c"
click node_convert "https://github.com/gaillot18/stage-m1-chps/blob/master/Fonctions-communes/convert.c"

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_p1base,node_p1jacobi,node_p1omp,node_p1mpi,node_p1chol,node_user toneBlue
class node_p2base,node_p2jacobi,node_p2omp,node_p2mpi,node_p2mpi_nb,node_p2chol,node_p2cholmod toneAmber
class node_heat_exp,node_heat_omp,node_heat_mpi,node_heat_impl,node_heat_semi toneMint
class node_wave toneRose
class node_mat,node_display,node_convert toneIndigo
```

## Components

### 1D Poisson

- [Gauss Base](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-1D/Sources/base/main.c): `Probleme-1D/Sources/base/main.c`
- [Sequential Jacobi](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-1D/Sources/sequentiel-1/main.c): `Probleme-1D/Sources/sequentiel-1/main.c`
- [OpenMP Jacobi](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-1D/Sources/parallele-1/main.c): `Probleme-1D/Sources/parallele-1/main.c`
- [MPI Jacobi](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-1D/Sources/parallele-2/main.c): `Probleme-1D/Sources/parallele-2/main.c`
- [Cholesky Direct](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-1D/Sources/sequentiel-2/main.c): `Probleme-1D/Sources/sequentiel-2/main.c`

### 2D Poisson

- [Gauss Base](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-2D/Sources/base/main.c): `Probleme-2D/Sources/base/main.c`
- [Sequential Jacobi](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-2D/Sources/sequentiel-1/main.c): `Probleme-2D/Sources/sequentiel-1/main.c`
- [OpenMP Jacobi](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-2D/Sources/parallele-1/main.c): `Probleme-2D/Sources/parallele-1/main.c`
- [Blocking MPI](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-2D/Sources/parallele-2/main.c): `Probleme-2D/Sources/parallele-2/main.c`
- [Nonblocking MPI](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-2D/Sources/parallele-3/main.c): `Probleme-2D/Sources/parallele-3/main.c`
- [Cholesky Direct](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-2D/Sources/sequentiel-2/main.c): `Probleme-2D/Sources/sequentiel-2/main.c`
- [CHOLMOD Cholesky](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-2D/Sources/sequentiel-3/resolution.c): `Probleme-2D/Sources/sequentiel-3/resolution.c`

### Heat Equation

- [Explicit Sequential](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-Chaleur/Sources/sequentiel-1/main.c): `Probleme-Chaleur/Sources/sequentiel-1/main.c`
- [Explicit OpenMP](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-Chaleur/Sources/parallele-1/main.c): `Probleme-Chaleur/Sources/parallele-1/main.c`
- [Explicit MPI](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-Chaleur/Sources/parallele-2/main.c): `Probleme-Chaleur/Sources/parallele-2/main.c`
- [Implicit CHOLMOD](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-Chaleur/Sources/sequentiel-2/resolution.c): `Probleme-Chaleur/Sources/sequentiel-2/resolution.c`
- [Semi-implicit CHOLMOD](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-Chaleur/Sources/sequentiel-3/resolution.c): `Probleme-Chaleur/Sources/sequentiel-3/resolution.c`

### Wave Equation

- [Explicit Wave Solver](https://github.com/gaillot18/stage-m1-chps/blob/master/Probleme-Ondes/Sources/sequentiel-1/resolution.c): `Probleme-Ondes/Sources/sequentiel-1/resolution.c`

### Shared Numerics

- [Array Operations](https://github.com/gaillot18/stage-m1-chps/blob/master/Fonctions-communes/calcul-mat.c): `Fonctions-communes/calcul-mat.c`
- [Display Helpers](https://github.com/gaillot18/stage-m1-chps/blob/master/Fonctions-communes/affichage.c): `Fonctions-communes/affichage.c`
- [Result Conversion](https://github.com/gaillot18/stage-m1-chps/blob/master/Fonctions-communes/convert.c): `Fonctions-communes/convert.c`

### Other components

- **Problem User**

## Connections

- Problem User → Gauss Base: sets parameters (evidence: `README.md`)
- Problem User → Sequential Jacobi: sets parameters (evidence: `README.md`)
- Problem User → OpenMP Jacobi: sets parameters (evidence: `README.md`)
- Problem User → MPI Jacobi: sets parameters (evidence: `README.md`)
- Problem User → Cholesky Direct: sets parameters (evidence: `README.md`)
- Problem User → Gauss Base: sets parameters (evidence: `README.md`)
- Problem User → Sequential Jacobi: sets parameters (evidence: `README.md`)
- Problem User → OpenMP Jacobi: sets parameters (evidence: `README.md`)
- Problem User → Blocking MPI: sets parameters (evidence: `README.md`)
- Problem User → Nonblocking MPI: sets parameters (evidence: `README.md`)
- Problem User → Cholesky Direct: sets parameters (evidence: `README.md`)
- Problem User → CHOLMOD Cholesky: sets parameters (evidence: `README.md`)
- Problem User → Explicit Sequential: sets parameters (evidence: `README.md`)
- Problem User → Explicit OpenMP: sets parameters (evidence: `README.md`)
- Problem User → Explicit MPI: sets parameters (evidence: `README.md`)
- Problem User → Implicit CHOLMOD: sets parameters (evidence: `README.md`)
- Problem User → Semi-implicit CHOLMOD: sets parameters (evidence: `README.md`)
- Problem User → Explicit Wave Solver: sets parameters (evidence: `README.md`)
- OpenMP Jacobi → Array Operations: computes norms (evidence: `Probleme-1D/Sources/parallele-1/main.c`)
- Explicit Wave Solver → Array Operations: uses norms (evidence: `Probleme-Ondes/Sources/sequentiel-1/resolution.c`)
- Explicit Wave Solver → Result Conversion: writes results
- Gauss Base → Display Helpers: uses helpers
- Gauss Base → Display Helpers: uses helpers
- Cholesky Direct → Array Operations: uses operations
- Cholesky Direct → Array Operations: uses operations
