diff --git a/pystencils/boundaries/createindexlist.py b/pystencils/boundaries/createindexlist.py index 51bd5464f89b80c1ed272f1b4b0a932e46095863..0e23b93ee6646c4aa1519df31923dbef97b8cecc 100644 --- a/pystencils/boundaries/createindexlist.py +++ b/pystencils/boundaries/createindexlist.py @@ -30,15 +30,15 @@ direction_member_name = "dir" def numpy_data_type_for_boundary_object(boundary_object, dim): coordinate_names = boundary_index_array_coordinate_names[:dim] - return np.dtype([(name, np.int32) for name in coordinate_names] - + [(direction_member_name, np.int32)] + return np.dtype([(name, np.int64) for name in coordinate_names] + + [(direction_member_name, np.int64)] + [(i[0], i[1].numpy_dtype) for i in boundary_object.additional_data], align=True) def _create_boundary_neighbor_index_list_python(flag_field_arr, nr_of_ghost_layers, boundary_mask, fluid_mask, stencil, single_link): coordinate_names = boundary_index_array_coordinate_names[:len(flag_field_arr.shape)] - index_arr_dtype = np.dtype([(name, np.int32) for name in coordinate_names] + [(direction_member_name, np.int32)]) + index_arr_dtype = np.dtype([(name, np.int64) for name in coordinate_names] + [(direction_member_name, np.int64)]) result = [] gl = nr_of_ghost_layers @@ -59,7 +59,7 @@ def _create_boundary_neighbor_index_list_python(flag_field_arr, nr_of_ghost_laye def _create_boundary_cell_index_list_python(flag_field_arr, boundary_mask, fluid_mask, stencil, single_link): coordinate_names = boundary_index_array_coordinate_names[:len(flag_field_arr.shape)] - index_arr_dtype = np.dtype([(name, np.int32) for name in coordinate_names] + [(direction_member_name, np.int32)]) + index_arr_dtype = np.dtype([(name, np.int64) for name in coordinate_names] + [(direction_member_name, np.int64)]) result = [] for cell in itertools.product(*reversed([range(0, i) for i in flag_field_arr.shape])): @@ -96,9 +96,9 @@ def create_boundary_index_list(flag_field, stencil, boundary_mask, fluid_mask, """ dim = len(flag_field.shape) coordinate_names = boundary_index_array_coordinate_names[:dim] - index_arr_dtype = np.dtype([(name, np.int32) for name in coordinate_names] + [(direction_member_name, np.int32)]) + index_arr_dtype = np.dtype([(name, np.int64) for name in coordinate_names] + [(direction_member_name, np.int64)]) - stencil = np.array(stencil, dtype=np.int32) + stencil = np.array(stencil, dtype=np.int64) args = (flag_field, nr_of_ghost_layers, boundary_mask, fluid_mask, stencil, single_link) args_no_gl = (flag_field, boundary_mask, fluid_mask, stencil, single_link)