This repository has the code used to carry out the work in the manuscript [doi] [arXiv].
AMReX; pyAMReX; AMReX-Hydro; incflo; PyLAMMPS; PyTorch; CuPy; pyblock; CMake
This work was carried out using GPUs on NERSC Perlmutter. Sample script to create the environment is available here
Assuming that we are inside lammps
directory and the virtual environment is active.
# Create a sub-folder named build
mkdir build
# Move into it
cd build
cmake -D BUILD_MPI=yes -D PKG_GRANULAR=on -D PKG_EXTRA-FIX=on -D BUILD_SHARED_LIBS=yes \
-D CMAKE_INSTALL_PREFIX=$VIRTUAL_ENV ../cmake
# Create the shared library version
make -j 10
# Python installation
make install-python
LAMMPS commit: 591d20b00dfbafc92bb8e450952a5868f5eaae15
;
Resource
Assuming that we are inside pyAMReX
directory and the virtual environment is active.
cmake -S . -B build -DAMReX_SPACEDIM="1;2;3" -DAMReX_MPI=ON \
-DAMReX_GPU_BACKEND=CUDA -DpyAMReX_amrex_src=/path/to/amrex
# compile & install, here we use four threads
cmake --build build -j 4 --target pip_install
pyAMReX API; AMReX-MPMD Tutorial
Use the GNUMake file in a setup folder to compile incflo
(continuum solver).
Ensure to build both incflo and pyAMReX using the same AMReX version.
@article{SIDDANI2025118294,
title = {An adaptive, data-driven multiscale approach for dense granular flows},
journal = {Computer Methods in Applied Mechanics and Engineering},
volume = {446},
pages = {118294},
year = {2025},
issn = {0045-7825},
doi = {https://doi.org/10.1016/j.cma.2025.118294},
url = {https://www.sciencedirect.com/science/article/pii/S0045782525005663},
author = {B. Siddani and Weiqun Zhang and Andrew Nonaka and John Bell and Ishan Srivastava}
}
This work was supported by the U.S. Department of Energy (DOE), Office of Science, Office of Advanced Scientific Computing Research, Applied Mathematics Program under contract No. DE-AC02-05CH11231. This research used resources of the National Energy Research Scientific Computing Center (NERSC), DOE Office of Science User Facility supported by the Office of Science of the U.S. Department of Energy under Contract No. DE-AC02-05CH11231 using NERSC award ASCR-ERCAP0026881.