# wasimniyazmunshi/deal.ii-implementation-of-phase-field-fracture-model-in-3d architecture

> Architecture diagram of the GitHub repository wasimniyazmunshi/deal.ii-implementation-of-phase-field-fracture-model-in-3d, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wasimniyazmunshi/deal.ii-implementation-of-phase-field-fracture-model-in-3d
- Repository: https://github.com/wasimniyazmunshi/deal.ii-implementation-of-phase-field-fracture-model-in-3d

## Overview

##### Main Components
- Simulation Driver & Main Solver (phase_field.cc): At the heart of the project is the main simulation executable which initializes the problem, sets up the computational domain, and iteratively solves for the displacement and damage (fracture) fields.
- Finite Element (FE) Framework: This clearly leverages the deal.II library, so include a block that represents finite element preprocessing, mesh generation, and adaptive mesh refinement (AMR). This component handles tasks such as mesh creation and refinement as needed by the phase-field method.
- Physical Models & Governing Equations: Represent the core mathematical models, including the force balance/quasi-static equilibrium and the phase-field (damage) evolution equations. This module encapsulates the physics of fracture propagation.
- Parallel Computing & MPI Support: Since the README outlines that the simulation is executed with mpirun -np n, include a parallel computing module that organizes domain decomposition, communication between processors, and synchronization.
- Build/Configuration and Execution: While not a runtime component per se, it’s useful to note the build process (using CMake – as seen in CMakeLists.txt, cmake_install.cmake, etc.) and how you switch between release and debug modes via make. This illustrates how the executable is prepared and run.

##### Relationships and Data Flow
- That the FE Framework uses external libraries (deal.II and linear algebra solvers) by connecting these blocks with clear labels.

##### Architectural Patterns and Important Technologies
- Although the code is simple in terms of file structure, it nonetheless relies on proven design principles for high performance computing (HPC)—such as domain decomposition and adaptive refinement.
- You may also wish to note any modular separation between input configuration (like mesh definitions, material properties, and simulation parameters) and the computation engine.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Build & Configuration Layer
    subgraph "Build & Configuration"
        CMake1["CMakeLists.txt"]:::build
        CMake2["cmake_install.cmake"]:::build
    end

    %% Simulation Driver Layer
    SD["Simulation Driver & Main Solver (phase_field.cc)"]:::simulation

    %% Computational Modules Layer
    FEM["Finite Element & AMR (deal.II integration)"]:::fe
    Physics["Governing Equations Module (Phase-Field & Force Balance)"]:::physics
    MPI["Parallel Computing & MPI Support (phase_field.cc)"]:::mpi

    %% External Library
    DEAL["deal.II Library"]:::external

    %% Connections
    CMake1 --> SD
    CMake2 --> SD
    SD --> FEM
    SD --> Physics
    SD --> MPI
    FEM -->|"uses"| DEAL

    %% Click Events
    click CMake1 "https://github.com/wasimniyazmunshi/deal.ii-implementation-of-phase-field-fracture-model-in-3d/blob/main/CMakeLists.txt"
    click CMake2 "https://github.com/wasimniyazmunshi/deal.ii-implementation-of-phase-field-fracture-model-in-3d/blob/main/cmake_install.cmake"
    click SD "https://github.com/wasimniyazmunshi/deal.ii-implementation-of-phase-field-fracture-model-in-3d/blob/main/phase_field.cc"
    click FEM "https://github.com/wasimniyazmunshi/deal.ii-implementation-of-phase-field-fracture-model-in-3d/blob/main/phase_field.cc"
    click Physics "https://github.com/wasimniyazmunshi/deal.ii-implementation-of-phase-field-fracture-model-in-3d/blob/main/phase_field.cc"
    click MPI "https://github.com/wasimniyazmunshi/deal.ii-implementation-of-phase-field-fracture-model-in-3d/blob/main/phase_field.cc"

    %% Styles
    classDef build fill:#f9c,stroke:#333,stroke-width:2px
    classDef simulation fill:#ccf,stroke:#333,stroke-width:2px
    classDef fe fill:#cfc,stroke:#333,stroke-width:2px
    classDef physics fill:#fc9,stroke:#333,stroke-width:2px
    classDef mpi fill:#cff,stroke:#333,stroke-width:2px
    classDef external fill:#ffc,stroke:#333,stroke-width:2px
```
