Merge commit '6e7023f8428a4bfde82f7dc83287ae95b38f1d6b'

This commit is contained in:
Darth Vader 2020-08-31 01:56:04 +00:00
commit 99b48a4f49
3 changed files with 45 additions and 5 deletions

Binary file not shown.

View File

@ -915,9 +915,9 @@ read_transport(void)
warning_msg(error_string);
for (i = count_por; i < all_cells - st; i++)
{
if (i == max_cells)
continue;
assert((i+1) < all_cells);
//if (i == max_cells)
// continue;
//assert((i+1) < all_cells);
if ((i+1) < all_cells)
{
cell_data[i + 1].por = pors[count_por - 1];

View File

@ -3801,7 +3801,27 @@ update_kin_exchange(void)
conc = kinetics_ptr->Get_kinetics_comps()[k].Get_m() * comp_ref.Get_phase_proportion();
if (found_exchange && comp_moles > 0.0)
{
comp_ref.multiply(conc / comp_moles);
/* parse formula */
count_elts = 0;
paren_count = 0;
{
char* temp_formula = string_duplicate(comp_ref.Get_formula().c_str());
ptr = temp_formula;
get_elts_in_species(&ptr, 1.0);
free_check_null(temp_formula);
}
cxxNameDouble nd_formula = elt_list_NameDouble();
double comp_coef = 0;
for (kit = nd_formula.begin(); kit != nd_formula.end(); kit++)
{
/* Find master species */
struct element* elt_ptr = element_store(kit->first.c_str());
if (elt_ptr->master->type == EX)
{
comp_coef = kit->second;
}
}
comp_ref.multiply(comp_coef * conc / comp_moles);
}
else /* need to generate totals from scratch */
{
@ -4077,7 +4097,27 @@ update_min_exchange(void)
conc = jit->second.Get_moles() * comp_ref.Get_phase_proportion();
if (found_exchange && comp_moles > 0.0)
{
comp_ref.multiply(conc / comp_moles);
/* parse formula */
count_elts = 0;
paren_count = 0;
{
char* temp_formula = string_duplicate(comp_ref.Get_formula().c_str());
ptr = temp_formula;
get_elts_in_species(&ptr, 1.0);
free_check_null(temp_formula);
}
cxxNameDouble nd_formula = elt_list_NameDouble();
double comp_coef = 0;
for (kit = nd_formula.begin(); kit != nd_formula.end(); kit++)
{
/* Find master species */
struct element* elt_ptr = element_store(kit->first.c_str());
if (elt_ptr->master->type == EX)
{
comp_coef = kit->second;
}
}
comp_ref.multiply(comp_coef * conc / comp_moles);
}
else /* comp_moles is zero, need to redefine totals from scratch */
{