- Python 3.8+
- Git
- LaTeX (for building papers)
- C++ compiler (for optional accelerated solvers)
Choose one of the following methods:
git clone https://github.com/DawsonInstitute/coherence-gravity-coupling.git
cd coherence-gravity-coupling
conda env create -f environment.yml
conda activate cohgravgit clone https://github.com/DawsonInstitute/coherence-gravity-coupling.git
cd coherence-gravity-coupling
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txtgit clone https://github.com/DawsonInstitute/coherence-gravity-coupling.git
cd coherence-gravity-coupling
pip install -e . # Editable installnumpy>=1.21.0- Numerical computationsscipy>=1.7.0- Scientific computing, optimizationmatplotlib>=3.5.0- Plotting and visualizationpytest>=6.0- Testing frameworksympy>=1.8- Symbolic mathematicsh5py>=3.1- HDF5 data storage
numba>=0.54- JIT compilation for performancempi4py>=3.1- MPI parallelizationvtk>=9.0- 3D visualizationjupyter>=1.0- Interactive notebooks
# Ubuntu/Debian
sudo apt-get install texlive-latex-extra texlive-fonts-recommended texlive-bibtex-extra
# macOS (with Homebrew)
brew install --cask mactex
# Windows
# Download and install MiKTeX from https://miktex.org/Test your installation:
# Quick smoke tests (~90 seconds)
pytest -q
# Generate sample figures
python scripts/generate_figures.py
# Build main paper
cd papers
make paperExpected outputs:
- All tests pass
- Figures generated in
papers/figures/ coherence_gravity_coupling.pdfcompiled successfully
Runtime estimates (Intel i7-10700K, 32GB RAM):
- 41³ grid: ~3-5s per solve
- 61³ grid: ~5-8s per solve
- 81³ grid: ~20-30s per solve
- 101³ grid: ~1-2min per solve
For production runs, 61³ or higher is recommended for converged results.
Import errors: Ensure virtual environment is activated and dependencies installed
source .venv/bin/activate # or conda activate cohgrav
pip list # Verify packages installedLaTeX compilation fails: Install missing LaTeX packages
# Find missing package
grep "File.*not found" paper.log
# Install via package manager or texlivePerformance issues: Enable numerical acceleration
pip install numba # JIT compilation
pip install mpi4py # MPI parallelization (if available)Test failures: Check Python version and dependencies
python --version # Should be 3.8+
pytest -v # Verbose test output for debugging- Check Issues for known problems
- Search documentation in
docs/ - Run
make helpfor available commands - Contact: rsherrington@dawsoninstitute.org