From 94fbc877ce46b08d82a61dd194ee3c2ec0deef4c Mon Sep 17 00:00:00 2001
From: markus holzer <markus.holzer@fau.de>
Date: Sat, 29 May 2021 15:03:16 +0200
Subject: [PATCH] More adaptions

---
 pystencils/boundaries/boundaryhandling.py        |  2 +-
 pystencils/boundaries/createindexlistcython.pyx  | 16 ++++++++--------
 .../datahandling/datahandling_interface.py       |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/pystencils/boundaries/boundaryhandling.py b/pystencils/boundaries/boundaryhandling.py
index a1d23a37..7af729ac 100644
--- a/pystencils/boundaries/boundaryhandling.py
+++ b/pystencils/boundaries/boundaryhandling.py
@@ -22,7 +22,7 @@ try:
 except ImportError:
     ParallelDataHandling = None
 
-DEFAULT_FLAG_TYPE = np.uint32
+DEFAULT_FLAG_TYPE = np.uint64
 
 
 class FlagInterface:
diff --git a/pystencils/boundaries/createindexlistcython.pyx b/pystencils/boundaries/createindexlistcython.pyx
index 0931fdc7..bf8bc7e4 100644
--- a/pystencils/boundaries/createindexlistcython.pyx
+++ b/pystencils/boundaries/createindexlistcython.pyx
@@ -19,8 +19,8 @@ ctypedef fused IntegerType:
 def create_boundary_neighbor_index_list_2d(object[IntegerType, ndim=2] flag_field,
                                            int nr_of_ghost_layers, IntegerType boundary_mask, IntegerType fluid_mask,
                                            object[int, ndim=2] stencil, int single_link):
-    cdef int xs, ys, x, y
-    cdef int dirIdx, num_directions, dx, dy
+    cdef long long xs, ys, x, y
+    cdef long long dirIdx, num_directions, dx, dy
 
     xs, ys = flag_field.shape
     boundary_index_list = []
@@ -44,8 +44,8 @@ def create_boundary_neighbor_index_list_2d(object[IntegerType, ndim=2] flag_fiel
 def create_boundary_neighbor_index_list_3d(object[IntegerType, ndim=3] flag_field,
                                            int nr_of_ghost_layers, IntegerType boundary_mask, IntegerType fluid_mask,
                                            object[int, ndim=2] stencil, int single_link):
-    cdef int xs, ys, zs, x, y, z
-    cdef int dirIdx, num_directions, dx, dy, dz
+    cdef long long xs, ys, zs, x, y, z
+    cdef long long dirIdx, num_directions, dx, dy, dz
 
     xs, ys, zs = flag_field.shape
     boundary_index_list = []
@@ -72,8 +72,8 @@ def create_boundary_neighbor_index_list_3d(object[IntegerType, ndim=3] flag_fiel
 def create_boundary_cell_index_list_2d(object[IntegerType, ndim=2] flag_field,
                                        IntegerType boundary_mask, IntegerType fluid_mask,
                                        object[int, ndim=2] stencil, int single_link):
-    cdef int xs, ys, x, y
-    cdef int dirIdx, num_directions, dx, dy
+    cdef long long xs, ys, x, y
+    cdef long long dirIdx, num_directions, dx, dy
 
     xs, ys = flag_field.shape
     boundary_index_list = []
@@ -98,8 +98,8 @@ def create_boundary_cell_index_list_2d(object[IntegerType, ndim=2] flag_field,
 def create_boundary_cell_index_list_3d(object[IntegerType, ndim=3] flag_field,
                                        IntegerType boundary_mask, IntegerType fluid_mask,
                                        object[int, ndim=2] stencil, int single_link):
-    cdef int xs, ys, zs, x, y, z
-    cdef int dirIdx, num_directions, dx, dy, dz
+    cdef long long xs, ys, zs, x, y, z
+    cdef long long dirIdx, num_directions, dx, dy, dz
 
     xs, ys, zs = flag_field.shape
     boundary_index_list = []
diff --git a/pystencils/datahandling/datahandling_interface.py b/pystencils/datahandling/datahandling_interface.py
index 0eb10181..62251bb4 100644
--- a/pystencils/datahandling/datahandling_interface.py
+++ b/pystencils/datahandling/datahandling_interface.py
@@ -425,7 +425,7 @@ class Block:
 
         Cell indices start at 0 at the first inner cell, lower ghost layers have negative indices
         """
-        mesh_grid_params = [offset + np.arange(width, dtype=np.int32)
+        mesh_grid_params = [offset + np.arange(width, dtype=np.int64)
                             for offset, width in zip(self.offset, self.shape)]
         return np.meshgrid(*mesh_grid_params, indexing='ij', copy=False)
 
-- 
GitLab