Skip to content

Fix: complete B-spline integer-point sum in Structure_Factor::bsplinecoef - #8209

Closed
Cstandardlib wants to merge 2 commits into
deepmodeling:developfrom
Cstandardlib:fix-nbspline-bsplinecoef
Closed

Cstandardlib wants to merge 2 commits into
deepmodeling:developfrom
Cstandardlib:fix-nbspline-bsplinecoef

Conversation

@Cstandardlib

Copy link
Copy Markdown
Collaborator

Fix missing last term in B-spline deconvolution factor for structure factor (nbspline).

Summary

When nbspline = N is set, Structure_Factor::bsplinecoef the denominator loop was for (int io = 0; io < norder - 1; ++io), which drops the last integer-point sample M_{N+1}(N) = 1/N! of the Cardinal B-spline. Fix it.

Linked Issue

Fix #8092

Unit Tests and/or Case Tests for my changes

  • Commands run:
  • Result summary:
  • Checks not run, with reason:

What's changed?

  • Example: brief summary of the user-visible or developer-facing change.

Governance Notes

  • INPUT/docs changes:
  • Core module impact:
  • Exceptions requested:

@Cstandardlib Cstandardlib changed the title fix(pw): complete B-spline integer-point sum in Structure_Factor::bsplinecoef Fix: complete B-spline integer-point sum in Structure_Factor::bsplinecoef Oct 23, 2026
@Cstandardlib
Cstandardlib marked this pull request as draft October 23, 2026 11:40
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.

[BUG] nbspline gives wrong structure factors at low orders:

1 participant