Commit fb8b008 1 parent 3cfd7e2 commit fb8b008 Copy full SHA for fb8b008
File tree 4 files changed +15
-2
lines changed
unit_test/burn_cell_primordial_chem
4 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ function(setup_target_for_microphysics_compilation network_name output_dir)
85
85
set (primordial_chem_sources ${CMAKE_CURRENT_FUNCTION_LIST_DIR} /interfaces/eos_data.cpp
86
86
${CMAKE_CURRENT_FUNCTION_LIST_DIR} /interfaces/network_initialization.cpp
87
87
${CMAKE_CURRENT_FUNCTION_LIST_DIR} /EOS/primordial_chem/actual_eos_data.cpp
88
+ ${CMAKE_CURRENT_FUNCTION_LIST_DIR} /networks/primordial_chem/actual_network_data.cpp
88
89
${output_dir} /extern_parameters.cpp PARENT_SCOPE)
89
90
90
91
Original file line number Diff line number Diff line change 6
6
7
7
#include < fundamental_constants.H>
8
8
#include < network_properties.H>
9
+ #include < burn_type.H>
9
10
10
11
using namespace amrex ;
11
12
@@ -26,4 +27,6 @@ namespace Rates
26
27
27
28
}
28
29
30
+ void balance_charge (burn_t & state);
31
+
29
32
#endif
Original file line number Diff line number Diff line change @@ -10,3 +10,12 @@ void actual_network_init()
10
10
{
11
11
12
12
}
13
+
14
+ void balance_charge (burn_t & state)
15
+ {
16
+
17
+ // update the number density of electrons due to charge conservation
18
+ state.xn [0 ] = -state.xn [3 ] - state.xn [7 ] + state.xn [1 ] + state.xn [12 ] +
19
+ state.xn [6 ] + state.xn [4 ] + state.xn [9 ] + 2.0 * state.xn [11 ];
20
+
21
+ }
Original file line number Diff line number Diff line change 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 = 6.674e-8 ;
13
14
@@ -209,8 +210,7 @@ auto burn_cell_c() -> int {
209
210
}
210
211
211
212
// update the number density of electrons due to charge conservation
212
- state.xn [0 ] = -state.xn [3 ] - state.xn [7 ] + state.xn [1 ] + state.xn [12 ] +
213
- state.xn [6 ] + state.xn [4 ] + state.xn [9 ] + 2.0 * state.xn [11 ];
213
+ balance_charge (state);
214
214
215
215
// reconserve mass fractions post charge conservation
216
216
insum = 0 ;
You can’t perform that action at this time.
0 commit comments