Skip to content
Snippets Groups Projects
Commit 42697a8c authored by Michael Kuron's avatar Michael Kuron :mortar_board:
Browse files

Merge branch 'type_boundary' into 'master'

Use int64 for indexing

Closes #18

See merge request !84
parents 55d0ca6c 5068abc0
Branches
Tags
No related merge requests found
......@@ -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])
......
......@@ -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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment