added SolVol, pH and pe to (essentials)

This commit is contained in:
Marco De Lucia 2025-04-03 14:57:07 +02:00
parent 6e727e2f89
commit 4ea034e4e3
3 changed files with 10 additions and 5 deletions

View File

@ -119,6 +119,7 @@ PhreeqcMatrix::STLExport PhreeqcMatrix::get(VectorExportType type,
for (; column_index < result.names.size(); column_index++) {
for (const auto &[_, elements] : _m_map) {
double value_to_add = std::numeric_limits<double>::quiet_NaN();
// double value_to_add;
for (const auto &curr_element : elements) {
const std::string &curr_element_name = curr_element.name;
@ -238,4 +239,4 @@ double PhreeqcMatrix::operator()(int cell_id, const std::string &name) const {
}
return it->value;
}
}

View File

@ -18,6 +18,9 @@ void SolutionWrapper::get(std::span<LDBLE> &data) const {
data[0] = solution->Get_total_h();
data[1] = solution->Get_total_o();
data[2] = solution->Get_cb();
data[3] = solution->Get_soln_vol();
data[4] = solution->Get_ph();
data[5] = solution->Get_pe();
const cxxNameDouble &totals =
(_with_redox ? solution->Get_totals()
@ -85,4 +88,4 @@ SolutionWrapper::names(cxxSolution *solution, bool include_h0_o0,
names.insert(names.end(), names_set.begin(), names_set.end());
return names;
}
}

View File

@ -27,10 +27,11 @@ private:
cxxSolution *solution;
const std::vector<std::string> solution_order;
static constexpr std::array<const char *, 3> ESSENTIALS = {"H", "O",
"Charge"};
static constexpr std::array<const char *, 6> ESSENTIALS = {"H", "O",
"Charge",
"SolVol", "pH","pe"}; // MDL
static constexpr std::size_t NUM_ESSENTIALS = ESSENTIALS.size();
const bool _with_redox;
};
};