Skip to content

fix(KIM): apply ion FLR scale consistently - #269

Closed
krystophny wants to merge 1 commit into
mainfrom
agent/kim-257-flr-scale
Closed

fix(KIM): apply ion FLR scale consistently#269
krystophny wants to merge 1 commit into
mainfrom
agent/kim-257-flr-scale

Conversation

@krystophny

Copy link
Copy Markdown
Member

Summary

  • make ion_flr_scale_factor affect only positively charged ion species, never electrons
  • apply the ion-only factor consistently to all six FP analytic prefactors proportional to a signed gyroradius (1/Omega_sigma)
  • consume stored rho_L_cc exactly once in global integration geometry
  • add a focused regression covering electron invariance, single ion scaling, and the production geometry seam

Derivation convention

The finite-collision derivation gives all four response channels a common 1/Omega_sigma external factor. The artificial ion-FLR knob therefore applies to each ion channel. Separately, background construction already stores an effective scaled ion rho_L, so real-space Bessel geometry must not multiply that stored radius again.

Red/green evidence

Before the fix, changing the ion scale from 1 to 4 multiplied the manufactured electron FP prefactors by 4. The geometry seam did not exist, and the global path directly multiplied an already-scaled rho_L_cc by the knob again. The new test now covers all six affected analytic prefactors and the one-time geometry rule.

Verification

  • test_ion_flr_scale_factor
  • test_integration_methods
  • test_flr2_fourier_kernel
  • test_periodic_background_build
  • test_periodic_assembly
  • test_kim_solver_em
  • git diff --check

All passed. Independent re-review: no remaining findings.

Closes #257

@marjohma
marjohma force-pushed the agent/kim-257-flr-scale branch from 769c03d to 1f95a1f Compare July 28, 2026 10:27
@marjohma

Copy link
Copy Markdown
Member

Closing this draft so it can be recreated under the requested marjohma PR authorship. The replacement will use the same branch and commit.

@marjohma

Copy link
Copy Markdown
Member

Replacement: #280, opened by marjohma from the same branch and commit.

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.

[KIM] Make ion_flr_scale_factor species-local and consistent across kernel paths

2 participants