@@ -12,7 +12,11 @@ using namespace amrex;
12
12
#include < cj_det.H>
13
13
#include < unit_test.H>
14
14
#include < actual_network.H>
15
+ #ifdef NEW_NETWORK_IMPLEMENTATION
16
+ #include < rhs.H>
17
+ #else
15
18
#include < actual_rhs.H>
19
+ #endif
16
20
17
21
using namespace unit_test_rp ;
18
22
@@ -22,20 +26,6 @@ int main(int argc, char *argv[]) {
22
26
23
27
std::cout << " starting the CJ Det solve..." << std::endl;
24
28
25
- ParmParse ppa (" amr" );
26
-
27
- std::string probin_file = " probin" ;
28
-
29
- ppa.query (" probin_file" , probin_file);
30
-
31
- std::cout << " probin = " << probin_file << std::endl;
32
-
33
- const int probin_file_length = probin_file.length ();
34
- Vector<int > probin_file_name (probin_file_length);
35
-
36
- for (int i = 0 ; i < probin_file_length; i++)
37
- probin_file_name[i] = probin_file[i];
38
-
39
29
init_unit_test ();
40
30
41
31
// C++ EOS initialization (must be done after Fortran eos_init and
@@ -82,8 +72,23 @@ int main(int argc, char *argv[]) {
82
72
eos_state_fuel.xn [n-1 ] * aion_inv[n-1 ];
83
73
}
84
74
85
- Real q_burn;
86
- ener_gener_rate (dymol, q_burn);
75
+ Real q_burn{};
76
+
77
+ #ifdef NEW_NETWORK_IMPLEMENTATION
78
+
79
+ // note: we are assuming that the network's ener_gener_rate does not
80
+ // use rhs_state -- this is true, e.g., for aprox13
81
+ RHS::rhs_state_t <amrex::Real> state;
82
+ amrex::constexpr_for<1 , NumSpec+1 >([&] (auto n)
83
+ {
84
+ constexpr int species = n;
85
+ q_burn += RHS::ener_gener_rate<species>(state, dymol (species));
86
+ });
87
+ #else
88
+ ener_gener_rate (dymol, q_burn);
89
+ #endif
90
+
91
+ std::cout << " q_burn = " << q_burn << std::endl;
87
92
88
93
// store the shock adiabat and the detonation adiabat
89
94
0 commit comments