xy_next_nearest_neighbors Subroutine

public pure subroutine xy_next_nearest_neighbors(lattice, nnn_mask, nn_mask)

Build a mask for the next-nearest neighbors of a given lattice. It is a NxN matrix, with N the number of sites in the lattice, storing .true. values only for the pairs of sites linked by a "NNN-bond". Optionally builds a nearest-neighbors mask, too. It calls internally xy_shells, for all inter-site distances, so if you need more than NNNs consider calling xy_shells directly. Note that we provide a similar subroutine for nearest-neighbors only, so if you just need NNs consider calling it.

call xy_nearest_neighbors(lattices,nn_maks)

Arguments

Type IntentOptional Attributes Name
type(xy_lattice), intent(in) :: lattice
logical, intent(out), allocatable :: nnn_mask(:,:)
logical, intent(out), optional, allocatable :: nn_mask(:,:)

Calls

proc~~xy_next_nearest_neighbors~~CallsGraph proc~xy_next_nearest_neighbors xy_neighbors::xy_next_nearest_neighbors proc~xy_shells xy_neighbors::xy_shells proc~xy_next_nearest_neighbors->proc~xy_shells proc~xy_distance xy_coordinates::xy_distance proc~xy_shells->proc~xy_distance sort sort proc~xy_shells->sort proc~xy_norm xy_coordinates::xy_norm proc~xy_distance->proc~xy_norm