# aadharsh06/pinn architecture

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

- Interactive diagram: https://gitdiagram.com/aadharsh06/pinn
- Repository: https://github.com/aadharsh06/pinn

## Overview

This repository is a collection of physics-informed neural-network (PINN) implementations for learning PDE solutions, not a single application. The typical workflow is to choose a PDE formulation, train a neural network using initial/boundary-condition and physics-residual losses, then evaluate or plot predictions against reference solutions. The README identifies continuous-time, discrete-time, and coupled-equation examples, including Navier–Stokes in progress. Python training and evaluation sources were sampled for continuous-time examples; notebook-based branches are represented from the tree and README, so their internal wiring is not inferred.

Main entry points: [`continuous-time-models/Burgers_PDE/main_burger_pde.py`](https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Burgers_PDE/main_burger_pde.py) (Burgers training), [`continuous-time-models/Burgers_PDE/plot_soln.py`](https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Burgers_PDE/plot_soln.py) (Burgers plotting), [`continuous-time-models/Non_Linear_Shrodinger/nls_test_and_plot.py`](https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Non_Linear_Shrodinger/nls_test_and_plot.py) (NLS evaluation), [`continuous-time-models/Non_Linear_Shrodinger/nls_train.py`](https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Non_Linear_Shrodinger/nls_train.py) (NLS training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_continuous["Continuous time"]
  node_burgers_train["Burgers training<br/>[main_burger_pde.py]"]
  node_burgers_plot["Burgers plotting<br/>[plot_soln.py]"]
  node_nls_train["NLS training<br/>[nls_train.py]"]
  node_nls_evaluate["NLS evaluation"]
end

subgraph group_discrete["Discrete time"]
  node_burgers_discrete["Discrete Burgers PINN"]
  node_allen_cahn["Allen–Cahn PINN"]
end

subgraph group_coupled["Coupled systems"]
  node_basic_coupled["Basic coupled PINN"]
  node_navier_stokes["Navier–Stokes PINN"]
end

subgraph group_artifacts["Data and results"]
  node_burgers_data["Burgers reference<br/>[burgers_shock.mat]"]
  node_burgers_weights["Burgers weights"]
  node_nls_data["NLS reference<br/>[NLS.mat]"]
  node_nls_weights["NLS weights<br/>[latest.weights.h5]"]
  node_allen_data["Allen–Cahn reference<br/>[AC.mat]"]
  node_allen_weights["Allen–Cahn weights"]
  node_navier_data["Flow references"]
  node_navier_weights["Flow weights<br/>[latest.weights.h5]"]
end

node_researcher(("PINN user"))

node_researcher -->|"runs training"| node_burgers_train
node_burgers_train -->|"saves weights"| node_burgers_weights
node_burgers_train -->|"evaluates against"| node_burgers_data
node_burgers_plot -->|"loads weights"| node_burgers_weights
node_burgers_plot -->|"plots reference"| node_burgers_data
node_researcher -->|"runs training"| node_nls_train
node_nls_train -->|"saves weights"| node_nls_weights
node_nls_evaluate -->|"loads weights"| node_nls_weights
node_nls_evaluate -->|"evaluates against"| node_nls_data
node_researcher -->|"chooses model"| node_burgers_discrete
node_researcher -->|"runs notebook"| node_allen_cahn
node_researcher -->|"runs notebook"| node_basic_coupled
node_researcher -.->|"explores model"| node_navier_stokes

click node_burgers_train "https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Burgers_PDE/main_burger_pde.py"
click node_burgers_data "https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Burgers_PDE/burgers_shock.mat"
click node_burgers_weights "https://github.com/aadharsh06/pinn/tree/main/continuous-time-models/Burgers_PDE/weights"
click node_burgers_plot "https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Burgers_PDE/plot_soln.py"
click node_nls_train "https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Non_Linear_Shrodinger/nls_train.py"
click node_nls_data "https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Non_Linear_Shrodinger/NLS.mat"
click node_nls_weights "https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Non_Linear_Shrodinger/latest.weights.h5"
click node_nls_evaluate "https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Non_Linear_Shrodinger/nls_test_and_plot.py"
click node_burgers_discrete "https://github.com/aadharsh06/pinn/tree/main/discrete-time-models/Burgers_PDE"
click node_allen_cahn "https://github.com/aadharsh06/pinn/blob/main/discrete-time-models/Allen_Cahn/allen_rk_pinn.ipynb"
click node_allen_data "https://github.com/aadharsh06/pinn/blob/main/discrete-time-models/Allen_Cahn/AC.mat"
click node_allen_weights "https://github.com/aadharsh06/pinn/blob/main/discrete-time-models/Allen_Cahn/ac_latest.weights.h5"
click node_basic_coupled "https://github.com/aadharsh06/pinn/blob/main/coupled-equations/Basic_Coupled_PDE/Basic_coupling_pinn.ipynb"
click node_navier_stokes "https://github.com/aadharsh06/pinn/tree/main/coupled-equations/Naiver_Stokes"
click node_navier_data "https://github.com/aadharsh06/pinn/tree/main/coupled-equations/Naiver_Stokes"
click node_navier_weights "https://github.com/aadharsh06/pinn/blob/main/coupled-equations/Naiver_Stokes/latest.weights.h5"

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_burgers_train,node_burgers_plot,node_nls_train,node_nls_evaluate,node_researcher toneBlue
class node_burgers_discrete,node_allen_cahn toneAmber
class node_basic_coupled,node_navier_stokes toneMint
class node_burgers_data,node_burgers_weights,node_nls_data,node_nls_weights,node_allen_data,node_allen_weights,node_navier_data,node_navier_weights toneRose
```

## Components

### Continuous time

- [Burgers training](https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Burgers_PDE/main_burger_pde.py): `continuous-time-models/Burgers_PDE/main_burger_pde.py`
- [Burgers plotting](https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Burgers_PDE/plot_soln.py): `continuous-time-models/Burgers_PDE/plot_soln.py`
- [NLS training](https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Non_Linear_Shrodinger/nls_train.py): `continuous-time-models/Non_Linear_Shrodinger/nls_train.py`
- [NLS evaluation](https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Non_Linear_Shrodinger/nls_test_and_plot.py): `continuous-time-models/Non_Linear_Shrodinger/nls_test_and_plot.py`

### Discrete time

- [Discrete Burgers PINN](https://github.com/aadharsh06/pinn/tree/main/discrete-time-models/Burgers_PDE): `discrete-time-models/Burgers_PDE`
- [Allen–Cahn PINN](https://github.com/aadharsh06/pinn/blob/main/discrete-time-models/Allen_Cahn/allen_rk_pinn.ipynb): `discrete-time-models/Allen_Cahn/allen_rk_pinn.ipynb`

### Coupled systems

- [Basic coupled PINN](https://github.com/aadharsh06/pinn/blob/main/coupled-equations/Basic_Coupled_PDE/Basic_coupling_pinn.ipynb): `coupled-equations/Basic_Coupled_PDE/Basic_coupling_pinn.ipynb`
- [Navier–Stokes PINN](https://github.com/aadharsh06/pinn/tree/main/coupled-equations/Naiver_Stokes): `coupled-equations/Naiver_Stokes`

### Data and results

- [Burgers reference](https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Burgers_PDE/burgers_shock.mat): `continuous-time-models/Burgers_PDE/burgers_shock.mat`
- [Burgers weights](https://github.com/aadharsh06/pinn/tree/main/continuous-time-models/Burgers_PDE/weights): `continuous-time-models/Burgers_PDE/weights`
- [NLS reference](https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Non_Linear_Shrodinger/NLS.mat): `continuous-time-models/Non_Linear_Shrodinger/NLS.mat`
- [NLS weights](https://github.com/aadharsh06/pinn/blob/main/continuous-time-models/Non_Linear_Shrodinger/latest.weights.h5): `continuous-time-models/Non_Linear_Shrodinger/latest.weights.h5`
- [Allen–Cahn reference](https://github.com/aadharsh06/pinn/blob/main/discrete-time-models/Allen_Cahn/AC.mat): `discrete-time-models/Allen_Cahn/AC.mat`
- [Allen–Cahn weights](https://github.com/aadharsh06/pinn/blob/main/discrete-time-models/Allen_Cahn/ac_latest.weights.h5): `discrete-time-models/Allen_Cahn/ac_latest.weights.h5`
- [Flow references](https://github.com/aadharsh06/pinn/tree/main/coupled-equations/Naiver_Stokes): `coupled-equations/Naiver_Stokes`
- [Flow weights](https://github.com/aadharsh06/pinn/blob/main/coupled-equations/Naiver_Stokes/latest.weights.h5): `coupled-equations/Naiver_Stokes/latest.weights.h5`

### Other components

- **PINN user**

## Connections

- PINN user → Burgers training: runs training
- Burgers training → Burgers weights: saves weights
- Burgers training → Burgers reference: evaluates against
- Burgers plotting → Burgers weights: loads weights
- Burgers plotting → Burgers reference: plots reference
- PINN user → NLS training: runs training
- NLS training → NLS weights: saves weights
- NLS evaluation → NLS weights: loads weights
- NLS evaluation → NLS reference: evaluates against
- PINN user → Discrete Burgers PINN: chooses model
- PINN user → Allen–Cahn PINN: runs notebook
- PINN user → Basic coupled PINN: runs notebook
- PINN user → Navier–Stokes PINN: explores model
