Skip to content

Commit

Permalink
Merge branch 'hyschive:main' into wiki_update_using_gamer
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunYen-Chen authored Jul 16, 2024
2 parents 07b44b5 + d63a117 commit 09e3d6c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def load_arguments():
default=False,
depend={"model":"HYDRO"},
constraint={ True:{"dual":[NONE_STR], "eos":"COSMIC_RAY", "comoving":False} },
help="Enable cosmic ray. Must use <--eos=COSMIC_RAY>.\n"
help="Enable cosmic rays. Must use <--eos=COSMIC_RAY>.\n"
)

parser.add_argument( "--eos", type=str, metavar="TYPE", gamer_name="EOS",
Expand All @@ -447,7 +447,7 @@ def load_arguments():
)

parser.add_argument( "--barotropic", type=str2bool, metavar="BOOLEAN", gamer_name="BAROTROPIC_EOS",
default=False,
default=None,
depend={"model":"HYDRO"},
constraint={ True:{"eos":["ISOTHERMAL", "TABULAR", "USER"]} },
help="Whether or not the equation of state set by <--eos> is barotropic. Mandatory for <--eos=ISOTHEMAL>. Optional for <--eos=TABULAR> and <--eos=USER>.\n"
Expand Down Expand Up @@ -744,6 +744,9 @@ def set_conditional_defaults( args ):
if args["cosmic_ray"]: args["eos"] = "COSMIC_RAY"
elif args["srhd"] : args["eos"] = "TAUBMATHEWS"
else : args["eos"] = "GAMMA"

if args["barotropic"] is None:
args["barotropic"] = (args["eos"] == "ISOTHERMAL")
return args

def set_gpu( gpus, flags, args ):
Expand Down

0 comments on commit 09e3d6c

Please sign in to comment.