Skip to content

Fixed inf norms for JE and treatment of charged_JE#85

Open
DuttaS12 wants to merge 2 commits intomainfrom
srijita
Open

Fixed inf norms for JE and treatment of charged_JE#85
DuttaS12 wants to merge 2 commits intomainfrom
srijita

Conversation

@DuttaS12
Copy link
Copy Markdown
Contributor

@DuttaS12 DuttaS12 commented Apr 22, 2026

This pull request updates the jellium integral routines to consistently use the atomic number (atno) and the angular grid size (size_ang) throughout the codebase. The code now uses the right grid size for computing jellium integrals. For computing the external potential due to the positive background, Ne is replaced by the atomic number to handle charged jellium spheres correctly.

Generalization and parameterization:

  • Updated all relevant function signatures in src/integrals/jellium_ints.cpp and their declarations in include/jellium_ints.h to accept int* atno (atomic numbers) and int size_ang (angular grid size) instead of relying on hardcoded or inferred values. This affects functions like compute_STEn_jellium, compute_Vr_jellium, and compute_4c_ol_jellium. [1] [2] [3] [4]

  • Refactored do_jellium in examples/main.cpp to accept atno and size_ang as parameters, updating all calls and removing local hardcoded atomic number arrays. [1] [2] [3]

Correctness and output improvements:

  • Changed calculations and print statements to use atno[0] (atomic number) instead of Ne (number of electrons) where appropriate, ensuring that the correct physical values are used in both computation and output. [1] [2]

Consistent use of angular grid size:

  • Replaced all instances of nang with size_ang in grid allocations, kernel launches, and data movement for angular grids, ensuring that the angular grid size is consistently applied throughout the code. [1] [2] [3] [4] [5] [6] [7]

Function call and implementation updates:

  • Updated all internal and external calls to the affected functions in both examples/main.cpp and src/integrals/jellium_ints.cpp to match the new parameter lists, ensuring code consistency and preventing mismatches. [1] [2] [3]

@DuttaS12 DuttaS12 linked an issue Apr 22, 2026 that may be closed by this pull request
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.

Infinity norms for d functions for Jellium

1 participant