Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/pypi-wheels-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ jobs:
submodules: recursive # Fetches Catch2, nlohmann/json, or pybind11 if needed
fetch-depth: 0

- name: Extract version from tag
id: version
run: |
# Strip leading 'v' from tag (e.g. v4.0.2 -> 4.0.2)
VERSION="${GITHUB_REF_NAME#v}"
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -130,6 +137,7 @@ jobs:
CMAKE_CXX_COMPILER="mpicxx"
CMAKE_PREFIX_PATH="/usr/local"
CMAKE_GENERATOR="Unix Makefiles"
SETUPTOOLS_SCM_PRETEND_VERSION="${{ steps.version.outputs.version }}"

# Vendor libraries into the wheel, but exclude host-specific MPI and
# runtime libraries that users must provide on their system.
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/pypi-wheels-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ jobs:
submodules: recursive
fetch-depth: 0

- name: Extract version from tag
id: version
run: |
# Strip leading 'v' from tag (e.g. v4.0.2 -> 4.0.2)
VERSION="${GITHUB_REF_NAME#v}"
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -143,6 +150,7 @@ jobs:
CMAKE_PREFIX_PATH="/usr/local"
CMAKE_GENERATOR="Unix Makefiles"
CMAKE_ARGS="-DGPU_BACKEND=CUDA '-DCMAKE_CUDA_ARCHITECTURES=60;70;75;80;86;89;90' -DCMAKE_CUDA_HOST_COMPILER=/opt/rh/gcc-toolset-13/root/usr/bin/g++"
SETUPTOOLS_SCM_PRETEND_VERSION="${{ steps.version.outputs.version }}"

# Vendor libraries but exclude host-specific MPI, OpenMP, Fortran runtime,
# and CUDA runtime libraries (users must have CUDA toolkit installed).
Expand Down
Binary file added figure.pdf
Binary file not shown.
Binary file added figure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
112 changes: 112 additions & 0 deletions figure.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
"""Generate the architecture figure for the JOSS paper.

Run: python figure.py
Output: figure.png
"""

import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from matplotlib.patches import FancyBboxPatch, FancyArrowPatch

fig, ax = plt.subplots(1, 1, figsize=(10, 6.5))
ax.set_xlim(0, 10)
ax.set_ylim(0, 7)
ax.axis("off")

# Colours
c_io = "#3498db"
c_solver = "#e74c3c"
c_output = "#2ecc71"
c_python = "#9b59b6"
c_bg = "#ecf0f1"

def box(x, y, w, h, text, color, fontsize=9, bold=False):
rect = FancyBboxPatch(
(x, y), w, h, boxstyle="round,pad=0.15",
facecolor=color, edgecolor="white", linewidth=2, alpha=0.9
)
ax.add_patch(rect)
weight = "bold" if bold else "normal"
ax.text(x + w / 2, y + h / 2, text, ha="center", va="center",
fontsize=fontsize, color="white", fontweight=weight,
linespacing=1.4)

def arrow(x1, y1, x2, y2):
ax.annotate("", xy=(x2, y2), xytext=(x1, y1),
arrowprops=dict(arrowstyle="->,head_width=0.3,head_length=0.15",
color="#7f8c8d", lw=2))

# Title
ax.text(5, 6.7, "OpenImpala Architecture", ha="center", va="center",
fontsize=14, fontweight="bold", color="#2c3e50")

# ---- Python API layer (top) ----
box(1.5, 5.8, 7, 0.7, "Python API: import openimpala\n"
"Session | tortuosity() | volume_fraction() | percolation_check()",
c_python, fontsize=9, bold=True)

# Arrow down
arrow(5, 5.8, 5, 5.4)

# ---- I/O Layer ----
box(0.3, 4.2, 2.4, 1.1,
"I/O Layer\n\nTIFF | HDF5\nRAW | DAT",
c_io, fontsize=9, bold=False)

# ---- Solver Layer ----
box(3.1, 4.2, 3.8, 1.1,
"Physics Solvers\n\nHYPRE (Krylov + AMG)\nAMReX MLMG (matrix-free)",
c_solver, fontsize=9, bold=False)

# ---- Output Layer ----
box(7.3, 4.2, 2.4, 1.1,
"Output Layer\n\nJSON (BPX)\nCSV | Plotfiles",
c_output, fontsize=9, bold=False)

# Arrows between layers
arrow(2.7, 4.75, 3.1, 4.75)
arrow(6.9, 4.75, 7.3, 4.75)

# ---- Transport Properties (middle) ----
box(0.3, 2.6, 4.3, 1.2,
"Transport Properties\n\n"
"Tortuosity factor | D_eff tensor\n"
"Multi-phase transport | Percolation",
"#e67e22", fontsize=9)

box(5.0, 2.6, 4.7, 1.2,
"Microstructural Metrics\n\n"
"Volume fraction | SSA | PSD\n"
"Connected components | REV study",
"#e67e22", fontsize=9)

# Arrows down from solvers
arrow(3.5, 4.2, 2.5, 3.8)
arrow(5.0, 4.2, 5.0, 3.8)
arrow(6.5, 4.2, 7.3, 3.8)

# ---- AMReX / HPC layer (bottom) ----
box(0.3, 1.0, 9.4, 1.1,
"AMReX Infrastructure: MPI + OpenMP + CUDA\n"
"iMultiFab (voxel data) | BoxArray (domain decomposition) | "
"Geometry | BL_PROFILE timers",
"#34495e", fontsize=9, bold=True)

# Arrows down to AMReX
arrow(2.5, 2.6, 2.5, 2.1)
arrow(7.3, 2.6, 7.3, 2.1)

# ---- External data (left of I/O) ----
ax.text(0.15, 5.55, "3D voxel\nimages", ha="center", va="center",
fontsize=8, color="#7f8c8d", style="italic")
arrow(0.15, 5.3, 0.8, 4.9)

# ---- Downstream (right of output) ----
ax.text(9.85, 5.55, "PyBaMM\nBPX", ha="center", va="center",
fontsize=8, color="#7f8c8d", style="italic")
arrow(9.2, 4.9, 9.85, 5.3)

plt.tight_layout()
plt.savefig("figure.png", dpi=300, bbox_inches="tight", facecolor="white")
plt.savefig("figure.pdf", bbox_inches="tight", facecolor="white")
print("Saved figure.png and figure.pdf")
166 changes: 117 additions & 49 deletions paper.bib
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@article{LeHoux2021OpenImpala,
title = {{{OpenImpala}}: {{OPEN}} source {{IMage}} based {{PArallisable}} {{Linear}} {{Algebra}} solver},
title = {{OpenImpala}: {OPEN} source {IMage} based {PArallisable} {Linear} {Algebra} solver},
author = {Le Houx, James and Kramer, Denis},
year = {2021},
journal = {SoftwareX},
Expand All @@ -10,64 +10,132 @@ @article{LeHoux2021OpenImpala
}

@article{le2023statistical,
title={Statistical Effective Diffusivity Estimation in Porous Media Using an Integrated On-site Imaging Workflow for Synchrotron Users},
author={Le Houx, James and Ruiz, Siul and McKay Fletcher, Daniel and Ahmed, Sharif and Roose, Tiina},
journal={Transport in Porous Media},
volume={150},
number={1},
pages={71--88},
year={2023},
publisher={Springer},
doi={10.1007/s11242-023-01993-7}
title = {Statistical Effective Diffusivity Estimation in Porous Media Using an Integrated On-site Imaging Workflow for Synchrotron Users},
author = {Le Houx, James and Ruiz, Siul and McKay Fletcher, Daniel and Ahmed, Sharif and Roose, Tiina},
journal = {Transport in Porous Media},
volume = {150},
number = {1},
pages = {71--88},
year = {2023},
publisher = {Springer},
doi = {10.1007/s11242-023-01993-7}
}

@article{amrex2019,
title={AMReX: a framework for block-structured adaptive mesh refinement},
author={Zhang, Weiqun and Almgren, Ann and Beckner, Vince and Bell, John and Blaschke, Johannes and Chan, Cy and Day, Marcus and Friesen, Brian and Gott, Kevin and Graves, Daniel and others},
journal={Journal of Open Source Software},
volume={4},
number={37},
pages={1370},
year={2019},
doi={10.21105/joss.01370}
}

@article{lu2025immersed,
title={An immersed interface Adaptive Mesh Refinement algorithm for Li-ion battery simulations. II. Multi-dimensional extension and separator modeling},
author={Lu, Jiawei and Nikiforakis, Nikolaos and Gokhale, Nandan},
journal={Journal of Applied Physics},
volume={138},
number={4},
pages={045002},
year={2025},
publisher={AIP Publishing},
doi={10.1063/5.0281626}
title = {{AMReX}: a framework for block-structured adaptive mesh refinement},
author = {Zhang, Weiqun and Almgren, Ann and Beckner, Vince and Bell, John and Blaschke, Johannes and Chan, Cy and Day, Marcus and Friesen, Brian and Gott, Kevin and Graves, Daniel and others},
journal = {Journal of Open Source Software},
volume = {4},
number = {37},
pages = {1370},
year = {2019},
doi = {10.21105/joss.01370}
}

@article{sulzer2021python,
title={{Python Battery Mathematical Modelling (PyBaMM)}},
author={Sulzer, Valentin and Marquis, Scott G and Timms, Robert and Robinson, Martin and Chapman, S Jon},
journal={Journal of Open Research Software},
volume={9},
number={1},
year={2021},
publisher={Ubiquity Press},
doi={10.5334/jors.309}
title = {{Python Battery Mathematical Modelling (PyBaMM)}},
author = {Sulzer, Valentin and Marquis, Scott G and Timms, Robert and Robinson, Martin and Chapman, S Jon},
journal = {Journal of Open Research Software},
volume = {9},
number = {1},
year = {2021},
publisher = {Ubiquity Press},
doi = {10.5334/jors.309}
}

@inproceedings{falgout2002hypre,
title={hypre: A library of high performance preconditioners},
author={Falgout, Robert D and Yang, Ulrike Meier},
booktitle={International Conference on Computational Science},
pages={632--641},
year={2002},
organization={Springer},
doi={10.1007/3-540-47789-6_66}
title = {hypre: A library of high performance preconditioners},
author = {Falgout, Robert D and Yang, Ulrike Meier},
booktitle = {International Conference on Computational Science},
pages = {632--641},
year = {2002},
organization = {Springer},
doi = {10.1007/3-540-47789-6_66}
}

@misc{jakob2017pybind11,
author = {Wenzel Jakob and Jason Rhinelander and Dean Moldovan},
year = {2017},
note = {https://github.com/pybind/pybind11},
title = {pybind11 -- Seamless operability between C++11 and Python}
author = {Wenzel Jakob and Jason Rhinelander and Dean Moldovan},
year = {2017},
title = {pybind11 -- Seamless operability between {C}++11 and {Python}},
url = {https://github.com/pybind/pybind11}
}

@article{cooper2016taufactor,
title = {{TauFactor}: An open-source application for calculating tortuosity factors from tomographic data},
author = {Cooper, Samuel J and Bertei, Antonio and Shearing, Paul R and Kilner, John A and Brandon, Nigel P},
journal = {SoftwareX},
volume = {5},
pages = {203--210},
year = {2016},
publisher = {Elsevier},
doi = {10.1016/j.softx.2016.09.002}
}

@article{gostick2019porespy,
title = {{PoreSpy}: A {Python} Toolkit for Quantitative Analysis of Porous Media Images},
author = {Gostick, Jeff T and Khan, Zohaib A and Tranter, Thomas G and Kok, Matthew D R and Agnaou, Mehrez and Sadeghi, Mohammadamin and Jervis, Rhodri},
journal = {Journal of Open Source Software},
volume = {4},
number = {37},
pages = {1296},
year = {2019},
doi = {10.21105/joss.01296}
}

@article{ferguson2018puma,
title = {{PuMA}: the Porous Microstructure Analysis software},
author = {Ferguson, Joseph C and Panerai, Francesco and Borner, Arnaud and Mansour, Nagi N},
journal = {SoftwareX},
volume = {7},
pages = {81--87},
year = {2018},
publisher = {Elsevier},
doi = {10.1016/j.softx.2018.03.001}
}

@article{lu2025immersed,
title = {An immersed interface Adaptive Mesh Refinement algorithm for {Li}-ion battery simulations. {II}. Multi-dimensional extension and separator modeling},
author = {Lu, Jiawei and Nikiforakis, Nikolaos and Gokhale, Nandan},
journal = {Journal of Applied Physics},
volume = {138},
number = {4},
pages = {045002},
year = {2025},
publisher = {AIP Publishing},
doi = {10.1063/5.0281626}
}

@article{tjaden2016origin,
title = {On the origin and application of the {Bruggeman} correlation for analysing transport phenomena in electrochemical systems},
author = {Tjaden, Bernhard and Cooper, Samuel J and Brett, Daniel JL and Kramer, Denis and Shearing, Paul R},
journal = {Current Opinion in Chemical Engineering},
volume = {12},
pages = {44--51},
year = {2016},
publisher = {Elsevier},
doi = {10.1016/j.coche.2016.02.006}
}

@article{epstein1989tortuosity,
title = {On tortuosity and the tortuosity factor in flow and diffusion through porous media},
author = {Epstein, Norman},
journal = {Chemical Engineering Science},
volume = {44},
number = {3},
pages = {777--779},
year = {1989},
publisher = {Elsevier},
doi = {10.1016/0009-2509(89)85053-5}
}

@article{withers2021xray,
title = {X-ray computed tomography},
author = {Withers, Philip J and Bouman, Charles and Carmignato, Simone and Cnudde, Veerle and Grimaldi, David and Hagen, Charlotte K and Maire, Eric and Manber, Mariam and Martini, Fabrizio and Stock, Stuart R},
journal = {Nature Reviews Methods Primers},
volume = {1},
number = {1},
pages = {18},
year = {2021},
publisher = {Nature Publishing Group},
doi = {10.1038/s43586-021-00015-4}
}
Loading
Loading