8
8
#include < eos.H>
9
9
#include < extern_parameters.H>
10
10
#include < network.H>
11
+ #include < actual_network.H>
11
12
12
13
amrex::Real grav_constant = C::Gconst;
13
14
@@ -237,9 +238,6 @@ auto burn_cell_c() -> int {
237
238
// scale the density
238
239
dd += dt * (dd / tff);
239
240
240
- // std::cout << "step params " << dd << ", " << tff << ", " << tff_reduc << ", " << rhotmp << ", " << state.xn << std::endl;
241
- // std::cout << "old " << dd - dt * (dd / tff) << ", delta " << dt * (dd / tff) << ", new " << dd << std::endl;
242
-
243
241
// stop the test if dt is very small
244
242
if (dt < 10 ) {
245
243
break ;
@@ -257,9 +255,7 @@ auto burn_cell_c() -> int {
257
255
}
258
256
259
257
// update the number density of electrons due to charge conservation
260
- state.xn [2 ] = -state.xn [5 ] - state.xn [9 ] + state.xn [3 ] + state.xn [6 ] + state.xn [8 ] +
261
- 2.0 * state.xn [13 ] + state.xn [11 ] + state.xn [14 ] + state.xn [16 ] + state.xn [21 ] +
262
- state.xn [24 ] + state.xn [26 ] + state.xn [28 ] + state.xn [29 ] + state.xn [31 ];
258
+ balance_charge (state);
263
259
264
260
// input the scaled density in burn state
265
261
rhotmp = 0 .0_rt;
@@ -277,8 +273,6 @@ auto burn_cell_c() -> int {
277
273
// do the actual integration
278
274
burner (state, dt);
279
275
280
- // std::cout << "after burn: " << state << std::endl;
281
-
282
276
// ensure positivity and normalize
283
277
// amrex::Real inmfracs[NumSpec] = {-1.0};
284
278
// amrex::Real insum = 0.0_rt;
@@ -295,11 +289,7 @@ auto burn_cell_c() -> int {
295
289
// }
296
290
297
291
// update the number density of electrons due to charge conservation
298
- state.xn [2 ] = -state.xn [5 ] - state.xn [9 ] + state.xn [3 ] + state.xn [6 ] + state.xn [8 ] +
299
- 2.0 * state.xn [13 ] + state.xn [11 ] + state.xn [14 ] + state.xn [16 ] + state.xn [21 ] +
300
- state.xn [24 ] + state.xn [26 ] + state.xn [28 ] + state.xn [29 ] + state.xn [31 ];
301
-
302
- // std::cout << "conserved elec: " << state.xn[2] << std::endl;
292
+ balance_charge (state);
303
293
304
294
// reconserve mass fractions post charge conservation
305
295
// insum = 0;
0 commit comments