From 92c03ebd7581fe05b930c6d75810600389fa2caf Mon Sep 17 00:00:00 2001
From: renchao_lu <renchao.lu@gmail.com>
Date: Tue, 19 Oct 2021 14:17:42 +0200
Subject: [PATCH] [CL] print site unit.

---
 ChemistryLib/PhreeqcIO.cpp | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/ChemistryLib/PhreeqcIO.cpp b/ChemistryLib/PhreeqcIO.cpp
index d3733726b9b..b7c70e53ade 100644
--- a/ChemistryLib/PhreeqcIO.cpp
+++ b/ChemistryLib/PhreeqcIO.cpp
@@ -547,6 +547,18 @@ std::ostream& operator<<(std::ostream& os, PhreeqcIO const& phreeqc_io)
             os << "-sites_units DENSITY"
                << "\n";
             os << surface << "\n";
+            // print unit
+            if (std::holds_alternative<DensityBasedSurfaceSite>(
+                    surface.front()))
+            {
+                os << "-sites_units density"
+                   << "\n";
+            }
+            else
+            {
+                os << "-sites_units absolute"
+                   << "\n";
+            }
             os << "SAVE solution " << chemical_system_id + 1 << "\n";
         }
 
-- 
GitLab