grid_type Derived Type

type, public :: grid_type

Cell-sorted linked cell grid used during the neighbor search


Components

Type Visibility Attributes Name Initial
integer, public, allocatable :: cellatidx(:)

Atom index of each entry of the cell-ordered atom list

integer, public :: n_xyz(3) = 1

Number of linked cells along the x, y and z direction

integer, public :: ncell = 0

Total number of linked cells

integer, public, allocatable :: off(:,:)

Stencil offsets of the cells scanned for each cell

logical, public :: periodic = .false.

Periodic boundaries flag of the grid

logical, public :: single = .false.

If true, every neighboring linked cell is a periodic unit cell, i.e., its lattice translation follows directly from the PBCs

integer, public, allocatable :: start(:)

Offset of each cell into the cell-ordered atom list, size ncell + 1

integer, public :: trmap(-1:1,-1:1,-1:1) = 0

Index of the lattice translation for each pbc shift in {-1,0,1}^3, zero if no translation vector matches that image

real(kind=wp), public, allocatable :: x(:)

Cell-ordered coordinates, kept as separate streams for vectorisation

real(kind=wp), public, allocatable :: y(:)

Cell-ordered coordinates, kept as separate streams for vectorisation

real(kind=wp), public, allocatable :: z(:)

Cell-ordered coordinates, kept as separate streams for vectorisation


Source Code

   type :: grid_type

      !> Number of linked cells along the x, y and z direction
      integer :: n_xyz(3) = 1

      !> Total number of linked cells
      integer :: ncell = 0

      !> Periodic boundaries flag of the grid
      logical :: periodic = .false.

      !> If true, every neighboring linked cell is a periodic unit cell, i.e.,
      !> its lattice translation follows directly from the PBCs
      logical :: single = .false.

      !> Stencil offsets of the cells scanned for each cell
      integer, allocatable :: off(:, :)

      !> Offset of each cell into the cell-ordered atom list, size ncell + 1
      integer, allocatable :: start(:)

      !> Atom index of each entry of the cell-ordered atom list
      integer, allocatable :: cellatidx(:)

      !> Cell-ordered coordinates, kept as separate streams for vectorisation
      real(wp), allocatable :: x(:), y(:), z(:)

      !> Index of the lattice translation for each pbc shift in
      !> {-1,0,1}^3, zero if no translation vector matches that image
      integer :: trmap(-1:1, -1:1, -1:1) = 0
   end type grid_type