Repository navigation
Support supplied physical collision profiles for common species adapters - #322
Closed
krystophny wants to merge 10 commits into
Closed
krystophny wants to merge 10 commits into
krystophny wants to merge 10 commits into
Conversation
…bulated data without derivatives Fritsch-Carlson interior slopes with scipy PchipInterpolator's end slopes, so Python front ends (bouquet, TPS) can reproduce GPEC's interpolant exactly. Unit test checks values and derivatives against scipy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…profile table The tabulated Zeff (RDCON MRE terms) and the PENTRC kinetic input table carry pedestal-scale gradients; a cubic spline rings there, pchip does not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pchip fits any table of 2 or more points, so the 4-point minimum of the "extrap" spline goes. A scalar Zeff now becomes a flat profile on 2 nodes, the same table that tearing-physics-suite writes for a scalar Zeff (psi_N_Zeff = 0, 1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preserve current primitive spline and solver fixes while retaining the pointwise Coulomb-rate repair. Native profile oracle passes with maximum relative error 1.4153e-7. Chris&AI
Add opt-in rates-v1 profiles with positive log interpolation, exact zero rotation, native readback metadata and independent reader/query regressions. Preserve legacy model selection; this remains a diagonal one-population response. Chris&AI
Contributor
|
@krystophny I've rebuilt the supplied-rates part of this on top of #336 as #338, and requested your review there. It's +37/−10 in 4 files:
Compared with this PR, it doesn't keep exactly-zero rotation (0 still goes to 1e-9), it doesn't require Are you OK with closing this one (and #318, which this depends on) in favor of #338? If yes, please just go ahead and close it. |
Collaborator
Author
krystophny
pushed a commit
to krystophny/GPEC
that referenced
this pull request
Oct 21, 2026
…format="rates-v1" With kinetic_format="rates-v1" in PENT_INPUT, the kinetic_file carries three extra columns (logLambda, nu_i, nu_e in s^-1) that replace the internal collision model. They are interpolated in log on the table so nodes stay positive, and they reuse the pchip nu slopes from the edge-collisionality fix. The default "legacy" path is unchanged. DCON kin_flag passes the same format. Slim replacement for the supplied-rates part of PrincetonUniversity#322 on top of PrincetonUniversity#336. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VMDGyfQKRZQMdk3NJXsKQE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A common D/T/e comparison needs the same declared physical collision rates and rotation in every native response. Add opt-in kinetic_format="rates-v1" profiles carrying selected ion/electron drives, common Coulomb logarithm and positive supplied rates in s^-1. Both query interfaces bypass the legacy impurity-rate reconstruction. Log interpolation and generated reconstruction preserve positive widths; exact zero rotation is retained and wpfac=1 is enforced. Native output records the consumed format and controls. The generated native dependency graph tracks the supplied-rate include, so edits rebuild its consuming input module.
Depends on the pointwise-query repair #318, included until it merges. Existing geometry, harmonic and energy factors remain. One call computes one population; the D/T/e adapter uses three calls with rates from one full background mixture. This is a diagonal scalar response; coupled Fokker–Planck physics is outside this interface.
The CI profile-domain repair from #318 is included: legacy rate reconstruction is lazy, direct Zeff consumers are preserved, and both examples stop at their supplied kinetic endpoint. Supplied-rate initialization and strict validation remain intact. No invalid Coulomb logarithm is floored or accepted.
Validation: make -C install check-pentrc-collisions passes on Apple arm64 with GNU Fortran. Supplied Debug and fast-math oracles each check 210 native query rows and derivatives (maximum relative error 2.88e-8); seven invalid inputs per build reject. Legacy/CI oracle checks 315 rows at maximum error 1.99166e-7, preserves six parent primitives/gradients exactly, and rejects an actual invalid extrapolated query. Full GNU/Intel solver replay passed all five CI checks at 99dfe12; the dependency-only update is undergoing current-head CI. The owning dependency generator/check fails before the missing include dependency and passes after it. Native NetCDF readback, field matching and cross-code torque scans remain pending, so this PR is draft.
Chris&AI