コード例 #1
0
ファイル: test_nnps.py プロジェクト: small-ji/pysph
    def _make_particles(self, nx=20):
        x = numpy.linspace(0, 1, nx)
        h = numpy.ones_like(x) / (nx - 1)

        pa = get_particle_array(name='fluid', x=x, h=h)
        nps = nnps.StratifiedSFCNNPS(dim=1, particles=[pa], num_levels=2,
                                     sort_gids=True)
        return pa, nps
コード例 #2
0
ファイル: test_nnps.py プロジェクト: small-ji/pysph
 def setUp(self):
     NNPSTestCase.setUp(self)
     self.nps = nnps.StratifiedSFCNNPS(
         dim=3, particles=self.particles, radius_scale=2.0,
         num_levels=2
     )