For the complete documentation index, see llms.txt. This page is also available as Markdown.

Running Alamo with Python

Alamo supports a general Python interface. This is useful for testing functions and models; it is not intended to replace the input file system.

Clean

If this is your first time building the Python interface, run:

make realclean

Some build options for the debug version are different.

Configure

Run the configure script with:

./configure --debug

Currently only g++ is supported because of an issue in AMReX.

Build the Alamo Library and Python Files

Build with:

make py

This generates the setup.py scripts with paths appropriate for your system.

Install

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.

Run

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?