Make_lattice: Add option for larger nnlist#640
Open
jonasschwab wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends Make_lattice in Lattices_v3 with an optional argument to control the allocation/index range of Latt%nnlist and Latt%nnlistk, and refreshes the Doxygen documentation for that routine (plus a copyright year update).
Changes:
- Add optional
nnlist_range_inargument toMake_latticeand allocatennlist/nnlistkwith bounds-nnlist_range:nnlist_range. - Add/expand Doxygen documentation for
Make_lattice. - Update copyright header year.
Comments suppressed due to low confidence (1)
Libraries/Modules/lattices_v3_mod.F90:316
- With
nnlist_range_in > 1, the displacementd_pcan be multiple unit cells away. The current fixed 4×npbccalls were sufficient for the old-1:1range, but are not guaranteed to wrap larger displacements back into the fundamental domain; this can producennr1/nnr2outsideLatt%invlistbounds. Wrapx_pusing a number ofnpbciterations that scales withnnlist_range.
call npbc(x1_p, x_p , Latt%L1_p, Latt%L2_p)
call npbc(x_p , x1_p, Latt%L1_p, Latt%L2_p)
call npbc(x1_p, x_p , Latt%L1_p, Latt%L2_p)
call npbc(x_p , x1_p, Latt%L1_p, Latt%L2_p)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
debf787 to
1a1d171
Compare
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.
This feature adds an optional argument to
subroutine Make_latticeto have largernnlistandnnlistk.It also improves the Doxygen of the lattice slightly.