mirror of
https://git.gfz-potsdam.de/naaice/poet.git
synced 2025-12-15 20:38:23 +01:00
feat: add support for redox in PhreeqcMatrix initialization
This commit is contained in:
parent
6fb226887e
commit
e5588a2ee9
@ -1 +1 @@
|
||||
Subproject commit 2c8c311934cd54f0923d8b92dcccd9894825ce1b
|
||||
Subproject commit 6e727e2f896e853745b4dd123c5772a9b40ad705
|
||||
@ -179,7 +179,15 @@ PhreeqcMatrix InitialList::prepareGrid(const Rcpp::List &grid_input,
|
||||
throw std::runtime_error("Grid size must be positive.");
|
||||
}
|
||||
|
||||
PhreeqcMatrix pqc_mat = PhreeqcMatrix(database, script, include_h0_o0);
|
||||
bool with_redox =
|
||||
grid_input.containsElementNamed(
|
||||
GRID_MEMBER_STR(GridMembers::PQC_WITH_REDOX))
|
||||
? Rcpp::as<bool>(
|
||||
grid_input[GRID_MEMBER_STR(GridMembers::PQC_WITH_REDOX)])
|
||||
: false;
|
||||
|
||||
PhreeqcMatrix pqc_mat =
|
||||
PhreeqcMatrix(database, script, include_h0_o0, with_redox);
|
||||
|
||||
this->transport_names = pqc_mat.getSolutionNames();
|
||||
|
||||
|
||||
@ -75,6 +75,7 @@ private:
|
||||
enum class GridMembers {
|
||||
PQC_SCRIPT_STRING,
|
||||
PQC_SCRIPT_FILE,
|
||||
PQC_WITH_REDOX,
|
||||
PQC_DB_STRING,
|
||||
PQC_DB_FILE,
|
||||
GRID_DEF,
|
||||
@ -88,9 +89,9 @@ private:
|
||||
static_cast<std::size_t>(InitialList::GridMembers::ENUM_SIZE);
|
||||
|
||||
static constexpr std::array<const char *, size_GridMembers>
|
||||
GridMembersString = {"pqc_in_string", "pqc_in_file", "pqc_db_string",
|
||||
"pqc_db_file", "grid_def", "grid_size",
|
||||
"constant_cells", "porosity"};
|
||||
GridMembersString = {"pqc_in_string", "pqc_in_file", "pqc_with_redox",
|
||||
"pqc_db_string", "pqc_db_file", "grid_def",
|
||||
"grid_size", "constant_cells", "porosity"};
|
||||
|
||||
constexpr const char *GRID_MEMBER_STR(GridMembers member) const {
|
||||
return GridMembersString[static_cast<std::size_t>(member)];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user