# snodgrassryan/regen33 architecture

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

- Interactive diagram: https://gitdiagram.com/snodgrassryan/regen33
- Repository: https://github.com/snodgrassryan/regen33

## Overview

##### Main Components

a) Input Processing Layer
- Two possible input paths:
- File-based input (data.dat for Windows version)
- Standard input (for Linux version)
- Input_mod.f90 as the primary input handler

b) Core Computation Layer
- Center this as the main processing unit
- Following computational modules:
- compute_mod.f90
- dlinpk.f90 (likely linear algebra operations)
- dwtmeta.f90
- he3props.f90 (Helium-3 properties)
- he4props.f90 (Helium-4 properties)
- he4state.f90 (Helium-4 state calculations)

c) Global State Management
- Globmod.f90 as a cross-cutting concern
- Interaction with other modules

d) Output Processing Layer
- Output_mod.f90
- System output paths

**┌─────────────────────────────────────────────┐**
- Platform Selection             │
- (header.f90 / headerpc.f90)         │
- ┘
- ↓
**┌─────────────────────────────────────────────┐**
- Input Processing Layer            │
- (main.f90/main_win.f90 → input_mod.f90) │
- ┘
- ↓
**┌─────────────────────────────────────────────┐**
- Global State Management             │
- (globmod.f90)                  │
- ┘
- ↓
**┌─────────────────────────────────────────────┐**
- Core Computation Layer              │
- [Show all computational modules here]     │
- ┘
- ↓
**┌─────────────────────────────────────────────┐**
- Output Processing Layer             │
- (output_mod.f90)                 │
- ┘

##### Notes Section
A notes section explaining:
- Build requirements
- Input file format requirements
- Platform-specific considerations
- Execution flow differences between platforms

- Clear hierarchical representation
- Text annotations
- Export to high-resolution formats

Remember to maintain a balance between showing enough detail to understand the system's architecture while keeping it clean and readable. The focus should be on the interaction between components rather than internal implementation details.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Platform Selection Layer
    subgraph PlatformLayer["Platform Selection Layer"]
        Header["header.f90"]
        HeaderPC["headerpc.f90"]
    end

    %% Input Processing Layer
    subgraph InputLayer["Input Processing Layer"]
        MainLinux["main.f90"]:::linux
        MainWin["main_win.f90"]:::windows
        InputMod["input_mod.f90"]:::input
        DataFile["data.dat"]:::file
        StdInput["Standard Input"]:::input
    end

    %% Global State Management
    subgraph GlobalLayer["Global State Management"]
        GlobMod["globmod.f90"]:::global
    end

    %% Core Computation Layer
    subgraph ComputeLayer["Core Computation Layer"]
        ComputeMod["compute_mod.f90"]:::compute
        DLinPK["dlinpk.f90"]:::compute
        DWTMeta["dwtmeta.f90"]:::compute
        He3Props["he3props.f90"]:::compute
        He4Props["he4props.f90"]:::compute
        He4State["he4state.f90"]:::compute
    end

    %% Output Processing Layer
    subgraph OutputLayer["Output Processing Layer"]
        OutputMod["output_mod.f90"]:::output
        SystemOutput["System Output"]:::output
    end

    %% Relationships
    Header --> MainLinux
    HeaderPC --> MainWin
    MainLinux --> StdInput
    MainWin --> DataFile
    StdInput --> InputMod
    DataFile --> InputMod
    InputMod --> GlobMod
    GlobMod --> ComputeMod
    GlobMod --> He3Props
    GlobMod --> He4Props
    ComputeMod --> DLinPK
    ComputeMod --> DWTMeta
    He4Props --> He4State
    ComputeMod --> OutputMod
    OutputMod --> SystemOutput

    %% Click Events
    click Header "https://github.com/snodgrassryan/REGEN33/blob/main/header.f90"
    click HeaderPC "https://github.com/snodgrassryan/REGEN33/blob/main/headerpc.f90"
    click MainLinux "https://github.com/snodgrassryan/REGEN33/blob/main/main.f90"
    click MainWin "https://github.com/snodgrassryan/REGEN33/blob/main/main_win.f90"
    click InputMod "https://github.com/snodgrassryan/REGEN33/blob/main/input_mod.f90"
    click GlobMod "https://github.com/snodgrassryan/REGEN33/blob/main/globmod.f90"
    click ComputeMod "https://github.com/snodgrassryan/REGEN33/blob/main/compute_mod.f90"
    click DLinPK "https://github.com/snodgrassryan/REGEN33/blob/main/dlinpk.f90"
    click DWTMeta "https://github.com/snodgrassryan/REGEN33/blob/main/dwtmeta.f90"
    click He3Props "https://github.com/snodgrassryan/REGEN33/blob/main/he3props.f90"
    click He4Props "https://github.com/snodgrassryan/REGEN33/blob/main/he4props.f90"
    click He4State "https://github.com/snodgrassryan/REGEN33/blob/main/he4state.f90"
    click OutputMod "https://github.com/snodgrassryan/REGEN33/blob/main/output_mod.f90"

    %% Styles
    classDef linux fill:#A8D5BA
    classDef windows fill:#B8D1F3
    classDef input fill:#95DAE7
    classDef output fill:#95DAE7
    classDef compute fill:#98FB98
    classDef global fill:#FFE4B5
    classDef file fill:#D3D3D3

    %% Legend
    subgraph Legend["Legend"]
        L1["Linux Component"]:::linux
        L2["Windows Component"]:::windows
        L3["Input/Output Component"]:::input
        L4["Computation Module"]:::compute
        L5["Global State"]:::global
        L6["File"]:::file
    end
```
