Skip to content

non-singular BIE solver, improved FFT interpolation for singular integral, and new magnetic field API#2213

Open
unalmis wants to merge 434 commits into
masterfrom
ku/laplace
Open

non-singular BIE solver, improved FFT interpolation for singular integral, and new magnetic field API#2213
unalmis wants to merge 434 commits into
masterfrom
ku/laplace

Conversation

@unalmis

@unalmis unalmis commented May 15, 2026

Copy link
Copy Markdown
Collaborator

PR Age (see #1360)

  • All the solvers are thoroughly tested. See the shared paper to explain this PR. Significantly improved adjoint solve from earlier. It seems like this is still the only differentiable 3d laplace solver on the internet that works on multiply connected geometry.
  • Tested and confirmed agreement with BIE3D package. plotter.py
  • This PR includes my FFT improvements significantly improve free surface optimization (both old and new) and anything that involves singular integrals. Even the flaky GitHub ci benchmarks detect this.
  • Non-invasive, backward compatible, new magnetic field api implemented. Without the new api, the code would be unreadable.
  • There are other applications besides free surface.
  • The linear solve to compute the objective function only takes 2 gmres iterations. Gradient based optimization is very fast. Using a fast multipole technique would greatly improve performance. There are jax libraries that do this, but that can be a later pull request to merge after this.

iterative plots

stop tolerance denotes typical stop tol in most applications. gmres is expected to always invert the linear system in 2 iterations. after stateful opt, my guess is it will be reduced to 1 iteration.

image image image

@codecov

codecov Bot commented May 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.80023% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.42%. Comparing base (c119da0) to head (cf144da).

Files with missing lines Patch % Lines
desc/integrals/singularities.py 90.56% 15 Missing ⚠️
desc/compute/_laplace.py 96.98% 8 Missing ⚠️
desc/magnetic_fields/_laplace.py 93.54% 6 Missing ⚠️
desc/backend.py 84.00% 4 Missing ⚠️
desc/compute/utils.py 96.49% 2 Missing ⚠️
desc/basis.py 92.30% 1 Missing ⚠️
desc/objectives/_free_boundary.py 99.32% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2213      +/-   ##
==========================================
+ Coverage   94.34%   94.42%   +0.08%     
==========================================
  Files         101      103       +2     
  Lines       28845    29439     +594     
==========================================
+ Hits        27213    27798     +585     
- Misses       1632     1641       +9     
Files with missing lines Coverage Δ
desc/coils.py 97.96% <ø> (ø)
desc/compute/__init__.py 100.00% <ø> (ø)
desc/compute/_basis_vectors.py 100.00% <100.00%> (ø)
desc/compute/_core.py 100.00% <100.00%> (ø)
desc/compute/_metric.py 100.00% <100.00%> (ø)
desc/compute/_surface.py 100.00% <100.00%> (ø)
desc/compute/data_index.py 95.89% <ø> (ø)
desc/equilibrium/equilibrium.py 95.96% <ø> (ø)
desc/geometry/core.py 95.30% <100.00%> (ø)
desc/grid.py 94.76% <100.00%> (+0.04%) ⬆️
... and 15 more

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@unalmis unalmis added theory Requires theory work before coding and removed theory Requires theory work before coding labels May 16, 2026
@unalmis unalmis added the P∞ P_infty. Ready to merge > 1 years. priority to merge to prevent further delay of research. label May 31, 2026
@unalmis unalmis removed the request for review from rahulgaur104 June 18, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P∞ P_infty. Ready to merge > 1 years. priority to merge to prevent further delay of research. performance New feature or request to make the code faster run_benchmarks Run timing benchmarks on this PR against current master branch stable Besides merging master, other updates require a child PR that should be merged to master later.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

document tangential assumption of current potential classes New magnetic field API Better FFT interpolation for singular integration

4 participants