This repository holds Python abstractions to the SPECFEM++
Python bindings.
This is the very first iteration of the package, and it is still under development and is suspect to change.
First, we neeed to create a conda/mamba
environment:
conda create -n specfempp python=3.12 obspy
# mamba create -n specfempp python=3.12 obspy
You can of course choose the environment name you want. Activate the environement
conda activate specfempp
# mamba activate specfempp
Second, we need to install SPECFEM++
. Download the repository:
git clone [email protected]:PrincetonUniversity/SPECFEMPP.git
cd SPECFEMPP
and install it using pip
:
pip install . \
-Ccmake.define.ENABLE_SIMD=ON \
-Ccmake.define.Kokkos_ENABLE_ATOMICS_BYPASS=ON \
-Ccmake.define.Kokkos_ARCH_NATIVE=ON \
-Ccmake.define Kokkos_ENABLE_AGGRESSIVE_VECTORIZATION=ON
As you can see here we can set CMake
options through scikit-build
. Third and final step is installing SPECFEM++-PY
. Download the repository:
cd .. # Go back to the parent directory
git clone [email protected]:PrincetonUniversity/specfempp-py.git
cd specfempp-py
and install it using pip
in editable mode in the :
pip install -e .
See the examples
folder for examples. For instance, to run the fluid-solid-bathymetry
example:
cd examples/fluid-solid-bathymetry
python run.py