pyEQL 1.4.0rc9__cp312-cp312-macosx_11_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (491) hide show
  1. pyEQL/__init__.py +50 -0
  2. pyEQL/_phreeqc.cpython-312-darwin.so +0 -0
  3. pyEQL/activity_correction.py +879 -0
  4. pyEQL/database/geothermal.dat +5693 -0
  5. pyEQL/database/llnl.dat +19305 -0
  6. pyEQL/database/phreeqc_license.txt +54 -0
  7. pyEQL/database/pyeql_db.json +35607 -0
  8. pyEQL/engines.py +1153 -0
  9. pyEQL/equilibrium.py +227 -0
  10. pyEQL/functions.py +281 -0
  11. pyEQL/phreeqc/__init__.py +5 -0
  12. pyEQL/phreeqc/bindings.cpp +84 -0
  13. pyEQL/phreeqc/core.py +239 -0
  14. pyEQL/phreeqc/database/Amm.dat +1968 -0
  15. pyEQL/phreeqc/database/CMakeLists.txt +32 -0
  16. pyEQL/phreeqc/database/ColdChem.dat +267 -0
  17. pyEQL/phreeqc/database/Concrete_PHR.dat +158 -0
  18. pyEQL/phreeqc/database/Concrete_PZ.dat +195 -0
  19. pyEQL/phreeqc/database/Kinec.v2.dat +12039 -0
  20. pyEQL/phreeqc/database/Kinec_v3.dat +12159 -0
  21. pyEQL/phreeqc/database/Makefile.am +28 -0
  22. pyEQL/phreeqc/database/Makefile.in +530 -0
  23. pyEQL/phreeqc/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
  24. pyEQL/phreeqc/database/Tipping_Hurley.dat +4137 -0
  25. pyEQL/phreeqc/database/__init__.py +0 -0
  26. pyEQL/phreeqc/database/core10.dat +6824 -0
  27. pyEQL/phreeqc/database/frezchem.dat +634 -0
  28. pyEQL/phreeqc/database/iso.dat +7235 -0
  29. pyEQL/phreeqc/database/llnl.dat +19310 -0
  30. pyEQL/phreeqc/database/minteq.dat +5654 -0
  31. pyEQL/phreeqc/database/minteq.v4.dat +13212 -0
  32. pyEQL/phreeqc/database/phreeqc.dat +1972 -0
  33. pyEQL/phreeqc/database/phreeqc_rates.dat +3158 -0
  34. pyEQL/phreeqc/database/pitzer.dat +1044 -0
  35. pyEQL/phreeqc/database/sit.dat +14348 -0
  36. pyEQL/phreeqc/database/wateq4f.dat +4036 -0
  37. pyEQL/phreeqc/ext/README.md +10 -0
  38. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/CMakeLists.txt +476 -0
  39. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/INSTALL +302 -0
  40. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/IPhreeqc.rc +61 -0
  41. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/IPhreeqcConfig.cmake.in +4 -0
  42. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/Makefile.am +8 -0
  43. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/Makefile.in +816 -0
  44. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/aclocal.m4 +1217 -0
  45. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/CTestScript.cmake +167 -0
  46. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/CSelectedOutput.cpp.o +0 -0
  47. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqc.cpp.o +0 -0
  48. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqcLib.cpp.o +0 -0
  49. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqc_interface_F.cpp.o +0 -0
  50. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/Var.c.o +0 -0
  51. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Dictionary.cpp.o +0 -0
  52. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ExchComp.cxx.o +0 -0
  53. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Exchange.cxx.o +0 -0
  54. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/GasComp.cxx.o +0 -0
  55. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/GasPhase.cxx.o +0 -0
  56. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ISolution.cxx.o +0 -0
  57. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ISolutionComp.cxx.o +0 -0
  58. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/KineticsComp.cxx.o +0 -0
  59. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/NameDouble.cxx.o +0 -0
  60. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/NumKeyword.cxx.o +0 -0
  61. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PBasic.cpp.o +0 -0
  62. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PHRQ_io_output.cpp.o +0 -0
  63. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PPassemblage.cxx.o +0 -0
  64. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PPassemblageComp.cxx.o +0 -0
  65. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Phreeqc.cpp.o +0 -0
  66. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PhreeqcKeywords/Keywords.cpp.o +0 -0
  67. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Pressure.cxx.o +0 -0
  68. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Reaction.cxx.o +0 -0
  69. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ReadClass.cxx.o +0 -0
  70. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SS.cxx.o +0 -0
  71. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SSassemblage.cxx.o +0 -0
  72. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SScomp.cxx.o +0 -0
  73. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SelectedOutput.cpp.o +0 -0
  74. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Serializer.cxx.o +0 -0
  75. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Solution.cxx.o +0 -0
  76. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SolutionIsotope.cxx.o +0 -0
  77. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/StorageBin.cxx.o +0 -0
  78. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/StorageBinList.cpp.o +0 -0
  79. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Surface.cxx.o +0 -0
  80. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SurfaceCharge.cxx.o +0 -0
  81. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SurfaceComp.cxx.o +0 -0
  82. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/System.cxx.o +0 -0
  83. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Temperature.cxx.o +0 -0
  84. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Use.cpp.o +0 -0
  85. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/UserPunch.cpp.o +0 -0
  86. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/advection.cpp.o +0 -0
  87. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/basicsubs.cpp.o +0 -0
  88. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cl1.cpp.o +0 -0
  89. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/PHRQ_base.cxx.o +0 -0
  90. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/PHRQ_io.cpp.o +0 -0
  91. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/Parser.cxx.o +0 -0
  92. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/Utils.cxx.o +0 -0
  93. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cvdense.cpp.o +0 -0
  94. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cvode.cpp.o +0 -0
  95. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cxxKinetics.cxx.o +0 -0
  96. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cxxMix.cxx.o +0 -0
  97. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/dense.cpp.o +0 -0
  98. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/dumper.cpp.o +0 -0
  99. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/gases.cpp.o +0 -0
  100. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/input.cpp.o +0 -0
  101. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/integrate.cpp.o +0 -0
  102. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/inverse.cpp.o +0 -0
  103. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/isotopes.cpp.o +0 -0
  104. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/kinetics.cpp.o +0 -0
  105. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/mainsubs.cpp.o +0 -0
  106. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/model.cpp.o +0 -0
  107. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/nvector.cpp.o +0 -0
  108. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/nvector_serial.cpp.o +0 -0
  109. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/parse.cpp.o +0 -0
  110. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/phqalloc.cpp.o +0 -0
  111. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/pitzer.cpp.o +0 -0
  112. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/pitzer_structures.cpp.o +0 -0
  113. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/prep.cpp.o +0 -0
  114. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/print.cpp.o +0 -0
  115. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/read.cpp.o +0 -0
  116. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/readtr.cpp.o +0 -0
  117. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/runner.cpp.o +0 -0
  118. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/sit.cpp.o +0 -0
  119. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/smalldense.cpp.o +0 -0
  120. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/spread.cpp.o +0 -0
  121. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/step.cpp.o +0 -0
  122. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/structures.cpp.o +0 -0
  123. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/sundialsmath.cpp.o +0 -0
  124. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/tally.cpp.o +0 -0
  125. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/tidy.cpp.o +0 -0
  126. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/transport.cpp.o +0 -0
  127. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/utilities.cpp.o +0 -0
  128. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CTestTestfile.cmake +6 -0
  129. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/DartConfiguration.tcl +109 -0
  130. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/cmake_install.cmake +45 -0
  131. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/libIPhreeqc.a +0 -0
  132. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ar-lib +270 -0
  133. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/compile +347 -0
  134. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.guess +1441 -0
  135. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.sub +1813 -0
  136. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/depcomp +791 -0
  137. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/install-sh +508 -0
  138. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ltmain.sh +11156 -0
  139. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/missing +215 -0
  140. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/test-driver +148 -0
  141. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure +23867 -0
  142. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure.ac +136 -0
  143. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Amm.dat +1968 -0
  144. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/CMakeLists.txt +32 -0
  145. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/ColdChem.dat +267 -0
  146. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PHR.dat +158 -0
  147. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PZ.dat +195 -0
  148. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec.v2.dat +12039 -0
  149. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec_v3.dat +12159 -0
  150. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.am +28 -0
  151. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.in +530 -0
  152. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
  153. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Tipping_Hurley.dat +4137 -0
  154. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/core10.dat +6824 -0
  155. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/frezchem.dat +634 -0
  156. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/iso.dat +7235 -0
  157. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/llnl.dat +19310 -0
  158. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.dat +5654 -0
  159. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.v4.dat +13212 -0
  160. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc.dat +1972 -0
  161. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc_rates.dat +3158 -0
  162. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/pitzer.dat +1044 -0
  163. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/sit.dat +14348 -0
  164. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/wateq4f.dat +4036 -0
  165. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/CMakeLists.txt +35 -0
  166. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/IPhreeqc.pdf +0 -0
  167. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.am +24 -0
  168. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.in +545 -0
  169. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/NOTICE +51 -0
  170. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_2_1999_manual.pdf +0 -0
  171. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_3_2013_manual.pdf +0 -0
  172. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/README +428 -0
  173. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/RELEASE +7294 -0
  174. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h.html +5096 -0
  175. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h_source.html +389 -0
  176. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp.html +83 -0
  177. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp_source.html +478 -0
  178. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h.html +318 -0
  179. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h_source.html +200 -0
  180. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bc_s.png +0 -0
  181. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bdwn.png +0 -0
  182. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.html +2274 -0
  183. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.png +0 -0
  184. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.html +69 -0
  185. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.png +0 -0
  186. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/closed.png +0 -0
  187. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +68 -0
  188. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.css +1440 -0
  189. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.png +0 -0
  190. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dynsections.js +97 -0
  191. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2blank.png +0 -0
  192. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2doc.png +0 -0
  193. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderclosed.png +0 -0
  194. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderopen.png +0 -0
  195. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2lastnode.png +0 -0
  196. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2link.png +0 -0
  197. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mlastnode.png +0 -0
  198. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mnode.png +0 -0
  199. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2node.png +0 -0
  200. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2plastnode.png +0 -0
  201. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2pnode.png +0 -0
  202. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2splitbar.png +0 -0
  203. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2vertline.png +0 -0
  204. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/index.html +58 -0
  205. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/jquery.js +31 -0
  206. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_f.png +0 -0
  207. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_g.png +0 -0
  208. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_h.png +0 -0
  209. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/open.png +0 -0
  210. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/structVAR.html +143 -0
  211. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_off.png +0 -0
  212. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_on.png +0 -0
  213. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_a.png +0 -0
  214. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_b.png +0 -0
  215. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_h.png +0 -0
  216. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_s.png +0 -0
  217. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tabs.css +60 -0
  218. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/phreeqc3.chm +0 -0
  219. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/CMakeLists.txt +11 -0
  220. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.am +88 -0
  221. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.in +696 -0
  222. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/CMakeLists.txt +1 -0
  223. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt +35 -0
  224. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt.in +21 -0
  225. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/README.txt +44 -0
  226. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/advect.c +101 -0
  227. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/ic +17 -0
  228. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/phreeqc.dat +1579 -0
  229. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/CMakeLists.txt +10 -0
  230. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/README.txt +3 -0
  231. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/CMakeLists.txt +9 -0
  232. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/phreeqc.dat +1582 -0
  233. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/runphreeqc.xls +0 -0
  234. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/withcallback.xls +0 -0
  235. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/CMakeLists.txt +11 -0
  236. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/Gypsum.py +52 -0
  237. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/parallel_advect.py +465 -0
  238. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/phreeqc.dat +1582 -0
  239. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/pitzer.dat +790 -0
  240. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/wateq4f.dat +3846 -0
  241. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/CMakeLists.txt +1 -0
  242. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt +35 -0
  243. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt.in +20 -0
  244. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/README.txt +45 -0
  245. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/advect.cpp +110 -0
  246. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/ic +17 -0
  247. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/phreeqc.dat +1579 -0
  248. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/CMakeLists.txt +1 -0
  249. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt +44 -0
  250. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt.in +24 -0
  251. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/README.txt +45 -0
  252. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/advect.F90 +102 -0
  253. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/ic +17 -0
  254. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/phreeqc.dat +1579 -0
  255. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt +26 -0
  256. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt.in +20 -0
  257. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/README.txt +37 -0
  258. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/ex2 +26 -0
  259. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/main.cpp +20 -0
  260. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/phreeqc.dat +1837 -0
  261. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/post-install.cmake.in +7 -0
  262. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/CMakeLists.txt +185 -0
  263. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.cpp +171 -0
  264. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.h +34 -0
  265. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.am +18 -0
  266. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.in +466 -0
  267. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestCVar.cpp +9 -0
  268. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqc.cpp +4901 -0
  269. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqcLib.cpp +4644 -0
  270. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestSelectedOutput.cpp +669 -0
  271. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestVar.cpp +10 -0
  272. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/conv_fail.in +11 -0
  273. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/dump +42 -0
  274. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/iso.dat +7231 -0
  275. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/kinn20140218 +349 -0
  276. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/missing_e.dat +1556 -0
  277. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch +105 -0
  278. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch_no_set +102 -0
  279. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.90a6449 +1935 -0
  280. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.old +1556 -0
  281. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/libtool.m4 +8388 -0
  282. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltoptions.m4 +437 -0
  283. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltsugar.m4 +124 -0
  284. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltversion.m4 +23 -0
  285. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/lt~obsolete.m4 +99 -0
  286. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/resource.h +14 -0
  287. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.cpp +401 -0
  288. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.hxx +77 -0
  289. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CVar.hxx +162 -0
  290. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Debug.h +12 -0
  291. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/ErrorReporter.hxx +70 -0
  292. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.cpp +1889 -0
  293. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f.inc +91 -0
  294. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f90.inc +603 -0
  295. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.h +2182 -0
  296. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.hpp +1027 -0
  297. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcCallbacks.h +19 -0
  298. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcF.f +653 -0
  299. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcLib.cpp +1098 -0
  300. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface.F90 +1283 -0
  301. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.cpp +535 -0
  302. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.h +162 -0
  303. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.am +210 -0
  304. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.in +1294 -0
  305. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/README.Fortran +17 -0
  306. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.c +84 -0
  307. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.h +152 -0
  308. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Version.h +36 -0
  309. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fimpl.h +282 -0
  310. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.cpp +646 -0
  311. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.h +163 -0
  312. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap1.cpp +24 -0
  313. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap2.cpp +24 -0
  314. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap3.cpp +24 -0
  315. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap4.cpp +24 -0
  316. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap5.cpp +24 -0
  317. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap6.cpp +25 -0
  318. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap7.cpp +25 -0
  319. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap8.cpp +24 -0
  320. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.cpp +225 -0
  321. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.h +59 -0
  322. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.cpp +1382 -0
  323. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.h +444 -0
  324. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.cpp +42 -0
  325. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.h +79 -0
  326. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.cpp +41 -0
  327. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.h +28 -0
  328. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.cxx +398 -0
  329. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.h +117 -0
  330. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.cxx +466 -0
  331. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.h +74 -0
  332. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.h +1184 -0
  333. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.resX +36 -0
  334. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.cxx +265 -0
  335. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.h +59 -0
  336. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.cxx +659 -0
  337. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.h +103 -0
  338. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.cxx +40 -0
  339. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.h +53 -0
  340. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.cxx +202 -0
  341. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.h +138 -0
  342. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.cxx +318 -0
  343. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.h +81 -0
  344. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NA.h +1 -0
  345. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.cxx +537 -0
  346. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.h +66 -0
  347. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.cxx +190 -0
  348. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.h +67 -0
  349. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.cpp +8350 -0
  350. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.h +572 -0
  351. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PHRQ_io_output.cpp +411 -0
  352. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.cxx +375 -0
  353. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.h +70 -0
  354. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.cxx +441 -0
  355. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.h +83 -0
  356. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.cpp +2087 -0
  357. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.h +2164 -0
  358. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.cpp +242 -0
  359. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.h +104 -0
  360. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.cxx +417 -0
  361. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.h +43 -0
  362. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.cxx +284 -0
  363. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.h +57 -0
  364. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ReadClass.cxx +1150 -0
  365. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.cxx +609 -0
  366. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.h +128 -0
  367. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.cxx +317 -0
  368. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.h +59 -0
  369. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.cxx +297 -0
  370. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.h +66 -0
  371. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.cpp +115 -0
  372. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.h +209 -0
  373. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.cxx +213 -0
  374. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.h +42 -0
  375. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.cxx +1795 -0
  376. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.h +154 -0
  377. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.cxx +333 -0
  378. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.h +85 -0
  379. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.cxx +1507 -0
  380. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.h +141 -0
  381. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.cpp +358 -0
  382. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.h +81 -0
  383. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.cxx +837 -0
  384. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.h +108 -0
  385. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.cxx +617 -0
  386. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.h +137 -0
  387. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.cxx +509 -0
  388. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.h +70 -0
  389. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.cxx +103 -0
  390. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.h +89 -0
  391. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.cxx +423 -0
  392. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.h +42 -0
  393. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.cpp +78 -0
  394. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.h +159 -0
  395. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.cpp +32 -0
  396. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.h +39 -0
  397. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ZedGraph.dll +0 -0
  398. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/advection.cpp +140 -0
  399. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/basicsubs.cpp +4333 -0
  400. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cl1.cpp +881 -0
  401. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.cxx +117 -0
  402. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.h +48 -0
  403. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_exports.h +20 -0
  404. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.cpp +914 -0
  405. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.h +207 -0
  406. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.cxx +1331 -0
  407. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.h +310 -0
  408. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.cxx +263 -0
  409. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.h +29 -0
  410. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/phrqtype.h +18 -0
  411. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.cpp +566 -0
  412. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.h +267 -0
  413. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.cpp +3939 -0
  414. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.h +940 -0
  415. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.cxx +617 -0
  416. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.h +78 -0
  417. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.cxx +154 -0
  418. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.h +58 -0
  419. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.cpp +175 -0
  420. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.h +341 -0
  421. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.cpp +277 -0
  422. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.h +60 -0
  423. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/gases.cpp +748 -0
  424. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/global_structures.h +1672 -0
  425. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/input.cpp +133 -0
  426. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/integrate.cpp +1219 -0
  427. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/inverse.cpp +5135 -0
  428. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/isotopes.cpp +1813 -0
  429. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/kinetics.cpp +3180 -0
  430. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/mainsubs.cpp +2320 -0
  431. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/model.cpp +5843 -0
  432. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.cpp +272 -0
  433. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.h +485 -0
  434. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.cpp +1032 -0
  435. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.h +369 -0
  436. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/parse.cpp +1044 -0
  437. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.cpp +316 -0
  438. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.h +47 -0
  439. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer.cpp +2709 -0
  440. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer_structures.cpp +225 -0
  441. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/prep.cpp +6267 -0
  442. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/print.cpp +3673 -0
  443. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/read.cpp +10245 -0
  444. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/readtr.cpp +1495 -0
  445. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.cpp +158 -0
  446. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.h +33 -0
  447. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sit.cpp +1684 -0
  448. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.cpp +324 -0
  449. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.h +261 -0
  450. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/spread.cpp +1309 -0
  451. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/step.cpp +1566 -0
  452. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/structures.cpp +3381 -0
  453. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.cpp +133 -0
  454. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.h +162 -0
  455. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialstypes.h +183 -0
  456. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tally.cpp +1288 -0
  457. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tidy.cpp +5600 -0
  458. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/transport.cpp +6403 -0
  459. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/utilities.cpp +1339 -0
  460. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/thread.h +64 -0
  461. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/CMakeLists.txt +133 -0
  462. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.am +45 -0
  463. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.in +1128 -0
  464. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/ex2.in +26 -0
  465. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main.f90 +31 -0
  466. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main77.f +6 -0
  467. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main_fortran.cxx +8 -0
  468. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/phreeqc.dat.in +1556 -0
  469. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_c.c +148 -0
  470. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_cxx.cxx +152 -0
  471. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_f90.F90 +328 -0
  472. pyEQL/phreeqc/iphreeqc_wrapper.cpp +75 -0
  473. pyEQL/phreeqc/solution.py +74 -0
  474. pyEQL/phreeqc/var.py +50 -0
  475. pyEQL/presets/Ringers lactate.yaml +20 -0
  476. pyEQL/presets/__init__.py +17 -0
  477. pyEQL/presets/normal saline.yaml +17 -0
  478. pyEQL/presets/rainwater.yaml +17 -0
  479. pyEQL/presets/seawater.yaml +29 -0
  480. pyEQL/presets/urine.yaml +26 -0
  481. pyEQL/presets/wastewater.yaml +21 -0
  482. pyEQL/py.typed +0 -0
  483. pyEQL/salt_ion_match.py +112 -0
  484. pyEQL/solute.py +163 -0
  485. pyEQL/solution.py +2714 -0
  486. pyEQL/utils.py +237 -0
  487. pyeql-1.4.0rc9.dist-info/METADATA +130 -0
  488. pyeql-1.4.0rc9.dist-info/RECORD +491 -0
  489. pyeql-1.4.0rc9.dist-info/WHEEL +6 -0
  490. pyeql-1.4.0rc9.dist-info/licenses/AUTHORS.md +21 -0
  491. pyeql-1.4.0rc9.dist-info/licenses/LICENSE.txt +20 -0
@@ -0,0 +1,1309 @@
1
+ #ifndef boolean
2
+ typedef unsigned char boolean;
3
+ #endif
4
+ #include "Phreeqc.h"
5
+ #include "phqalloc.h"
6
+ #include "Solution.h"
7
+ #include "Utils.h"
8
+
9
+ #define STRING 11
10
+ #define NUMBER 12
11
+ #define MIXED 13
12
+ #define EOL 14
13
+
14
+ #define OPTION_EOF -1
15
+ #define OPTION_KEYWORD -2
16
+ #define OPTION_ERROR -3
17
+ #define OPTION_DEFAULT -4
18
+ #define OPT_1 -5
19
+
20
+ #if defined(PHREEQCI_GUI)
21
+ #ifdef _DEBUG
22
+ #define new DEBUG_NEW
23
+ #undef THIS_FILE
24
+ static char THIS_FILE[] = __FILE__;
25
+ #endif
26
+ #endif
27
+
28
+ /* ---------------------------------------------------------------------- */
29
+ int Phreeqc::
30
+ read_solution_spread(void)
31
+ /* ---------------------------------------------------------------------- */
32
+ {
33
+ /*
34
+ * Reads solution data
35
+ *
36
+ * Arguments:
37
+ * none
38
+ *
39
+ * Returns:
40
+ * KEYWORD if keyword encountered, input_error may be incremented if
41
+ * a keyword is encountered in an unexpected position
42
+ * EOF if eof encountered while reading mass balance concentrations
43
+ * ERROR if error occurred reading data
44
+ *
45
+ */
46
+ class spread_row *heading, *row_ptr, *units;
47
+ int count, strings, numbers;
48
+ int spread_lines;
49
+ const char* cptr;
50
+ class defaults soln_defaults;
51
+ int return_value, opt;
52
+ const char* next_char;
53
+ const char *opt_list[] = {
54
+ "temp", /* 0 */
55
+ "temperature", /* 1 */
56
+ "dens", /* 2 */
57
+ "density", /* 3 */
58
+ "units", /* 4 */
59
+ "redox", /* 5 */
60
+ "ph", /* 6 */
61
+ "pe", /* 7 */
62
+ "unit", /* 8 */
63
+ "isotope", /* 9 */
64
+ "water", /* 10 */
65
+ "isotope_uncertainty", /* 11 */
66
+ "uncertainty", /* 12 */
67
+ "uncertainties", /* 13 */
68
+ "pressure", /* 14 */
69
+ "press" /* 15 */
70
+ };
71
+ int count_opt_list = 16;
72
+ /*
73
+ * Initialize defaults
74
+ */
75
+ soln_defaults.temp = 25;
76
+ soln_defaults.density = 1.0;
77
+ soln_defaults.calc_density = false;
78
+ soln_defaults.units = string_hsave("mmol/kgw");
79
+ soln_defaults.redox = string_hsave("pe");
80
+ soln_defaults.ph = 7.0;
81
+ soln_defaults.pe = 4.0;
82
+ soln_defaults.water = 1.0;
83
+ soln_defaults.pressure = 1.0;
84
+
85
+ #ifdef PHREEQCI_GUI
86
+ free_spread();
87
+ #endif
88
+
89
+
90
+ /* fill in soln_defaults.iso */
91
+ soln_defaults.iso.resize(count_iso_defaults);
92
+
93
+ /* all iso[i].name is hsave'd, so no conflicts */
94
+ // memcpy(&soln_defaults.iso[0], iso_defaults,
95
+ // soln_defaults.iso.size() * sizeof(class iso));
96
+ for (size_t i = 0; i < count_iso_defaults; ++i) {
97
+ soln_defaults.iso[i].name = iso_defaults[i].name;
98
+ soln_defaults.iso[i].value = iso_defaults[i].value;
99
+ soln_defaults.iso[i].uncertainty = iso_defaults[i].uncertainty;
100
+ }
101
+
102
+ heading = NULL;
103
+ units = NULL;
104
+ return_value = UNKNOWN;
105
+ spread_lines = 0;
106
+ CParser parser(this->phrq_io);
107
+ /*
108
+ * Loop on solutions
109
+ */
110
+ for (;;)
111
+ {
112
+ std::string token, token1;
113
+ opt = get_option(opt_list, count_opt_list, &next_char);
114
+ if (spread_lines == 0 && opt != OPTION_DEFAULT)
115
+ {
116
+ row_ptr = string_to_spread_row(line);
117
+ cptr = line;
118
+ count = numbers = strings = 0;
119
+ int j;
120
+ while (((j = copy_token(token, &cptr)) != EMPTY))
121
+ {
122
+ count++;
123
+ if (j == UPPER || j == LOWER)
124
+ strings++;
125
+ if (j == DIGIT)
126
+ numbers++;
127
+ }
128
+ /*
129
+ * Is 2nd token all number
130
+ */
131
+ cptr = line;
132
+ copy_token(token, &cptr);
133
+ j = copy_token(token, &cptr);
134
+ bool num = false;
135
+ if (j == DIGIT)
136
+ {
137
+ char* ptr;
138
+ (void)strtod(token.c_str(), &ptr);
139
+ cptr = ptr;
140
+ int j1 = copy_token(token1, &cptr);
141
+ if (j1 != EMPTY)
142
+ {
143
+ num = FALSE;
144
+ }
145
+ else
146
+ {
147
+ num = TRUE;
148
+ }
149
+ }
150
+ /*
151
+ * Starts with hyphen
152
+ */
153
+ cptr = line;
154
+ copy_token(token, &cptr);
155
+ if (token[0] == '-')
156
+ {
157
+ /* opt = opt; */
158
+ }
159
+ else
160
+ {
161
+ switch (opt)
162
+ {
163
+ case 0: /* temp */
164
+ case 1: /* temperature */
165
+ case 10: /* water */
166
+ if ((count == 2 || count == 3) && num == TRUE)
167
+ {
168
+ /* opt = opt; */
169
+ }
170
+ else
171
+ {
172
+ opt = OPTION_DEFAULT;
173
+ }
174
+ break;
175
+ case 2: /* dens */
176
+ case 3: /* density */
177
+ copy_token(token, &cptr);
178
+ if (count == 2 || count == 3 && (num == TRUE || token[0] == 'c' || token[0] == 'C'))
179
+ {
180
+ /* opt = opt; */
181
+ }
182
+ else
183
+ {
184
+ opt = OPTION_DEFAULT;
185
+ }
186
+ break;
187
+ case 6: /* ph */
188
+ case 7: /* pe */
189
+ if ((count == 2 || count == 3 || count == 4)
190
+ && num == TRUE)
191
+ {
192
+ /* opt = opt; */
193
+ }
194
+ else
195
+ {
196
+ opt = OPTION_DEFAULT;
197
+ }
198
+ break;
199
+ case 5: /* redox */
200
+ case 4: /* units */
201
+ case 8: /* unit */
202
+ if (count == 2)
203
+ {
204
+ /* opt = opt; */
205
+ }
206
+ else
207
+ {
208
+ opt = OPTION_DEFAULT;
209
+ }
210
+ break;
211
+ case 9: /* isotope */
212
+ if (row_ptr->count > 4)
213
+ {
214
+ opt = OPTION_DEFAULT;
215
+ }
216
+ else
217
+ {
218
+ /* opt = opt; */
219
+ }
220
+ break;
221
+ case 11: /* isotope_uncertainty */
222
+ case 12: /* uncertainty */
223
+ case 13: /* uncertainties */
224
+ if (row_ptr->count > 3)
225
+ {
226
+ opt = OPTION_DEFAULT;
227
+ }
228
+ else
229
+ {
230
+ /* opt = opt; */
231
+ }
232
+ break;
233
+ case 14: /* pressure */
234
+ case 15: /* press */
235
+ (void)sscanf(next_char, SCANFORMAT, &(soln_defaults.pressure));
236
+ break;
237
+ }
238
+ }
239
+ spread_row_free(row_ptr);
240
+ }
241
+ if (opt == OPTION_DEFAULT)
242
+ {
243
+ if (spread_lines == 0)
244
+ {
245
+ opt = 100;
246
+ }
247
+ spread_lines++;
248
+ }
249
+ switch (opt)
250
+ {
251
+ case OPTION_EOF: /* end of file */
252
+ return_value = EOF;
253
+ break;
254
+ case OPTION_KEYWORD: /* keyword */
255
+ return_value = KEYWORD;
256
+ break;
257
+ case OPTION_ERROR:
258
+ input_error++;
259
+ error_msg("Unknown input in SOLUTION keyword.", CONTINUE);
260
+ error_msg(line_save, CONTINUE);
261
+ break;
262
+ case OPTION_DEFAULT: /* solution definition */
263
+ row_ptr = string_to_spread_row(line);
264
+ if (spread_lines == 2)
265
+ {
266
+ numbers = 0;
267
+ strings = 0;
268
+ //for (int i = 0; i < heading->count; i++)
269
+ for (int i = 0; i < row_ptr->count; i++)
270
+ {
271
+ if (row_ptr->type_vector[i] == STRING)
272
+ {
273
+ strings++;
274
+ }
275
+ else if (row_ptr->type_vector[i] == NUMBER)
276
+ {
277
+ numbers++;
278
+ }
279
+ }
280
+ if (numbers == 0)
281
+ {
282
+ units = row_ptr;
283
+ break;
284
+ }
285
+ }
286
+ spread_row_to_solution(heading, units, row_ptr, soln_defaults);
287
+ #ifdef PHREEQCI_GUI
288
+ add_row(row_ptr);
289
+ #endif
290
+ spread_row_free(row_ptr);
291
+ break;
292
+ case 0: /* temperature */
293
+ case 1:
294
+ (void)sscanf(next_char, SCANFORMAT, &(soln_defaults.temp));
295
+ break;
296
+ case 2: /* density */
297
+ case 3:
298
+ {
299
+ int j = copy_token(token, &next_char);
300
+ if (j == DIGIT)
301
+ {
302
+ if (sscanf(token.c_str(), SCANFORMAT, &dummy) != 1)
303
+ {
304
+ error_msg("Expecting numeric value for density.", PHRQ_io::OT_CONTINUE);
305
+ error_msg(line_save, PHRQ_io::OT_CONTINUE);
306
+ input_error++;
307
+ }
308
+ else
309
+ {
310
+ soln_defaults.density = dummy;
311
+ copy_token(token, &next_char);
312
+ if (token[0] == 'c' || token[0] == 'C')
313
+ soln_defaults.calc_density = true;
314
+ }
315
+ }
316
+ else if (j != EMPTY)
317
+ {
318
+ if (token[0] != 'c' && token[0] != 'C')
319
+ {
320
+ error_msg("Options following density are numeric value or c[alculate].", PHRQ_io::OT_CONTINUE);
321
+ error_msg(line_save, PHRQ_io::OT_CONTINUE);
322
+ input_error++;
323
+ }
324
+ else
325
+ soln_defaults.calc_density = true;
326
+ }
327
+ }
328
+ break;
329
+ case 4: /* units */
330
+ case 8: /* unit */
331
+ if (copy_token(token, &next_char) == EMPTY)
332
+ break;
333
+ {
334
+ if (check_units(token, FALSE, FALSE, NULL, TRUE) == OK)
335
+ {
336
+ soln_defaults.units = string_hsave(token.c_str());
337
+ }
338
+ else
339
+ {
340
+ input_error++;
341
+ }
342
+ }
343
+ break;
344
+ case 5: /* redox */
345
+ if (copy_token(token, &next_char) == EMPTY)
346
+ break;
347
+ if (parser.parse_couple(token) == OK)
348
+ {
349
+ soln_defaults.redox = string_hsave(token.c_str());
350
+ }
351
+ else
352
+ {
353
+ input_error++;
354
+ }
355
+ break;
356
+ case 6: /* ph */
357
+ copy_token(token, &next_char);
358
+ (void)sscanf(token.c_str(), SCANFORMAT, &(soln_defaults.ph));
359
+ if (copy_token(token, &next_char) != EMPTY)
360
+ {
361
+ warning_msg
362
+ ("Not possible to use phase name or saturation index in definition of default pH in SOLUTION_SPREAD.");
363
+ }
364
+ break;
365
+ case 7: /* pe */
366
+ copy_token(token, &next_char);
367
+ (void)sscanf(token.c_str(), SCANFORMAT, &(soln_defaults.pe));
368
+ if (copy_token(token, &next_char) != EMPTY)
369
+ {
370
+ warning_msg
371
+ ("Not possible to use phase name or saturation index in definition of default pe in SOLUTION_SPREAD.");
372
+ }
373
+ break;
374
+ case 11: /* isotope_uncertainty */
375
+ case 12: /* uncertainty */
376
+ case 13: /* uncertainties */
377
+ {
378
+ if (copy_token(token, &next_char) != DIGIT)
379
+ {
380
+ input_error++;
381
+ error_string = sformatf( "Expected isotope name to"
382
+ " begin with an isotopic number.");
383
+ error_msg(error_string, CONTINUE);
384
+ error_string = sformatf( "In read_solution_spread isotope_uncertainty\n");
385
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
386
+ error_string = sformatf( "\t%s\t%s\n", "token: ", token.c_str());
387
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
388
+ error_string = sformatf( "\t%s\t%s\n", "next_char: ", next_char);
389
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
390
+ error_string = sformatf( "\t%s\t%s\n", "line_save: ", line_save);
391
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
392
+ continue;
393
+ }
394
+ size_t i;
395
+ for (i = 0; i < soln_defaults.iso.size(); i++)
396
+ {
397
+ if (strcmp(token.c_str(), soln_defaults.iso[i].name) == 0)
398
+ {
399
+ break;
400
+ }
401
+ }
402
+ if (i == soln_defaults.iso.size())
403
+ {
404
+ soln_defaults.iso.resize((size_t)i + 1);
405
+ soln_defaults.iso[i].name = string_hsave(token.c_str());
406
+ soln_defaults.iso[i].value = NAN;
407
+ soln_defaults.iso[i].uncertainty = NAN;
408
+ }
409
+
410
+ /* read and store isotope ratio uncertainty */
411
+ int j;
412
+ if ((j = copy_token(token, &next_char)) != EMPTY)
413
+ {
414
+ if (j != DIGIT)
415
+ {
416
+ input_error++;
417
+ error_string = sformatf(
418
+ "Expected numeric value for uncertainty in isotope ratio.");
419
+ error_msg(error_string, CONTINUE);
420
+ continue;
421
+ }
422
+ else
423
+ {
424
+ (void)sscanf(token.c_str(), SCANFORMAT,
425
+ &(soln_defaults.iso[i].uncertainty));
426
+ }
427
+ }
428
+ else
429
+ {
430
+ soln_defaults.iso[i].uncertainty = NAN;
431
+ }
432
+ }
433
+ break;
434
+ case 10: /* water */
435
+ {
436
+ int j = copy_token(token, &next_char);
437
+ if (j != DIGIT)
438
+ {
439
+ input_error++;
440
+ error_string = sformatf(
441
+ "Expected numeric value for mass of water in solution.");
442
+ error_msg(error_string, CONTINUE);
443
+ }
444
+ else
445
+ {
446
+ (void)sscanf(token.c_str(), SCANFORMAT, &(soln_defaults.water));
447
+ }
448
+ }
449
+ break;
450
+ case 9: /* isotope */
451
+ {
452
+ if (copy_token(token, &next_char) != DIGIT)
453
+ {
454
+ input_error++;
455
+ error_string = sformatf( "Expected isotope name to"
456
+ " begin with an isotopic number.");
457
+ error_msg(error_string, CONTINUE);
458
+ error_string = sformatf( "In read_solution_spread isotope\n");
459
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
460
+ error_string = sformatf( "\t%s\t%s\n", "token: ", token.c_str());
461
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
462
+ error_string = sformatf( "\t%s\t%s\n", "next_char: ", next_char);
463
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
464
+ error_string = sformatf( "\t%s\t%s\n", "line_save: ", line_save);
465
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
466
+ continue;
467
+ }
468
+ size_t i;
469
+ for (i = 0; i < soln_defaults.iso.size(); i++)
470
+ {
471
+ if (strcmp(token.c_str(), soln_defaults.iso[i].name) == 0)
472
+ {
473
+ break;
474
+ }
475
+ }
476
+ if (i == soln_defaults.iso.size())
477
+ {
478
+ soln_defaults.iso.resize(i + 1);
479
+ soln_defaults.iso[i].name = string_hsave(token.c_str());
480
+ soln_defaults.iso[i].value = NAN;
481
+ soln_defaults.iso[i].uncertainty = NAN;
482
+ }
483
+ /* read and store isotope ratio */
484
+ if (copy_token(token, &next_char) != DIGIT)
485
+ {
486
+ input_error++;
487
+ error_string = sformatf(
488
+ "Expected numeric value for default isotope ratio.");
489
+ error_msg(error_string, CONTINUE);
490
+ break;
491
+ }
492
+ (void)sscanf(token.c_str(), SCANFORMAT, &(soln_defaults.iso[i].value));
493
+ /* read and store isotope ratio uncertainty */
494
+ int j;
495
+ if ((j = copy_token(token, &next_char)) != EMPTY)
496
+ {
497
+ if (j != DIGIT)
498
+ {
499
+ input_error++;
500
+ error_string = sformatf(
501
+ "Expected numeric value for uncertainty in isotope ratio.");
502
+ error_msg(error_string, CONTINUE);
503
+ continue;
504
+ }
505
+ else
506
+ {
507
+ (void)sscanf(token.c_str(), SCANFORMAT,
508
+ &(soln_defaults.iso[i].uncertainty));
509
+ }
510
+ }
511
+ }
512
+ break;
513
+ case 14: /* pressure */
514
+ (void)sscanf(next_char, SCANFORMAT, &(soln_defaults.pressure));
515
+ break;
516
+ case 100: /* read headings */
517
+ heading = string_to_spread_row(line);
518
+ {
519
+ int i;
520
+ for (i = 0; i < heading->count; i++)
521
+ {
522
+ while (replace(" ", "", heading->str_vector[i]) == TRUE);
523
+ while (replace(",", "_", heading->str_vector[i]) == TRUE);
524
+ }
525
+ }
526
+ break;
527
+ }
528
+ if (return_value == EOF || return_value == KEYWORD)
529
+ break;
530
+ }
531
+ #ifdef PHREEQCI_GUI
532
+ if (heading)
533
+ {
534
+ assert(g_spread_sheet.heading == NULL);
535
+ g_spread_sheet.heading = copy_row(heading);
536
+ }
537
+ if (units)
538
+ {
539
+ assert(g_spread_sheet.units == NULL);
540
+ g_spread_sheet.units = copy_row(units);
541
+ }
542
+ g_spread_sheet.defaults = soln_defaults;
543
+ #endif
544
+ spread_row_free(heading);
545
+ spread_row_free(units);
546
+
547
+ soln_defaults.iso.clear();
548
+ return (return_value);
549
+ }
550
+ /* ---------------------------------------------------------------------- */
551
+ int Phreeqc::
552
+ spread_row_to_solution(class spread_row *heading, class spread_row *units,
553
+ class spread_row *data, class defaults defaults)
554
+ /* ---------------------------------------------------------------------- */
555
+ {
556
+ Keywords::KEYWORDS next_keyword_save;
557
+ int n_user, n_user_end;
558
+ std::string description;
559
+ std::string token, token1, string;
560
+ CParser parser(this->phrq_io);
561
+
562
+ int return_value, opt;
563
+ const char* next_char;
564
+ const char *opt_list[] = {
565
+ "temp", /* 0 */
566
+ "temperature", /* 1 */
567
+ "dens", /* 2 */
568
+ "density", /* 3 */
569
+ "units", /* 4 */
570
+ "redox", /* 5 */
571
+ "ph", /* 6 */
572
+ "pe", /* 7 */
573
+ "unit", /* 8 */
574
+ "isotope", /* 9 */
575
+ "water", /* 10 */
576
+ "description", /* 11 */
577
+ "desc", /* 12 */
578
+ "descriptor", /* 13 */
579
+ "pressure", /* 14 */
580
+ "press", /* 15 */
581
+ "potential" /* 16 */
582
+ };
583
+ int count_opt_list = 17;
584
+
585
+ /*
586
+ * look for solution number
587
+ */
588
+ n_user = n_user_end = -1;
589
+ {
590
+ int i;
591
+ for (i = 0; i < heading->count; i++)
592
+ {
593
+ if (strcmp_nocase(heading->str_vector[i].c_str(), "number") == 0)
594
+ {
595
+ break;
596
+ }
597
+ }
598
+ if (i == heading->count || data->type_vector[i] == EMPTY
599
+ || data->count <= i)
600
+ {
601
+ n_user = -1;
602
+ }
603
+ else if (data->type_vector[i] == STRING)
604
+ {
605
+ input_error++;
606
+ error_string = sformatf(
607
+ "Expected solution number or number range in 'number' column, found: %s.",
608
+ data->str_vector[i].c_str());
609
+ error_msg(error_string, CONTINUE);
610
+ }
611
+ else
612
+ {
613
+ string = "solution_s ";
614
+ string.append(data->str_vector[i]);
615
+ next_keyword_save = next_keyword;
616
+ next_keyword = Keywords::KEY_SOLUTION_SPREAD;
617
+ cxxNumKeyword nk;
618
+ nk.read_number_description(string);
619
+ n_user = nk.Get_n_user();
620
+ n_user_end = nk.Get_n_user_end();
621
+ description = nk.Get_description();
622
+ next_keyword = next_keyword_save;
623
+ Rxn_new_solution.insert(n_user);
624
+ }
625
+ }
626
+ /*
627
+ * set up solution
628
+ */
629
+
630
+ cxxSolution temp_solution;
631
+ temp_solution.Set_n_user(n_user);
632
+ temp_solution.Set_n_user_end(n_user_end);
633
+ temp_solution.Set_new_def(true);
634
+ temp_solution.Create_initial_data();
635
+ cxxISolution * initial_data_ptr = temp_solution.Get_initial_data();
636
+ if (use.Get_solution_in() == FALSE)
637
+ {
638
+ use.Set_solution_in(true);
639
+ use.Set_n_solution_user(n_user);
640
+ }
641
+ /*
642
+ * Set default ph, temp, density, pe, units
643
+ */
644
+ temp_solution.Set_description(description);
645
+ temp_solution.Set_tc(defaults.temp);
646
+ temp_solution.Set_patm(defaults.pressure);
647
+ temp_solution.Set_potV(0);
648
+ temp_solution.Set_ph(defaults.ph);
649
+ temp_solution.Set_density(defaults.density);
650
+ initial_data_ptr->Set_calc_density(defaults.calc_density);
651
+ temp_solution.Set_pe(defaults.pe);
652
+ temp_solution.Set_mass_water(defaults.water);
653
+ temp_solution.Set_ah2o(1.0);
654
+ temp_solution.Set_mu(1e-7);
655
+ initial_data_ptr->Set_units(defaults.units);
656
+ initial_data_ptr->Set_default_pe(defaults.redox);
657
+ {
658
+ CReaction temp_chem_reaction;
659
+ initial_data_ptr->Get_pe_reactions()[defaults.redox] = temp_chem_reaction;
660
+ }
661
+ /*
662
+ * Read concentration data
663
+ */
664
+ return_value = UNKNOWN;
665
+ for (int i = 0; i < heading->count; i++)
666
+ {
667
+ if (strcmp_nocase(heading->str_vector[i].c_str(), "number") == 0)
668
+ continue;
669
+ if (strcmp_nocase(heading->str_vector[i].c_str(), "uncertainty") == 0)
670
+ continue;
671
+ if (strcmp_nocase(heading->str_vector[i].c_str(), "uncertainties") == 0)
672
+ continue;
673
+ if (strcmp_nocase(heading->str_vector[i].c_str(), "isotope_uncertainty") ==
674
+ 0)
675
+ continue;
676
+ /*
677
+ * Copy in element name
678
+ */
679
+ if (heading->type_vector[i] == EMPTY)
680
+ continue;
681
+ string = heading->str_vector[i];
682
+ string.append(" ");
683
+ /*
684
+ * Copy in concentration data
685
+ */
686
+ if (i >= data->count || data->type_vector[i] == EMPTY)
687
+ continue;
688
+ string.append(data->str_vector[i]);
689
+ string.append(" ");
690
+ /*
691
+ * Copy in concentration data
692
+ */
693
+ if (units != NULL && i < units->count
694
+ && units->type_vector[i] != EMPTY)
695
+ {
696
+ string.append(units->str_vector[i]);
697
+ }
698
+ /*
699
+ * Parse string just like read_solution input
700
+ */
701
+ char * char_string = string_duplicate(string.c_str());
702
+ next_char = char_string;
703
+ opt = get_option_string(opt_list, count_opt_list, &next_char);
704
+ if (opt == OPTION_DEFAULT && heading->type_vector[i] == NUMBER)
705
+ {
706
+ opt = 9;
707
+ }
708
+ switch (opt)
709
+ {
710
+ case OPTION_EOF: /* end of file */
711
+ return_value = EOF;
712
+ break;
713
+ case OPTION_KEYWORD: /* keyword */
714
+ return_value = KEYWORD;
715
+ break;
716
+ case OPTION_ERROR:
717
+ input_error++;
718
+ error_msg("Unknown input in SOLUTION keyword.", CONTINUE);
719
+ error_msg(line_save, CONTINUE);
720
+ break;
721
+ case 0: /* temperature */
722
+ case 1:
723
+ (void)sscanf(next_char, SCANFORMAT, &dummy);
724
+ temp_solution.Set_tc(dummy);
725
+ break;
726
+ case 2: /* density */
727
+ case 3:
728
+ {
729
+ int j = copy_token(token, &next_char);
730
+ (void)sscanf(token.c_str(), SCANFORMAT, &dummy);
731
+ temp_solution.Set_density(dummy);
732
+ j = copy_token(token, &next_char);
733
+ if (j != EMPTY)
734
+ {
735
+ if (token[0] != 'c' && token[0] != 'C')
736
+ {
737
+ error_msg("Only option following density is c[alculate].", PHRQ_io::OT_CONTINUE);
738
+ error_msg(line_save, PHRQ_io::OT_CONTINUE);
739
+ input_error++;
740
+ }
741
+ else
742
+ {
743
+ initial_data_ptr->Set_calc_density(true);
744
+ }
745
+ }
746
+ }
747
+ break;
748
+ case 4: /* units */
749
+ case 8: /* unit */
750
+ if (copy_token(token, &next_char) == EMPTY)
751
+ break;
752
+ {
753
+ if (check_units(token, false, false, initial_data_ptr->Get_units().c_str(), true) == OK)
754
+ {
755
+ initial_data_ptr->Set_units(token);
756
+ }
757
+ else
758
+ {
759
+ input_error++;
760
+ }
761
+ }
762
+ break;
763
+ case 5: /* redox */
764
+ if (copy_token(token, &next_char) == EMPTY)
765
+ break;
766
+ if (parser.parse_couple(token) == OK)
767
+ {
768
+ const char * pe_str = string_hsave(token.c_str());
769
+ initial_data_ptr->Set_default_pe(pe_str);
770
+ CReaction temp_chem_reaction;
771
+ initial_data_ptr->Get_pe_reactions()[token] = temp_chem_reaction;
772
+ }
773
+ else
774
+ {
775
+ input_error++;
776
+ }
777
+ break;
778
+ case 6: /* ph */
779
+ {
780
+ cxxISolutionComp temp_comp(this->phrq_io);
781
+ if (temp_comp.read(char_string, &temp_solution) == CParser::PARSER_ERROR)
782
+ {
783
+ input_error++;
784
+ break;
785
+ }
786
+
787
+ temp_solution.Set_ph(temp_comp.Get_input_conc());
788
+ if (temp_comp.Get_equation_name().size() == 0)
789
+ {
790
+ break;
791
+
792
+ }
793
+ temp_comp.Set_description("H(1)");
794
+ initial_data_ptr->Get_comps()[temp_comp.Get_description()] = temp_comp;
795
+ }
796
+ break;
797
+ case 7: /* pe */
798
+ {
799
+ cxxISolutionComp temp_comp(this->phrq_io);
800
+ if (temp_comp.read(char_string, &temp_solution) == CParser::PARSER_ERROR)
801
+ {
802
+ input_error++;
803
+ break;
804
+ }
805
+ temp_solution.Set_pe(temp_comp.Get_input_conc());
806
+ if (temp_comp.Get_equation_name().size() == 0)
807
+ {
808
+ break;
809
+ }
810
+ temp_comp.Set_description("E");
811
+ initial_data_ptr->Get_comps()[temp_comp.Get_description()] = temp_comp;
812
+ }
813
+ break;
814
+ case 9: /* isotope */
815
+ {
816
+ next_char = char_string;
817
+ cxxSolutionIsotope temp_isotope;
818
+ if (copy_token(token, &next_char) != CParser::TT_DIGIT)
819
+ {
820
+ input_error++;
821
+ error_string = sformatf( "Expected isotope name to"
822
+ " begin with an isotopic number.");
823
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
824
+ error_string = sformatf( "In spread_row_to_solution isotope\n");
825
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
826
+ error_string = sformatf( "\t%s\t%s\n", "token: ", token.c_str());
827
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
828
+ error_string = sformatf( "\t%s\t%s\n", "next_char: ", next_char);
829
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
830
+ error_string = sformatf( "\t%s\t%s\n", "char_string: ", char_string);
831
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
832
+ error_string = sformatf( "\t%s\t%s\n", "line_save: ", line_save);
833
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
834
+ //class spread_row
835
+ //{
836
+ // int count;
837
+ // int empty, string, number;
838
+ // char **char_vector;
839
+ // LDBLE *d_vector;
840
+ // int *type_vector;
841
+ //};
842
+ error_string = sformatf("Heading spread_row\n");
843
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
844
+ if (heading)
845
+ {
846
+ for (int ii = 0; ii < heading->count; ii++)
847
+ {
848
+ error_string = sformatf("%d\t%s\n",ii,heading->str_vector[ii].c_str());
849
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
850
+ }
851
+ }
852
+ else
853
+ {
854
+ error_msg("heading is null", PHRQ_io::OT_CONTINUE);
855
+ }
856
+
857
+ error_string = sformatf("Data spread_row\n");
858
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
859
+ if (data)
860
+ {
861
+ for (int ii = 0; ii < data->count; ii++)
862
+ {
863
+ error_string = sformatf("%d\t%s\t%d\n",ii,data->str_vector[ii].c_str(),data->type_vector[ii]);
864
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
865
+ }
866
+ }
867
+ else
868
+ {
869
+ error_msg("Data is null", PHRQ_io::OT_CONTINUE);
870
+ }
871
+ error_string = sformatf("Units spread_row\n");
872
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
873
+ if (units)
874
+ {
875
+ for (int ii = 0; ii < units->count; ii++)
876
+ {
877
+ error_string = sformatf("%d\t%s\n",ii,units->str_vector[ii].c_str());
878
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
879
+ }
880
+ }
881
+ else
882
+ {
883
+ error_msg("Units is null", PHRQ_io::OT_CONTINUE);
884
+ }
885
+ free_check_null(char_string);
886
+ continue;
887
+ }
888
+ temp_isotope.Set_isotope_name(token.c_str());
889
+
890
+ /* read and save element name */
891
+ {
892
+ char *temp_iso_name = string_duplicate(token.c_str());
893
+ const char* cptr1 = temp_iso_name;
894
+ get_num(&cptr1, &dummy);
895
+ temp_isotope.Set_isotope_number(dummy);
896
+ if (cptr1[0] == '\0' || isupper((int)cptr1[0]) == FALSE)
897
+ {
898
+ error_msg("Expecting element name.", PHRQ_io::OT_CONTINUE);
899
+ error_msg(line_save, PHRQ_io::OT_CONTINUE);
900
+ input_error++;
901
+ temp_iso_name = (char*)free_check_null(temp_iso_name);
902
+ char_string = (char*)free_check_null(char_string);
903
+ return (CParser::PARSER_ERROR);
904
+ }
905
+ temp_isotope.Set_elt_name(cptr1);
906
+ temp_iso_name = (char*)free_check_null(temp_iso_name);
907
+ }
908
+ /* read and store isotope ratio */
909
+ if (copy_token(token, &next_char) != CParser::TT_DIGIT)
910
+ {
911
+ input_error++;
912
+ error_string = sformatf(
913
+ "Expected numeric value for isotope ratio.");
914
+ error_msg(error_string, CONTINUE);
915
+ free_check_null(char_string);
916
+ continue;
917
+ }
918
+ (void)sscanf(token.c_str(), SCANFORMAT, &dummy);
919
+ temp_isotope.Set_ratio(dummy);
920
+ temp_isotope.Set_ratio_uncertainty(NAN);
921
+
922
+ /* read and store isotope ratio uncertainty */
923
+ int j;
924
+ if ((j = copy_token(token, &next_char)) != CParser::TT_EMPTY)
925
+ {
926
+ if (j != DIGIT)
927
+ {
928
+ input_error++;
929
+ error_string = sformatf(
930
+ "Expected numeric value for uncertainty in isotope ratio.");
931
+ error_msg(error_string, PHRQ_io::OT_CONTINUE);
932
+ free_check_null(char_string);
933
+ continue;
934
+ }
935
+ (void)sscanf(token.c_str(), SCANFORMAT, &dummy);
936
+ temp_isotope.Set_ratio_uncertainty(dummy);
937
+ }
938
+ temp_solution.Get_isotopes()[temp_isotope.Get_isotope_name()] = temp_isotope;
939
+ }
940
+ break;
941
+ case 10: /* water */
942
+ {
943
+ int j = copy_token(token, &next_char);
944
+ if (j == EMPTY)
945
+ {
946
+ temp_solution.Set_mass_water(1.0);
947
+ }
948
+ else if (j != DIGIT)
949
+ {
950
+ input_error++;
951
+ error_string = sformatf(
952
+ "Expected numeric value for mass of water in solution.");
953
+ error_msg(error_string, CONTINUE);
954
+ }
955
+ else
956
+ {
957
+ (void)sscanf(token.c_str(), SCANFORMAT, &dummy);
958
+ temp_solution.Set_mass_water(dummy);
959
+ }
960
+ }
961
+ break;
962
+ case 11: /* description */
963
+ case 12: /* desc */
964
+ case 13: /* descriptor */
965
+ {
966
+ temp_solution.Set_description(next_char);
967
+ }
968
+ break;
969
+ case 14: /* pressure */
970
+ case 15: /* press */
971
+ {
972
+ if (sscanf(next_char, SCANFORMAT, &dummy) == 1)
973
+ {
974
+ temp_solution.Set_patm(dummy);
975
+ }
976
+ }
977
+ break;
978
+ case 16: /* pote, V */
979
+ {
980
+ if (sscanf(next_char, SCANFORMAT, &dummy) == 1)
981
+ {
982
+ temp_solution.Set_potV(dummy);
983
+ }
984
+ }
985
+ break;
986
+ case OPTION_DEFAULT:
987
+ /*
988
+ * Read concentration
989
+ */
990
+ {
991
+ next_char = char_string;
992
+ if (copy_token(token, &next_char) == LOWER)
993
+ {
994
+ free_check_null(char_string);
995
+ continue;
996
+ }
997
+ cxxISolutionComp temp_comp(this->phrq_io);
998
+ if (temp_comp.read(char_string, &temp_solution) == CParser::PARSER_ERROR)
999
+ {
1000
+ #ifdef SKIP
1001
+ input_error++;
1002
+ break;
1003
+ #endif
1004
+ }
1005
+ initial_data_ptr->Get_comps()[temp_comp.Get_description()] = temp_comp;
1006
+ if (temp_comp.Get_pe_reaction().size() > 0)
1007
+ {
1008
+ CReaction temp_chem_reaction;
1009
+ initial_data_ptr->Get_pe_reactions()[temp_comp.Get_pe_reaction()] = temp_chem_reaction;
1010
+ }
1011
+ }
1012
+ break;
1013
+ }
1014
+ free_check_null(char_string);
1015
+ if (return_value == EOF || return_value == KEYWORD)
1016
+ break;
1017
+ }
1018
+ /*
1019
+ * fix up default units and default pe
1020
+ */
1021
+ std::map < std::string, cxxISolutionComp >::iterator it;
1022
+ for (it = initial_data_ptr->Get_comps().begin(); it != initial_data_ptr->Get_comps().end(); it++)
1023
+ {
1024
+ token = it->first;
1025
+ Utilities::str_tolower(token);
1026
+ if (it->second.Get_units().size() == 0)
1027
+ {
1028
+ it->second.Set_units(initial_data_ptr->Get_units().c_str());
1029
+ }
1030
+ else
1031
+ {
1032
+ bool alk = false;
1033
+ if (strstr(token.c_str(), "alk") == token.c_str())
1034
+ alk = true;
1035
+ std::string token1 = it->second.Get_units();
1036
+ if (check_units(token1, alk, true, initial_data_ptr->Get_units().c_str(), true) == CParser::PARSER_ERROR)
1037
+ {
1038
+ input_error++;
1039
+ }
1040
+ else
1041
+ {
1042
+ it->second.Set_units(token1.c_str());
1043
+ }
1044
+ }
1045
+ if (it->second.Get_pe_reaction().size() == 0)
1046
+ {
1047
+ it->second.Set_pe_reaction(initial_data_ptr->Get_default_pe());
1048
+ }
1049
+ }
1050
+ if (n_user >= 0)
1051
+ {
1052
+ Rxn_solution_map[n_user] = temp_solution;
1053
+ }
1054
+ else
1055
+ {
1056
+ unnumbered_solutions.push_back(temp_solution);
1057
+ }
1058
+ return (return_value);
1059
+ }
1060
+ /* ---------------------------------------------------------------------- */
1061
+ class spread_row * Phreeqc::
1062
+ string_to_spread_row(char *string)
1063
+ /* ---------------------------------------------------------------------- */
1064
+ {
1065
+ int j;
1066
+ std::string token;
1067
+ const char* cptr;
1068
+ /*
1069
+ * Allocate space
1070
+ */
1071
+ class spread_row* spread_row_ptr = new class spread_row;
1072
+ if (spread_row_ptr == NULL)
1073
+ {
1074
+ malloc_error();
1075
+ return spread_row_ptr;
1076
+ }
1077
+ spread_row_ptr->count = 0;
1078
+ spread_row_ptr->empty = 0;
1079
+ spread_row_ptr->string = 0;
1080
+ spread_row_ptr->number = 0;
1081
+ cptr = string;
1082
+ /*
1083
+ * Split by tabs, reallocate space
1084
+ */
1085
+ for (;;)
1086
+ {
1087
+ j = copy_token_tab(token, &cptr);
1088
+ if (j == EOL)
1089
+ break;
1090
+ spread_row_ptr->str_vector.push_back(token);
1091
+ if (j == EMPTY || token.size() == 0)
1092
+ {
1093
+ spread_row_ptr->empty++;
1094
+ spread_row_ptr->type_vector.push_back(EMPTY);
1095
+ }
1096
+ else if (j == UPPER || j == LOWER)
1097
+ {
1098
+ spread_row_ptr->string++;
1099
+ spread_row_ptr->type_vector.push_back(STRING);
1100
+ }
1101
+ else if (j == DIGIT)
1102
+ {
1103
+ spread_row_ptr->number++;
1104
+ spread_row_ptr->type_vector.push_back(NUMBER);
1105
+ }
1106
+ else
1107
+ {
1108
+ input_error++;
1109
+ error_msg("Unknown input in string_to_spread_row keyword.", CONTINUE);
1110
+ error_string = sformatf("\tcopy_token j: %d, token: %s\n", j, token.c_str());
1111
+ error_msg(error_string, CONTINUE);
1112
+ error_msg(line_save, CONTINUE);
1113
+ }
1114
+ spread_row_ptr->count++;
1115
+ }
1116
+ assert(spread_row_ptr->count == spread_row_ptr->str_vector.size());
1117
+ assert(spread_row_ptr->count == spread_row_ptr->type_vector.size());
1118
+ assert(spread_row_ptr->count == spread_row_ptr->empty + spread_row_ptr->string + spread_row_ptr->number);
1119
+ return (spread_row_ptr);
1120
+ }
1121
+
1122
+ /* ---------------------------------------------------------------------- */
1123
+ int Phreeqc::
1124
+ spread_row_free(class spread_row *spread_row_ptr)
1125
+ /* ---------------------------------------------------------------------- */
1126
+ {
1127
+ if (spread_row_ptr == NULL)
1128
+ return (OK);
1129
+ spread_row_ptr->str_vector.clear();
1130
+ spread_row_ptr->type_vector.clear();
1131
+ delete spread_row_ptr;
1132
+ return (OK);
1133
+ }
1134
+
1135
+ /* ---------------------------------------------------------------------- */
1136
+ int Phreeqc::
1137
+ copy_token_tab(std::string& token, const char **cptr)
1138
+ /* ---------------------------------------------------------------------- */
1139
+ {
1140
+ /*
1141
+ * Copies from **cptr to *token until first tab is encountered.
1142
+ *
1143
+ * Arguments:
1144
+ * *token output, place to store token
1145
+ *
1146
+ * **cptr input, character string to read token from
1147
+ * output, next position after token
1148
+ * Returns:
1149
+ * UPPER,
1150
+ * LOWER,
1151
+ * DIGIT,
1152
+ * EMPTY,
1153
+ * EOL,
1154
+ * UNKNOWN.
1155
+ */
1156
+ //int i, return_value;
1157
+ int return_value;
1158
+ char c;
1159
+ /*
1160
+ * Strip leading spaces
1161
+ */
1162
+ token.clear();
1163
+ while ((c = **cptr) == ' ')
1164
+ (*cptr)++;
1165
+ /*
1166
+ * Check what we have
1167
+ */
1168
+ if (isupper((int) c) || c == '[')
1169
+ {
1170
+ return_value = UPPER;
1171
+ }
1172
+ else if (islower((int) c))
1173
+ {
1174
+ return_value = LOWER;
1175
+ }
1176
+ else if (isdigit((int) c) || c == '.' || c == '-')
1177
+ {
1178
+ return_value = DIGIT;
1179
+ }
1180
+ else if (c == '\0')
1181
+ {
1182
+ return_value = EOL;
1183
+ return (return_value);
1184
+ }
1185
+ else if (c == '\t')
1186
+ {
1187
+ return_value = EMPTY;
1188
+ }
1189
+ else
1190
+ {
1191
+ return_value = UNKNOWN;
1192
+ }
1193
+ /*
1194
+ * Begin copying to token
1195
+ */
1196
+ //i = 0;
1197
+ for (;;)
1198
+ {
1199
+ c = **cptr;
1200
+ if (c == '\t')
1201
+ {
1202
+ (*cptr)++;
1203
+ break;
1204
+ }
1205
+ else if (c == '\0')
1206
+ {
1207
+ break;
1208
+ }
1209
+ else
1210
+ {
1211
+ token.push_back(c);
1212
+ (*cptr)++;
1213
+ //i++;
1214
+ }
1215
+ }
1216
+ return (return_value);
1217
+ }
1218
+
1219
+ /* ---------------------------------------------------------------------- */
1220
+ int Phreeqc::
1221
+ get_option_string(const char **opt_list, int count_opt_list, const char **next_char)
1222
+ /* ---------------------------------------------------------------------- */
1223
+ {
1224
+ /*
1225
+ * Read a line and check for options
1226
+ */
1227
+ int j;
1228
+ int opt_l, opt;
1229
+ const char *opt_ptr;
1230
+ char option[MAX_LENGTH];
1231
+
1232
+ opt_ptr = *next_char;
1233
+ if (opt_ptr[0] == '-')
1234
+ {
1235
+ opt_ptr++;
1236
+ copy_token(option, &opt_ptr, &opt_l);
1237
+ if (find_option(&(option[1]), &opt, opt_list, count_opt_list, FALSE)
1238
+ == OK)
1239
+ {
1240
+ j = opt;
1241
+ *next_char = opt_ptr;
1242
+ }
1243
+ else
1244
+ {
1245
+ error_msg("Unknown option.", CONTINUE);
1246
+ error_msg(*next_char, CONTINUE);
1247
+ input_error++;
1248
+ j = OPTION_ERROR;
1249
+ }
1250
+ }
1251
+ else
1252
+ {
1253
+ copy_token(option, &opt_ptr, &opt_l);
1254
+ if (find_option(&(option[0]), &opt, opt_list, count_opt_list, TRUE)
1255
+ == OK)
1256
+ {
1257
+ j = opt;
1258
+ *next_char = opt_ptr;
1259
+ }
1260
+ else
1261
+ {
1262
+ j = OPTION_DEFAULT;
1263
+ }
1264
+ }
1265
+ return (j);
1266
+ }
1267
+
1268
+ #if defined(PHREEQCI_GUI)
1269
+ /* ---------------------------------------------------------------------- */
1270
+ void Phreeqc::
1271
+ free_spread(void)
1272
+ /* ---------------------------------------------------------------------- */
1273
+ {
1274
+ int i;
1275
+ spread_row_free(g_spread_sheet.heading);
1276
+ spread_row_free(g_spread_sheet.units);
1277
+ for (i = 0; i < g_spread_sheet.rows.size(); ++i)
1278
+ {
1279
+ spread_row_free(g_spread_sheet.rows[i]);
1280
+ }
1281
+ g_spread_sheet.rows.clear();
1282
+ g_spread_sheet.defaults.iso.clear();
1283
+ g_spread_sheet.defaults.redox = NULL;
1284
+ g_spread_sheet.defaults.units = NULL;
1285
+
1286
+ g_spread_sheet.heading = NULL;
1287
+ g_spread_sheet.units = NULL;
1288
+ g_spread_sheet.defaults.iso.clear();
1289
+ }
1290
+
1291
+ /* ---------------------------------------------------------------------- */
1292
+ void Phreeqc::
1293
+ add_row(class spread_row *spread_row_ptr)
1294
+ /* ---------------------------------------------------------------------- */
1295
+ {
1296
+ g_spread_sheet.rows.push_back(copy_row(spread_row_ptr));
1297
+ }
1298
+
1299
+ /* ---------------------------------------------------------------------- */
1300
+ class spread_row * Phreeqc::
1301
+ copy_row(class spread_row *spread_row_ptr)
1302
+ /* ---------------------------------------------------------------------- */
1303
+ {
1304
+ spread_row *copy = new spread_row(*spread_row_ptr);
1305
+ if (copy == NULL)
1306
+ malloc_error();
1307
+ return copy;
1308
+ }
1309
+ #endif