Tweaking lists.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@9808 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2015-06-09 15:58:10 +00:00
parent 7e2a34cc7d
commit b9b841411a
2 changed files with 97 additions and 59 deletions

View File

@ -2770,44 +2770,63 @@ pitzer_make_lists(void)
ion_list.clear();
param_list.clear();
OTEMP = -100.0;
for (int i = 0; i < 3 * count_s; i++)
for (int j = 0; j < 3; j++)
{
IPRSNT[i] = FALSE;
M[i] = 0.0;
int min, max;
switch (j)
{
case 0:
min = 0;
max = count_cations;
break;
case 1:
min = count_s;
max = count_s + count_neutrals;
break;
case 2:
min = 2*count_s;
max = 2*count_s + count_anions;
break;
}
for (int i = min; i < max; i++)
{
IPRSNT[i] = FALSE;
M[i] = 0.0;
if ((spec[i] != NULL && spec[i]->in == TRUE) ||
(ICON == TRUE && i == IC))
{
if (spec[i]->type == EX ||
spec[i]->type == SURF || spec[i]->type == SURF_PSI)
continue;
IPRSNT[i] = TRUE;
s_list.push_back(i);
if (i < count_s)
{
cation_list.push_back(i);
}
if (i >= count_s && i < 2*count_s)
{
neutral_list.push_back(i);
}
if (i >= 2*count_s)
{
anion_list.push_back(i);
}
if (i < count_s || i >= 2*count_s)
{
ion_list.push_back(i);
}
if (spec[i]->lm > log_min)
{
M[i] = under(spec[i]->lm);
if (spec[i]->type == EX ||
spec[i]->type == SURF || spec[i]->type == SURF_PSI)
continue;
IPRSNT[i] = TRUE;
s_list.push_back(i);
if (i < count_s)
{
cation_list.push_back(i);
}
if (i >= count_s && i < 2*count_s)
{
neutral_list.push_back(i);
}
if (i >= 2*count_s)
{
anion_list.push_back(i);
}
if (i < count_s || i >= 2*count_s)
{
ion_list.push_back(i);
}
if (spec[i]->lm > log_min)
{
M[i] = under(spec[i]->lm);
}
}
}
}
//if (ICON == TRUE)
//{
// IPRSNT[IC] = TRUE;
//}
if (ICON == TRUE)
{
IPRSNT[IC] = TRUE;
}
for (int i = 0; i < count_pitz_param; i++)
{
/*

75
sit.cpp
View File

@ -1643,37 +1643,56 @@ sit_make_lists(void)
anion_list.clear();
ion_list.clear();
param_list.clear();
OTEMP = -100.0;
for (int i = 0; i < 3 * count_s; i++)
OTEMP = -100.0;
for (int j = 0; j < 3; j++)
{
sit_IPRSNT[i] = FALSE;
sit_M[i] = 0.0;
if (spec[i] != NULL && spec[i]->in == TRUE)
int min, max;
switch (j)
{
if (spec[i]->type == EX ||
spec[i]->type == SURF || spec[i]->type == SURF_PSI)
continue;
sit_IPRSNT[i] = TRUE;
s_list.push_back(i);
if (i < count_s)
case 0:
min = 0;
max = count_cations;
break;
case 1:
min = count_s;
max = count_s + count_neutrals;
break;
case 2:
min = 2*count_s;
max = 2*count_s + count_anions;
break;
}
for (int i = min; i < max; i++)
{
sit_IPRSNT[i] = FALSE;
sit_M[i] = 0.0;
if (spec[i] != NULL && spec[i]->in == TRUE)
{
cation_list.push_back(i);
}
if (i >= count_s && i < 2*count_s)
{
neutral_list.push_back(i);
}
if (i >= 2*count_s)
{
anion_list.push_back(i);
}
if (i < count_s || i >= 2*count_s)
{
ion_list.push_back(i);
}
if (spec[i]->lm > log_min)
{
sit_M[i] = under(spec[i]->lm);
if (spec[i]->type == EX ||
spec[i]->type == SURF || spec[i]->type == SURF_PSI)
continue;
sit_IPRSNT[i] = TRUE;
s_list.push_back(i);
if (i < count_s)
{
cation_list.push_back(i);
}
if (i >= count_s && i < 2*count_s)
{
neutral_list.push_back(i);
}
if (i >= 2*count_s)
{
anion_list.push_back(i);
}
if (i < count_s || i >= 2*count_s)
{
ion_list.push_back(i);
}
if (spec[i]->lm > log_min)
{
sit_M[i] = under(spec[i]->lm);
}
}
}
}