Skip to content

Support custom midpoint inner products - #30

Closed
rogeriojorge wants to merge 1 commit into
agent/midpoint-solver-diagnosticsfrom
agent/midpoint-custom-inner-product
Closed

rogeriojorge wants to merge 1 commit into
agent/midpoint-solver-diagnosticsfrom
agent/midpoint-custom-inner-product

Conversation

@rogeriojorge

Copy link
Copy Markdown
Member

Summary

  • add an optional inner_product field to ImplicitMidpoint
  • forward it to SOLVAX Newton--Krylov for both nonlinear norms and GMRES reductions
  • verify that the configured callable is used

Why

Mapped Hermite/species states require global scalar products. Without a global
reduction, replicas can make different Newton or GMRES stopping decisions and
enter incompatible collective sequences. Keeping the callable on the solver
also supports weighted norms without coupling the solver to a mesh topology.

The mapped simulation will inject its existing species/phase-space scalar
products in a separate PR after the sharding and midpoint stacks share a base.

Validation

  • complete SPECTRAX suite: 8 passed
  • Ruff and git diff --check pass
  • sdist and wheel build successfully
  • unpushed integration audit: serial, species-sharded, and Hermite-sharded
    midpoint trajectories agree; omitting the global product reproduces divergent
    collective control flow under Hermite sharding
  • clean 129² Fourier, 40×4×4 Hermite, 100-step GPU control: one and two-GPU
    trajectories agree to 3.45e-25 relative L2 in Ck; two GPUs give 2.20x speedup

Stack

This draft targets agent/midpoint-solver-diagnostics (#29), so the source
change is only three lines in midpoint_solver.py plus one focused regression
test.

@rogeriojorge
rogeriojorge marked this pull request as ready for review July 13, 2026 14:59
@rogeriojorge
rogeriojorge force-pushed the agent/midpoint-solver-diagnostics branch from afc5e4b to e97d9b3 Compare July 16, 2026 14:13
@rogeriojorge
rogeriojorge force-pushed the agent/midpoint-custom-inner-product branch from 8cf6fd0 to e42f3b8 Compare July 16, 2026 14:13
@rogeriojorge

Copy link
Copy Markdown
Member Author

Dropped: no caller in SPECTRAX needs a custom inner product; #21 keeps the default reductions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant