Skip to content

Create and run astrochemical networks in python that can be ported into C++ for GPU acceleration. Inspired from pynucastro - https://github.com/psharda/pynucastro

License

Notifications You must be signed in to change notification settings

psharda/GPUAstroChem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPUAstroChem

Create and run astrochemical networks in python that can be ported into C++ for GPU acceleration. Inspired from pynucastro - https://github.com/psharda/pynucastro

Currently, it supports building primordial chemistry networks available in the astrochemistry package Krome - https://bitbucket.org/tgrassi/krome/wiki/Home

Simply open python and run the write_actual_rhs.py script to see what the code does.

Note that cxxcode in sympy was hacked to create the customized output that makes actual_rhs.H faster, by replacing std::pow with a combination of std::exp and std::log wherever possible. The hacked code is present in c.py, and has been tested on sympy version 1.12.1. The file c.py is present in /Applications/anaconda3/lib/python3.9/site-packages/sympy/printing/

write_actual_rhs.py will produce the actual_rhs.H file. To replace std::pow in this file with amrex::Math::powi (being used by Microphysics since 2024), run the script check_powi.py actual_rhs.H actual_rhs.H

For queries, contact Piyush Sharda at [email protected]

About

Create and run astrochemical networks in python that can be ported into C++ for GPU acceleration. Inspired from pynucastro - https://github.com/psharda/pynucastro

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published