summaryrefslogtreecommitdiff
path: root/class/mod_sectors_test.f90
blob: 1f490df15cb5abd6e4bfa0206206c06c83dbd94b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
program sectors_test

    use, intrinsic :: iso_fortran_env
    use :: sectors
    implicit none
    
    integer(int32), allocatable, dimension(:) :: neighbours_list

    !> Testing get_neighbor_ids function
    !> list = get_neighbor_ids(p,N)
    !> input: p,n
    !> Output: variable-length vector

    print *, "Neighbours of 0:"
    neighbours_list = get_neighbour_ids(0,4)
    print *, neighbours_list

    print *, "Neighbours of 1:"
    neighbours_list = get_neighbour_ids(1,4)
    print *, neighbours_list
    
    print *, "Neighbours of 5:"
    neighbours_list = get_neighbour_ids(5,4)
    print*, neighbours_list

    print *, "Neighbours of 12:"
    neighbours_list = get_neighbour_ids(12,4)
    print*, neighbours_list

    print *, "Neighbours of 13:"
    neighbours_list = get_neighbour_ids(13,4)
    print*, neighbours_list

    print *, "Neighbours of 15:"
    neighbours_list = get_neighbour_ids(15,4)
    print*, neighbours_list

end program sectors_test