Skip to content
Snippets Groups Projects
Commit 7e172373 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Updated all the examples' YAML files to use the new periodic flag.

parent edbe0071
No related branches found
No related tags found
1 merge request!642Read the periodicity flag from the YAML file
Showing
with 11 additions and 46 deletions
...@@ -34,3 +34,4 @@ SPH: ...@@ -34,3 +34,4 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./greshoVortex.hdf5 # The file to read file_name: ./greshoVortex.hdf5 # The file to read
periodic: 1
\ No newline at end of file
...@@ -89,10 +89,6 @@ grp.attrs["MassTable"] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ...@@ -89,10 +89,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"] = 2 grp.attrs["Dimension"] = 2
#Runtime parameters
grp = fileOutput.create_group("/RuntimePars")
grp.attrs["PeriodicBoundariesOn"] = 1
#Units #Units
grp = fileOutput.create_group("/Units") grp = fileOutput.create_group("/Units")
grp.attrs["Unit length in cgs (U_L)"] = 1. grp.attrs["Unit length in cgs (U_L)"] = 1.
......
...@@ -35,3 +35,4 @@ SPH: ...@@ -35,3 +35,4 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./greshoVortex.hdf5 # The file to read file_name: ./greshoVortex.hdf5 # The file to read
periodic: 1
\ No newline at end of file
...@@ -90,10 +90,6 @@ grp.attrs["MassTable"] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ...@@ -90,10 +90,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 = fileOutput.create_group("/RuntimePars")
grp.attrs["PeriodicBoundariesOn"] = 1
#Units #Units
grp = fileOutput.create_group("/Units") grp = fileOutput.create_group("/Units")
grp.attrs["Unit length in cgs (U_L)"] = 1. grp.attrs["Unit length in cgs (U_L)"] = 1.
......
...@@ -31,7 +31,8 @@ SPH: ...@@ -31,7 +31,8 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: Hydrostatic.hdf5 # The file to read file_name: Hydrostatic.hdf5 # The file to read
periodic: 1
# External potential parameters # External potential parameters
IsothermalPotential: IsothermalPotential:
vrot: 200. # rotation speed of isothermal potential in internal units vrot: 200. # rotation speed of isothermal potential in internal units
......
...@@ -91,10 +91,6 @@ grp.attrs["Unit current in cgs (U_I)"] = 1. ...@@ -91,10 +91,6 @@ grp.attrs["Unit current in cgs (U_I)"] = 1.
grp.attrs["Unit temperature in cgs (U_T)"] = 1. grp.attrs["Unit temperature in cgs (U_T)"] = 1.
# Runtime parameters
grp = file.create_group("/RuntimePars")
grp.attrs["PeriodicBoundariesOn"] = periodic
# set seed for random number # set seed for random number
np.random.seed(1234) np.random.seed(1234)
......
...@@ -31,3 +31,4 @@ SPH: ...@@ -31,3 +31,4 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./interactingBlastWaves.hdf5 # The file to read file_name: ./interactingBlastWaves.hdf5 # The file to read
periodic: 1
...@@ -62,10 +62,6 @@ grp.attrs["MassTable"] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ...@@ -62,10 +62,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"] = 1 grp.attrs["Dimension"] = 1
#Runtime parameters
grp = file.create_group("/RuntimePars")
grp.attrs["PeriodicBoundariesOn"] = 1
#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.
......
...@@ -26,6 +26,7 @@ Snapshots: ...@@ -26,6 +26,7 @@ Snapshots:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: Isothermal.hdf5 # The file to read file_name: Isothermal.hdf5 # The file to read
periodic: 1
shift: [200.,200.,200.] # Shift all particles to be in the potential shift: [200.,200.,200.] # Shift all particles to be in the potential
# External potential parameters # External potential parameters
......
...@@ -97,10 +97,6 @@ grp.attrs["MassTable"] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ...@@ -97,10 +97,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
# set seed for random number # set seed for random number
numpy.random.seed(1234) numpy.random.seed(1234)
......
...@@ -31,3 +31,4 @@ SPH: ...@@ -31,3 +31,4 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./kelvinHelmholtzGrowthRate.hdf5 # The file to read file_name: ./kelvinHelmholtzGrowthRate.hdf5 # The file to read
periodic: 1
...@@ -76,10 +76,6 @@ grp.attrs["MassTable"] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ...@@ -76,10 +76,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"] = 2 grp.attrs["Dimension"] = 2
#Runtime parameters
grp = fileOutput.create_group("/RuntimePars")
grp.attrs["PeriodicBoundariesOn"] = 1
#Units #Units
grp = fileOutput.create_group("/Units") grp = fileOutput.create_group("/Units")
grp.attrs["Unit length in cgs (U_L)"] = 1. grp.attrs["Unit length in cgs (U_L)"] = 1.
......
...@@ -82,10 +82,6 @@ grp.attrs["MassTable"] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ...@@ -82,10 +82,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"] = 2 grp.attrs["Dimension"] = 2
#Runtime parameters
grp = fileOutput.create_group("/RuntimePars")
grp.attrs["PeriodicBoundariesOn"] = 1
#Units #Units
grp = fileOutput.create_group("/Units") grp = fileOutput.create_group("/Units")
grp.attrs["Unit length in cgs (U_L)"] = 1. grp.attrs["Unit length in cgs (U_L)"] = 1.
......
...@@ -32,3 +32,4 @@ SPH: ...@@ -32,3 +32,4 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./kelvinHelmholtzGrowthRate.hdf5 # The file to read file_name: ./kelvinHelmholtzGrowthRate.hdf5 # The file to read
periodic: 1
...@@ -76,10 +76,6 @@ grp.attrs["MassTable"] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ...@@ -76,10 +76,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 = fileOutput.create_group("/RuntimePars")
grp.attrs["PeriodicBoundariesOn"] = 1
#Units #Units
grp = fileOutput.create_group("/Units") grp = fileOutput.create_group("/Units")
grp.attrs["Unit length in cgs (U_L)"] = 1. grp.attrs["Unit length in cgs (U_L)"] = 1.
......
...@@ -84,10 +84,6 @@ grp.attrs["MassTable"] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ...@@ -84,10 +84,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 = fileOutput.create_group("/RuntimePars")
grp.attrs["PeriodicBoundariesOn"] = 1
#Units #Units
grp = fileOutput.create_group("/Units") grp = fileOutput.create_group("/Units")
grp.attrs["Unit length in cgs (U_L)"] = 1. grp.attrs["Unit length in cgs (U_L)"] = 1.
......
...@@ -31,3 +31,4 @@ SPH: ...@@ -31,3 +31,4 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./kelvinHelmholtz.hdf5 # The file to read file_name: ./kelvinHelmholtz.hdf5 # The file to read
periodic: 1
...@@ -122,10 +122,6 @@ grp.attrs["MassTable"] = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ...@@ -122,10 +122,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"] = 2 grp.attrs["Dimension"] = 2
#Runtime parameters
grp = fileOutput.create_group("/RuntimePars")
grp.attrs["PeriodicBoundariesOn"] = 1
#Units #Units
grp = fileOutput.create_group("/Units") grp = fileOutput.create_group("/Units")
grp.attrs["Unit length in cgs (U_L)"] = 1. grp.attrs["Unit length in cgs (U_L)"] = 1.
......
...@@ -32,7 +32,8 @@ SPH: ...@@ -32,7 +32,8 @@ SPH:
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: initial_conditions.hdf5 # The file to read file_name: initial_conditions.hdf5 # The file to read
periodic: 1
# External potential parameters # External potential parameters
PointMassPotential: PointMassPotential:
position: [5.,5.,5.] # location of external point mass in internal units position: [5.,5.,5.] # location of external point mass in internal units
......
...@@ -93,10 +93,6 @@ for n in range(num_files): ...@@ -93,10 +93,6 @@ for n in range(num_files):
grp.attrs["MassTable"] = [0.0, massDM, 0.0, 0.0, 0.0, 0.0] grp.attrs["MassTable"] = [0.0, massDM, 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")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment