Running Alamo with Python
Last updated
Was this helpful?
Alamo supports a general Python interface. This is useful for testing functions and models; it is not intended to replace the input file system.
If this is your first time building the Python interface, run:
make realcleanSome build options for the debug version are different.
Run the configure script with:
./configure --debugCurrently only g++ is supported because of an issue in AMReX.
Build with:
make pyThis generates the setup.py scripts with paths appropriate for your system.
Use pip to install:
You need to have Python development files available. If pip complains that it cannot find Python.H, you probably do not have the development files installed.
You should now be able to run the following in a Python environment:
Make sure that you do not also have a folder or file named alamo.py. This is an easy naming conflict to create.
You can include specific header files with:
Access elements from those files with:
All routines and member variables should be accessible. Header files are interpreted, which means changes to headers appear immediately in your Python script without recompiling. If you change code in .cpp files, run make lib or make py again to see those changes.
Last updated
Was this helpful?
Was this helpful?
pip install -e /path/to/your/alamoimport alamoalamo.include("Model/Propellant/PowerLaw.H")model = alamo.Model.Propellant.PowerLaw()