Skip to content
Snippets Groups Projects
Commit d58849a4 authored by Martin Bauer's avatar Martin Bauer
Browse files

More tests for list lbm

- cross check with normal lbm for channel flow with obstacle
- added correct pdf initialization
- 2x2 example with plot and detailed checks for index list
parent cbceb443
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,7 @@ def get_index_array(fluid_cell_arr, flag_arr, ghost_layers, stencil, fluid_flag, ...@@ -59,7 +59,7 @@ def get_index_array(fluid_cell_arr, flag_arr, ghost_layers, stencil, fluid_flag,
else: else:
raise ValueError("Could not find neighbor for {} direction {}".format(cell, direction)) raise ValueError("Could not find neighbor for {} direction {}".format(cell, direction))
ctr += 1 # TODO ctr += 1 # TODO
return np.array(result, dtype=np.uint32) return np.array(result, dtype=np.uint32)
...@@ -87,14 +87,3 @@ def plot_index_array(fluid_cell_arr, stencil, ghost_layers=1, index_arr=None, ** ...@@ -87,14 +87,3 @@ def plot_index_array(fluid_cell_arr, stencil, ghost_layers=1, index_arr=None, **
direction, direction, str(annotation), **kwargs) direction, direction, str(annotation), **kwargs)
index += 1 index += 1
return grid return grid
if __name__ == '__main__':
x = np.arange(9 * 7).reshape(9, 7)
ind = np.argwhere(x > 50)
print(ind)
res = get_cell_index(ind, (7, 2))
print("result index", res)
print("element ", ind[res])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment