totals of surface comp set incorrectly after read_raw. Skipping tidy for these cases.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@10630 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2015-12-30 17:39:12 +00:00
parent 6ae25495c5
commit a702035139

View File

@ -4071,10 +4071,10 @@ tidy_kin_surface(void)
assert(false);
}
cxxSurface *surface_ptr = &(it->second);
//if (!surface_ptr->Get_new_def())
// continue;
//if (surface_ptr->Get_n_user() < 0)
// continue;
if (!surface_ptr->Get_new_def())
continue;
if (surface_ptr->Get_n_user() < 0)
continue;
int n = surface_ptr->Get_n_user();
for (size_t j = 0; j < surface_ptr->Get_surface_comps().size(); j++)
{
@ -4161,8 +4161,15 @@ tidy_kin_surface(void)
free_check_null(temp_formula);
}
{
cxxNameDouble nd = elt_list_NameDouble();
comp_ptr->Set_totals(nd);
if (surface_ptr->Get_new_def())
{
cxxNameDouble nd = elt_list_NameDouble();
comp_ptr->Set_totals(nd);
}
else
{
comp_ptr->Get_totals()[comp_ptr->Get_master_element()] = conc;
}
}
/* area */