コード例 #1
0
ファイル: speed_report.py プロジェクト: rjfarmer/amuse
 def speed_copy_to_superset(self):
     particles1 = new_plummer_model(self.total_number_of_points)
     particles2 = new_plummer_model(self.total_number_of_points)
     particles_all = ParticlesSuperset([particles1, particles2])
     
     empty_particles = particles_all.empty_copy()
     
     channel1 = particles_all.new_channel_to(empty_particles)
     channel2 = empty_particles.new_channel_to(particles_all)
     self.start_measurement()
     channel1.copy_attributes(["x","y","z"])
     channel2.copy_attributes(["x","y","z"])
     self.end_measurement()
コード例 #2
0
ファイル: speed_report.py プロジェクト: vdhelm/amuse
    def speed_copy_to_superset(self):
        particles1 = new_plummer_model(self.total_number_of_points)
        particles2 = new_plummer_model(self.total_number_of_points)
        particles_all = ParticlesSuperset([particles1, particles2])

        empty_particles = particles_all.empty_copy()

        channel1 = particles_all.new_channel_to(empty_particles)
        channel2 = empty_particles.new_channel_to(particles_all)
        self.start_measurement()
        channel1.copy_attributes(["x", "y", "z"])
        channel2.copy_attributes(["x", "y", "z"])
        self.end_measurement()