pyEQL 1.4.0rc9__cp312-cp312-macosx_10_13_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (491) hide show
  1. pyEQL/__init__.py +50 -0
  2. pyEQL/_phreeqc.cpython-312-darwin.so +0 -0
  3. pyEQL/activity_correction.py +879 -0
  4. pyEQL/database/geothermal.dat +5693 -0
  5. pyEQL/database/llnl.dat +19305 -0
  6. pyEQL/database/phreeqc_license.txt +54 -0
  7. pyEQL/database/pyeql_db.json +35607 -0
  8. pyEQL/engines.py +1153 -0
  9. pyEQL/equilibrium.py +227 -0
  10. pyEQL/functions.py +281 -0
  11. pyEQL/phreeqc/__init__.py +5 -0
  12. pyEQL/phreeqc/bindings.cpp +84 -0
  13. pyEQL/phreeqc/core.py +239 -0
  14. pyEQL/phreeqc/database/Amm.dat +1968 -0
  15. pyEQL/phreeqc/database/CMakeLists.txt +32 -0
  16. pyEQL/phreeqc/database/ColdChem.dat +267 -0
  17. pyEQL/phreeqc/database/Concrete_PHR.dat +158 -0
  18. pyEQL/phreeqc/database/Concrete_PZ.dat +195 -0
  19. pyEQL/phreeqc/database/Kinec.v2.dat +12039 -0
  20. pyEQL/phreeqc/database/Kinec_v3.dat +12159 -0
  21. pyEQL/phreeqc/database/Makefile.am +28 -0
  22. pyEQL/phreeqc/database/Makefile.in +530 -0
  23. pyEQL/phreeqc/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
  24. pyEQL/phreeqc/database/Tipping_Hurley.dat +4137 -0
  25. pyEQL/phreeqc/database/__init__.py +0 -0
  26. pyEQL/phreeqc/database/core10.dat +6824 -0
  27. pyEQL/phreeqc/database/frezchem.dat +634 -0
  28. pyEQL/phreeqc/database/iso.dat +7235 -0
  29. pyEQL/phreeqc/database/llnl.dat +19310 -0
  30. pyEQL/phreeqc/database/minteq.dat +5654 -0
  31. pyEQL/phreeqc/database/minteq.v4.dat +13212 -0
  32. pyEQL/phreeqc/database/phreeqc.dat +1972 -0
  33. pyEQL/phreeqc/database/phreeqc_rates.dat +3158 -0
  34. pyEQL/phreeqc/database/pitzer.dat +1044 -0
  35. pyEQL/phreeqc/database/sit.dat +14348 -0
  36. pyEQL/phreeqc/database/wateq4f.dat +4036 -0
  37. pyEQL/phreeqc/ext/README.md +10 -0
  38. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/CMakeLists.txt +476 -0
  39. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/INSTALL +302 -0
  40. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/IPhreeqc.rc +61 -0
  41. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/IPhreeqcConfig.cmake.in +4 -0
  42. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/Makefile.am +8 -0
  43. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/Makefile.in +816 -0
  44. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/aclocal.m4 +1217 -0
  45. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/CTestScript.cmake +167 -0
  46. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/CSelectedOutput.cpp.o +0 -0
  47. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqc.cpp.o +0 -0
  48. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqcLib.cpp.o +0 -0
  49. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqc_interface_F.cpp.o +0 -0
  50. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/Var.c.o +0 -0
  51. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Dictionary.cpp.o +0 -0
  52. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ExchComp.cxx.o +0 -0
  53. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Exchange.cxx.o +0 -0
  54. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/GasComp.cxx.o +0 -0
  55. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/GasPhase.cxx.o +0 -0
  56. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ISolution.cxx.o +0 -0
  57. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ISolutionComp.cxx.o +0 -0
  58. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/KineticsComp.cxx.o +0 -0
  59. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/NameDouble.cxx.o +0 -0
  60. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/NumKeyword.cxx.o +0 -0
  61. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PBasic.cpp.o +0 -0
  62. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PHRQ_io_output.cpp.o +0 -0
  63. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PPassemblage.cxx.o +0 -0
  64. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PPassemblageComp.cxx.o +0 -0
  65. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Phreeqc.cpp.o +0 -0
  66. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PhreeqcKeywords/Keywords.cpp.o +0 -0
  67. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Pressure.cxx.o +0 -0
  68. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Reaction.cxx.o +0 -0
  69. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ReadClass.cxx.o +0 -0
  70. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SS.cxx.o +0 -0
  71. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SSassemblage.cxx.o +0 -0
  72. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SScomp.cxx.o +0 -0
  73. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SelectedOutput.cpp.o +0 -0
  74. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Serializer.cxx.o +0 -0
  75. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Solution.cxx.o +0 -0
  76. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SolutionIsotope.cxx.o +0 -0
  77. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/StorageBin.cxx.o +0 -0
  78. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/StorageBinList.cpp.o +0 -0
  79. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Surface.cxx.o +0 -0
  80. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SurfaceCharge.cxx.o +0 -0
  81. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SurfaceComp.cxx.o +0 -0
  82. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/System.cxx.o +0 -0
  83. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Temperature.cxx.o +0 -0
  84. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Use.cpp.o +0 -0
  85. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/UserPunch.cpp.o +0 -0
  86. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/advection.cpp.o +0 -0
  87. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/basicsubs.cpp.o +0 -0
  88. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cl1.cpp.o +0 -0
  89. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/PHRQ_base.cxx.o +0 -0
  90. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/PHRQ_io.cpp.o +0 -0
  91. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/Parser.cxx.o +0 -0
  92. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/Utils.cxx.o +0 -0
  93. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cvdense.cpp.o +0 -0
  94. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cvode.cpp.o +0 -0
  95. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cxxKinetics.cxx.o +0 -0
  96. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cxxMix.cxx.o +0 -0
  97. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/dense.cpp.o +0 -0
  98. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/dumper.cpp.o +0 -0
  99. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/gases.cpp.o +0 -0
  100. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/input.cpp.o +0 -0
  101. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/integrate.cpp.o +0 -0
  102. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/inverse.cpp.o +0 -0
  103. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/isotopes.cpp.o +0 -0
  104. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/kinetics.cpp.o +0 -0
  105. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/mainsubs.cpp.o +0 -0
  106. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/model.cpp.o +0 -0
  107. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/nvector.cpp.o +0 -0
  108. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/nvector_serial.cpp.o +0 -0
  109. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/parse.cpp.o +0 -0
  110. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/phqalloc.cpp.o +0 -0
  111. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/pitzer.cpp.o +0 -0
  112. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/pitzer_structures.cpp.o +0 -0
  113. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/prep.cpp.o +0 -0
  114. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/print.cpp.o +0 -0
  115. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/read.cpp.o +0 -0
  116. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/readtr.cpp.o +0 -0
  117. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/runner.cpp.o +0 -0
  118. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/sit.cpp.o +0 -0
  119. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/smalldense.cpp.o +0 -0
  120. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/spread.cpp.o +0 -0
  121. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/step.cpp.o +0 -0
  122. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/structures.cpp.o +0 -0
  123. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/sundialsmath.cpp.o +0 -0
  124. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/tally.cpp.o +0 -0
  125. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/tidy.cpp.o +0 -0
  126. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/transport.cpp.o +0 -0
  127. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/utilities.cpp.o +0 -0
  128. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CTestTestfile.cmake +6 -0
  129. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/DartConfiguration.tcl +109 -0
  130. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/cmake_install.cmake +45 -0
  131. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/libIPhreeqc.a +0 -0
  132. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ar-lib +270 -0
  133. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/compile +347 -0
  134. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.guess +1441 -0
  135. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.sub +1813 -0
  136. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/depcomp +791 -0
  137. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/install-sh +508 -0
  138. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ltmain.sh +11156 -0
  139. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/missing +215 -0
  140. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/test-driver +148 -0
  141. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure +23867 -0
  142. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure.ac +136 -0
  143. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Amm.dat +1968 -0
  144. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/CMakeLists.txt +32 -0
  145. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/ColdChem.dat +267 -0
  146. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PHR.dat +158 -0
  147. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PZ.dat +195 -0
  148. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec.v2.dat +12039 -0
  149. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec_v3.dat +12159 -0
  150. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.am +28 -0
  151. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.in +530 -0
  152. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
  153. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Tipping_Hurley.dat +4137 -0
  154. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/core10.dat +6824 -0
  155. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/frezchem.dat +634 -0
  156. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/iso.dat +7235 -0
  157. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/llnl.dat +19310 -0
  158. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.dat +5654 -0
  159. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.v4.dat +13212 -0
  160. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc.dat +1972 -0
  161. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc_rates.dat +3158 -0
  162. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/pitzer.dat +1044 -0
  163. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/sit.dat +14348 -0
  164. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/wateq4f.dat +4036 -0
  165. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/CMakeLists.txt +35 -0
  166. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/IPhreeqc.pdf +0 -0
  167. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.am +24 -0
  168. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.in +545 -0
  169. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/NOTICE +51 -0
  170. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_2_1999_manual.pdf +0 -0
  171. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_3_2013_manual.pdf +0 -0
  172. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/README +428 -0
  173. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/RELEASE +7294 -0
  174. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h.html +5096 -0
  175. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h_source.html +389 -0
  176. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp.html +83 -0
  177. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp_source.html +478 -0
  178. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h.html +318 -0
  179. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h_source.html +200 -0
  180. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bc_s.png +0 -0
  181. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bdwn.png +0 -0
  182. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.html +2274 -0
  183. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.png +0 -0
  184. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.html +69 -0
  185. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.png +0 -0
  186. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/closed.png +0 -0
  187. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +68 -0
  188. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.css +1440 -0
  189. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.png +0 -0
  190. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dynsections.js +97 -0
  191. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2blank.png +0 -0
  192. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2doc.png +0 -0
  193. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderclosed.png +0 -0
  194. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderopen.png +0 -0
  195. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2lastnode.png +0 -0
  196. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2link.png +0 -0
  197. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mlastnode.png +0 -0
  198. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mnode.png +0 -0
  199. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2node.png +0 -0
  200. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2plastnode.png +0 -0
  201. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2pnode.png +0 -0
  202. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2splitbar.png +0 -0
  203. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2vertline.png +0 -0
  204. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/index.html +58 -0
  205. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/jquery.js +31 -0
  206. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_f.png +0 -0
  207. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_g.png +0 -0
  208. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_h.png +0 -0
  209. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/open.png +0 -0
  210. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/structVAR.html +143 -0
  211. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_off.png +0 -0
  212. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_on.png +0 -0
  213. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_a.png +0 -0
  214. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_b.png +0 -0
  215. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_h.png +0 -0
  216. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_s.png +0 -0
  217. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tabs.css +60 -0
  218. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/phreeqc3.chm +0 -0
  219. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/CMakeLists.txt +11 -0
  220. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.am +88 -0
  221. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.in +696 -0
  222. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/CMakeLists.txt +1 -0
  223. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt +35 -0
  224. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt.in +21 -0
  225. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/README.txt +44 -0
  226. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/advect.c +101 -0
  227. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/ic +17 -0
  228. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/phreeqc.dat +1579 -0
  229. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/CMakeLists.txt +10 -0
  230. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/README.txt +3 -0
  231. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/CMakeLists.txt +9 -0
  232. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/phreeqc.dat +1582 -0
  233. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/runphreeqc.xls +0 -0
  234. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/withcallback.xls +0 -0
  235. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/CMakeLists.txt +11 -0
  236. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/Gypsum.py +52 -0
  237. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/parallel_advect.py +465 -0
  238. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/phreeqc.dat +1582 -0
  239. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/pitzer.dat +790 -0
  240. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/wateq4f.dat +3846 -0
  241. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/CMakeLists.txt +1 -0
  242. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt +35 -0
  243. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt.in +20 -0
  244. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/README.txt +45 -0
  245. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/advect.cpp +110 -0
  246. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/ic +17 -0
  247. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/phreeqc.dat +1579 -0
  248. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/CMakeLists.txt +1 -0
  249. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt +44 -0
  250. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt.in +24 -0
  251. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/README.txt +45 -0
  252. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/advect.F90 +102 -0
  253. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/ic +17 -0
  254. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/phreeqc.dat +1579 -0
  255. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt +26 -0
  256. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt.in +20 -0
  257. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/README.txt +37 -0
  258. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/ex2 +26 -0
  259. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/main.cpp +20 -0
  260. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/phreeqc.dat +1837 -0
  261. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/post-install.cmake.in +7 -0
  262. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/CMakeLists.txt +185 -0
  263. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.cpp +171 -0
  264. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.h +34 -0
  265. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.am +18 -0
  266. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.in +466 -0
  267. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestCVar.cpp +9 -0
  268. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqc.cpp +4901 -0
  269. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqcLib.cpp +4644 -0
  270. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestSelectedOutput.cpp +669 -0
  271. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestVar.cpp +10 -0
  272. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/conv_fail.in +11 -0
  273. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/dump +42 -0
  274. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/iso.dat +7231 -0
  275. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/kinn20140218 +349 -0
  276. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/missing_e.dat +1556 -0
  277. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch +105 -0
  278. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch_no_set +102 -0
  279. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.90a6449 +1935 -0
  280. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.old +1556 -0
  281. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/libtool.m4 +8388 -0
  282. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltoptions.m4 +437 -0
  283. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltsugar.m4 +124 -0
  284. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltversion.m4 +23 -0
  285. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/lt~obsolete.m4 +99 -0
  286. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/resource.h +14 -0
  287. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.cpp +401 -0
  288. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.hxx +77 -0
  289. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CVar.hxx +162 -0
  290. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Debug.h +12 -0
  291. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/ErrorReporter.hxx +70 -0
  292. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.cpp +1889 -0
  293. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f.inc +91 -0
  294. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f90.inc +603 -0
  295. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.h +2182 -0
  296. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.hpp +1027 -0
  297. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcCallbacks.h +19 -0
  298. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcF.f +653 -0
  299. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcLib.cpp +1098 -0
  300. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface.F90 +1283 -0
  301. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.cpp +535 -0
  302. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.h +162 -0
  303. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.am +210 -0
  304. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.in +1294 -0
  305. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/README.Fortran +17 -0
  306. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.c +84 -0
  307. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.h +152 -0
  308. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Version.h +36 -0
  309. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fimpl.h +282 -0
  310. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.cpp +646 -0
  311. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.h +163 -0
  312. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap1.cpp +24 -0
  313. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap2.cpp +24 -0
  314. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap3.cpp +24 -0
  315. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap4.cpp +24 -0
  316. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap5.cpp +24 -0
  317. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap6.cpp +25 -0
  318. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap7.cpp +25 -0
  319. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap8.cpp +24 -0
  320. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.cpp +225 -0
  321. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.h +59 -0
  322. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.cpp +1382 -0
  323. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.h +444 -0
  324. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.cpp +42 -0
  325. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.h +79 -0
  326. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.cpp +41 -0
  327. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.h +28 -0
  328. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.cxx +398 -0
  329. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.h +117 -0
  330. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.cxx +466 -0
  331. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.h +74 -0
  332. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.h +1184 -0
  333. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.resX +36 -0
  334. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.cxx +265 -0
  335. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.h +59 -0
  336. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.cxx +659 -0
  337. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.h +103 -0
  338. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.cxx +40 -0
  339. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.h +53 -0
  340. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.cxx +202 -0
  341. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.h +138 -0
  342. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.cxx +318 -0
  343. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.h +81 -0
  344. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NA.h +1 -0
  345. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.cxx +537 -0
  346. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.h +66 -0
  347. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.cxx +190 -0
  348. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.h +67 -0
  349. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.cpp +8350 -0
  350. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.h +572 -0
  351. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PHRQ_io_output.cpp +411 -0
  352. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.cxx +375 -0
  353. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.h +70 -0
  354. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.cxx +441 -0
  355. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.h +83 -0
  356. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.cpp +2087 -0
  357. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.h +2164 -0
  358. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.cpp +242 -0
  359. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.h +104 -0
  360. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.cxx +417 -0
  361. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.h +43 -0
  362. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.cxx +284 -0
  363. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.h +57 -0
  364. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ReadClass.cxx +1150 -0
  365. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.cxx +609 -0
  366. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.h +128 -0
  367. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.cxx +317 -0
  368. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.h +59 -0
  369. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.cxx +297 -0
  370. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.h +66 -0
  371. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.cpp +115 -0
  372. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.h +209 -0
  373. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.cxx +213 -0
  374. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.h +42 -0
  375. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.cxx +1795 -0
  376. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.h +154 -0
  377. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.cxx +333 -0
  378. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.h +85 -0
  379. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.cxx +1507 -0
  380. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.h +141 -0
  381. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.cpp +358 -0
  382. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.h +81 -0
  383. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.cxx +837 -0
  384. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.h +108 -0
  385. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.cxx +617 -0
  386. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.h +137 -0
  387. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.cxx +509 -0
  388. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.h +70 -0
  389. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.cxx +103 -0
  390. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.h +89 -0
  391. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.cxx +423 -0
  392. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.h +42 -0
  393. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.cpp +78 -0
  394. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.h +159 -0
  395. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.cpp +32 -0
  396. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.h +39 -0
  397. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ZedGraph.dll +0 -0
  398. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/advection.cpp +140 -0
  399. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/basicsubs.cpp +4333 -0
  400. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cl1.cpp +881 -0
  401. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.cxx +117 -0
  402. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.h +48 -0
  403. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_exports.h +20 -0
  404. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.cpp +914 -0
  405. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.h +207 -0
  406. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.cxx +1331 -0
  407. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.h +310 -0
  408. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.cxx +263 -0
  409. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.h +29 -0
  410. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/phrqtype.h +18 -0
  411. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.cpp +566 -0
  412. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.h +267 -0
  413. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.cpp +3939 -0
  414. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.h +940 -0
  415. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.cxx +617 -0
  416. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.h +78 -0
  417. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.cxx +154 -0
  418. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.h +58 -0
  419. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.cpp +175 -0
  420. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.h +341 -0
  421. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.cpp +277 -0
  422. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.h +60 -0
  423. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/gases.cpp +748 -0
  424. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/global_structures.h +1672 -0
  425. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/input.cpp +133 -0
  426. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/integrate.cpp +1219 -0
  427. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/inverse.cpp +5135 -0
  428. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/isotopes.cpp +1813 -0
  429. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/kinetics.cpp +3180 -0
  430. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/mainsubs.cpp +2320 -0
  431. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/model.cpp +5843 -0
  432. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.cpp +272 -0
  433. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.h +485 -0
  434. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.cpp +1032 -0
  435. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.h +369 -0
  436. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/parse.cpp +1044 -0
  437. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.cpp +316 -0
  438. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.h +47 -0
  439. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer.cpp +2709 -0
  440. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer_structures.cpp +225 -0
  441. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/prep.cpp +6267 -0
  442. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/print.cpp +3673 -0
  443. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/read.cpp +10245 -0
  444. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/readtr.cpp +1495 -0
  445. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.cpp +158 -0
  446. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.h +33 -0
  447. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sit.cpp +1684 -0
  448. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.cpp +324 -0
  449. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.h +261 -0
  450. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/spread.cpp +1309 -0
  451. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/step.cpp +1566 -0
  452. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/structures.cpp +3381 -0
  453. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.cpp +133 -0
  454. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.h +162 -0
  455. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialstypes.h +183 -0
  456. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tally.cpp +1288 -0
  457. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tidy.cpp +5600 -0
  458. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/transport.cpp +6403 -0
  459. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/utilities.cpp +1339 -0
  460. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/thread.h +64 -0
  461. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/CMakeLists.txt +133 -0
  462. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.am +45 -0
  463. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.in +1128 -0
  464. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/ex2.in +26 -0
  465. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main.f90 +31 -0
  466. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main77.f +6 -0
  467. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main_fortran.cxx +8 -0
  468. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/phreeqc.dat.in +1556 -0
  469. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_c.c +148 -0
  470. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_cxx.cxx +152 -0
  471. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_f90.F90 +328 -0
  472. pyEQL/phreeqc/iphreeqc_wrapper.cpp +75 -0
  473. pyEQL/phreeqc/solution.py +74 -0
  474. pyEQL/phreeqc/var.py +50 -0
  475. pyEQL/presets/Ringers lactate.yaml +20 -0
  476. pyEQL/presets/__init__.py +17 -0
  477. pyEQL/presets/normal saline.yaml +17 -0
  478. pyEQL/presets/rainwater.yaml +17 -0
  479. pyEQL/presets/seawater.yaml +29 -0
  480. pyEQL/presets/urine.yaml +26 -0
  481. pyEQL/presets/wastewater.yaml +21 -0
  482. pyEQL/py.typed +0 -0
  483. pyEQL/salt_ion_match.py +112 -0
  484. pyEQL/solute.py +163 -0
  485. pyEQL/solution.py +2714 -0
  486. pyEQL/utils.py +237 -0
  487. pyeql-1.4.0rc9.dist-info/METADATA +130 -0
  488. pyeql-1.4.0rc9.dist-info/RECORD +491 -0
  489. pyeql-1.4.0rc9.dist-info/WHEEL +6 -0
  490. pyeql-1.4.0rc9.dist-info/licenses/AUTHORS.md +21 -0
  491. pyeql-1.4.0rc9.dist-info/licenses/LICENSE.txt +20 -0
@@ -0,0 +1,1288 @@
1
+ #include "Utils.h"
2
+ #include "Phreeqc.h"
3
+ #include "phqalloc.h"
4
+ #include "Temperature.h"
5
+ #include "Exchange.h"
6
+ #include "GasPhase.h"
7
+ #include "Reaction.h"
8
+ #include "PPassemblage.h"
9
+ #include "SSassemblage.h"
10
+ #include "cxxKinetics.h"
11
+ #include "Solution.h"
12
+
13
+ #if defined(PHREEQCI_GUI)
14
+ #ifdef _DEBUG
15
+ #define new DEBUG_NEW
16
+ #undef THIS_FILE
17
+ static char THIS_FILE[] = __FILE__;
18
+ #endif
19
+ #endif
20
+
21
+ /*
22
+ Calling sequence
23
+
24
+ Initialization:
25
+ ---------------
26
+
27
+ build_tally_table(); finds all elements (rows),
28
+ possible return values (columns),
29
+ allocates space
30
+ get_tally_table_rows_columns(int *rows, int *columns)
31
+ returns number of rows and columns in table
32
+ get_tally_table_row_heading(int row, char *string)
33
+ row is C row number
34
+ returns row descriptor for row
35
+ get_tally_table_column_heading(int column, int *type, char *string)
36
+ column is C column number
37
+ returns column heading for column
38
+
39
+ Each call to phreeqc:
40
+ ---------------------
41
+
42
+ zero_tally_table(); initialize table to 0s
43
+ set_reaction_moles(n_user, moles) n_user is reservoir number
44
+ moles is number of moles of reaction to add
45
+
46
+ int set_reaction_temperature(n_user, tc)
47
+
48
+ fill_tally_table(int *n_user, int index_conservative, int n_buffer)
49
+ n_user is reservoir number
50
+ index_conservative is solution number
51
+ where conservative mixing is stored
52
+ slot is 0 for initial
53
+
54
+ run phreeqc here.
55
+
56
+ fill_tally_table(int *n_user, int index_conservative, int n_buffer)
57
+ n_user is reservoir number
58
+ index_conservative is solution number
59
+ where conservative mixing is stored
60
+ slot is 1 for final
61
+ store_tally_table(LDBLE *array, int row_dim, int col_dim, LDBLE fill_factor)
62
+ row_dim is Fortran dimension
63
+ col_dim is Fortran dimension
64
+ array is space from Fortran
65
+ stores conservative mixing (column 0)
66
+ stores reaction (column 1)
67
+ difference between slot 1 and slot 0 for
68
+ all other entities (columns 2-n)
69
+
70
+ Finalization:
71
+ -------------
72
+ int free_tally_table(void); Frees space
73
+
74
+ */
75
+ /* ---------------------------------------------------------------------- */
76
+ int Phreeqc::
77
+ get_all_components(void)
78
+ /* ---------------------------------------------------------------------- */
79
+ {
80
+ /*
81
+ * Counts components in any defined solution, gas_phase, exchanger,
82
+ * surface, or pure_phase_assemblage
83
+ *
84
+ * Returns n_comp, which is total, including H, O, elements, and Charge
85
+ * names contains character strings with names of components
86
+ */
87
+ int i, j;
88
+ /*
89
+ * Accumulate all aqueous components
90
+ */
91
+ add_all_components_tally();
92
+
93
+ // add secondary master species
94
+ for (i = 0; i < (int)master.size(); i++)
95
+ {
96
+ if (master[i]->total > 0.0 && master[i]->s->type == AQ && master[i]->primary == TRUE)
97
+ {
98
+ for (int j = i + 1; j < (int)master.size(); j++)
99
+ {
100
+ if (master[j]->elt->primary == master[i])
101
+ {
102
+ master[j]->total = 1.0;
103
+ }
104
+ else
105
+ {
106
+ break;
107
+ }
108
+ }
109
+ }
110
+ }
111
+
112
+
113
+ /*
114
+ * Count components + Alkalinity + total_h + total_o
115
+ */
116
+ tally_count_component = 3;
117
+ for (i = 0; i < (int)master.size(); i++)
118
+ {
119
+ if (master[i]->total > 0.0 && master[i]->s->type == AQ)
120
+ {
121
+ tally_count_component++;
122
+ }
123
+ }
124
+ /*
125
+ * Put information in buffer.
126
+ * Buffer contains an entry for every primary master
127
+ * species that can be used in the transport problem.
128
+ */
129
+ t_buffer = (class tally_buffer *) PHRQ_malloc(
130
+ (size_t)tally_count_component * sizeof(class tally_buffer));
131
+
132
+ // store alkalinity
133
+ j = 0;
134
+ t_buffer[j].name = string_hsave("Alkalinity");
135
+ t_buffer[j].master = master_bsearch("Alkalinity");
136
+ t_buffer[j].gfw = t_buffer[j].master->elt->gfw;
137
+ j++;
138
+
139
+ // store total_h
140
+ t_buffer[j].name = string_hsave("Total_H");
141
+ t_buffer[j].master = NULL;
142
+ compute_gfw("H", &(t_buffer[j].gfw));
143
+ j++;
144
+
145
+ // store total_o
146
+ t_buffer[j].name = string_hsave("Total_O");
147
+ t_buffer[j].master = NULL;
148
+ compute_gfw("O", &(t_buffer[j].gfw));
149
+ j++;
150
+
151
+ for (i = 0; i < (int)master.size(); i++)
152
+ {
153
+ if (master[i]->total > 0.0 && master[i]->s->type == AQ)
154
+ {
155
+ t_buffer[j].name = master[i]->elt->name;
156
+ t_buffer[j].master = master[i];
157
+ t_buffer[j].gfw = master[i]->elt->gfw;
158
+ j++;
159
+ }
160
+ }
161
+ /*
162
+ * Return value
163
+ */
164
+ /**n_comp = count_component;*/
165
+ count_tally_table_rows = tally_count_component;
166
+ return (OK);
167
+ }
168
+ /* ---------------------------------------------------------------------- */
169
+ int Phreeqc::
170
+ store_tally_table(LDBLE * l_array, int row_dim_in, int col_dim, LDBLE fill_factor)
171
+ /* ---------------------------------------------------------------------- */
172
+ {
173
+ int i, j;
174
+ int row_dim = row_dim_in + 1;
175
+ //if (tally_table == NULL)
176
+ if (tally_table.size() == 0)
177
+ {
178
+ input_error++;
179
+ error_msg("Tally table not defined, get_tally_table_rows_columns",
180
+ CONTINUE);
181
+ return (ERROR);
182
+ }
183
+ if (count_tally_table_rows > row_dim)
184
+ {
185
+ input_error++;
186
+ error_msg
187
+ ("Too many tally table rows for Fortran storage, store_tally_table",
188
+ CONTINUE);
189
+ return (ERROR);
190
+ }
191
+ if (count_tally_table_columns > col_dim)
192
+ {
193
+ input_error++;
194
+ error_msg
195
+ ("Too many tally table columns for Fortran storage, store_tally_table",
196
+ CONTINUE);
197
+ return (ERROR);
198
+ }
199
+ /*
200
+ * store conservative mixing solution
201
+ */
202
+ for (j = 0; j < count_tally_table_rows; j++)
203
+ {
204
+ l_array[j] = tally_table[0].total[1][j].moles;
205
+ }
206
+ /*
207
+ * store reaction solution
208
+ */
209
+ for (j = 0; j < count_tally_table_rows; j++)
210
+ {
211
+ l_array[row_dim + j] = tally_table[1].total[1][j].moles;
212
+ }
213
+ /*
214
+ * Calculate deltas
215
+ */
216
+
217
+ diff_tally_table();
218
+
219
+ /*
220
+ * store deltas for all other columns
221
+ */
222
+ for (i = 2; i < count_tally_table_columns; i++)
223
+ {
224
+ for (j = 0; j < count_tally_table_rows; j++)
225
+ {
226
+ l_array[i * row_dim + j] =
227
+ tally_table[i].total[2][j].moles / fill_factor;
228
+ }
229
+ }
230
+
231
+ /*
232
+ * Add row for total moles of reactant
233
+ */
234
+ for (size_t i = 0; i < count_tally_table_columns; i++)
235
+ {
236
+ l_array[i * (size_t)row_dim + count_tally_table_rows] =
237
+ tally_table[i].moles / fill_factor;
238
+ }
239
+ return (OK);
240
+ }
241
+
242
+ /* ---------------------------------------------------------------------- */
243
+ int Phreeqc::
244
+ get_tally_table_rows_columns(int *rows, int *columns)
245
+ /* ---------------------------------------------------------------------- */
246
+ {
247
+ *rows = 0;
248
+ *columns = 0;
249
+ if (tally_table.size() == 0)
250
+ {
251
+ input_error++;
252
+ error_msg("tally table not defined, get_tally_table_rows_columns",
253
+ CONTINUE);
254
+ return (ERROR);
255
+ }
256
+ *rows = (int)count_tally_table_rows;
257
+ *columns = (int)count_tally_table_columns;
258
+ return (OK);
259
+ }
260
+
261
+ /* ---------------------------------------------------------------------- */
262
+ int Phreeqc::
263
+ get_tally_table_row_heading(int row, char *string)
264
+ /* ---------------------------------------------------------------------- */
265
+ {
266
+ /*
267
+ * row is C row number
268
+ */
269
+ strcpy(string, "");
270
+ if (tally_table.size() == 0)
271
+ {
272
+ input_error++;
273
+ error_msg("Tally table not defined, get_tally_table row_heading",
274
+ CONTINUE);
275
+ return (ERROR);
276
+ }
277
+ if (row >= count_tally_table_rows)
278
+ {
279
+ input_error++;
280
+ error_msg
281
+ ("Row exceeds tally table size, get_tally_table row_heading",
282
+ CONTINUE);
283
+ return (ERROR);
284
+ }
285
+ strcpy(string, t_buffer[row].name);
286
+ return (OK);
287
+ }
288
+
289
+ /* ---------------------------------------------------------------------- */
290
+ int Phreeqc::
291
+ get_tally_table_column_heading(int column, int *type, char *string)
292
+ /* ---------------------------------------------------------------------- */
293
+ {
294
+ /*
295
+ * column is C column number
296
+ */
297
+ *type = -1;
298
+ strcpy(string, "");
299
+ if (tally_table.size() == 0)
300
+ {
301
+ input_error++;
302
+ error_msg("tally table not defined, get_tally_table_column_heading",
303
+ CONTINUE);
304
+ return (ERROR);
305
+ }
306
+ if (column >= count_tally_table_columns)
307
+ {
308
+ input_error++;
309
+ error_msg
310
+ ("column exceeds tally table size, get_tally_table_column_heading",
311
+ CONTINUE);
312
+ return (ERROR);
313
+ }
314
+ strcpy(string, tally_table[column].name);
315
+ *type = tally_table[column].type;
316
+ return (OK);
317
+ }
318
+
319
+ /* ---------------------------------------------------------------------- */
320
+ int Phreeqc::
321
+ free_tally_table(void)
322
+ /* ---------------------------------------------------------------------- */
323
+ {
324
+ int i, k;
325
+ if (tally_table.size() == 0)
326
+ return (OK);
327
+ for (i = 0; i < count_tally_table_columns; i++)
328
+ {
329
+ if (tally_table[i].formula.size() != 0)
330
+ tally_table[i].formula.clear();
331
+ for (k = 0; k < 3; k++)
332
+ {
333
+ tally_table[i].total[k] = (class tally_buffer *) free_check_null(
334
+ tally_table[i].total[k]);
335
+ }
336
+ }
337
+ //tally_table = (class tally *) free_check_null(tally_table);
338
+ t_buffer = (class tally_buffer *) free_check_null(t_buffer);
339
+ return (OK);
340
+ }
341
+
342
+ /* ---------------------------------------------------------------------- */
343
+ int Phreeqc::
344
+ zero_tally_table(void)
345
+ /* ---------------------------------------------------------------------- */
346
+ {
347
+ int i, j, k;
348
+ for (i = 0; i < count_tally_table_columns; i++)
349
+ {
350
+ tally_table[i].moles = 0.0;
351
+ for (j = 0; j < count_tally_table_rows; j++)
352
+ {
353
+ for (k = 0; k < 3; k++)
354
+ {
355
+ tally_table[i].total[k][j].moles = 0;
356
+ }
357
+ }
358
+ }
359
+ return (OK);
360
+ }
361
+
362
+ /* ---------------------------------------------------------------------- */
363
+ int Phreeqc::
364
+ diff_tally_table(void)
365
+ /* ---------------------------------------------------------------------- */
366
+ {
367
+ int i, j;
368
+ /*
369
+ output_msg("Difference\n\n");
370
+ */
371
+ for (i = 0; i < count_tally_table_columns; i++)
372
+ {
373
+ for (j = 0; j < count_tally_table_rows; j++)
374
+ {
375
+ tally_table[i].total[2][j].moles =
376
+ tally_table[i].total[1][j].moles -
377
+ tally_table[i].total[0][j].moles;
378
+ }
379
+
380
+ /*
381
+ output_msg(sformatf( "Column %d\t%s\tType: %d\n", i, tally_table[i].name, tally_table[i].type));
382
+ for (j = 0; j < count_tally_table_rows; j++) {
383
+ output_msg(sformatf( "\t%d\t%s\t%e\n", j, tally_table[i].total[2][j].name, (double) tally_table[i].total[2][j].moles));
384
+ }
385
+ */
386
+ }
387
+ return (OK);
388
+ }
389
+
390
+ /* ---------------------------------------------------------------------- */
391
+ int Phreeqc::
392
+ print_tally_table(void)
393
+ /* ---------------------------------------------------------------------- */
394
+ {
395
+ int i, j;
396
+ output_msg(sformatf( "Tally_table\n\n"));
397
+ for (i = 0; i < count_tally_table_columns; i++)
398
+ {
399
+ output_msg(sformatf( "%s\tType: %d\n", tally_table[i].name,
400
+ tally_table[i].type));
401
+ output_msg(sformatf( "\n"));
402
+ output_msg(sformatf( "\t%15s\t%15s\t%15s\n", "Initial",
403
+ "Final", "Difference"));
404
+ for (j = 0; j < count_tally_table_rows; j++)
405
+ {
406
+ output_msg(sformatf( "%5s\t%15g\t%15g\t%15g\n",
407
+ t_buffer[j].name, tally_table[i].total[0][j].moles,
408
+ tally_table[i].total[1][j].moles,
409
+ tally_table[i].total[2][j].moles));
410
+ }
411
+ output_msg(sformatf( "\n"));
412
+ }
413
+ return (OK);
414
+ }
415
+
416
+ /* ---------------------------------------------------------------------- */
417
+ int Phreeqc::
418
+ fill_tally_table(int *n_user, int index_conservative, int n_buffer)
419
+ /* ---------------------------------------------------------------------- */
420
+ {
421
+ /*
422
+ * Routine accumulates elements from all solutions, phases, gas phases,
423
+ * exchangers, and surfaces.
424
+ */
425
+ int found;
426
+ LDBLE moles;
427
+ //const char* cptr;
428
+ /*
429
+ * Cycle through tally table columns
430
+ */
431
+ for (int i = 0; i < count_tally_table_columns; i++)
432
+ {
433
+ switch (tally_table[i].type)
434
+ {
435
+ case Solution:
436
+ /*
437
+ * fill solution
438
+ */
439
+ if (n_user[Solution] < 0 || n_buffer == 0)
440
+ break;
441
+ {
442
+ cxxSolution *solution_ptr = NULL;;
443
+ if (i == 0)
444
+ {
445
+ solution_ptr = Utilities::Rxn_find(Rxn_solution_map, index_conservative);
446
+ }
447
+ else if (i == 1)
448
+ {
449
+ solution_ptr = Utilities::Rxn_find(Rxn_solution_map, n_user[Solution]);
450
+ }
451
+ else
452
+ {
453
+ error_msg("Solution is not in first two columns of tally_table", STOP);
454
+ }
455
+ if (solution_ptr == NULL)
456
+ break;
457
+ /*
458
+ * Add secondary master species
459
+ */
460
+
461
+
462
+ xsolution_zero();
463
+
464
+ // adds primary master species
465
+ add_solution(solution_ptr, 1.0, 1.0);
466
+
467
+ // adds secondary master species
468
+ cxxNameDouble::iterator jit = solution_ptr->Get_totals().begin();
469
+ for ( ; jit != solution_ptr->Get_totals().end(); jit++)
470
+ {
471
+ class master *master_ptr = master_bsearch(jit->first.c_str());
472
+ master_ptr->total = jit->second;
473
+ }
474
+
475
+ // Fill table
476
+ master_to_tally_table(tally_table[i].total[n_buffer]);
477
+
478
+ // Add alkalinity
479
+ tally_table[i].total[n_buffer][0].moles = solution_ptr->Get_total_alkalinity();
480
+
481
+ // Add total_h
482
+ tally_table[i].total[n_buffer][1].moles = solution_ptr->Get_total_h();
483
+
484
+ // Add total_o
485
+ tally_table[i].total[n_buffer][2].moles = solution_ptr->Get_total_o();
486
+ }
487
+ break;
488
+ case Reaction:
489
+ /*
490
+ * fill reaction
491
+ */
492
+ if (n_user[Reaction] < 0)
493
+ break;
494
+ {
495
+ cxxReaction *reaction_ptr = Utilities::Rxn_find(Rxn_reaction_map, n_user[Reaction]);
496
+ if (reaction_ptr == NULL)
497
+ break;
498
+ count_elts = 0;
499
+ paren_count = 0;
500
+ if (n_buffer == 1)
501
+ {
502
+ moles = reaction_ptr->Get_steps()[0];
503
+ }
504
+ else
505
+ {
506
+ moles = 0.0;
507
+ }
508
+ reaction_calc(reaction_ptr);
509
+ add_elt_list(reaction_ptr->Get_elementList(), moles);
510
+ elt_list_to_tally_table(tally_table[i].total[n_buffer]);
511
+ }
512
+ break;
513
+ case Pure_phase:
514
+ /*
515
+ * fill an equilibrium phase
516
+ */
517
+ if (n_user[Pure_phase] < 0)
518
+ break;
519
+ {
520
+ cxxPPassemblage * pp_assemblage_ptr = Utilities::Rxn_find(Rxn_pp_assemblage_map, n_user[Pure_phase]);
521
+ if (pp_assemblage_ptr == NULL)
522
+ break;
523
+ std::map<std::string, cxxPPassemblageComp>::iterator it;
524
+ it = pp_assemblage_ptr->Get_pp_assemblage_comps().begin();
525
+ for ( ; it != pp_assemblage_ptr->Get_pp_assemblage_comps().end(); it++)
526
+ {
527
+ if (string_hsave(it->second.Get_name().c_str()) ==
528
+ tally_table[i].name)
529
+ break;
530
+ if (strcmp_nocase(it->second.Get_name().c_str(),
531
+ tally_table[i].name) == 0)
532
+ break;
533
+ }
534
+ if (it == pp_assemblage_ptr->Get_pp_assemblage_comps().end())
535
+ break;
536
+ count_elts = 0;
537
+ paren_count = 0;
538
+ moles = it->second.Get_moles();
539
+ tally_table[i].moles = moles;
540
+ add_elt_list(tally_table[i].formula, moles);
541
+ elt_list_to_tally_table(tally_table[i].total[n_buffer]);
542
+ }
543
+ break;
544
+ case Exchange:
545
+ {
546
+ /*
547
+ * fill exchange
548
+ */
549
+ if (n_user[Exchange] < 0)
550
+ break;
551
+ cxxExchange * exchange_ptr = Utilities::Rxn_find(Rxn_exchange_map, n_user[Exchange]);
552
+ if (exchange_ptr == NULL)
553
+ break;
554
+ count_elts = 0;
555
+ paren_count = 0;
556
+ for (size_t j = 0; j < exchange_ptr->Get_exchange_comps().size(); j++)
557
+ {
558
+ add_elt_list(exchange_ptr->Get_exchange_comps()[j].Get_totals(), 1.0);
559
+ }
560
+ elt_list_combine();
561
+ elt_list_to_tally_table(tally_table[i].total[n_buffer]);
562
+ }
563
+ break;
564
+ case Surface:
565
+ /*
566
+ * fill surface
567
+ */
568
+ if (n_user[Surface] < 0)
569
+ break;
570
+ {
571
+ cxxSurface * surface_ptr = Utilities::Rxn_find(Rxn_surface_map, n_user[Surface]);
572
+ if (surface_ptr == NULL)
573
+ break;
574
+ count_elts = 0;
575
+ paren_count = 0;
576
+ for (size_t j = 0; j < surface_ptr->Get_surface_comps().size(); j++)
577
+ {
578
+ add_elt_list(surface_ptr->Get_surface_comps()[j].Get_totals(), 1.0);
579
+ }
580
+ elt_list_combine();
581
+ elt_list_to_tally_table(tally_table[i].total[n_buffer]);
582
+ }
583
+ break;
584
+ case Ss_phase:
585
+ if (n_user[Ss_phase] < 0)
586
+ break;
587
+ {
588
+ /*
589
+ * fill an solid solution phase
590
+ */
591
+
592
+ cxxSSassemblage * ss_assemblage_ptr = Utilities::Rxn_find(Rxn_ss_assemblage_map, n_user[Ss_phase]);
593
+ if (ss_assemblage_ptr == NULL)
594
+ break;
595
+ found = FALSE;
596
+ moles = 0.0;
597
+ std::vector<cxxSS *> ss_ptrs = ss_assemblage_ptr->Vectorize();
598
+ for (size_t j = 0; j < ss_ptrs.size(); j++)
599
+ {
600
+ cxxSS * ss_ptr = ss_ptrs[j];
601
+ cxxSScomp * comp_ptr = NULL;
602
+ size_t k;
603
+ for (k = 0; k < ss_ptr->Get_ss_comps().size(); k++)
604
+ {
605
+ comp_ptr = &(ss_ptr->Get_ss_comps()[k]);
606
+ int l;
607
+ class phase *phase_ptr = phase_bsearch(comp_ptr->Get_name().c_str(), &l, FALSE);
608
+ if (phase_ptr->name == tally_table[i].name)
609
+ break;
610
+ if (strcmp_nocase(phase_ptr->name, tally_table[i].name) == 0)
611
+ break;
612
+ }
613
+ if (k < ss_ptr->Get_ss_comps().size() && comp_ptr)
614
+ {
615
+ moles = comp_ptr->Get_moles();
616
+ found = TRUE;
617
+ break;
618
+ }
619
+ }
620
+ if (found == FALSE)
621
+ break;
622
+ count_elts = 0;
623
+ paren_count = 0;
624
+ tally_table[i].moles = moles;
625
+ add_elt_list(tally_table[i].formula, moles);
626
+ elt_list_to_tally_table(tally_table[i].total[n_buffer]);
627
+ }
628
+ break;
629
+ case Gas_phase:
630
+ /*
631
+ * fill in gas phase
632
+ */
633
+ if (n_user[Gas_phase] < 0)
634
+ break;
635
+ {
636
+ cxxGasPhase * gas_phase_ptr = Utilities::Rxn_find(Rxn_gas_phase_map, n_user[Gas_phase]);
637
+ if (gas_phase_ptr == NULL)
638
+ break;
639
+ count_elts = 0;
640
+ paren_count = 0;
641
+ const std::vector<cxxGasComp> *gc = &(gas_phase_ptr->Get_gas_comps());
642
+ for (size_t l = 0; l < gc->size(); l++)
643
+ {
644
+ int k;
645
+ class phase *phase_ptr = phase_bsearch((*gc)[l].Get_phase_name().c_str(), &k, FALSE);
646
+
647
+ add_elt_list(phase_ptr->next_elt, (*gc)[l].Get_moles());
648
+ }
649
+ elt_list_combine();
650
+ elt_list_to_tally_table(tally_table[i].total[n_buffer]);
651
+ break;
652
+ }
653
+ case Kinetics:
654
+ {
655
+ /*
656
+ * fill in kinetics
657
+ */
658
+ if (n_user[Kinetics] < 0)
659
+ break;
660
+ cxxKinetics *kinetics_ptr = Utilities::Rxn_find(Rxn_kinetics_map, n_user[Kinetics]);
661
+ if (kinetics_ptr == NULL)
662
+ break;
663
+ cxxKineticsComp * kinetics_comp_ptr = NULL;
664
+ size_t j;
665
+ for (j = 0; j < kinetics_ptr->Get_kinetics_comps().size(); j++)
666
+ {
667
+ kinetics_comp_ptr = &(kinetics_ptr->Get_kinetics_comps()[j]);
668
+ if (string_hsave(kinetics_comp_ptr->Get_rate_name().c_str()) == tally_table[i].name)
669
+ break;
670
+ if (strcmp_nocase
671
+ (kinetics_comp_ptr->Get_rate_name().c_str(), tally_table[i].name) == 0)
672
+ break;
673
+ }
674
+ if (j >= kinetics_ptr->Get_kinetics_comps().size())
675
+ break;
676
+ moles = 0.0;
677
+ if (kinetics_comp_ptr)
678
+ {
679
+ moles = kinetics_comp_ptr->Get_m();
680
+ }
681
+ tally_table[i].moles = moles;
682
+ count_elts = 0;
683
+ paren_count = 0;
684
+ add_elt_list(tally_table[i].formula, moles);
685
+ elt_list_to_tally_table(tally_table[i].total[n_buffer]);
686
+ }
687
+ break;
688
+ case Mix:
689
+ break;
690
+ case Temperature:
691
+ case Pressure:
692
+ break;
693
+ case UnKnown:
694
+ break;
695
+ }
696
+ }
697
+
698
+ return (OK);
699
+ }
700
+
701
+ /* ---------------------------------------------------------------------- */
702
+ int Phreeqc::
703
+ elt_list_to_tally_table(class tally_buffer *buffer_ptr)
704
+ /* ---------------------------------------------------------------------- */
705
+ {
706
+ int i, j;
707
+ for (i = 0; i < count_tally_table_rows; i++)
708
+ {
709
+ buffer_ptr[i].moles = 0.0;
710
+ }
711
+ /*
712
+ * copy element list amounts to buffer in tally table
713
+ * for column number
714
+ */
715
+
716
+ for (j = 0; j < count_elts; j++)
717
+ {
718
+ if (elt_list[j].elt->primary->s == s_h2o)
719
+ continue;
720
+ if (elt_list[j].elt->primary->s == s_hplus)
721
+ continue;
722
+ if (elt_list[j].elt->primary->s == s_h3oplus)
723
+ continue;
724
+ if (elt_list[j].elt->primary->type != AQ)
725
+ continue;
726
+ for (i = 0; i < count_tally_table_rows; i++)
727
+ {
728
+ if (buffer_ptr[i].master != NULL)
729
+ {
730
+ if (elt_list[j].elt->primary ==
731
+ buffer_ptr[i].master->elt->primary)
732
+ {
733
+ buffer_ptr[i].moles = elt_list[j].coef;
734
+ break;
735
+ }
736
+ }
737
+ }
738
+ if (i >= count_tally_table_rows)
739
+ {
740
+ error_msg("Should not be here in elt_list_to_tally_table", STOP);
741
+ }
742
+ }
743
+ return (OK);
744
+ }
745
+
746
+ /* ---------------------------------------------------------------------- */
747
+ int Phreeqc::
748
+ master_to_tally_table(class tally_buffer *buffer_ptr)
749
+ /* ---------------------------------------------------------------------- */
750
+ {
751
+ int i, j;
752
+ for (i = 0; i < count_tally_table_rows; i++)
753
+ {
754
+ buffer_ptr[i].moles = 0.0;
755
+ }
756
+ /*
757
+ * copy element list amounts to buffer in tally table
758
+ * for column number
759
+ */
760
+ for (j = 0; j < (int)master.size(); j++)
761
+ {
762
+ if (master[j]->total <= 0)
763
+ continue;
764
+ if (master[j]->elt->primary->s == s_h2o)
765
+ continue;
766
+ if (master[j]->elt->primary->s == s_hplus)
767
+ continue;
768
+ if (master[j]->elt->primary->s == s_h3oplus)
769
+ continue;
770
+ if (master[j]->elt->primary->type != AQ)
771
+ continue;
772
+ for (i = 0; i < count_tally_table_rows; i++)
773
+ {
774
+ if (master[j] == buffer_ptr[i].master)
775
+ {
776
+ buffer_ptr[i].moles = master[j]->total;
777
+ break;
778
+ }
779
+ }
780
+ if (i >= count_tally_table_rows)
781
+ {
782
+ error_msg("Should not be here in master_to_tally_table", STOP);
783
+ }
784
+ }
785
+ return (OK);
786
+ }
787
+ /* ---------------------------------------------------------------------- */
788
+ int Phreeqc::
789
+ build_tally_table(void)
790
+ /* ---------------------------------------------------------------------- */
791
+ {
792
+ /*
793
+ * Routine accumulates elements from all solutions, phases, gas phases,
794
+ * exchangers, and surfaces. Counts number of aqueous components
795
+ * to transport. Stores in global variable tally_count_component.
796
+ * Also calculates a number greater than all user numbers and
797
+ * stores in global variable first_user_number.
798
+ */
799
+ int j, k, l, p, save_print_use;
800
+ size_t n;
801
+ //int count_tt_pure_phase, count_tt_ss_phase, count_tt_kinetics;
802
+ class phase *phase_ptr;
803
+ char token[MAX_LENGTH];
804
+ const char* cptr;
805
+ /*
806
+ * make list of all elements in all entities
807
+ * defines the number of rows in the table
808
+ */
809
+ get_all_components();
810
+
811
+ save_print_use = pr.use;
812
+ pr.use = FALSE;
813
+ /*
814
+ * find number of columns
815
+ */
816
+ count_tally_table_columns = 0;
817
+ /*
818
+ * add one for conservative mixing
819
+ */
820
+ n = count_tally_table_columns;
821
+ extend_tally_table();
822
+ tally_table[n].name = string_hsave("Solution_conservative");
823
+ tally_table[n].type = Solution;
824
+ /*
825
+ * add one for mixing plus reaction
826
+ */
827
+ n = count_tally_table_columns;
828
+ extend_tally_table();
829
+ tally_table[n].name = string_hsave("Solution_reaction");
830
+ tally_table[n].type = Solution;
831
+ /*
832
+ * add one for reactions
833
+ */
834
+ if (Rxn_reaction_map.size() > 0)
835
+ {
836
+ n = count_tally_table_columns;
837
+ extend_tally_table();
838
+ tally_table[n].name = string_hsave("Reaction");
839
+ tally_table[n].type = Reaction;
840
+ }
841
+ /*
842
+ * add one for exchangers
843
+ */
844
+ if (Rxn_exchange_map.size() > 0)
845
+ {
846
+ n = count_tally_table_columns;
847
+ extend_tally_table();
848
+ tally_table[n].name = string_hsave("Exchange");
849
+ tally_table[n].type = Exchange;
850
+ }
851
+ /*
852
+ * add one for surface
853
+ */
854
+ if (Rxn_surface_map.size() > 0)
855
+ {
856
+ n = count_tally_table_columns;
857
+ extend_tally_table();
858
+ tally_table[n].name = string_hsave("Surface");
859
+ tally_table[n].type = Surface;
860
+ }
861
+ /*
862
+ * add one for gases
863
+ */
864
+ if (Rxn_gas_phase_map.size() > 0)
865
+ {
866
+ n = count_tally_table_columns;
867
+ extend_tally_table();
868
+ tally_table[n].name = string_hsave("Gas_phase");
869
+ tally_table[n].type = Gas_phase;
870
+ }
871
+ /*
872
+ * Count pure phases
873
+ */
874
+ //count_tt_pure_phase = 0;
875
+ if (Rxn_pp_assemblage_map.size() > 0)
876
+ {
877
+ /*
878
+ * Go through all pure phases in pure phase assemblages
879
+ */
880
+ std::map<int, cxxPPassemblage>::iterator it;
881
+ for (it = Rxn_pp_assemblage_map.begin(); it != Rxn_pp_assemblage_map.end(); it++)
882
+ {
883
+ cxxPPassemblage * pp_assemblage_ptr = &(it->second);
884
+ std::map<std::string, cxxPPassemblageComp>::iterator jit;
885
+ jit = pp_assemblage_ptr->Get_pp_assemblage_comps().begin();
886
+ for ( ; jit != pp_assemblage_ptr->Get_pp_assemblage_comps().end(); jit++)
887
+ {
888
+ cxxPPassemblageComp * comp_ptr = &(jit->second);
889
+ int l;
890
+ class phase * phase_ptr = phase_bsearch(jit->first.c_str(), &l, FALSE);
891
+ /*
892
+ * check if already in tally_table
893
+ */
894
+ for (k = 1; k < count_tally_table_columns; k++)
895
+ {
896
+ if (tally_table[k].type == Pure_phase &&
897
+ tally_table[k].name == phase_ptr->name &&
898
+ tally_table[k].add_formula ==
899
+ string_hsave(comp_ptr->Get_add_formula().c_str()))
900
+ break;
901
+ }
902
+ if (k < count_tally_table_columns)
903
+ continue;
904
+ /*
905
+ * Add to table
906
+ */
907
+ //count_tt_pure_phase++;
908
+ n = count_tally_table_columns;
909
+ extend_tally_table();
910
+ tally_table[n].name = phase_ptr->name;
911
+ tally_table[n].type = Pure_phase;
912
+ tally_table[n].add_formula = string_hsave(comp_ptr->Get_add_formula().c_str());
913
+ count_elts = 0;
914
+ paren_count = 0;
915
+ if (comp_ptr->Get_add_formula().size() > 0)
916
+ {
917
+ Utilities::strcpy_safe(token, MAX_LENGTH, comp_ptr->Get_add_formula().c_str());
918
+ cptr = &(token[0]);
919
+ get_elts_in_species(&cptr, 1.0);
920
+ }
921
+ else
922
+ {
923
+ Utilities::strcpy_safe(token, MAX_LENGTH, phase_ptr->formula);
924
+ add_elt_list(phase_ptr->next_elt, 1.0);
925
+ }
926
+ elt_list_combine();
927
+ tally_table[n].formula = elt_list_vsave();
928
+ }
929
+ }
930
+ }
931
+ /*
932
+ * Add solid-solution pure phases
933
+ */
934
+ //count_tt_ss_phase = 0;
935
+ if (Rxn_ss_assemblage_map.size() > 0)
936
+ {
937
+ /*
938
+ * Go through all components of all solid solutions in solid-solution assemblages
939
+ */
940
+ std::map<int, cxxSSassemblage>::iterator it;
941
+ for (it = Rxn_ss_assemblage_map.begin(); it != Rxn_ss_assemblage_map.end(); it++)
942
+ {
943
+ cxxSSassemblage *ss_assemblage_ptr = &(it->second);
944
+ std::vector<cxxSS *> ss_ptrs = ss_assemblage_ptr->Vectorize();
945
+ for (j = 0; j < (int) ss_ptrs.size(); j++)
946
+ {
947
+ cxxSS * ss_ptr = ss_ptrs[j];
948
+ for (k = 0; k < (int) ss_ptr->Get_ss_comps().size(); k++)
949
+ {
950
+ cxxSScomp *comp_ptr = &(ss_ptr->Get_ss_comps()[k]);
951
+ int l;
952
+ class phase *phase_ptr = phase_bsearch(comp_ptr->Get_name().c_str(), &l, FALSE);
953
+ /*
954
+ * check if already in tally_table
955
+ */
956
+ for (l = 1; l < count_tally_table_columns; l++)
957
+ {
958
+ if (tally_table[l].type == Ss_phase &&
959
+ tally_table[l].name == phase_ptr->name)
960
+ break;
961
+ }
962
+ if (l < count_tally_table_columns)
963
+ continue;
964
+ /*
965
+ * Add to table
966
+ */
967
+ //count_tt_ss_phase++;
968
+ n = count_tally_table_columns;
969
+ extend_tally_table();
970
+ tally_table[n].name = phase_ptr->name;
971
+ tally_table[n].type = Ss_phase;
972
+ count_elts = 0;
973
+ paren_count = 0;
974
+ Utilities::strcpy_safe(token, MAX_LENGTH, phase_ptr->formula);
975
+ add_elt_list(phase_ptr->next_elt, 1.0);
976
+ elt_list_combine();
977
+ tally_table[n].formula = elt_list_vsave();
978
+ }
979
+ }
980
+ }
981
+ }
982
+ /*
983
+ * Add kinetic reactants
984
+ */
985
+ //count_tt_kinetics = 0;
986
+ if (Rxn_kinetics_map.size() > 0)
987
+ {
988
+ std::map<int, cxxKinetics>::iterator it;
989
+ for (it = Rxn_kinetics_map.begin(); it != Rxn_kinetics_map.end(); it++)
990
+ {
991
+ cxxKinetics *kinetics_ptr = &(it->second);
992
+ for (j = 0; j < (int) kinetics_ptr->Get_kinetics_comps().size(); j++)
993
+ {
994
+ cxxKineticsComp *kinetics_comp_ptr = &(kinetics_ptr->Get_kinetics_comps()[j]);
995
+ /*
996
+ * check if already in tally_table
997
+ */
998
+ for (l = 1; l < count_tally_table_columns; l++)
999
+ {
1000
+ if (tally_table[l].type == Kinetics &&
1001
+ tally_table[l].name == string_hsave(kinetics_comp_ptr->Get_rate_name().c_str()))
1002
+ break;
1003
+ }
1004
+ if (l < count_tally_table_columns)
1005
+ continue;
1006
+ /*
1007
+ * Add to table
1008
+ */
1009
+ //count_tt_kinetics++;
1010
+ n = count_tally_table_columns;
1011
+ extend_tally_table();
1012
+ tally_table[n].name = string_hsave(kinetics_comp_ptr->Get_rate_name().c_str());
1013
+ tally_table[n].type = Kinetics;
1014
+ /*
1015
+ * get formula for kinetic component
1016
+ */
1017
+ count_elts = 0;
1018
+ paren_count = 0;
1019
+ phase_ptr = NULL;
1020
+ if (kinetics_comp_ptr->Get_namecoef().size() == 1)
1021
+ {
1022
+ Utilities::strcpy_safe(token, MAX_LENGTH, kinetics_comp_ptr->Get_namecoef().begin()->first.c_str());
1023
+ phase_ptr = phase_bsearch(token, &p, FALSE);
1024
+ }
1025
+ if (phase_ptr != NULL)
1026
+ {
1027
+ add_elt_list(phase_ptr->next_elt, 1.0);
1028
+ }
1029
+ else
1030
+ {
1031
+ cxxNameDouble::iterator it = kinetics_comp_ptr->Get_namecoef().begin();
1032
+ for ( ; it != kinetics_comp_ptr->Get_namecoef().end(); it++)
1033
+ {
1034
+ std::string name = it->first;
1035
+ LDBLE coef = it->second;
1036
+ cptr = name.c_str();
1037
+ get_elts_in_species(&cptr, 1.0 * coef);
1038
+ }
1039
+ }
1040
+ elt_list_combine();
1041
+ tally_table[n].formula = elt_list_vsave();
1042
+ }
1043
+ }
1044
+ }
1045
+
1046
+ pr.use = save_print_use;
1047
+ return (OK);
1048
+ }
1049
+
1050
+ /* ---------------------------------------------------------------------- */
1051
+ void Phreeqc::
1052
+ add_all_components_tally(void)
1053
+ /* ---------------------------------------------------------------------- */
1054
+ {
1055
+ /*
1056
+ * Routine accumulates elements from all solutions, phases, gas phases,
1057
+ * exchangers, and surfaces. Counts number of aqueous components
1058
+ * to transport. Stores in global variable tally_count_component.
1059
+ * Also calculates a number greater than all user numbers and
1060
+ * stores in global variable first_user_number.
1061
+ */
1062
+ int save_print_use;
1063
+
1064
+ save_print_use = pr.use;
1065
+ pr.use = FALSE;
1066
+ /*
1067
+ * Delete solutions less than -1
1068
+ */
1069
+
1070
+ /*
1071
+ * add all solutions
1072
+ */
1073
+ xsolution_zero();
1074
+ {
1075
+ std::map<int, cxxSolution>::iterator it = Rxn_solution_map.begin();
1076
+ for (; it != Rxn_solution_map.end(); it++)
1077
+ {
1078
+ add_solution(&it->second, 1.0 / it->second.Get_mass_water(), 1.0);
1079
+ }
1080
+ }
1081
+ /*
1082
+ * add all irrev reactions
1083
+ */
1084
+ {
1085
+ std::map<int, cxxReaction>::iterator it = Rxn_reaction_map.begin();
1086
+ for (; it != Rxn_reaction_map.end(); it++)
1087
+ {
1088
+ add_reaction(&it->second, 1, 1.0);
1089
+ }
1090
+ }
1091
+ /*
1092
+ * Add pure phases
1093
+ */
1094
+ {
1095
+ std::map<int, cxxPPassemblage>::iterator it = Rxn_pp_assemblage_map.begin();
1096
+ for (; it != Rxn_pp_assemblage_map.end(); it++)
1097
+ {
1098
+ add_pp_assemblage(&(it->second));
1099
+ }
1100
+ }
1101
+ /*
1102
+ * Exchangers
1103
+ */
1104
+ {
1105
+ std::map<int, cxxExchange>::iterator it = Rxn_exchange_map.begin();
1106
+ for (; it != Rxn_exchange_map.end(); it++)
1107
+ {
1108
+ add_exchange(&it->second);
1109
+ }
1110
+ }
1111
+ /*
1112
+ * Surfaces
1113
+ */
1114
+ {
1115
+ std::map<int, cxxSurface>::iterator it = Rxn_surface_map.begin();
1116
+ for (; it != Rxn_surface_map.end(); it++)
1117
+ {
1118
+ add_surface(&it->second);
1119
+ }
1120
+ }
1121
+ /*
1122
+ * Gases
1123
+ */
1124
+ {
1125
+ std::map<int, cxxGasPhase>::iterator it = Rxn_gas_phase_map.begin();
1126
+ for ( ; it != Rxn_gas_phase_map.end(); it++)
1127
+ {
1128
+ add_gas_phase(&it->second);
1129
+ }
1130
+ }
1131
+ /*
1132
+ * Add solid-solution pure phases
1133
+ */
1134
+ {
1135
+ std::map<int, cxxSSassemblage>::iterator it;
1136
+ for (it = Rxn_ss_assemblage_map.begin(); it != Rxn_ss_assemblage_map.end(); it++)
1137
+ {
1138
+ add_ss_assemblage(&(it->second));
1139
+ }
1140
+ }
1141
+ /*
1142
+ * Add elements in kinetic reactions
1143
+ */
1144
+ {
1145
+ std::map<int, cxxKinetics>::iterator it = Rxn_kinetics_map.begin();
1146
+ for ( ; it != Rxn_kinetics_map.end(); it++)
1147
+ {
1148
+ calc_dummy_kinetic_reaction_tally(&(it->second));
1149
+ add_kinetics(&(it->second));
1150
+ }
1151
+ }
1152
+ /*
1153
+ * reset pr.use
1154
+ */
1155
+ pr.use = save_print_use;
1156
+ return;
1157
+ }
1158
+ /* ---------------------------------------------------------------------- */
1159
+ int Phreeqc::
1160
+ calc_dummy_kinetic_reaction_tally(cxxKinetics *kinetics_ptr)
1161
+ /* ---------------------------------------------------------------------- */
1162
+ {
1163
+ /*
1164
+ * Go through kinetic components and add positive amount of each reactant
1165
+ */
1166
+ LDBLE coef;
1167
+ const char* cptr;
1168
+ class phase *phase_ptr;
1169
+ /*
1170
+ * Go through list and generate list of elements and
1171
+ * coefficient of elements in reaction
1172
+ */
1173
+ kinetics_ptr->Get_totals().clear();
1174
+ count_elts = 0;
1175
+ paren_count = 0;
1176
+ for (size_t i = 0; i < kinetics_ptr->Get_kinetics_comps().size(); i++)
1177
+ {
1178
+ cxxKineticsComp * kinetics_comp_ptr = &(kinetics_ptr->Get_kinetics_comps()[i]);
1179
+ coef = 1.0;
1180
+ /*
1181
+ * Reactant is a pure phase, copy formula into token
1182
+ */
1183
+ phase_ptr = NULL;
1184
+ if (kinetics_comp_ptr->Get_namecoef().size() == 1)
1185
+ {
1186
+ std::string name = kinetics_comp_ptr->Get_namecoef().begin()->first;
1187
+ int j;
1188
+ phase_ptr = phase_bsearch(name.c_str(), &j, FALSE);
1189
+ }
1190
+ if (phase_ptr != NULL)
1191
+ {
1192
+ add_elt_list(phase_ptr->next_elt, coef);
1193
+ }
1194
+ else
1195
+ {
1196
+ cxxNameDouble::iterator it = kinetics_comp_ptr->Get_namecoef().begin();
1197
+ for ( ; it != kinetics_comp_ptr->Get_namecoef().end(); it++)
1198
+ {
1199
+ cptr = it->first.c_str();
1200
+ get_elts_in_species(&cptr, coef);
1201
+ }
1202
+ }
1203
+ }
1204
+ kinetics_ptr->Set_totals(elt_list_NameDouble());
1205
+
1206
+ return (OK);
1207
+ }
1208
+ /* ---------------------------------------------------------------------- */
1209
+ int Phreeqc::
1210
+ extend_tally_table(void)
1211
+ /* ---------------------------------------------------------------------- */
1212
+ {
1213
+ int i, j;
1214
+ /*
1215
+ * adds another column to tally_table
1216
+ * increments number of columns
1217
+ */
1218
+ //tally_table = (class tally *) PHRQ_realloc((void *) tally_table,
1219
+ // (count_tally_table_columns + 1) * sizeof(class tally));
1220
+ //if (tally_table == NULL)
1221
+ // malloc_error();
1222
+ tally_table.resize(count_tally_table_columns + 1);
1223
+ for (i = 0; i < 3; i++)
1224
+ {
1225
+ tally_table[count_tally_table_columns].total[i] = (class tally_buffer *)
1226
+ PHRQ_malloc(count_tally_table_rows * sizeof(class tally_buffer));
1227
+ if (tally_table[count_tally_table_columns].total[i] == NULL)
1228
+ malloc_error();
1229
+ for (j = 0; j < count_tally_table_rows; j++)
1230
+ {
1231
+ tally_table[count_tally_table_columns].total[i][j].name =
1232
+ t_buffer[j].name;
1233
+ tally_table[count_tally_table_columns].total[i][j].master =
1234
+ t_buffer[j].master;
1235
+ }
1236
+ }
1237
+ tally_table[count_tally_table_columns].name = NULL;
1238
+ tally_table[count_tally_table_columns].type = UnKnown;
1239
+ tally_table[count_tally_table_columns].add_formula = NULL;
1240
+ tally_table[count_tally_table_columns].moles = 0.0;
1241
+ count_tally_table_columns++;
1242
+ return (OK);
1243
+ }
1244
+
1245
+ /* ---------------------------------------------------------------------- */
1246
+ int Phreeqc::
1247
+ set_reaction_moles(int n_user, LDBLE moles)
1248
+ /* ---------------------------------------------------------------------- */
1249
+ {
1250
+ cxxReaction *reaction_ptr = Utilities::Rxn_find(Rxn_reaction_map, n_user);
1251
+ if (reaction_ptr == NULL)
1252
+ return (ERROR);
1253
+ std::vector<LDBLE> v;
1254
+ v.push_back(moles);
1255
+ reaction_ptr->Set_steps(v);
1256
+ reaction_ptr->Set_countSteps(1);
1257
+ reaction_ptr->Set_equalIncrements(true);
1258
+ return (OK);
1259
+ }
1260
+
1261
+ /* ---------------------------------------------------------------------- */
1262
+ int Phreeqc::
1263
+ set_reaction_temperature(int n_user, LDBLE tc)
1264
+ /* ---------------------------------------------------------------------- */
1265
+ {
1266
+ cxxTemperature * temperature_ptr = Utilities::Rxn_find(Rxn_temperature_map, n_user);
1267
+ if (temperature_ptr == NULL)
1268
+ return (ERROR);
1269
+ temperature_ptr->Get_temps().clear();
1270
+ temperature_ptr->Get_temps().push_back(tc);
1271
+ temperature_ptr->Set_equalIncrements(false);
1272
+ return (OK);
1273
+ }
1274
+ /* ---------------------------------------------------------------------- */
1275
+ int Phreeqc::
1276
+ set_kinetics_time(int n_user, LDBLE step)
1277
+ /* ---------------------------------------------------------------------- */
1278
+ {
1279
+ cxxKinetics *kinetics_ptr = Utilities::Rxn_find(Rxn_kinetics_map, n_user);
1280
+
1281
+ if (kinetics_ptr == NULL)
1282
+ return (ERROR);
1283
+ kinetics_ptr->Get_steps().clear();
1284
+ kinetics_ptr->Get_steps().push_back(step);
1285
+ kinetics_ptr->Set_equalIncrements(false);
1286
+ return (OK);
1287
+ }
1288
+