Have initial conditions working.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@6817 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2012-07-25 20:45:01 +00:00
parent c0463f6f03
commit 1f52826baf
3 changed files with 28 additions and 25 deletions

View File

@ -169,7 +169,7 @@ cxxExchange::dump_raw(std::ostream & s_oss, unsigned int indent, int *n_out) con
s_oss << indent1 << "# EXCHANGE_MODIFY candidate identifiers #\n";
s_oss << indent1;
s_oss << "-exchange_gammas " << this->pitzer_exchange_gammas << "\n";
s_oss << "-exchange_gammas " << (this->pitzer_exchange_gammas ? 1 : 0) << "\n";
// exchComps
for (size_t i = 0; i < this->exchange_comps.size(); i++)
{
@ -180,9 +180,9 @@ cxxExchange::dump_raw(std::ostream & s_oss, unsigned int indent, int *n_out) con
s_oss << indent1 << "# EXCHANGE_MODIFY candidates with new_def=true #\n";
s_oss << indent1;
s_oss << "-new_def " << this->new_def << "\n";
s_oss << "-new_def " << 0 << "\n";
s_oss << indent1;
s_oss << "-solution_equilibria " << this->solution_equilibria << "\n";
s_oss << "-solution_equilibria " << 0 << "\n";
s_oss << indent1;
s_oss << "-n_solution " << this->n_solution << "\n";

View File

@ -105,7 +105,7 @@ cxxPPassemblage::dump_raw(std::ostream & s_oss, unsigned int indent, int *n_out)
s_oss << indent1 << "# EXCHANGE_MODIFY candidates; use new_def=true #\n";
s_oss << indent1 << "-new_def " << this->new_def << "\n";
s_oss << indent1 << "-new_def " << 0 << "\n";
for (std::map < std::string, cxxPPassemblageComp >::const_iterator it =
pp_assemblage_comps.begin(); it != pp_assemblage_comps.end(); ++it)
{
@ -211,7 +211,7 @@ cxxPPassemblage::read_raw(CParser & parser, bool check)
parser.incr_input_error();
parser.
error_msg
("Expected boolean value for new_def.",
("Expected boolean value for new_def in PPassemblage.",
PHRQ_io::OT_CONTINUE);
}
break;

View File

@ -60,33 +60,33 @@ tidy_model(void)
{
new_model = TRUE;
}
if (keycount[Keywords::KEY_EQUILIBRIUM_PHASES] > 0 ||
if (keycount[Keywords::KEY_EQUILIBRIUM_PHASES] > 0 /*||
keycount[Keywords::KEY_EQUILIBRIUM_PHASES_RAW] > 0 ||
keycount[Keywords::KEY_EQUILIBRIUM_PHASES_MODIFY])
keycount[Keywords::KEY_EQUILIBRIUM_PHASES_MODIFY]*/)
{
new_pp_assemblage = TRUE; /*"pure_phases" */
}
if (keycount[Keywords::KEY_SURFACE] > 0 ||
if (keycount[Keywords::KEY_SURFACE] > 0 /*||
keycount[Keywords::KEY_SURFACE_RAW] > 0 ||
keycount[Keywords::KEY_SURFACE_MODIFY])
keycount[Keywords::KEY_SURFACE_MODIFY]*/)
{
new_surface = TRUE; /*"surface" */
}
if (keycount[Keywords::KEY_EXCHANGE] > 0 ||
keycount[Keywords::KEY_SURFACE_RAW] > 0 ||
keycount[Keywords::KEY_SURFACE_MODIFY])
if (keycount[Keywords::KEY_EXCHANGE] > 0 /*||
keycount[Keywords::KEY_EXCHANGE_RAW] > 0 ||
keycount[Keywords::KEY_EXCHANGE_MODIFY]*/)
{
new_exchange = TRUE; /*"exchange" */
}
if (keycount[Keywords::KEY_REACTION] > 0 ||
if (keycount[Keywords::KEY_REACTION] > 0 /*||
keycount[Keywords::KEY_REACTION_RAW] > 0 ||
keycount[Keywords::KEY_REACTION_MODIFY])
keycount[Keywords::KEY_REACTION_MODIFY]*/)
{
new_reaction = TRUE; /*"reaction" */
}
if (keycount[Keywords::KEY_REACTION_TEMPERATURE] > 0 ||
if (keycount[Keywords::KEY_REACTION_TEMPERATURE] > 0 /*||
keycount[Keywords::KEY_REACTION_TEMPERATURE_RAW] > 0 ||
keycount[Keywords::KEY_REACTION_TEMPERATURE_MODIFY])
keycount[Keywords::KEY_REACTION_TEMPERATURE_MODIFY]*/)
{
new_temperature = TRUE; /*"reacton_temperature" */
}
@ -96,27 +96,27 @@ tidy_model(void)
new_mix = TRUE; /*"mix" */
}
if (keycount[Keywords::KEY_SOLUTION] > 0 ||
keycount[Keywords::KEY_SOLUTION_SPREAD] > 0 ||
keycount[Keywords::KEY_SOLUTION_SPREAD] > 0 /*||
keycount[Keywords::KEY_SOLUTION_RAW] > 0 ||
keycount[Keywords::KEY_SOLUTION_MODIFY])
keycount[Keywords::KEY_SOLUTION_MODIFY]*/)
{ /*"solution" */
new_solution = TRUE;
}
if (keycount[Keywords::KEY_GAS_PHASE] > 0 ||
if (keycount[Keywords::KEY_GAS_PHASE] > 0 /*||
keycount[Keywords::KEY_GAS_PHASE_RAW] > 0 ||
keycount[Keywords::KEY_GAS_PHASE_MODIFY])
keycount[Keywords::KEY_GAS_PHASE_MODIFY]*/)
{
new_gas_phase = TRUE; /*"gas_phase" */
}
if (keycount[Keywords::KEY_SOLID_SOLUTIONS] > 0 ||
if (keycount[Keywords::KEY_SOLID_SOLUTIONS] > 0 /*||
keycount[Keywords::KEY_SOLID_SOLUTIONS_RAW] > 0 ||
keycount[Keywords::KEY_SOLID_SOLUTIONS_MODIFY])
keycount[Keywords::KEY_SOLID_SOLUTIONS_MODIFY]*/)
{
new_ss_assemblage = TRUE; /*"solid_solutions" */
}
if (keycount[Keywords::KEY_KINETICS] > 0 ||
if (keycount[Keywords::KEY_KINETICS] > 0 /*||
keycount[Keywords::KEY_KINETICS_RAW] > 0 ||
keycount[Keywords::KEY_KINETICS_MODIFY])
keycount[Keywords::KEY_KINETICS_MODIFY]*/)
{
new_kinetics = TRUE; /*"kinetics" */
}
@ -1504,6 +1504,7 @@ tidy_pp_assemblage(void)
it = Rxn_pp_assemblage_map.begin();
for ( ; it != Rxn_pp_assemblage_map.end(); it++)
{
if (!it->second.Get_new_def()) continue;
cxxPPassemblage *pp_assemblage_ptr = &(it->second);
count_elts = 0;
paren_count = 0;
@ -1590,6 +1591,7 @@ tidy_ss_assemblage(void)
std::map<int, cxxSSassemblage>::iterator it;
for (it = Rxn_ss_assemblage_map.begin(); it != Rxn_ss_assemblage_map.end(); it++)
{
if (!it->second.Get_new_def()) continue;
count_elts = 0;
paren_count = 0;
cxxSSassemblage *ss_assemblage_ptr = &(it->second);
@ -2376,6 +2378,7 @@ tidy_surface(void)
std::map<int, cxxSurface>::iterator kit;
for (kit = Rxn_surface_map.begin(); kit != Rxn_surface_map.end(); kit++)
{
if (!kit->second.Get_new_def()) continue;
surface_ptr = &(kit->second);
for (size_t i = 0; i < surface_ptr->Get_surface_comps().size(); i++)
{
@ -3323,11 +3326,11 @@ tidy_kin_surface(void)
for (it = Rxn_surface_map.begin(); it != Rxn_surface_map.end(); it++)
{
cxxSurface *surface_ptr = &(it->second);
int n = surface_ptr->Get_n_user();
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++)
{
cxxSurfaceComp *comp_ptr = &(surface_ptr->Get_surface_comps()[j]);