delay removing phases in ineq, should be unchanged until delay is > 0

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@10575 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2015-12-15 19:42:49 +00:00
parent 2fe6313f47
commit ca4c8f9e55
2 changed files with 9 additions and 3 deletions

View File

@ -833,6 +833,7 @@ struct unknown
LDBLE V_m;
LDBLE pressure;
int mb_number;
int iteration;
};
/*----------------------------------------------------------------------

View File

@ -1125,15 +1125,20 @@ ineq(int in_kode)
/* not in model, ignore */
if (x[i]->phase->in == FALSE)
continue;
// delay removing phase
int delay = 0;
if (x[i]->moles > 0.0 || x[i]->f <= 0.0 || iterations == 0 || delay == 0)
{
x[i]->iteration = iterations;
}
cxxPPassemblageComp * comp_ptr = (cxxPPassemblageComp *) x[i]->pp_assemblage_comp_ptr;
//if (it->second.Get_force_equality())
if (comp_ptr->Get_force_equality())
continue;
/* Undersaturated and no mass, ignore */
//if (x[i]->f > 1e-14/*0e-8*/ && x[i]->moles <= 0
if (x[i]->f > 0e-8 && x[i]->moles <= 0
//&& it->second.Get_add_formula().size() == 0)
&& comp_ptr->Get_add_formula().size() == 0)
&& iterations >= x[i]->iteration + delay
&& comp_ptr->Get_add_formula().size() == 0)
{
continue;
}