From cd74118577fed9c4054941ee616e69eb13e603ed Mon Sep 17 00:00:00 2001
From: renchao_lu <renchao.lu@gmail.com>
Date: Tue, 9 Jun 2020 20:20:47 +0200
Subject: [PATCH] [CL] Uninitialize pH.

---
 ChemistryLib/PhreeqcIOData/AqueousSolution.h         | 6 +-----
 ChemistryLib/PhreeqcIOData/CreateAqueousSolution.cpp | 9 ++-------
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/ChemistryLib/PhreeqcIOData/AqueousSolution.h b/ChemistryLib/PhreeqcIOData/AqueousSolution.h
index c73d4071798..b802479b1c0 100644
--- a/ChemistryLib/PhreeqcIOData/AqueousSolution.h
+++ b/ChemistryLib/PhreeqcIOData/AqueousSolution.h
@@ -16,7 +16,6 @@
 #include <vector>
 
 #include "MathLib/LinAlg/GlobalMatrixVectorTypes.h"
-#include "MathLib/LinAlg/MatrixVectorTraits.h"
 #include "Output.h"
 
 namespace MeshLib
@@ -45,12 +44,9 @@ struct AqueousSolution
     AqueousSolution(double temperature_, double pressure_,
                     MeshLib::PropertyVector<double>* pe_, double const pe0_,
                     std::vector<Component>&& components_,
-                    ChargeBalance charge_balance_,
-                    std::size_t const num_chemical_systems_)
+                    ChargeBalance charge_balance_)
         : temperature(temperature_),
           pressure(pressure_),
-          pH(MathLib::MatrixVectorTraits<GlobalVector>::newInstance(
-              num_chemical_systems_)),
           pe(pe_),
           pe0(pe0_),
           components(std::move(components_)),
diff --git a/ChemistryLib/PhreeqcIOData/CreateAqueousSolution.cpp b/ChemistryLib/PhreeqcIOData/CreateAqueousSolution.cpp
index d6cf042a27a..ee5069eca08 100644
--- a/ChemistryLib/PhreeqcIOData/CreateAqueousSolution.cpp
+++ b/ChemistryLib/PhreeqcIOData/CreateAqueousSolution.cpp
@@ -41,13 +41,8 @@ std::unique_ptr<AqueousSolution> createAqueousSolution(
 
     auto charge_balance = createChargeBalance(config);
 
-    return std::make_unique<AqueousSolution>(temperature,
-                                             pressure,
-                                             pe,
-                                             pe0,
-                                             std::move(components),
-                                             charge_balance,
-                                             mesh.getNumberOfBaseNodes());
+    return std::make_unique<AqueousSolution>(
+        temperature, pressure, pe, pe0, std::move(components), charge_balance);
 }
 }  // namespace PhreeqcIOData
 }  // namespace ChemistryLib
-- 
GitLab