From dee6a3599dbfc6f7da62aa6a471b5e11941d7e79 Mon Sep 17 00:00:00 2001
From: cantordust <43831101+cantordust@users.noreply.github.com>
Date: Tue, 17 Mar 2026 17:25:42 +0100
Subject: [PATCH 1/7] - Moved to Meson as the build system.
TODO
====
- Update `README.md` with instructions on how to compile the source with meson.
---
meson.build | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 meson.build
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..44fecec
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,17 @@
+project('corticalsim', 'cpp')
+
+# Compiler flags
+# add_global_arguments('-O2', language : 'cpp')
+
+# Directories containing header files
+incdir = include_directories('include')
+
+# Directories containing source files
+subdir('src')
+
+# Dependencies
+eigen = dependency('eigen3')
+boost = dependency('boost', modules : ['filesystem'])
+
+# Executable(s)
+executable('corticalsim3d', sources, include_directories: incdir, dependencies: [eigen, boost])
From c7d4ad78d43585fe42231cd74513a366b70559a7 Mon Sep 17 00:00:00 2001
From: cantordust <43831101+cantordust@users.noreply.github.com>
Date: Wed, 18 Mar 2026 19:09:30 +0100
Subject: [PATCH 2/7] - Moved `src/meson.build` into this branch (separation of
concerns).
---
src/meson.build | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 src/meson.build
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..a3018b3
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,12 @@
+sources = files('eig3.cpp',
+ 'IO-analysis.cpp',
+ 'meshImport.cpp',
+ 'parameters.cpp',
+ 'queue.cpp',
+ 'microtubule.cpp',
+ 'system.cpp',
+ 'geometry-generic.cpp',
+ 'geometry-special.cpp',
+ 'main.cpp'
+)
+
From fb6c56d3a1545fee640206ade638e934b9be4390 Mon Sep 17 00:00:00 2001
From: cantordust <43831101+cantordust@users.noreply.github.com>
Date: Wed, 18 Mar 2026 19:13:08 +0100
Subject: [PATCH 3/7] - Removed old build config files.
---
config/modelCMT_LINUX.cbp | 58 ----------------------------------
config/modelCMT_WINDOWS.cbp | 63 -------------------------------------
2 files changed, 121 deletions(-)
delete mode 100644 config/modelCMT_LINUX.cbp
delete mode 100644 config/modelCMT_WINDOWS.cbp
diff --git a/config/modelCMT_LINUX.cbp b/config/modelCMT_LINUX.cbp
deleted file mode 100644
index 74b02ef..0000000
--- a/config/modelCMT_LINUX.cbp
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/config/modelCMT_WINDOWS.cbp b/config/modelCMT_WINDOWS.cbp
deleted file mode 100644
index 10f3b1e..0000000
--- a/config/modelCMT_WINDOWS.cbp
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
From 2d7a3918b477ecf86fcb651e05e22cee780a4e1e Mon Sep 17 00:00:00 2001
From: cantordust <43831101+cantordust@users.noreply.github.com>
Date: Wed, 18 Mar 2026 22:17:52 +0100
Subject: [PATCH 4/7] - Updated the README with more up-to-date information on
how to compile and run `corticalsim3D`: - Updated the instructions for
installing dependencies on Windows (to be verified). - Added instructions
on setting up and compiling `corticalsim3D`. - Added a Run section (to be
updated).
---
README.md | 227 ++++++++++++++++++++++--------------------------------
1 file changed, 94 insertions(+), 133 deletions(-)
diff --git a/README.md b/README.md
index b428f72..5c48dfc 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,10 @@
-# modelCMT (cortical microtubule dynamics)
+# corticalsim3D (cortical microtubule dynamics)
-
+
+This is a program for simulating cortical microtubule dynamics (CMT) on experimentally extracted microscopic images of cell
-This is a program for simulating cortical microtubule dynamics (CMT) on experimentally extracted microscopic images of cell
-
-Application:
+Application:
https://www.sciencedirect.com/science/article/pii/S0960982218309242
@@ -15,131 +14,93 @@ https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005959
Testing and contributing is very welcome, especially if you can contribute with new algorithms and features.
-## WINDOWS
-
- ### install gcc/g++
-
- download Mingw: https://nuwen.net/mingw.html
-
- run mingw-xx.exe -> this will create a folder MinGw
-
- copy MinGw to C:\
-
- add environment variable: C:\MinGW or C:\MinGW\bin
-
- ### install eigen:
-
- download eigen: https://drive.google.com/file/d/1VFLlKJI9EaSP9VUaeV8vmPQYkqdIIJPg/view?usp=sharing
-
- extract "eigen-3.4.0" folder and rename it to "Eigen"
-
- copy "Eigen" folder to C:\Program Files
-
- ### install boost:
-
- download boost: https://drive.google.com/file/d/1apu5_am2kJj7HvXJNPhn30k_ryi3gJDf/view?usp=sharing
-
- extract "boost_1_77_0" folder and rename it to "Boost"
-
- copy "Boost" to C:\Program Files
-
- ### get the source code
-
- Option 1: Download the package from the Github: https://github.com/HiBandan/modelCMT/archive/refs/heads/main.zip
-
-
- Option 2: Clone from terminal:
-
- git clone https://github.com/HiBandan/modelCMT.git
-
- ### install Code::Blocks:
- https://code-blocks.en.uptodown.com/windows
-
- ### run
-
- open (with Code::Blocks): modelCMT_WINDOWS.cbp
-
- Projects -> modelCMT.cbp -> add files
- -> modules/cppFiles (all files except 'inline.cpp')
- -> modules/headFiles (all files)
- -> modules/paramFiles (all files)
-
- settings -> compiler -> search directories (compiler) -> add
-
- -> C:\Program Files\Eigen
- -> C:\Program Files\Boost
-
- project ->
-
- set program’s arguments: ./modules/paramFiles/parameters_ARRAY.txt
- build options -> search directories -> compiler -> add -> modules/cppFiles
- build options -> search directories -> compiler -> add -> modules/headFiles
- build options -> linker settings -> add -> boost_system
- build options -> linker settings -> add -> boost_filesystem
- build options -> linker settings -> add -> libboost_filesystem
-
- run
-
-## LINUX
-
- ### install gcc/g++
-
- sudo apt update
- sudo apt install build-essential
-
- ### install eigen:
-
- download eigen: https://drive.google.com/file/d/1VFLlKJI9EaSP9VUaeV8vmPQYkqdIIJPg/view?usp=sharing
-
- extract "eigen-3.4.0" folder and rename it to "Eigen"
-
- copy "Eigen" folder to /usr/local/include
-
- ### install boost:
-
- download boost: https://drive.google.com/file/d/1apu5_am2kJj7HvXJNPhn30k_ryi3gJDf/view?usp=sharing
-
- extract "boost_1_77_0" folder and rename it to "Boost"
-
- copy "Boost" to /usr/local/include
-
- ### get the source code
-
- Option 1: Download the package from the Github: https://github.com/HiBandan/modelCMT/archive/refs/heads/main.zip
-
- Option 2: Clone from terminal:
-
- git clone https://github.com/HiBandan/modelCMT.git
-
- ### install Code::Blocks:
-
- sudo add-apt-repository ppa:damien-moore/codeblocks-stable
-
- sudo apt update
-
- sudo apt install codeblocks codeblocks-contrib
-
- ### run
-
- open (with code-block): modelCMT_LINUX.cbp
-
- Projects -> modelCMT.cbp -> add files
- -> modules/cppFiles (all files except 'inline.cpp')
- -> modules/headFiles (all files)
- -> modules/paramFiles (all files)
-
- settings -> compiler -> search directories (compiler) -> add
-
- -> /usr/local/include/Eigen
- -> /usr/local/include/Boost
-
- project ->
-
- set program’s arguments: ./modules/paramFiles/parameters_ARRAY.txt
- build options -> search directories -> compiler -> add -> modules/cppFiles
- build options -> search directories -> compiler -> add -> modules/headFiles
- build options -> linker settings -> add -> boost_system
- build options -> linker settings -> add -> boost_filesystem
- build options -> linker settings -> add -> libboost_filesystem
-
- run
+# Installation
+
+NOTE: You need a compiler that supports the C++ 14 standard as a minimum.
+
+## Install the dependencies
+
+`corticalsim3D` depends on Eigen and Boost (however, the latter will be dropped soon). In addition, you will need [Meson](https://mesonbuild.com/index.html) to build the executables, as well as a fairly recent C++ compiler (GCC or Clang) supporting the C++ 14 standard. The following instructions outline the process of installing the dependencies on different platforms, as well as compiling and installing the `corticalsim3D` package itself.
+
+### Windows
+
+Most dependencies need to be installed manually on Windows.
+
+1. GCC
+
+ 1. Download [MinGW](https://www.mingw-w64.org/)
+ 1. Run `mingw-xx.exe` (this will create a folder called `MinGw`)
+ 1. Copy the `MinGw` folder to `C:\`
+ 1. Add `C:\MinGW` and `C:\MinGW\bin` to the system path
+
+1. Eigen
+
+ 1. Download [Eigen](https://libeigen.gitlab.io/)
+ 1. Extract `eigen-3.4.0` folder and rename it to `Eigen`
+ 1. Copy the `Eigen` folder to `C:\Program Files`
+
+1. Boost
+
+ Download and install [Boost](https://www.boost.org/releases/latest/).
+
+ NOTE: The Boost dependency will be deprecated and removed soon.
+
+1. Meson
+
+ Use the official [Meson installer for Windows](https://github.com/mesonbuild/meson/releases). The installer also bundles the Ninja dependency, so you don't have to install that separately.
+
+### Linux
+
+Please use your package manager to install all the dependencies. Most Linux distributions provide packages for GCC, Meson, Ninja, Boost and Eigen.
+
+Instructions for Ubuntu (*to be confirmed, may be incomplete*):
+
+```bash
+sudo apt update && apt upgrade
+sudo apt install gcc libboost-all-dev libeigen3-dev meson ninja-build
+```
+
+## Compile
+
+1. First, clone the `corticalsim3D` repository:
+
+ ```bash
+ git clone https://github.com/NLeSC/corticalsim3D
+ ```
+
+ NOTE: It is recommended that you do **_not_** enter the `corticalsim3D` directory. The next steps assume an out-of-source build setup, meaning that the directory (where the package will be compiled) will be outside the source tree. This has several advantages, such as precluding the possibility of accidentally committing build artefacts to the repository.
+
+1. Configure the build with `meson`:
+
+ ```bash
+ meson setup build corticalsim3D
+ ```
+
+ This command uses the Meson build system to bootstrap everything that we need for the compilation into a directory called `build` from the sources located in the `corticalsim3D` directory.
+
+1. Enter the build directory and compile the source:
+
+ ```bash
+ cd build
+ meson compile
+ ```
+
+ This will generate an executable file called `corticalsim3D` in the current directory (`build`).
+
+## Run
+
+Run the `corticalsim3D` executable with a parameter file as the first argument. Two example parameter files are provided in the `corticalsim3D/config` directory: `parameters_ARRAY.txt` and `parameters_FLY.txt`. The
+
+```bash
+./corticalsim3d ../corticalsim3D/config/parameters_ARRAY.txt
+```
+
+NOTE: Currently, the program crashes for both parameter files with the error `Euler condition violated ... emergency exit !!!`.
+
+# TODO
+
+- [ ] Reproduce the installation instructions for Windows and update them as necessary.
+- [ ] Add specific installation instructions for dependencies for different Linux distributions (Ubuntu, Debian, Arch...).
+- [ ] Add installation instructions for MacOSX.
+- [ ] Meson: Option to install the executable into a custom directory
+- [ ] Parameter files: debug (`Euler condition violated ...`)
From 133d83e84f1d7d1a9be5ff1d04be007cc847c210 Mon Sep 17 00:00:00 2001
From: cantordust <43831101+cantordust@users.noreply.github.com>
Date: Thu, 19 Mar 2026 12:11:19 +0100
Subject: [PATCH 5/7] - Fixed insufficient dependency specification for eigen
in `meson.build`
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 44fecec..7bf1c38 100644
--- a/meson.build
+++ b/meson.build
@@ -10,7 +10,7 @@ incdir = include_directories('include')
subdir('src')
# Dependencies
-eigen = dependency('eigen3')
+eigen = dependency('Eigen3', modules: ['Eigen3::Eigen'])
boost = dependency('boost', modules : ['filesystem'])
# Executable(s)
From 9c0333866987c8056989733ebf99f3b5e43ddf5f Mon Sep 17 00:00:00 2001
From: cantordust <43831101+cantordust@users.noreply.github.com>
Date: Thu, 19 Mar 2026 12:12:28 +0100
Subject: [PATCH 6/7] - Updated directory paths in
`config/parameters_ARRAY.txt`.
---
config/parameters_ARRAY.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config/parameters_ARRAY.txt b/config/parameters_ARRAY.txt
index e1547f1..5323c66 100644
--- a/config/parameters_ARRAY.txt
+++ b/config/parameters_ARRAY.txt
@@ -1,8 +1,8 @@
#########################
### Input-Output path ###
#########################
-inputDir ./inputData
-outputDir ./inputData
+inputDir ../corticalsim3D/data
+outputDir ../corticalsim3D/data
createSubdir 0
##################################
### changing parameters on fly ###
From b0bf3aa64655b3394da7d71044534d70be8687dc Mon Sep 17 00:00:00 2001
From: cantordust <43831101+cantordust@users.noreply.github.com>
Date: Thu, 19 Mar 2026 12:16:35 +0100
Subject: [PATCH 7/7] - Updated `README.md`
---
README.md | 3 ---
1 file changed, 3 deletions(-)
diff --git a/README.md b/README.md
index 5c48dfc..c423814 100644
--- a/README.md
+++ b/README.md
@@ -95,12 +95,9 @@ Run the `corticalsim3D` executable with a parameter file as the first argument.
./corticalsim3d ../corticalsim3D/config/parameters_ARRAY.txt
```
-NOTE: Currently, the program crashes for both parameter files with the error `Euler condition violated ... emergency exit !!!`.
-
# TODO
- [ ] Reproduce the installation instructions for Windows and update them as necessary.
- [ ] Add specific installation instructions for dependencies for different Linux distributions (Ubuntu, Debian, Arch...).
- [ ] Add installation instructions for MacOSX.
- [ ] Meson: Option to install the executable into a custom directory
-- [ ] Parameter files: debug (`Euler condition violated ...`)