diff --git a/lbmpy/advanced_streaming/indexing.py b/lbmpy/advanced_streaming/indexing.py index 6548235dc59c77dafc2ba63c7297a4f3ddde69a9..54249a48dbe773d2da614e81cd054298ad87e864 100644 --- a/lbmpy/advanced_streaming/indexing.py +++ b/lbmpy/advanced_streaming/indexing.py @@ -40,7 +40,7 @@ class BetweenTimestepsIndexing: # ============================= def __init__(self, pdf_field, stencil, prev_timestep=Timestep.BOTH, streaming_pattern='pull', - index_dtype=np.int32, offsets_dtype=np.int32): + index_dtype=np.int64, offsets_dtype=np.int64): if prev_timestep == Timestep.BOTH and is_inplace(streaming_pattern): raise ValueError('Cannot create index arrays for both kinds of timesteps for inplace streaming pattern ' + streaming_pattern) @@ -219,7 +219,7 @@ class NeighbourOffsetArrays(CustomCodeNode): def _offset_symbols(dim): return [TypedSymbol(f"neighbour_offset_{d}", create_type(np.int64)) for d in ['x', 'y', 'z'][:dim]] - def __init__(self, stencil, offsets_dtype=np.int32): + def __init__(self, stencil, offsets_dtype=np.int64): offsets_dtype = create_type(offsets_dtype) dim = len(stencil[0]) diff --git a/lbmpy/boundaries/boundaryhandling.py b/lbmpy/boundaries/boundaryhandling.py index 7ebfad53bcd4789a1d92c6bac7bfe8f084128a5b..7cd02822809ff6d13c14bcf5d13ee359e3b236b3 100644 --- a/lbmpy/boundaries/boundaryhandling.py +++ b/lbmpy/boundaries/boundaryhandling.py @@ -177,10 +177,8 @@ def create_lattice_boltzmann_boundary_kernel(pdf_field, index_field, lb_method, prev_timestep=Timestep.BOTH, streaming_pattern='pull', target='cpu', **kernel_creation_args): - index_dtype = index_field.dtype.numpy_dtype.fields['dir'][0] - offsets_dtype = index_field.dtype.numpy_dtype.fields['x'][0] indexing = BetweenTimestepsIndexing( - pdf_field, lb_method.stencil, prev_timestep, streaming_pattern, index_dtype, offsets_dtype) + pdf_field, lb_method.stencil, prev_timestep, streaming_pattern, np.int64, np.int64) f_out, f_in = indexing.proxy_fields dir_symbol = indexing.dir_symbol