Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
172e663
add vendored rat at v2.020.4
jlogan-cfs Jan 15, 2026
e519c5d
continuing wip to collect vendored deps
jlogan-cfs Jan 15, 2026
936c7b9
add boost submodule and set up cpp build
jlogan-cfs Jan 15, 2026
a3b06c9
vendor armadillo as a tarball
jlogan-cfs Jan 15, 2026
63c8f0e
don't add armadillo unpacked
jlogan-cfs Jan 15, 2026
1153877
tests
jlogan-cfs Jan 15, 2026
85d539d
vector potential and more tests
jlogan-cfs Jan 15, 2026
edc44b5
set up build flag passthroughs
jlogan-cfs Jan 15, 2026
bab3c7d
get release and test builds both working
jlogan-cfs Jan 15, 2026
54c7083
replace hard vendored packages with git submodules
jlogan-cfs Jan 16, 2026
33968e7
use a zip instead of tar for armadillo. statically link jsoncpp. rena…
jlogan-cfs Jan 16, 2026
603a5d1
statically link armadillo
jlogan-cfs Jan 16, 2026
5c01418
statically link blas/lapack when possible
jlogan-cfs Jan 16, 2026
0236dc3
update readme. add first cut of script for cross-platform dll packaging.
jlogan-cfs Jan 16, 2026
be96b6c
exclude vendor folder from pytest
jlogan-cfs Jan 16, 2026
73ef1fd
first cut updating CI
jlogan-cfs Jan 16, 2026
f7400cc
calculate B and A in one pass. transpose inputs and outputs.
jlogan-cfs Jan 16, 2026
fa48a8b
cleanup
jlogan-cfs Jan 16, 2026
93ee6fd
add python bindings
jlogan-cfs Jan 16, 2026
186b43b
use dynamic version for python package
jlogan-cfs Jan 16, 2026
cd2de5d
update python configuration to build with mlfmm by default. ignore ve…
jlogan-cfs Jan 16, 2026
f2a72f5
first pass of python layer
jlogan-cfs Jan 16, 2026
9c4b272
get static build working through python tests
jlogan-cfs Jan 16, 2026
ac0b2f5
wip to set up tests
jlogan-cfs Jan 16, 2026
f4655fd
update mlfmm api to use the same geometric form as the cfsem api
jlogan-cfs Jan 16, 2026
288003c
test harder
jlogan-cfs Jan 16, 2026
871bb97
link c++ runtime explicitly. clamp direct threshold.
jlogan-cfs Jan 17, 2026
5faa557
wip to troubleshoot error
jlogan-cfs Jan 17, 2026
9b49bea
resolve test failures
jlogan-cfs Jan 17, 2026
6e1f55b
wip to set up finite segment formula
jlogan-cfs Jan 18, 2026
6162206
rename old filament functions to
jlogan-cfs Jan 18, 2026
b73d8f8
add test comparing to point segment discretization
jlogan-cfs Jan 18, 2026
568325e
update bench
jlogan-cfs Jan 18, 2026
dac674f
take slice of wire radius
jlogan-cfs Jan 18, 2026
47224e5
pull B-field calcs out of the branch
jlogan-cfs Jan 20, 2026
2609934
add python bindings for point segment functions
jlogan-cfs Jan 20, 2026
467a979
add point segment comparison to plots
jlogan-cfs Jan 20, 2026
a5f014b
add mlfmm to biot-savart plot
jlogan-cfs Jan 20, 2026
c4cb3c4
use perpendicular radius vector for calculating field direction
jlogan-cfs Jan 20, 2026
4b0e739
discretize more
jlogan-cfs Jan 20, 2026
501fb24
set ylim
jlogan-cfs Jan 20, 2026
39d7bce
add timing info to example
jlogan-cfs Jan 20, 2026
e5242b4
add plot of mlfmm direct van lanen
jlogan-cfs Jan 20, 2026
fc830fd
plot labeling
jlogan-cfs Jan 20, 2026
44fa1b4
plot formatting
jlogan-cfs Jan 20, 2026
f76e38f
relative error in plots
jlogan-cfs Jan 20, 2026
67261ea
cite zahn
jlogan-cfs Jan 20, 2026
6f5841a
remove unused midpoint
jlogan-cfs Jan 20, 2026
96e173f
wip to update vector potential calc for finite length and thickness
jlogan-cfs Jan 21, 2026
0def19b
add wire radius to vector potential interface
jlogan-cfs Jan 21, 2026
0b7f147
wip to add vector potential example
jlogan-cfs Jan 21, 2026
8795e10
handle wire radius defaulting in python
jlogan-cfs Jan 21, 2026
98bae58
use consistent term for mlfmm linear kernel
jlogan-cfs Jan 21, 2026
b17ee92
improve regularization. wip to troubleshoot vector potential.
jlogan-cfs Jan 21, 2026
612a747
test vector potential against point-segment discretization
jlogan-cfs Jan 21, 2026
09a8214
tighten tolerance on point segment discretization tests
jlogan-cfs Jan 21, 2026
3ccbc24
update plots
jlogan-cfs Jan 21, 2026
b30a88b
first working tests
jlogan-cfs Jan 21, 2026
fc528e0
eliminate mixed precision from linear filament flux density calc. upd…
jlogan-cfs Jan 21, 2026
a1101f1
update changelog
jlogan-cfs Jan 21, 2026
89ada30
put mixed precision back for flux density
jlogan-cfs Jan 21, 2026
8f1dd9e
remove mixed precision for linear filament again
jlogan-cfs Jan 21, 2026
632840c
remove mixed precision for point segment variant
jlogan-cfs Jan 21, 2026
1716b44
update body_force_density methods to take wire_radius as a slice. upd…
jlogan-cfs Jan 21, 2026
585987d
pull tclap via https
jlogan-cfs Jan 21, 2026
24aff52
fmt
jlogan-cfs Jan 21, 2026
4f57410
cache vendor/
jlogan-cfs Jan 21, 2026
8f7a64e
add armadillo config version
jlogan-cfs Jan 22, 2026
8a7e3c0
shallow fetch
jlogan-cfs Jan 22, 2026
bdacb0c
print timing in helmholz example
jlogan-cfs Jan 22, 2026
ca666e5
depth 1 checkout for build.rs as well
jlogan-cfs Jan 22, 2026
ded6c2e
improve parallel heuristics. add include folder.
jlogan-cfs Jan 22, 2026
48e925c
combine files to simplify linking
jlogan-cfs Jan 22, 2026
239e098
specifically expose error type
jlogan-cfs Jan 22, 2026
7bd571c
parallel heuristic update. link whole archive on linux.
jlogan-cfs Jan 22, 2026
94e70e8
install blas on linux and windows for release workflow. statically li…
jlogan-cfs Jan 22, 2026
8131e51
different static linking approach for linux with ordering
jlogan-cfs Jan 22, 2026
8777d67
fail fast on undefined symbols
jlogan-cfs Jan 22, 2026
cec52b6
different approach to linking whole archive on linux
jlogan-cfs Jan 22, 2026
0f39bb4
more targeted build time error on undefined symbols to not catch python
jlogan-cfs Jan 22, 2026
efc8002
yet another attempt to fix link order on linux
jlogan-cfs Jan 23, 2026
9ec7eb1
whole archive for c lib
jlogan-cfs Jan 23, 2026
f66d189
use cc to manage C build
jlogan-cfs Jan 23, 2026
563a4e6
force link more on linux
jlogan-cfs Jan 23, 2026
b2f3482
only pull in librat once
jlogan-cfs Jan 23, 2026
370e747
try whole archive linking for all 3 rat lib deps on linux
jlogan-cfs Jan 23, 2026
2a4ce66
remove duplicate link for linux
jlogan-cfs Jan 23, 2026
53a55e6
set fpic
jlogan-cfs Jan 23, 2026
468d316
link openblas specifically on linux
jlogan-cfs Jan 23, 2026
c969594
fmt
jlogan-cfs Jan 23, 2026
d5be603
set link group on linux to avoid duplication
jlogan-cfs Jan 23, 2026
36be7cf
pic for boost
jlogan-cfs Jan 23, 2026
1661bc7
add rat libraries to link group
jlogan-cfs Jan 23, 2026
57b3876
enforce deterministic link order on linux
jlogan-cfs Jan 23, 2026
3f9431b
force load rat libs on linux
jlogan-cfs Jan 23, 2026
486b44f
more pic on linux
jlogan-cfs Jan 23, 2026
e980302
whole archive linking for rat libs for cdylib build only
jlogan-cfs Jan 24, 2026
9cf437d
whole archive only for linux cdylib builds for rat libs
jlogan-cfs Jan 24, 2026
5496d1d
turn off cc's cargo metadata link directives so we handle all the lin…
jlogan-cfs Jan 26, 2026
2370a99
explicitly link c++ runtime on linux
jlogan-cfs Jan 26, 2026
7163950
commentary
jlogan-cfs Jan 26, 2026
61f6826
use link directive modifiers to try to ensure ordering in python buil…
jlogan-cfs Jan 26, 2026
f90bf64
capture more includes as cache deps
jlogan-cfs Jan 26, 2026
afba9ba
only cache vendor/ on successful build
jlogan-cfs Jan 26, 2026
92fecca
dynamically link rat libraries on linux when building for python exte…
jlogan-cfs Jan 26, 2026
05752a8
pull python feature detection to top of build.rs
jlogan-cfs Jan 26, 2026
19cbda9
another approach to enforcing whole archive static linking
jlogan-cfs Jan 26, 2026
4adc704
set no-as-needed for linux static archives
jlogan-cfs Jan 26, 2026
b308c74
use clang+lld on linux
jlogan-cfs Jan 26, 2026
c3f0e97
use lld on linux only for linking step
jlogan-cfs Jan 26, 2026
e03eae2
WORKING BUILDS ON MAC AND LINUX. add linux clang system deps to test …
jlogan-cfs Jan 26, 2026
5735c17
add lld to linux build deps
jlogan-cfs Jan 26, 2026
4a8c112
always run submodule update to repair cache
jlogan-cfs Jan 26, 2026
3160c9e
add more boost headers to dep checks
jlogan-cfs Jan 26, 2026
b8cf9ea
only use clang/lld for C and leave the rust linker as-is (lld include…
jlogan-cfs Jan 26, 2026
6c034b1
more boost headers
jlogan-cfs Jan 26, 2026
6e8d072
bump cache key in CI
jlogan-cfs Jan 26, 2026
395fc1c
initialize boost headers as part of build
jlogan-cfs Jan 26, 2026
25fa9a8
add install of openblas to test_python workflow
jlogan-cfs Jan 26, 2026
07868f3
remove debris from debugging missing headers one at a time
jlogan-cfs Jan 26, 2026
0e352be
print missing line numbers in coverage
jlogan-cfs Jan 26, 2026
607617a
improve coverage of new methods in python
jlogan-cfs Jan 26, 2026
67528ff
handle nested folder in git for manylinux builds
jlogan-cfs Jan 27, 2026
5e0565b
better caching for submodules
jlogan-cfs Jan 27, 2026
58a9161
remove caching of submodules
jlogan-cfs Jan 27, 2026
884bd5f
update boost bootstrapping process to use the .bat on windows
jlogan-cfs Jan 27, 2026
ed57f46
add wheel repair deps
jlogan-cfs Jan 27, 2026
809d71e
better handling of nested git folders for manylinux builds
jlogan-cfs Jan 27, 2026
9e405a0
pipe safe.directory for git through to manylinux container
jlogan-cfs Jan 27, 2026
20bc9a4
update bindings cmake build to use .bat file for bootstrapping boost …
jlogan-cfs Jan 27, 2026
4cb6493
install delocate for mac builds
jlogan-cfs Jan 27, 2026
2af1b74
refactor wheel repair script
jlogan-cfs Jan 27, 2026
97ad5dc
mark safe directory for all the vendor modules to make the manylinux …
jlogan-cfs Jan 27, 2026
47d8220
add diagnostics for boost build that is failing on windows
jlogan-cfs Jan 27, 2026
0a0798a
fix linux before script name. more diagnostics for windows builds.
jlogan-cfs Jan 27, 2026
1edebad
use apt for installing deps on manylinux
jlogan-cfs Jan 27, 2026
daae251
set cflags for arch and opt level when using msvc
jlogan-cfs Jan 27, 2026
46f88ec
no sudo in manylinux
jlogan-cfs Jan 27, 2026
75a2b07
use local deps already available on musllinux. try harder to install …
jlogan-cfs Jan 27, 2026
a1e26b8
suppress boost headers for 32-bit when running on 64-bit windows
jlogan-cfs Jan 27, 2026
4dac60b
different name for lld package depending on what's available
jlogan-cfs Jan 27, 2026
cfd1d54
update package repo cache before installing lld
jlogan-cfs Jan 27, 2026
beafd02
manually update submodules before build on Windows to prevent cmake d…
jlogan-cfs Jan 27, 2026
089e0a3
use old lld package names for manylinux container
jlogan-cfs Jan 27, 2026
c80c669
turn off manylinux dep installs for linux for now to see which ones n…
jlogan-cfs Jan 27, 2026
dadd062
add more diagnostics for windows build
jlogan-cfs Jan 27, 2026
17311e3
for manylinux build, attempt to install lld and clang if they are ava…
jlogan-cfs Jan 27, 2026
8777907
print message when linux build deps are missing from package repo
jlogan-cfs Jan 27, 2026
2228452
allow boost build to continue as long as our deps are present
jlogan-cfs Jan 27, 2026
f3fb47a
print more lines of Windows diagnostics. use yum specifically for ins…
jlogan-cfs Jan 27, 2026
5cc88a7
centos packages specifically on manylinux
jlogan-cfs Jan 27, 2026
908dc9b
more error logging on windows
jlogan-cfs Jan 27, 2026
c3c1f74
allow missing yum on some cross-compilation runners
jlogan-cfs Jan 27, 2026
e3ea8d0
skip missing yum packages
jlogan-cfs Jan 27, 2026
3010478
more windows build diagnostics
jlogan-cfs Jan 27, 2026
aa8be03
skip missing names for yum installs
jlogan-cfs Jan 27, 2026
6d03697
tolerate case where there is nothing to install from yum
jlogan-cfs Jan 27, 2026
d5f480b
dnf install for aarch64 runner
jlogan-cfs Jan 27, 2026
b786f69
microdnf install for aarch64 manylinux
jlogan-cfs Jan 27, 2026
fa0c199
add some diagnostics for linux aarch64 build to figure out what packa…
jlogan-cfs Jan 27, 2026
c491528
use newer manylinux so that lld is available in the package repo
jlogan-cfs Jan 27, 2026
6d5aea3
use apt for manylinux aarch64 installs
jlogan-cfs Jan 27, 2026
00cd9f5
turn off some boost system deps
jlogan-cfs Jan 27, 2026
e85b596
install g++ for linux builds
jlogan-cfs Jan 27, 2026
97db217
turn off more optional boost features
jlogan-cfs Jan 28, 2026
e1d52c6
only run linux before-script on platforms that need to build the c bi…
jlogan-cfs Jan 28, 2026
604d8ae
don't exit 0 from before script because this skips the whole build
jlogan-cfs Jan 28, 2026
3bb7567
specific c++ stdlib version for aarch64 linux. More boost feature fla…
jlogan-cfs Jan 28, 2026
868f961
diagnostics for linux aarch64 build
jlogan-cfs Jan 28, 2026
66bb133
more boost feature flags for windows
jlogan-cfs Jan 28, 2026
a4274a6
cargo debug logging for windows
jlogan-cfs Jan 28, 2026
11b3155
point clang to cstdlib
jlogan-cfs Jan 28, 2026
98e73a9
more robust method for setting cxxflags. manually set cxxflags to poi…
jlogan-cfs Jan 28, 2026
f947dad
cc logging for Windows
jlogan-cfs Jan 28, 2026
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
4 changes: 2 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[target.'cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "x64"))']
rustflags = ["-C", "target-feature=+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+cmpxchg16b,+avx,+avx2,+fma,+bmi1,+bmi2,+lzcnt,+pclmulqdq,+movbe"]
[target.'cfg(any(target_arch = "x86_64", target_arch = "x64"))']
rustflags = ["-C", "target-cpu=x86-64-v3"]
152 changes: 147 additions & 5 deletions .github/workflows/release_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,112 @@ jobs:
platform:
- runner: ubuntu-22.04
target: x86_64
maturin_args: --release --out dist --find-interpreter
- runner: ubuntu-22.04
target: x86
maturin_args: --release --out dist --find-interpreter --no-default-features --features=python
- runner: ubuntu-22.04
target: aarch64
maturin_args: --release --out dist --find-interpreter
- runner: ubuntu-22.04
target: armv7
maturin_args: --release --out dist --find-interpreter --no-default-features --features=python
- runner: ubuntu-22.04
target: s390x
maturin_args: --release --out dist --find-interpreter --no-default-features --features=python
- runner: ubuntu-22.04
target: ppc64le
maturin_args: --release --out dist --find-interpreter --no-default-features --features=python
steps:
- uses: actions/checkout@v4
- name: Mark workspace as safe for git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels
uses: PyO3/maturin-action@v1
env:
RUST_LOG: cc=debug
CARGO_TERM_VERBOSE: "true"
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --features=python
args: ${{ matrix.platform.maturin_args }}
sccache: 'true'
manylinux: auto
manylinux: 2_28
before-script-linux: |
git config --global --add safe.directory /github/workspace
git config --global --add safe.directory /home/runner/work/cfsem-py/cfsem-py

if [ "${{ matrix.platform.target }}" = "aarch64" ]; then
export CC=clang
export CXX=clang++

# discover GCC version/triple inside the container
GCC_VER="$(gcc -dumpversion)"
GCC_TRIPLE="$(gcc -dumpmachine)"

export CXXFLAGS="--gcc-toolchain=/usr -stdlib=libstdc++ \
-isystem /usr/include/c++/${GCC_VER} \
-isystem /usr/include/c++/${GCC_VER}/${GCC_TRIPLE} \
-isystem /usr/include/c++/${GCC_VER}/backward"
fi

if [ "${{ matrix.platform.target }}" = "x86_64" ] || [ "${{ matrix.platform.target }}" = "aarch64" ]; then
echo "PATH=$PATH";
ls -la /usr/bin | grep -E 'dnf|microdnf|yum|apt|apk' || true;

# aarch64 runner is newer
if command -v dnf >/dev/null 2>&1; then
echo "Found dnf package manager";
dnf -y makecache;
dnf -y update;
dnf -y install --skip-broken clang lld gcc gcc-c++ libstdc++-devel openblas-devel || true;
fi

if command -v apt-get >/dev/null 2>&1; then
echo "Found apt-get package manager";
apt-get update;
apt-get install -y clang lld g++ libstdc++-12-dev libopenblas-dev || true;
fi

if command -v microdnf >/dev/null 2>&1; then
echo "Found microdnf package manager";
microdnf -y update;
microdnf -y install clang lld gcc gcc-c++ libstdc++-devel openblas-devel || true;
fi

# manylinux2014 runner is based on centos7
if command -v yum >/dev/null 2>&1; then
echo "Found yum package manager";
yum -y makecache;
yum -y update;
yum -y --setopt=skip_missing_names_on_install=True install --skip-broken clang lld gcc gcc-c++ libstdc++-devel openblas-devel || true;
yum -y --setopt=skip_missing_names_on_install=True install --skip-broken centos-release-scl || true;
yum -y --setopt=skip_missing_names_on_install=True install --skip-broken llvm-toolset-7 clang llvm-toolset-7-llvm gcc gcc-c++ libstdc++-devel openblas-devel || true;
fi

if [ -f /opt/rh/llvm-toolset-7/enable ]; then
source /opt/rh/llvm-toolset-7/enable
fi

if [ "${{ matrix.platform.target }}" = "aarch64" ]; then
# Clang on manylinux doesn't always discover libstdc++ headers without help.
export CC=clang
export CXX=clang++
export CXXFLAGS="--gcc-toolchain=/usr -stdlib=libstdc++"
fi

if ! command -v ld.lld >/dev/null 2>&1; then
echo "warning: ld.lld not found after install; continuing without it" >&2
fi
else
echo "Skipping linux before-script for target ${{ matrix.platform.target }}"
fi
- name: Install auditwheel
run: python -m pip install auditwheel
- name: Repair wheels
run: bindings/repair_wheel.sh dist
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -60,24 +144,34 @@ jobs:
platform:
- runner: ubuntu-22.04
target: x86_64
maturin_args: --release --out dist --find-interpreter --no-default-features --features=python
- runner: ubuntu-22.04
target: x86
maturin_args: --release --out dist --find-interpreter --no-default-features --features=python
- runner: ubuntu-22.04
target: aarch64
maturin_args: --release --out dist --find-interpreter --no-default-features --features=python
- runner: ubuntu-22.04
target: armv7
maturin_args: --release --out dist --find-interpreter --no-default-features --features=python
steps:
- uses: actions/checkout@v4
- name: Mark workspace as safe for git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --features=python
args: ${{ matrix.platform.maturin_args }}
sccache: 'true'
manylinux: musllinux_1_2
- name: Install auditwheel
run: python -m pip install auditwheel
- name: Repair wheels
run: bindings/repair_wheel.sh dist
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -92,20 +186,55 @@ jobs:
platform:
- runner: windows-latest
target: x64
maturin_args: --release --out dist --find-interpreter
- runner: windows-latest
target: x86
maturin_args: --release --out dist --find-interpreter --no-default-features --features=python
steps:
- uses: actions/checkout@v4
- name: Mark workspace as safe for git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Initialize submodules
run: git submodule update --init --recursive --depth 1
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform.target }}
- name: Install OpenBLAS (windows)
shell: pwsh
run: |
$triplet = if ("${{ matrix.platform.target }}" -eq "x86") { "x86-windows" } else { "x64-windows" }
& "C:\vcpkg\vcpkg.exe" install "openblas:$triplet"
"CMAKE_PREFIX_PATH=C:\vcpkg\installed\$triplet" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Build wheels
uses: PyO3/maturin-action@v1
env:
RUST_LOG: cc=debug
CARGO_TERM_VERBOSE: "true"
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --features=python
args: ${{ matrix.platform.maturin_args }}
sccache: 'true'
- name: Dump Boost b2 logs (on failure)
if: failure()
shell: pwsh
run: |
Get-ChildItem -Recurse -Filter b2.log -Path target | ForEach-Object {
Write-Host "=== $($_.FullName) ==="
Write-Host "=== $($_.FullName) (head 200) ==="
Get-Content $_.FullName -TotalCount 200
Get-Content $_.FullName -Tail 5000
Write-Host "=== $($_.FullName) (error scan) ==="
Get-Content $_.FullName | Select-String -CaseSensitive -Pattern 'error','failed','LNK','fatal' -Context 2,2 | Select-Object -Last 200
}
Get-ChildItem -Recurse -Path target -Include *.err,*.log | ForEach-Object {
Write-Host "=== $($_.FullName) ==="
Get-Content $_.FullName -Tail 200
}
- name: Install delvewheel
run: python -m pip install delvewheel
- name: Repair wheels
run: bindings/repair_wheel.sh dist
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -121,19 +250,28 @@ jobs:
- runner: macos-15-intel
target: x86_64
# macos-15 runner is arm64
maturin_args: --release --out dist --find-interpreter
- runner: macos-15
target: aarch64
maturin_args: --release --out dist --find-interpreter
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels
uses: PyO3/maturin-action@v1
env:
RUST_LOG: cc=debug
CARGO_TERM_VERBOSE: "true"
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --features=python
args: ${{ matrix.platform.maturin_args }}
sccache: 'true'
- name: Install delocate
run: python -m pip install delocate
- name: Repair wheels
run: bindings/repair_wheel.sh dist
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -144,6 +282,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Mark workspace as safe for git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Initialize submodules
run: git submodule update --init --recursive --depth 1
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,31 @@ on:
push:
branches: [ "main", "develop", "release" ]
workflow_dispatch:
tag: "Manual Run"
workflow_call:

jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 15
timeout-minutes: 45
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:

- uses: actions/checkout@v4
- name: Mark workspace as safe for git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Initialize submodules
run: git submodule update --init --recursive --depth 1

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Install Linux build deps
run: sudo apt-get update && sudo apt-get install -y clang lld libstdc++-12-dev libopenblas-dev

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
Expand All @@ -47,7 +54,7 @@ jobs:
uv run --locked ruff format ./cfsem --check
uv run --locked pyright ./cfsem --pythonversion 3.10
uv run --locked coverage run --source=./cfsem -m pytest ./test/
uv run --locked coverage report
uv run --locked coverage report -m

# Build docs
sh build_docs.sh
2 changes: 2 additions & 0 deletions .github/workflows/test_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Install Linux build deps
run: sudo apt-get update && sudo apt-get install -y clang lld libstdc++-12-dev
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Format
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ target
site

examples/*.png
docs/python/example_outputs/*.png
docs/python/example_outputs/*.png

# Vendored code and build artefacts
vendor/armadillo-15.2.3/
15 changes: 15 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[submodule "vendor/boost-boost-1.90.0"]
path = vendor/boost-boost-1.90.0
url = https://github.com/boostorg/boost
[submodule "vendor/jsoncpp"]
path = vendor/jsoncpp
url = https://github.com/open-source-parsers/jsoncpp.git
[submodule "vendor/tclap"]
path = vendor/tclap
url = https://github.com/mirror/tclap.git
[submodule "vendor/rat-common"]
path = vendor/rat-common
url = https://gitlab.com/Project-Rat/rat-common.git
[submodule "vendor/rat-mlfmm"]
path = vendor/rat-mlfmm
url = https://gitlab.com/Project-Rat/rat-mlfmm.git
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## 4.0.0 2025-01-16

### Added

* Add `mlfmm` module with limited bindings to Project Rat's multipole methods for B-field and A-field
* Exposed as `cfsem::mlfmm::fields_linear_filament_mlfmm` when `rat-mlfmm` feature is enabled
* Add vendored dependencies and thin C FFI to support those bindings
* Available on Windows, linux, and macOS only; disabled on other platforms
* !Remove `flux_density_biot_savart` backwards-compatibility alias
* !Upgrade `flux_density_linear_filament`, `vector_potential_linear_filament`, and `body_force_density_linear_filament` functions
* Now handle finite wire length and finite wire thickness analytically
* New `wire_radius` input
* Removed mixed-precision section from flux density calculation in favor of all f64; this no longer affects overall throughput
* For both linear_filament and point_segment variants
* Old point-source segment formulations moved to `point_source::segment` module and available as `flux_density_point_segment` and `vector_potential_point_segment` functions
* Add `biot_savart.py` and `vector_potential.py` examples with plots comparing linear filament, point segment, and multipole calcs
* Improve parallelism heuristics
* Minimum chunk size of 1024
* Use half of available parallelism as heuristic for physical cores

## 3.1.0 2025-12-19

### Added
Expand Down
Loading
Loading