Utilities - BUG - CubicFit end derivative loses an offset-sized rounding error on edge-packed grids
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 49/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- julia
- 领域
- performance
调研方向
Start with FastInterpolations.jl's src/core/polyfit_kernels.jl:55 and :612-622, then inspect GPEC.jl's edge-packed grid construction in DirectEquilibrium.jl:478-500. Reproduce the end-derivative error using an offset profile on an edge-packed grid and compare against the analytic derivative. If confirmed, the issue proposes fixing it upstream in FastInterpolations.jl and updating this repository's compatibility bound.
由索引模型根据 Issue 内容生成。
描述
GPEC.jl builds its equilibrium splines with cubic_interp, whose default boundary condition CubicFit() sets the end derivative from a 4-point polynomial fit. FastInterpolations.jl 0.4.20 evaluates this derivative as muladd(c1, f1, … c4*f4) (src/core/polyfit_kernels.jl:55, called from :612-622). The weights sum to zero, so a constant offset in f cancels only in exact arithmetic. In floating point the error is about eps*|f|/h and is not reduced, so it grows on grids whose end spacing h is small compared with the end value.
The Fortran code had exactly this defect in its extrap spline end derivative. It made DCON/GPEC results wrong for mpsi >= 320 with grid_type='ldp' and at large aspect ratio (GPEC#306, fixed in GPEC#308). The fix there forms the derivative from differences to the end value, sum c_i (f_i - f_1), which is algebraically identical and removes the offset before rounding. The edge-packed Julia grids (log_asymptotic, core_edge_packed, DirectEquilibrium.jl:478-500) create the small h where this matters.
Status: verified in the source; the effect on a GPEC.jl result is not yet measured. Proposed route: (1) reproduce with a profile f = C + g(psi) that has a large offset C, on an edge-packed grid, and compare the end derivative with g' analytically; (2) if confirmed, repair it upstream in FastInterpolations.jl and bump the compat bound here, as for the PeriodicBC fix (#531).
Chris&AI
- 主要语言
- Julia
- 星标
- 11
- 派生
- 7
- 平均合并
- 4 天 3 小时
- 30 天内合并 PR
- 70
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenFUSIONToolkit/GPEC 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 82/100
OpenFUSIONToolkit/GPEC#644 ·
维护者通常 3 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
OpenFUSIONToolkit/GPEC#643 ·
维护者通常 3 天内回复
-
PerturbedEquilibrium - FEATURE - Complete the resistive perturbed-equilibrium workflow from Galerkin and matched results可能已有人在做 @matt-pharr 于 1 天前认领。 未关闭feature
OpenFUSIONToolkit/GPEC#635 · 1 条评论 · 已指派 1 人 ·
维护者通常 3 天内回复
-
test
难度 4/5 3-5 天 新手友好度 25/100
OpenFUSIONToolkit/GPEC#633 · 2 条评论 ·
维护者通常 3 天内回复
-
Tearing - FEATURE - Add a general modified Rutherford equation for island evolution可能已有人在做 @StuartBenjamin 于 1 天前认领。 未关闭feature
OpenFUSIONToolkit/GPEC#630 · 已指派 1 人 ·
维护者通常 3 天内回复
查看 OpenFUSIONToolkit/GPEC 的全部 Issue
相似的 Issue
-
`ShallowWaterModel` allocates ~9 KiB per grid point per RK3 stage on the CPU可能已有人在做 @ali-ramadhan 今天认领。 未关闭performance 🏍️
难度 2/5 1-3 小时 新手友好度 62/100
CliMA/Oceananigans.jl#6421 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
NCAR/musica#1118 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
`AMSGrad` state starts at `epsilon` instead of zero, so zero gradients move parameters and small gradients are damped可能已有人在做 @parth-patel010 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
FluxML/Optimisers.jl#247 · 1 条评论 ·
-
README should say that row and column order must match可能已有人在做 @SAUMYARSH 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 85/100