mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
Added new functions to allow multiply.
Now multiply to account for changes in pore volume due to storage. git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@2098 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
c5d2d6d80d
commit
1848045bd9
14
Solution.cxx
14
Solution.cxx
@ -907,6 +907,20 @@ void cxxSolution::add(const cxxSolution &addee, double extensive)
|
||||
this->species_gamma.add_intensive(addee.species_gamma, f1, f2);
|
||||
this->isotopes.add(addee.isotopes, f2, extensive);
|
||||
}
|
||||
void cxxSolution::multiply(double extensive)
|
||||
//
|
||||
// Multiply existing solution by extensive
|
||||
//
|
||||
{
|
||||
if (extensive == 0.0 || extensive == 1.0) return;
|
||||
this->total_h *= extensive;
|
||||
this->total_o *= extensive;
|
||||
this->cb *= extensive;
|
||||
this->mass_water *= extensive;
|
||||
this->total_alkalinity *= extensive;
|
||||
this->totals.multiply(extensive);
|
||||
this->isotopes.multiply(extensive);
|
||||
}
|
||||
double cxxSolution::get_total(char *string)const
|
||||
{
|
||||
cxxNameDouble::const_iterator it = this->totals.find(string);
|
||||
|
||||
@ -83,6 +83,7 @@ public:
|
||||
void write_orchestra(std::ostream& headings, std::ostream& input_data)const;
|
||||
|
||||
void read_raw(CParser& parser);
|
||||
void multiply(double extensive);
|
||||
|
||||
|
||||
#ifdef USE_MPI
|
||||
|
||||
@ -197,6 +197,10 @@ void cxxSolutionIsotope::add(const cxxSolutionIsotope &isotope_ptr, double inten
|
||||
this->ratio_uncertainty_defined = (this->ratio_uncertainty_defined || isotope_ptr.ratio_uncertainty_defined);
|
||||
}
|
||||
}
|
||||
void cxxSolutionIsotope::multiply(double extensive)
|
||||
{
|
||||
this->total *= extensive;
|
||||
}
|
||||
|
||||
#ifdef SKIP
|
||||
cxxSolutionIsotope::STATUS cxxSolutionIsotope::read(CParser& parser)
|
||||
|
||||
@ -48,6 +48,7 @@ public:
|
||||
struct master *primary(void);
|
||||
|
||||
void add(const cxxSolutionIsotope &isotope_ptr, double intensive, double extensive);
|
||||
void multiply(double extensive);
|
||||
|
||||
protected:
|
||||
friend class cxxSolutionIsotopeList;
|
||||
|
||||
@ -61,6 +61,13 @@ void cxxSolutionIsotopeList::add(cxxSolutionIsotopeList old, double intensive, d
|
||||
}
|
||||
}
|
||||
}
|
||||
void cxxSolutionIsotopeList::multiply(double extensive)
|
||||
{
|
||||
for (cxxSolutionIsotopeList::iterator it = this->begin(); it != this->end(); ++it)
|
||||
{
|
||||
it->total *= extensive;
|
||||
}
|
||||
}
|
||||
struct isotope * cxxSolutionIsotopeList::cxxSolutionIsotopeList2isotope()
|
||||
{
|
||||
struct isotope *iso;
|
||||
|
||||
@ -24,6 +24,7 @@ public:
|
||||
struct isotope *cxxSolutionIsotopeList2isotope();
|
||||
|
||||
void add(cxxSolutionIsotopeList oldlist, double intensive, double extensive);
|
||||
void multiply(double extensive);
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user