Gentisic problem. H2O was defined as a SURFACE_SPECIES.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8700 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2014-05-01 22:11:48 +00:00
parent cfa58371fe
commit 504bcf6dd0
2 changed files with 42 additions and 3 deletions

View File

@ -2821,6 +2821,15 @@ add_potential_factor(void)
struct master *master_ptr;
struct unknown *unknown_ptr;
if (use.Get_surface_ptr() == NULL)
{
input_error++;
error_string = sformatf(
"SURFACE not defined for surface species %s",
trxn.token[0].name);
error_msg(error_string, CONTINUE);
return(OK);
}
if (use.Get_surface_ptr()->Get_type() != cxxSurface::DDL)
return (OK);
sum_z = 0.0;
@ -2911,7 +2920,15 @@ add_cd_music_factors(int n)
std::string token;
struct master *master_ptr;
struct unknown *unknown_ptr;
if (use.Get_surface_ptr() == NULL)
{
input_error++;
error_string = sformatf(
"SURFACE not defined for surface species %s",
trxn.token[0].name);
error_msg(error_string, CONTINUE);
return(OK);
}
if (use.Get_surface_ptr()->Get_type() != cxxSurface::CD_MUSIC)
return (OK);
master_ptr = NULL;
@ -3031,7 +3048,15 @@ add_surface_charge_balance(void)
struct master *master_ptr;
struct unknown *unknown_ptr;
if (use.Get_surface_ptr() == NULL)
{
input_error++;
error_string = sformatf(
"SURFACE not defined for surface species %s",
trxn.token[0].name);
error_msg(error_string, CONTINUE);
return(OK);
}
if (use.Get_surface_ptr()->Get_type() != cxxSurface::DDL)
return (OK);
master_ptr = NULL;
@ -3090,7 +3115,15 @@ add_cd_music_charge_balances(int n)
struct master *master_ptr;
struct unknown *unknown_ptr;
if (use.Get_surface_ptr() == NULL)
{
input_error++;
error_string = sformatf(
"SURFACE not defined for surface species %s",
trxn.token[0].name);
error_msg(error_string, CONTINUE);
return(OK);
}
if (use.Get_surface_ptr()->Get_type() != cxxSurface::CD_MUSIC)
return (OK);
master_ptr = NULL;

View File

@ -322,6 +322,12 @@ tidy_model(void)
error_msg("H2O, secondary master species for O(-2), not defined.",
CONTINUE);
}
if (s_h2o->type != H2O)
{
input_error++;
error_msg("H2O can only be defined in SOLUTION_SPECIES.",
CONTINUE);
}
}
if (s_hplus == NULL && s_h3oplus == NULL)
{