Installation
============
C++ Build
---------
Dependencies
~~~~~~~~~~~~
.. list-table::
:header-rows: 1
:widths: 30 70
* - Library
- Purpose
* - `GSL `_
- Multidimensional root-finding
* - `HDF5 `_
- Input/output tables (C++ API)
* - `yaml-cpp `_
- Configuration file parsing
* - `CGAL `_
- Delaunay triangulation
* - OpenMP
- Parallel grid evaluation
* - CMake >= 3.5, C++17 compiler
- Build toolchain
**Ubuntu / Debian**
.. code-block:: bash
sudo apt install \
libgsl-dev \
libhdf5-dev \
libyaml-cpp-dev \
libcgal-dev libgmp-dev libmpfr-dev
**macOS (Homebrew)**
.. code-block:: bash
brew install gsl hdf5 yaml-cpp cgal libomp
On macOS the OpenMP runtime is provided by ``libomp``, which Homebrew keeps
keg-only. Point CMake at it when configuring:
.. code-block:: bash
cmake -S . -B build -DOpenMP_ROOT="$(brew --prefix libomp)"
Building from source
~~~~~~~~~~~~~~~~~~~~
From the repository root:
.. code-block:: bash
cmake -S . -B build
cmake --build build -j
The compiled binary is ``build/generate_eos_table``.
To also build and run the unit tests:
.. code-block:: bash
cmake -S . -B build -DENABLE_TESTING=ON
cmake --build build -j
cd build && ctest --output-on-failure
Docker
------
Build the image from the repository root:
.. code-block:: bash
docker build --platform linux/amd64 -t eos-inverter .
Run the inverter by mounting your input EoS directory and an output directory:
.. code-block:: bash
docker run --rm \
--platform linux/amd64 --user $(id -u):$(id -g) \
-v /path/to/my/config:/opt/input \
-v /path/to/output:/opt/output \
eos-inverter \
./build/generate_eos_table input/config.yaml
Inside the container the working directory is ``/opt/``. Ensure your ``config.yaml``'s ``input.path`` points directly to the EoS table file, using a path relative to ``/opt`` (e.g. ``input.path: input/thermo.csv``). If the table file lives in its own mounted directory, mount it separately (e.g. ``-v /path/to/my/eos:/opt/eos`` and set ``input.path: eos/thermo.csv``).