Roughing in mcd capability.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8536 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2014-02-28 21:29:53 +00:00
parent 38bfd3328b
commit c43019c496
4 changed files with 13 additions and 0 deletions

View File

@ -389,6 +389,7 @@ void Phreeqc::init(void)
*---------------------------------------------------------------------- */
// auto Rxn_solution_map;
// auto unnumbered_solutions;
save_species = false;
/*----------------------------------------------------------------------
* Global solution
*---------------------------------------------------------------------- */
@ -1274,6 +1275,7 @@ Phreeqc::InternalCopy(const Phreeqc *pSrc)
* Solution
*---------------------------------------------------------------------- */
Rxn_solution_map = pSrc->Rxn_solution_map;
save_species = pSrc->save_species;
// auto Rxn_solution_map;
// auto unnumbered_solutions;
/*----------------------------------------------------------------------

View File

@ -1302,6 +1302,7 @@ protected:
*---------------------------------------------------------------------- */
std::map<int, cxxSolution> Rxn_solution_map;
std::vector<cxxSolution> unnumbered_solutions;
bool save_species;
/*----------------------------------------------------------------------
* Global solution

View File

@ -62,6 +62,7 @@ class cxxSolution:public cxxNumKeyword
}
cxxNameDouble & Get_master_activity(void) {return this->master_activity;}
cxxNameDouble & Get_species_gamma(void) {return this->species_gamma;}
std::map<int, double> & Get_species_map(void) {return this->species_map;}
std::map < std::string, cxxSolutionIsotope > & Get_isotopes(void) {return this->isotopes;}
const std::map < std::string, cxxSolutionIsotope > & Get_isotopes(void)const {return this->isotopes;}
void Set_isotopes(const std::map < std::string, cxxSolutionIsotope > &iso ) {this->isotopes = iso;}
@ -132,6 +133,7 @@ class cxxSolution:public cxxNumKeyword
std::map < std::string, cxxSolutionIsotope > isotopes;
cxxISolution *initial_data;
const static std::vector < std::string > vopts;
std::map<int, double> species_map;
};
#endif // !defined(SOLUTION_H_INCLUDED)

View File

@ -1594,6 +1594,14 @@ xsolution_save(int n_user)
}
}
#endif
if (this->save_species)
{
temp_solution.Get_species_map().clear();
for (int i = 0; i < this->count_s_x; i++)
{
temp_solution.Get_species_map()[s_x[i]->number] = s_x[i]->moles;
}
}
/*
* Save solution
*/