mirror of
https://git.gfz-potsdam.de/naaice/poet.git
synced 2025-12-15 20:38:23 +01:00
feat: add with_h0_o0 and with_redox parameters to ChemistryModule and related classes
This commit is contained in:
parent
e5588a2ee9
commit
6ab404eefd
@ -171,7 +171,8 @@ poet::ChemistryModule::ChemistryModule(
|
||||
|
||||
if (!is_master) {
|
||||
PhreeqcMatrix pqc_mat =
|
||||
PhreeqcMatrix(chem_params.database, chem_params.pqc_script);
|
||||
PhreeqcMatrix(chem_params.database, chem_params.pqc_script,
|
||||
chem_params.with_h0_o0, chem_params.with_redox);
|
||||
|
||||
this->pqc_runner =
|
||||
std::make_unique<PhreeqcRunner>(pqc_mat.subset(chem_params.pqc_ids));
|
||||
|
||||
@ -69,6 +69,8 @@ InitialList::ChemistryInit InitialList::getChemistryInit() const {
|
||||
chem_init.database = database;
|
||||
chem_init.pqc_script = pqc_script;
|
||||
chem_init.pqc_ids = pqc_ids;
|
||||
chem_init.with_h0_o0 = with_h0_o0;
|
||||
chem_init.with_redox = with_redox;
|
||||
// chem_init.pqc_scripts = pqc_scripts;
|
||||
// chem_init.pqc_ids = pqc_ids;
|
||||
|
||||
|
||||
@ -186,6 +186,9 @@ PhreeqcMatrix InitialList::prepareGrid(const Rcpp::List &grid_input,
|
||||
grid_input[GRID_MEMBER_STR(GridMembers::PQC_WITH_REDOX)])
|
||||
: false;
|
||||
|
||||
this->with_h0_o0 = include_h0_o0;
|
||||
this->with_redox = with_redox;
|
||||
|
||||
PhreeqcMatrix pqc_mat =
|
||||
PhreeqcMatrix(database, script, include_h0_o0, with_redox);
|
||||
|
||||
|
||||
@ -57,6 +57,10 @@ void InitialList::importList(const Rcpp::List &setup, bool minimal) {
|
||||
Rcpp::as<std::string>(setup[static_cast<int>(ExportList::CHEM_DATABASE)]);
|
||||
this->pqc_script = Rcpp::as<std::string>(
|
||||
setup[static_cast<int>(ExportList::CHEM_PQC_SCRIPT)]);
|
||||
this->with_h0_o0 =
|
||||
Rcpp::as<bool>(setup[static_cast<int>(ExportList::CHEM_PQC_WITH_H0_O0)]);
|
||||
this->with_redox =
|
||||
Rcpp::as<bool>(setup[static_cast<int>(ExportList::CHEM_PQC_WITH_REDOX)]);
|
||||
this->field_header = Rcpp::as<std::vector<std::string>>(
|
||||
setup[static_cast<int>(ExportList::CHEM_FIELD_HEADER)]);
|
||||
this->pqc_ids = Rcpp::as<std::vector<int>>(
|
||||
@ -113,6 +117,10 @@ Rcpp::List InitialList::exportList() {
|
||||
out[static_cast<int>(ExportList::CHEM_DATABASE)] = Rcpp::wrap(this->database);
|
||||
out[static_cast<int>(ExportList::CHEM_PQC_SCRIPT)] =
|
||||
Rcpp::wrap(this->pqc_script);
|
||||
out[static_cast<int>(ExportList::CHEM_PQC_WITH_H0_O0)] =
|
||||
Rcpp::wrap(this->with_h0_o0);
|
||||
out[static_cast<int>(ExportList::CHEM_PQC_WITH_REDOX)] =
|
||||
Rcpp::wrap(this->with_redox);
|
||||
out[static_cast<int>(ExportList::CHEM_FIELD_HEADER)] =
|
||||
Rcpp::wrap(this->field_header);
|
||||
out[static_cast<int>(ExportList::CHEM_PQC_IDS)] = Rcpp::wrap(this->pqc_ids);
|
||||
|
||||
@ -52,6 +52,8 @@ private:
|
||||
DIFFU_ALPHA_Y,
|
||||
CHEM_DATABASE,
|
||||
CHEM_PQC_SCRIPT,
|
||||
CHEM_PQC_WITH_H0_O0,
|
||||
CHEM_PQC_WITH_REDOX,
|
||||
CHEM_PQC_IDS,
|
||||
CHEM_FIELD_HEADER,
|
||||
// CHEM_PQC_SCRIPTS,
|
||||
@ -190,6 +192,8 @@ private:
|
||||
|
||||
std::string database;
|
||||
std::string pqc_script;
|
||||
bool with_h0_o0{false};
|
||||
bool with_redox{false};
|
||||
// std::vector<std::string> pqc_scripts;
|
||||
std::vector<int> pqc_ids;
|
||||
|
||||
@ -220,6 +224,8 @@ public:
|
||||
|
||||
std::string database;
|
||||
std::string pqc_script;
|
||||
bool with_h0_o0;
|
||||
bool with_redox;
|
||||
std::vector<int> pqc_ids;
|
||||
|
||||
// std::map<int, std::string> pqc_input;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user