# tlcfem/ezp architecture

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

- Interactive diagram: https://gitdiagram.com/tlcfem/ezp
- Repository: https://github.com/tlcfem/ezp

## Overview

ezp wraps distributed dense ScaLAPACK and sparse PARDISO, MUMPS, and Lis solvers behind C++ interfaces. In the library workflow, an application prepares matrices on the root process, invokes a solver, and receives the solution there; dense solves also retain factorization for reuse. The repository additionally provides standalone solver executables for MPI-capable callers, including Python. The README documents precision/indexing coverage and advanced expert-driver features; unsampled implementations are represented at their supported directory paths, and links without direct evidence are omitted.

Main entry points: [`ezp/pgesv.hpp`](https://github.com/tlcfem/ezp/blob/master/ezp/pgesv.hpp) (General Dense), [`ezp/pardiso.hpp`](https://github.com/tlcfem/ezp/blob/master/ezp/pardiso.hpp) (PARDISO Adapter), [`ezp/mumps.hpp`](https://github.com/tlcfem/ezp/blob/master/ezp/mumps.hpp) (MUMPS Adapter), [`ezp/lis.hpp`](https://github.com/tlcfem/ezp/blob/master/ezp/lis.hpp) (Lis Adapter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Solver API"]
  node_abstract["Solver Abstractions"]
  node_traits["Matrix and MPI<br/>[traits.hpp]"]
end

subgraph group_dense["Dense Solvers"]
  node_dense_api["Dense Solver API<br/>[full_solver.hpp]"]
  node_general["General Dense<br/>[pgesv.hpp]"]
  node_expert["Expert Dense<br/>[pgesvx.hpp]"]
  node_positive["Positive Definite<br/>[pposv.hpp]"]
  node_band["Band Solvers<br/>[pgbsv.hpp]"]
end

subgraph group_sparse["Sparse Solvers"]
  node_sparse_api["Sparse CSR API<br/>[sparse_solver.hpp]"]
  node_pardiso["PARDISO Adapter<br/>[pardiso.hpp]"]
  node_mumps["MUMPS Adapter<br/>[mumps.hpp]"]
  node_lis["Lis Adapter<br/>[lis.hpp]"]
end

subgraph group_standalone["Standalone Runtime"]
  node_standalone_callers["MPI Callers<br/>[runner.py]"]
  node_runner["Solver Launcher<br/>[runner.cpp]"]
  node_solver_service["Solver Executables<br/>[solver.mumps.cpp]"]
  node_argument_parser["Argument Parser<br/>[parser.hpp]"]
  node_mumps_options["MUMPS Options<br/>[mumps.parser.hpp]"]
  node_pardiso_options["PARDISO Options<br/>[pardiso.parser.hpp]"]
end

subgraph group_vendor["Solver Backends"]
  node_scalapack["ScaLAPACK"]
  node_mumps_backend["MUMPS Backend"]
  node_pardiso_backend["MKL PARDISO"]
  node_lis_backend["Lis Backend"]
end

node_application(("Application"))
node_root_result["Root Solution"]

node_application -->|"calls solve"| node_general
node_general -.->|"uses MPI grid"| node_traits
node_general -.->|"solves distributed"| node_scalapack
node_expert -.->|"expert solve"| node_scalapack
node_positive -.->|"positive solve"| node_scalapack
node_band -.->|"band solve"| node_scalapack
node_application -.->|"selects solver"| node_pardiso
node_application -.->|"selects solver"| node_mumps
node_application -.->|"selects solver"| node_lis
node_pardiso -->|"implements"| node_sparse_api
node_mumps -->|"implements"| node_sparse_api
node_pardiso -->|"invokes backend"| node_pardiso_backend
node_mumps -->|"invokes backend"| node_mumps_backend
node_lis -.->|"invokes backend"| node_lis_backend
node_standalone_callers -->|"launches worker"| node_runner
node_runner -.->|"spawns solver"| node_solver_service
node_solver_service -.->|"returns solution"| node_root_result
node_mumps_options -->|"uses parsing"| node_argument_parser
node_pardiso_options -->|"uses parsing"| node_argument_parser
node_application -->|"receives solution"| node_root_result

click node_abstract "https://github.com/tlcfem/ezp/blob/master/ezp/abstract/abstract_solver.hpp"
click node_traits "https://github.com/tlcfem/ezp/blob/master/ezp/abstract/traits.hpp"
click node_dense_api "https://github.com/tlcfem/ezp/blob/master/ezp/abstract/full_solver.hpp"
click node_general "https://github.com/tlcfem/ezp/blob/master/ezp/pgesv.hpp"
click node_expert "https://github.com/tlcfem/ezp/blob/master/ezp/pgesvx.hpp"
click node_positive "https://github.com/tlcfem/ezp/blob/master/ezp/pposv.hpp"
click node_band "https://github.com/tlcfem/ezp/blob/master/ezp/pgbsv.hpp"
click node_sparse_api "https://github.com/tlcfem/ezp/blob/master/ezp/abstract/sparse_solver.hpp"
click node_pardiso "https://github.com/tlcfem/ezp/blob/master/ezp/pardiso.hpp"
click node_mumps "https://github.com/tlcfem/ezp/blob/master/ezp/mumps.hpp"
click node_lis "https://github.com/tlcfem/ezp/blob/master/ezp/lis.hpp"
click node_standalone_callers "https://github.com/tlcfem/ezp/blob/master/standalone/runner.py"
click node_runner "https://github.com/tlcfem/ezp/blob/master/standalone/runner.cpp"
click node_solver_service "https://github.com/tlcfem/ezp/blob/master/standalone/solver.mumps.cpp"
click node_argument_parser "https://github.com/tlcfem/ezp/blob/master/ezp/parser.hpp"
click node_mumps_options "https://github.com/tlcfem/ezp/blob/master/ezp/mumps.parser.hpp"
click node_pardiso_options "https://github.com/tlcfem/ezp/blob/master/ezp/pardiso.parser.hpp"
click node_mumps_backend "https://github.com/tlcfem/ezp/tree/master/external/mumps"
click node_lis_backend "https://github.com/tlcfem/ezp/tree/master/external/lis"

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_abstract,node_traits toneBlue
class node_dense_api,node_general,node_expert,node_positive,node_band toneAmber
class node_sparse_api,node_pardiso,node_mumps,node_lis toneMint
class node_standalone_callers,node_runner,node_solver_service,node_argument_parser,node_mumps_options,node_pardiso_options toneRose
class node_scalapack,node_mumps_backend,node_pardiso_backend,node_lis_backend,node_application,node_root_result toneIndigo
```

## Components

### Solver API

- [Solver Abstractions](https://github.com/tlcfem/ezp/blob/master/ezp/abstract/abstract_solver.hpp): `ezp/abstract/abstract_solver.hpp`
- [Matrix and MPI](https://github.com/tlcfem/ezp/blob/master/ezp/abstract/traits.hpp): `ezp/abstract/traits.hpp`

### Dense Solvers

- [Dense Solver API](https://github.com/tlcfem/ezp/blob/master/ezp/abstract/full_solver.hpp): `ezp/abstract/full_solver.hpp`
- [General Dense](https://github.com/tlcfem/ezp/blob/master/ezp/pgesv.hpp): `ezp/pgesv.hpp`
- [Expert Dense](https://github.com/tlcfem/ezp/blob/master/ezp/pgesvx.hpp): `ezp/pgesvx.hpp`
- [Positive Definite](https://github.com/tlcfem/ezp/blob/master/ezp/pposv.hpp): `ezp/pposv.hpp`
- [Band Solvers](https://github.com/tlcfem/ezp/blob/master/ezp/pgbsv.hpp): `ezp/pgbsv.hpp`

### Sparse Solvers

- [Sparse CSR API](https://github.com/tlcfem/ezp/blob/master/ezp/abstract/sparse_solver.hpp): `ezp/abstract/sparse_solver.hpp`
- [PARDISO Adapter](https://github.com/tlcfem/ezp/blob/master/ezp/pardiso.hpp): `ezp/pardiso.hpp`
- [MUMPS Adapter](https://github.com/tlcfem/ezp/blob/master/ezp/mumps.hpp): `ezp/mumps.hpp`
- [Lis Adapter](https://github.com/tlcfem/ezp/blob/master/ezp/lis.hpp): `ezp/lis.hpp`

### Standalone Runtime

- [MPI Callers](https://github.com/tlcfem/ezp/blob/master/standalone/runner.py): `standalone/runner.py`
- [Solver Launcher](https://github.com/tlcfem/ezp/blob/master/standalone/runner.cpp): `standalone/runner.cpp`
- [Solver Executables](https://github.com/tlcfem/ezp/blob/master/standalone/solver.mumps.cpp): `standalone/solver.mumps.cpp`
- [Argument Parser](https://github.com/tlcfem/ezp/blob/master/ezp/parser.hpp): `ezp/parser.hpp`
- [MUMPS Options](https://github.com/tlcfem/ezp/blob/master/ezp/mumps.parser.hpp): `ezp/mumps.parser.hpp`
- [PARDISO Options](https://github.com/tlcfem/ezp/blob/master/ezp/pardiso.parser.hpp): `ezp/pardiso.parser.hpp`

### Solver Backends

- **ScaLAPACK**
- [MUMPS Backend](https://github.com/tlcfem/ezp/tree/master/external/mumps): `external/mumps`
- **MKL PARDISO**
- [Lis Backend](https://github.com/tlcfem/ezp/tree/master/external/lis): `external/lis`

### Other components

- **Application**
- **Root Solution**

## Connections

- Application → General Dense: calls solve
- General Dense → Matrix and MPI: uses MPI grid
- General Dense → ScaLAPACK: solves distributed
- Expert Dense → ScaLAPACK: expert solve
- Positive Definite → ScaLAPACK: positive solve
- Band Solvers → ScaLAPACK: band solve
- Application → PARDISO Adapter: selects solver
- Application → MUMPS Adapter: selects solver
- Application → Lis Adapter: selects solver
- PARDISO Adapter → Sparse CSR API: implements (evidence: `ezp/pardiso.hpp`)
- MUMPS Adapter → Sparse CSR API: implements (evidence: `ezp/mumps.hpp`)
- PARDISO Adapter → MKL PARDISO: invokes backend (evidence: `ezp/pardiso.hpp`)
- MUMPS Adapter → MUMPS Backend: invokes backend (evidence: `ezp/mumps.hpp`)
- Lis Adapter → Lis Backend: invokes backend
- MPI Callers → Solver Launcher: launches worker
- Solver Launcher → Solver Executables: spawns solver
- Solver Executables → Root Solution: returns solution
- MUMPS Options → Argument Parser: uses parsing (evidence: `ezp/mumps.parser.hpp`)
- PARDISO Options → Argument Parser: uses parsing (evidence: `ezp/pardiso.parser.hpp`)
- Application → Root Solution: receives solution
