def _create_nnps(self, arrays): # create the neighbor locator object self.nnps = NNPS(dim=self.kernel.dim, particles=arrays, radius_scale=self.kernel.radius_scale, domain=self.domain_manager, cache=True) self.func_eval.set_nnps(self.nnps)
def _create_nnps(self, arrays): self.nnps = NNPS(dim=self.kernel.dim, particles=arrays, radius_scale=self.kernel.radius_scale, domain=self.domain_manager, cache=True) self.nnps.update() self.func_eval.set_nnps(self.nnps)
def __init__(self, dim, dst, src, kernel=None): self.dst = dst self.src = src if kernel is None: self.kernel = get_compiled_kernel(Gaussian(dim)) # create the neighbor locator object self.nnps = nnps = NNPS(dim=dim, particles=[dst, src], radius_scale=self.kernel.radius_scale) nnps.update()
def _make_accel_eval(self, equations, cache_nnps=False): arrays = [self.pa] kernel = CubicSpline(dim=self.dim) a_eval = AccelerationEval( particle_arrays=arrays, equations=equations, kernel=kernel ) comp = SPHCompiler(a_eval, integrator=None) comp.compile() nnps = NNPS(dim=kernel.dim, particles=arrays, cache=cache_nnps) nnps.update() a_eval.set_nnps(nnps) return a_eval