pyEQL 1.4.0rc9__cp310-cp310-win_amd64.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 (519) hide show
  1. pyEQL/__init__.py +50 -0
  2. pyEQL/_phreeqc.cp310-win_amd64.pyd +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/ALL_BUILD.vcxproj +185 -0
  46. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/ALL_BUILD.vcxproj.filters +8 -0
  47. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/generate.stamp +1 -0
  48. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/generate.stamp.depend +79 -0
  49. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CTestTestfile.cmake +6 -0
  50. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Continuous.vcxproj +240 -0
  51. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Continuous.vcxproj.filters +17 -0
  52. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/DartConfiguration.tcl +109 -0
  53. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Experimental.vcxproj +240 -0
  54. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Experimental.vcxproj.filters +17 -0
  55. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/INSTALL.vcxproj +209 -0
  56. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/INSTALL.vcxproj.filters +13 -0
  57. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/CSelectedOutput.obj +0 -0
  58. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Dictionary.obj +0 -0
  59. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/ExchComp.obj +0 -0
  60. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Exchange.obj +0 -0
  61. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/GasComp.obj +0 -0
  62. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/GasPhase.obj +0 -0
  63. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.lib.recipe +11 -0
  64. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.obj +0 -0
  65. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CL.command.1.tlog +0 -0
  66. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CL.read.1.tlog +0 -0
  67. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CL.write.1.tlog +0 -0
  68. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/Cl.items.tlog +82 -0
  69. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CustomBuild.command.1.tlog +10 -0
  70. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CustomBuild.read.1.tlog +78 -0
  71. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CustomBuild.write.1.tlog +2 -0
  72. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/IPhreeqc.lastbuildstate +2 -0
  73. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/Lib-link.read.1.tlog +0 -0
  74. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/Lib-link.write.1.tlog +0 -0
  75. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/Lib.command.1.tlog +0 -0
  76. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqcLib.obj +0 -0
  77. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc_interface_F.obj +0 -0
  78. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/ISolution.obj +0 -0
  79. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/ISolutionComp.obj +0 -0
  80. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Keywords.obj +0 -0
  81. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/KineticsComp.obj +0 -0
  82. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/NameDouble.obj +0 -0
  83. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/NumKeyword.obj +0 -0
  84. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PBasic.obj +0 -0
  85. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PHRQ_base.obj +0 -0
  86. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PHRQ_io.obj +0 -0
  87. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PHRQ_io_output.obj +0 -0
  88. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PPassemblage.obj +0 -0
  89. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PPassemblageComp.obj +0 -0
  90. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Parser.obj +0 -0
  91. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Phreeqc.obj +0 -0
  92. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Pressure.obj +0 -0
  93. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Reaction.obj +0 -0
  94. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/ReadClass.obj +0 -0
  95. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SS.obj +0 -0
  96. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SSassemblage.obj +0 -0
  97. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SScomp.obj +0 -0
  98. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SelectedOutput.obj +0 -0
  99. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Serializer.obj +0 -0
  100. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Solution.obj +0 -0
  101. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SolutionIsotope.obj +0 -0
  102. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/StorageBin.obj +0 -0
  103. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/StorageBinList.obj +0 -0
  104. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Surface.obj +0 -0
  105. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SurfaceCharge.obj +0 -0
  106. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SurfaceComp.obj +0 -0
  107. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/System.obj +0 -0
  108. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Temperature.obj +0 -0
  109. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Use.obj +0 -0
  110. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/UserPunch.obj +0 -0
  111. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Utils.obj +0 -0
  112. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Var.obj +0 -0
  113. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/advection.obj +0 -0
  114. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/basicsubs.obj +0 -0
  115. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cl1.obj +0 -0
  116. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cvdense.obj +0 -0
  117. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cvode.obj +0 -0
  118. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cxxKinetics.obj +0 -0
  119. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cxxMix.obj +0 -0
  120. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/dense.obj +0 -0
  121. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/dumper.obj +0 -0
  122. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/gases.obj +0 -0
  123. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/input.obj +0 -0
  124. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/integrate.obj +0 -0
  125. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/inverse.obj +0 -0
  126. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/isotopes.obj +0 -0
  127. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/kinetics.obj +0 -0
  128. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/mainsubs.obj +0 -0
  129. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/model.obj +0 -0
  130. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/nvector.obj +0 -0
  131. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/nvector_serial.obj +0 -0
  132. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/parse.obj +0 -0
  133. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/phqalloc.obj +0 -0
  134. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/pitzer.obj +0 -0
  135. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/pitzer_structures.obj +0 -0
  136. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/prep.obj +0 -0
  137. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/print.obj +0 -0
  138. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/read.obj +0 -0
  139. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/readtr.obj +0 -0
  140. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/runner.obj +0 -0
  141. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/sit.obj +0 -0
  142. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/smalldense.obj +0 -0
  143. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/spread.obj +0 -0
  144. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/step.obj +0 -0
  145. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/structures.obj +0 -0
  146. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/sundialsmath.obj +0 -0
  147. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/tally.obj +0 -0
  148. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/tidy.obj +0 -0
  149. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/transport.obj +0 -0
  150. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/utilities.obj +0 -0
  151. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.sln +116 -0
  152. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.vcxproj +443 -0
  153. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.vcxproj.filters +456 -0
  154. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Nightly.vcxproj +240 -0
  155. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Nightly.vcxproj.filters +17 -0
  156. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/NightlyMemoryCheck.vcxproj +240 -0
  157. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/NightlyMemoryCheck.vcxproj.filters +17 -0
  158. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Release/IPhreeqc.lib +0 -0
  159. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/cmake_install.cmake +40 -0
  160. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ar-lib +270 -0
  161. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/compile +347 -0
  162. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.guess +1441 -0
  163. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.sub +1813 -0
  164. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/depcomp +791 -0
  165. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/install-sh +508 -0
  166. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ltmain.sh +11156 -0
  167. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/missing +215 -0
  168. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/test-driver +148 -0
  169. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure +23867 -0
  170. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure.ac +136 -0
  171. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Amm.dat +1968 -0
  172. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/CMakeLists.txt +32 -0
  173. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/ColdChem.dat +267 -0
  174. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PHR.dat +158 -0
  175. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PZ.dat +195 -0
  176. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec.v2.dat +12039 -0
  177. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec_v3.dat +12159 -0
  178. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.am +28 -0
  179. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.in +530 -0
  180. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
  181. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Tipping_Hurley.dat +4137 -0
  182. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/core10.dat +6824 -0
  183. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/frezchem.dat +634 -0
  184. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/iso.dat +7235 -0
  185. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/llnl.dat +19310 -0
  186. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.dat +5654 -0
  187. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.v4.dat +13212 -0
  188. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc.dat +1972 -0
  189. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc_rates.dat +3158 -0
  190. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/pitzer.dat +1044 -0
  191. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/sit.dat +14348 -0
  192. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/wateq4f.dat +4036 -0
  193. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/CMakeLists.txt +35 -0
  194. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/IPhreeqc.pdf +0 -0
  195. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.am +24 -0
  196. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.in +545 -0
  197. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/NOTICE +51 -0
  198. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_2_1999_manual.pdf +0 -0
  199. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_3_2013_manual.pdf +0 -0
  200. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/README +428 -0
  201. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/RELEASE +7294 -0
  202. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h.html +5096 -0
  203. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h_source.html +389 -0
  204. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp.html +83 -0
  205. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp_source.html +478 -0
  206. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h.html +318 -0
  207. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h_source.html +200 -0
  208. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bc_s.png +0 -0
  209. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bdwn.png +0 -0
  210. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.html +2274 -0
  211. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.png +0 -0
  212. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.html +69 -0
  213. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.png +0 -0
  214. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/closed.png +0 -0
  215. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +68 -0
  216. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.css +1440 -0
  217. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.png +0 -0
  218. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dynsections.js +97 -0
  219. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2blank.png +0 -0
  220. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2doc.png +0 -0
  221. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderclosed.png +0 -0
  222. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderopen.png +0 -0
  223. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2lastnode.png +0 -0
  224. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2link.png +0 -0
  225. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mlastnode.png +0 -0
  226. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mnode.png +0 -0
  227. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2node.png +0 -0
  228. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2plastnode.png +0 -0
  229. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2pnode.png +0 -0
  230. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2splitbar.png +0 -0
  231. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2vertline.png +0 -0
  232. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/index.html +58 -0
  233. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/jquery.js +31 -0
  234. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_f.png +0 -0
  235. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_g.png +0 -0
  236. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_h.png +0 -0
  237. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/open.png +0 -0
  238. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/structVAR.html +143 -0
  239. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_off.png +0 -0
  240. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_on.png +0 -0
  241. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_a.png +0 -0
  242. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_b.png +0 -0
  243. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_h.png +0 -0
  244. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_s.png +0 -0
  245. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tabs.css +60 -0
  246. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/phreeqc3.chm +0 -0
  247. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/CMakeLists.txt +11 -0
  248. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.am +88 -0
  249. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.in +696 -0
  250. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/CMakeLists.txt +1 -0
  251. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt +35 -0
  252. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt.in +21 -0
  253. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/README.txt +44 -0
  254. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/advect.c +101 -0
  255. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/ic +17 -0
  256. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/phreeqc.dat +1579 -0
  257. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/CMakeLists.txt +10 -0
  258. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/README.txt +3 -0
  259. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/CMakeLists.txt +9 -0
  260. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/phreeqc.dat +1582 -0
  261. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/runphreeqc.xls +0 -0
  262. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/withcallback.xls +0 -0
  263. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/CMakeLists.txt +11 -0
  264. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/Gypsum.py +52 -0
  265. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/parallel_advect.py +465 -0
  266. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/phreeqc.dat +1582 -0
  267. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/pitzer.dat +790 -0
  268. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/wateq4f.dat +3846 -0
  269. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/CMakeLists.txt +1 -0
  270. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt +35 -0
  271. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt.in +20 -0
  272. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/README.txt +45 -0
  273. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/advect.cpp +110 -0
  274. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/ic +17 -0
  275. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/phreeqc.dat +1579 -0
  276. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/CMakeLists.txt +1 -0
  277. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt +44 -0
  278. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt.in +24 -0
  279. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/README.txt +45 -0
  280. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/advect.F90 +102 -0
  281. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/ic +17 -0
  282. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/phreeqc.dat +1579 -0
  283. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt +26 -0
  284. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt.in +20 -0
  285. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/README.txt +37 -0
  286. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/ex2 +26 -0
  287. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/main.cpp +20 -0
  288. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/phreeqc.dat +1837 -0
  289. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/post-install.cmake.in +7 -0
  290. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/CMakeLists.txt +185 -0
  291. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.cpp +171 -0
  292. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.h +34 -0
  293. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.am +18 -0
  294. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.in +466 -0
  295. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestCVar.cpp +9 -0
  296. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqc.cpp +4901 -0
  297. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqcLib.cpp +4644 -0
  298. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestSelectedOutput.cpp +669 -0
  299. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestVar.cpp +10 -0
  300. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/conv_fail.in +11 -0
  301. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/dump +42 -0
  302. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/iso.dat +7231 -0
  303. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/kinn20140218 +349 -0
  304. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/missing_e.dat +1556 -0
  305. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch +105 -0
  306. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch_no_set +102 -0
  307. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.90a6449 +1935 -0
  308. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.old +1556 -0
  309. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/libtool.m4 +8388 -0
  310. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltoptions.m4 +437 -0
  311. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltsugar.m4 +124 -0
  312. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltversion.m4 +23 -0
  313. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/lt~obsolete.m4 +99 -0
  314. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/resource.h +14 -0
  315. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.cpp +401 -0
  316. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.hxx +77 -0
  317. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CVar.hxx +162 -0
  318. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Debug.h +12 -0
  319. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/ErrorReporter.hxx +70 -0
  320. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.cpp +1889 -0
  321. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f.inc +91 -0
  322. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f90.inc +603 -0
  323. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.h +2182 -0
  324. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.hpp +1027 -0
  325. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcCallbacks.h +19 -0
  326. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcF.f +653 -0
  327. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcLib.cpp +1098 -0
  328. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface.F90 +1283 -0
  329. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.cpp +535 -0
  330. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.h +162 -0
  331. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.am +210 -0
  332. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.in +1294 -0
  333. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/README.Fortran +17 -0
  334. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.c +84 -0
  335. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.h +152 -0
  336. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Version.h +36 -0
  337. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fimpl.h +282 -0
  338. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.cpp +646 -0
  339. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.h +163 -0
  340. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap1.cpp +24 -0
  341. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap2.cpp +24 -0
  342. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap3.cpp +24 -0
  343. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap4.cpp +24 -0
  344. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap5.cpp +24 -0
  345. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap6.cpp +25 -0
  346. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap7.cpp +25 -0
  347. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap8.cpp +24 -0
  348. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.cpp +225 -0
  349. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.h +59 -0
  350. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.cpp +1382 -0
  351. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.h +444 -0
  352. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.cpp +42 -0
  353. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.h +79 -0
  354. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.cpp +41 -0
  355. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.h +28 -0
  356. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.cxx +398 -0
  357. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.h +117 -0
  358. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.cxx +466 -0
  359. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.h +74 -0
  360. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.h +1184 -0
  361. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.resX +36 -0
  362. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.cxx +265 -0
  363. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.h +59 -0
  364. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.cxx +659 -0
  365. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.h +103 -0
  366. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.cxx +40 -0
  367. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.h +53 -0
  368. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.cxx +202 -0
  369. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.h +138 -0
  370. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.cxx +318 -0
  371. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.h +81 -0
  372. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NA.h +1 -0
  373. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.cxx +537 -0
  374. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.h +66 -0
  375. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.cxx +190 -0
  376. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.h +67 -0
  377. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.cpp +8350 -0
  378. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.h +572 -0
  379. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PHRQ_io_output.cpp +411 -0
  380. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.cxx +375 -0
  381. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.h +70 -0
  382. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.cxx +441 -0
  383. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.h +83 -0
  384. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.cpp +2087 -0
  385. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.h +2164 -0
  386. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.cpp +242 -0
  387. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.h +104 -0
  388. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.cxx +417 -0
  389. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.h +43 -0
  390. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.cxx +284 -0
  391. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.h +57 -0
  392. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ReadClass.cxx +1150 -0
  393. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.cxx +609 -0
  394. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.h +128 -0
  395. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.cxx +317 -0
  396. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.h +59 -0
  397. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.cxx +297 -0
  398. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.h +66 -0
  399. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.cpp +115 -0
  400. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.h +209 -0
  401. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.cxx +213 -0
  402. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.h +42 -0
  403. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.cxx +1795 -0
  404. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.h +154 -0
  405. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.cxx +333 -0
  406. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.h +85 -0
  407. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.cxx +1507 -0
  408. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.h +141 -0
  409. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.cpp +358 -0
  410. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.h +81 -0
  411. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.cxx +837 -0
  412. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.h +108 -0
  413. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.cxx +617 -0
  414. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.h +137 -0
  415. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.cxx +509 -0
  416. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.h +70 -0
  417. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.cxx +103 -0
  418. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.h +89 -0
  419. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.cxx +423 -0
  420. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.h +42 -0
  421. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.cpp +78 -0
  422. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.h +159 -0
  423. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.cpp +32 -0
  424. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.h +39 -0
  425. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ZedGraph.dll +0 -0
  426. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/advection.cpp +140 -0
  427. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/basicsubs.cpp +4333 -0
  428. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cl1.cpp +881 -0
  429. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.cxx +117 -0
  430. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.h +48 -0
  431. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_exports.h +20 -0
  432. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.cpp +914 -0
  433. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.h +207 -0
  434. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.cxx +1331 -0
  435. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.h +310 -0
  436. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.cxx +263 -0
  437. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.h +29 -0
  438. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/phrqtype.h +18 -0
  439. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.cpp +566 -0
  440. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.h +267 -0
  441. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.cpp +3939 -0
  442. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.h +940 -0
  443. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.cxx +617 -0
  444. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.h +78 -0
  445. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.cxx +154 -0
  446. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.h +58 -0
  447. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.cpp +175 -0
  448. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.h +341 -0
  449. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.cpp +277 -0
  450. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.h +60 -0
  451. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/gases.cpp +748 -0
  452. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/global_structures.h +1672 -0
  453. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/input.cpp +133 -0
  454. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/integrate.cpp +1219 -0
  455. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/inverse.cpp +5135 -0
  456. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/isotopes.cpp +1813 -0
  457. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/kinetics.cpp +3180 -0
  458. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/mainsubs.cpp +2320 -0
  459. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/model.cpp +5843 -0
  460. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.cpp +272 -0
  461. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.h +485 -0
  462. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.cpp +1032 -0
  463. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.h +369 -0
  464. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/parse.cpp +1044 -0
  465. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.cpp +316 -0
  466. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.h +47 -0
  467. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer.cpp +2709 -0
  468. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer_structures.cpp +225 -0
  469. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/prep.cpp +6267 -0
  470. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/print.cpp +3673 -0
  471. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/read.cpp +10245 -0
  472. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/readtr.cpp +1495 -0
  473. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.cpp +158 -0
  474. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.h +33 -0
  475. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sit.cpp +1684 -0
  476. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.cpp +324 -0
  477. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.h +261 -0
  478. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/spread.cpp +1309 -0
  479. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/step.cpp +1566 -0
  480. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/structures.cpp +3381 -0
  481. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.cpp +133 -0
  482. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.h +162 -0
  483. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialstypes.h +183 -0
  484. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tally.cpp +1288 -0
  485. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tidy.cpp +5600 -0
  486. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/transport.cpp +6403 -0
  487. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/utilities.cpp +1339 -0
  488. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/thread.h +64 -0
  489. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/CMakeLists.txt +133 -0
  490. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.am +45 -0
  491. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.in +1128 -0
  492. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/ex2.in +26 -0
  493. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main.f90 +31 -0
  494. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main77.f +6 -0
  495. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main_fortran.cxx +8 -0
  496. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/phreeqc.dat.in +1556 -0
  497. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_c.c +148 -0
  498. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_cxx.cxx +152 -0
  499. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_f90.F90 +328 -0
  500. pyEQL/phreeqc/iphreeqc_wrapper.cpp +75 -0
  501. pyEQL/phreeqc/solution.py +74 -0
  502. pyEQL/phreeqc/var.py +50 -0
  503. pyEQL/presets/Ringers lactate.yaml +20 -0
  504. pyEQL/presets/__init__.py +17 -0
  505. pyEQL/presets/normal saline.yaml +17 -0
  506. pyEQL/presets/rainwater.yaml +17 -0
  507. pyEQL/presets/seawater.yaml +29 -0
  508. pyEQL/presets/urine.yaml +26 -0
  509. pyEQL/presets/wastewater.yaml +21 -0
  510. pyEQL/py.typed +0 -0
  511. pyEQL/salt_ion_match.py +112 -0
  512. pyEQL/solute.py +163 -0
  513. pyEQL/solution.py +2714 -0
  514. pyEQL/utils.py +237 -0
  515. pyeql-1.4.0rc9.dist-info/METADATA +130 -0
  516. pyeql-1.4.0rc9.dist-info/RECORD +519 -0
  517. pyeql-1.4.0rc9.dist-info/WHEEL +5 -0
  518. pyeql-1.4.0rc9.dist-info/licenses/AUTHORS.md +21 -0
  519. pyeql-1.4.0rc9.dist-info/licenses/LICENSE.txt +20 -0
@@ -0,0 +1,2164 @@
1
+ #ifndef _INC_PHREEQC_H
2
+ #define _INC_PHREEQC_H
3
+ #if defined(WIN32)
4
+ # if defined(PHREEQCI_GUI)
5
+ # ifndef WINVER
6
+ # define WINVER 0x0400
7
+ # endif
8
+ # include <afx.h>
9
+ # endif
10
+ # include <windows.h>
11
+ # if defined(PHREEQCI_GUI)
12
+ # include "../../resource.h"
13
+ # endif
14
+ #endif
15
+ #if defined(WIN32_MEMORY_DEBUG)
16
+ #define _CRTDBG_MAP_ALLOC
17
+ #include <crtdbg.h>
18
+ #endif
19
+ #ifndef boolean
20
+ typedef unsigned char boolean;
21
+ #endif
22
+ /* ----------------------------------------------------------------------
23
+ * INCLUDE FILES
24
+ * ---------------------------------------------------------------------- */
25
+ #include <iostream>
26
+ #include <fstream>
27
+ #include <sstream>
28
+ #include <map>
29
+ #include <string.h>
30
+ #include <stdlib.h>
31
+ #include <ctype.h>
32
+ #include <cmath>
33
+ #include <errno.h>
34
+ #include <cfloat>
35
+ #include "phrqtype.h"
36
+ #include "cvdense.h"
37
+ #include "runner.h"
38
+ #include "dumper.h"
39
+ #include "PHRQ_io.h"
40
+ #include "SelectedOutput.h"
41
+ #include "UserPunch.h"
42
+ #ifdef MULTICHART
43
+ #include "ChartHandler.h"
44
+ #endif
45
+ #include "Keywords.h"
46
+ #include "Pressure.h"
47
+ #include "cxxMix.h"
48
+ #include "Use.h"
49
+ #include "Surface.h"
50
+ #ifdef SWIG_SHARED_OBJ
51
+ #include "thread.h"
52
+ #endif
53
+
54
+ class cxxNameDouble;
55
+ class cxxKinetics;
56
+ class cxxKineticsComp;
57
+ class cxxExchange;
58
+ class cxxExchComp;
59
+ class cxxGasPhase;
60
+ class cxxTemperature;
61
+ class cxxPPassemblage;
62
+ class cxxPPassemblageComp;
63
+ class cxxReaction;
64
+ class cxxSolution;
65
+ class cxxISolutionComp;
66
+ class cxxSolutionIsotope;
67
+ class cxxSSassemblage;
68
+ class cxxSS;
69
+ class cxxStorageBin;
70
+ class PBasic;
71
+
72
+ #include "global_structures.h"
73
+
74
+ class Phreeqc
75
+ {
76
+ public:
77
+ Phreeqc(PHRQ_io* io = NULL);
78
+ Phreeqc(const Phreeqc& src);
79
+ void InternalCopy(const Phreeqc* pSrc);
80
+ Phreeqc& operator=(const Phreeqc& rhs);
81
+ ~Phreeqc(void);
82
+
83
+ public:
84
+ //
85
+ // Phreeqc class methods
86
+ //
87
+
88
+ // advection.cpp -------------------------------
89
+ int advection(void);
90
+
91
+ // basicsubs.cpp -------------------------------
92
+ int basic_compile(const char* commands, void** lnbase, void** vbase, void** lpbase);
93
+ int basic_run(char* commands, void* lnbase, void* vbase, void* lpbase);
94
+ void basic_free(void);
95
+ #ifdef IPHREEQC_NO_FORTRAN_MODULE
96
+ double basic_callback(double x1, double x2, const char* str);
97
+ #else
98
+ double basic_callback(double x1, double x2, const char* str);
99
+ #endif
100
+ void register_basic_callback(double (*fcn)(double x1, double x2, const char* str, void* cookie), void* cookie1);
101
+ #ifdef IPHREEQC_NO_FORTRAN_MODULE
102
+ void register_fortran_basic_callback(double (*fcn)(double* x1, double* x2, const char* str, size_t l));
103
+ #else
104
+ void register_fortran_basic_callback(double (*fcn)(double* x1, double* x2, const char* str, int l));
105
+ #endif
106
+
107
+ LDBLE activity(const char* species_name);
108
+ LDBLE activity_coefficient(const char* species_name);
109
+ LDBLE log_activity_coefficient(const char* species_name);
110
+ LDBLE aqueous_vm(const char* species_name);
111
+ LDBLE phase_vm(const char* phase_name);
112
+ LDBLE diff_c(const char* species_name);
113
+ LDBLE setdiff_c(const char * species_name, double d, double d_v_d);
114
+ LDBLE flux_mcd(const char* species_name, int option);
115
+ LDBLE sa_declercq(double type, double sa, double d, double m, double m0, double gfw);
116
+ LDBLE calc_SC(void);
117
+ /* VP: Density Start */
118
+ LDBLE calc_dens(void);
119
+ /* VP: Density End */
120
+ LDBLE calc_logk_n(const char* name);
121
+ LDBLE calc_logk_p(const char* name);
122
+ LDBLE calc_logk_s(const char* name);
123
+ LDBLE calc_deltah_s(const char* name);
124
+ LDBLE calc_deltah_p(const char* name);
125
+ LDBLE dh_a0(const char* name);
126
+ LDBLE dh_bdot(const char* name);
127
+ LDBLE calc_surface_charge(const char* surface_name);
128
+ LDBLE calc_t_sc(const char* name);
129
+ LDBLE diff_layer_total(const char* total_name, const char* surface_name);
130
+ LDBLE edl_species(const char* surf_name, LDBLE* count, char*** names, LDBLE** moles, LDBLE* area, LDBLE* thickness);
131
+ int get_edl_species(cxxSurfaceCharge& charge_ref);
132
+ LDBLE equi_phase(const char* phase_name);
133
+ LDBLE equi_phase_delta(const char* phase_name);
134
+ LDBLE equivalent_fraction(const char* name, LDBLE* eq, std::string& elt_name);
135
+ LDBLE find_gas_comp(const char* gas_comp_name);
136
+ LDBLE find_gas_p(void);
137
+ LDBLE find_gas_vm(void);
138
+ LDBLE find_misc1(const char* ss_name);
139
+ LDBLE find_misc2(const char* ss_name);
140
+ LDBLE find_ss_comp(const char* ss_comp_name);
141
+ LDBLE get_calculate_value(const char* name);
142
+ char* iso_unit(const char* total_name);
143
+ LDBLE iso_value(const char* total_name);
144
+ LDBLE kinetics_moles(const char* kinetics_name);
145
+ LDBLE kinetics_moles_delta(const char* kinetics_name);
146
+ LDBLE log_activity(const char* species_name);
147
+ LDBLE log_molality(const char* species_name);
148
+ LDBLE molality(const char* species_name);
149
+ LDBLE pressure(void);
150
+ LDBLE pr_pressure(const char* phase_name);
151
+ LDBLE pr_phi(const char* phase_name);
152
+ LDBLE saturation_ratio(const char* phase_name);
153
+ int saturation_index(const char* phase_name, LDBLE* iap, LDBLE* si);
154
+ int solution_number(void);
155
+ LDBLE solution_sum_secondary(const char* total_name);
156
+ LDBLE sum_match_gases(const char* stemplate, const char* name);
157
+ LDBLE sum_match_species(const char* stemplate, const char* name);
158
+ LDBLE sum_match_ss(const char* stemplate, const char* name);
159
+ int match_elts_in_species(const char* name, const char* stemplate);
160
+ int extract_bracket(const char** string, char* bracket_string);
161
+ LDBLE surf_total(const char* total_name, const char* surface_name);
162
+ LDBLE surf_total_no_redox(const char* total_name, const char* surface_name);
163
+ static int system_species_compare(const void* ptr1, const void* ptr2);
164
+ static int system_species_compare_name(const void* ptr1, const void* ptr2);
165
+ LDBLE system_total(const char* total_name, LDBLE* count, char*** names,
166
+ char*** types, LDBLE** moles, int i);
167
+ std::string kinetics_formula(std::string kinetics_name, cxxNameDouble& stoichiometry);
168
+ std::string phase_formula(std::string phase_name, cxxNameDouble& stoichiometry);
169
+ std::string species_formula(std::string phase_name, cxxNameDouble& stoichiometry);
170
+ std::string phase_equation(std::string phase_name, std::vector<std::pair<std::string, double> >& stoichiometry);
171
+ std::string species_equation(std::string species_name, std::vector<std::pair<std::string, double> >& stoichiometry);
172
+ LDBLE list_ss(std::string ss_name, cxxNameDouble& composition);
173
+ int system_total_elements(void);
174
+ int system_total_si(void);
175
+ int system_total_aq(void);
176
+ int system_total_ex(void);
177
+ int system_total_surf(void);
178
+ int system_total_gas(void);
179
+ int system_total_equi(void);
180
+ int system_total_kin(void);
181
+ int system_total_ss(void);
182
+ int system_total_elt(const char* total_name);
183
+ int system_total_elt_secondary(const char* total_name);
184
+ LDBLE total(const char* total_name);
185
+ LDBLE total_mole(const char* total_name);
186
+ int system_total_solids(cxxExchange* exchange_ptr,
187
+ cxxPPassemblage* pp_assemblage_ptr,
188
+ cxxGasPhase* gas_phase_ptr,
189
+ cxxSSassemblage* ss_assemblage_ptr,
190
+ cxxSurface* surface_ptr);
191
+
192
+ static LDBLE f_rho(LDBLE rho_old, void* cookie);
193
+ static LDBLE f_Vm(LDBLE v1, void* cookie);
194
+ LDBLE calc_solution_volume(void);
195
+
196
+ // cl1.cpp -------------------------------
197
+ int cl1(int k, int l, int m, int n,
198
+ int nklmd, int n2d,
199
+ LDBLE* q,
200
+ int* kode, LDBLE toler,
201
+ int* iter, LDBLE* x, LDBLE* res, LDBLE* error,
202
+ LDBLE* cu, int* iu, int* s, int check);
203
+ void cl1_space(int check, int n2d, int klm, int nklmd);
204
+
205
+ // cl1mp.cpp -------------------------------
206
+ int cl1mp(int k, int l, int m, int n,
207
+ int nklmd, int n2d,
208
+ LDBLE* q_arg,
209
+ int* kode, LDBLE toler,
210
+ int* iter, LDBLE* x_arg, LDBLE* res_arg, LDBLE* error,
211
+ LDBLE* cu_arg, int* iu, int* s, int check, LDBLE censor_arg);
212
+
213
+ // class_main.cpp -------------------------------
214
+ int write_banner(void);
215
+
216
+ /* default.cpp */
217
+ public:
218
+ //int close_input_files(void);
219
+ //int close_output_files(void);
220
+ //static int istream_getc(void* cookie);
221
+ int process_file_names(int argc, char* argv[], std::istream** db_cookie,
222
+ std::istream** input_cookie, int log);
223
+
224
+ /* PHRQ_io_output.cpp */
225
+ void screen_msg(const char* str);
226
+
227
+ void echo_msg(const char* err_str);
228
+ int warning_msg(const char* err_str);
229
+ void set_forward_output_to_log(int value);
230
+ int get_forward_output_to_log(void);
231
+
232
+ // dump_ostream
233
+ bool dump_open(const char* file_name);
234
+ void dump_flush(void);
235
+ void dump_close(void);
236
+ void dump_msg(const char* str);
237
+
238
+ // log_ostream
239
+ bool log_open(const char* file_name);
240
+ void log_flush(void);
241
+ void log_close(void);
242
+ void log_msg(const char* str);
243
+
244
+ // error_ostream
245
+ bool error_open(const char* file_name);
246
+ void error_flush(void);
247
+ void error_close(void);
248
+ void error_msg(const char* str, bool stop = false);
249
+
250
+ // output_ostream
251
+ bool output_open(const char* file_name);
252
+ void output_flush(void);
253
+ void output_close(void);
254
+ void output_msg(const char* str);
255
+
256
+ // punch_ostream
257
+ bool punch_open(const char* file_name, int n_user);
258
+ void punch_flush(void);
259
+ void punch_close(void);
260
+ void punch_msg(const char* str);
261
+
262
+ void fpunchf_heading(const char* name);
263
+ void fpunchf(const char* name, const char* format, double d);
264
+ void fpunchf(const char* name, const char* format, char* d);
265
+ void fpunchf(const char* name, const char* format, int d);
266
+ void fpunchf_user(int user_index, const char* format, double d);
267
+ void fpunchf_user(int user_index, const char* format, char* d);
268
+ int fpunchf_end_row(const char* format);
269
+ // input.cpp -------------------------------
270
+ int reading_database(void);
271
+ void set_reading_database(int reading_database);
272
+ int check_line(const char* string, int allow_empty, int allow_eof,
273
+ int allow_keyword, int print);
274
+ int check_line_impl(const char* string, int allow_empty,
275
+ int allow_eof, int allow_keyword, int print);
276
+ int get_line(void);
277
+ //int get_logical_line(void* cookie, int* l);
278
+ int read_database(void);
279
+ int run_simulations(void);
280
+
281
+ // integrate.cpp -------------------------------
282
+ int calc_all_g(void);
283
+ int calc_init_g(void);
284
+ int initial_surface_water(void);
285
+ int sum_diffuse_layer(cxxSurfaceCharge* surface_charge_ptr1);
286
+ int calc_all_donnan(void);
287
+ int calc_init_donnan(void);
288
+ LDBLE calc_psi_avg(cxxSurfaceCharge * charge_ptr, LDBLE surf_chrg_eq, LDBLE nDbl, LDBLE f_free, std::vector<LDBLE> &zcorr);
289
+ LDBLE g_function(LDBLE x_value);
290
+ LDBLE midpnt(LDBLE x1, LDBLE x2, int n);
291
+ void polint(LDBLE* xa, LDBLE* ya, int n, LDBLE xv, LDBLE* yv,
292
+ LDBLE* dy);
293
+ LDBLE qromb_midpnt(cxxSurfaceCharge* charge_ptr, LDBLE x1, LDBLE x2);
294
+
295
+ // inverse.cpp -------------------------------
296
+ int inverse_models(void);
297
+ int add_to_file(const char* filename, const char* string);
298
+ int bit_print(unsigned long bits, int l);
299
+ int carbon_derivs(class inverse* inv_ptr);
300
+ int check_isotopes(class inverse* inv_ptr);
301
+ int check_solns(class inverse* inv_ptr);
302
+ bool set_isotope_unknowns(class inverse* inv_ptrs);
303
+ cxxSolutionIsotope* get_isotope(cxxSolution* solution_ptr, const char* elt);
304
+ LDBLE get_inv_total(cxxSolution* solution_ptr, const char* elt);
305
+ int isotope_balance_equation(class inverse* inv_ptr, int row, int n);
306
+ int post_mortem(void);
307
+ bool test_cl1_solution(void);
308
+ unsigned long get_bits(unsigned long bits, int position, int number);
309
+ unsigned long minimal_solve(class inverse* inv_ptr,
310
+ unsigned long minimal_bits);
311
+ void dump_netpath(class inverse* inv_ptr);
312
+ int dump_netpath_pat(class inverse* inv_ptr);
313
+ int next_set_phases(class inverse* inv_ptr, int first_of_model_size,
314
+ int model_size);
315
+ int phase_isotope_inequalities(class inverse* inv_ptr);
316
+ int print_model(class inverse* inv_ptr);
317
+ int punch_model_heading(class inverse* inv_ptr);
318
+ int punch_model(class inverse* inv_ptr);
319
+ void print_isotope(FILE* netpath_file, cxxSolution* solution_ptr,
320
+ const char* elt, const char* string);
321
+ void print_total(FILE* netpath_file, cxxSolution* solution_ptr,
322
+ const char* elt, const char* string);
323
+ void print_total_multi(FILE* netpath_file, cxxSolution* solution_ptr,
324
+ const char* string, const char* elt0,
325
+ const char* elt1, const char* elt2, const char* elt3,
326
+ const char* elt4);
327
+
328
+ void print_total_pat(FILE* netpath_file, const char* elt,
329
+ const char* string);
330
+ int range(class inverse* inv_ptr, unsigned long cur_bits);
331
+ int save_bad(unsigned long bits);
332
+ int save_good(unsigned long bits);
333
+ int save_minimal(unsigned long bits);
334
+ unsigned long set_bit(unsigned long bits, int position, int value);
335
+ int setup_inverse(class inverse* inv_ptr);
336
+ int set_initial_solution(int n_user_old, int n_user_new);
337
+ int set_ph_c(class inverse* inv_ptr,
338
+ int i, cxxSolution* soln_ptr_orig, int n_user_new,
339
+ LDBLE d_alk, LDBLE ph_factor, LDBLE alk_factor);
340
+ int shrink(class inverse* inv_ptr, LDBLE* array_in,
341
+ LDBLE* array_out, int* k, int* l, int* m, int* n,
342
+ unsigned long cur_bits, LDBLE* delta_l, int* col_back_l,
343
+ int* row_back_l);
344
+ int solve_inverse(class inverse* inv_ptr);
345
+ int solve_with_mask(class inverse* inv_ptr, unsigned long cur_bits);
346
+ int subset_bad(unsigned long bits);
347
+ int subset_minimal(unsigned long bits);
348
+ int superset_minimal(unsigned long bits);
349
+ int write_optimize_names(class inverse* inv_ptr);
350
+
351
+ // isotopes.cpp -------------------------------
352
+ int add_isotopes(cxxSolution& solution_ptr);
353
+ int calculate_values(void);
354
+ int calculate_isotope_moles(class element* elt_ptr,
355
+ cxxSolution* solution_ptr, LDBLE total_moles);
356
+ LDBLE convert_isotope(class master_isotope* master_isotope_ptr, LDBLE ratio);
357
+ int from_pcil(class master_isotope* master_isotope_ptr);
358
+ int from_permil(class master_isotope* master_isotope_ptr, LDBLE major_total);
359
+ int from_pct(class master_isotope* master_isotope_ptr, LDBLE major_total);
360
+ int from_tu(class master_isotope* master_isotope_ptr);
361
+ class calculate_value* calculate_value_alloc(void);
362
+ int calculate_value_free(class calculate_value* calculate_value_ptr);
363
+ class calculate_value* calculate_value_search(const char* name);
364
+ class calculate_value* calculate_value_store(const char* name,
365
+ int replace_if_found);
366
+ class isotope_alpha* isotope_alpha_alloc(void);
367
+ class isotope_alpha* isotope_alpha_search(const char* name);
368
+ class isotope_alpha* isotope_alpha_store(const char* name,
369
+ int replace_if_found);
370
+ class isotope_ratio* isotope_ratio_alloc(void);
371
+ class isotope_ratio* isotope_ratio_search(const char* name);
372
+ class isotope_ratio* isotope_ratio_store(const char* name,
373
+ int replace_if_found);
374
+ class master_isotope* master_isotope_store(const char* name,
375
+ int replace_if_found);
376
+ class master_isotope* master_isotope_alloc(void);
377
+ class master_isotope* master_isotope_search(const char* name);
378
+ int print_initial_solution_isotopes(void);
379
+ int print_isotope_ratios(void);
380
+ int print_isotope_alphas(void);
381
+ int punch_isotopes(void);
382
+ int punch_calculate_values(void);
383
+ int read_calculate_values(void);
384
+ int read_isotopes(void);
385
+ int read_isotope_ratios(void);
386
+ int read_isotope_alphas(void);
387
+ int calculate_value_init(class calculate_value* calculate_value_ptr);
388
+ int isotope_alpha_init(class isotope_alpha* isotope_alpha_ptr);
389
+ int isotope_ratio_init(class isotope_ratio* isotope_ratio_ptr);
390
+ int master_isotope_init(class master_isotope* master_isotope_ptr);
391
+
392
+ // kinetics.cpp -------------------------------
393
+ void cvode_init(void);
394
+ bool cvode_update_reactants(int i, int nsaver, bool save_it);
395
+ int run_reactions(int i, LDBLE kin_time, int use_mix, LDBLE step_fraction);
396
+ int set_and_run(int i, int use_mix, int use_kinetics, int nsaver,
397
+ LDBLE step_fraction);
398
+ int set_and_run_wrapper(int i, int use_mix, int use_kinetics, int nsaver,
399
+ LDBLE step_fraction);
400
+ int set_advection(int i, int use_mix, int use_kinetics, int nsaver);
401
+ int free_cvode(void);
402
+ public:
403
+ static void f(integertype N, realtype t, N_Vector y, N_Vector ydot,
404
+ void* f_data);
405
+ static void Jac(integertype N, DenseMat J, RhsFn f, void* f_data, realtype t,
406
+ N_Vector y, N_Vector fy, N_Vector ewt, realtype h,
407
+ realtype uround, void* jac_data, long int* nfePtr,
408
+ N_Vector vtemp1, N_Vector vtemp2, N_Vector vtemp3);
409
+
410
+ int calc_final_kinetic_reaction(cxxKinetics* kinetics_ptr);
411
+ int calc_kinetic_reaction(cxxKinetics* kinetics_ptr,
412
+ LDBLE time_step);
413
+ bool limit_rates(cxxKinetics* kinetics_ptr);
414
+ int rk_kinetics(int i, LDBLE kin_time, int use_mix, int nsaver,
415
+ LDBLE step_fraction);
416
+ int set_reaction(int i, int use_mix, int use_kinetics);
417
+ int set_transport(int i, int use_mix, int use_kinetics, int nsaver);
418
+ int store_get_equi_reactants(int k, int kin_end);
419
+
420
+ // mainsubs.cpp -------------------------------
421
+ std::ifstream* open_input_stream(std::string query, std::string& default_name, std::ios_base::openmode mode, bool batch);
422
+ std::ofstream* open_output_stream(std::string query, std::string& default_name, std::ios_base::openmode mode, bool batch);
423
+ int copy_entities(void);
424
+ void do_mixes(void);
425
+ void initialize(void);
426
+ int initial_exchangers(int print);
427
+ int initial_gas_phases(int print);
428
+ int initial_solutions(int print);
429
+ int step_save_exch(int n_user);
430
+ int step_save_surf(int n_user);
431
+ int initial_surfaces(int print);
432
+ int reactions(void);
433
+ int saver(void);
434
+ int xsolution_save(int k_user);
435
+ int xexchange_save(int n_user);
436
+ int xgas_save(int n_user);
437
+ int xpp_assemblage_save(int n_user);
438
+ int xss_assemblage_save(int n_user);
439
+ int xsurface_save(int n_user);
440
+ int do_initialize(void);
441
+ int do_status(void);
442
+ void save_init(int i);
443
+ int copy_use(int i);
444
+ int set_use(void);
445
+
446
+ // model.cpp -------------------------------
447
+ int check_residuals(void);
448
+ int free_model_allocs(void);
449
+ int ineq(int kode);
450
+ int model(void);
451
+ int jacobian_sums(void);
452
+ int mb_gases(void);
453
+ int mb_ss(void);
454
+ int mb_sums(void);
455
+ int molalities(int allow_overflow);
456
+ int reset(void);
457
+ int residuals(void);
458
+ int set(int initial);
459
+ int sum_species(void);
460
+ int surface_model(void);
461
+ LDBLE ss_root(LDBLE a0, LDBLE a1, LDBLE kc, LDBLE kb, LDBLE xcaq,
462
+ LDBLE xbaq);
463
+ LDBLE ss_halve(LDBLE a0, LDBLE a1, LDBLE x0, LDBLE x1, LDBLE kc,
464
+ LDBLE kb, LDBLE xcaq, LDBLE xbaq);
465
+ LDBLE ss_f(LDBLE xb, LDBLE a0, LDBLE a1, LDBLE kc, LDBLE kb,
466
+ LDBLE xcaq, LDBLE xbaq);
467
+ int numerical_jacobian(void);
468
+ void set_inert_moles(void);
469
+ void unset_inert_moles(void);
470
+ #ifdef SLNQ
471
+ int add_trivial_eqns(int rows, int cols, LDBLE* matrix);
472
+ //int slnq(int n, LDBLE * a, LDBLE * delta, int ncols, int print);
473
+ #endif
474
+ int calc_gas_pressures(void);
475
+ int calc_fixed_volume_gas_pressures(void);
476
+ double calc_gas_binary_parameter(std::string name1, std::string name2) const;
477
+ int calc_ss_fractions(void);
478
+ int gammas(LDBLE mu);
479
+ int gammas_a_f(int i);
480
+ int initial_guesses(void);
481
+ int revise_guesses(void);
482
+ int ss_binary(cxxSS* ss_ptr);
483
+ int ss_ideal(cxxSS* ss_ptr);
484
+
485
+ // parse.cpp -------------------------------
486
+ int check_eqn(int association);
487
+ int get_charge(char* charge, size_t charge_size, LDBLE* z);
488
+ int get_elt(const char** t_ptr, std::string& element, int* i);
489
+ int get_elts_in_species(const char** t_ptr, LDBLE coef);
490
+ int get_num(const char** t_ptr, LDBLE* num);
491
+ int get_secondary_in_species(const char** t_ptr, LDBLE coef);
492
+ int parse_eq(char* eqn, std::vector<class elt_list>& new_elt_list, int association);
493
+ int get_coef(LDBLE* coef, const char** eqnaddr);
494
+ int get_secondary(const char** t_ptr, char* element, int* i);
495
+ int get_species(const char** ptr);
496
+
497
+ // phqalloc.cpp -------------------------------
498
+ public:
499
+ #if !defined(NDEBUG)
500
+ void* PHRQ_malloc(size_t, const char*, int);
501
+ void* PHRQ_calloc(size_t, size_t, const char*, int);
502
+ void* PHRQ_realloc(void*, size_t, const char*, int);
503
+ #else
504
+ void* PHRQ_malloc(size_t);
505
+ void* PHRQ_calloc(size_t, size_t);
506
+ void* PHRQ_realloc(void*, size_t);
507
+ #endif
508
+ void PHRQ_free(void* ptr);
509
+ void PHRQ_free_all(void);
510
+
511
+ public:
512
+
513
+ // pitzer.cpp -------------------------------
514
+ class pitz_param* pitz_param_read(char* string, int n);
515
+ void pitz_param_store(class pitz_param* pzp_ptr);
516
+ void sit_param_store(class pitz_param* pzp_ptr);
517
+ class pitz_param* pitz_param_copy(const class pitz_param* src);
518
+ class theta_param* theta_param_search(LDBLE zj, LDBLE zk);
519
+ void pitzer_make_lists(void);
520
+ int gammas_pz(bool exch_a_f);
521
+ int model_pz(void);
522
+ int pitzer(void);
523
+ int pitzer_clean_up(void);
524
+ int pitzer_init(void);
525
+ int pitzer_tidy(void);
526
+ int read_pitzer(void);
527
+ int set_pz(int initial);
528
+ int calc_pitz_param(class pitz_param* pz_ptr, LDBLE TK, LDBLE TR);
529
+ int check_gammas_pz(void);
530
+ int ISPEC(const char* name);
531
+ LDBLE G(LDBLE Y);
532
+ LDBLE GP(LDBLE Y);
533
+ int ETHETAS(LDBLE ZJ, LDBLE ZK, LDBLE I, LDBLE* etheta,
534
+ LDBLE* ethetap);
535
+ void ETHETA_PARAMS(LDBLE X, LDBLE& JAY, LDBLE& JPRIME);
536
+ int pitzer_initial_guesses(void);
537
+ int pitzer_revise_guesses(void);
538
+ int PTEMP(LDBLE TK);
539
+ int jacobian_pz(void);
540
+
541
+ // prep.cpp -------------------------------
542
+ int add_potential_factor(void);
543
+ int add_cd_music_factors(int n);
544
+ int add_surface_charge_balance(void);
545
+ int add_cd_music_charge_balances(int i);
546
+ int build_gas_phase(void);
547
+ int build_fixed_volume_gas(void);
548
+ int build_jacobian_sums(int k);
549
+ int build_mb_sums(void);
550
+ int build_min_exch(void);
551
+ int build_model(void);
552
+ int build_pure_phases(void);
553
+ int build_ss_assemblage(void);
554
+ int build_solution_phase_boundaries(void);
555
+ int build_species_list(int n);
556
+ int build_min_surface(void);
557
+ LDBLE calc_lk_phase(phase* p_ptr, LDBLE TK, LDBLE pa);
558
+ LDBLE calc_PR(std::vector<class phase*> phase_ptrs, LDBLE P, LDBLE TK, LDBLE V_m);
559
+ LDBLE calc_PR();
560
+ int calc_vm(LDBLE tc, LDBLE pa);
561
+ LDBLE calc_vm0(const char *species_name, LDBLE tc, LDBLE pa, LDBLE mu);
562
+ int clear(void);
563
+ int convert_units(cxxSolution* solution_ptr);
564
+ class unknown* find_surface_charge_unknown(std::string& str_ptr, int plane);
565
+ std::vector<class master*> get_list_master_ptrs(const char* cptr, class master* master_ptr);
566
+ int inout(void);
567
+ int is_special(class species* spec);
568
+ int mb_for_species_aq(int n);
569
+ int mb_for_species_ex(int n);
570
+ int mb_for_species_surf(int n);
571
+ int quick_setup(void);
572
+ int resetup_master(void);
573
+ int save_model(void);
574
+ int setup_exchange(void);
575
+ int setup_gas_phase(void);
576
+ int setup_fixed_volume_gas(void);
577
+ int setup_master_rxn(const std::vector<class master*>& master_ptr_list,
578
+ const std::string& pe_rxn);
579
+ int setup_pure_phases(void);
580
+ int adjust_setup_pure_phases(void);
581
+ int setup_related_surface(void);
582
+ int setup_ss_assemblage(void);
583
+ int setup_solution(void);
584
+ int adjust_setup_solution(void);
585
+ int setup_surface(void);
586
+ int setup_unknowns(void);
587
+ int store_dn(int k, LDBLE* source, int row, LDBLE coef_in,
588
+ LDBLE* gamma_source);
589
+ int store_jacob(LDBLE* source, LDBLE* target, LDBLE coef);
590
+ int store_jacob0(int row, int column, LDBLE coef);
591
+ int store_mb(LDBLE* source, LDBLE* target, LDBLE coef);
592
+ int store_mb_unknowns(class unknown* unknown_ptr, LDBLE* LDBLE_ptr,
593
+ LDBLE coef, LDBLE* gamma_ptr);
594
+ int store_sum_deltas(LDBLE* source, LDBLE* target, LDBLE coef);
595
+ int tidy_redox(void);
596
+ int write_mb_eqn_x(void);
597
+ int write_mb_for_species_list(int n);
598
+ int write_mass_action_eqn_x(int stop);
599
+
600
+ int check_same_model(void);
601
+ int k_temp(LDBLE tc, LDBLE pa);
602
+ LDBLE k_calc(LDBLE* logk, LDBLE tempk, LDBLE presPa);
603
+ int prep(void);
604
+ int reprep(void);
605
+ int rewrite_master_to_secondary(class master* master_ptr1,
606
+ class master* master_ptr2);
607
+ int switch_bases(void);
608
+ int write_phase_sys_total(int n);
609
+
610
+ // print.cpp -------------------------------
611
+ char* sformatf(const char* format, ...);
612
+ int array_print(LDBLE* array_l, int row_count, int column_count,
613
+ int max_column_count);
614
+ int set_pr_in_false(void);
615
+ int print_all(void);
616
+ int print_exchange(void);
617
+ int print_gas_phase(void);
618
+ int print_master_reactions(void);
619
+ int print_species(void);
620
+ int print_surface(void);
621
+ int print_user_print(void);
622
+ int punch_all(void);
623
+ int print_alkalinity(void);
624
+ int print_diffuse_layer(cxxSurfaceCharge* surface_charge_ptr);
625
+ int print_eh(void);
626
+ int print_reaction(void);
627
+ int print_kinetics(void);
628
+ int print_mix(void);
629
+ int print_pp_assemblage(void);
630
+ int print_ss_assemblage(void);
631
+ int print_saturation_indices(void);
632
+ int print_surface_cd_music(void);
633
+ int print_totals(void);
634
+ int print_using(void);
635
+ int punch_gas_phase(void);
636
+ int punch_identifiers(void);
637
+ int punch_kinetics(void);
638
+ int punch_molalities(void);
639
+ int punch_activities(void);
640
+ int punch_pp_assemblage(void);
641
+ int punch_ss_assemblage(void);
642
+ int punch_saturation_indices(void);
643
+ int punch_totals(void);
644
+ int punch_user_punch(void);
645
+ #if defined MULTICHART
646
+ int punch_user_graph(void);
647
+ #endif
648
+
649
+ // read.cpp -------------------------------
650
+ int read_input(void);
651
+ int* read_list_ints_range(const char** ptr, int* count_ints, int positive,
652
+ int* int_list);
653
+ int read_list_ints_range(const char** cptr, bool positive, std::vector<int>& int_list);
654
+
655
+ int read_log_k_only(const char* cptr, LDBLE* log_k);
656
+ int read_t_c_only(const char* cptr, LDBLE* t_c);
657
+ int read_p_c_only(const char* cptr, LDBLE* p_c);
658
+ int read_omega_only(const char* cptr, LDBLE* omega);
659
+ int read_number_description(const char* cptr, int* n_user, int* n_user_end,
660
+ char** description, int allow_negative = FALSE);
661
+ int check_key(const char* str);
662
+ int check_units(std::string& tot_units, bool alkalinity, bool check_compatibility,
663
+ const char* default_units, bool print);
664
+ int find_option(const char* item, int* n, const char** list, int count_list,
665
+ int exact);
666
+ int get_option(const char** opt_list, int count_opt_list, const char** next_char);
667
+ int get_true_false(const char* string, int default_value);
668
+
669
+ int add_psi_master_species(char* token);
670
+ int read_advection(void);
671
+ int read_analytical_expression_only(const char* cptr, LDBLE* log_k);
672
+ /* VP: Density Start */
673
+ int read_millero_abcdef(const char* cptr, LDBLE* abcdef);
674
+ /* VP: Density End */
675
+ int read_viscosity_parms(const char* cptr, LDBLE* Jones_Dole);
676
+ int read_copy(void);
677
+ int read_debug(void);
678
+ int read_delta_h_only(const char* cptr, LDBLE* delta_h,
679
+ DELTA_H_UNIT* units);
680
+ int read_aq_species_vm_parms(const char* cptr, LDBLE* delta_v);
681
+ int read_vm_only(const char* cptr, LDBLE* delta_v,
682
+ DELTA_V_UNIT* units);
683
+ int read_phase_vm(const char* cptr, LDBLE* delta_v,
684
+ DELTA_V_UNIT* units);
685
+ int read_llnl_aqueous_model_parameters(void);
686
+ int read_exchange(void);
687
+ int read_exchange_master_species(void);
688
+ int read_exchange_species(void);
689
+ int read_gas_phase(void);
690
+ int read_incremental_reactions(void);
691
+ int read_inverse(void);
692
+ int read_inv_balances(class inverse* inverse_ptr, const char* next_char);
693
+ int read_inv_isotopes(class inverse* inverse_ptr, const char* cptr);
694
+ int read_inv_phases(class inverse* inverse_ptr, const char* next_char);
695
+ int read_kinetics(void);
696
+ bool read_vector_doubles(const char** ptr, std::vector<double>& v);
697
+ bool read_vector_ints(const char** cptr, std::vector<int>& v, int positive);
698
+ bool read_vector_t_f(const char** ptr, std::vector<bool>& v);
699
+ int read_master_species(void);
700
+ int read_rate_parameters_pk(void);
701
+ int read_rate_parameters_svd(void);
702
+ int read_rate_parameters_hermanska(void);
703
+ int read_mean_gammas(void);
704
+ int read_gas_binary_parameters(void);
705
+ int read_mix(void);
706
+ int read_entity_mix(std::map<int, cxxMix>& mix_map);
707
+ //int read_solution_mix(void);
708
+ int read_named_logk(void);
709
+ int read_phases(void);
710
+ int read_print(void);
711
+ int read_pp_assemblage(void);
712
+ int read_rates(void);
713
+ int read_reaction(void);
714
+ int read_reaction_reactants(cxxReaction* reaction_ptr);
715
+ int read_reaction_steps(cxxReaction* reaction_ptr);
716
+ int read_solid_solutions(void);
717
+ int read_temperature(void);
718
+ //int read_reaction_temps(struct temperature* temperature_ptr);
719
+ int read_reaction_pressure(void);
720
+ int read_reaction_pressure_raw(void);
721
+ int read_save(void);
722
+ int read_selected_output(void);
723
+ int read_solution(void);
724
+ int read_species(void);
725
+ int read_surface(void);
726
+ int read_surface_master_species(void);
727
+ int read_surface_species(void);
728
+ int read_use(void);
729
+ int read_title(void);
730
+ int read_user_print(void);
731
+ int read_user_punch(void);
732
+ #if defined MULTICHART
733
+ int read_user_graph_handler();
734
+ #endif
735
+ int next_keyword_or_option(const char** opt_list, int count_opt_list);
736
+ int cleanup_after_parser(CParser& parser);
737
+
738
+ // ReadClass.cxx
739
+ int read_dump(void);
740
+ int read_delete(void);
741
+ int read_run_cells(void);
742
+ int streamify_to_next_keyword(std::istringstream& lines);
743
+ int dump_entities(void);
744
+ int delete_entities(void);
745
+ int run_as_cells(void);
746
+ void dump_ostream(std::ostream& os);
747
+
748
+ // readtr.cpp -------------------------------
749
+ int read_transport(void);
750
+ int dump(void);
751
+ //int dump_exchange(int k);
752
+ //int dump_gas_phase(int k);
753
+ //int dump_kinetics(int k);
754
+ //int dump_mix(int k);
755
+ //int dump_pp_assemblage(int k);
756
+ //int dump_reaction(int k);
757
+ //int dump_ss_assemblage(int k);
758
+ //int dump_solution(int k);
759
+ //int dump_surface(int k);
760
+ int dump_cpp(void);
761
+ int read_line_LDBLEs(const char* next_char, LDBLE** d, int* count_d,
762
+ int* count_alloc);
763
+
764
+ // sit.cpp -------------------------------
765
+ int gammas_sit(void);
766
+ int model_sit(void);
767
+ int sit(void);
768
+ int sit_clean_up(void);
769
+ int sit_init(void);
770
+ int sit_tidy(void);
771
+ int read_sit(void);
772
+ int set_sit(int initial);
773
+ int calc_sit_param(class pitz_param* pz_ptr, LDBLE TK, LDBLE TR);
774
+ int check_gammas_sit(void);
775
+ int sit_ISPEC(const char* name);
776
+ /*int DH_AB (LDBLE TK, LDBLE *A, LDBLE *B);*/
777
+ int sit_initial_guesses(void);
778
+ int sit_revise_guesses(void);
779
+ int PTEMP_SIT(LDBLE tk);
780
+ void sit_make_lists(void);
781
+ int jacobian_sit(void);
782
+
783
+ // spread.cpp -------------------------------
784
+ int read_solution_spread(void);
785
+ int copy_token_tab(std::string& token, const char** cptr);
786
+ int get_option_string(const char** opt_list, int count_opt_list,
787
+ const char** next_char);
788
+ int spread_row_free(class spread_row* spread_row_ptr);
789
+ int spread_row_to_solution(class spread_row* heading,
790
+ class spread_row* units,
791
+ class spread_row* data,
792
+ class defaults defaults);
793
+ class spread_row* string_to_spread_row(char* string);
794
+ #ifdef PHREEQCI_GUI
795
+ void add_row(class spread_row* spread_row_ptr);
796
+ void free_spread(void);
797
+ class spread_row* copy_row(class spread_row* spread_row_ptr);
798
+ #endif
799
+
800
+ // step.cpp -------------------------------
801
+ int step(LDBLE step_fraction);
802
+ int xsolution_zero(void);
803
+ int add_exchange(cxxExchange* exchange_ptr);
804
+ int add_gas_phase(cxxGasPhase* gas_phase_ptr);
805
+ int add_kinetics(cxxKinetics* kinetics_ptr);
806
+ int add_mix(cxxMix* mix_ptr);
807
+ int add_pp_assemblage(cxxPPassemblage* pp_assemblage_ptr);
808
+ int add_reaction(cxxReaction* reaction_ptr, int step_number, LDBLE step_fraction);
809
+ int add_ss_assemblage(cxxSSassemblage* ss_assemblage_ptr);
810
+ int add_solution(cxxSolution* solution_ptr, LDBLE extensive,
811
+ LDBLE intensive);
812
+ int add_surface(cxxSurface* surface_ptr);
813
+ int check_pp_assemblage(cxxPPassemblage* pp_assemblage_ptr);
814
+ int gas_phase_check(cxxGasPhase* gas_phase_ptr);
815
+ int pp_assemblage_check(cxxPPassemblage* pp_assemblage_ptr);
816
+ int reaction_calc(cxxReaction* reaction_ptr);
817
+ int solution_check(void);
818
+ int ss_assemblage_check(cxxSSassemblage* ss_assemblage_ptr);
819
+
820
+ // structures.cpp -------------------------------
821
+ int clean_up(void);
822
+ int reinitialize(void);
823
+
824
+ int copier_add(class copier* copier_ptr, int n_user, int start, int end);
825
+ int copier_clear(class copier* copier_ptr);
826
+ //
827
+ CReaction CReaction_internal_copy(CReaction& rxn_ref);
828
+ double rxn_find_coef(CReaction& r_ptr, const char* str);
829
+ //
830
+ static int element_compare(const void* ptr1, const void* ptr2);
831
+ class element* element_store(const char* element);
832
+ //
833
+ int add_elt_list(const cxxNameDouble& nd, LDBLE coef);
834
+ int add_elt_list(const std::vector<class elt_list>& el, double coef);
835
+ int change_hydrogen_in_elt_list(LDBLE charge);
836
+ int elt_list_combine(void);
837
+ static int elt_list_compare(const void* ptr1, const void* ptr2);
838
+ std::vector<class elt_list> elt_list_internal_copy(const std::vector<class elt_list>& el);
839
+ std::vector<class elt_list> elt_list_vsave(void);
840
+ cxxNameDouble elt_list_NameDouble(void);
841
+ //
842
+ enum entity_type get_entity_enum(char* name);
843
+ //
844
+ class inverse* inverse_alloc(void);
845
+ int inverse_delete(int i);
846
+ static int inverse_isotope_compare(const void* ptr1, const void* ptr2);
847
+ class inverse* inverse_search(int n_user, int* n);
848
+ int inverse_sort(void);
849
+ //
850
+ class logk* logk_alloc(void);
851
+ int logk_copy2orig(class logk* logk_ptr);
852
+ class logk* logk_store(const char* name, int replace_if_found);
853
+ class logk* logk_search(const char* name);
854
+ //
855
+ class master* master_alloc(void);
856
+ static int master_compare(const void* ptr1, const void* ptr2);
857
+ int master_delete(const char* cptr);
858
+ class master* master_bsearch(const char* cptr);
859
+ class master* master_bsearch_primary(const char* cptr);
860
+ class master* master_bsearch_secondary(const char* cptr);
861
+ class master* master_search(const char* cptr, int* n);
862
+ class master* surface_get_psi_master(const char* name, int plane);
863
+ //
864
+ class phase* phase_bsearch(const char* cptr, int* j, int print);
865
+ #ifdef OBSOLETE
866
+ static int phase_compare(const void* ptr1, const void* ptr2);
867
+ #endif
868
+ int phase_delete(int i);
869
+ class phase* phase_store(const char* name);
870
+ //
871
+ class rate* rate_bsearch(const char* cptr, int* j);
872
+ int rate_free(class rate* rate_ptr);
873
+ class rate* rate_copy(const class rate* rate_ptr);
874
+ class rate* rate_search(const char* name, int* n);
875
+ int rate_sort(void);
876
+ //
877
+ static int s_compare(const void* ptr1, const void* ptr2);
878
+ int s_delete(int i);
879
+ class species* s_search(const char* name);
880
+ class species* s_store(const char* name, LDBLE z, int replace_if_found);
881
+ //
882
+ static int isotope_compare(const void* ptr1, const void* ptr2);
883
+ //
884
+ static int species_list_compare_alk(const void* ptr1, const void* ptr2);
885
+ static int species_list_compare_master(const void* ptr1, const void* ptr2);
886
+ int species_list_sort(void);
887
+ //
888
+ struct Change_Surf* change_surf_alloc(int count);
889
+ //
890
+ int system_duplicate(int i, int save_old);
891
+ //
892
+ //
893
+ bool phase_rxn_to_trxn(class phase* phase_ptr, CReaction& rxn_ptr);
894
+ bool trxn_add(CReaction& r_ptr, double coef, bool combine);
895
+ bool trxn_add_phase(CReaction& r_ref, double coef, bool combine);
896
+ int trxn_combine(void);
897
+ static int trxn_compare(const void* ptr1, const void* ptr2);
898
+ bool trxn_copy(CReaction& rxn_ref);
899
+ LDBLE trxn_find_coef(const char* str, int start);
900
+ int trxn_multiply(LDBLE coef);
901
+ int trxn_print(void);
902
+ int trxn_reverse_k(void);
903
+ int trxn_sort(void);
904
+ int trxn_swap(const char* token);
905
+
906
+ class unknown* unknown_alloc(void);
907
+ int unknown_delete(int i);
908
+ int unknown_free(class unknown* unknown_ptr);
909
+ int entity_exists(const char* name, int n_user);
910
+ static int inverse_compare(const void* ptr1, const void* ptr2);
911
+ int inverse_free(class inverse* inverse_ptr);
912
+ int logk_init(class logk* logk_ptr);
913
+ static int master_compare_string(const void* ptr1, const void* ptr2);
914
+ int master_free(class master* master_ptr);
915
+ class phase* phase_alloc(void);
916
+ static int phase_compare_string(const void* ptr1, const void* ptr2);
917
+ int phase_free(class phase* phase_ptr);
918
+ int phase_init(class phase* phase_ptr);
919
+ static int rate_compare(const void* ptr1, const void* ptr2);
920
+ static int rate_compare_string(const void* ptr1, const void* ptr2);
921
+ class species* s_alloc(void);
922
+ int s_free(class species* s_ptr);
923
+ int s_init(class species* s_ptr);
924
+ static int species_list_compare(const void* ptr1, const void* ptr2);
925
+
926
+ void Use2cxxStorageBin(cxxStorageBin& sb);
927
+ void phreeqc2cxxStorageBin(cxxStorageBin& sb);
928
+ void phreeqc2cxxStorageBin(cxxStorageBin& sb, int n);
929
+ void cxxStorageBin2phreeqc(cxxStorageBin& sb, int n);
930
+ void cxxStorageBin2phreeqc(cxxStorageBin& sb);
931
+
932
+ /* tally.cpp */
933
+ void add_all_components_tally(void);
934
+ int build_tally_table(void);
935
+ int calc_dummy_kinetic_reaction_tally(cxxKinetics* kinetics_ptr);
936
+ int diff_tally_table(void);
937
+ int extend_tally_table(void);
938
+ int free_tally_table(void);
939
+ int fill_tally_table(int* n_user, int index_conservative, int n_buffer);
940
+ int get_tally_table_rows_columns(int* rows, int* columns);
941
+ int get_tally_table_column_heading(int column, int* type, char* string);
942
+ int get_tally_table_row_heading(int column, char* string);
943
+ int store_tally_table(LDBLE* array, int row_dim, int col_dim,
944
+ LDBLE fill_factor);
945
+ int zero_tally_table(void);
946
+ int elt_list_to_tally_table(class tally_buffer* buffer_ptr);
947
+ int master_to_tally_table(class tally_buffer* buffer_ptr);
948
+ int get_all_components(void);
949
+ int print_tally_table(void);
950
+ int set_reaction_moles(int n_user, LDBLE moles);
951
+ int set_reaction_temperature(int n_user, LDBLE tc);
952
+ int set_kinetics_time(int n_user, LDBLE step);
953
+
954
+ // tidy.cpp -------------------------------
955
+ int add_other_logk(LDBLE* source_k, std::vector<class name_coef>& add_logk);
956
+ int add_logks(class logk* logk_ptr, int repeats);
957
+ LDBLE halve(LDBLE f(LDBLE x, void*), LDBLE x0, LDBLE x1, LDBLE tol);
958
+ int replace_solids_gases(void);
959
+ int ss_prep(LDBLE t, cxxSS* ss_ptr, int print);
960
+ int select_log_k_expression(LDBLE* source_k, LDBLE* target_k);
961
+ int slnq(int n, LDBLE* a, LDBLE* delta, int ncols, int print);
962
+ public:
963
+ int tidy_punch(void);
964
+ int tidy_model(void);
965
+ int check_species_input(void);
966
+ LDBLE coef_in_master(class master* master_ptr);
967
+ int reset_last_model(void);
968
+ int rewrite_eqn_to_primary(void);
969
+ int rewrite_eqn_to_secondary(void);
970
+ int species_rxn_to_trxn(class species* s_ptr);
971
+ int tidy_logk(void);
972
+ int tidy_exchange(void);
973
+ int tidy_min_exchange(void);
974
+ int update_min_exchange(void);
975
+ int tidy_kin_exchange(void);
976
+ int update_kin_exchange(void);
977
+ int tidy_gas_phase(void);
978
+ int tidy_inverse(void);
979
+ int tidy_isotopes(void);
980
+ int tidy_isotope_ratios(void);
981
+ int tidy_isotope_alphas(void);
982
+ int tidy_kin_surface(void);
983
+ int update_kin_surface(void);
984
+ int tidy_master_isotope(void);
985
+ int tidy_min_surface(void);
986
+ int update_min_surface(void);
987
+ int tidy_phases(void);
988
+ int tidy_pp_assemblage(void);
989
+ int tidy_solutions(void);
990
+ int tidy_ss_assemblage(void);
991
+ int tidy_species(void);
992
+ int tidy_surface(void);
993
+ int scan(LDBLE f(LDBLE x, void*), LDBLE* xx0, LDBLE* xx1);
994
+ static LDBLE f_spinodal(LDBLE x, void*);
995
+ int solve_misc(LDBLE* xxc1, LDBLE* xxc2, LDBLE tol);
996
+ int ss_calc_a0_a1(cxxSS* ss_ptr);
997
+
998
+ // transport.cpp -------------------------------
999
+ int transport(void);
1000
+ void print_punch(int i, boolean active);
1001
+ int set_initial_moles(int i);
1002
+ cxxSurface sum_surface_comp(cxxSurface* source1, LDBLE f1,
1003
+ cxxSurface* source2, std::string charge_name, LDBLE f2,
1004
+ LDBLE new_Dw);
1005
+ int reformat_surf(const char* comp_name, LDBLE fraction, const char* new_comp_name,
1006
+ LDBLE new_Dw, int cell);
1007
+ LDBLE viscosity(cxxSurface *surf_ptr);
1008
+ LDBLE calc_f_visc(const char *name);
1009
+ LDBLE calc_vm_Cl(void);
1010
+ int multi_D(LDBLE DDt, int mobile_cell, int stagnant);
1011
+ LDBLE find_J(int icell, int jcell, LDBLE mixf, LDBLE DDt, int stagnant);
1012
+ void calc_b_ij(int icell, int jcell, int k, LDBLE b_i, LDBLE b_j, LDBLE g_i, LDBLE g_j, LDBLE free_i, LDBLE free_j, int stagnant);
1013
+ void diffuse_implicit(LDBLE DDt, int stagnant);
1014
+ int fill_spec(int cell_no, int ref_cell);
1015
+ LDBLE moles_from_redox_states(cxxSolution* sptr, const char* name);
1016
+ LDBLE moles_from_donnan_layer(cxxSurface* sptr, const char* name, LDBLE moles_needed);
1017
+ LDBLE add_MCD_moles(LDBLE moles, LDBLE min_mol, int i, cxxSolution* sptr, const char* name);
1018
+ int fill_m_s(class J_ij* J_ij, int J_ij_count_spec, int i, int stagnant);
1019
+ static int sort_species_name(const void* ptr1, const void* ptr2);
1020
+ int disp_surf(LDBLE stagkin_time);
1021
+ int diff_stag_surf(int mobile_cell);
1022
+ int check_surfaces(cxxSurface* surface_ptr1, cxxSurface* surface_ptr2);
1023
+ cxxSurface mobile_surface_copy(cxxSurface* surface_old_ptr,
1024
+ int n_user_new,
1025
+ bool move_old);
1026
+ void transport_cleanup(void);
1027
+ int init_mix(void);
1028
+ int init_heat_mix(int nmix);
1029
+ int heat_mix(int heat_nmix);
1030
+ int mix_stag(int i, LDBLE stagkin_time, int punch,
1031
+ LDBLE step_fraction_kin);
1032
+
1033
+ // utilities.cpp -------------------------------
1034
+ public:
1035
+ double calc_alk(CReaction& rxn_ptr);
1036
+ double calc_delta_v(CReaction& r_ref, bool phase);
1037
+ LDBLE calc_dielectrics(LDBLE tc, LDBLE pa);
1038
+ LDBLE calc_rho_0(LDBLE tc, LDBLE pa);
1039
+ int compute_gfw(const char* string, LDBLE* gfw);
1040
+ static int copy_token(char* token_ptr, const char** ptr, int* length);
1041
+ static int copy_token(std::string& token, const char** ptr);
1042
+ int dup_print(const char* cptr, int emphasis);
1043
+ int equal(LDBLE a, LDBLE b, LDBLE eps);
1044
+ void* free_check_null(void* ptr);
1045
+ int get_token(const char** eqnaddr, std::string& string, LDBLE* z, int* l);
1046
+ int islegit(const char c);
1047
+ void malloc_error(void);
1048
+ int print_centered(const char* string);
1049
+ static int replace(const char* str1, const char* str2, char* str);
1050
+ static void replace(std::string &stds, const char* str1, const char* str2);
1051
+ static bool replace(const char* str1, const char* str2, std::string& str);
1052
+ static int strcmp_nocase(const char* str1, const char* str2);
1053
+ static int strcmp_nocase_arg1(const char* str1, const char* str2);
1054
+ static void str_tolower(std::string& name);
1055
+ void space(void** ptr, int i, int* max, int struct_size);
1056
+ void squeeze_white(char* s_l);
1057
+ int status(int count, const char* str, bool kinetics = false);
1058
+ void str_tolower(char* str);
1059
+ void str_toupper(char* str);
1060
+ #if !defined(NDEBUG) && defined(WIN32_MEMORY_DEBUG)
1061
+ char* _string_duplicate(const char* token, const char* szFileName, int nLine);
1062
+ #else
1063
+ char* string_duplicate(const char* token);
1064
+ #endif
1065
+ const char* string_hsave(const char* str);
1066
+ void strings_map_clear();
1067
+ protected:
1068
+ char* string_pad(const char* str, int i);
1069
+ static int string_trim(char* str);
1070
+ static int string_trim_right(char* str);
1071
+ static int string_trim_left(char* str);
1072
+ static void string_trim(std::string& str);
1073
+ static void string_trim_left(std::string& str);
1074
+ static void string_trim_right(std::string& str);
1075
+ static LDBLE under(LDBLE xval);
1076
+ int get_input_errors(void);
1077
+ int isamong(char c, const char* s_l);
1078
+ public:
1079
+ int main_method(int argc, char* argv[]);
1080
+ void set_phast(int);
1081
+ int next_user_number(Keywords::KEYWORDS key);
1082
+ size_t list_components(std::list<std::string>& list_c);
1083
+ size_t list_EquilibriumPhases(std::list<std::string>& list_pp);
1084
+ size_t list_GasComponents(std::list<std::string>& list_gc);
1085
+ size_t list_KineticReactions(std::list<std::string>& list_kr);
1086
+ size_t list_SolidSolutions(std::list<std::string>& list_comps, std::list<std::string>& list_names);
1087
+ size_t list_Surfaces(std::list<std::string>& surftype, std::list<std::string>& surf);
1088
+ size_t list_Exchangers(std::list<std::string>& ex);
1089
+ PHRQ_io* Get_phrq_io(void) { return this->phrq_io; }
1090
+ void Set_run_cells_one_step(const bool tf) { this->run_cells_one_step = tf; }
1091
+
1092
+
1093
+ std::map<int, cxxSolution>& Get_Rxn_solution_map() { return this->Rxn_solution_map; }
1094
+ std::map<int, cxxExchange>& Get_Rxn_exchange_map() { return this->Rxn_exchange_map; }
1095
+ std::map<int, cxxGasPhase>& Get_Rxn_gas_phase_map() { return this->Rxn_gas_phase_map; }
1096
+ std::map<int, cxxKinetics>& Get_Rxn_kinetics_map() { return this->Rxn_kinetics_map; }
1097
+ std::map<int, cxxPPassemblage>& Get_Rxn_pp_assemblage_map() { return this->Rxn_pp_assemblage_map; }
1098
+ std::map<int, cxxSSassemblage>& Get_Rxn_ss_assemblage_map() { return this->Rxn_ss_assemblage_map; }
1099
+ std::map<int, cxxSurface>& Get_Rxn_surface_map() { return this->Rxn_surface_map; }
1100
+ std::map<int, cxxMix>& Get_Rxn_mix_map() { return this->Rxn_mix_map; }
1101
+ std::map<int, cxxReaction>& Get_Rxn_reaction_map() { return this->Rxn_reaction_map; }
1102
+ std::map<int, cxxTemperature>& Get_Rxn_temperature_map() { return this->Rxn_temperature_map; }
1103
+ std::map<int, cxxPressure>& Get_Rxn_pressure_map() { return this->Rxn_pressure_map; }
1104
+
1105
+ protected:
1106
+ void init(void);
1107
+
1108
+ //
1109
+ //Data members
1110
+ //
1111
+ protected:
1112
+ PHRQ_io* phrq_io;
1113
+ PHRQ_io ioInstance;
1114
+ int same_model;
1115
+
1116
+ LDBLE current_tc;
1117
+ LDBLE current_pa;
1118
+ LDBLE current_mu;
1119
+ bool mu_terms_in_logk;
1120
+
1121
+ /* ----------------------------------------------------------------------
1122
+ * STRUCTURES
1123
+ * ---------------------------------------------------------------------- */
1124
+
1125
+ Model last_model;
1126
+ //struct punch punch;
1127
+ bool high_precision;
1128
+
1129
+ /* ----------------------------------------------------------------------
1130
+ * Temperatures
1131
+ * ---------------------------------------------------------------------- */
1132
+
1133
+ std::map<int, cxxTemperature> Rxn_temperature_map;
1134
+
1135
+ /* ----------------------------------------------------------------------
1136
+ * Pressures
1137
+ * ---------------------------------------------------------------------- */
1138
+ std::map<int, cxxPressure> Rxn_pressure_map;
1139
+
1140
+ /* ----------------------------------------------------------------------
1141
+ * Surface
1142
+ * --------------------------------------------------------------------- */
1143
+
1144
+ int g_iterations;
1145
+ LDBLE G_TOL;
1146
+ std::map <int, cxxSurface> Rxn_surface_map;
1147
+ std::map <LDBLE, LDBLE> charge_group_map;
1148
+ int change_surf_count;
1149
+ struct Change_Surf* change_surf;
1150
+
1151
+ /* ----------------------------------------------------------------------
1152
+ * Exchange
1153
+ * ---------------------------------------------------------------------- */
1154
+ std::map<int, cxxExchange> Rxn_exchange_map;
1155
+
1156
+ /* ----------------------------------------------------------------------
1157
+ * Kinetics
1158
+ * ---------------------------------------------------------------------- */
1159
+ std::map<int, cxxKinetics> Rxn_kinetics_map;
1160
+ bool use_kinetics_limiter;
1161
+
1162
+ /*----------------------------------------------------------------------
1163
+ * Save
1164
+ *---------------------------------------------------------------------- */
1165
+ std::map<std::string, double> save_values;
1166
+ std::map<std::string, std::string> save_strings;
1167
+ class save save;
1168
+
1169
+ /*----------------------------------------------------------------------
1170
+ * Use
1171
+ *---------------------------------------------------------------------- */
1172
+ cxxUse use;
1173
+
1174
+ /*----------------------------------------------------------------------
1175
+ * Copy
1176
+ *---------------------------------------------------------------------- */
1177
+ class copier copy_solution;
1178
+ class copier copy_pp_assemblage;
1179
+ class copier copy_exchange;
1180
+ class copier copy_surface;
1181
+ class copier copy_ss_assemblage;
1182
+ class copier copy_gas_phase;
1183
+ class copier copy_kinetics;
1184
+ class copier copy_mix;
1185
+ class copier copy_reaction;
1186
+ class copier copy_temperature;
1187
+ class copier copy_pressure;
1188
+
1189
+ /*----------------------------------------------------------------------
1190
+ * Inverse
1191
+ *---------------------------------------------------------------------- */
1192
+ std::vector<class inverse> inverse;
1193
+ int count_inverse;
1194
+ /*----------------------------------------------------------------------
1195
+ * Rates
1196
+ *---------------------------------------------------------------------- */
1197
+ std::map<std::string, std::vector<double> > rate_parameters_pk;
1198
+ std::map<std::string, std::vector<double> > rate_parameters_svd;
1199
+ std::map<std::string, std::vector<double> > rate_parameters_hermanska;
1200
+ /*----------------------------------------------------------------------
1201
+ * Mean gammas
1202
+ *---------------------------------------------------------------------- */
1203
+ std::map<std::string, cxxNameDouble> mean_gammas;
1204
+ /*----------------------------------------------------------------------
1205
+ * Mix
1206
+ *---------------------------------------------------------------------- */
1207
+ std::map<int, cxxMix> Rxn_mix_map;
1208
+ std::map<int, cxxMix> Dispersion_mix_map;
1209
+ std::map<int, cxxMix> Rxn_solution_mix_map;
1210
+ std::map<int, cxxMix> Rxn_exchange_mix_map;
1211
+ std::map<int, cxxMix> Rxn_gas_phase_mix_map;
1212
+ std::map<int, cxxMix> Rxn_kinetics_mix_map;
1213
+ std::map<int, cxxMix> Rxn_pp_assemblage_mix_map;
1214
+ std::map<int, cxxMix> Rxn_ss_assemblage_mix_map;
1215
+ std::map<int, cxxMix> Rxn_surface_mix_map;
1216
+ /*
1217
+ * List new definitions
1218
+ */
1219
+ std::set<int> Rxn_new_exchange;
1220
+ std::set<int> Rxn_new_gas_phase;
1221
+ std::set<int> Rxn_new_kinetics; // not used
1222
+ std::set<int> Rxn_new_mix; // not used
1223
+ std::set<int> Rxn_new_pp_assemblage;
1224
+ std::set<int> Rxn_new_pressure; // not used
1225
+ std::set<int> Rxn_new_reaction; // not used
1226
+ std::set<int> Rxn_new_solution;
1227
+ std::set<int> Rxn_new_ss_assemblage;
1228
+ std::set<int> Rxn_new_surface;
1229
+ std::set<int> Rxn_new_temperature; // not used
1230
+ /*----------------------------------------------------------------------
1231
+ * Irreversible reaction
1232
+ *---------------------------------------------------------------------- */
1233
+ std::map<int, cxxReaction> Rxn_reaction_map;
1234
+
1235
+ /*----------------------------------------------------------------------
1236
+ * Gas phase
1237
+ *---------------------------------------------------------------------- */
1238
+ std::map<int, cxxGasPhase> Rxn_gas_phase_map;
1239
+
1240
+ /*----------------------------------------------------------------------
1241
+ * Solid solution
1242
+ *---------------------------------------------------------------------- */
1243
+ std::map<int, cxxSSassemblage> Rxn_ss_assemblage_map;
1244
+
1245
+ /*----------------------------------------------------------------------
1246
+ * Pure-phase assemblage
1247
+ *---------------------------------------------------------------------- */
1248
+ std::map<int, cxxPPassemblage> Rxn_pp_assemblage_map;
1249
+
1250
+ /*----------------------------------------------------------------------
1251
+ * Species_list
1252
+ *---------------------------------------------------------------------- */
1253
+ std::vector<class species_list> species_list;
1254
+
1255
+ /*----------------------------------------------------------------------
1256
+ * Jacobian and Mass balance lists
1257
+ *---------------------------------------------------------------------- */
1258
+ std::vector<class list0> sum_jacob0; /* array of pointers to targets and coefficients for array */
1259
+
1260
+ std::vector<class list1> sum_mb1; /* array of pointers to sources and targets for mass
1261
+ balance summations with coef = 1.0 */
1262
+ std::vector<class list1> sum_jacob1; /* array of pointers to sources and targets for array
1263
+ equations with coef = 1.0 */
1264
+ std::vector<class list2> sum_mb2; /* array of coefficients and pointers to sources and
1265
+ targets for mass balance summations with coef != 1.0 */
1266
+ std::vector<class list2> sum_jacob2; /* array of coefficients and pointers to sources and
1267
+ targets, coef != 1.0 */
1268
+ std::vector<class list2> sum_delta; /* array of pointers to sources, targets and coefficients for
1269
+ summing deltas for mass balance equations */
1270
+ /*----------------------------------------------------------------------
1271
+ * Solution
1272
+ *---------------------------------------------------------------------- */
1273
+ std::map<int, cxxSolution> Rxn_solution_map;
1274
+ std::vector<cxxSolution> unnumbered_solutions;
1275
+ bool save_species;
1276
+
1277
+ /*----------------------------------------------------------------------
1278
+ * Global solution
1279
+ *---------------------------------------------------------------------- */
1280
+ std::string title_x;
1281
+ std::string last_title_x;
1282
+ int new_x;
1283
+ std::string description_x;
1284
+ LDBLE tc_x;
1285
+ LDBLE tk_x;
1286
+ LDBLE patm_x;
1287
+ LDBLE last_patm_x;
1288
+ LDBLE potV_x;
1289
+ bool numerical_fixed_volume;
1290
+ bool force_numerical_fixed_volume;
1291
+ //bool switch_numerical;
1292
+ LDBLE ph_x;
1293
+ LDBLE solution_pe_x;
1294
+ LDBLE mu_x;
1295
+ LDBLE ah2o_x;
1296
+ LDBLE total_h_x;
1297
+ LDBLE total_o_x;
1298
+ LDBLE cb_x;
1299
+ LDBLE total_ions_x;
1300
+ LDBLE mass_water_aq_x;
1301
+ LDBLE mass_water_surfaces_x;
1302
+ LDBLE mass_water_bulk_x;
1303
+ std::string units_x;
1304
+ std::map < std::string, CReaction > pe_x;
1305
+ std::map<std::string, cxxSolutionIsotope> isotopes_x;
1306
+ std::string default_pe_x;
1307
+ cxxSurface::DIFFUSE_LAYER_TYPE dl_type_x;
1308
+ LDBLE total_carbon;
1309
+ LDBLE total_co2;
1310
+ LDBLE total_alkalinity;
1311
+ LDBLE gfw_water;
1312
+ LDBLE step_x;
1313
+ LDBLE kin_time_x;
1314
+
1315
+ /*----------------------------------------------------------------------
1316
+ * Transport data
1317
+ *---------------------------------------------------------------------- */
1318
+ int count_cells;
1319
+ int count_shifts;
1320
+ int ishift;
1321
+ int bcon_first;
1322
+ int bcon_last;
1323
+ int correct_disp;
1324
+ LDBLE tempr;
1325
+ LDBLE timest;
1326
+ int simul_tr;
1327
+ LDBLE diffc;
1328
+ LDBLE heat_diffc;
1329
+ int cell;
1330
+ LDBLE mcd_substeps;
1331
+ class stag_data stag_data;
1332
+ int print_modulus;
1333
+ int punch_modulus;
1334
+ int dump_in;
1335
+ int dump_modulus;
1336
+ int transport_warnings;
1337
+ std::vector<class cell_data> cell_data;
1338
+ int old_cells, max_cells, all_cells;
1339
+ int multi_Dflag; /* signals calc'n of multicomponent diffusion */
1340
+ int interlayer_Dflag; /* multicomponent diffusion and diffusion through interlayer porosity */
1341
+ int implicit; /* implicit calculation of diffusion */
1342
+ LDBLE max_mixf; /* the maximum value of the implicit mixfactor = De * Dt / (Dx^2) */
1343
+ LDBLE min_dif_LM; /* the minimal log10(molality) for including a species in multicomponent diffusion */
1344
+ LDBLE default_Dw; /* default species diffusion coefficient in water at 25oC, m2/s */
1345
+ int correct_Dw; /* if true, Dw is adapted in calc_SC */
1346
+ LDBLE multi_Dpor; /* uniform porosity of free porewater in solid medium */
1347
+ LDBLE interlayer_Dpor; /* uniform porosity of interlayer space of montmorillonite in solid medium */
1348
+ LDBLE multi_Dpor_lim; /* limiting free porewater porosity where transport stops */
1349
+ LDBLE interlayer_Dpor_lim; /* limiting interlayer porosity where transport stops */
1350
+ LDBLE multi_Dn; /* exponent to calculate pore water diffusion coefficient,
1351
+ Dp = Dw * (multi_Dpor)^multi_Dn */
1352
+ LDBLE interlayer_tortf; /* tortuosity_factor in interlayer porosity,
1353
+ Dpil = Dw / interlayer_tortf */
1354
+
1355
+ int cell_no, mixrun;
1356
+ /*----------------------------------------------------------------------
1357
+ * Advection data
1358
+ *---------------------------------------------------------------------- */
1359
+ int count_ad_cells;
1360
+ int count_ad_shifts;
1361
+ int print_ad_modulus;
1362
+ int punch_ad_modulus;
1363
+ std::vector<int> advection_print, advection_punch;
1364
+ LDBLE advection_kin_time;
1365
+ LDBLE advection_kin_time_defined;
1366
+ int advection_warnings;
1367
+
1368
+ /*----------------------------------------------------------------------
1369
+ * Tidy data
1370
+ *---------------------------------------------------------------------- */
1371
+ int new_model, new_exchange, new_pp_assemblage, new_surface,
1372
+ new_reaction, new_temperature, new_mix, new_solution, new_gas_phase,
1373
+ new_inverse, new_punch, new_ss_assemblage, new_kinetics, new_copy,
1374
+ new_pitzer;
1375
+
1376
+ /*----------------------------------------------------------------------
1377
+ * Elements
1378
+ *---------------------------------------------------------------------- */
1379
+ std::vector<class element*> elements;
1380
+ class element* element_h_one;
1381
+
1382
+ /*----------------------------------------------------------------------
1383
+ * Element List
1384
+ *---------------------------------------------------------------------- */
1385
+ std::vector<class elt_list> elt_list;
1386
+ size_t count_elts; /* number of elements in elt_list = position of next */
1387
+ /*----------------------------------------------------------------------
1388
+ * Reaction
1389
+ *---------------------------------------------------------------------- */
1390
+ bool run_cells_one_step;
1391
+ /*----------------------------------------------------------------------
1392
+ * Species
1393
+ *---------------------------------------------------------------------- */
1394
+ std::vector<class logk*> logk;
1395
+
1396
+ std::string moles_per_kilogram_string;
1397
+
1398
+ std::vector<class species*> s;
1399
+ std::vector< std::map < std::string, cxxSpeciesDL > > s_diff_layer;
1400
+ std::vector<class species*> s_x;
1401
+
1402
+ class species* s_h2o;
1403
+ class species* s_hplus;
1404
+ class species* s_h3oplus;
1405
+ class species* s_eminus;
1406
+ class species* s_co3;
1407
+ class species* s_h2;
1408
+ class species* s_o2;
1409
+
1410
+ /*----------------------------------------------------------------------
1411
+ * Phases
1412
+ *---------------------------------------------------------------------- */
1413
+ std::vector<class phase*> phases;
1414
+
1415
+ /*----------------------------------------------------------------------
1416
+ * Master species
1417
+ *---------------------------------------------------------------------- */
1418
+ std::vector<class master*> master;
1419
+
1420
+ /*----------------------------------------------------------------------
1421
+ * Unknowns
1422
+ *---------------------------------------------------------------------- */
1423
+ std::vector<class unknown*> x;
1424
+ size_t count_unknowns;
1425
+ size_t sit_aqueous_unknowns;
1426
+ size_t max_unknowns;
1427
+
1428
+ class unknown* ah2o_unknown;
1429
+ class unknown* alkalinity_unknown;
1430
+ class unknown* carbon_unknown;
1431
+ class unknown* charge_balance_unknown;
1432
+ class unknown* exchange_unknown;
1433
+ class unknown* mass_hydrogen_unknown;
1434
+ class unknown* mass_oxygen_unknown;
1435
+ class unknown* mb_unknown;
1436
+ class unknown* mu_unknown;
1437
+ class unknown* pe_unknown;
1438
+ class unknown* ph_unknown;
1439
+ class unknown* pure_phase_unknown;
1440
+ class unknown* solution_phase_boundary_unknown;
1441
+ class unknown* surface_unknown;
1442
+ class unknown* gas_unknown;
1443
+ class unknown* ss_unknown;
1444
+ std::vector<class unknown*> gas_unknowns;
1445
+
1446
+ /*----------------------------------------------------------------------
1447
+ * Reaction work space
1448
+ *---------------------------------------------------------------------- */
1449
+ class reaction_temp trxn; /* structure array of working space while reading equations
1450
+ species names are in "temp_strings" */
1451
+ size_t count_trxn; /* number of reactants in trxn = position of next */
1452
+
1453
+ std::vector<class unknown_list> mb_unknowns;
1454
+
1455
+ /* ----------------------------------------------------------------------
1456
+ * Print
1457
+ * ---------------------------------------------------------------------- */
1458
+ class prints pr;
1459
+ bool status_on;
1460
+ clock_t status_interval;
1461
+ clock_t status_timer;
1462
+ std::string status_string;
1463
+ int count_warnings;
1464
+
1465
+ /* ----------------------------------------------------------------------
1466
+ * RATES
1467
+ * ---------------------------------------------------------------------- */
1468
+ std::vector<class rate> rates;
1469
+ LDBLE rate_m, rate_m0, rate_time, rate_kin_time, rate_sim_time_start,
1470
+ rate_sim_time_end, rate_sim_time, rate_moles, initial_total_time;
1471
+ std::vector<LDBLE> rate_p;
1472
+ int count_rate_p;
1473
+
1474
+ /* ----------------------------------------------------------------------
1475
+ * USER PRINT COMMANDS
1476
+ * ---------------------------------------------------------------------- */
1477
+ class rate* user_print;
1478
+ int n_user_punch_index;
1479
+
1480
+ int fpunchf_user_s_warning;
1481
+ char fpunchf_user_buffer[80];
1482
+
1483
+ #if defined MULTICHART
1484
+ ChartHandler chart_handler;
1485
+ public:
1486
+ ChartHandler& Get_chart_handler(void)
1487
+ {
1488
+ return chart_handler;
1489
+ }
1490
+ const ChartHandler& Get_chart_handler(void)const
1491
+ {
1492
+ return chart_handler;
1493
+ }
1494
+ protected:
1495
+ #endif
1496
+
1497
+ /* ----------------------------------------------------------------------
1498
+ * GLOBAL DECLARATIONS
1499
+ * ---------------------------------------------------------------------- */
1500
+ const char* error_string;
1501
+ int simulation;
1502
+ int state;
1503
+ int reaction_step;
1504
+ int transport_step;
1505
+ int transport_start;
1506
+ int advection_step;
1507
+ int stop_program;
1508
+ int incremental_reactions;
1509
+
1510
+ double MIN_LM;
1511
+ double LOG_ZERO_MOLALITY;
1512
+ double MIN_TOTAL;
1513
+ double MIN_TOTAL_SS;
1514
+ double MIN_RELATED_SURFACE;
1515
+ double MIN_RELATED_LOG_ACTIVITY;
1516
+
1517
+ int count_strings;
1518
+ int max_strings;
1519
+
1520
+ std::vector<double> my_array, delta, residual;
1521
+
1522
+ int input_error;
1523
+
1524
+ Keywords::KEYWORDS next_keyword;
1525
+ int parse_error;
1526
+ int paren_count;
1527
+ int iterations;
1528
+ int gamma_iterations;
1529
+ size_t density_iterations;
1530
+ LDBLE kgw_kgs;
1531
+ int run_reactions_iterations;
1532
+ int overall_iterations;
1533
+
1534
+ int max_line;
1535
+ char* line;
1536
+ char* line_save;
1537
+
1538
+ LDBLE LOG_10;
1539
+
1540
+ int debug_model;
1541
+ int debug_prep;
1542
+ int debug_mass_action;
1543
+ int debug_mass_balance;
1544
+ int debug_set;
1545
+ int debug_diffuse_layer;
1546
+ int debug_inverse;
1547
+
1548
+ LDBLE inv_tol_default;
1549
+ int itmax;
1550
+ int max_tries;
1551
+ LDBLE ineq_tol;
1552
+ LDBLE convergence_tolerance;
1553
+ LDBLE step_size;
1554
+ LDBLE pe_step_size;
1555
+ LDBLE step_size_now;
1556
+ LDBLE pe_step_size_now;
1557
+ LDBLE pp_scale;
1558
+ LDBLE pp_column_scale;
1559
+ int diagonal_scale; /* 0 not used, 1 used */
1560
+ int mass_water_switch;
1561
+ int delay_mass_water;
1562
+ int equi_delay;
1563
+ bool dampen_ah2o;
1564
+ LDBLE censor;
1565
+ int aqueous_only;
1566
+ int negative_concentrations;
1567
+ int calculating_deriv;
1568
+ int numerical_deriv;
1569
+
1570
+ int count_total_steps;
1571
+ int phast;
1572
+ bool output_newline;
1573
+ inline void Set_output_newline(bool tf) { this->output_newline = tf; }
1574
+ inline bool Get_output_newline() { return this->output_newline; }
1575
+ double a_llnl, b_llnl, bdot_llnl;
1576
+ std::vector<double> llnl_temp, llnl_adh, llnl_bdh, llnl_bdot, llnl_co2_coefs;
1577
+
1578
+ //char *selected_output_file_name;
1579
+ std::map<int, SelectedOutput> SelectedOutput_map;
1580
+ SelectedOutput* current_selected_output;
1581
+
1582
+ std::map <int, UserPunch> UserPunch_map;
1583
+ UserPunch* current_user_punch;
1584
+
1585
+ char* dump_file_name;
1586
+ int remove_unstable_phases;
1587
+ std::string screen_string;
1588
+ #ifdef PHREEQCI_GUI
1589
+ class spread_sheet g_spread_sheet;
1590
+ #endif
1591
+ int spread_length;
1592
+
1593
+ /* ---------------------------------------------------------------------- */
1594
+ /*
1595
+ * Map definitions
1596
+ */
1597
+
1598
+ std::map<std::string, std::string*> strings_map;
1599
+ std::map<std::string, class element*> elements_map;
1600
+ std::map<std::string, class species*> species_map;
1601
+ std::map<std::string, class phase*> phases_map;
1602
+ std::map<std::string, class logk*> logk_map;
1603
+ std::map<std::string, class master_isotope*> master_isotope_map;
1604
+
1605
+ #if defined(PHREEQCI_GUI)
1606
+ #include "../../phreeqci_gui.h"
1607
+ #endif /* defined(PHREEQCI_GUI) */
1608
+ /* ----------------------------------------------------------------------
1609
+ * ISOTOPES
1610
+ * ---------------------------------------------------------------------- */
1611
+ std::vector<class master_isotope*> master_isotope;
1612
+ int initial_solution_isotopes;
1613
+ std::vector<class calculate_value*> calculate_value;
1614
+ std::map<std::string, class calculate_value*> calculate_value_map;
1615
+ public:
1616
+ std::map<std::string, class calculate_value*>& GetCalculateValueMap()
1617
+ {
1618
+ return this->calculate_value_map;
1619
+ }
1620
+ protected:
1621
+ std::vector<class isotope_ratio*> isotope_ratio;
1622
+ std::map<std::string, class isotope_ratio*> isotope_ratio_map;
1623
+ std::vector<class isotope_alpha*> isotope_alpha;
1624
+ std::map<std::string, class isotope_alpha*> isotope_alpha_map;
1625
+ int phreeqc_mpi_myself;
1626
+ int first_read_input;
1627
+ std::string user_database;
1628
+
1629
+ //int have_punch_name;
1630
+ /* VP: Density Start */
1631
+ int print_density;
1632
+ /* VP: Density End */
1633
+
1634
+ int print_viscosity;
1635
+ LDBLE viscos, viscos_0, viscos_0_25; // viscosity of the solution, of pure water, of pure water at 25 C
1636
+ LDBLE density_x;
1637
+ LDBLE solution_volume_x;
1638
+ LDBLE solution_mass_x;
1639
+ LDBLE cell_pore_volume;
1640
+ LDBLE cell_porosity;
1641
+ LDBLE cell_volume;
1642
+ LDBLE cell_saturation;
1643
+ std::vector<class system_species> sys;
1644
+ LDBLE sys_tot;
1645
+
1646
+ LDBLE V_solutes, rho_0, rho_0_sat, kappa_0, p_sat/*, ah2o_x0*/;
1647
+ LDBLE SC; // specific conductance mS/cm
1648
+ LDBLE eps_r; // relative dielectric permittivity
1649
+ LDBLE DH_A, DH_B, DH_Av; // Debye-Hueckel A, B and Av
1650
+ LDBLE QBrn; // Born function d(ln(eps_r))/dP / eps_r * 41.84004, for supcrt calc'n of molal volume
1651
+ LDBLE ZBrn; // Born function (-1/eps_r + 1) * 41.84004, for supcrt calc'n of molal volume
1652
+ LDBLE dgdP; // dg / dP, pressure derivative of g-function, for supcrt calc'n of molal volume
1653
+
1654
+ int need_temp_msg;
1655
+ LDBLE solution_mass, solution_volume;
1656
+
1657
+ /* phqalloc.cpp ------------------------------- */
1658
+ PHRQMemHeader* s_pTail;
1659
+
1660
+ /* Basic */
1661
+ PBasic* basic_interpreter;
1662
+
1663
+ double (*basic_callback_ptr) (double x1, double x2, const char* str, void* cookie);
1664
+ void* basic_callback_cookie;
1665
+ #ifdef IPHREEQC_NO_FORTRAN_MODULE
1666
+ double (*basic_fortran_callback_ptr) (double* x1, double* x2, const char* str, size_t l);
1667
+ #else
1668
+ double (*basic_fortran_callback_ptr) (double* x1, double* x2, const char* str, int l);
1669
+ #endif
1670
+ #if defined(SWIG) || defined(SWIG_IPHREEQC)
1671
+ class BasicCallback* basicCallback;
1672
+ void SetCallback(BasicCallback* cb) { basicCallback = cb; }
1673
+ #endif
1674
+
1675
+ /* cl1.cpp ------------------------------- */
1676
+ std::vector<double> x_arg, res_arg, scratch;
1677
+ /* gases.cpp ------------------------------- */
1678
+ LDBLE a_aa_sum, b2, b_sum, R_TK;
1679
+ std::map < std::pair<std::string, std::string>, double > gas_binary_parameters;
1680
+
1681
+ /* input.cpp ------------------------------- */
1682
+ int check_line_return;
1683
+ int reading_db;
1684
+
1685
+ /* integrate.cpp ------------------------------- */
1686
+ LDBLE midpoint_sv;
1687
+ LDBLE z_global, xd_global, alpha_global;
1688
+
1689
+ /* inverse.cpp ------------------------------- */
1690
+ size_t max_row_count, max_column_count;
1691
+ int carbon;
1692
+ std::vector<const char*> col_name, row_name;
1693
+ size_t count_rows, count_optimize;
1694
+ size_t col_phases, col_redox, col_epsilon, col_ph, col_water,
1695
+ col_isotopes, col_phase_isotopes;
1696
+ size_t row_mb, row_fract, row_charge, row_carbon, row_isotopes,
1697
+ row_epsilon, row_isotope_epsilon, row_water;
1698
+ std::vector<double> inv_zero, array1, inv_res, inv_delta1, delta2,
1699
+ delta3, inv_cu, delta_save;
1700
+ std::vector<double> min_delta, max_delta;
1701
+ std::vector<int> inv_iu, inv_is;
1702
+ size_t klmd, nklmd, n2d;
1703
+ int kode, iter;
1704
+ LDBLE toler, error, max_pct, scaled_error;
1705
+ class master* master_alk;
1706
+ std::vector<int> row_back, col_back;
1707
+ std::vector<unsigned long> good, bad, minimal;
1708
+ size_t max_good, max_bad, max_minimal;
1709
+ int count_good, count_bad, count_minimal, count_calls;
1710
+ unsigned long soln_bits, phase_bits, current_bits, temp_bits;
1711
+ FILE* netpath_file;
1712
+ int count_inverse_models, count_pat_solutions;
1713
+ int min_position[32], max_position[32], now[32];
1714
+ std::vector <std::string> inverse_heading_names;
1715
+
1716
+ /* kinetics.cpp ------------------------------- */
1717
+ public:
1718
+ int count_pp, count_pg, count_ss;
1719
+ void* cvode_kinetics_ptr;
1720
+ int cvode_test;
1721
+ int cvode_error;
1722
+ int cvode_n_user;
1723
+ int cvode_n_reactions;
1724
+ realtype cvode_step_fraction;
1725
+ realtype cvode_rate_sim_time;
1726
+ realtype cvode_rate_sim_time_start;
1727
+ realtype cvode_last_good_time;
1728
+ realtype cvode_prev_good_time;
1729
+ N_Vector cvode_last_good_y;
1730
+ N_Vector cvode_prev_good_y;
1731
+ M_Env kinetics_machEnv;
1732
+ N_Vector kinetics_y, kinetics_abstol;
1733
+ void* kinetics_cvode_mem;
1734
+ cxxSSassemblage* cvode_ss_assemblage_save;
1735
+ cxxPPassemblage* cvode_pp_assemblage_save;
1736
+ protected:
1737
+ std::vector<double> m_temp, m_original, rk_moles, x0_moles;
1738
+ int set_and_run_attempt;
1739
+
1740
+ /* model.cpp ------------------------------- */
1741
+ int gas_in;
1742
+ LDBLE min_value;
1743
+ std::vector<double> normal, ineq_array, res, cu, zero, delta1;
1744
+ std::vector<int> iu, is, back_eq;
1745
+
1746
+ /* phrq_io_output.cpp ------------------------------- */
1747
+ int forward_output_to_log;
1748
+
1749
+ /* phreeqc_files.cpp ------------------------------- */
1750
+ std::string default_data_base;
1751
+ /* Pitzer */
1752
+ int pitzer_model, sit_model, pitzer_pe;
1753
+ int full_pitzer, always_full_pitzer, ICON, IC;
1754
+ LDBLE COSMOT;
1755
+ LDBLE AW;
1756
+ LDBLE VP, DW0;
1757
+ std::vector<class pitz_param*> pitz_params;
1758
+ std::map< std::string, size_t > pitz_param_map;
1759
+ std::vector<class theta_param*> theta_params;
1760
+ int use_etheta;
1761
+ LDBLE OTEMP, OPRESS;
1762
+ LDBLE A0;
1763
+ class pitz_param* aphi/* = NULL*/;
1764
+ std::vector<class species*> spec;
1765
+ class species** cations, ** anions, ** neutrals; // pointers to spec
1766
+ int count_cations, count_anions, count_neutrals;
1767
+ int MAXCATIONS, FIRSTANION, MAXNEUTRAL;
1768
+ class pitz_param* mcb0, * mcb1, * mcc0;
1769
+ std::vector<int> IPRSNT;
1770
+ std::vector<double> M, LGAMMA;
1771
+ LDBLE BK[23], DK[23];
1772
+
1773
+ LDBLE dummy;
1774
+
1775
+ /* print.cpp ------------------------------- */
1776
+
1777
+ /* read.cpp */
1778
+ const char* prev_next_char;
1779
+ #if defined PHREEQ98
1780
+ int shifts_as_points;
1781
+ #endif
1782
+
1783
+ /* read_class.cxx */
1784
+ dumper dump_info;
1785
+ StorageBinList delete_info;
1786
+ runner run_info;
1787
+ char* sformatf_buffer;
1788
+ size_t sformatf_buffer_size;
1789
+
1790
+ /* readtr.cpp */
1791
+ std::string dump_file_name_cpp;
1792
+
1793
+ /* sit.cpp ------------------------------- */
1794
+ std::vector<class pitz_param*> sit_params;
1795
+ std::map< std::string, size_t > sit_param_map;
1796
+ LDBLE sit_A0;
1797
+ int sit_count_cations, sit_count_anions, sit_count_neutrals;
1798
+ int sit_MAXCATIONS, sit_FIRSTANION, sit_MAXNEUTRAL;
1799
+ std::vector<int> sit_IPRSNT;
1800
+ std::vector<double> sit_M, sit_LGAMMA;
1801
+ std::vector<int> s_list, cation_list, neutral_list, anion_list, ion_list, param_list;
1802
+
1803
+ /* tidy.cpp ------------------------------- */
1804
+ LDBLE a0, a1, kc, kb;
1805
+
1806
+ /* tally.cpp ------------------------------- */
1807
+ class tally_buffer* t_buffer;
1808
+ size_t tally_count_component;
1809
+ //class tally* tally_table;
1810
+ std::vector<class tally> tally_table;
1811
+ size_t count_tally_table_columns;
1812
+ size_t count_tally_table_rows;
1813
+
1814
+ /* transport.cpp ------------------------------- */
1815
+ class sol_D* sol_D;
1816
+ class sol_D* sol_D_dbg;
1817
+ class J_ij* J_ij, * J_ij_il;
1818
+ int J_ij_count_spec;
1819
+
1820
+ class M_S* m_s;
1821
+ int count_m_s;
1822
+ LDBLE tot1_h, tot1_o, tot2_h, tot2_o;
1823
+ LDBLE diffc_max, diffc_tr, J_ij_sum;
1824
+ int transp_surf;
1825
+ LDBLE* heat_mix_array;
1826
+ LDBLE* temp1, * temp2;
1827
+ int nmix, heat_nmix;
1828
+ LDBLE heat_mix_f_imm, heat_mix_f_m;
1829
+ int warn_MCD_X, warn_fixed_Surf;
1830
+ LDBLE current_x, current_A, fix_current; // current: coulomb / s, Ampere, fixed current (Ampere)
1831
+
1832
+ /* utilities.cpp ------------------------------- */
1833
+ int spinner;
1834
+ std::map<std::string, double> gfw_map;
1835
+ std::map<const char*, int> rates_map;
1836
+
1837
+ /* new after release of Version 3 */
1838
+ std::map<std::string, std::vector < std::string> > sum_species_map;
1839
+ std::map<std::string, std::vector < std::string> > sum_species_map_db;
1840
+
1841
+ friend class PBasic;
1842
+ friend class ChartObject;
1843
+ friend class IPhreeqc;
1844
+ friend class TestIPhreeqc;
1845
+ friend class TestSelectedOutput;
1846
+ friend class IPhreeqcMMS;
1847
+ friend class IPhreeqcPhast;
1848
+ friend class PhreeqcRM;
1849
+
1850
+ std::vector<int> keycount; // used to mark keywords that have been read
1851
+
1852
+ public:
1853
+ static const class const_iso iso_defaults[];
1854
+ static const int count_iso_defaults;
1855
+ };
1856
+ #endif /* _INC_PHREEQC_H */
1857
+
1858
+ #ifndef _INC_ISFINITE_H
1859
+ #define _INC_ISFINITE_H
1860
+ /*********************************
1861
+ isfinite handling
1862
+ (Note: Should NOT be guarded)
1863
+ **********************************/
1864
+
1865
+ #if defined (PHREEQ98) || defined (_MSC_VER)
1866
+ # define HAVE_FINITE
1867
+ # define finite _finite
1868
+ #else /*defined (PHREEQ98) || defined (_MSC_VER)*/
1869
+ # if defined(DJGPP)
1870
+ # define HAVE_FINITE
1871
+ # endif
1872
+ #endif /*defined (PHREEQ98) || defined (_MSC_VER)*/
1873
+
1874
+ #if defined(HAVE_ISFINITE)
1875
+ # if __GNUC__ && (__cplusplus >= 201103L)
1876
+ # define PHR_ISFINITE(x) std::isfinite(x)
1877
+ # else
1878
+ # define PHR_ISFINITE(x) std::isfinite(x) /* changed when <math.h> was changed to <cmath> */
1879
+ # endif
1880
+ #elif defined(HAVE_FINITE)
1881
+ # define PHR_ISFINITE(x) finite(x)
1882
+ #elif defined(HAVE_ISNAN)
1883
+ # define PHR_ISFINITE(x) ( ((x) == 0.0) || ((!std::isnan(x)) && ((x) != (2.0 * (x)))) )
1884
+ #else
1885
+ # define PHR_ISFINITE(x) ( ((x) == 0.0) || (((x) == (x)) && ((x) != (2.0 * (x)))) )
1886
+ #endif
1887
+ #endif // _INC_ISFINITE_H
1888
+
1889
+ #ifndef _INC_UTILITIES_NAMESPACE_H
1890
+ #define _INC_UTILITIES_NAMESPACE_H
1891
+ namespace Utilities
1892
+ {
1893
+ LDBLE get_nan(void);
1894
+
1895
+ // operations on maps of entities (Solution, Exchange, ...)
1896
+ template < typename T >
1897
+ void Rxn_dump_raw(const T& b, std::ostream& s_oss, unsigned int indent)
1898
+ {
1899
+ typename T::const_iterator it;
1900
+ for (it = b.begin(); it != b.end(); ++it)
1901
+ {
1902
+ // Adding logic to dump only non-negative entities
1903
+ //if (it->second.Get_n_user() >= 0)
1904
+ if (it->first >= 0 && it->second.Get_n_user() >= 0)
1905
+ {
1906
+ it->second.dump_raw(s_oss, indent);
1907
+ }
1908
+ }
1909
+ return;
1910
+ }
1911
+
1912
+ template < typename T >
1913
+ void Rxn_dump_raw_range(const T& b, std::ostream& s_oss, int start, int end, unsigned int indent)
1914
+ {
1915
+ typename T::const_iterator it;
1916
+ for (int i = start; i <= end; i++)
1917
+ {
1918
+ if (i < 0) continue;
1919
+ it = b.find(i);
1920
+ if (it != b.end())
1921
+ {
1922
+ it->second.dump_raw(s_oss, indent);
1923
+ }
1924
+ }
1925
+ return;
1926
+ }
1927
+
1928
+ template < typename T >
1929
+ T* Rxn_find(std::map < int, T >& b, int i)
1930
+ {
1931
+ if (b.find(i) != b.end())
1932
+ {
1933
+ return (&(b.find(i)->second));
1934
+ }
1935
+ else
1936
+ {
1937
+ return (NULL);
1938
+ }
1939
+ }
1940
+
1941
+ template < typename T >
1942
+ int Rxn_next_user_number(std::map < int, T >& b)
1943
+ {
1944
+ int ret = 0;
1945
+ if (b.size() != 0)
1946
+ {
1947
+ ret = b.rbegin()->first + 1;
1948
+ }
1949
+ return ret;
1950
+ }
1951
+
1952
+ template < typename T >
1953
+ T* Rxn_copy(std::map < int, T >& b, int i, int j)
1954
+ {
1955
+ typename std::map < int, T >::iterator it;
1956
+ it = b.find(i);
1957
+ if (it != b.end())
1958
+ {
1959
+ b[j] = it->second;
1960
+ it = b.find(j);
1961
+ it->second.Set_n_user(j);
1962
+ it->second.Set_n_user_end(j);
1963
+ return &(it->second);
1964
+ }
1965
+ else
1966
+ {
1967
+ return (NULL);
1968
+ }
1969
+ }
1970
+
1971
+ template < typename T >
1972
+ void Rxn_copies(std::map < int, T >& b, int n_user, int n_user_end)
1973
+ {
1974
+ if (n_user_end <= n_user) return;
1975
+ typename std::map < int, T >::iterator it;
1976
+ it = b.find(n_user);
1977
+ if (it != b.end())
1978
+ {
1979
+ for (int j = n_user + 1; j <= n_user_end; j++)
1980
+ {
1981
+ b[j] = it->second;
1982
+ it = b.find(j);
1983
+ it->second.Set_n_user(j);
1984
+ it->second.Set_n_user_end(j);
1985
+ }
1986
+ }
1987
+ }
1988
+ template < typename T >
1989
+ int Rxn_read_raw(std::map < int, T >& m, std::set < int >& s, Phreeqc* phreeqc_cookie)
1990
+ {
1991
+ typename std::map < int, T >::iterator it;
1992
+ assert(!phreeqc_cookie->reading_database());
1993
+
1994
+ T entity(phreeqc_cookie->Get_phrq_io());
1995
+
1996
+ CParser parser(phreeqc_cookie->Get_phrq_io());
1997
+ entity.read_raw(parser);
1998
+
1999
+ // Store
2000
+ if (entity.Get_base_error_count() == 0)
2001
+ {
2002
+ m[entity.Get_n_user()] = entity;
2003
+ }
2004
+
2005
+ // Make copies if necessary
2006
+ Utilities::Rxn_copies(m, entity.Get_n_user(), entity.Get_n_user_end());
2007
+ for (int i = entity.Get_n_user(); i <= entity.Get_n_user_end(); i++)
2008
+ {
2009
+ s.insert(i);
2010
+ }
2011
+ return phreeqc_cookie->cleanup_after_parser(parser);
2012
+ }
2013
+
2014
+ template < typename T >
2015
+ int Rxn_read_modify(std::map < int, T >& m, std::set < int >& s, Phreeqc* phreeqc_cookie)
2016
+ {
2017
+ typename std::map < int, T >::iterator it;
2018
+
2019
+ CParser parser(phreeqc_cookie->Get_phrq_io());
2020
+
2021
+ std::string key_name;
2022
+ std::string::iterator b = parser.line().begin();
2023
+ std::string::iterator e = parser.line().end();
2024
+ CParser::copy_token(key_name, b, e);
2025
+
2026
+ cxxNumKeyword nk;
2027
+ nk.read_number_description(parser);
2028
+ T* entity_ptr = Utilities::Rxn_find(m, nk.Get_n_user());
2029
+ if (!entity_ptr)
2030
+ {
2031
+ std::ostringstream errstr;
2032
+ errstr << "Could not find " << key_name << " " << nk.Get_n_user() << ", ignoring modify data.\n";
2033
+ phreeqc_cookie->warning_msg(errstr.str().c_str());
2034
+ //phreeqc_cookie->error_msg(errstr.str().c_str(), PHRQ_io::OT_STOP);
2035
+
2036
+ // Don't throw, read data into dummy entity, then ignore
2037
+ T entity;
2038
+ entity_ptr = &entity;
2039
+ entity_ptr->read_raw(parser, false);
2040
+ return phreeqc_cookie->cleanup_after_parser(parser);
2041
+ }
2042
+
2043
+ entity_ptr->read_raw(parser, false);
2044
+ entity_ptr->Set_n_user(nk.Get_n_user());
2045
+ entity_ptr->Set_n_user_end(nk.Get_n_user_end());
2046
+ entity_ptr->Set_description(nk.Get_description());
2047
+ s.insert(entity_ptr->Get_n_user());
2048
+
2049
+ return phreeqc_cookie->cleanup_after_parser(parser);
2050
+ }
2051
+
2052
+ template < typename T >
2053
+ int SB_read_modify(std::map < int, T >& m, CParser& parser)
2054
+ {
2055
+ typename std::map < int, T >::iterator it;
2056
+
2057
+ std::string key_name;
2058
+ std::string::iterator b = parser.line().begin();
2059
+ std::string::iterator e = parser.line().end();
2060
+ CParser::copy_token(key_name, b, e);
2061
+
2062
+ cxxNumKeyword nk;
2063
+ nk.read_number_description(parser);
2064
+ T* entity_ptr = Utilities::Rxn_find(m, nk.Get_n_user());
2065
+ if (!entity_ptr)
2066
+ {
2067
+ std::ostringstream errstr;
2068
+ errstr << "Could not find " << key_name << " " << nk.Get_n_user() << ", ignoring modify data.\n";
2069
+ //io->warning_msg(errstr.str().c_str());
2070
+
2071
+ // Don't throw, read data into dummy entity, then ignore
2072
+ T entity;
2073
+ entity_ptr = &entity;
2074
+ entity_ptr->read_raw(parser, false);
2075
+ return FALSE;
2076
+ }
2077
+
2078
+ entity_ptr->read_raw(parser, false);
2079
+ entity_ptr->Set_n_user(nk.Get_n_user());
2080
+ entity_ptr->Set_n_user_end(nk.Get_n_user_end());
2081
+ entity_ptr->Set_description(nk.Get_description());
2082
+
2083
+ return TRUE;
2084
+ }
2085
+
2086
+ template < typename T >
2087
+ void Rxn_mix(std::map <int, cxxMix>& mix_map, std::map < int, T >& entity_map, Phreeqc* phreeqc_cookie)
2088
+ {
2089
+ std::map<int, cxxMix>::iterator mix_it;
2090
+ for (mix_it = mix_map.begin(); mix_it != mix_map.end(); mix_it++)
2091
+ {
2092
+ T entity(entity_map, mix_it->second, mix_it->second.Get_n_user(), phreeqc_cookie->Get_phrq_io());
2093
+ entity_map[mix_it->second.Get_n_user()] = entity;
2094
+ Utilities::Rxn_copies(entity_map, mix_it->second.Get_n_user(), mix_it->second.Get_n_user_end());
2095
+ }
2096
+ mix_map.clear();
2097
+ }
2098
+
2099
+ } // namespace Utilities
2100
+
2101
+
2102
+ #if defined(PHREEQCI_GUI)
2103
+ void PhreeqcIWait(Phreeqc* phreeqc);
2104
+ #endif
2105
+
2106
+ #if !defined(NDEBUG) && defined(WIN32_MEMORY_DEBUG)
2107
+ #define string_duplicate(s) _string_duplicate(s, __FILE__, __LINE__)
2108
+ #endif
2109
+ #if defined(_DEBUG)
2110
+ char* _string_duplicate(const char* token, const char* szFileName, int nLine);
2111
+ #endif
2112
+
2113
+ #endif //_INC_UTILITIES_NAMESPACE_H
2114
+
2115
+ #ifndef _INC_MISSING_SNPRINTF_H
2116
+ #define _INC_MISSING_SNPRINTF_H
2117
+
2118
+ // Section _INC_MISSING_SNPRINTF_H is based on
2119
+ // https://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010
2120
+
2121
+ #if defined(_MSC_VER) && (_MSC_VER < 1900)
2122
+ #if (_MSC_VER <= 1700) // VS2012
2123
+ namespace std {
2124
+ __inline bool isnan(double num) {
2125
+ return _isnan(num) != 0;
2126
+ }
2127
+ }
2128
+ #endif
2129
+ #include <stdarg.h>
2130
+
2131
+ #define snprintf c99_snprintf
2132
+ #define vsnprintf c99_vsnprintf
2133
+
2134
+ #pragma warning( push )
2135
+ // warning C4793: 'vararg' : causes native code generation
2136
+ #pragma warning( disable : 4793 )
2137
+
2138
+ __inline int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap)
2139
+ {
2140
+ int count = -1;
2141
+
2142
+ if (size != 0)
2143
+ count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap);
2144
+ if (count == -1)
2145
+ count = _vscprintf(format, ap);
2146
+
2147
+ return count;
2148
+ }
2149
+
2150
+ __inline int c99_snprintf(char *outBuf, size_t size, const char *format, ...)
2151
+ {
2152
+ int count;
2153
+ va_list ap;
2154
+
2155
+ va_start(ap, format);
2156
+ count = c99_vsnprintf(outBuf, size, format, ap);
2157
+ va_end(ap);
2158
+
2159
+ return count;
2160
+ }
2161
+ #pragma warning( pop )
2162
+ #endif // defined(_MSC_VER) && (_MSC_VER < 1900)
2163
+
2164
+ #endif //_INC_MISSING_SNPRINTF_H