# webridging/vcfempy architecture

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

- Interactive diagram: https://gitdiagram.com/webridging/vcfempy
- Repository: https://github.com/webridging/vcfempy

## Overview

vcfempy is a Python library for geomechanics using the Voronoi Cell Finite Element Method. Its visible runtime centers on constructing and generating a 2D polygonal mesh, with material properties available for assigning to mesh regions. A separate flow-analysis class accepts that mesh, but the sampled implementation only provides mesh association and type checking; it does not show a solve or result workflow. The graph reflects those boundaries; flow-to-mesh and mesh-to-material relationships are supported by the sampled source and SOURCE INDEX references.

Main entry points: [`src/vcfempy/meshgen.py`](https://github.com/webridging/vcfempy/blob/main/src/vcfempy/meshgen.py) (2D mesh generation), [`src/vcfempy/flow.py`](https://github.com/webridging/vcfempy/blob/main/src/vcfempy/flow.py) (Flow analysis), [`src/vcfempy/materials.py`](https://github.com/webridging/vcfempy/blob/main/src/vcfempy/materials.py) (Material properties)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_model["Model definition"]
  node_mesh["2D mesh generation<br/>[meshgen.py]"]
  node_materials["Material properties<br/>[materials.py]"]
end

subgraph group_analysis["Analysis"]
  node_flow["Flow analysis<br/>[flow.py]"]
end

node_engineer(("Geomechanics user"))

node_engineer -->|"builds mesh"| node_mesh
node_mesh -->|"references materials"| node_materials
node_flow -->|"checks mesh type"| node_mesh

click node_mesh "https://github.com/webridging/vcfempy/blob/main/src/vcfempy/meshgen.py"
click node_materials "https://github.com/webridging/vcfempy/blob/main/src/vcfempy/materials.py"
click node_flow "https://github.com/webridging/vcfempy/blob/main/src/vcfempy/flow.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_mesh,node_materials,node_engineer toneBlue
class node_flow toneAmber
```

## Components

### Model definition

- [2D mesh generation](https://github.com/webridging/vcfempy/blob/main/src/vcfempy/meshgen.py): `src/vcfempy/meshgen.py`
- [Material properties](https://github.com/webridging/vcfempy/blob/main/src/vcfempy/materials.py): `src/vcfempy/materials.py`

### Analysis

- [Flow analysis](https://github.com/webridging/vcfempy/blob/main/src/vcfempy/flow.py): `src/vcfempy/flow.py`

### Other components

- **Geomechanics user**

## Connections

- Geomechanics user → 2D mesh generation: builds mesh (evidence: `README.rst`)
- 2D mesh generation → Material properties: references materials (evidence: `src/vcfempy/meshgen.py`)
- Flow analysis → 2D mesh generation: checks mesh type (evidence: `src/vcfempy/flow.py`)
