macOS Installation (macOS 13)
Prerequisites
Install system tools:
brew update
brew install ninja autoconf automake autoconf-archive pkg-config vtk
Clone Repository
git clone --recurse-submodules https://github.com/<your-org>/SPHinXsim.git
cd SPHinXsim
Install vcpkg
git clone https://github.com/microsoft/vcpkg.git ../vcpkg
../vcpkg/bootstrap-vcpkg.sh
Install C/C++ Dependencies
../vcpkg/vcpkg install --clean-after-build openblas[dynamic-arch] --allow-unsupported
../vcpkg/vcpkg install --clean-after-build \
eigen3 \
tbb \
boost-program-options \
boost-geometry \
simbody \
spdlog \
gtest \
pybind11 \
nlohmann-json
Configure and Build
For a pip-first workflow, install directly from source (this builds C++ extensions via CMake):
CMAKE_ARGS="-D CMAKE_TOOLCHAIN_FILE=$(pwd)/../vcpkg/scripts/buildsystems/vcpkg.cmake" \
python3 -m pip install -e ".[dev,visualization]"
Optional manual CMake workflow:
cmake --preset integrated-build-release \
-D CMAKE_TOOLCHAIN_FILE="$(pwd)/../vcpkg/scripts/buildsystems/vcpkg.cmake" \
-D Python3_EXECUTABLE="$(which python3)"
cmake --build --preset integrated-build-release --parallel "$(sysctl -n hw.logicalcpu)"
Install compiled C++ extension modules into the active Python environment:
cmake --install build-integrated --prefix "$(python3 -c 'import sys; print(sys.prefix)')"
Run Tests
Install Python package with dev dependencies:
python -m pip install -e ".[dev]"
To enable geometry preview (sphinxsim preview), also install:
python -m pip install -e ".[visualization]"
Run Python tests:
python -m pytest tests/ examples/ -v
Run C++ simulation tests:
ctest --test-dir build-integrated --output-on-failure -R "test_(2d|3d)_simulation$"