From 6ff45fe556d3b49a1506c5882036f909c143ed85 Mon Sep 17 00:00:00 2001 From: Connor Moore Date: Fri, 27 Feb 2026 14:08:37 -0500 Subject: Split up some modules and added a testing class for sectors --- class/mod_sectors_test.f90 | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 class/mod_sectors_test.f90 (limited to 'class/mod_sectors_test.f90') 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 -- cgit v1.2.3