pyEQL 1.4.0rc9__cp312-cp312-macosx_11_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (491) hide show
  1. pyEQL/__init__.py +50 -0
  2. pyEQL/_phreeqc.cpython-312-darwin.so +0 -0
  3. pyEQL/activity_correction.py +879 -0
  4. pyEQL/database/geothermal.dat +5693 -0
  5. pyEQL/database/llnl.dat +19305 -0
  6. pyEQL/database/phreeqc_license.txt +54 -0
  7. pyEQL/database/pyeql_db.json +35607 -0
  8. pyEQL/engines.py +1153 -0
  9. pyEQL/equilibrium.py +227 -0
  10. pyEQL/functions.py +281 -0
  11. pyEQL/phreeqc/__init__.py +5 -0
  12. pyEQL/phreeqc/bindings.cpp +84 -0
  13. pyEQL/phreeqc/core.py +239 -0
  14. pyEQL/phreeqc/database/Amm.dat +1968 -0
  15. pyEQL/phreeqc/database/CMakeLists.txt +32 -0
  16. pyEQL/phreeqc/database/ColdChem.dat +267 -0
  17. pyEQL/phreeqc/database/Concrete_PHR.dat +158 -0
  18. pyEQL/phreeqc/database/Concrete_PZ.dat +195 -0
  19. pyEQL/phreeqc/database/Kinec.v2.dat +12039 -0
  20. pyEQL/phreeqc/database/Kinec_v3.dat +12159 -0
  21. pyEQL/phreeqc/database/Makefile.am +28 -0
  22. pyEQL/phreeqc/database/Makefile.in +530 -0
  23. pyEQL/phreeqc/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
  24. pyEQL/phreeqc/database/Tipping_Hurley.dat +4137 -0
  25. pyEQL/phreeqc/database/__init__.py +0 -0
  26. pyEQL/phreeqc/database/core10.dat +6824 -0
  27. pyEQL/phreeqc/database/frezchem.dat +634 -0
  28. pyEQL/phreeqc/database/iso.dat +7235 -0
  29. pyEQL/phreeqc/database/llnl.dat +19310 -0
  30. pyEQL/phreeqc/database/minteq.dat +5654 -0
  31. pyEQL/phreeqc/database/minteq.v4.dat +13212 -0
  32. pyEQL/phreeqc/database/phreeqc.dat +1972 -0
  33. pyEQL/phreeqc/database/phreeqc_rates.dat +3158 -0
  34. pyEQL/phreeqc/database/pitzer.dat +1044 -0
  35. pyEQL/phreeqc/database/sit.dat +14348 -0
  36. pyEQL/phreeqc/database/wateq4f.dat +4036 -0
  37. pyEQL/phreeqc/ext/README.md +10 -0
  38. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/CMakeLists.txt +476 -0
  39. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/INSTALL +302 -0
  40. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/IPhreeqc.rc +61 -0
  41. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/IPhreeqcConfig.cmake.in +4 -0
  42. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/Makefile.am +8 -0
  43. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/Makefile.in +816 -0
  44. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/aclocal.m4 +1217 -0
  45. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/CTestScript.cmake +167 -0
  46. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/CSelectedOutput.cpp.o +0 -0
  47. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqc.cpp.o +0 -0
  48. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqcLib.cpp.o +0 -0
  49. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqc_interface_F.cpp.o +0 -0
  50. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/Var.c.o +0 -0
  51. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Dictionary.cpp.o +0 -0
  52. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ExchComp.cxx.o +0 -0
  53. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Exchange.cxx.o +0 -0
  54. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/GasComp.cxx.o +0 -0
  55. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/GasPhase.cxx.o +0 -0
  56. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ISolution.cxx.o +0 -0
  57. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ISolutionComp.cxx.o +0 -0
  58. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/KineticsComp.cxx.o +0 -0
  59. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/NameDouble.cxx.o +0 -0
  60. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/NumKeyword.cxx.o +0 -0
  61. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PBasic.cpp.o +0 -0
  62. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PHRQ_io_output.cpp.o +0 -0
  63. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PPassemblage.cxx.o +0 -0
  64. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PPassemblageComp.cxx.o +0 -0
  65. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Phreeqc.cpp.o +0 -0
  66. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PhreeqcKeywords/Keywords.cpp.o +0 -0
  67. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Pressure.cxx.o +0 -0
  68. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Reaction.cxx.o +0 -0
  69. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ReadClass.cxx.o +0 -0
  70. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SS.cxx.o +0 -0
  71. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SSassemblage.cxx.o +0 -0
  72. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SScomp.cxx.o +0 -0
  73. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SelectedOutput.cpp.o +0 -0
  74. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Serializer.cxx.o +0 -0
  75. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Solution.cxx.o +0 -0
  76. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SolutionIsotope.cxx.o +0 -0
  77. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/StorageBin.cxx.o +0 -0
  78. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/StorageBinList.cpp.o +0 -0
  79. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Surface.cxx.o +0 -0
  80. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SurfaceCharge.cxx.o +0 -0
  81. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SurfaceComp.cxx.o +0 -0
  82. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/System.cxx.o +0 -0
  83. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Temperature.cxx.o +0 -0
  84. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Use.cpp.o +0 -0
  85. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/UserPunch.cpp.o +0 -0
  86. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/advection.cpp.o +0 -0
  87. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/basicsubs.cpp.o +0 -0
  88. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cl1.cpp.o +0 -0
  89. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/PHRQ_base.cxx.o +0 -0
  90. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/PHRQ_io.cpp.o +0 -0
  91. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/Parser.cxx.o +0 -0
  92. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/Utils.cxx.o +0 -0
  93. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cvdense.cpp.o +0 -0
  94. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cvode.cpp.o +0 -0
  95. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cxxKinetics.cxx.o +0 -0
  96. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cxxMix.cxx.o +0 -0
  97. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/dense.cpp.o +0 -0
  98. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/dumper.cpp.o +0 -0
  99. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/gases.cpp.o +0 -0
  100. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/input.cpp.o +0 -0
  101. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/integrate.cpp.o +0 -0
  102. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/inverse.cpp.o +0 -0
  103. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/isotopes.cpp.o +0 -0
  104. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/kinetics.cpp.o +0 -0
  105. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/mainsubs.cpp.o +0 -0
  106. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/model.cpp.o +0 -0
  107. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/nvector.cpp.o +0 -0
  108. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/nvector_serial.cpp.o +0 -0
  109. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/parse.cpp.o +0 -0
  110. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/phqalloc.cpp.o +0 -0
  111. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/pitzer.cpp.o +0 -0
  112. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/pitzer_structures.cpp.o +0 -0
  113. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/prep.cpp.o +0 -0
  114. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/print.cpp.o +0 -0
  115. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/read.cpp.o +0 -0
  116. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/readtr.cpp.o +0 -0
  117. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/runner.cpp.o +0 -0
  118. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/sit.cpp.o +0 -0
  119. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/smalldense.cpp.o +0 -0
  120. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/spread.cpp.o +0 -0
  121. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/step.cpp.o +0 -0
  122. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/structures.cpp.o +0 -0
  123. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/sundialsmath.cpp.o +0 -0
  124. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/tally.cpp.o +0 -0
  125. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/tidy.cpp.o +0 -0
  126. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/transport.cpp.o +0 -0
  127. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/utilities.cpp.o +0 -0
  128. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CTestTestfile.cmake +6 -0
  129. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/DartConfiguration.tcl +109 -0
  130. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/cmake_install.cmake +45 -0
  131. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/libIPhreeqc.a +0 -0
  132. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ar-lib +270 -0
  133. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/compile +347 -0
  134. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.guess +1441 -0
  135. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.sub +1813 -0
  136. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/depcomp +791 -0
  137. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/install-sh +508 -0
  138. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ltmain.sh +11156 -0
  139. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/missing +215 -0
  140. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/test-driver +148 -0
  141. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure +23867 -0
  142. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure.ac +136 -0
  143. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Amm.dat +1968 -0
  144. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/CMakeLists.txt +32 -0
  145. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/ColdChem.dat +267 -0
  146. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PHR.dat +158 -0
  147. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PZ.dat +195 -0
  148. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec.v2.dat +12039 -0
  149. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec_v3.dat +12159 -0
  150. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.am +28 -0
  151. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.in +530 -0
  152. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
  153. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Tipping_Hurley.dat +4137 -0
  154. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/core10.dat +6824 -0
  155. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/frezchem.dat +634 -0
  156. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/iso.dat +7235 -0
  157. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/llnl.dat +19310 -0
  158. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.dat +5654 -0
  159. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.v4.dat +13212 -0
  160. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc.dat +1972 -0
  161. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc_rates.dat +3158 -0
  162. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/pitzer.dat +1044 -0
  163. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/sit.dat +14348 -0
  164. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/wateq4f.dat +4036 -0
  165. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/CMakeLists.txt +35 -0
  166. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/IPhreeqc.pdf +0 -0
  167. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.am +24 -0
  168. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.in +545 -0
  169. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/NOTICE +51 -0
  170. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_2_1999_manual.pdf +0 -0
  171. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_3_2013_manual.pdf +0 -0
  172. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/README +428 -0
  173. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/RELEASE +7294 -0
  174. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h.html +5096 -0
  175. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h_source.html +389 -0
  176. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp.html +83 -0
  177. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp_source.html +478 -0
  178. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h.html +318 -0
  179. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h_source.html +200 -0
  180. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bc_s.png +0 -0
  181. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bdwn.png +0 -0
  182. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.html +2274 -0
  183. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.png +0 -0
  184. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.html +69 -0
  185. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.png +0 -0
  186. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/closed.png +0 -0
  187. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +68 -0
  188. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.css +1440 -0
  189. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.png +0 -0
  190. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dynsections.js +97 -0
  191. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2blank.png +0 -0
  192. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2doc.png +0 -0
  193. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderclosed.png +0 -0
  194. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderopen.png +0 -0
  195. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2lastnode.png +0 -0
  196. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2link.png +0 -0
  197. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mlastnode.png +0 -0
  198. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mnode.png +0 -0
  199. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2node.png +0 -0
  200. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2plastnode.png +0 -0
  201. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2pnode.png +0 -0
  202. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2splitbar.png +0 -0
  203. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2vertline.png +0 -0
  204. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/index.html +58 -0
  205. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/jquery.js +31 -0
  206. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_f.png +0 -0
  207. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_g.png +0 -0
  208. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_h.png +0 -0
  209. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/open.png +0 -0
  210. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/structVAR.html +143 -0
  211. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_off.png +0 -0
  212. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_on.png +0 -0
  213. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_a.png +0 -0
  214. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_b.png +0 -0
  215. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_h.png +0 -0
  216. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_s.png +0 -0
  217. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tabs.css +60 -0
  218. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/phreeqc3.chm +0 -0
  219. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/CMakeLists.txt +11 -0
  220. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.am +88 -0
  221. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.in +696 -0
  222. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/CMakeLists.txt +1 -0
  223. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt +35 -0
  224. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt.in +21 -0
  225. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/README.txt +44 -0
  226. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/advect.c +101 -0
  227. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/ic +17 -0
  228. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/phreeqc.dat +1579 -0
  229. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/CMakeLists.txt +10 -0
  230. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/README.txt +3 -0
  231. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/CMakeLists.txt +9 -0
  232. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/phreeqc.dat +1582 -0
  233. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/runphreeqc.xls +0 -0
  234. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/withcallback.xls +0 -0
  235. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/CMakeLists.txt +11 -0
  236. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/Gypsum.py +52 -0
  237. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/parallel_advect.py +465 -0
  238. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/phreeqc.dat +1582 -0
  239. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/pitzer.dat +790 -0
  240. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/wateq4f.dat +3846 -0
  241. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/CMakeLists.txt +1 -0
  242. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt +35 -0
  243. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt.in +20 -0
  244. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/README.txt +45 -0
  245. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/advect.cpp +110 -0
  246. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/ic +17 -0
  247. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/phreeqc.dat +1579 -0
  248. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/CMakeLists.txt +1 -0
  249. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt +44 -0
  250. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt.in +24 -0
  251. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/README.txt +45 -0
  252. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/advect.F90 +102 -0
  253. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/ic +17 -0
  254. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/phreeqc.dat +1579 -0
  255. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt +26 -0
  256. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt.in +20 -0
  257. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/README.txt +37 -0
  258. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/ex2 +26 -0
  259. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/main.cpp +20 -0
  260. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/phreeqc.dat +1837 -0
  261. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/post-install.cmake.in +7 -0
  262. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/CMakeLists.txt +185 -0
  263. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.cpp +171 -0
  264. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.h +34 -0
  265. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.am +18 -0
  266. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.in +466 -0
  267. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestCVar.cpp +9 -0
  268. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqc.cpp +4901 -0
  269. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqcLib.cpp +4644 -0
  270. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestSelectedOutput.cpp +669 -0
  271. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestVar.cpp +10 -0
  272. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/conv_fail.in +11 -0
  273. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/dump +42 -0
  274. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/iso.dat +7231 -0
  275. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/kinn20140218 +349 -0
  276. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/missing_e.dat +1556 -0
  277. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch +105 -0
  278. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch_no_set +102 -0
  279. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.90a6449 +1935 -0
  280. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.old +1556 -0
  281. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/libtool.m4 +8388 -0
  282. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltoptions.m4 +437 -0
  283. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltsugar.m4 +124 -0
  284. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltversion.m4 +23 -0
  285. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/lt~obsolete.m4 +99 -0
  286. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/resource.h +14 -0
  287. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.cpp +401 -0
  288. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.hxx +77 -0
  289. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CVar.hxx +162 -0
  290. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Debug.h +12 -0
  291. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/ErrorReporter.hxx +70 -0
  292. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.cpp +1889 -0
  293. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f.inc +91 -0
  294. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f90.inc +603 -0
  295. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.h +2182 -0
  296. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.hpp +1027 -0
  297. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcCallbacks.h +19 -0
  298. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcF.f +653 -0
  299. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcLib.cpp +1098 -0
  300. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface.F90 +1283 -0
  301. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.cpp +535 -0
  302. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.h +162 -0
  303. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.am +210 -0
  304. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.in +1294 -0
  305. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/README.Fortran +17 -0
  306. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.c +84 -0
  307. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.h +152 -0
  308. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Version.h +36 -0
  309. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fimpl.h +282 -0
  310. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.cpp +646 -0
  311. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.h +163 -0
  312. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap1.cpp +24 -0
  313. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap2.cpp +24 -0
  314. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap3.cpp +24 -0
  315. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap4.cpp +24 -0
  316. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap5.cpp +24 -0
  317. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap6.cpp +25 -0
  318. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap7.cpp +25 -0
  319. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap8.cpp +24 -0
  320. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.cpp +225 -0
  321. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.h +59 -0
  322. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.cpp +1382 -0
  323. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.h +444 -0
  324. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.cpp +42 -0
  325. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.h +79 -0
  326. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.cpp +41 -0
  327. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.h +28 -0
  328. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.cxx +398 -0
  329. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.h +117 -0
  330. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.cxx +466 -0
  331. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.h +74 -0
  332. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.h +1184 -0
  333. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.resX +36 -0
  334. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.cxx +265 -0
  335. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.h +59 -0
  336. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.cxx +659 -0
  337. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.h +103 -0
  338. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.cxx +40 -0
  339. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.h +53 -0
  340. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.cxx +202 -0
  341. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.h +138 -0
  342. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.cxx +318 -0
  343. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.h +81 -0
  344. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NA.h +1 -0
  345. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.cxx +537 -0
  346. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.h +66 -0
  347. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.cxx +190 -0
  348. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.h +67 -0
  349. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.cpp +8350 -0
  350. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.h +572 -0
  351. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PHRQ_io_output.cpp +411 -0
  352. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.cxx +375 -0
  353. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.h +70 -0
  354. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.cxx +441 -0
  355. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.h +83 -0
  356. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.cpp +2087 -0
  357. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.h +2164 -0
  358. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.cpp +242 -0
  359. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.h +104 -0
  360. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.cxx +417 -0
  361. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.h +43 -0
  362. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.cxx +284 -0
  363. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.h +57 -0
  364. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ReadClass.cxx +1150 -0
  365. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.cxx +609 -0
  366. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.h +128 -0
  367. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.cxx +317 -0
  368. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.h +59 -0
  369. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.cxx +297 -0
  370. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.h +66 -0
  371. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.cpp +115 -0
  372. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.h +209 -0
  373. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.cxx +213 -0
  374. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.h +42 -0
  375. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.cxx +1795 -0
  376. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.h +154 -0
  377. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.cxx +333 -0
  378. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.h +85 -0
  379. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.cxx +1507 -0
  380. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.h +141 -0
  381. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.cpp +358 -0
  382. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.h +81 -0
  383. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.cxx +837 -0
  384. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.h +108 -0
  385. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.cxx +617 -0
  386. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.h +137 -0
  387. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.cxx +509 -0
  388. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.h +70 -0
  389. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.cxx +103 -0
  390. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.h +89 -0
  391. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.cxx +423 -0
  392. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.h +42 -0
  393. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.cpp +78 -0
  394. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.h +159 -0
  395. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.cpp +32 -0
  396. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.h +39 -0
  397. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ZedGraph.dll +0 -0
  398. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/advection.cpp +140 -0
  399. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/basicsubs.cpp +4333 -0
  400. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cl1.cpp +881 -0
  401. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.cxx +117 -0
  402. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.h +48 -0
  403. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_exports.h +20 -0
  404. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.cpp +914 -0
  405. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.h +207 -0
  406. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.cxx +1331 -0
  407. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.h +310 -0
  408. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.cxx +263 -0
  409. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.h +29 -0
  410. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/phrqtype.h +18 -0
  411. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.cpp +566 -0
  412. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.h +267 -0
  413. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.cpp +3939 -0
  414. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.h +940 -0
  415. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.cxx +617 -0
  416. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.h +78 -0
  417. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.cxx +154 -0
  418. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.h +58 -0
  419. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.cpp +175 -0
  420. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.h +341 -0
  421. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.cpp +277 -0
  422. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.h +60 -0
  423. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/gases.cpp +748 -0
  424. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/global_structures.h +1672 -0
  425. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/input.cpp +133 -0
  426. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/integrate.cpp +1219 -0
  427. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/inverse.cpp +5135 -0
  428. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/isotopes.cpp +1813 -0
  429. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/kinetics.cpp +3180 -0
  430. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/mainsubs.cpp +2320 -0
  431. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/model.cpp +5843 -0
  432. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.cpp +272 -0
  433. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.h +485 -0
  434. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.cpp +1032 -0
  435. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.h +369 -0
  436. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/parse.cpp +1044 -0
  437. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.cpp +316 -0
  438. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.h +47 -0
  439. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer.cpp +2709 -0
  440. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer_structures.cpp +225 -0
  441. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/prep.cpp +6267 -0
  442. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/print.cpp +3673 -0
  443. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/read.cpp +10245 -0
  444. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/readtr.cpp +1495 -0
  445. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.cpp +158 -0
  446. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.h +33 -0
  447. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sit.cpp +1684 -0
  448. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.cpp +324 -0
  449. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.h +261 -0
  450. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/spread.cpp +1309 -0
  451. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/step.cpp +1566 -0
  452. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/structures.cpp +3381 -0
  453. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.cpp +133 -0
  454. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.h +162 -0
  455. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialstypes.h +183 -0
  456. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tally.cpp +1288 -0
  457. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tidy.cpp +5600 -0
  458. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/transport.cpp +6403 -0
  459. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/utilities.cpp +1339 -0
  460. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/thread.h +64 -0
  461. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/CMakeLists.txt +133 -0
  462. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.am +45 -0
  463. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.in +1128 -0
  464. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/ex2.in +26 -0
  465. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main.f90 +31 -0
  466. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main77.f +6 -0
  467. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main_fortran.cxx +8 -0
  468. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/phreeqc.dat.in +1556 -0
  469. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_c.c +148 -0
  470. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_cxx.cxx +152 -0
  471. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_f90.F90 +328 -0
  472. pyEQL/phreeqc/iphreeqc_wrapper.cpp +75 -0
  473. pyEQL/phreeqc/solution.py +74 -0
  474. pyEQL/phreeqc/var.py +50 -0
  475. pyEQL/presets/Ringers lactate.yaml +20 -0
  476. pyEQL/presets/__init__.py +17 -0
  477. pyEQL/presets/normal saline.yaml +17 -0
  478. pyEQL/presets/rainwater.yaml +17 -0
  479. pyEQL/presets/seawater.yaml +29 -0
  480. pyEQL/presets/urine.yaml +26 -0
  481. pyEQL/presets/wastewater.yaml +21 -0
  482. pyEQL/py.typed +0 -0
  483. pyEQL/salt_ion_match.py +112 -0
  484. pyEQL/solute.py +163 -0
  485. pyEQL/solution.py +2714 -0
  486. pyEQL/utils.py +237 -0
  487. pyeql-1.4.0rc9.dist-info/METADATA +130 -0
  488. pyeql-1.4.0rc9.dist-info/RECORD +491 -0
  489. pyeql-1.4.0rc9.dist-info/WHEEL +6 -0
  490. pyeql-1.4.0rc9.dist-info/licenses/AUTHORS.md +21 -0
  491. pyeql-1.4.0rc9.dist-info/licenses/LICENSE.txt +20 -0
@@ -0,0 +1,2087 @@
1
+ #include "Phreeqc.h"
2
+ #include <algorithm> // std::replace
3
+
4
+ #include "NameDouble.h"
5
+ #include "Solution.h"
6
+ #include "Reaction.h"
7
+ #include "PPassemblage.h"
8
+ #include "Exchange.h"
9
+ #include "Surface.h"
10
+ #include "GasPhase.h"
11
+ #include "SSassemblage.h"
12
+ #include "cxxKinetics.h"
13
+ #include "phqalloc.h"
14
+ #include "PBasic.h"
15
+ #include "Temperature.h"
16
+ #include "SSassemblage.h"
17
+ #include "Utils.h"
18
+
19
+ #if defined(PHREEQCI_GUI)
20
+ #ifdef _DEBUG
21
+ #define new DEBUG_NEW
22
+ #undef THIS_FILE
23
+ static char THIS_FILE[] = __FILE__;
24
+ #endif
25
+ #endif
26
+
27
+ //const const_iso Phreeqc::iso_defaults[] = {
28
+ // {"13C", -10, 1},
29
+ // {"13C(4)", -10, 1},
30
+ // {"13C(-4)", -50, 5},
31
+ // {"34S", 10, 1},
32
+ // {"34S(6)", 10, 1},
33
+ // {"34S(-2)", -30, 5},
34
+ // {"2H", -28, 1},
35
+ // {"2H(1)", -28, 1},
36
+ // {"2H(0)", -28, 1},
37
+ // {"18O", -5, .1},
38
+ // {"18O(-2)", -5, .1},
39
+ // {"18O(0)", -5, .1},
40
+ // {"87Sr", .71, .01},
41
+ // {"11B", 20, 5}
42
+ //};
43
+ const const_iso Phreeqc::iso_defaults[] = {
44
+ const_iso("13C", -10, 1),
45
+ const_iso("13C(4)", -10, 1),
46
+ const_iso("13C(-4)", -50, 5),
47
+ const_iso("34S", 10, 1),
48
+ const_iso("34S(6)", 10, 1),
49
+ const_iso("34S(-2)", -30, 5),
50
+ const_iso("2H", -28, 1),
51
+ const_iso("2H(1)", -28, 1),
52
+ const_iso("2H(0)", -28, 1),
53
+ const_iso("18O", -5, .1),
54
+ const_iso("18O(-2)", -5, .1),
55
+ const_iso("18O(0)", -5, .1),
56
+ const_iso("87Sr", .71, .01),
57
+ const_iso("11B", 20, 5)
58
+ };
59
+
60
+ const int Phreeqc::count_iso_defaults = (sizeof(iso_defaults) / sizeof(class const_iso));
61
+
62
+ Phreeqc::~Phreeqc(void)
63
+ {
64
+
65
+ clean_up();
66
+
67
+ PHRQ_free_all();
68
+ if (phrq_io == &ioInstance)
69
+ {
70
+ this->phrq_io->clear_istream();
71
+ this->phrq_io->close_ostreams();
72
+ }
73
+ }
74
+
75
+ void Phreeqc::set_phast(int tf)
76
+ {
77
+ this->phast = tf;
78
+ }
79
+ size_t Phreeqc::list_components(std::list<std::string> &list_c)
80
+ /*
81
+ * Find all elements in any class definition
82
+ */
83
+ {
84
+ cxxNameDouble accumulator;
85
+ //accumulator.add("H", 1);
86
+ //accumulator.add("O", 1);
87
+
88
+ // solutions
89
+ {
90
+ std::map<int, cxxSolution>::const_iterator cit = Rxn_solution_map.begin();
91
+ for (; cit != Rxn_solution_map.end(); cit++)
92
+ {
93
+ cxxSolution entity(cit->second);
94
+ accumulator.add_extensive(entity.Get_totals(), 1.0);
95
+ }
96
+ }
97
+
98
+ // irreversible reactions
99
+ {
100
+ std::map<int, cxxReaction>::const_iterator cit = Rxn_reaction_map.begin();
101
+ for (; cit != Rxn_reaction_map.end(); cit++)
102
+ {
103
+ cxxReaction r_ptr(cit->second);
104
+ reaction_calc(&r_ptr);
105
+ accumulator.add_extensive(r_ptr.Get_elementList(), 1.0);
106
+ }
107
+ }
108
+
109
+ // pure phases
110
+ {
111
+ std::map<int, cxxPPassemblage>::const_iterator cit = Rxn_pp_assemblage_map.begin();
112
+ for (; cit != Rxn_pp_assemblage_map.end(); cit++)
113
+ {
114
+ cxxPPassemblage entity = cit->second;
115
+ entity.totalize(this);
116
+ accumulator.add_extensive(entity.Get_eltList(), 1.0);
117
+ }
118
+ }
119
+ // exchangers
120
+ {
121
+ std::map<int, cxxExchange>::const_iterator cit = Rxn_exchange_map.begin();
122
+ for (; cit != Rxn_exchange_map.end(); cit++)
123
+ {
124
+ cxxExchange entity = cit->second;
125
+ entity.totalize();
126
+ accumulator.add_extensive(entity.Get_totals(), 1.0);
127
+ }
128
+ }
129
+
130
+ // surfaces
131
+ {
132
+ std::map<int, cxxSurface>::const_iterator cit = Rxn_surface_map.begin();
133
+ for (; cit != Rxn_surface_map.end(); cit++)
134
+ {
135
+ cxxSurface entity = cit->second;
136
+ entity.totalize();
137
+ accumulator.add_extensive(entity.Get_totals(), 1.0);
138
+ }
139
+ }
140
+ // gas phases
141
+ {
142
+ std::map<int, cxxGasPhase>::const_iterator cit = Rxn_gas_phase_map.begin();
143
+ for (; cit != Rxn_gas_phase_map.end(); cit++)
144
+ {
145
+ cxxGasPhase entity = cit->second;
146
+ entity.totalize(this);
147
+ accumulator.add_extensive(entity.Get_totals(), 1.0);
148
+ }
149
+ }
150
+
151
+ // solid-solutions
152
+ {
153
+ std::map<int, cxxSSassemblage>::const_iterator cit = Rxn_ss_assemblage_map.begin();
154
+ for (; cit != Rxn_ss_assemblage_map.end(); cit++)
155
+ {
156
+ cxxSSassemblage entity = cit->second;
157
+ entity.totalize(this);
158
+ accumulator.add_extensive(entity.Get_totals(), 1.0);
159
+ }
160
+ }
161
+ // kinetics
162
+ {
163
+ std::map<int, cxxKinetics>::iterator it = Rxn_kinetics_map.begin();
164
+ for (; it != Rxn_kinetics_map.end(); it++)
165
+ {
166
+ calc_dummy_kinetic_reaction_tally(&(it->second));
167
+ cxxKinetics entity = it->second;
168
+ accumulator.add_extensive(entity.Get_totals(), 1.0);
169
+ }
170
+ }
171
+ // Put in all primaries
172
+ cxxNameDouble::iterator it;
173
+ for (it = accumulator.begin(); it != accumulator.end(); it++)
174
+ {
175
+ if (it->first == "Charge") continue;
176
+ char string[MAX_LENGTH];
177
+ Utilities::strcpy_safe(string, MAX_LENGTH, it->first.c_str());
178
+ class master *master_ptr = master_bsearch_primary(string);
179
+ if (master_ptr == NULL) continue;
180
+ if (master_ptr->type != AQ) continue;
181
+ accumulator.add(master_ptr->elt->name, 1);
182
+ }
183
+ // print list
184
+ for (it = accumulator.begin(); it != accumulator.end(); it++)
185
+ {
186
+ class master *master_ptr = master_bsearch(it->first.c_str());
187
+ if (master_ptr == NULL) continue;
188
+ if (master_ptr->type != AQ) continue;
189
+ if (master_ptr->primary == 0) continue;
190
+ if (it->first == "Charge") continue;
191
+ if (it->first == "O") continue;
192
+ if (it->first == "H") continue;
193
+ list_c.push_back(it->first);
194
+ }
195
+ return(list_c.size());
196
+ }
197
+ size_t Phreeqc::list_EquilibriumPhases(std::list<std::string> &list_pp)
198
+ /*
199
+ * Find all elements in any class definition
200
+ */
201
+ {
202
+ std::set<std::string> accumulator;
203
+ // pure phases
204
+ {
205
+ std::map<int, cxxPPassemblage>::const_iterator cit = Rxn_pp_assemblage_map.begin();
206
+ for (; cit != Rxn_pp_assemblage_map.end(); cit++)
207
+ {
208
+ cxxPPassemblage entity = cit->second;
209
+ std::set<std::string> pp = entity.GetPhases(this);
210
+ std::set<std::string>::iterator ppit = pp.begin();
211
+ for (; ppit != pp.end(); ppit++)
212
+ {
213
+ accumulator.insert(*ppit);
214
+ }
215
+ }
216
+ }
217
+ list_pp.clear();
218
+ std::set<std::string>::iterator it = accumulator.begin();
219
+ for (; it != accumulator.end(); it++)
220
+ {
221
+ list_pp.insert(list_pp.end(),*it);
222
+ }
223
+ return(list_pp.size());
224
+ }
225
+ size_t Phreeqc::list_GasComponents(std::list<std::string> &list_gc)
226
+ /*
227
+ * Find all elements in any class definition
228
+ */
229
+ {
230
+ std::set<std::string> accumulator;
231
+ // pure phases
232
+ {
233
+ std::map<int, cxxGasPhase>::const_iterator cit = Rxn_gas_phase_map.begin();
234
+ for (; cit != Rxn_gas_phase_map.end(); cit++)
235
+ {
236
+ cxxGasPhase entity = cit->second;
237
+ std::vector<cxxGasComp> &gc = entity.Get_gas_comps();
238
+ for (size_t i = 0; i < gc.size(); i++)
239
+ {
240
+ int j;
241
+ phase * p = phase_bsearch(gc[i].Get_phase_name().c_str(), &j, 0);
242
+ accumulator.insert(p->name);
243
+ }
244
+ }
245
+ }
246
+ list_gc.clear();
247
+ std::set<std::string>::iterator it = accumulator.begin();
248
+ for (; it != accumulator.end(); it++)
249
+ {
250
+ list_gc.insert(list_gc.end(), *it);
251
+ }
252
+ return(list_gc.size());
253
+ }
254
+ size_t Phreeqc::list_KineticReactions(std::list<std::string> &list_kr)
255
+ /*
256
+ * Find all kinetic reactions
257
+ */
258
+ {
259
+ std::set<std::string> accumulator;
260
+ // Kinetics
261
+ {
262
+ std::map<int, cxxKinetics>::const_iterator cit = Rxn_kinetics_map.begin();
263
+ for (; cit != Rxn_kinetics_map.end(); cit++)
264
+ {
265
+ cxxKinetics entity = cit->second;
266
+ for (size_t i = 0; i < entity.Get_kinetics_comps().size(); i++)
267
+ {
268
+ std::string ratename = entity.Get_kinetics_comps()[i].Get_rate_name();
269
+ int j;
270
+ rate *r = rate_search(ratename.c_str(), &j);
271
+ if (r != NULL)
272
+ {
273
+ accumulator.insert(r->name);
274
+ }
275
+ }
276
+ }
277
+ }
278
+ list_kr.clear();
279
+ std::set<std::string>::iterator it = accumulator.begin();
280
+ for (; it != accumulator.end(); it++)
281
+ {
282
+ list_kr.insert(list_kr.end(), *it);
283
+ }
284
+ return(list_kr.size());
285
+ }
286
+ size_t Phreeqc::list_SolidSolutions(std::list<std::string> &list_comps, std::list<std::string> &list_names)
287
+ /*
288
+ * Find all elements in any class definition
289
+ */
290
+ {
291
+ std::vector< std::set<std::string> > ss_sets;
292
+ std::vector<std::string> ss_names;
293
+ // solid solutions
294
+ std::map<int, cxxSSassemblage>::const_iterator cit = Rxn_ss_assemblage_map.begin();
295
+ // Fill vectors, ss names and related set of component names
296
+ for (; cit != Rxn_ss_assemblage_map.end(); cit++)
297
+ {
298
+ cxxSSassemblage entity = cit->second;
299
+ std::map<std::string, cxxSS> &SSs = entity.Get_SSs();
300
+ std::map<std::string, cxxSS>::iterator ssit = SSs.begin();
301
+ for (; ssit != SSs.end(); ssit++)
302
+ {
303
+ std::string ssname = ssit->second.Get_name();
304
+ std::set<std::string> accumulator_phases;
305
+ for (size_t i = 0; i < ssit->second.Get_ss_comps().size(); i++)
306
+ {
307
+ std::string pname = ssit->second.Get_ss_comps()[i].Get_name();
308
+ int j;
309
+ phase * p = phase_bsearch(pname.c_str(), &j, 0);
310
+ accumulator_phases.insert(p->name);
311
+ }
312
+ ss_names.push_back(ssname);
313
+ ss_sets.push_back(accumulator_phases);
314
+ }
315
+ }
316
+ // need to merge into exclusive sets of solid solution components
317
+ bool repeat = true;
318
+ while (repeat)
319
+ {
320
+ repeat = false;
321
+ for (int i = 0; i < (int) ss_sets.size() - 1; i++)
322
+ {
323
+ for (int j = i + 1; j < (int) ss_sets.size(); j++)
324
+ {
325
+ // locate any common component
326
+ std::set<std::string>::iterator it = ss_sets[j].begin();
327
+ for (; it != ss_sets[j].end(); it++)
328
+ {
329
+ if (ss_sets[i].find(*it) != ss_sets[i].end())
330
+ {
331
+ repeat = true;
332
+ break;
333
+ }
334
+ }
335
+ // merge sets and clear second set
336
+ if (repeat)
337
+ {
338
+ for (it = ss_sets[j].begin(); it != ss_sets[j].end(); it++)
339
+ {
340
+ ss_sets[i].insert(*it);
341
+ }
342
+ ss_sets[j].clear();
343
+ break;
344
+ }
345
+ }
346
+ if (repeat) break;
347
+ }
348
+ }
349
+ list_comps.clear();
350
+ list_names.clear();
351
+ // Write lists
352
+ for (size_t i = 0; i < ss_sets.size(); i++)
353
+ {
354
+ std::set<std::string>::iterator it = ss_sets[i].begin();
355
+ for (; it != ss_sets[i].end(); it++)
356
+ {
357
+ list_names.push_back(ss_names[i]);
358
+ list_comps.push_back(*it);
359
+ }
360
+ }
361
+ return(list_comps.size());
362
+ }
363
+ size_t Phreeqc::list_Surfaces(std::list<std::string> &list_surftype, std::list<std::string> &list_surfname)
364
+ /*
365
+ * Find all surface types and surfaces
366
+ */
367
+ {
368
+ std::set<std::pair<std::string,std::string> > accumulator;
369
+ // Surfaces
370
+ {
371
+ std::map<int, cxxSurface>::const_iterator cit = Rxn_surface_map.begin();
372
+ for (; cit != Rxn_surface_map.end(); cit++)
373
+ {
374
+ cxxSurface entity = cit->second;
375
+ std::vector<cxxSurfaceComp> &scomps = entity.Get_surface_comps();
376
+ //std::vector<cxxSurfaceCharge> &scharges = entity.Get_surface_charges();
377
+ for (size_t i = 0; i < scomps.size(); i++)
378
+ {
379
+ std::pair<std::string, std::string> p(scomps[i].Get_master_element(), scomps[i].Get_charge_name());
380
+ accumulator.insert(p);
381
+ }
382
+ }
383
+ }
384
+ list_surftype.clear();
385
+ list_surfname.clear();
386
+ std::set<std::pair<std::string, std::string> >::iterator it = accumulator.begin();
387
+ for (; it != accumulator.end(); it++)
388
+ {
389
+ list_surftype.push_back(it->first);
390
+ list_surfname.push_back(it->second);
391
+ }
392
+ return(list_surfname.size());
393
+ }
394
+ size_t Phreeqc::list_Exchangers(std::list<std::string> &list_exname)
395
+ /*
396
+ * Find all exchangers
397
+ */
398
+ {
399
+ std::set<std::string> accumulator;
400
+ // Exchangers
401
+ std::map<int, cxxExchange>::const_iterator cit = Rxn_exchange_map.begin();
402
+ for (; cit != Rxn_exchange_map.end(); cit++)
403
+ {
404
+ cxxExchange entity = cit->second;
405
+ std::vector<cxxExchComp> &ecomps = entity.Get_exchange_comps();
406
+ for (size_t i = 0; i < ecomps.size(); i++)
407
+ {
408
+ std::string exname = "";
409
+ cxxNameDouble nd = ecomps[i].Get_totals();
410
+ cxxNameDouble::iterator it = nd.begin();
411
+ for (; it != nd.end(); it++)
412
+ {
413
+ class master *m = master_bsearch(it->first.c_str());
414
+ if (m != NULL)
415
+ {
416
+ if (m->type == EX)
417
+ {
418
+ exname = it->first;
419
+ break;
420
+ }
421
+ }
422
+ }
423
+ if (exname != "")
424
+ {
425
+ accumulator.insert(exname);
426
+ }
427
+ }
428
+ }
429
+ list_exname.clear();
430
+ std::set< std::string>::iterator it = accumulator.begin();
431
+ for (; it != accumulator.end(); it++)
432
+ {
433
+ list_exname.push_back(*it);
434
+ }
435
+ return(list_exname.size());
436
+ }
437
+ Phreeqc::Phreeqc(PHRQ_io *io)
438
+ {
439
+ user_print = NULL;
440
+ sformatf_buffer = NULL;
441
+ basic_interpreter = NULL;
442
+ count_elts = 0;
443
+ aphi = NULL;
444
+ // phrq_io
445
+ if (io)
446
+ {
447
+ this->phrq_io = io;
448
+ }
449
+ else
450
+ {
451
+ this->phrq_io = &this->ioInstance;
452
+ }
453
+ // auto PHRQ_io ioInstance;
454
+
455
+ // initialize data members
456
+ init();
457
+
458
+ #if defined(SWIG) || defined(SWIG_IPHREEQC)
459
+ basicCallback = NULL;
460
+ #endif
461
+ }
462
+ void Phreeqc::init(void)
463
+ {
464
+ same_model = FALSE;
465
+ current_tc = NAN;
466
+ current_pa = NAN;
467
+ current_mu = NAN;
468
+ mu_terms_in_logk = true;
469
+ current_A = 0.0;
470
+ current_x = 0.0;
471
+ fix_current = 0.0;
472
+ /* ----------------------------------------------------------------------
473
+ * STRUCTURES
474
+ * ---------------------------------------------------------------------- */
475
+ /*
476
+ * last model
477
+ */
478
+ last_model.force_prep = true;
479
+ last_model.gas_phase_type = cxxGasPhase::GP_UNKNOWN;
480
+ last_model.gas_phase.clear();
481
+ last_model.ss_assemblage.clear();
482
+ last_model.pp_assemblage.clear();
483
+ last_model.add_formula.clear();
484
+ last_model.si.clear();
485
+ last_model.dl_type = cxxSurface::NO_DL;
486
+ last_model.surface_type = cxxSurface::UNKNOWN_DL;
487
+
488
+ current_selected_output = NULL;
489
+ current_user_punch = NULL;
490
+ high_precision = false;
491
+ MIN_LM = -30.0; /* minimum log molality allowed before molality set to zero */
492
+ LOG_ZERO_MOLALITY = -30; /* molalities <= LOG_ZERO_MOLALITY are considered equal to zero */
493
+ MIN_RELATED_LOG_ACTIVITY = -30;
494
+ MIN_TOTAL = 1e-25;
495
+ MIN_TOTAL_SS = MIN_TOTAL/100;
496
+ MIN_RELATED_SURFACE = MIN_TOTAL*100;
497
+ // auto Rxn_temperature_map;
498
+ // auto Rxn_pressure_map;
499
+
500
+ /* ----------------------------------------------------------------------
501
+ * Surface
502
+ * --------------------------------------------------------------------- */
503
+ g_iterations = -1;
504
+ G_TOL = 1e-8;
505
+ // auto Rxn_surface_map;
506
+ // auto charge_group_map;
507
+ change_surf_count = 0;
508
+ change_surf = NULL;
509
+ /* ----------------------------------------------------------------------
510
+ * Exchange
511
+ * ---------------------------------------------------------------------- */
512
+ // auto Rxn_exchange_map;
513
+
514
+ /* ----------------------------------------------------------------------
515
+ * Kinetics
516
+ * ---------------------------------------------------------------------- */
517
+ // auto Rxn_kinetics_map;
518
+
519
+ /*----------------------------------------------------------------------
520
+ * Save
521
+ *---------------------------------------------------------------------- */
522
+ save_init(-1); // set initial save values
523
+
524
+ /*----------------------------------------------------------------------
525
+ * Inverse
526
+ *---------------------------------------------------------------------- */
527
+ count_inverse = 0;
528
+ /*----------------------------------------------------------------------
529
+ * Mix
530
+ *---------------------------------------------------------------------- */
531
+ // auto Rxn_mix_map;
532
+ // auto Dispersion_mix_map;
533
+ // auto Rxn_solution_mix_map;
534
+ // auto Rxn_exchange_mix_map;
535
+ // auto Rxn_gas_phase_mix_map;
536
+ // auto Rxn_kinetics_mix_map;
537
+ // auto Rxn_pp_assemblage_mix_map;
538
+ // auto Rxn_ss_assemblage_mix_map;
539
+ // auto Rxn_surface_mix_map;
540
+ /*----------------------------------------------------------------------
541
+ * Irreversible reaction
542
+ *---------------------------------------------------------------------- */
543
+ run_cells_one_step = false;
544
+ // auto Rxn_reaction_map;
545
+ /*----------------------------------------------------------------------
546
+ * Gas phase
547
+ *---------------------------------------------------------------------- */
548
+ // auto Rxn_gas_phase_map;
549
+ /*----------------------------------------------------------------------
550
+ * Solid solution
551
+ *---------------------------------------------------------------------- */
552
+ // auto Rxn_ss_assemblage_map;
553
+ /*----------------------------------------------------------------------
554
+ * Pure-phase assemblage
555
+ *---------------------------------------------------------------------- */
556
+ // auto Rxn_pp_assemblage_map;
557
+ /*----------------------------------------------------------------------
558
+ * Species_list
559
+ *---------------------------------------------------------------------- */
560
+ /*----------------------------------------------------------------------
561
+ * Jacobian and Mass balance lists
562
+ *---------------------------------------------------------------------- */
563
+
564
+ /*----------------------------------------------------------------------
565
+ * Solution
566
+ *---------------------------------------------------------------------- */
567
+ // auto Rxn_solution_map;
568
+ // auto unnumbered_solutions;
569
+ save_species = false;
570
+ /*----------------------------------------------------------------------
571
+ * Global solution
572
+ *---------------------------------------------------------------------- */
573
+ new_x = FALSE;
574
+ tc_x = 0;
575
+ tk_x = 0;
576
+ patm_x = 1;
577
+ last_patm_x = 1;
578
+ potV_x = 0;
579
+ numerical_fixed_volume = false;
580
+ force_numerical_fixed_volume = false;
581
+ //switch_numerical = false;
582
+ ph_x = 0;
583
+ solution_pe_x = 0;
584
+ mu_x = 0;
585
+ ah2o_x = 1.0;
586
+ total_h_x = 0;
587
+ total_o_x = 0;
588
+ cb_x = 0;
589
+ total_ions_x = 0;
590
+ mass_water_aq_x = 0;
591
+ mass_water_surfaces_x = 0;
592
+ mass_water_bulk_x = 0;
593
+ // auto pe_x
594
+ // auto isotopes_x
595
+ // auto default_pe_x
596
+ dl_type_x = cxxSurface::NO_DL;
597
+ total_carbon = 0;
598
+ total_co2 = 0;
599
+ total_alkalinity = 0;
600
+ gfw_water = 0;
601
+ step_x = 0;
602
+ kin_time_x = 0;
603
+ /*----------------------------------------------------------------------
604
+ * Transport data
605
+ *---------------------------------------------------------------------- */
606
+ count_cells = 1;
607
+ count_shifts = 1;
608
+ ishift = 1;
609
+ bcon_first = bcon_last = 3;
610
+ correct_disp = FALSE;
611
+ tempr = 2.0;
612
+ timest = 0.0;
613
+ simul_tr = 0;
614
+ diffc = 0.3e-9;
615
+ heat_diffc = -0.1;
616
+ cell = 0;
617
+ mcd_substeps = 1.0;
618
+ print_modulus = 1;
619
+ punch_modulus = 1;
620
+ dump_in = FALSE;
621
+ dump_modulus = 0;
622
+ transport_warnings = TRUE;
623
+ old_cells = 0;
624
+ max_cells = 0;
625
+ all_cells = 0;
626
+ multi_Dflag = FALSE;
627
+ interlayer_Dflag = FALSE;
628
+ implicit = FALSE;
629
+ max_mixf = 1.0;
630
+ min_dif_LM = -30.0;
631
+ default_Dw = 0;
632
+ correct_Dw = 0;
633
+ multi_Dpor = 0;
634
+ interlayer_Dpor = 0.1;
635
+ multi_Dpor_lim = 0;
636
+ interlayer_Dpor_lim = 0;
637
+ multi_Dn = 0;
638
+ interlayer_tortf = 100.0;
639
+ cell_no = 0;
640
+ fix_current = 0.0;
641
+ /*----------------------------------------------------------------------
642
+ * Advection data
643
+ *---------------------------------------------------------------------- */
644
+ count_ad_cells = 1;
645
+ count_ad_shifts = 1;
646
+ print_ad_modulus = 1;
647
+ punch_ad_modulus = 1;
648
+ advection_kin_time = 0.0;
649
+ advection_kin_time_defined = FALSE;
650
+ advection_warnings = TRUE;
651
+ /*----------------------------------------------------------------------
652
+ * Tidy data
653
+ *---------------------------------------------------------------------- */
654
+ new_model = TRUE;
655
+ new_exchange = FALSE;
656
+ new_pp_assemblage = FALSE;
657
+ new_surface = FALSE;
658
+ new_reaction = FALSE;
659
+ new_temperature = FALSE;
660
+ new_mix = FALSE;
661
+ new_solution = FALSE;
662
+ new_gas_phase = FALSE;
663
+ new_inverse = FALSE;
664
+ new_punch = FALSE;
665
+ new_ss_assemblage = FALSE;
666
+ new_kinetics = FALSE;
667
+ new_copy = FALSE;
668
+ new_pitzer = FALSE;
669
+ /*----------------------------------------------------------------------
670
+ * Elements
671
+ *---------------------------------------------------------------------- */
672
+ element_h_one = NULL;
673
+ /*----------------------------------------------------------------------
674
+ * Element List
675
+ *---------------------------------------------------------------------- */
676
+ count_elts = 0;
677
+ /*----------------------------------------------------------------------
678
+ * Species
679
+ *---------------------------------------------------------------------- */
680
+ s_h2o = NULL;
681
+ s_hplus = NULL;
682
+ s_h3oplus = NULL;
683
+ s_eminus = NULL;
684
+ s_co3 = NULL;
685
+ s_h2 = NULL;
686
+ s_o2 = NULL;
687
+ /*----------------------------------------------------------------------
688
+ * Phases
689
+ *---------------------------------------------------------------------- */
690
+
691
+ /*----------------------------------------------------------------------
692
+ * Master species
693
+ *---------------------------------------------------------------------- */
694
+
695
+ /*----------------------------------------------------------------------
696
+ * Unknowns
697
+ *---------------------------------------------------------------------- */
698
+ count_unknowns = 0;
699
+ max_unknowns = 0;
700
+ ah2o_unknown = NULL;
701
+ alkalinity_unknown = NULL;
702
+ carbon_unknown = NULL;
703
+ charge_balance_unknown = NULL;
704
+ exchange_unknown = NULL;
705
+ mass_hydrogen_unknown = NULL;
706
+ mass_oxygen_unknown = NULL;
707
+ mb_unknown = NULL;
708
+ mu_unknown = NULL;
709
+ pe_unknown = NULL;
710
+ ph_unknown = NULL;
711
+ pure_phase_unknown = NULL;
712
+ solution_phase_boundary_unknown = NULL;
713
+ surface_unknown = NULL;
714
+ gas_unknown = NULL;
715
+ ss_unknown = NULL;
716
+ // auto gas_unknowns;
717
+ /*----------------------------------------------------------------------
718
+ * Reaction work space
719
+ *---------------------------------------------------------------------- */
720
+ // struct trxn;
721
+ for (int i = 0; i < MAX_LOG_K_INDICES; i++)
722
+ {
723
+ trxn.logk[i] = 0;
724
+ }
725
+ for (int i = 0; i < 3; i++)
726
+ {
727
+ trxn.dz[i] = 0;
728
+ }
729
+ count_trxn = 0;
730
+
731
+ /* ----------------------------------------------------------------------
732
+ * Print
733
+ * ---------------------------------------------------------------------- */
734
+ pr.all = TRUE;
735
+ pr.initial_solutions = TRUE;
736
+ pr.initial_exchangers = TRUE;
737
+ pr.reactions = TRUE;
738
+ pr.gas_phase = TRUE;
739
+ pr.ss_assemblage = TRUE;
740
+ pr.pp_assemblage = TRUE;
741
+ pr.surface = TRUE;
742
+ pr.exchange = TRUE;
743
+ pr.kinetics = TRUE;
744
+ pr.totals = TRUE;
745
+ pr.eh = TRUE;
746
+ pr.species = TRUE;
747
+ pr.saturation_indices = TRUE;
748
+ pr.irrev = TRUE;
749
+ pr.mix = TRUE;
750
+ pr.reaction = TRUE;
751
+ pr.use = TRUE;
752
+ pr.logfile = FALSE;
753
+ pr.punch = TRUE;
754
+ pr.status = TRUE;
755
+ pr.inverse = TRUE;
756
+ pr.dump = TRUE;
757
+ pr.user_print = TRUE;
758
+ pr.headings = TRUE;
759
+ pr.user_graph = TRUE;
760
+ pr.echo_input = TRUE;
761
+ pr.warnings = 100;
762
+ pr.initial_isotopes = TRUE;
763
+ pr.isotope_ratios = TRUE;
764
+ pr.isotope_alphas = TRUE;
765
+ pr.hdf = FALSE;
766
+ pr.alkalinity = FALSE;
767
+ status_on = true;
768
+ #ifdef NPP
769
+ status_interval = 40;
770
+ #else
771
+ status_interval = 250;
772
+ #endif
773
+ status_timer = clock();
774
+ count_warnings = 0;
775
+ /* ----------------------------------------------------------------------
776
+ * RATES
777
+ * ---------------------------------------------------------------------- */
778
+ rate_m = 0;
779
+ rate_m0 = 0;
780
+ rate_time = 0;
781
+ rate_kin_time = 1.0;
782
+ rate_sim_time_start = 0;
783
+ rate_sim_time_end = 0;
784
+ rate_sim_time = 0;
785
+ rate_moles = 0;
786
+ initial_total_time = 0;
787
+ // auto rate_p
788
+ count_rate_p = 0;
789
+ /* ----------------------------------------------------------------------
790
+ * USER PRINT COMMANDS
791
+ * ---------------------------------------------------------------------- */
792
+ //user_print = NULL;
793
+ n_user_punch_index = 0;
794
+ fpunchf_user_s_warning = 0;
795
+ fpunchf_user_buffer[0] = 0;
796
+
797
+ #if defined PHREEQ98
798
+ class rate *user_graph;
799
+ char **user_graph_headings;
800
+ int user_graph_count_headings;
801
+ #endif
802
+ #if defined MULTICHART
803
+ // auto chart_handler;
804
+ chart_handler.Set_io(phrq_io);
805
+ #endif
806
+ /* ----------------------------------------------------------------------
807
+ * GLOBAL DECLARATIONS
808
+ * ---------------------------------------------------------------------- */
809
+ error_string = NULL;
810
+ simulation = 0;
811
+ state = INITIALIZE;
812
+ reaction_step = 0;
813
+ transport_step = 0;
814
+ transport_start = 0;
815
+ advection_step = 0;
816
+ stop_program = FALSE;
817
+ incremental_reactions = FALSE;
818
+ count_strings = 0;
819
+ input_error = 0;
820
+ next_keyword = Keywords::KEY_NONE;
821
+ parse_error = 0;
822
+ paren_count = 0;
823
+ iterations = 0;
824
+ gamma_iterations = 0;
825
+ density_iterations = 0;
826
+ run_reactions_iterations= 0;
827
+ overall_iterations = 0;
828
+ max_line = MAX_LINE;
829
+ line = NULL;
830
+ line_save = NULL;
831
+ LOG_10 = log(10.0);
832
+ debug_model = FALSE;
833
+ debug_prep = FALSE;
834
+ debug_set = FALSE;
835
+ debug_mass_action = FALSE;
836
+ debug_mass_balance = FALSE;
837
+ debug_diffuse_layer = FALSE;
838
+ debug_inverse = FALSE;
839
+ #ifdef USE_LONG_DOUBLE
840
+ /* from float.h, sets tolerance for cl1 routine */
841
+ inv_tol_default = pow((long double) 10, (long double) -LDBL_DIG + 5);
842
+ #else
843
+ inv_tol_default = pow((double) 10, (double) -DBL_DIG + 5);
844
+ #endif
845
+ itmax = 100;
846
+ max_tries = 1000;
847
+ #ifdef USE_LONG_DOUBLE
848
+ /* from float.h, sets tolerance for cl1 routine */
849
+ ineq_tol = pow((long double) 10, (long double) -LDBL_DIG);
850
+ #elif NPP
851
+ // appt:
852
+ ineq_tol = pow((double) 10, (double) -DBL_DIG + 2);
853
+ #else
854
+ ineq_tol = pow((double) 10, (double) -DBL_DIG);
855
+ #endif
856
+ convergence_tolerance = 1e-8;
857
+ step_size = 100.;
858
+ pe_step_size = 10.;
859
+ step_size_now = step_size;
860
+ pe_step_size_now = pe_step_size;
861
+ pp_scale = 1.0;
862
+ pp_column_scale = 1.0;
863
+ diagonal_scale = FALSE;
864
+ mass_water_switch = FALSE;
865
+ delay_mass_water = FALSE;
866
+ equi_delay = 0;
867
+ dampen_ah2o = false;
868
+ censor = 0.0;
869
+ aqueous_only = 0;
870
+ negative_concentrations = FALSE;
871
+ calculating_deriv = FALSE;
872
+ numerical_deriv = FALSE;
873
+ count_total_steps = 0;
874
+ phast = FALSE;
875
+ output_newline = true;
876
+ //selected_output_file_name = NULL;
877
+ dump_file_name = NULL;
878
+ remove_unstable_phases = FALSE;
879
+ // auto screen_string;
880
+ spread_length = 10;
881
+ /* ----------------------------------------------------------------------
882
+ * ISOTOPES
883
+ * ---------------------------------------------------------------------- */
884
+ initial_solution_isotopes = FALSE;
885
+
886
+ phreeqc_mpi_myself = 0;
887
+ first_read_input = TRUE;
888
+ print_density = 0;
889
+ print_viscosity = 0;
890
+ cell_pore_volume = 0;
891
+ cell_volume = 0;
892
+ cell_porosity = 0;
893
+ cell_saturation = 0;
894
+ sys_tot = 0;
895
+
896
+ V_solutes = 0.0;
897
+ viscos = 0.0;
898
+ viscos_0 = 0.0;
899
+ viscos_0_25 = 0.0;
900
+ density_x = 0.0;
901
+ rho_0 = 0.0;
902
+ kappa_0 = 0.0;
903
+ p_sat = 0.0;
904
+ eps_r = EPSILON;
905
+ DH_A = 0.0;
906
+ DH_B = 0.0;
907
+ DH_Av = 0.0;
908
+ QBrn = 0.0;
909
+ ZBrn = 0.0;
910
+ dgdP = 0.0;
911
+
912
+ need_temp_msg = 0;
913
+ solution_mass = 0;
914
+ solution_volume = 0;
915
+ /* phqalloc.cpp ------------------------------- */
916
+ s_pTail = NULL;
917
+ /* Basic */
918
+ //basic_interpreter = NULL;
919
+ basic_callback_ptr = NULL;
920
+ basic_callback_cookie = NULL;
921
+ basic_fortran_callback_ptr = NULL;
922
+
923
+ #ifdef SKIP
924
+ /* dw.cpp ------------------------------- */
925
+ /* COMMON /QQQQ/ */
926
+ Q0 = 0;
927
+ Q5 = 0;
928
+ GASCON = 0.461522e0;
929
+ TZ = 647.073e0;
930
+ AA = 1.e0;
931
+ Z = 0;
932
+ DZ = 0;
933
+ Y = 0;
934
+ G1 = 11.e0;
935
+ G2 = 44.333333333333e0;
936
+ GF = 3.5e0;
937
+ B1 = 0;
938
+ B2 = 0;
939
+ B1T = 0;
940
+ B2T = 0;
941
+ B1TT = 0;
942
+ B2TT = 0;
943
+ #endif
944
+ /* gases.cpp ------------------------------- */
945
+ a_aa_sum = 0;
946
+ b2 = 0;
947
+ b_sum = 0;
948
+ R_TK = 0;
949
+ /* input.cpp ------------------------------- */
950
+ check_line_return = 0;
951
+ reading_db = FALSE;
952
+ /* integrate.cpp ------------------------------- */
953
+ midpoint_sv = 0;
954
+ z_global = 0;
955
+ xd_global = 0;
956
+ alpha_global = 0;
957
+ /* integrate.cpp ------------------------------- */
958
+ max_row_count = 50;
959
+ max_column_count = 50;
960
+ carbon = FALSE;
961
+ count_rows = 0;
962
+ count_optimize = 0;
963
+ col_phases = 0;
964
+ col_redox = 0;
965
+ col_epsilon = 0;
966
+ col_ph = 0;
967
+ col_water = 0;
968
+ col_isotopes = 0;
969
+ col_phase_isotopes = 0;
970
+ row_mb = 0;
971
+ row_fract = 0;
972
+ row_charge = 0;
973
+ row_carbon = 0;
974
+ row_isotopes = 0;
975
+ row_epsilon = 0;
976
+ row_isotope_epsilon = 0;
977
+ row_water = 0;
978
+ klmd = 0;
979
+ nklmd = 0;
980
+ n2d = 0;
981
+ kode = 0;
982
+ iter = 0;
983
+ toler = 0;
984
+ error = 0;
985
+ max_pct = 0;
986
+ scaled_error = 0;
987
+ master_alk = NULL;
988
+ max_good = 0;
989
+ max_bad = 0;
990
+ max_minimal = 0;
991
+ count_good = 0;
992
+ count_bad = 0;
993
+ count_minimal = 0;
994
+ count_calls = 0;
995
+ soln_bits = 0;
996
+ phase_bits = 0;
997
+ current_bits = 0;
998
+ temp_bits = 0;
999
+ netpath_file = NULL;
1000
+ count_inverse_models = 0;
1001
+ count_pat_solutions = 0;
1002
+ for (int i = 0; i < 32; i++)
1003
+ {
1004
+ min_position[i] = 0;
1005
+ max_position[i] = 0;
1006
+ now[i] = 0;
1007
+ }
1008
+ /* kinetics.cpp ------------------------------- */
1009
+ count_pp = count_pg = count_ss = 0;
1010
+ cvode_kinetics_ptr = NULL;
1011
+ cvode_test = FALSE;
1012
+ cvode_error = FALSE;
1013
+ cvode_n_user = -99;
1014
+ cvode_n_reactions = -99;
1015
+ cvode_step_fraction = 0.0;
1016
+ cvode_rate_sim_time = 0.0;
1017
+ cvode_rate_sim_time_start = 0.0;
1018
+ cvode_last_good_time = 0.0;
1019
+ cvode_prev_good_time = 0.0;
1020
+ cvode_last_good_y = NULL;
1021
+ cvode_prev_good_y = NULL;
1022
+ kinetics_machEnv = NULL;
1023
+ kinetics_y = NULL;
1024
+ kinetics_abstol = NULL;
1025
+ kinetics_cvode_mem = NULL;
1026
+ cvode_pp_assemblage_save= NULL;
1027
+ cvode_ss_assemblage_save= NULL;
1028
+ set_and_run_attempt = 0;
1029
+ /* model.cpp ------------------------------- */
1030
+ gas_in = FALSE;
1031
+ min_value = 1e-10;
1032
+
1033
+ /* phrq_io_output.cpp ------------------------------- */
1034
+ forward_output_to_log = 0;
1035
+ /* phreeqc_files.cpp ------------------------------- */
1036
+ #ifdef NPP
1037
+ default_data_base = "c:\\phreeqc\\database\\phreeqc.dat";
1038
+ #else
1039
+ default_data_base = "phreeqc.dat";
1040
+ #endif
1041
+ /* Pitzer */
1042
+ pitzer_model = FALSE;
1043
+ sit_model = FALSE;
1044
+ pitzer_pe = FALSE;
1045
+ full_pitzer = FALSE;
1046
+ always_full_pitzer = FALSE;
1047
+ ICON = TRUE;
1048
+ IC = -1;
1049
+ COSMOT = 0;
1050
+ AW = 0;
1051
+ VP = 0;
1052
+ DW0 = 0;
1053
+ // auto pitz_param_map
1054
+ use_etheta = TRUE;
1055
+ OTEMP = -100.;
1056
+ OPRESS = -100.;
1057
+ A0 = 0;
1058
+ cations = NULL;
1059
+ anions = NULL;
1060
+ neutrals = NULL;
1061
+ count_cations = 0;
1062
+ count_anions = 0;
1063
+ count_neutrals = 0;
1064
+ MAXCATIONS = 0;
1065
+ FIRSTANION = 0;
1066
+ MAXNEUTRAL = 0;
1067
+ mcb0 = NULL;
1068
+ mcb1 = NULL;
1069
+ mcc0 = NULL;
1070
+ for (int i = 0; i < 23; i++)
1071
+ {
1072
+ BK[i] = 0.0;
1073
+ DK[i] = 0.0;
1074
+ }
1075
+ dummy = 0;
1076
+ /* print.cpp ------------------------------- */
1077
+ if (sformatf_buffer != NULL)
1078
+ {
1079
+ sformatf_buffer = (char*)free_check_null(sformatf_buffer);
1080
+ }
1081
+ sformatf_buffer = (char *) PHRQ_calloc(256 , sizeof(char));
1082
+ if (sformatf_buffer == NULL)
1083
+ malloc_error();
1084
+ sformatf_buffer_size = 256;
1085
+ /* read.cpp */
1086
+ prev_next_char = NULL;
1087
+ #if defined PHREEQ98
1088
+ int shifts_as_points;
1089
+ #endif
1090
+ /* read_class.cxx */
1091
+ // auto dump_info
1092
+ // auto delete_info
1093
+ // auto run_info
1094
+ run_info.Set_io(phrq_io);
1095
+ /* readtr.cpp */
1096
+ // auto dump_file_name_cpp;
1097
+ /* sit.cpp ------------------------------- */
1098
+
1099
+ sit_A0 = 0;
1100
+ sit_count_cations = 0;
1101
+ sit_count_anions = 0;
1102
+ sit_count_neutrals = 0;
1103
+ sit_MAXCATIONS = 0;
1104
+ sit_FIRSTANION = 0;
1105
+ sit_MAXNEUTRAL = 0;
1106
+ /* tidy.cpp ------------------------------- */
1107
+ a0 = 0;
1108
+ a1 = 0;
1109
+ kc = 0;
1110
+ kb = 0;
1111
+ /* tally.cpp ------------------------------- */
1112
+ t_buffer = NULL;
1113
+ tally_count_component = 0;
1114
+ //tally_table = NULL;
1115
+ count_tally_table_columns = 0;
1116
+ count_tally_table_rows = 0;
1117
+ /* transport.cpp ------------------------------- */
1118
+ sol_D = NULL;
1119
+ sol_D_dbg = NULL;
1120
+ J_ij = NULL;
1121
+ J_ij_il = NULL;
1122
+ J_ij_count_spec = 0;
1123
+ m_s = NULL;
1124
+ count_m_s = 0;
1125
+ tot1_h = 0;
1126
+ tot1_o = 0;
1127
+ tot2_h = 0;
1128
+ tot2_o = 0;
1129
+ diffc_max = 0;
1130
+ diffc_tr = 0;
1131
+ J_ij_sum = 0;
1132
+ transp_surf = FALSE;
1133
+ heat_mix_array = NULL;
1134
+ temp1 = NULL;
1135
+ temp2 = NULL;
1136
+ nmix = 0;
1137
+ heat_nmix = 0;
1138
+ heat_mix_f_imm = 0;
1139
+ heat_mix_f_m = 0;
1140
+ warn_MCD_X = 0;
1141
+ warn_fixed_Surf = 0;
1142
+ /* utilities.cpp ------------------------------- */
1143
+ spinner = 0;
1144
+ // keycount;
1145
+ keycount.resize(Keywords::KEY_COUNT_KEYWORDS);
1146
+ for (int i = 0; i < Keywords::KEY_COUNT_KEYWORDS; i++)
1147
+ {
1148
+ keycount[i] = 0;
1149
+ }
1150
+
1151
+ return;
1152
+ }
1153
+ /*-----------------------------------------------------*/
1154
+ Phreeqc::Phreeqc(const Phreeqc &src)
1155
+ {
1156
+ user_print = NULL;
1157
+ sformatf_buffer = NULL;
1158
+ basic_interpreter = NULL;
1159
+ count_elts = 0;
1160
+ aphi = NULL;
1161
+ //this->phrq_io = src.phrq_io;
1162
+ this->phrq_io = &this->ioInstance;
1163
+ this->init();
1164
+ this->initialize();
1165
+ InternalCopy(&src);
1166
+ }
1167
+ void
1168
+ Phreeqc::InternalCopy(const Phreeqc* pSrc)
1169
+ {
1170
+ // phrq_io
1171
+ //this->phrq_io = new PHRQ_io;
1172
+ same_model = FALSE;
1173
+ current_tc = pSrc->current_tc;
1174
+ current_pa = pSrc->current_pa;
1175
+ current_mu = pSrc->current_mu;
1176
+ mu_terms_in_logk = pSrc->mu_terms_in_logk;
1177
+
1178
+ /* ----------------------------------------------------------------------
1179
+ * STRUCTURES
1180
+ * ---------------------------------------------------------------------- */
1181
+ //last_model, accept init
1182
+ high_precision = pSrc->high_precision;
1183
+ // Maps
1184
+ Rxn_temperature_map = pSrc->Rxn_temperature_map;
1185
+ Rxn_pressure_map = pSrc->Rxn_pressure_map;
1186
+ g_iterations = -1;
1187
+ G_TOL = pSrc->G_TOL;
1188
+ Rxn_surface_map = pSrc->Rxn_surface_map;
1189
+ change_surf_count = pSrc->change_surf_count;
1190
+ change_surf = change_surf_alloc(change_surf_count + 1);
1191
+ for (int ii = 0; ii < change_surf_count; ii++)
1192
+ {
1193
+ change_surf[ii].comp_name = string_hsave(pSrc->change_surf[ii].comp_name);
1194
+ change_surf[ii].fraction = pSrc->change_surf[ii].fraction;
1195
+ change_surf[ii].new_comp_name = string_hsave(pSrc->change_surf[ii].new_comp_name);
1196
+ change_surf[ii].new_Dw = pSrc->change_surf[ii].new_Dw;
1197
+ change_surf[ii].cell_no = pSrc->change_surf[ii].cell_no;
1198
+ change_surf[ii].next = pSrc->change_surf[ii].next;
1199
+ }
1200
+ Rxn_exchange_map = pSrc->Rxn_exchange_map;
1201
+ Rxn_kinetics_map = pSrc->Rxn_kinetics_map;
1202
+ use_kinetics_limiter = pSrc->use_kinetics_limiter;
1203
+ save_values = pSrc->save_values;
1204
+ save_strings = pSrc->save_strings;
1205
+ save = pSrc->save;
1206
+ //class copier copy_solution;
1207
+ //class copier copy_pp_assemblage;
1208
+ //class copier copy_exchange;
1209
+ //class copier copy_surface;
1210
+ //class copier copy_ss_assemblage;
1211
+ //class copier copy_gas_phase;
1212
+ //class copier copy_kinetics;
1213
+ //class copier copy_mix;
1214
+ //class copier copy_reaction;
1215
+ //class copier copy_temperature;
1216
+ //class copier copy_pressure;
1217
+ // Inverse not implemented
1218
+ //std::vector<class inverse> inverse;
1219
+ count_inverse = 0;
1220
+ /* rate parameters */
1221
+ rate_parameters_pk = pSrc->rate_parameters_pk;
1222
+ rate_parameters_svd = pSrc->rate_parameters_svd;
1223
+ rate_parameters_hermanska = pSrc->rate_parameters_hermanska;
1224
+ // Mean gammas
1225
+ mean_gammas = pSrc->mean_gammas;
1226
+ // Mix
1227
+ Rxn_mix_map = pSrc->Rxn_mix_map;
1228
+ Dispersion_mix_map = pSrc->Dispersion_mix_map;
1229
+ Rxn_solution_mix_map = pSrc->Rxn_solution_mix_map;
1230
+ Rxn_exchange_mix_map = pSrc->Rxn_exchange_mix_map;
1231
+ Rxn_gas_phase_mix_map = pSrc->Rxn_gas_phase_mix_map;
1232
+ Rxn_kinetics_mix_map = pSrc->Rxn_kinetics_mix_map;
1233
+ Rxn_pp_assemblage_mix_map = pSrc->Rxn_pp_assemblage_mix_map;
1234
+ Rxn_ss_assemblage_mix_map = pSrc->Rxn_ss_assemblage_mix_map;
1235
+ Rxn_surface_mix_map = pSrc->Rxn_surface_mix_map;
1236
+ //List new definitions
1237
+ //std::set<int> Rxn_new_exchange;
1238
+ //std::set<int> Rxn_new_gas_phase;
1239
+ //std::set<int> Rxn_new_kinetics; // not used
1240
+ //std::set<int> Rxn_new_mix; // not used
1241
+ //std::set<int> Rxn_new_pp_assemblage;
1242
+ //std::set<int> Rxn_new_pressure; // not used
1243
+ //std::set<int> Rxn_new_reaction; // not used
1244
+ //std::set<int> Rxn_new_solution;
1245
+ //std::set<int> Rxn_new_ss_assemblage;
1246
+ //std::set<int> Rxn_new_surface;
1247
+ //std::set<int> Rxn_new_temperature; // not used
1248
+ Rxn_reaction_map = pSrc->Rxn_reaction_map;
1249
+ Rxn_gas_phase_map = pSrc->Rxn_gas_phase_map;
1250
+ Rxn_ss_assemblage_map = pSrc->Rxn_ss_assemblage_map;
1251
+ Rxn_pp_assemblage_map = pSrc->Rxn_pp_assemblage_map;
1252
+
1253
+ std::vector<class species_list> species_list;
1254
+ // will be rebuilt
1255
+ //std::vector<class list0> sum_jacob0;
1256
+ //std::vector<class list1> sum_mb1;
1257
+ //std::vector<class list1> sum_jacob1;
1258
+ //std::vector<class list2> sum_mb2;
1259
+ //std::vector<class list2> sum_jacob2;
1260
+ //std::vector<class list2> sum_delta;
1261
+ // Solution
1262
+ Rxn_solution_map = pSrc->Rxn_solution_map;
1263
+ unnumbered_solutions = pSrc->unnumbered_solutions;
1264
+ save_species = pSrc->save_species;
1265
+ // Global solution
1266
+ title_x = pSrc->title_x;
1267
+ last_title_x = pSrc->last_title_x;
1268
+ //new_x = FALSE;
1269
+ description_x = pSrc->description_x;
1270
+ //new_x = FALSE;
1271
+ description_x = pSrc->description_x;
1272
+ //tc_x = 0;
1273
+ //tk_x = 0;
1274
+ //patm_x = 1;
1275
+ //last_patm_x = 1;
1276
+ //numerical_fixed_volume = false;
1277
+ //force_numerical_fixed_volume = false;
1278
+ //ph_x = 0;
1279
+ //solution_pe_x = 0;
1280
+ //mu_x = 0;
1281
+ //ah2o_x = 1.0;
1282
+ //density_x = 0;
1283
+ //total_h_x = 0;
1284
+ //total_o_x = 0;
1285
+ //cb_x = 0;
1286
+ //total_ions_x = 0;
1287
+ //mass_water_aq_x = 0;
1288
+ //mass_water_surfaces_x = 0;
1289
+ //mass_water_bulk_x = 0;
1290
+ //units_x
1291
+ //pe_x
1292
+ //isotopes_x
1293
+ //default_pe_x
1294
+ //dl_type_x = cxxSurface::NO_DL;
1295
+ //total_carbon = 0;
1296
+ //total_co2 = 0;
1297
+ //total_alkalinity = 0;
1298
+ gfw_water = pSrc->gfw_water;
1299
+ //step_x = 0;
1300
+ //kin_time_x = 0;
1301
+ // Transport data
1302
+ count_cells = pSrc->count_cells;
1303
+ count_shifts = pSrc->count_shifts;
1304
+ ishift = pSrc->ishift;
1305
+ bcon_first = pSrc->bcon_first;
1306
+ bcon_last = pSrc->bcon_last;
1307
+ correct_disp = pSrc->correct_disp;
1308
+ tempr = pSrc->tempr;
1309
+ timest = pSrc->timest;
1310
+ simul_tr = pSrc->simul_tr;
1311
+ diffc = pSrc->diffc;
1312
+ heat_diffc = pSrc->heat_diffc;
1313
+ cell = pSrc->cell;
1314
+ mcd_substeps = pSrc->mcd_substeps;
1315
+ stag_data = pSrc->stag_data;
1316
+ print_modulus = pSrc->print_modulus;
1317
+ punch_modulus = pSrc->punch_modulus;
1318
+ dump_in = pSrc->dump_in;
1319
+ dump_modulus = pSrc->dump_modulus;
1320
+ transport_warnings = pSrc->transport_warnings;
1321
+ // cell_data
1322
+ cell_data = pSrc->cell_data;
1323
+ old_cells = pSrc->old_cells;
1324
+ max_cells = pSrc->max_cells;
1325
+ if (stag_data.count_stag > 0)
1326
+ {
1327
+ max_cells = (max_cells - 2) / (1 + stag_data.count_stag);
1328
+ }
1329
+ all_cells = pSrc->all_cells;
1330
+ max_cells = pSrc->max_cells;
1331
+ multi_Dflag = pSrc->multi_Dflag;
1332
+ interlayer_Dflag = pSrc->interlayer_Dflag;
1333
+ implicit = pSrc->implicit;
1334
+ max_mixf = pSrc->max_mixf;
1335
+ min_dif_LM = pSrc->min_dif_LM;
1336
+ default_Dw = pSrc->default_Dw;
1337
+ correct_Dw = pSrc->correct_Dw;
1338
+ multi_Dpor = pSrc->multi_Dpor;
1339
+ interlayer_Dpor = pSrc->interlayer_Dpor;
1340
+ multi_Dpor_lim = pSrc->multi_Dpor_lim;
1341
+ interlayer_Dpor_lim = pSrc->interlayer_Dpor_lim;
1342
+ multi_Dn = pSrc->multi_Dn;
1343
+ interlayer_tortf = pSrc->interlayer_tortf;
1344
+ cell_no = pSrc->cell_no;
1345
+ mixrun = pSrc->mixrun;
1346
+ // Advection data
1347
+ count_ad_cells = pSrc->count_ad_cells;
1348
+ count_ad_shifts = pSrc->count_ad_shifts;
1349
+ print_ad_modulus = pSrc->print_ad_modulus;
1350
+ punch_ad_modulus = pSrc->punch_ad_modulus;
1351
+ advection_punch = pSrc->advection_punch;
1352
+ advection_print = pSrc->advection_print;
1353
+ advection_kin_time = pSrc->advection_kin_time;
1354
+ advection_kin_time_defined = pSrc->advection_kin_time_defined;
1355
+ advection_warnings = pSrc->advection_warnings;
1356
+ // Tidy data
1357
+ new_model = TRUE;
1358
+ new_exchange = FALSE;
1359
+ new_pp_assemblage = FALSE;
1360
+ new_surface = FALSE;
1361
+ new_reaction = FALSE;
1362
+ new_temperature = FALSE;
1363
+ new_mix = FALSE;
1364
+ new_solution = FALSE;
1365
+ new_gas_phase = FALSE;
1366
+ new_inverse = FALSE;
1367
+ new_punch = FALSE;
1368
+ new_ss_assemblage = FALSE;
1369
+ new_kinetics = FALSE;
1370
+ new_copy = FALSE;
1371
+ new_pitzer = FALSE;
1372
+ // Elements
1373
+ for (int i = 0; i < (int)pSrc->elements.size(); i++)
1374
+ {
1375
+ const char* ptr = string_hsave(pSrc->elements[i]->name);
1376
+ class element* elt_ptr = element_store(ptr);
1377
+ elt_ptr->gfw = pSrc->elements[i]->gfw;
1378
+ }
1379
+ element_h_one = element_store("H(1)");
1380
+ // Element List
1381
+ count_elts = 0;
1382
+ // Reaction
1383
+ run_cells_one_step = pSrc->run_cells_one_step;
1384
+ //// logk
1385
+ //logk.clear();
1386
+ //for (size_t i = 0; i < pSrc->logk.size(); i++)
1387
+ //{
1388
+ // class logk* tlk = new class logk;
1389
+ // *tlk = *pSrc->logk[i];
1390
+ // tlk->name = string_hsave(pSrc->logk[i]->name);
1391
+ // logk.push_back(tlk);
1392
+ //}
1393
+ for (int i = 0; i < (int)pSrc->logk.size(); i++)
1394
+ {
1395
+ class logk* logk_ptr = logk_store(pSrc->logk[i]->name, FALSE);
1396
+ //memcpy(logk_ptr, pSrc->logk[i], sizeof(class logk));
1397
+ *logk_ptr = *pSrc->logk[i];
1398
+ logk_ptr->name = string_hsave(pSrc->logk[i]->name);
1399
+ logk_ptr->add_logk.resize(pSrc->logk[i]->add_logk.size());
1400
+ for (size_t j = 0; j < logk_ptr->add_logk.size(); j++)
1401
+ {
1402
+ logk_ptr->add_logk[j].coef = pSrc->logk[i]->add_logk[j].coef;
1403
+ logk_ptr->add_logk[j].name = string_hsave(pSrc->logk[i]->add_logk[j].name);
1404
+ }
1405
+ }
1406
+ // s, species
1407
+ for (int i = 0; i < (int)pSrc->s.size(); i++)
1408
+ {
1409
+ class species* s_ptr = s_store(pSrc->s[i]->name, pSrc->s[i]->z, FALSE);
1410
+ //memcpy(s_ptr, pSrc->s[i], sizeof(class species));
1411
+ *s_ptr = *pSrc->s[i];
1412
+ // fix up all pointers
1413
+ s_ptr->name = string_hsave(pSrc->s[i]->name);
1414
+ s_ptr->mole_balance = NULL;
1415
+ if (pSrc->s[i]->mole_balance != NULL)
1416
+ {
1417
+ s_ptr->mole_balance = string_hsave(pSrc->s[i]->mole_balance);
1418
+ }
1419
+ s_ptr->primary = NULL;
1420
+ s_ptr->secondary = NULL;
1421
+ s_ptr->add_logk.resize(pSrc->s[i]->add_logk.size());
1422
+ for (size_t j = 0; j < s_ptr->add_logk.size(); j++)
1423
+ {
1424
+ s_ptr->add_logk[j].coef = pSrc->s[i]->add_logk[j].coef;
1425
+ s_ptr->add_logk[j].name = string_hsave(pSrc->s[i]->add_logk[j].name);
1426
+ }
1427
+ //next_elt
1428
+ s_ptr->next_elt = elt_list_internal_copy(pSrc->s[i]->next_elt);
1429
+ s_ptr->next_secondary = elt_list_internal_copy(pSrc->s[i]->next_secondary);
1430
+ s_ptr->next_sys_total = elt_list_internal_copy(pSrc->s[i]->next_sys_total);
1431
+ //rxn
1432
+ s_ptr->rxn = CReaction_internal_copy(pSrc->s[i]->rxn);
1433
+ s_ptr->rxn_s = CReaction_internal_copy(pSrc->s[i]->rxn_s);
1434
+ s_ptr->rxn_x = CReaction_internal_copy(pSrc->s[i]->rxn_x);
1435
+ }
1436
+ s_diff_layer = pSrc->s_diff_layer;
1437
+ //s_x will be built
1438
+ s_h2o = s_search("H2O");
1439
+ s_hplus = s_search("H+");
1440
+ s_h3oplus = s_search("H3O+");
1441
+ s_eminus = s_search("e-");
1442
+ s_co3 = s_search("CO3-2");
1443
+ s_h2 = s_search("H2");
1444
+ s_o2 = s_search("O2");
1445
+ /*----------------------------------------------------------------------
1446
+ * Phases
1447
+ *---------------------------------------------------------------------- */
1448
+ for (int i = 0; i < (int)pSrc->phases.size(); i++)
1449
+ {
1450
+ class phase* phase_ptr = phase_store(pSrc->phases[i]->name);
1451
+ //memcpy(phase_ptr, pSrc->phases[i], sizeof(class phase));
1452
+ *phase_ptr = *pSrc->phases[i];
1453
+ // clean up pointers
1454
+ phase_ptr->name = string_hsave(pSrc->phases[i]->name);
1455
+ phase_ptr->formula = string_hsave(pSrc->phases[i]->formula);
1456
+ //add_logk
1457
+ phase_ptr->add_logk.resize(pSrc->phases[i]->add_logk.size());
1458
+ for (size_t j = 0; j < phase_ptr->add_logk.size(); j++)
1459
+ {
1460
+ phase_ptr->add_logk[j].coef = pSrc->phases[i]->add_logk[j].coef;
1461
+ phase_ptr->add_logk[j].name = string_hsave(pSrc->phases[i]->add_logk[j].name);
1462
+ }
1463
+ //next_elt
1464
+ phase_ptr->next_elt = elt_list_internal_copy(pSrc->phases[i]->next_elt);
1465
+ phase_ptr->next_sys_total = elt_list_internal_copy(pSrc->phases[i]->next_sys_total);
1466
+ //rxn
1467
+ phase_ptr->rxn = CReaction_internal_copy(pSrc->phases[i]->rxn);
1468
+ phase_ptr->rxn_s = CReaction_internal_copy(pSrc->phases[i]->rxn_s);
1469
+ phase_ptr->rxn_x = CReaction_internal_copy(pSrc->phases[i]->rxn_x);
1470
+ }
1471
+ // Master species
1472
+ for (size_t i = 0; i < pSrc->master.size(); i++)
1473
+ {
1474
+ master.resize(i + 1);
1475
+ master[i] = new class master;
1476
+ //memcpy(master[i], pSrc->master[i], sizeof(class master));
1477
+ *master[i] = *pSrc->master[i];
1478
+ // clean up pointers
1479
+ master[i]->gfw_formula = string_hsave(pSrc->master[i]->gfw_formula);
1480
+ master[i]->elt = element_store(pSrc->master[i]->elt->name);
1481
+ master[i]->unknown = NULL;
1482
+ master[i]->s = s_store(pSrc->master[i]->s->name, pSrc->master[i]->s->z, FALSE);
1483
+ //rxn_primary
1484
+ master[i]->rxn_primary = CReaction_internal_copy(pSrc->master[i]->rxn_primary);
1485
+ master[i]->rxn_secondary = CReaction_internal_copy(pSrc->master[i]->rxn_secondary);
1486
+ }
1487
+ // Unknowns will be built
1488
+ //x = NULL;
1489
+ //count_unknowns = 0;
1490
+ //max_unknowns = 0;
1491
+ //ah2o_unknown = NULL;
1492
+ //alkalinity_unknown = NULL;
1493
+ //carbon_unknown = NULL;
1494
+ //charge_balance_unknown = NULL;
1495
+ //exchange_unknown = NULL;
1496
+ //mass_hydrogen_unknown = NULL;
1497
+ //mass_oxygen_unknown = NULL;
1498
+ //mb_unknown = NULL;
1499
+ //mu_unknown = NULL;
1500
+ //pe_unknown = NULL;
1501
+ //ph_unknown = NULL;
1502
+ //pure_phase_unknown = NULL;
1503
+ //solution_phase_boundary_unknown = NULL;
1504
+ //surface_unknown = NULL;
1505
+ //gas_unknown = NULL;
1506
+ //ss_unknown = NULL;
1507
+ //gas_unknowns;
1508
+ //mb_unknowns
1509
+ // Reaction work space
1510
+ // class reaction_temp trxn;
1511
+ count_trxn = 0;
1512
+ // Print
1513
+ pr = pSrc->pr;
1514
+ status_on = pSrc->status_on;
1515
+ status_interval = pSrc->status_interval;
1516
+ status_timer = clock();
1517
+ status_string.clear();
1518
+ count_warnings = 0;
1519
+ // RATES
1520
+ //rates = pSrc->rates;
1521
+ for (size_t i = 0; i < pSrc->rates.size(); i++)
1522
+ {
1523
+ rates.push_back(*rate_copy(&pSrc->rates[i]));
1524
+ }
1525
+ //rate_m = 0;
1526
+ //rate_m0 = 0;
1527
+ //rate_time = 0;
1528
+ //rate_kin_time = 1.0;
1529
+ //rate_sim_time_start = 0;
1530
+ //rate_sim_time_end = 0;
1531
+ //rate_sim_time = 0;
1532
+ //rate_moles = 0;
1533
+ initial_total_time = pSrc->initial_total_time;
1534
+ //rate_p
1535
+ count_rate_p = 0;
1536
+ // User print
1537
+ user_print = rate_copy(pSrc->user_print);
1538
+ // For now, User Punch is NOT copied
1539
+ n_user_punch_index = pSrc->n_user_punch_index;
1540
+ fpunchf_user_s_warning = pSrc->fpunchf_user_s_warning;
1541
+ //fpunchf_user_buffer[0] = 0;
1542
+ #if defined MULTICHART
1543
+ // auto chart_handler;
1544
+ chart_handler.Set_io(phrq_io);
1545
+ #endif
1546
+ /* ----------------------------------------------------------------------
1547
+ * GLOBAL DECLARATIONS
1548
+ * ---------------------------------------------------------------------- */
1549
+ error_string = NULL;
1550
+ simulation = pSrc->simulation;
1551
+ //state = INITIALIZE;
1552
+ //reaction_step = 0;
1553
+ //transport_step = 0;
1554
+ //transport_start = 0;
1555
+ //advection_step = 0;
1556
+ //stop_program = FALSE;
1557
+ incremental_reactions = pSrc->incremental_reactions;
1558
+ // Constants
1559
+ MIN_LM = pSrc->MIN_LM; /* minimum log molality allowed before molality set to zero */
1560
+ LOG_ZERO_MOLALITY = pSrc->LOG_ZERO_MOLALITY; /* molalities <= LOG_ZERO_MOLALITY are considered equal to zero */
1561
+ MIN_RELATED_LOG_ACTIVITY = pSrc->MIN_RELATED_LOG_ACTIVITY;
1562
+ MIN_TOTAL = pSrc->MIN_TOTAL;
1563
+ MIN_TOTAL_SS = pSrc->MIN_TOTAL_SS;
1564
+ MIN_RELATED_SURFACE = pSrc->MIN_RELATED_SURFACE;
1565
+ simulation = pSrc->simulation;
1566
+ //my_array,
1567
+ //delta,
1568
+ //residual
1569
+ input_error = 0;
1570
+ next_keyword = Keywords::KEY_NONE;
1571
+ parse_error = 0;
1572
+ paren_count = 0;
1573
+ iterations = 0;
1574
+ gamma_iterations = 0;
1575
+ density_iterations = 0;
1576
+ run_reactions_iterations = 0;
1577
+ overall_iterations = 0;
1578
+ free_check_null(line);
1579
+ free_check_null(line_save);
1580
+ max_line = pSrc->max_line;
1581
+ line = (char*)PHRQ_malloc(max_line * sizeof(char));
1582
+ line_save = (char*)PHRQ_malloc(max_line * sizeof(char));
1583
+ LOG_10 = pSrc->LOG_10;
1584
+ // Debug
1585
+ debug_model = pSrc->debug_model;
1586
+ debug_prep = pSrc->debug_prep;
1587
+ debug_set = pSrc->debug_set;
1588
+ debug_diffuse_layer = pSrc->debug_diffuse_layer;
1589
+ debug_inverse = pSrc->debug_inverse;
1590
+ //
1591
+ inv_tol_default = pSrc->inv_tol_default;
1592
+ itmax = pSrc->itmax;
1593
+ max_tries = pSrc->max_tries;
1594
+ ineq_tol = pSrc->ineq_tol;
1595
+ convergence_tolerance = pSrc->convergence_tolerance;
1596
+ step_size = pSrc->step_size;
1597
+ pe_step_size = pSrc->pe_step_size;
1598
+ step_size_now = step_size;
1599
+ pe_step_size_now = pe_step_size;
1600
+ pp_scale = pSrc->pp_scale;
1601
+ pp_column_scale = pSrc->pp_column_scale;
1602
+ diagonal_scale = pSrc->diagonal_scale;
1603
+ mass_water_switch = pSrc->mass_water_switch;
1604
+ delay_mass_water = pSrc->delay_mass_water;
1605
+ equi_delay = pSrc->equi_delay;
1606
+ dampen_ah2o = pSrc->dampen_ah2o;
1607
+ censor = pSrc->censor;
1608
+ aqueous_only = pSrc->aqueous_only;
1609
+ negative_concentrations = pSrc->negative_concentrations;
1610
+ calculating_deriv = pSrc->calculating_deriv;
1611
+ numerical_deriv = pSrc->numerical_deriv;
1612
+ count_total_steps = 0;
1613
+ phast = FALSE;
1614
+ output_newline = true;
1615
+ // llnl
1616
+ a_llnl = pSrc->a_llnl;
1617
+ b_llnl = pSrc->b_llnl;
1618
+ bdot_llnl = pSrc->bdot_llnl;
1619
+ llnl_temp = pSrc->llnl_temp;
1620
+ llnl_adh = pSrc->llnl_adh;
1621
+ llnl_bdh = pSrc->llnl_bdh;
1622
+ llnl_bdot = pSrc->llnl_bdot;
1623
+ llnl_co2_coefs = pSrc->llnl_co2_coefs;
1624
+
1625
+ // Not implemented for now
1626
+ SelectedOutput_map = pSrc->SelectedOutput_map;
1627
+ {
1628
+ std::map<int, SelectedOutput>::iterator it = SelectedOutput_map.begin();
1629
+ for (; it != SelectedOutput_map.end(); it++)
1630
+ {
1631
+ //phrq_io->punch_open(it->second.Get_file_name().c_str());
1632
+ //it->second.Set_punch_ostream(phrq_io->Get_punch_ostream());
1633
+ //phrq_io->Set_punch_ostream(NULL);
1634
+ it->second.Set_punch_ostream(NULL);
1635
+ }
1636
+ }
1637
+ SelectedOutput_map.clear();
1638
+
1639
+ UserPunch_map = pSrc->UserPunch_map;
1640
+ std::map<int, UserPunch>::iterator it = UserPunch_map.begin();
1641
+ for (; it != UserPunch_map.end(); it++)
1642
+ {
1643
+ class rate* rate_new = new class rate;
1644
+ rate_new = rate_copy(it->second.Get_rate());
1645
+ it->second.Set_rate(rate_new);
1646
+ it->second.Set_PhreeqcPtr(this);
1647
+ }
1648
+
1649
+ remove_unstable_phases = FALSE;
1650
+ //screen_string;
1651
+ spread_length = pSrc->spread_length;
1652
+ //maps set by store below
1653
+ //std::map<std::string, std::string*> strings_map;
1654
+ //std::map<std::string, class element*> elements_map;
1655
+ //std::map<std::string, class species*> species_map;
1656
+ //std::map<std::string, class phase*> phases_map;
1657
+ //std::map<std::string, class logk*> logk_map;
1658
+ //std::map<std::string, class master_isotope*> master_isotope_map;
1659
+ /* ----------------------------------------------------------------------
1660
+ * ISOTOPES
1661
+ * ---------------------------------------------------------------------- */
1662
+ for (int i = 0; i < (int)pSrc->master_isotope.size(); i++)
1663
+ {
1664
+ class master_isotope* master_isotope_ptr = master_isotope_store(pSrc->master_isotope[i]->name, FALSE);
1665
+ // memcpy(master_isotope_ptr, pSrc->master_isotope[i], sizeof(class master_isotope));
1666
+ *master_isotope_ptr = *pSrc->master_isotope[i];
1667
+ master_isotope_ptr->name = string_hsave(pSrc->master_isotope[i]->name);
1668
+ int n;
1669
+ master_isotope_ptr->master = NULL;
1670
+ if (pSrc->master_isotope[i]->master)
1671
+ {
1672
+ master_isotope_ptr->master = master_search(pSrc->master_isotope[i]->master->elt->name, &n);
1673
+ }
1674
+ if (master_isotope_ptr->master == NULL)
1675
+ {
1676
+ //error_msg("Error in copy constructor for master_isotope.", STOP);
1677
+ }
1678
+ master_isotope_ptr->elt = NULL;
1679
+ if (pSrc->master_isotope[i]->elt)
1680
+ {
1681
+ master_isotope_ptr->elt = element_store(pSrc->master_isotope[i]->elt->name);
1682
+ }
1683
+ master_isotope_ptr->units = NULL;
1684
+ if (pSrc->master_isotope[i]->units)
1685
+ {
1686
+ master_isotope_ptr->units = string_hsave(pSrc->master_isotope[i]->units);
1687
+ }
1688
+ }
1689
+ initial_solution_isotopes = pSrc->initial_solution_isotopes;
1690
+ // Calculate values
1691
+ for (int i = 0; i < pSrc->calculate_value.size(); i++)
1692
+ {
1693
+ class calculate_value* calculate_value_ptr = calculate_value_store(pSrc->calculate_value[i]->name, FALSE);
1694
+ calculate_value_ptr->value = pSrc->calculate_value[i]->value;
1695
+ calculate_value[i]->commands = pSrc->calculate_value[i]->commands;
1696
+ }
1697
+ // More isotopes
1698
+ for (int i = 0; i < (int)pSrc->isotope_ratio.size(); i++)
1699
+ {
1700
+ class isotope_ratio* isotope_ratio_ptr = isotope_ratio_store(pSrc->isotope_ratio[i]->name, FALSE);
1701
+ isotope_ratio_ptr->name = string_hsave(pSrc->isotope_ratio[i]->name);
1702
+ isotope_ratio_ptr->isotope_name = string_hsave(pSrc->isotope_ratio[i]->isotope_name);
1703
+ isotope_ratio_ptr->ratio = pSrc->isotope_ratio[i]->ratio;
1704
+ isotope_ratio_ptr->converted_ratio = pSrc->isotope_ratio[i]->converted_ratio;
1705
+ }
1706
+ //std::map<std::string, class isotope_ratio*> isotope_ratio_map;
1707
+ for (int i = 0; i < (int)pSrc->isotope_alpha.size(); i++)
1708
+ {
1709
+ class isotope_alpha* isotope_alpha_ptr = isotope_alpha_store(pSrc->isotope_alpha[i]->name, FALSE);
1710
+ isotope_alpha_ptr->named_logk = string_hsave(pSrc->isotope_alpha[i]->named_logk);
1711
+ isotope_alpha_ptr->value = pSrc->isotope_alpha[i]->value;
1712
+ }
1713
+ //std::map<std::string, class isotope_alpha*> isotope_alpha_map;
1714
+ // Misc
1715
+ phreeqc_mpi_myself = 0;
1716
+ first_read_input = pSrc->first_read_input;
1717
+ user_database = pSrc->user_database;
1718
+ //have_punch_name = pSrc->have_punch_name;
1719
+ print_density = pSrc->print_density;
1720
+ print_viscosity = pSrc->print_viscosity;
1721
+ viscos = pSrc->viscos;
1722
+ viscos_0 = pSrc->viscos_0;
1723
+ viscos_0_25 = pSrc->viscos_0_25; // viscosity of the solution, of pure water, of pure water at 25 C
1724
+ density_x = pSrc->density_x;
1725
+ solution_volume_x = pSrc->solution_volume_x;
1726
+ solution_mass_x = pSrc->solution_mass_x;
1727
+ kgw_kgs = pSrc->kgw_kgs;
1728
+ cell_pore_volume = pSrc->cell_pore_volume;
1729
+ cell_porosity = pSrc->cell_porosity;
1730
+ cell_volume = pSrc->cell_volume;
1731
+ cell_saturation = pSrc->cell_saturation;
1732
+ sys.clear();
1733
+ sys_tot = pSrc->sys_tot;
1734
+ // solution properties
1735
+ V_solutes = pSrc->V_solutes;
1736
+ rho_0 = pSrc->rho_0;
1737
+ kappa_0 = pSrc->kappa_0;
1738
+ p_sat = pSrc->p_sat;
1739
+ eps_r = pSrc->eps_r;
1740
+ DH_A = pSrc->DH_A;
1741
+ DH_B = pSrc->DH_B;
1742
+ DH_Av = pSrc->DH_Av;
1743
+ QBrn = pSrc->QBrn;
1744
+ ZBrn = pSrc->ZBrn;
1745
+ dgdP = pSrc->dgdP;
1746
+ //
1747
+ need_temp_msg = pSrc->need_temp_msg;
1748
+ solution_mass = pSrc->solution_mass;
1749
+ solution_volume = pSrc->solution_volume;
1750
+ s_pTail = NULL;
1751
+ //basic_interpreter = NULL;
1752
+ /* cl1.cpp ------------------------------- */
1753
+ //std::vector<double> x_arg, res_arg, scratch;
1754
+ // gases.cpp
1755
+ a_aa_sum = pSrc->a_aa_sum;
1756
+ b2 = pSrc->b2;
1757
+ b_sum = pSrc->b_sum;
1758
+ R_TK = pSrc->R_TK;
1759
+ gas_binary_parameters = pSrc->gas_binary_parameters;
1760
+ /* input.cpp ------------------------------- */
1761
+ check_line_return = 0;
1762
+ reading_db = FALSE;
1763
+ /* integrate.cpp ------------------------------- */
1764
+ midpoint_sv = pSrc->midpoint_sv;
1765
+ z_global = pSrc->z_global;
1766
+ xd_global = pSrc->xd_global;
1767
+ alpha_global = pSrc->alpha_global;
1768
+ /* inverse.cpp ------------------------------- */ /* integrate.cpp ------------------------------- */
1769
+ max_row_count = pSrc->max_row_count;
1770
+ max_column_count = pSrc->max_column_count;
1771
+ carbon = pSrc->carbon;
1772
+ //std::vector<const char*> col_name, row_name;
1773
+ count_rows = pSrc->count_rows;
1774
+ count_optimize = pSrc->count_optimize;
1775
+ col_phases = pSrc->col_phases;
1776
+ col_redox = pSrc->col_redox;
1777
+ col_epsilon = pSrc->col_epsilon;
1778
+ col_ph = pSrc->col_ph;
1779
+ col_water = pSrc->col_water;
1780
+ col_isotopes = pSrc->col_isotopes;
1781
+ col_phase_isotopes = pSrc->col_phase_isotopes;
1782
+ row_mb = pSrc->row_mb;
1783
+ row_fract = pSrc->row_fract;
1784
+ row_charge = pSrc->row_charge;
1785
+ row_carbon = pSrc->row_carbon;
1786
+ row_isotopes = pSrc->row_isotopes;
1787
+ row_epsilon = pSrc->row_epsilon;
1788
+ row_isotope_epsilon = pSrc->row_isotope_epsilon;
1789
+ row_water = pSrc->row_water;
1790
+ //std::vector<double> inv_zero, array1, inv_res, inv_delta1, delta2,
1791
+ // delta3, inv_cu, delta_save;
1792
+ //std::vector<double> min_delta, max_delta;
1793
+ //std::vector<int> inv_iu, inv_is;
1794
+ klmd = pSrc->klmd;
1795
+ nklmd = pSrc->nklmd;
1796
+ n2d = pSrc->n2d;
1797
+ kode = pSrc->kode;
1798
+ iter = pSrc->iter;
1799
+ toler = pSrc->toler;
1800
+ error = pSrc->error;
1801
+ max_pct = pSrc->max_pct;
1802
+ scaled_error = pSrc->scaled_error;
1803
+ master_alk = NULL;
1804
+ //std::vector<int> row_back, col_back;
1805
+ //std::vector<unsigned long> good, bad, minimal;
1806
+ max_good = pSrc->max_good;
1807
+ max_bad = pSrc->max_bad;
1808
+ max_minimal = pSrc->max_minimal;
1809
+ count_good = pSrc->count_good;
1810
+ count_bad = pSrc->count_bad;
1811
+ count_minimal = pSrc->count_minimal;
1812
+ count_calls = pSrc->count_calls;
1813
+ soln_bits = pSrc->soln_bits;
1814
+ phase_bits = pSrc->phase_bits;
1815
+ current_bits = pSrc->current_bits;
1816
+ temp_bits = pSrc->temp_bits;
1817
+ netpath_file = NULL;
1818
+ count_inverse_models = pSrc->count_inverse_models;
1819
+ count_pat_solutions = pSrc->count_pat_solutions;
1820
+ for (int i = 0; i < 32; i++)
1821
+ {
1822
+ min_position[i] = pSrc->min_position[i];
1823
+ max_position[i] = pSrc->max_position[i];
1824
+ now[i] = pSrc->now[i];
1825
+ }
1826
+ //std::vector <std::string> inverse_heading_names;
1827
+ /* kinetics.cpp ------------------------------- */
1828
+ count_pp = count_pg = count_ss = 0;
1829
+ cvode_kinetics_ptr = NULL;
1830
+ cvode_test = FALSE;
1831
+ cvode_error = FALSE;
1832
+ cvode_n_user = -99;
1833
+ cvode_n_reactions = -99;
1834
+ cvode_step_fraction = 0.0;
1835
+ cvode_rate_sim_time = 0.0;
1836
+ cvode_rate_sim_time_start = 0.0;
1837
+ cvode_last_good_time = 0.0;
1838
+ cvode_prev_good_time = 0.0;
1839
+ cvode_last_good_y = NULL;
1840
+ cvode_prev_good_y = NULL;
1841
+ kinetics_machEnv = NULL;
1842
+ kinetics_y = NULL;
1843
+ kinetics_abstol = NULL;
1844
+ kinetics_cvode_mem = NULL;
1845
+ cvode_pp_assemblage_save = NULL;
1846
+ cvode_ss_assemblage_save = NULL;
1847
+ //std::vector<double> m_temp, m_original, rk_moles, x0_moles;
1848
+ set_and_run_attempt = 0;
1849
+ /* model.cpp ------------------------------- */
1850
+ gas_in = FALSE;
1851
+ min_value = 1e-10;
1852
+ //std::vector<double> normal, ineq_array, res, cu, zero, delta1;
1853
+ //std::vector<int> iu, is, back_eq;
1854
+ /* phrq_io_output.cpp ------------------------------- */
1855
+ forward_output_to_log = pSrc->forward_output_to_log;
1856
+ /* phreeqc_files.cpp ------------------------------- */
1857
+ default_data_base = pSrc->default_data_base;
1858
+ // Pitzer
1859
+ pitzer_model = pSrc->pitzer_model;
1860
+ sit_model = pSrc->sit_model;
1861
+ pitzer_pe = pSrc->pitzer_pe;
1862
+
1863
+
1864
+ full_pitzer = pSrc->full_pitzer;
1865
+ always_full_pitzer = pSrc->always_full_pitzer;
1866
+ ICON = pSrc->ICON;
1867
+ IC = pSrc->IC;
1868
+ COSMOT = pSrc->COSMOT;
1869
+ AW = pSrc->AW;
1870
+ VP = pSrc->VP;
1871
+ DW0 = pSrc->DW0;
1872
+ for (int i = 0; i < (int)pSrc->pitz_params.size(); i++)
1873
+ {
1874
+ pitz_param_store(pSrc->pitz_params[i]);
1875
+ }
1876
+
1877
+ //pitz_param_map = pSrc->pitz_param_map; created by store
1878
+ for (int i = 0; i < (int)pSrc->theta_params.size(); i++)
1879
+ {
1880
+ size_t count_theta_params = theta_params.size();
1881
+ theta_params.resize(count_theta_params + 1);
1882
+ theta_params[count_theta_params] = new class theta_param;
1883
+ *theta_params[count_theta_params] = *pSrc->theta_params[i];
1884
+ }
1885
+ use_etheta = pSrc->use_etheta;
1886
+ OTEMP = pSrc->OTEMP;
1887
+ OPRESS = pSrc->OPRESS;
1888
+ A0 = pSrc->A0;
1889
+ aphi = pitz_param_copy(pSrc->aphi);
1890
+ // will be rebuilt
1891
+ spec = pSrc->spec;
1892
+ cations = pSrc->cations;
1893
+ anions = pSrc->anions;
1894
+ neutrals = pSrc->neutrals;
1895
+ count_cations = pSrc->count_cations;
1896
+ count_anions = pSrc->count_anions;
1897
+ count_neutrals = pSrc->count_neutrals;
1898
+ MAXCATIONS = pSrc->MAXCATIONS;
1899
+ FIRSTANION = pSrc->FIRSTANION;
1900
+ MAXNEUTRAL = pSrc->MAXNEUTRAL;
1901
+ mcb0 = pSrc->mcb0;
1902
+ mcb1 = pSrc->mcb1;
1903
+ mcc0 = pSrc->mcc0;
1904
+ IPRSNT = pSrc->IPRSNT;
1905
+ M = pSrc->M;
1906
+ LGAMMA = pSrc->LGAMMA;
1907
+ for (int i = 0; i < 23; i++)
1908
+ {
1909
+ BK[i] = pSrc->BK[i];
1910
+ DK[i] = pSrc->DK[i];
1911
+ }
1912
+ dummy = 0;
1913
+ /* print.cpp ------------------------------- */
1914
+ /*
1915
+ sformatf_buffer = (char *) PHRQ_malloc(256 * sizeof(char));
1916
+ if (sformatf_buffer == NULL)
1917
+ malloc_error();
1918
+ sformatf_buffer_size = 256;
1919
+ */
1920
+ /* read.cpp */
1921
+ prev_next_char = NULL;
1922
+ #if defined PHREEQ98
1923
+ int shifts_as_points;
1924
+ #endif
1925
+ /* read_class.cxx */
1926
+ // auto dump_info
1927
+ // auto delete_info
1928
+ // auto run_info
1929
+ /*
1930
+ run_info.Set_io(phrq_io);
1931
+ */
1932
+ /* readtr.cpp */
1933
+ // auto dump_file_name_cpp;
1934
+ /* sit.cpp ------------------------------- */
1935
+ for (int i = 0; i < (int)pSrc->sit_params.size(); i++)
1936
+ {
1937
+ sit_param_store(pSrc->sit_params[i]);
1938
+ }
1939
+ //sit_param_map = pSrc->sit_param_map; // filled by store
1940
+ sit_A0 = pSrc->sit_A0;
1941
+ sit_count_cations = pSrc->sit_count_cations;
1942
+ sit_count_anions = pSrc->sit_count_anions;
1943
+ sit_count_neutrals = pSrc->sit_count_neutrals;
1944
+ sit_MAXCATIONS = pSrc->sit_MAXCATIONS;
1945
+ sit_FIRSTANION = pSrc->sit_FIRSTANION;
1946
+ sit_MAXNEUTRAL = pSrc->sit_MAXNEUTRAL;
1947
+ sit_IPRSNT = pSrc->sit_IPRSNT;
1948
+ sit_M = pSrc->sit_M;
1949
+ sit_LGAMMA = pSrc->sit_LGAMMA;
1950
+ s_list = pSrc->s_list;
1951
+ cation_list = pSrc->cation_list;
1952
+ neutral_list = pSrc->neutral_list;
1953
+ anion_list = pSrc->anion_list;
1954
+ ion_list = pSrc->ion_list;
1955
+ param_list = pSrc->param_list;
1956
+
1957
+ /* tidy.cpp ------------------------------- */
1958
+ //a0 = 0;
1959
+ //a1 = 0;
1960
+ //kc = 0;
1961
+ //kb = 0;
1962
+ /* tally.cpp ------------------------------- */
1963
+ //t_buffer = NULL;
1964
+ //tally_count_component = 0;
1965
+ //tally_table = NULL;
1966
+ //count_tally_table_columns = 0;
1967
+ //count_tally_table_rows = 0;
1968
+
1969
+ /* transport.cpp ------------------------------- */
1970
+ /* storage is created and freed in transport.cpp */
1971
+ sol_D = NULL;
1972
+ sol_D_dbg = NULL;
1973
+ J_ij = NULL;
1974
+ J_ij_il = NULL;
1975
+ J_ij_count_spec = pSrc->J_ij_count_spec;
1976
+ m_s = NULL;
1977
+ count_m_s = pSrc->count_m_s;
1978
+ tot1_h = pSrc->tot1_h;
1979
+ tot1_o = pSrc->tot1_o;
1980
+ tot2_h = pSrc->tot2_h;
1981
+ tot2_o = pSrc->tot2_o;
1982
+ diffc_max = pSrc->diffc_max;
1983
+ diffc_tr = pSrc->diffc_tr;
1984
+ J_ij_sum = pSrc->J_ij_sum;
1985
+ transp_surf = pSrc->transp_surf;
1986
+ heat_mix_array = NULL;
1987
+ temp1 = NULL;
1988
+ temp2 = NULL;
1989
+ nmix = pSrc->nmix;
1990
+ heat_nmix = pSrc->heat_nmix;
1991
+ heat_mix_f_imm = pSrc->heat_mix_f_imm;
1992
+ heat_mix_f_m = pSrc->heat_mix_f_m;
1993
+ warn_MCD_X = pSrc->warn_MCD_X;
1994
+ warn_fixed_Surf = pSrc->warn_fixed_Surf;
1995
+ current_x = pSrc->current_x;
1996
+ current_A = pSrc->current_A;
1997
+ fix_current = pSrc->fix_current;
1998
+
1999
+ /* utilities.cpp ------------------------------- */
2000
+ //spinner = 0;
2001
+ //// keycount;
2002
+ //for (int i = 0; i < Keywords::KEY_COUNT_KEYWORDS; i++)
2003
+ //{
2004
+ // keycount.push_back(0);
2005
+ //}
2006
+ spinner = pSrc->spinner;
2007
+ gfw_map = pSrc->gfw_map;
2008
+ //rates_map = pSrc->rates_map;
2009
+ sum_species_map = pSrc->sum_species_map;
2010
+ sum_species_map_db = pSrc->sum_species_map_db;
2011
+
2012
+ // make sure new_model gets set
2013
+ this->keycount[Keywords::KEY_SOLUTION_SPECIES] = 1;
2014
+ this->tidy_model();
2015
+ return;
2016
+ }
2017
+ // Operator overloaded using a member function
2018
+ Phreeqc &Phreeqc::operator=(const Phreeqc &rhs)
2019
+ {
2020
+ if (this == &rhs) // Same object?
2021
+ return *this;
2022
+
2023
+ // clean up this here
2024
+ this->clean_up();
2025
+
2026
+ this->PHRQ_free_all();
2027
+ if (this->phrq_io == &this->ioInstance)
2028
+ {
2029
+ this->phrq_io->clear_istream();
2030
+ this->phrq_io->close_ostreams();
2031
+ }
2032
+
2033
+ // copy Phreeqc object to this
2034
+ //this->phrq_io = rhs.phrq_io;
2035
+ //this->phrq_io = new PHRQ_io;
2036
+ #if !defined(R_SO)
2037
+ this->phrq_io->Set_output_ostream(&std::cout);
2038
+ this->phrq_io->Set_error_ostream(&std::cerr);
2039
+ #endif
2040
+ this->init();
2041
+ this->initialize();
2042
+ this->InternalCopy(&rhs);
2043
+ return *this;
2044
+ }
2045
+
2046
+ int Phreeqc::next_user_number(Keywords::KEYWORDS key)
2047
+ {
2048
+ switch (key)
2049
+ {
2050
+ case Keywords::KEY_REACTION_TEMPERATURE:
2051
+ return Utilities::Rxn_next_user_number(Rxn_temperature_map);
2052
+ break;
2053
+ case Keywords::KEY_REACTION_PRESSURE:
2054
+ return Utilities::Rxn_next_user_number(Rxn_pressure_map);
2055
+ break;
2056
+ case Keywords::KEY_SURFACE:
2057
+ return Utilities::Rxn_next_user_number(Rxn_surface_map);
2058
+ break;
2059
+ case Keywords::KEY_EXCHANGE:
2060
+ return Utilities::Rxn_next_user_number(Rxn_exchange_map);
2061
+ break;
2062
+ case Keywords::KEY_KINETICS:
2063
+ return Utilities::Rxn_next_user_number(Rxn_kinetics_map);
2064
+ break;
2065
+ case Keywords::KEY_MIX:
2066
+ return Utilities::Rxn_next_user_number(Rxn_mix_map);
2067
+ break;
2068
+ case Keywords::KEY_REACTION:
2069
+ return Utilities::Rxn_next_user_number(Rxn_reaction_map);
2070
+ break;
2071
+ case Keywords::KEY_GAS_PHASE:
2072
+ return Utilities::Rxn_next_user_number(Rxn_gas_phase_map);
2073
+ break;
2074
+ case Keywords::KEY_SOLID_SOLUTIONS:
2075
+ return Utilities::Rxn_next_user_number(Rxn_ss_assemblage_map);
2076
+ break;
2077
+ case Keywords::KEY_EQUILIBRIUM_PHASES:
2078
+ return Utilities::Rxn_next_user_number(Rxn_pp_assemblage_map);
2079
+ break;
2080
+ case Keywords::KEY_SOLUTION:
2081
+ return Utilities::Rxn_next_user_number(Rxn_solution_map);
2082
+ break;
2083
+ default:
2084
+ assert(false);
2085
+ return -999;
2086
+ }
2087
+ }