include parameters for phiBCs_from_coarse_tCOLA
This commit is contained in:
parent
c9bddb08d7
commit
928ea5eee8
1 changed files with 41 additions and 0 deletions
|
@ -47,6 +47,13 @@ def register_arguments_card(parser:ArgumentParser):
|
||||||
parser.add_argument("--OutputFCsDensity", type=str, default=None, help="Output FCs density file.")
|
parser.add_argument("--OutputFCsDensity", type=str, default=None, help="Output FCs density file.")
|
||||||
parser.add_argument("--OutputFCsSnapshot", type=str, default=None, help="Output FCs snapshot file.")
|
parser.add_argument("--OutputFCsSnapshot", type=str, default=None, help="Output FCs snapshot file.")
|
||||||
parser.add_argument("--OutputRngStateLPT", type=str, default=None, help="Output RNG state file.")
|
parser.add_argument("--OutputRngStateLPT", type=str, default=None, help="Output RNG state file.")
|
||||||
|
## Tests with phiBCs and density
|
||||||
|
parser.add_argument("--WriteGravPot", type=bool, default=True, help="Write gravitational potential.")
|
||||||
|
parser.add_argument("--OutputGravitationalPotentialBase", type=str, default=None, help="Output gravitational potential base.")
|
||||||
|
parser.add_argument("--MeshGravPot", type=int, default=None, help="Mesh for gravitational potential.")
|
||||||
|
parser.add_argument("--WriteDensity", type=bool, default=False, help="Write density.")
|
||||||
|
parser.add_argument("--OutputDensityBase", type=str, default=None, help="Output density base.")
|
||||||
|
parser.add_argument("--MeshDensity", type=int, default=None, help="Mesh for density.")
|
||||||
|
|
||||||
|
|
||||||
def register_arguments_card_for_ICs(parser:ArgumentParser):
|
def register_arguments_card_for_ICs(parser:ArgumentParser):
|
||||||
|
@ -118,6 +125,14 @@ def parse_arguments_card(parsed_args):
|
||||||
OutputFCsDensity=parsed_args.OutputFCsDensity,
|
OutputFCsDensity=parsed_args.OutputFCsDensity,
|
||||||
OutputFCsSnapshot=parsed_args.OutputFCsSnapshot,
|
OutputFCsSnapshot=parsed_args.OutputFCsSnapshot,
|
||||||
OutputRngStateLPT=parsed_args.OutputRngStateLPT,
|
OutputRngStateLPT=parsed_args.OutputRngStateLPT,
|
||||||
|
## Tests with phiBCs and density
|
||||||
|
WriteGravPot=parsed_args.WriteGravPot,
|
||||||
|
OutputGravitationalPotentialBase=parsed_args.OutputGravitationalPotentialBase,
|
||||||
|
MeshGravPot=parsed_args.MeshGravPot,
|
||||||
|
WriteDensity=parsed_args.WriteDensity,
|
||||||
|
OutputDensityBase=parsed_args.OutputDensityBase,
|
||||||
|
MeshDensity=parsed_args.MeshDensity,
|
||||||
|
## Cosmological parameters
|
||||||
h=cosmo_dict["h"],
|
h=cosmo_dict["h"],
|
||||||
Omega_m=cosmo_dict["Omega_m"],
|
Omega_m=cosmo_dict["Omega_m"],
|
||||||
Omega_b=cosmo_dict["Omega_b"],
|
Omega_b=cosmo_dict["Omega_b"],
|
||||||
|
@ -203,6 +218,15 @@ def parse_arguments_card(parsed_args):
|
||||||
card_dict["OutputFCsSnapshot"] = main_dict["resultdir"]+"final_particles_"+main_dict["simname"]+".gadget3"
|
card_dict["OutputFCsSnapshot"] = main_dict["resultdir"]+"final_particles_"+main_dict["simname"]+".gadget3"
|
||||||
if card_dict["OutputRngStateLPT"] is None:
|
if card_dict["OutputRngStateLPT"] is None:
|
||||||
card_dict["OutputRngStateLPT"] = main_dict["workdir"]+"rng_state.h5"
|
card_dict["OutputRngStateLPT"] = main_dict["workdir"]+"rng_state.h5"
|
||||||
|
## Tests with phiBCs and density
|
||||||
|
if card_dict["OutputGravitationalPotentialBase"] is None:
|
||||||
|
card_dict["OutputGravitationalPotentialBase"] = main_dict["workdir"]+"gravpot_"+main_dict["simname"]
|
||||||
|
if card_dict["MeshGravPot"] is None:
|
||||||
|
card_dict["MeshGravPot"] = card_dict["N_PM_mesh"]
|
||||||
|
if card_dict["OutputDensityBase"] is None:
|
||||||
|
card_dict["OutputDensityBase"] = main_dict["workdir"]+"density_"+main_dict["simname"]
|
||||||
|
if card_dict["MeshDensity"] is None:
|
||||||
|
card_dict["MeshDensity"] = card_dict["N_PM_mesh"]
|
||||||
|
|
||||||
return card_dict
|
return card_dict
|
||||||
|
|
||||||
|
@ -321,6 +345,14 @@ def create_parameter_card_dict(
|
||||||
OutputFCsDensity:str = 'fcs_density.h5',
|
OutputFCsDensity:str = 'fcs_density.h5',
|
||||||
OutputFCsSnapshot:str = 'fcs_particles.gadget3',
|
OutputFCsSnapshot:str = 'fcs_particles.gadget3',
|
||||||
|
|
||||||
|
## Tests with phiBCs and density
|
||||||
|
WriteGravPot:bool = True,
|
||||||
|
OutputGravitationalPotentialBase:str = 'gravitational_potential.h5',
|
||||||
|
MeshGravPot:int = 128,
|
||||||
|
WriteDensity:bool = False,
|
||||||
|
OutputDensityBase:str = 'density.h5',
|
||||||
|
MeshDensity:int = 128,
|
||||||
|
|
||||||
## Cosmological parameters
|
## Cosmological parameters
|
||||||
h:float = 0.6732,
|
h:float = 0.6732,
|
||||||
Omega_m:float = 0.302,
|
Omega_m:float = 0.302,
|
||||||
|
@ -381,6 +413,15 @@ def create_parameter_card_dict(
|
||||||
OutputLPTPotential1=OutputLPTPotential1,
|
OutputLPTPotential1=OutputLPTPotential1,
|
||||||
OutputLPTPotential2=OutputLPTPotential2,
|
OutputLPTPotential2=OutputLPTPotential2,
|
||||||
OutputTilesBase=OutputTilesBase,
|
OutputTilesBase=OutputTilesBase,
|
||||||
|
|
||||||
|
# Tests with phiBCs and density
|
||||||
|
WriteGravPot=int(WriteGravPot),
|
||||||
|
OutputGravitationalPotentialBase=OutputGravitationalPotentialBase,
|
||||||
|
MeshGravPot=MeshGravPot,
|
||||||
|
WriteDensity=int(WriteDensity),
|
||||||
|
OutputDensityBase=OutputDensityBase,
|
||||||
|
MeshDensity=MeshDensity,
|
||||||
|
|
||||||
h=h,
|
h=h,
|
||||||
Omega_m=Omega_m,
|
Omega_m=Omega_m,
|
||||||
Omega_b=Omega_b,
|
Omega_b=Omega_b,
|
||||||
|
|
Loading…
Add table
Reference in a new issue