# csatizoltan/cristalx architecture

> Architecture diagram of the GitHub repository csatizoltan/cristalx, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/csatizoltan/cristalx
- Repository: https://github.com/csatizoltan/cristalx

## Overview

##### Main Components Identification
The system should be represented with these key components:

a. Core Processing Modules:
- Image Processing (segmentation.py)
- Geometry Processing (geometry.py)
- Analysis Tools (analysis.py)
- CAD Integration (cad.py)
- Mesh Handling (meshing.py)
- Simulation Components (simulation.py)
- Digital Image Correlation (dic.py)

b. External Integrations:
- Abaqus Interface (abaqus.py)
- Salome Interface (salome.py)
- MED File Handler (med.py)

c. Support Components:
- Utilities (utils.py)
- Profiling Tools (profiling.py)

##### Component Relationships

Key interactions:
- Data flow between segmentation → geometry → meshing
- Field mapping between DIC and mesh components
- Integration points with external software (Abaqus, Salome)
- Utility functions supporting all modules

## Diagram (Mermaid)

```mermaid
graph TB
    %% Style Definitions
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef external fill:#e67e22,stroke:#d35400,color:white
    classDef support fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef docs fill:#9b59b6,stroke:#8e44ad,color:white
    classDef runner fill:#2ecc71,stroke:#27ae60,color:white
    classDef data fill:#f1c40f,stroke:#f39c12,color:black

    %% Documentation Layer
    subgraph Documentation
        Docs["Documentation"]
        API["API Docs"]
        UserGuide["User Guide"]
        DevGuide["Development Guide"]
    end
    
    %% Entry Points Layer
    subgraph "Entry Points"
        ExampleNB["Example Notebook"]
        SegRunner["Segmentation Runner"]
        GeoRunner["Geometry Runner"]
        CADRunner["CAD Runner"]
        DICRunner["DIC Runner"]
        AnalysisRunner["Analysis Runner"]
        SimRunner["Simulation Runners"]
    end

    %% Core Processing Layer
    subgraph "Core Processing"
        ImgProc["Image Processing"]
        GeoProc["Geometry Processing"]
        Analysis["Analysis Tools"]
        CAD["CAD Integration"]
        Mesh["Mesh Handling"]
        Sim["Simulation Components"]
        DIC["Digital Image Correlation"]
    end

    %% External Integration Layer
    subgraph "External Integration"
        Abaqus["Abaqus Interface"]
        Salome["Salome Interface"]
        MED["MED File Handler"]
    end

    %% Support Layer
    subgraph "Support"
        Utils["Utilities"]
        Profiling["Profiling Tools"]
        TestData["Test Data"]
    end

    %% Relationships
    ImgProc --> GeoProc
    GeoProc --> Mesh
    Mesh --> Sim
    DIC --> Analysis
    CAD --> Mesh
    
    Utils --> ImgProc
    Utils --> GeoProc
    Utils --> Analysis
    Utils --> CAD
    Utils --> Mesh
    Utils --> Sim
    Utils --> DIC
    
    Sim --> Abaqus
    Sim --> Salome
    Mesh --> MED
    
    SegRunner --> ImgProc
    GeoRunner --> GeoProc
    CADRunner --> CAD
    DICRunner --> DIC
    AnalysisRunner --> Analysis
    SimRunner --> Sim

    %% Click Events
    click ImgProc "https://github.com/CsatiZoltan/CristalX/blob/master/grains/segmentation.py"
    click GeoProc "https://github.com/CsatiZoltan/CristalX/blob/master/grains/geometry.py"
    click Analysis "https://github.com/CsatiZoltan/CristalX/blob/master/grains/analysis.py"
    click CAD "https://github.com/CsatiZoltan/CristalX/blob/master/grains/cad.py"
    click Mesh "https://github.com/CsatiZoltan/CristalX/blob/master/grains/meshing.py"
    click Sim "https://github.com/CsatiZoltan/CristalX/blob/master/grains/simulation.py"
    click DIC "https://github.com/CsatiZoltan/CristalX/blob/master/grains/dic.py"
    click Abaqus "https://github.com/CsatiZoltan/CristalX/blob/master/grains/abaqus.py"
    click Salome "https://github.com/CsatiZoltan/CristalX/blob/master/grains/salome.py"
    click MED "https://github.com/CsatiZoltan/CristalX/blob/master/grains/med.py"
    click Utils "https://github.com/CsatiZoltan/CristalX/blob/master/grains/utils.py"
    click Profiling "https://github.com/CsatiZoltan/CristalX/blob/master/grains/profiling.py"
    click SegRunner "https://github.com/CsatiZoltan/CristalX/blob/master/scripts/run_segmentation.py"
    click GeoRunner "https://github.com/CsatiZoltan/CristalX/blob/master/scripts/run_geometry.py"
    click CADRunner "https://github.com/CsatiZoltan/CristalX/blob/master/scripts/run_cad.py"
    click DICRunner "https://github.com/CsatiZoltan/CristalX/blob/master/scripts/run_dic.py"
    click AnalysisRunner "https://github.com/CsatiZoltan/CristalX/blob/master/scripts/run_analysis.py"
    click SimRunner "https://github.com/CsatiZoltan/CristalX/blob/master/scripts/run_simulation_geometry.py"
    click Docs "https://github.com/CsatiZoltan/CristalX/tree/master/docs/source/"
    click API "https://github.com/CsatiZoltan/CristalX/blob/master/docs/source/api.rst"
    click UserGuide "https://github.com/CsatiZoltan/CristalX/blob/master/docs/source/user_guide.rst"
    click DevGuide "https://github.com/CsatiZoltan/CristalX/blob/master/docs/source/dev_guide.rst"
    click ExampleNB "https://github.com/CsatiZoltan/CristalX/blob/master/notebooks/example_application.ipynb"
    click TestData "https://github.com/CsatiZoltan/CristalX/tree/master/scripts/data/"

    %% Style Applications
    class ImgProc,GeoProc,Analysis,CAD,Mesh,Sim,DIC core
    class Abaqus,Salome,MED external
    class Utils,Profiling support
    class Docs,API,UserGuide,DevGuide docs
    class SegRunner,GeoRunner,CADRunner,DICRunner,AnalysisRunner,SimRunner runner
    class TestData data
    class ExampleNB runner
```
