for i in ti.ndrange((1, self.ny - 1)):
if self.obstacle_mask[1, i] != 1:
ux = 0.
if self.inlet_y_min <= i <= self.inlet_y_max:
ux = 4 * u_x * (self.inlet_y_max - i) * (i - self.inlet_y_min) / (self.D ** 2)
self.vel[1, i] = [ux, u_y]
self.rho[1, i] = pressure_in
for k in ti.static(range(self.q)):
self.f_old[1, i, k] = self.feq(k, self.rho[1, i], self.vel[1, i])
DeprecationWarning: In future, it will be an error for ‘np.bool_’ scalars to be interpreted as an index
return Expr(_ti_core.make_const_expr_int(constant_dtype, val))