def store_attributes(x, rho, rhovx, energy, filename): output = text.CsvFileText(filename=filename) output.quantities = (x, rho, rhovx, energy) output.attribute_names = ("x", "rho", "rhovx", "energy") output.store()
print("end of subprocess", index) return x0, y0, x1, y1, x2, y2, m0, m1, m2, tends if __name__ == '__main__': result = AdaptingVectorQuantity() channel.MpiChannel.ensure_mpi_initialized() rank = MPI.COMM_WORLD.Get_rank() total_number_of_systems = int(sys.argv[1]) data = calculate_escape_time(rank, total_number_of_systems) output = text.CsvFileText(filename="triple_data_{0:03}.csv".format(rank)) output.quantities = data output.attribute_names = ("x0", "y0", "x1", "y1", "x2", "y2", "m0", "m1", "m2", "tend") output.store() times = AdaptingVectorQuantity() counts = AdaptingVectorQuantity() print("doing statistics") sorted_times = data[-1].sorted() t = 0 | nbody_system.time tend = 1000 | nbody_system.time dt = 1 | nbody_system.time while t < tend: i = 0