def finalize(self):
    global n_particles, n_solid_particles
    n_particles = self.n_particles
    n_solid_particles = max(self.n_solid_particles, 1)
    print('n_particles', n_particles)
    print('n_solid', n_solid_particles)
def finalize(self):
    global n_particles, n_solid_particles
    n_particles = self.n_particles
    n_solid_particles = max(self.n_solid_particles, 1)
    print('n_particles', n_particles)
    print('n_solid', n_solid_particles)