Skip to content

Latest commit

 

History

38 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

MeshGTKmm_03

License C++ CMake

High-resolution tubular joint meshing toolkit with a GTKmm user interface, Abaqus export tooling, and a library of reusable finite-element primitives. Originally built for offshore T-joint design studies, the project now targets a modern developer workflow with containers, reproducible builds, and documentation automation.

Highlights

  • Fast quad/tri mesh generators for tubular joints, weld layers, and chord/brace transitions
  • GTKmm desktop UI (MeshGUI.glade) for parameter entry, preview, and batch generation
  • Abaqus/GID export helpers plus post-processing utilities
  • Fresh build tooling: portable Makefile, CMakeLists.txt, VS Code dev-container, and Docker dev image
  • Doxygen docs + pluggable test scaffolding ready for extension

Architecture (ASCII)

	    +------------------------------------+
	    |            GTKmm GUI (UI)           |
	    |  GUIwindow, dialogs, user inputs    |
	    +-----------------+------------------+
			      |
	  +-------------------+-------------------+
	  | Mesh Orchestration & Joint Modelling  |
	  |  JointModel, WorkingDirectory, SCF    |
	  +-------------------+-------------------+
			      |
	+---------------------+---------------------+
	|  Mesh Component Library (Geometry Core)   |
	|  NodeClass, QuadMeshXX, Triangle/Prism... |
	+---------------------+---------------------+
			      |
	+---------------------+---------------------+
	| Output & Post-Processing Pipelines        |
	| Abaqus_PostProc_Class, GID exporters      |
	+------------------------------------------+

Tech Stack (ASCII)

+-------------------------------------------------------------+
| Langs | C++14, GTKmm-3, Glibmm, Boost, GSL, PLplot          |
| Build | Make, CMake, pkg-config, ccache (opt)               |
| Tools | Docker, VS Code Dev Container, Valgrind, Doxygen    |
| Docs  | Doxygen, Graphviz, LaTeX toolchain                  |
+-------------------------------------------------------------+

Project Layout

MeshGTKmm_03/
|-- main.cpp                 # GTKmm entry point
|-- GUIwindow.{h,cpp}        # Gtk::Window implementation
|-- JointModel.{h,cpp}       # T-joint orchestration
|-- MeshComponents.{h,cpp}   # Mesh primitive registry
|-- QuadMesh*/               # Quad mesh variants & transitions
|-- TriangleClass.*, HexClass.*, PrismClass.*
|-- Abaqus_PostProc_Class.*  # FE export helpers
|-- MeshGUI.glade            # GtkBuilder UI definition
|-- Documentation/           # Doxygen outputs (generated)
|-- Logs/                    # Runtime and solver logs
|-- Makefile                 # Rich GNU Make workflow
|-- CMakeLists.txt           # Modern CMake alternative
|-- Dockerfile.dev           # Reproducible dev image
`-- .devcontainer/           # VS Code container config

Quick Start

1. Clone

git clone https://github.com/Hossein-Roshandel/MeshGTKmm_03.git
cd MeshGTKmm_03

2. Dev Container (Recommended)

  1. Install VS Code + Dev Containers extension.
  2. Open the folder, press Ctrl+Shift+PDev Containers: Reopen in Container.
  3. The container uses Dockerfile.dev and ships all toolchains (GTKmm, GSL, Boost, PLplot, Doxygen).

3. Native Dependencies (Ubuntu/Debian)

sudo apt update
sudo apt install build-essential cmake pkg-config ccache \
				 libgtkmm-3.0-dev libglibmm-2.4-dev \
		 libatkmm-1.6-dev libpangomm-1.4-dev libcairomm-1.0-dev \
		 libsigc++-2.0-dev libboost-all-dev libgsl-dev libplplot-dev \
		 doxygen graphviz valgrind

Build & Run

Makefile workflow

make            # build (default target)
make run        # build then launch GUI
make debug      # build with sanitizers
make release    # optimized build
make docs       # generate Doxygen docs into Documentation/html
make valgrind   # run with Valgrind and log to Logs/valgrind.log
make clean      # remove build artifacts

Code Quality & Linting

make lint           # run clang-tidy static analysis
make lint-fix       # run clang-tidy with automatic fixes
make format         # format code with clang-format
make format-check   # check if code is properly formatted
make check-quality  # run format-check and lint together

Artifacts land in build/bin/meshgtkmm_03 and config/scratch directories under build/.

CMake workflow

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
cmake --build build --target run           # build + run
cmake --build build --target docs          # generate documentation
cmake --build build --target lint          # run clang-tidy
cmake --build build --target lint-fix      # run clang-tidy with auto-fix
cmake --build build --target format        # format code
cmake --build build --target format-check  # check formatting
cmake --build build --target check-quality # complete quality check
cmake --install build --prefix ./dist      # staged install

Enable sanitizers or warnings tweaking:

cmake -S . -B build -DENABLE_SANITIZERS=ON -DENABLE_WARNINGS=ON

Docker Dev Image

  • Build locally: docker build -f Dockerfile.dev -t meshgtkmm-dev .
  • Run: docker run --rm -it -v "$PWD":/workspace meshgtkmm-dev
  • Inside the container you get make, cmake, GTKmm SDK, Boost, GSL, PLplot, Doxygen, Valgrind, and helpful aliases (ll, cls).

Documentation

  • Source configuration lives in Doxyfile.
  • Generated HTML/PDF artefacts are ignored via .gitignore.
  • make docs or cmake --build build --target docs rebuilds the docs.
  • Consider enabling the LaTeX toolchain (already pre-installed in the container) for PDF exports.

Testing & QA

  • make test is wired for future unit/integration suites (adds scaffolding under tests/).
  • make valgrind provides memory diagnostics.
  • Add Catch2/GoogleTest modules and wire them through CMake when ready (ENABLE_TESTING option already in place).

Code Quality & Standards

Linting with clang-tidy

The project includes .clang-tidy configuration for static analysis:

  • Detects common bugs, performance issues, and code smells
  • Enforces modern C++ best practices
  • Checks for memory safety and undefined behavior
  • Run with make lint or cmake --build build --target lint
  • Auto-fix issues with make lint-fix or cmake --build build --target lint-fix

Code Formatting with clang-format

The project includes .clang-format configuration for consistent code style:

  • Based on Google C++ Style Guide with custom adjustments
  • 4-space indentation, 120-column width
  • Automatic formatting with make format or cmake --build build --target format
  • Check formatting with make format-check or cmake --build build --target format-check

Installing Linter Tools

# Ubuntu/Debian
sudo apt-get install clang-tidy clang-format

# Already included in the dev container

Complete Quality Check

Run all quality checks at once:

make check-quality              # Makefile
cmake --build build --target check-quality  # CMake

Contributing

  • Run make check-deps before first build to ensure the toolchain is present.
  • Prefer feature branches off MeshGTKmm_04.
  • Keep the ASCII project diagrams up to date when modifying the architecture.
  • Document new build flags in this README.

License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.

Why BSD 3-Clause?

The BSD 3-Clause License is:

  • Permissive: Allows commercial and non-commercial use
  • Simple: Easy to understand and comply with
  • Academic-friendly: Ideal for research and educational projects
  • Compatible: Works well with most other open-source licenses
  • No copyleft: Derivatives don't need to be open source

This license allows you to:

  • ✅ Use the software for any purpose
  • ✅ Modify the source code
  • ✅ Distribute original or modified versions
  • ✅ Sublicense and use in proprietary software

The only requirements are:

  • Keep the copyright notice
  • Include the license text
  • Don't use the author's name for endorsement without permission

About

C++ Tube Meshing

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages