Installation¶
Requirements¶
a C++17 compiler (GCC 9+, Clang 10+, MSVC 2019+)
CMake 3.18 or newer
Python 3.9 or newer
Eigen 3.3 or newer — found automatically if installed, otherwise downloaded during the build. On macOS
brew install eigen cmakeis the quickest route; on Debian or Ubuntu,apt install libeigen3-dev cmakepybind11 — pulled in by the build
Optional at run time: meshio for reading and writing mesh files, PyYAML for input files, and matplotlib for the plotting in the examples.
From source¶
git clone https://github.com/MohamedAbdulHameed/dualmesh.git
cd dualmesh
pip install .[all]
The build uses scikit-build-core,
so the C++ library and the Python extension are compiled by pip in one
step. To work on the code, install it in editable mode:
pip install -e .[all,test]
Building the C++ library on its own¶
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
ctest --test-dir build --output-on-failure
This also builds the extension module into python/dualmesh, so setting
PYTHONPATH=$PWD/python is enough to use the package from the source tree
without installing it.
Running the tests¶
ctest --test-dir build --output-on-failure # C++ unit tests
pytest # verification against the book
The Python suite reproduces the published dual mesh results of every worked example of the book that has tabulated values; see Verification.
Checking the installation¶
python -c "import dualmesh as dm; print(dm.__version__, len(dm.registered_types()))"
dualmesh list --module heat_transfer