fix: Add missing "H" and "O" primaries

This commit is contained in:
Max Lübke 2024-05-07 09:52:22 +00:00 committed by Max Lübke
parent eb03f3ef81
commit d00975a33e
2 changed files with 4 additions and 2 deletions

View File

@ -6,8 +6,6 @@
void PhreeqcEngine::init_wrappers(const POETInitCell &cell) { void PhreeqcEngine::init_wrappers(const POETInitCell &cell) {
// TODO: Implement the rest of the wrappers. Currently supported: EXCHANGE
// Solutions // Solutions
this->solutionWrapperPtr = this->solutionWrapperPtr =
std::make_unique<SolutionWrapper>(this->Get_solution(1), cell.solutions); std::make_unique<SolutionWrapper>(this->Get_solution(1), cell.solutions);

View File

@ -63,6 +63,10 @@ void PhreeqcInit::dump_reactant_names(
auto *surface = this->Get_surface(cell_number); auto *surface = this->Get_surface(cell_number);
if (this->surface_primaries.empty()) { if (this->surface_primaries.empty()) {
// this is fixed! Always add H and O
this->surface_primaries.insert("H");
this->surface_primaries.insert("O");
for (std::size_t i = 3; i < union_sol_names.size(); i++) { for (std::size_t i = 3; i < union_sol_names.size(); i++) {
const auto master_primary = this->PhreeqcPtr->master_bsearch_primary( const auto master_primary = this->PhreeqcPtr->master_bsearch_primary(
union_sol_names[i].c_str()); union_sol_names[i].c_str());