summaryrefslogtreecommitdiff
path: root/class/mod_sectors_test.f90
diff options
context:
space:
mode:
Diffstat (limited to 'class/mod_sectors_test.f90')
-rw-r--r--class/mod_sectors_test.f9038
1 files changed, 38 insertions, 0 deletions
diff --git a/class/mod_sectors_test.f90 b/class/mod_sectors_test.f90
new file mode 100644
index 0000000..1f490df
--- /dev/null
+++ b/class/mod_sectors_test.f90
@@ -0,0 +1,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