SIngle isoTope sAha solveR. Also a stringed instrument from the Indian subcontinent.
a Saha ionization solver
The figure below shows ionization fractions for unionized, singly, and doubly ionized Calcium. Compare to Figure 2.6 of "Supernovae and Nucleosynthesis", David Arnett.
To build Sitar
, simply
mkdir build && cd build
cmake ..
make -j
Then an executable saha
will be created in build/src
.
An observation: a Saha solver requires an iterative solver, such as Newton-Raphson. Implementing Anderson accelerated Newton-Raphson provides a roughly 4x speedup for the calculations above.
Compilation and regression tests are run on each PR.
We use clang format
(here)
and ruff
(here) for code cleanliness.
C++ rules are listed in .clang-format
.
The current version of clang-format
used is 19.1.0.
Simply call tools/bash/format.sh
to format the .hpp
and .cpp
files.
Python code linting and formatting is done with ruff
.
Rules are listed in ruff.toml
.
To check all python in the current directory, you may ruff .
To format a given file according to ruff.toml
, run ruff format file.py
.
Checks for formatting are performed on each PR.