From 6e2141f8fb0421df5eb19002e82881c9b8d91533 Mon Sep 17 00:00:00 2001 From: Piyush Sharda Date: Thu, 29 Aug 2024 15:53:57 +0200 Subject: [PATCH] use balance charge function --- unit_test/burn_cell_primordial_chem/burn_cell.H | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unit_test/burn_cell_primordial_chem/burn_cell.H b/unit_test/burn_cell_primordial_chem/burn_cell.H index f878546823..794601d35b 100644 --- a/unit_test/burn_cell_primordial_chem/burn_cell.H +++ b/unit_test/burn_cell_primordial_chem/burn_cell.H @@ -8,6 +8,7 @@ #include #include #include +#include amrex::Real grav_constant = 6.674e-8; @@ -209,8 +210,7 @@ auto burn_cell_c() -> int { } // update the number density of electrons due to charge conservation - state.xn[0] = -state.xn[3] - state.xn[7] + state.xn[1] + state.xn[12] + - state.xn[6] + state.xn[4] + state.xn[9] + 2.0 * state.xn[11]; + balance_charge(state); // reconserve mass fractions post charge conservation insum = 0;