Exemple #1
0
    def setUp(self):
        NNPSTestCase.setUp(self)
        cl = importorskip("pyopencl")
        from pysph.base import gpu_nnps

        self.nps = gpu_nnps.StratifiedSFCGPUNNPS(
            dim=3, particles=self.particles, radius_scale=2.0,
            num_levels=2, backend='opencl'
        )
Exemple #2
0
    def setUp(self):
        NNPSTestCase.setUp(self)
        cl = importorskip("pyopencl")
        from pysph.base import gpu_nnps
        ctx = cl.create_some_context(interactive=False)

        self.nps = gpu_nnps.StratifiedSFCGPUNNPS(
            dim=3, particles=self.particles, radius_scale=2.0,
            use_double=False, num_levels=2, ctx=ctx
        )