diff --git a/hysop/backend/device/opencl/autotunable_kernels/advection_dir.py b/hysop/backend/device/opencl/autotunable_kernels/advection_dir.py index 5a1025ebaf35cee5e3522237ad43266a41982685..35fff01b7c7c4180a3ba45e7e94d83675f2a9b5a 100644 --- a/hysop/backend/device/opencl/autotunable_kernels/advection_dir.py +++ b/hysop/backend/device/opencl/autotunable_kernels/advection_dir.py @@ -61,7 +61,7 @@ class OpenClAutotunableDirectionalAdvectionKernel(OpenClAutotunableKernel): vboundaries = (velocity.global_lboundaries[-1], velocity.global_rboundaries[-1]) eps = npw.finfo(precision).eps - dt = velocity_cfl + dt = velocity_cfl * velocity.space_step[-1] make_offset, offset_dtype = self.make_array_offset() make_strides, strides_dtype = self.make_array_strides(position.dim, @@ -84,7 +84,7 @@ class OpenClAutotunableDirectionalAdvectionKernel(OpenClAutotunableKernel): target_args['P_offset'] = make_offset(position.sdata.offset, position.dtype) isolation_params['V_base'] = dict(count=velocity.npoints, - dtype=velocity.dtype, fill=0.05) + dtype=velocity.dtype, fill=1.00) isolation_params['P_base'] = dict(count=position.npoints, dtype=position.dtype, fill=0.00) @@ -194,7 +194,7 @@ class OpenClAutotunableDirectionalAdvectionKernel(OpenClAutotunableKernel): Vr = extra_kwds['Vr'] is_bilevel = extra_kwds['is_bilevel'] - if is_bilevel is not None and local_work_size is not None: + if (is_bilevel is not None) and (local_work_size is not None): local_work_size[0] = is_bilevel[-1] ## Get compile time OpenCL known variables @@ -241,3 +241,4 @@ class OpenClAutotunableDirectionalAdvectionKernel(OpenClAutotunableKernel): 'known_args') return self.custom_hash(*tuple(extra_kwds[kwd] for kwd in kwds), mesh_info_vars=extra_kwds['mesh_info_vars']) +