Skip to content

Commit

Permalink
add optional species sources for the conserved state
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Dec 12, 2023
1 parent 9cf0cb6 commit cf6280c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Exec/Make.Castro
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ ifeq ($(USE_ROTATION), TRUE)
DEFINES += -DROTATION
endif

ifeq ($(USE_SPECIES_SOURCES), TRUE)
DEFINES += -DCONS_SPECIES_HAVE_SOURCES
endif

ifeq ($(USE_PARTICLES), TRUE)
Bdirs += Source/particles
endif
Expand Down
6 changes: 3 additions & 3 deletions Source/driver/_variables
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
energy-density UEDEN NSRC 1 None
internal-energy UEINT NSRC 1 None
temperature UTEMP NSRC 1 None
advected UFA None NumAdv None
species UFS None NumSpec None
auxiliary UFX None NumAux None
advected UFA [(NSRC, CONS_SPECIES_HAVE_SOURCES)] NumAdv None
species UFS [(NSRC, CONS_SPECIES_HAVE_SOURCES)] NumSpec None
auxiliary UFX [(NSRC, CONS_SPECIES_HAVE_SOURCES)] NumAux None
shock USHK None 1 SHOCK_VAR
mu_p UMUP None 1 NSE_NET
mu_n UMUN None 1 NSE_NET
Expand Down
3 changes: 3 additions & 0 deletions Source/driver/set_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def doit(variables_file, odir, defines, nadv):
count = fields[3]
ifdef = fields[4]

print("here: ", name, var, adds_to_temp, count, ifdef)
# we may be fed a pair of the form (SET, DEFINE),
# in which case we only add to SET if we define
# DEFINE
Expand All @@ -153,6 +154,8 @@ def doit(variables_file, odir, defines, nadv):
if adds_to_temp == "None":
adds_to = None
else:
if adds_to_temp.startswith("("):
print("here")
adds_to = [adds_to_temp]

# only recognize the index if we defined any required preprocessor variable
Expand Down

0 comments on commit cf6280c

Please sign in to comment.