diff --git a/ChemistryLib/ChemicalSolverInterface.h b/ChemistryLib/ChemicalSolverInterface.h index ef6c1bbebfb1aad0fb57b739ee4102226fee604a..728f24b887248ab778e07897a3265613197cc30d 100644 --- a/ChemistryLib/ChemicalSolverInterface.h +++ b/ChemistryLib/ChemicalSolverInterface.h @@ -50,8 +50,6 @@ public: virtual void setAqueousSolutionsPrevFromDumpFile() {} - virtual void executeInitialCalculation() = 0; - virtual void executeSpeciationCalculation(double const dt) = 0; virtual std::vector<GlobalVector*> getIntPtProcessSolutions() const = 0; diff --git a/ChemistryLib/PhreeqcIO.cpp b/ChemistryLib/PhreeqcIO.cpp index f021763254cfc0cdaca32f28e4750c7dad90ae20..b8bb8f797d9c3a311fb58f04cbe46f05c89c3a8c 100644 --- a/ChemistryLib/PhreeqcIO.cpp +++ b/ChemistryLib/PhreeqcIO.cpp @@ -275,9 +275,9 @@ void PhreeqcIO::setChemicalSystemConcrete( } } -void PhreeqcIO::executeInitialCalculation() +void PhreeqcIO::executeSpeciationCalculation(double const dt) { - writeInputsToFile(); + writeInputsToFile(dt); execute(); @@ -300,15 +300,6 @@ std::vector<GlobalVector*> PhreeqcIO::getIntPtProcessSolutions() const return int_pt_process_solutions; } -void PhreeqcIO::executeSpeciationCalculation(double const dt) -{ - writeInputsToFile(dt); - - execute(); - - readOutputsFromFile(); -} - void PhreeqcIO::setAqueousSolutionsPrevFromDumpFile() { if (!_dump) diff --git a/ChemistryLib/PhreeqcIO.h b/ChemistryLib/PhreeqcIO.h index 168b6588935dc8577e412141bffd821ba9e222cc..f6f31d9c3c93a3f0db2c9d97a6181b6e67081cda 100644 --- a/ChemistryLib/PhreeqcIO.h +++ b/ChemistryLib/PhreeqcIO.h @@ -63,8 +63,6 @@ public: void setAqueousSolutionsPrevFromDumpFile() override; - void executeInitialCalculation() override; - void executeSpeciationCalculation(double const dt) override; void writeInputsToFile(double const dt = 0); diff --git a/ChemistryLib/PhreeqcKernel.cpp b/ChemistryLib/PhreeqcKernel.cpp index 473a47290feb2a059b944379c71e41a0d53d3ddc..81d84c6dcb2ad273011f0aa3ddb3f51442497d47 100644 --- a/ChemistryLib/PhreeqcKernel.cpp +++ b/ChemistryLib/PhreeqcKernel.cpp @@ -324,20 +324,6 @@ void PhreeqcKernel::reset(std::size_t const chemical_system_id) } } -void PhreeqcKernel::executeInitialCalculation() -{ - // TODO (Renchao): This function could be replaced with - // PhreeqcKernel::executeSpeciationCalculation(std::vector<GlobalVector*>& - // process_solutions, double const dt). - std::vector<GlobalVector*> process_solutions; - - setAqueousSolutions(process_solutions); - - setTimeStepSize(0); - - execute(process_solutions); -} - void PhreeqcKernel::updateNodalProcessSolutions( std::vector<GlobalVector*> const& process_solutions, std::size_t const node_id) diff --git a/ChemistryLib/PhreeqcKernel.h b/ChemistryLib/PhreeqcKernel.h index e8fe4f6b248a86b4eb0428f2431feb738d3b0c99..08819d370d23cde9bc25f969c11ed382ebf7e0e1 100644 --- a/ChemistryLib/PhreeqcKernel.h +++ b/ChemistryLib/PhreeqcKernel.h @@ -41,8 +41,6 @@ public: std::unique_ptr<Kinetics>&& kinetic_reactants, std::vector<ReactionRate>&& reaction_rates); - void executeInitialCalculation() override; - void executeSpeciationCalculation(double const dt) override; void setAqueousSolutions( diff --git a/ProcessLib/ComponentTransport/ComponentTransportProcess.cpp b/ProcessLib/ComponentTransport/ComponentTransportProcess.cpp index 02bb574341b4ddb7278ce5c9acf3739a1bed9d5d..813e5d9494fed9e29e2901ed8b9537b4838167d8 100644 --- a/ProcessLib/ComponentTransport/ComponentTransportProcess.cpp +++ b/ProcessLib/ComponentTransport/ComponentTransportProcess.cpp @@ -127,7 +127,7 @@ void ComponentTransportProcess::setInitialConditionsConcreteProcess( BaseLib::RunTime time_phreeqc; time_phreeqc.start(); - _chemical_solver_interface->executeInitialCalculation(); + _chemical_solver_interface->executeSpeciationCalculation(0. /*dt*/); extrapolateIntegrationPointValuesToNodes( t, _chemical_solver_interface->getIntPtProcessSolutions(), x);