mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
Did not pick up redox species from solution.
Do not include H and O here. git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@4175 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
ffb8ee86be
commit
7e52b0c345
22
Phreeqc.cpp
22
Phreeqc.cpp
@ -405,8 +405,8 @@ size_t Phreeqc::list_components(std::list<std::string> &list_c)
|
||||
*/
|
||||
{
|
||||
cxxNameDouble accumulator;
|
||||
accumulator.add("H", 1);
|
||||
accumulator.add("O", 1);
|
||||
//accumulator.add("H", 1);
|
||||
//accumulator.add("O", 1);
|
||||
|
||||
int i;
|
||||
|
||||
@ -473,14 +473,30 @@ size_t Phreeqc::list_components(std::list<std::string> &list_c)
|
||||
accumulator.add_extensive(entity.get_totals(), 1.0);
|
||||
}
|
||||
|
||||
// print list
|
||||
// Put in all primaries
|
||||
cxxNameDouble::iterator it;
|
||||
for (it = accumulator.begin(); it != accumulator.end(); it++)
|
||||
{
|
||||
if (it->first == "Charge") continue;
|
||||
char string[MAX_LENGTH];
|
||||
strcpy(string, it->first.c_str());
|
||||
struct master *master_ptr = master_bsearch_primary(string);
|
||||
if (master_ptr == NULL) continue;
|
||||
if (master_ptr->type != AQ) continue;
|
||||
//std::string name(master_ptr->elt->name);
|
||||
//char
|
||||
accumulator.add(master_ptr->elt->name, 1);
|
||||
}
|
||||
// print list
|
||||
for (it = accumulator.begin(); it != accumulator.end(); it++)
|
||||
{
|
||||
struct master *master_ptr = master_bsearch(it->first.c_str());
|
||||
if (master_ptr == NULL) continue;
|
||||
if (master_ptr->type != AQ) continue;
|
||||
if (master_ptr->primary == 0) continue;
|
||||
if (it->first == "Charge") continue;
|
||||
if (it->first == "O") continue;
|
||||
if (it->first == "H") continue;
|
||||
list_c.push_back(it->first);
|
||||
}
|
||||
return(list_c.size());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user