Skip to content

Commit

Permalink
add the queries
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Dec 19, 2023
1 parent 14a53be commit 56729e2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
8 changes: 6 additions & 2 deletions Source/driver/Castro.H
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,12 @@ public:
static Vector<std::unique_ptr<std::fstream> > data_logs;
static Vector<std::unique_ptr<std::fstream> > problem_data_logs;

///
/// runtime parameters
//
static params_t params;


protected:


Expand Down Expand Up @@ -1409,8 +1415,6 @@ protected:
static int lastDtPlotLimited;
static amrex::Real lastDtBeforePlotLimiting;

static params_t params;

int in_retry;
int num_subcycles_taken;

Expand Down
2 changes: 2 additions & 0 deletions Source/driver/Castro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ int Castro::NUM_GROW_SRC = -1;
int Castro::lastDtPlotLimited = 0;
Real Castro::lastDtBeforePlotLimiting = 0.0;

params_t Castro::params;

Real Castro::num_zones_advanced = 0.0;

Vector<std::string> Castro::source_names;
Expand Down
6 changes: 4 additions & 2 deletions Source/driver/parse_castro_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,15 @@ def write_headers(params, out_directory, struct_name):
if ifdef is None:
for p in [q for q in params_nm if q.ifdef is None]:
cq.write(p.get_default_string())
cq.write(p.get_query_string("C++"))
cq.write(p.get_query_string())
cq.write(p.get_query_struct_string(struct_name=struct_name, class_name="Castro"))
cq.write("\n")
else:
cq.write(f"#ifdef {ifdef}\n")
for p in [q for q in params_nm if q.ifdef == ifdef]:
cq.write(p.get_default_string())
cq.write(p.get_query_string("C++"))
cq.write(p.get_query_string())
cq.write(p.get_query_struct_string(struct_name=struct_name, class_name="Castro"))
cq.write("\n")
cq.write("#endif\n")
cq.write("\n")
Expand Down
2 changes: 1 addition & 1 deletion Util/scripts/write_probdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def write_probin(prob_param_files, cxx_prefix):
fout.write(f" {p.get_default_string()}")

if p.in_namelist:
fout.write(f" {p.get_query_string('C++')}")
fout.write(f" {p.get_query_string()}")
fout.write("\n")
fout.write(" }\n")

Expand Down

0 comments on commit 56729e2

Please sign in to comment.