diff --git a/examples/EAGLE_low_z/EAGLE_50/parallel_replicate_ICs.py b/tools/parallel_replicate_ICs.py similarity index 70% rename from examples/EAGLE_low_z/EAGLE_50/parallel_replicate_ICs.py rename to tools/parallel_replicate_ICs.py index 903424221ce0cadf48ad32d339f2f87c359bf430..289165ce6cd70c22346b005f410101b8ddae4e46 100755 --- a/examples/EAGLE_low_z/EAGLE_50/parallel_replicate_ICs.py +++ b/tools/parallel_replicate_ICs.py @@ -1,4 +1,48 @@ #!/usr/bin/env python +# +# Usage: +# python parallel_replicate_ICs.py EAGLE_ICs_50.hdf5 4 +# +# Description: +# Reads in a ICs file and replicates the particles in each dimension Plots speed up, parallel efficiency and time to solution given a "timesteps" output file generated by SWIFT. +""" +Usage: + python parallel_replicate_ICs.py IC_file.hdf5 rep_fac + +where IC_file.hdf5 is the ICs file that you want to replicate and rep_fac is the +replication factor in each dimension + +Description: +Reads in a ICs file and replicates the particles in each dimension by the +replication factor given and write a new IC called IC_file_xrep_fac.hdf5. + +Example: + python parallel_replicate_ICs.py EAGLE_ICs_50.hdf5 4 + +Running the above example will produce a tiled 50MPc box in each dimension to +give a 200MPc box. + +Note: the script only replicates dark matter particles, but can be easily +extended to support other particle types. + +This file is part of SWIFT. + +Copyright (C) 2019 James Willis (james.s.willis@durham.ac.uk) +All Rights Reserved. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" import h5py as h import numpy as np