Bug with adding mixing solution when already in list. Replaced old fraction with new

fraction. Now adds the two fractions. 

This created a bug with rivers when mixing with the same solution. The mass fraction
was calculated incorrectly because only the second part of the solution was used (solution, frac 2).


git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@2888 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2008-04-24 23:59:55 +00:00
parent 7a60bb9877
commit 193e8ef865

View File

@ -29,7 +29,13 @@ public:
void read_raw(CParser& parser);
void add(int n, double f) {
mixComps[n] = f;
if (this->mixComps.find(n) != this->mixComps.end())
{
mixComps[n] += f;
} else
{
mixComps[n] = f;
}
};
std::map<int, double> *comps() {return &mixComps;}