summaryrefslogtreecommitdiff
path: root/class/mod_sectors_test.f90
diff options
context:
space:
mode:
authorConnor Moore <connor@hhmoore.ca>2026-02-27 14:08:37 -0500
committerConnor Moore <connor@hhmoore.ca>2026-02-27 14:08:37 -0500
commit6ff45fe556d3b49a1506c5882036f909c143ed85 (patch)
tree6ff69d8ee98361a3d531472fbe67c3cbb55ac9b6 /class/mod_sectors_test.f90
parent6dd6792a16954b0004cb35d14a5b25de0627c69d (diff)
Split up some modules and added a testing class for sectors
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