17
17
18
18
#include < network.H>
19
19
#include < eos.H>
20
+ #include < burn_type.H>
21
+ #include < rkc_type.H>
22
+ #include < integrator_data.H>
23
+ #include < circle_theorem.H>
20
24
21
25
using namespace amrex ;
22
26
@@ -62,6 +66,9 @@ int main(int argc, char* argv[])
62
66
// we will use a mask that tells us if a zone on the current level
63
67
// is covered by data on a finer level.
64
68
69
+ amrex::Real sprad_max{-1.0 };
70
+ burn_t burn_state_max;
71
+
65
72
for (int ilev = 0 ; ilev <= fine_level; ++ilev) {
66
73
67
74
if (ilev < fine_level) {
@@ -86,26 +93,31 @@ int main(int argc, char* argv[])
86
93
for (int j = lo.y ; j <= hi.y ; ++j) {
87
94
for (int i = lo.x ; i <= hi.x ; ++i) {
88
95
89
- // if we only wanted to work on the zones not covered
90
- // by finer grids (e.g., for computing a global sum)
91
- // we'd uncomment this mask check
92
-
93
- // if (m(i,j,k) == 0) { // not covered by fine
94
-
95
- // compute the coordinate of the current zone
96
+ burn_t burn_state;
96
97
97
- eos_t eos_state;
98
-
99
- eos_state.rho = fab (i,j,k,dens_comp);
100
- eos_state.T = fab (i,j,k,temp_comp);
98
+ burn_state.rho = fab (i,j,k,dens_comp);
99
+ burn_state.T = fab (i,j,k,temp_comp);
101
100
for (int n = 0 ; n < NumSpec; ++n) {
102
- eos_state .xn [n] = fab (i,j,k,spec_comp+n);
101
+ burn_state .xn [n] = fab (i,j,k,spec_comp+n);
103
102
}
104
103
105
- eos (eos_input_rt, eos_state);
104
+ // we also need internal energy
105
+ eos (eos_input_rt, burn_state);
106
+ burn_state.e_scale = burn_state.e ;
106
107
107
- // } // mask
108
+ // we need to load up the integrator type
109
+ constexpr int int_neqs = integrator_neqs<burn_t >();
110
+ rkc_t <int_neqs> rstate;
111
+ burn_to_integrator (burn_state, rstate);
112
+ rstate.t = 0.0 ;
108
113
114
+ amrex::Real sprad{};
115
+ circle_theorem_sprad (rstate.t , burn_state, rstate, sprad);
116
+
117
+ if (sprad > sprad_max) {
118
+ sprad_max = sprad;
119
+ burn_state_max = burn_state;
120
+ }
109
121
}
110
122
}
111
123
}
0 commit comments