def taco_barnes_hut(np): particles = common.gen_particle_list(np) root_region = taco.Region(tuple([(0.0, 1.0)] * common.NDIM)) root_cell = BHCell(particles, root_region, set(range(np))) theta = 0.5 bh_interact(root_cell, root_cell, theta) return particles
def taco_compute(np): maximum_np_cell = int(math.ceil(np / 10.0)) particles = common.gen_particle_list(np) root_region = taco.Region(tuple([(0.0, 1.0)] * common.NDIM)) root_cell = taco.Cell(particles, root_region, set(range(np))) print "root cell: " + str(root_cell) interact(root_cell, root_cell, maximum_np_cell) return particles
def taco_compute(np): maximum_np_cell = int(math.ceil(np / 10.0)) particles = common.gen_particle_list(np) root_region = taco.Region(tuple([(0.0, 1.0)]*common.NDIM)) root_cell = taco.Cell(particles, root_region, set(range(np))) print "root cell: " + str(root_cell) interact(root_cell, root_cell, maximum_np_cell) return particles
def taco_barnes_hut(np): particles = common.gen_particle_list(np) root_region = taco.Region(tuple([(0.0, 1.0)] * common.NDIM)) root_cell = BHCell(particles, root_region, set(range(np))) theta = 0.5 # bh_interact(root_cell, root_cell, theta) map(approximate, traverse(root_cell), PostOrder) map(bh_interact2, product(root_cell.get_leaves(), traverse(root_cell)), theta) return particles
def taco_barnes_hut(np): particles = common.gen_particle_list(np) root_region = taco.Region(tuple([(0.0, 1.0)] * common.NDIM)) root_cell = BHCell(particles, root_region, set(range(np))) theta = 0.5 #bh_interact(root_cell, root_cell, theta) map(approximate, traverse(root_cell), PostOrder) map(bh_interact2, product(root_cell.get_leaves(), traverse(root_cell)), theta) return particles
def taco_fmm(np): particles = common.gen_particle_list(np) root_region = taco.Region(tuple([(0.0, 1.0)] * common.NDIM)) root_cell = FMMCell(particles, root_region, set(range(np)), is_root=True) # P2M and M2M fmm_p2m(root_cell) # M2L fmm_m2l(root_cell, root_cell) # L2L and L2P fmm_l2l(root_cell) # short-range direct force fmm_p2p(root_cell, root_cell) return particles
def taco_fmm(np): particles = common.gen_particle_list(np) root_region = taco.Region(tuple([(0.0, 1.0)]*common.NDIM)) root_cell = FMMCell(particles, root_region, set(range(np)), is_root=True) # P2M and M2M fmm_p2m(root_cell) # M2L fmm_m2l(root_cell, root_cell) # L2L and L2P fmm_l2l(root_cell) # short-range direct force fmm_p2p(root_cell, root_cell) return particles