def interact(c1, c2, s): if c1.get_num_particles() <= s and \ c2.get_num_particles() <= s: common.direct([c1.particles[i] for i in c1.indices], [c2.particles[i] for i in c2.indices], c1.region == c2.region) else: if c1.get_num_particles() > s: c1_children = c1.get_sub_cells() else: c1_children = [c1] if c2.get_num_particles() > s: c2_children = c2.get_sub_cells() else: c2_children = [c2] for i, j in taco.product(c1_children, c2_children): interact(i, j, s) return
def interact(c1, c2, s): if c1.is_leaf() and c2.is_leaf(): common.direct([c1.particles[i] for i in c1.indices], [c2.particles[i] for i in c2.indices], c1.region == c2.region) return