Skip to content
Snippets Groups Projects
Commit cd50b092 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Merge branch 'periodic_flag_in_yaml_file' into 'master'

Read the periodicity flag from the YAML file

Closes #466

See merge request !642
parents 197e3b7f 80d7fd79
No related branches found
No related tags found
1 merge request!642Read the periodicity flag from the YAML file
Showing
with 15 additions and 19 deletions
...@@ -66,6 +66,7 @@ SPH: ...@@ -66,6 +66,7 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./dwarf_galaxy.hdf5 # The file to read file_name: ./dwarf_galaxy.hdf5 # The file to read
periodic: 1
cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget
cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
...@@ -55,6 +55,7 @@ SPH: ...@@ -55,6 +55,7 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./EAGLE_ICs_100.hdf5 # The file to read file_name: ./EAGLE_ICs_100.hdf5 # The file to read
periodic: 1
cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget
cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget
...@@ -53,6 +53,7 @@ SPH: ...@@ -53,6 +53,7 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./EAGLE_ICs_12.hdf5 # The file to read file_name: ./EAGLE_ICs_12.hdf5 # The file to read
periodic: 1
cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget
cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget
...@@ -62,6 +62,7 @@ SPH: ...@@ -62,6 +62,7 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./EAGLE_ICs_25.hdf5 # The file to read file_name: ./EAGLE_ICs_25.hdf5 # The file to read
periodic: 1
cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget
cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget
......
...@@ -55,6 +55,7 @@ SPH: ...@@ -55,6 +55,7 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./EAGLE_ICs_50.hdf5 # The file to read file_name: ./EAGLE_ICs_50.hdf5 # The file to read
periodic: 1
cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget
cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget
......
...@@ -66,6 +66,7 @@ SPH: ...@@ -66,6 +66,7 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./EAGLE_ICs_6.hdf5 # The file to read file_name: ./EAGLE_ICs_6.hdf5 # The file to read
periodic: 1
cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget
cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget
......
...@@ -49,6 +49,7 @@ Gravity: ...@@ -49,6 +49,7 @@ Gravity:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: EAGLE_DMO_ICs_100.hdf5 file_name: EAGLE_DMO_ICs_100.hdf5
periodic: 1
cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget
cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget
...@@ -51,6 +51,7 @@ Gravity: ...@@ -51,6 +51,7 @@ Gravity:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: EAGLE_DMO_ICs_12.hdf5 file_name: EAGLE_DMO_ICs_12.hdf5
periodic: 1
cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget
cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget
...@@ -50,6 +50,7 @@ Gravity: ...@@ -50,6 +50,7 @@ Gravity:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: EAGLE_DMO_ICs_25.hdf5 file_name: EAGLE_DMO_ICs_25.hdf5
periodic: 1
cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget
cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget
...@@ -49,6 +49,7 @@ Gravity: ...@@ -49,6 +49,7 @@ Gravity:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: EAGLE_DMO_ICs_50.hdf5 file_name: EAGLE_DMO_ICs_50.hdf5
periodic: 1
cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget
cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget
...@@ -39,6 +39,7 @@ Gravity: ...@@ -39,6 +39,7 @@ Gravity:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./evrard.hdf5 # The file to read file_name: ./evrard.hdf5 # The file to read
periodic: 0
PhysicalConstants: PhysicalConstants:
G: 1. G: 1.
...@@ -86,10 +86,6 @@ grp.attrs["MassTable"] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ...@@ -86,10 +86,6 @@ grp.attrs["MassTable"] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
grp.attrs["Flag_Entropy_ICs"] = 0 grp.attrs["Flag_Entropy_ICs"] = 0
grp.attrs["Dimension"] = 3 grp.attrs["Dimension"] = 3
#Runtime parameters
grp = file.create_group("/RuntimePars")
grp.attrs["PeriodicBoundariesOn"] = 0
#Units #Units
grp = file.create_group("/Units") grp = file.create_group("/Units")
grp.attrs["Unit length in cgs (U_L)"] = 1. grp.attrs["Unit length in cgs (U_L)"] = 1.
......
...@@ -31,6 +31,7 @@ SPH: ...@@ -31,6 +31,7 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: PointMass.hdf5 # The file to read file_name: PointMass.hdf5 # The file to read
periodic: 0
shift: [50.,50.,50.] # A shift to apply to all particles read from the ICs (in internal units). shift: [50.,50.,50.] # A shift to apply to all particles read from the ICs (in internal units).
# External potential parameters # External potential parameters
......
...@@ -79,9 +79,6 @@ grp.attrs["MassTable"] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ...@@ -79,9 +79,6 @@ grp.attrs["MassTable"] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
grp.attrs["Flag_Entropy_ICs"] = [0, 0, 0, 0, 0, 0] grp.attrs["Flag_Entropy_ICs"] = [0, 0, 0, 0, 0, 0]
grp.attrs["Dimension"] = 3 grp.attrs["Dimension"] = 3
#Runtime parameters
grp = file.create_group("/RuntimePars")
grp.attrs["PeriodicBoundariesOn"] = periodic
#Units #Units
grp = file.create_group("/Units") grp = file.create_group("/Units")
......
...@@ -31,4 +31,4 @@ SPH: ...@@ -31,4 +31,4 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./Gradients_cartesian.hdf5 # The file to read file_name: ./Gradients_cartesian.hdf5 # The file to read
periodic: 1
...@@ -31,4 +31,4 @@ SPH: ...@@ -31,4 +31,4 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./Gradients_random.hdf5 # The file to read file_name: ./Gradients_random.hdf5 # The file to read
periodic: 1
...@@ -26,7 +26,6 @@ import sys ...@@ -26,7 +26,6 @@ import sys
# reconstruction # reconstruction
# Parameters # Parameters
periodic= 1 # 1 For periodic box
gamma = 5./3. # Gas adiabatic index gamma = 5./3. # Gas adiabatic index
gridtype = "cartesian" gridtype = "cartesian"
if len(sys.argv) > 1: if len(sys.argv) > 1:
...@@ -153,10 +152,6 @@ grp.attrs["NumFilesPerSnapshot"] = 1 ...@@ -153,10 +152,6 @@ grp.attrs["NumFilesPerSnapshot"] = 1
grp.attrs["MassTable"] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] grp.attrs["MassTable"] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
grp.attrs["Flag_Entropy_ICs"] = [0, 0, 0, 0, 0, 0] grp.attrs["Flag_Entropy_ICs"] = [0, 0, 0, 0, 0, 0]
#Runtime parameters
grp = file.create_group("/RuntimePars")
grp.attrs["PeriodicBoundariesOn"] = periodic
#Particle group #Particle group
grp = file.create_group("/PartType0") grp = file.create_group("/PartType0")
ds = grp.create_dataset('Coordinates', (npart, 3), 'd') ds = grp.create_dataset('Coordinates', (npart, 3), 'd')
......
...@@ -53,10 +53,6 @@ grp.attrs["MassTable"] = [0.0, mass, 0.0, 0.0, 0.0, 0.0] ...@@ -53,10 +53,6 @@ grp.attrs["MassTable"] = [0.0, mass, 0.0, 0.0, 0.0, 0.0]
grp.attrs["Flag_Entropy_ICs"] = 0 grp.attrs["Flag_Entropy_ICs"] = 0
grp.attrs["Dimension"] = 3 grp.attrs["Dimension"] = 3
#Runtime parameters
grp = file.create_group("/RuntimePars")
grp.attrs["PeriodicBoundariesOn"] = periodic
#Units #Units
grp = file.create_group("/Units") grp = file.create_group("/Units")
grp.attrs["Unit length in cgs (U_L)"] = 1. grp.attrs["Unit length in cgs (U_L)"] = 1.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment