Skip to content
Snippets Groups Projects
Commit dec4b91a authored by James Willis's avatar James Willis
Browse files

Moved and documented parallel_replicatye_ICs.py script.

parent db2de652
No related branches found
No related tags found
1 merge request!930Parco 2019 debug
#!/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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment