mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
Squashed 'phreeqcpp/' changes from 7e50e98..a377818
a377818 Merge remote-tracking branch 'usgs-coupled/master' 7c3d060 Merged remote-tracking branch 'origin/master' c6e8aea Fixed DIFF_C and SETDIFF_C. Updated RELEASE.txt 942dc22 Replace (+ with ( for dealing with Fe(+3, so that [Fe+2] is still a legitimate element name git-subtree-dir: phreeqcpp git-subtree-split: a3778180a1d258bdccda2d2e3ec1a745f4738c77
This commit is contained in:
parent
a330bc51e3
commit
3765e0cf26
@ -195,7 +195,7 @@ diff_c(const char *species_name)
|
||||
g = s_ptr->dw;
|
||||
if (s_ptr->dw_t)
|
||||
g *= exp(s_ptr->dw_t / tk_x - s_ptr->dw_t / 298.15);
|
||||
g *= viscos_0_25 / viscos;
|
||||
g *= viscos_0_25 / viscos * tk_x / 298.15;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -218,7 +218,7 @@ setdiff_c(const char *species_name, double d)
|
||||
g = s_ptr->dw;
|
||||
if (s_ptr->dw_t)
|
||||
g *= exp(s_ptr->dw_t / tk_x - s_ptr->dw_t / 298.15);
|
||||
g *= viscos_0_25 / viscos;
|
||||
g *= viscos_0_25 / viscos * tk_x / 298.15;;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2457,7 +2457,7 @@ total(const char *total_name)
|
||||
return (total_o_x / mass_water_aq_x);
|
||||
}
|
||||
std::string noplus = total_name;
|
||||
replace(noplus, "+", "");
|
||||
replace(noplus, "(+", "(");
|
||||
master_ptr = master_bsearch(noplus.c_str());
|
||||
t = 0.0;
|
||||
if (master_ptr == NULL)
|
||||
@ -2528,7 +2528,7 @@ total_mole(const char *total_name)
|
||||
return (total_o_x);
|
||||
}
|
||||
std::string noplus = total_name;
|
||||
replace(noplus, "+", "");
|
||||
replace(noplus, "(+", "(");
|
||||
master_ptr = master_bsearch(noplus.c_str());
|
||||
t = 0.0;
|
||||
if (master_ptr == NULL)
|
||||
|
||||
@ -899,7 +899,7 @@ CParser::STATUS_TYPE CParser::parse_couple(std::string & token)
|
||||
return PARSER_OK;
|
||||
}
|
||||
|
||||
while (Utilities::replace("+", "", token));
|
||||
while (Utilities::replace("(+", "(", token));
|
||||
|
||||
std::string::iterator ptr = token.begin();
|
||||
std::string elt1;
|
||||
|
||||
2
tidy.cpp
2
tidy.cpp
@ -1825,7 +1825,7 @@ tidy_punch(void)
|
||||
{
|
||||
std::pair< std::string, void *> &pair_ptr = current_selected_output->Get_totals()[i];
|
||||
std::string noplus = pair_ptr.first;
|
||||
replace(noplus, "+", "");
|
||||
replace(noplus, "(+", "(");
|
||||
pair_ptr.second = master_bsearch(noplus.c_str());
|
||||
}
|
||||
|
||||
|
||||
@ -660,7 +660,7 @@ parse_couple(char *token)
|
||||
str_tolower(token);
|
||||
return (OK);
|
||||
}
|
||||
while (replace("+", "", token) == TRUE);
|
||||
while (replace("(+", "(", token) == TRUE);
|
||||
cptr = token;
|
||||
get_elt(&cptr, elt1, &e1);
|
||||
if (*cptr != '(')
|
||||
@ -848,9 +848,10 @@ replace(const char *str1, const char *str2, char *str)
|
||||
void Phreeqc::
|
||||
replace(std::string &stds, const char* str1, const char* str2)
|
||||
{
|
||||
size_t pos;
|
||||
size_t pos, l;
|
||||
l = strlen(str1);
|
||||
while ((pos = stds.find(str1)) != std::string::npos) {
|
||||
stds.replace(pos, 1, str2);
|
||||
stds.replace(pos, l, str2);
|
||||
}
|
||||
}
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user