From f95c1cfb296c5389b419a1f98c09d34abc3332de Mon Sep 17 00:00:00 2001 From: renchao_lu <renchao.lu@gmail.com> Date: Wed, 10 Jun 2020 00:36:05 +0200 Subject: [PATCH] [CL] Update doWaterChemistryCalculation function. --- ChemistryLib/ChemicalSolverInterface.h | 3 ++- ChemistryLib/PhreeqcIO.cpp | 6 ++---- ChemistryLib/PhreeqcIO.h | 2 +- ChemistryLib/PhreeqcKernel.cpp | 5 ++++- ChemistryLib/PhreeqcKernel.h | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ChemistryLib/ChemicalSolverInterface.h b/ChemistryLib/ChemicalSolverInterface.h index e821496003a..17b1464d248 100644 --- a/ChemistryLib/ChemicalSolverInterface.h +++ b/ChemistryLib/ChemicalSolverInterface.h @@ -23,7 +23,8 @@ public: std::vector<GlobalVector> const& interpolated_process_solutions) = 0; virtual void doWaterChemistryCalculation( - std::vector<GlobalVector*>& process_solutions, double const dt) = 0; + std::vector<GlobalVector> const& interpolated_process_solutions, + double const dt) = 0; virtual std::vector<GlobalVector*> getIntPtProcessSolutions() const = 0; diff --git a/ChemistryLib/PhreeqcIO.cpp b/ChemistryLib/PhreeqcIO.cpp index b9f08563af3..9944e6aa9fd 100644 --- a/ChemistryLib/PhreeqcIO.cpp +++ b/ChemistryLib/PhreeqcIO.cpp @@ -143,7 +143,8 @@ std::vector<GlobalVector*> PhreeqcIO::getIntPtProcessSolutions() const } void PhreeqcIO::doWaterChemistryCalculation( - std::vector<GlobalVector*>& process_solutions, double const dt) + std::vector<GlobalVector> const& interpolated_process_solutions, + double const dt) { setAqueousSolution(interpolated_process_solutions); @@ -154,9 +155,6 @@ void PhreeqcIO::doWaterChemistryCalculation( execute(); readOutputsFromFile(); - - setAqueousSolutionsOrUpdateProcessSolutions( - process_solutions, Status::UpdatingProcessSolutions); } void PhreeqcIO::setAqueousSolution( diff --git a/ChemistryLib/PhreeqcIO.h b/ChemistryLib/PhreeqcIO.h index 38a1bfa79e8..5ad64fb8998 100644 --- a/ChemistryLib/PhreeqcIO.h +++ b/ChemistryLib/PhreeqcIO.h @@ -51,7 +51,7 @@ public: interpolated_process_solutions) override; void doWaterChemistryCalculation( - std::vector<GlobalVector*>& process_solutions, + std::vector<GlobalVector> const& interpolated_process_solutions, double const dt) override; void setAqueousSolution( diff --git a/ChemistryLib/PhreeqcKernel.cpp b/ChemistryLib/PhreeqcKernel.cpp index 41827e610e8..a3c18a7f243 100644 --- a/ChemistryLib/PhreeqcKernel.cpp +++ b/ChemistryLib/PhreeqcKernel.cpp @@ -170,8 +170,11 @@ void PhreeqcKernel::reinitializeRates() } void PhreeqcKernel::doWaterChemistryCalculation( - std::vector<GlobalVector*>& process_solutions, double const dt) + std::vector<GlobalVector> const& /*interpolated_process_solutions*/, + double const dt) { + std::vector<GlobalVector*> process_solutions; + setAqueousSolutions(process_solutions); setTimeStepSize(dt); diff --git a/ChemistryLib/PhreeqcKernel.h b/ChemistryLib/PhreeqcKernel.h index 565725cd9fc..85f93a31a6e 100644 --- a/ChemistryLib/PhreeqcKernel.h +++ b/ChemistryLib/PhreeqcKernel.h @@ -45,7 +45,7 @@ public: interpolated_process_solutions) override; void doWaterChemistryCalculation( - std::vector<GlobalVector*>& process_solutions, + std::vector<GlobalVector> const& interpolated_process_solutions, double const dt) override; void setAqueousSolutions( -- GitLab