mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 08:38:23 +01:00
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:
parent
7a60bb9877
commit
193e8ef865
6
cxxMix.h
6
cxxMix.h
@ -29,7 +29,13 @@ public:
|
|||||||
void read_raw(CParser& parser);
|
void read_raw(CParser& parser);
|
||||||
|
|
||||||
void add(int n, double f) {
|
void add(int n, double f) {
|
||||||
|
if (this->mixComps.find(n) != this->mixComps.end())
|
||||||
|
{
|
||||||
|
mixComps[n] += f;
|
||||||
|
} else
|
||||||
|
{
|
||||||
mixComps[n] = f;
|
mixComps[n] = f;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
std::map<int, double> *comps() {return &mixComps;}
|
std::map<int, double> *comps() {return &mixComps;}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user