Skip to content

Commit

Permalink
nrpy/examples/blackhole_spectroscopy.py: start work on new version
Browse files Browse the repository at this point in the history
  • Loading branch information
zachetienne committed Jun 20, 2024
1 parent 2a25391 commit dab87fd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions nrpy/examples/blackhole_spectroscopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@

enable_KreissOliger_dissipation = True
enable_CAKO = True
enable_CAHD = True
enable_SSL = True
KreissOliger_strength_gauge = 0.99
KreissOliger_strength_nongauge = 0.1
LapseEvolutionOption = "OnePlusLog"
Expand Down Expand Up @@ -172,6 +174,8 @@
LapseEvolutionOption=LapseEvolutionOption,
ShiftEvolutionOption=ShiftEvolutionOption,
enable_CAKO=enable_CAKO,
enable_CAHD=enable_CAHD,
enable_SSL=enable_SSL,
KreissOliger_strength_gauge=KreissOliger_strength_gauge,
KreissOliger_strength_nongauge=KreissOliger_strength_nongauge,
OMP_collapse=OMP_collapse,
Expand Down
3 changes: 2 additions & 1 deletion nrpy/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ def gridfunction_lists() -> Tuple[List[str], List[str], List[str]]:

# Sort the lists. Iterating through a copy of the keys to avoid modifying the dictionary while iterating.
for group in list(groups.keys()):
groups[group] = sorted(groups[group])
# Sort case-insensitively to ensure consistent order, e.g., "RbarDD" doesn't appear before "cf".
groups[group] = sorted(groups[group], key=lambda x: x.lower())

# Pack the sorted lists into a tuple and return.
return groups["EVOL"], groups["AUX"], groups["AUXEVOL"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ def register_CFunction_rhs_eval(
:param validate_expressions: Whether to validate generated sympy expressions against trusted values.
:raises ValueError: If EvolvedConformalFactor_cf not set to a supported value: {phi, chi, W}.
:return: None if in registration phase, else the updated NRPy environment.
"""
if pcg.pcg_registration_phase():
Expand Down Expand Up @@ -485,7 +486,11 @@ def register_CFunction_rhs_eval(
+ ("_T4munu" if enable_T4munu else "")
]
if "cahdprefactor" not in gri.glb_gridfcs_dict:
_ = gri.register_gridfunctions("cahdprefactor")
_ = gri.register_gridfunctions(
"cahdprefactor",
group="AUXEVOL",
gf_array_name="auxevol_gfs",
)
_C_CAHD = par.register_CodeParameter(
"REAL", __name__, "C_CAHD", 0.15, commondata=True, add_to_parfile=True
)
Expand Down

0 comments on commit dab87fd

Please sign in to comment.