pyEQL 1.4.0rc9__cp310-cp310-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (519) hide show
  1. pyEQL/__init__.py +50 -0
  2. pyEQL/_phreeqc.cp310-win_amd64.pyd +0 -0
  3. pyEQL/activity_correction.py +879 -0
  4. pyEQL/database/geothermal.dat +5693 -0
  5. pyEQL/database/llnl.dat +19305 -0
  6. pyEQL/database/phreeqc_license.txt +54 -0
  7. pyEQL/database/pyeql_db.json +35607 -0
  8. pyEQL/engines.py +1153 -0
  9. pyEQL/equilibrium.py +227 -0
  10. pyEQL/functions.py +281 -0
  11. pyEQL/phreeqc/__init__.py +5 -0
  12. pyEQL/phreeqc/bindings.cpp +84 -0
  13. pyEQL/phreeqc/core.py +239 -0
  14. pyEQL/phreeqc/database/Amm.dat +1968 -0
  15. pyEQL/phreeqc/database/CMakeLists.txt +32 -0
  16. pyEQL/phreeqc/database/ColdChem.dat +267 -0
  17. pyEQL/phreeqc/database/Concrete_PHR.dat +158 -0
  18. pyEQL/phreeqc/database/Concrete_PZ.dat +195 -0
  19. pyEQL/phreeqc/database/Kinec.v2.dat +12039 -0
  20. pyEQL/phreeqc/database/Kinec_v3.dat +12159 -0
  21. pyEQL/phreeqc/database/Makefile.am +28 -0
  22. pyEQL/phreeqc/database/Makefile.in +530 -0
  23. pyEQL/phreeqc/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
  24. pyEQL/phreeqc/database/Tipping_Hurley.dat +4137 -0
  25. pyEQL/phreeqc/database/__init__.py +0 -0
  26. pyEQL/phreeqc/database/core10.dat +6824 -0
  27. pyEQL/phreeqc/database/frezchem.dat +634 -0
  28. pyEQL/phreeqc/database/iso.dat +7235 -0
  29. pyEQL/phreeqc/database/llnl.dat +19310 -0
  30. pyEQL/phreeqc/database/minteq.dat +5654 -0
  31. pyEQL/phreeqc/database/minteq.v4.dat +13212 -0
  32. pyEQL/phreeqc/database/phreeqc.dat +1972 -0
  33. pyEQL/phreeqc/database/phreeqc_rates.dat +3158 -0
  34. pyEQL/phreeqc/database/pitzer.dat +1044 -0
  35. pyEQL/phreeqc/database/sit.dat +14348 -0
  36. pyEQL/phreeqc/database/wateq4f.dat +4036 -0
  37. pyEQL/phreeqc/ext/README.md +10 -0
  38. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/CMakeLists.txt +476 -0
  39. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/INSTALL +302 -0
  40. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/IPhreeqc.rc +61 -0
  41. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/IPhreeqcConfig.cmake.in +4 -0
  42. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/Makefile.am +8 -0
  43. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/Makefile.in +816 -0
  44. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/aclocal.m4 +1217 -0
  45. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/ALL_BUILD.vcxproj +185 -0
  46. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/ALL_BUILD.vcxproj.filters +8 -0
  47. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/generate.stamp +1 -0
  48. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/generate.stamp.depend +79 -0
  49. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CTestTestfile.cmake +6 -0
  50. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Continuous.vcxproj +240 -0
  51. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Continuous.vcxproj.filters +17 -0
  52. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/DartConfiguration.tcl +109 -0
  53. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Experimental.vcxproj +240 -0
  54. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Experimental.vcxproj.filters +17 -0
  55. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/INSTALL.vcxproj +209 -0
  56. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/INSTALL.vcxproj.filters +13 -0
  57. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/CSelectedOutput.obj +0 -0
  58. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Dictionary.obj +0 -0
  59. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/ExchComp.obj +0 -0
  60. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Exchange.obj +0 -0
  61. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/GasComp.obj +0 -0
  62. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/GasPhase.obj +0 -0
  63. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.lib.recipe +11 -0
  64. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.obj +0 -0
  65. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CL.command.1.tlog +0 -0
  66. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CL.read.1.tlog +0 -0
  67. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CL.write.1.tlog +0 -0
  68. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/Cl.items.tlog +82 -0
  69. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CustomBuild.command.1.tlog +10 -0
  70. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CustomBuild.read.1.tlog +78 -0
  71. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CustomBuild.write.1.tlog +2 -0
  72. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/IPhreeqc.lastbuildstate +2 -0
  73. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/Lib-link.read.1.tlog +0 -0
  74. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/Lib-link.write.1.tlog +0 -0
  75. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/Lib.command.1.tlog +0 -0
  76. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqcLib.obj +0 -0
  77. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc_interface_F.obj +0 -0
  78. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/ISolution.obj +0 -0
  79. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/ISolutionComp.obj +0 -0
  80. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Keywords.obj +0 -0
  81. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/KineticsComp.obj +0 -0
  82. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/NameDouble.obj +0 -0
  83. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/NumKeyword.obj +0 -0
  84. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PBasic.obj +0 -0
  85. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PHRQ_base.obj +0 -0
  86. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PHRQ_io.obj +0 -0
  87. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PHRQ_io_output.obj +0 -0
  88. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PPassemblage.obj +0 -0
  89. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PPassemblageComp.obj +0 -0
  90. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Parser.obj +0 -0
  91. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Phreeqc.obj +0 -0
  92. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Pressure.obj +0 -0
  93. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Reaction.obj +0 -0
  94. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/ReadClass.obj +0 -0
  95. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SS.obj +0 -0
  96. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SSassemblage.obj +0 -0
  97. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SScomp.obj +0 -0
  98. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SelectedOutput.obj +0 -0
  99. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Serializer.obj +0 -0
  100. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Solution.obj +0 -0
  101. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SolutionIsotope.obj +0 -0
  102. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/StorageBin.obj +0 -0
  103. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/StorageBinList.obj +0 -0
  104. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Surface.obj +0 -0
  105. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SurfaceCharge.obj +0 -0
  106. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SurfaceComp.obj +0 -0
  107. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/System.obj +0 -0
  108. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Temperature.obj +0 -0
  109. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Use.obj +0 -0
  110. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/UserPunch.obj +0 -0
  111. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Utils.obj +0 -0
  112. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Var.obj +0 -0
  113. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/advection.obj +0 -0
  114. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/basicsubs.obj +0 -0
  115. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cl1.obj +0 -0
  116. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cvdense.obj +0 -0
  117. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cvode.obj +0 -0
  118. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cxxKinetics.obj +0 -0
  119. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cxxMix.obj +0 -0
  120. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/dense.obj +0 -0
  121. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/dumper.obj +0 -0
  122. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/gases.obj +0 -0
  123. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/input.obj +0 -0
  124. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/integrate.obj +0 -0
  125. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/inverse.obj +0 -0
  126. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/isotopes.obj +0 -0
  127. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/kinetics.obj +0 -0
  128. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/mainsubs.obj +0 -0
  129. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/model.obj +0 -0
  130. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/nvector.obj +0 -0
  131. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/nvector_serial.obj +0 -0
  132. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/parse.obj +0 -0
  133. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/phqalloc.obj +0 -0
  134. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/pitzer.obj +0 -0
  135. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/pitzer_structures.obj +0 -0
  136. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/prep.obj +0 -0
  137. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/print.obj +0 -0
  138. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/read.obj +0 -0
  139. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/readtr.obj +0 -0
  140. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/runner.obj +0 -0
  141. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/sit.obj +0 -0
  142. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/smalldense.obj +0 -0
  143. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/spread.obj +0 -0
  144. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/step.obj +0 -0
  145. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/structures.obj +0 -0
  146. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/sundialsmath.obj +0 -0
  147. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/tally.obj +0 -0
  148. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/tidy.obj +0 -0
  149. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/transport.obj +0 -0
  150. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/utilities.obj +0 -0
  151. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.sln +116 -0
  152. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.vcxproj +443 -0
  153. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.vcxproj.filters +456 -0
  154. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Nightly.vcxproj +240 -0
  155. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Nightly.vcxproj.filters +17 -0
  156. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/NightlyMemoryCheck.vcxproj +240 -0
  157. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/NightlyMemoryCheck.vcxproj.filters +17 -0
  158. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Release/IPhreeqc.lib +0 -0
  159. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/cmake_install.cmake +40 -0
  160. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ar-lib +270 -0
  161. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/compile +347 -0
  162. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.guess +1441 -0
  163. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.sub +1813 -0
  164. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/depcomp +791 -0
  165. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/install-sh +508 -0
  166. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ltmain.sh +11156 -0
  167. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/missing +215 -0
  168. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/test-driver +148 -0
  169. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure +23867 -0
  170. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure.ac +136 -0
  171. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Amm.dat +1968 -0
  172. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/CMakeLists.txt +32 -0
  173. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/ColdChem.dat +267 -0
  174. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PHR.dat +158 -0
  175. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PZ.dat +195 -0
  176. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec.v2.dat +12039 -0
  177. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec_v3.dat +12159 -0
  178. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.am +28 -0
  179. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.in +530 -0
  180. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
  181. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Tipping_Hurley.dat +4137 -0
  182. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/core10.dat +6824 -0
  183. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/frezchem.dat +634 -0
  184. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/iso.dat +7235 -0
  185. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/llnl.dat +19310 -0
  186. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.dat +5654 -0
  187. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.v4.dat +13212 -0
  188. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc.dat +1972 -0
  189. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc_rates.dat +3158 -0
  190. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/pitzer.dat +1044 -0
  191. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/sit.dat +14348 -0
  192. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/wateq4f.dat +4036 -0
  193. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/CMakeLists.txt +35 -0
  194. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/IPhreeqc.pdf +0 -0
  195. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.am +24 -0
  196. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.in +545 -0
  197. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/NOTICE +51 -0
  198. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_2_1999_manual.pdf +0 -0
  199. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_3_2013_manual.pdf +0 -0
  200. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/README +428 -0
  201. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/RELEASE +7294 -0
  202. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h.html +5096 -0
  203. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h_source.html +389 -0
  204. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp.html +83 -0
  205. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp_source.html +478 -0
  206. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h.html +318 -0
  207. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h_source.html +200 -0
  208. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bc_s.png +0 -0
  209. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bdwn.png +0 -0
  210. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.html +2274 -0
  211. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.png +0 -0
  212. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.html +69 -0
  213. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.png +0 -0
  214. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/closed.png +0 -0
  215. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +68 -0
  216. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.css +1440 -0
  217. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.png +0 -0
  218. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dynsections.js +97 -0
  219. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2blank.png +0 -0
  220. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2doc.png +0 -0
  221. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderclosed.png +0 -0
  222. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderopen.png +0 -0
  223. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2lastnode.png +0 -0
  224. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2link.png +0 -0
  225. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mlastnode.png +0 -0
  226. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mnode.png +0 -0
  227. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2node.png +0 -0
  228. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2plastnode.png +0 -0
  229. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2pnode.png +0 -0
  230. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2splitbar.png +0 -0
  231. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2vertline.png +0 -0
  232. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/index.html +58 -0
  233. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/jquery.js +31 -0
  234. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_f.png +0 -0
  235. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_g.png +0 -0
  236. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_h.png +0 -0
  237. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/open.png +0 -0
  238. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/structVAR.html +143 -0
  239. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_off.png +0 -0
  240. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_on.png +0 -0
  241. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_a.png +0 -0
  242. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_b.png +0 -0
  243. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_h.png +0 -0
  244. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_s.png +0 -0
  245. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tabs.css +60 -0
  246. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/phreeqc3.chm +0 -0
  247. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/CMakeLists.txt +11 -0
  248. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.am +88 -0
  249. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.in +696 -0
  250. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/CMakeLists.txt +1 -0
  251. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt +35 -0
  252. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt.in +21 -0
  253. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/README.txt +44 -0
  254. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/advect.c +101 -0
  255. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/ic +17 -0
  256. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/phreeqc.dat +1579 -0
  257. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/CMakeLists.txt +10 -0
  258. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/README.txt +3 -0
  259. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/CMakeLists.txt +9 -0
  260. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/phreeqc.dat +1582 -0
  261. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/runphreeqc.xls +0 -0
  262. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/withcallback.xls +0 -0
  263. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/CMakeLists.txt +11 -0
  264. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/Gypsum.py +52 -0
  265. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/parallel_advect.py +465 -0
  266. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/phreeqc.dat +1582 -0
  267. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/pitzer.dat +790 -0
  268. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/wateq4f.dat +3846 -0
  269. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/CMakeLists.txt +1 -0
  270. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt +35 -0
  271. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt.in +20 -0
  272. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/README.txt +45 -0
  273. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/advect.cpp +110 -0
  274. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/ic +17 -0
  275. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/phreeqc.dat +1579 -0
  276. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/CMakeLists.txt +1 -0
  277. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt +44 -0
  278. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt.in +24 -0
  279. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/README.txt +45 -0
  280. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/advect.F90 +102 -0
  281. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/ic +17 -0
  282. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/phreeqc.dat +1579 -0
  283. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt +26 -0
  284. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt.in +20 -0
  285. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/README.txt +37 -0
  286. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/ex2 +26 -0
  287. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/main.cpp +20 -0
  288. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/phreeqc.dat +1837 -0
  289. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/post-install.cmake.in +7 -0
  290. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/CMakeLists.txt +185 -0
  291. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.cpp +171 -0
  292. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.h +34 -0
  293. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.am +18 -0
  294. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.in +466 -0
  295. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestCVar.cpp +9 -0
  296. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqc.cpp +4901 -0
  297. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqcLib.cpp +4644 -0
  298. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestSelectedOutput.cpp +669 -0
  299. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestVar.cpp +10 -0
  300. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/conv_fail.in +11 -0
  301. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/dump +42 -0
  302. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/iso.dat +7231 -0
  303. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/kinn20140218 +349 -0
  304. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/missing_e.dat +1556 -0
  305. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch +105 -0
  306. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch_no_set +102 -0
  307. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.90a6449 +1935 -0
  308. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.old +1556 -0
  309. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/libtool.m4 +8388 -0
  310. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltoptions.m4 +437 -0
  311. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltsugar.m4 +124 -0
  312. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltversion.m4 +23 -0
  313. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/lt~obsolete.m4 +99 -0
  314. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/resource.h +14 -0
  315. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.cpp +401 -0
  316. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.hxx +77 -0
  317. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CVar.hxx +162 -0
  318. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Debug.h +12 -0
  319. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/ErrorReporter.hxx +70 -0
  320. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.cpp +1889 -0
  321. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f.inc +91 -0
  322. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f90.inc +603 -0
  323. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.h +2182 -0
  324. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.hpp +1027 -0
  325. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcCallbacks.h +19 -0
  326. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcF.f +653 -0
  327. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcLib.cpp +1098 -0
  328. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface.F90 +1283 -0
  329. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.cpp +535 -0
  330. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.h +162 -0
  331. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.am +210 -0
  332. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.in +1294 -0
  333. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/README.Fortran +17 -0
  334. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.c +84 -0
  335. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.h +152 -0
  336. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Version.h +36 -0
  337. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fimpl.h +282 -0
  338. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.cpp +646 -0
  339. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.h +163 -0
  340. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap1.cpp +24 -0
  341. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap2.cpp +24 -0
  342. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap3.cpp +24 -0
  343. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap4.cpp +24 -0
  344. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap5.cpp +24 -0
  345. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap6.cpp +25 -0
  346. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap7.cpp +25 -0
  347. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap8.cpp +24 -0
  348. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.cpp +225 -0
  349. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.h +59 -0
  350. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.cpp +1382 -0
  351. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.h +444 -0
  352. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.cpp +42 -0
  353. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.h +79 -0
  354. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.cpp +41 -0
  355. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.h +28 -0
  356. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.cxx +398 -0
  357. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.h +117 -0
  358. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.cxx +466 -0
  359. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.h +74 -0
  360. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.h +1184 -0
  361. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.resX +36 -0
  362. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.cxx +265 -0
  363. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.h +59 -0
  364. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.cxx +659 -0
  365. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.h +103 -0
  366. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.cxx +40 -0
  367. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.h +53 -0
  368. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.cxx +202 -0
  369. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.h +138 -0
  370. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.cxx +318 -0
  371. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.h +81 -0
  372. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NA.h +1 -0
  373. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.cxx +537 -0
  374. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.h +66 -0
  375. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.cxx +190 -0
  376. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.h +67 -0
  377. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.cpp +8350 -0
  378. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.h +572 -0
  379. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PHRQ_io_output.cpp +411 -0
  380. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.cxx +375 -0
  381. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.h +70 -0
  382. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.cxx +441 -0
  383. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.h +83 -0
  384. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.cpp +2087 -0
  385. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.h +2164 -0
  386. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.cpp +242 -0
  387. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.h +104 -0
  388. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.cxx +417 -0
  389. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.h +43 -0
  390. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.cxx +284 -0
  391. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.h +57 -0
  392. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ReadClass.cxx +1150 -0
  393. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.cxx +609 -0
  394. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.h +128 -0
  395. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.cxx +317 -0
  396. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.h +59 -0
  397. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.cxx +297 -0
  398. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.h +66 -0
  399. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.cpp +115 -0
  400. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.h +209 -0
  401. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.cxx +213 -0
  402. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.h +42 -0
  403. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.cxx +1795 -0
  404. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.h +154 -0
  405. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.cxx +333 -0
  406. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.h +85 -0
  407. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.cxx +1507 -0
  408. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.h +141 -0
  409. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.cpp +358 -0
  410. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.h +81 -0
  411. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.cxx +837 -0
  412. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.h +108 -0
  413. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.cxx +617 -0
  414. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.h +137 -0
  415. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.cxx +509 -0
  416. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.h +70 -0
  417. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.cxx +103 -0
  418. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.h +89 -0
  419. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.cxx +423 -0
  420. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.h +42 -0
  421. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.cpp +78 -0
  422. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.h +159 -0
  423. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.cpp +32 -0
  424. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.h +39 -0
  425. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ZedGraph.dll +0 -0
  426. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/advection.cpp +140 -0
  427. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/basicsubs.cpp +4333 -0
  428. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cl1.cpp +881 -0
  429. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.cxx +117 -0
  430. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.h +48 -0
  431. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_exports.h +20 -0
  432. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.cpp +914 -0
  433. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.h +207 -0
  434. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.cxx +1331 -0
  435. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.h +310 -0
  436. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.cxx +263 -0
  437. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.h +29 -0
  438. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/phrqtype.h +18 -0
  439. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.cpp +566 -0
  440. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.h +267 -0
  441. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.cpp +3939 -0
  442. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.h +940 -0
  443. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.cxx +617 -0
  444. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.h +78 -0
  445. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.cxx +154 -0
  446. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.h +58 -0
  447. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.cpp +175 -0
  448. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.h +341 -0
  449. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.cpp +277 -0
  450. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.h +60 -0
  451. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/gases.cpp +748 -0
  452. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/global_structures.h +1672 -0
  453. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/input.cpp +133 -0
  454. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/integrate.cpp +1219 -0
  455. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/inverse.cpp +5135 -0
  456. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/isotopes.cpp +1813 -0
  457. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/kinetics.cpp +3180 -0
  458. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/mainsubs.cpp +2320 -0
  459. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/model.cpp +5843 -0
  460. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.cpp +272 -0
  461. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.h +485 -0
  462. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.cpp +1032 -0
  463. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.h +369 -0
  464. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/parse.cpp +1044 -0
  465. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.cpp +316 -0
  466. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.h +47 -0
  467. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer.cpp +2709 -0
  468. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer_structures.cpp +225 -0
  469. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/prep.cpp +6267 -0
  470. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/print.cpp +3673 -0
  471. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/read.cpp +10245 -0
  472. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/readtr.cpp +1495 -0
  473. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.cpp +158 -0
  474. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.h +33 -0
  475. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sit.cpp +1684 -0
  476. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.cpp +324 -0
  477. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.h +261 -0
  478. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/spread.cpp +1309 -0
  479. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/step.cpp +1566 -0
  480. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/structures.cpp +3381 -0
  481. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.cpp +133 -0
  482. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.h +162 -0
  483. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialstypes.h +183 -0
  484. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tally.cpp +1288 -0
  485. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tidy.cpp +5600 -0
  486. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/transport.cpp +6403 -0
  487. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/utilities.cpp +1339 -0
  488. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/thread.h +64 -0
  489. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/CMakeLists.txt +133 -0
  490. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.am +45 -0
  491. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.in +1128 -0
  492. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/ex2.in +26 -0
  493. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main.f90 +31 -0
  494. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main77.f +6 -0
  495. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main_fortran.cxx +8 -0
  496. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/phreeqc.dat.in +1556 -0
  497. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_c.c +148 -0
  498. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_cxx.cxx +152 -0
  499. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_f90.F90 +328 -0
  500. pyEQL/phreeqc/iphreeqc_wrapper.cpp +75 -0
  501. pyEQL/phreeqc/solution.py +74 -0
  502. pyEQL/phreeqc/var.py +50 -0
  503. pyEQL/presets/Ringers lactate.yaml +20 -0
  504. pyEQL/presets/__init__.py +17 -0
  505. pyEQL/presets/normal saline.yaml +17 -0
  506. pyEQL/presets/rainwater.yaml +17 -0
  507. pyEQL/presets/seawater.yaml +29 -0
  508. pyEQL/presets/urine.yaml +26 -0
  509. pyEQL/presets/wastewater.yaml +21 -0
  510. pyEQL/py.typed +0 -0
  511. pyEQL/salt_ion_match.py +112 -0
  512. pyEQL/solute.py +163 -0
  513. pyEQL/solution.py +2714 -0
  514. pyEQL/utils.py +237 -0
  515. pyeql-1.4.0rc9.dist-info/METADATA +130 -0
  516. pyeql-1.4.0rc9.dist-info/RECORD +519 -0
  517. pyeql-1.4.0rc9.dist-info/WHEEL +5 -0
  518. pyeql-1.4.0rc9.dist-info/licenses/AUTHORS.md +21 -0
  519. pyeql-1.4.0rc9.dist-info/licenses/LICENSE.txt +20 -0
@@ -0,0 +1,881 @@
1
+ #include <stdio.h>
2
+ #include <string.h>
3
+ #include <cmath>
4
+ #include <stdlib.h>
5
+ #include "Phreeqc.h"
6
+ #include "phqalloc.h"
7
+
8
+ /* debug
9
+ #define DEBUG_CL1
10
+ #define CHECK_ERRORS
11
+ */
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
+ int Phreeqc::
22
+ cl1(int k, int l, int m, int n,
23
+ int l_nklmd, int l_n2d,
24
+ LDBLE * q,
25
+ int *l_kode, LDBLE l_toler,
26
+ int *l_iter, LDBLE * l_x, LDBLE * l_res, LDBLE * l_error,
27
+ LDBLE * l_cu, int *l_iu, int *l_s, int check)
28
+ {
29
+ /* System generated locals */
30
+ union double_or_int
31
+ {
32
+ int ival;
33
+ LDBLE dval;
34
+ } *q2;
35
+
36
+ /* Local variables */
37
+ int nklm;
38
+ LDBLE xmin, xmax;
39
+ int iout = 0;
40
+ // static i runs faster on windows
41
+ int i, j;
42
+ LDBLE l_z;
43
+ int maxit, n1, n2;
44
+ LDBLE pivot;
45
+ int ia, ii, kk, nk, js;
46
+ int in = 0;
47
+ LDBLE sn;
48
+ int iphase, kforce;
49
+ LDBLE zu, zv;
50
+ LDBLE tpivot;
51
+ int klm, jmn, nkl, jpn;
52
+ LDBLE cuv;
53
+ long double sum;
54
+ int klm1;
55
+ int q_dim, cu_dim;
56
+ int kode_arg;
57
+ LDBLE check_toler;
58
+ #ifdef CHECK_ERRORS
59
+ char **col_name, **row_name;
60
+ int *row_back, *col_back;
61
+ #endif
62
+ /* THIS SUBROUTINE USES A MODIFICATION OF THE SIMPLEX */
63
+ /* METHOD OF LINEAR PROGRAMMING TO CALCULATE AN L1 SOLUTION */
64
+ /* TO A K BY N SYSTEM OF LINEAR EQUATIONS */
65
+ /* AX=B */
66
+ /* SUBJECT TO L LINEAR EQUALITY CONSTRAINTS */
67
+ /* CX=D */
68
+ /* AND M LINEAR INEQUALITY CONSTRAINTS */
69
+ /* EX.LE.F. */
70
+ /* DESCRIPTION OF PARAMETERS */
71
+ /* K NUMBER OF ROWS OF THE MATRIX A (K.GE.1). */
72
+ /* L NUMBER OF ROWS OF THE MATRIX C (L.GE.0). */
73
+ /* M NUMBER OF ROWS OF THE MATRIX E (M.GE.0). */
74
+ /* N NUMBER OF COLUMNS OF THE MATRICES A,C,E (N.GE.1). */
75
+ /* KLMD SET TO AT LEAST K+L+M FOR ADJUSTABLE DIMENSIONS. */
76
+ /* KLM2D SET TO AT LEAST K+L+M+2 FOR ADJUSTABLE DIMENSIONS. */
77
+ /* NKLMD SET TO AT LEAST N+K+L+M FOR ADJUSTABLE DIMENSIONS. */
78
+ /* N2D SET TO AT LEAST N+2 FOR ADJUSTABLE DIMENSIONS */
79
+ /* Q TWO DIMENSIONAL REAL ARRAY WITH KLM2D ROWS AND */
80
+ /* AT LEAST N2D COLUMNS. */
81
+ /* ON ENTRY THE MATRICES A,C AND E, AND THE VECTORS */
82
+ /* B,D AND F MUST BE STORED IN THE FIRST K+L+M ROWS */
83
+ /* AND N+1 COLUMNS OF Q AS FOLLOWS */
84
+ /* A B */
85
+ /* Q = C D */
86
+ /* E F */
87
+ /* THESE VALUES ARE DESTROYED BY THE SUBROUTINE. */
88
+ /* KODE A CODE USED ON ENTRY TO, AND EXIT */
89
+ /* FROM, THE SUBROUTINE. */
90
+ /* ON ENTRY, THIS SHOULD NORMALLY BE SET TO 0. */
91
+ /* HOWEVER, IF CERTAIN NONNEGATIVITY CONSTRAINTS */
92
+ /* ARE TO BE INCLUDED IMPLICITLY, RATHER THAN */
93
+ /* EXPLICITLY IN THE CONSTRAINTS EX.LE.F, THEN KODE */
94
+ /* SHOULD BE SET TO 1, AND THE NONNEGATIVITY */
95
+ /* CONSTRAINTS INCLUDED IN THE ARRAYS X AND */
96
+ /* RES (SEE BELOW). */
97
+ /* ON EXIT, KODE HAS ONE OF THE */
98
+ /* FOLLOWING VALUES */
99
+ /* 0- OPTIMAL SOLUTION FOUND, */
100
+ /* 1- NO FEASIBLE SOLUTION TO THE */
101
+ /* CONSTRAINTS, */
102
+ /* 2- CALCULATIONS TERMINATED */
103
+ /* PREMATURELY DUE TO ROUNDING ERRORS, */
104
+ /* 3- MAXIMUM NUMBER OF ITERATIONS REACHED. */
105
+ /* TOLER A SMALL POSITIVE TOLERANCE. EMPIRICAL */
106
+ /* EVIDENCE SUGGESTS TOLER = 10**(-D*2/3), */
107
+ /* WHERE D REPRESENTS THE NUMBER OF DECIMAL */
108
+ /* DIGITS OF ACCURACY AVAILABLE. ESSENTIALLY, */
109
+ /* THE SUBROUTINE CANNOT DISTINGUISH BETWEEN ZERO */
110
+ /* AND ANY QUANTITY WHOSE MAGNITUDE DOES NOT EXCEED */
111
+ /* TOLER. IN PARTICULAR, IT WILL NOT PIVOT ON ANY */
112
+ /* NUMBER WHOSE MAGNITUDE DOES NOT EXCEED TOLER. */
113
+ /* ITER ON ENTRY ITER MUST CONTAIN AN UPPER BOUND ON */
114
+ /* THE MAXIMUM NUMBER OF ITERATIONS ALLOWED. */
115
+ /* A SUGGESTED VALUE IS 10*(K+L+M). ON EXIT ITER */
116
+ /* GIVES THE NUMBER OF SIMPLEX ITERATIONS. */
117
+ /* X ONE DIMENSIONAL REAL ARRAY OF SIZE AT LEAST N2D. */
118
+ /* ON EXIT THIS ARRAY CONTAINS A */
119
+ /* SOLUTION TO THE L1 PROBLEM. IF KODE=1 */
120
+ /* ON ENTRY, THIS ARRAY IS ALSO USED TO INCLUDE */
121
+ /* SIMPLE NONNEGATIVITY CONSTRAINTS ON THE */
122
+ /* VARIABLES. THE VALUES -1, 0, OR 1 */
123
+ /* FOR X(J) INDICATE THAT THE J-TH VARIABLE */
124
+ /* IS RESTRICTED TO BE .LE.0, UNRESTRICTED, */
125
+ /* OR .GE.0 RESPECTIVELY. */
126
+ /* RES ONE DIMENSIONAL REAL ARRAY OF SIZE AT LEAST KLMD. */
127
+ /* ON EXIT THIS CONTAINS THE RESIDUALS B-AX */
128
+ /* IN THE FIRST K COMPONENTS, D-CX IN THE */
129
+ /* NEXT L COMPONENTS (THESE WILL BE =0),AND */
130
+ /* F-EX IN THE NEXT M COMPONENTS. IF KODE=1 ON */
131
+ /* ENTRY, THIS ARRAY IS ALSO USED TO INCLUDE SIMPLE */
132
+ /* NONNEGATIVITY CONSTRAINTS ON THE RESIDUALS */
133
+ /* B-AX. THE VALUES -1, 0, OR 1 FOR RES(I) */
134
+ /* INDICATE THAT THE I-TH RESIDUAL (1.LE.I.LE.K) IS */
135
+ /* RESTRICTED TO BE .LE.0, UNRESTRICTED, OR .GE.0 */
136
+ /* RESPECTIVELY. */
137
+ /* ERROR ON EXIT, THIS GIVES THE MINIMUM SUM OF */
138
+ /* ABSOLUTE VALUES OF THE RESIDUALS. */
139
+ /* CU A TWO DIMENSIONAL REAL ARRAY WITH TWO ROWS AND */
140
+ /* AT LEAST NKLMD COLUMNS USED FOR WORKSPACE. */
141
+ /* IU A TWO DIMENSIONAL INTEGER ARRAY WITH TWO ROWS AND */
142
+ /* AT LEAST NKLMD COLUMNS USED FOR WORKSPACE. */
143
+ /* S INTEGER ARRAY OF SIZE AT LEAST KLMD, USED FOR */
144
+ /* WORKSPACE. */
145
+ /* real(kind=8) DBLE */
146
+ /* REAL */
147
+
148
+ /* INITIALIZATION. */
149
+
150
+ zv = 0;
151
+ kode_arg = *l_kode;
152
+ cl1_space(check, l_n2d, k + l + m, l_nklmd);
153
+
154
+ /* Parameter adjustments */
155
+ q_dim = l_n2d;
156
+ q2 = (union double_or_int *) q;
157
+ cu_dim = l_nklmd;
158
+
159
+ /* Function Body */
160
+ maxit = *l_iter;
161
+ n1 = n + 1;
162
+ n2 = n + 2;
163
+ nk = n + k;
164
+ nkl = nk + l;
165
+ klm = k + l + m;
166
+ klm1 = klm + 1;
167
+ nklm = n + klm;
168
+ kforce = 1;
169
+ *l_iter = 0;
170
+ js = 0;
171
+ ia = -1;
172
+
173
+ /* SET UP LABELS IN Q. */
174
+ for (j = 0; j < n; ++j)
175
+ {
176
+ q2[klm1 * q_dim + j].ival = j + 1;
177
+ }
178
+ /* L10: */
179
+ for (i = 0; i < klm; ++i)
180
+ {
181
+ q2[i * q_dim + n1].ival = n + i + 1;
182
+ if (q2[i * q_dim + n].dval < 0.)
183
+ {
184
+ for (j = 0; j < n1; ++j)
185
+ {
186
+ q2[i * q_dim + j].dval = -q2[i * q_dim + j].dval;
187
+ }
188
+ q2[i * q_dim + n1].ival = -q2[i * q_dim + n1].ival;
189
+ /* L20: */
190
+ }
191
+ }
192
+ /* L30: */
193
+ /* SET UP PHASE 1 COSTS. */
194
+ iphase = 2;
195
+ #ifdef DEBUG_CL1
196
+ output_msg(sformatf( "Set up phase 1 costs\n"));
197
+ #endif
198
+ /* Zero first row of cu and iu */
199
+ memset(&l_cu[0], 0, (size_t)nklm * sizeof(LDBLE));
200
+ memset(&l_iu[0], 0, (size_t)nklm * sizeof(int));
201
+ /* L40: */
202
+ #ifdef DEBUG_CL1
203
+ output_msg(sformatf( "L40\n"));
204
+ #endif
205
+ if (l != 0)
206
+ {
207
+ for (j = nk; j < nkl; ++j)
208
+ {
209
+ l_cu[j] = 1.;
210
+ l_iu[j] = 1;
211
+ }
212
+ /* L50: */
213
+ iphase = 1;
214
+ }
215
+
216
+ /* Copy first row of cu and iu to second row */
217
+ memcpy((void *) &(l_cu[cu_dim]), (void *) &(l_cu[0]),
218
+ (size_t) nklm * sizeof(LDBLE));
219
+ memcpy((void *) &(l_iu[cu_dim]), (void *) &(l_iu[0]),
220
+ (size_t) nklm * sizeof(int));
221
+
222
+ /* L60: */
223
+ #ifdef DEBUG_CL1
224
+ output_msg(sformatf( "L60\n"));
225
+ #endif
226
+ if (m != 0)
227
+ {
228
+ for (j = nkl; j < nklm; ++j)
229
+ {
230
+ l_cu[cu_dim + j] = 1.;
231
+ l_iu[cu_dim + j] = 1;
232
+ jmn = j - n;
233
+ if (q2[jmn * q_dim + n1].ival < 0)
234
+ {
235
+ iphase = 1;
236
+ }
237
+ }
238
+ /* L70: */
239
+ }
240
+ /* L80: */
241
+ #ifdef DEBUG_CL1
242
+ output_msg(sformatf( "L80\n"));
243
+ #endif
244
+ if (*l_kode != 0)
245
+ {
246
+ for (j = 0; j < n; ++j)
247
+ {
248
+ if (l_x[j] < 0.)
249
+ {
250
+ /* L90: */
251
+ l_cu[j] = 1.;
252
+ l_iu[j] = 1;
253
+ }
254
+ else if (l_x[j] > 0.)
255
+ {
256
+ l_cu[cu_dim + j] = 1.;
257
+ l_iu[cu_dim + j] = 1;
258
+ }
259
+ }
260
+ /* L110: */
261
+ #ifdef DEBUG_CL1
262
+ output_msg(sformatf( "L110\n"));
263
+ #endif
264
+ for (j = 0; j < k; ++j)
265
+ {
266
+ jpn = j + n;
267
+ if (l_res[j] < 0.)
268
+ {
269
+ /* L120: */
270
+ l_cu[jpn] = 1.;
271
+ l_iu[jpn] = 1;
272
+ if (q2[j * q_dim + n1].ival > 0)
273
+ {
274
+ iphase = 1;
275
+ }
276
+ }
277
+ else if (l_res[j] > 0.)
278
+ {
279
+ /* L130: */
280
+ l_cu[cu_dim + jpn] = 1.;
281
+ l_iu[cu_dim + jpn] = 1;
282
+ if (q2[j * q_dim + n1].ival < 0)
283
+ {
284
+ iphase = 1;
285
+ }
286
+ }
287
+ }
288
+ /* L140: */
289
+ }
290
+ /* L150: */
291
+ #ifdef DEBUG_CL1
292
+ output_msg(sformatf( "L150\n"));
293
+ #endif
294
+ if (iphase == 2)
295
+ {
296
+ goto L500;
297
+ }
298
+ /* COMPUTE THE MARGINAL COSTS. */
299
+ L160:
300
+ #ifdef DEBUG_CL1
301
+ output_msg(sformatf( "L160\n"));
302
+ #endif
303
+ for (j = js; j < n1; ++j)
304
+ {
305
+ sum = 0.;
306
+ for (i = 0; i < klm; ++i)
307
+ {
308
+ ii = q2[i * q_dim + n1].ival;
309
+ if (ii < 0)
310
+ {
311
+ l_z = l_cu[cu_dim - ii - 1];
312
+ }
313
+ else
314
+ {
315
+ l_z = l_cu[ii - 1];
316
+ }
317
+ sum += (long double) q2[i * q_dim + j].dval * (long double) l_z;
318
+ }
319
+ q2[klm * q_dim + j].dval = (double)sum;
320
+ }
321
+ for (j = js; j < n; ++j)
322
+ {
323
+ ii = q2[klm1 * q_dim + j].ival;
324
+ if (ii < 0)
325
+ {
326
+ l_z = l_cu[cu_dim - ii - 1];
327
+ }
328
+ else
329
+ {
330
+ l_z = l_cu[ii - 1];
331
+ }
332
+ q2[klm * q_dim + j].dval -= l_z;
333
+ }
334
+ /* DETERMINE THE VECTOR TO ENTER THE BASIS. */
335
+ L240:
336
+ #ifdef DEBUG_CL1
337
+ output_msg(sformatf( "L240, xmax %e\n", xmax));
338
+ #endif
339
+ xmax = 0.;
340
+ if (js >= n)
341
+ {
342
+ goto L490; /* test for optimality */
343
+ }
344
+ for (j = js; j < n; ++j)
345
+ {
346
+ zu = q2[klm * q_dim + j].dval;
347
+ ii = q2[klm1 * q_dim + j].ival;
348
+ if (ii > 0)
349
+ {
350
+ zv = -zu - l_cu[ii - 1] - l_cu[cu_dim + ii - 1];
351
+ }
352
+ else
353
+ {
354
+ ii = -ii;
355
+ zv = zu;
356
+ zu = -zu - l_cu[ii - 1] - l_cu[cu_dim + ii - 1];
357
+ }
358
+ /* L260 */
359
+ if (kforce == 1 && ii > n)
360
+ {
361
+ continue;
362
+ }
363
+ if (l_iu[ii - 1] != 1 && zu > xmax)
364
+ {
365
+ xmax = zu;
366
+ in = j;
367
+ }
368
+ /* L270 */
369
+ if (l_iu[cu_dim + ii - 1] != 1 && zv > xmax)
370
+ {
371
+ xmax = zv;
372
+ in = j;
373
+ }
374
+ }
375
+ /* L280 */
376
+ #ifdef DEBUG_CL1
377
+ output_msg(sformatf( "L280 xmax %e, toler %e\n", xmax, l_toler));
378
+ #endif
379
+ if (xmax <= l_toler)
380
+ {
381
+ #ifdef DEBUG_CL1
382
+ output_msg(sformatf( "xmax before optimality test %e\n", xmax));
383
+ #endif
384
+ goto L490; /* test for optimality */
385
+ }
386
+ if (q2[klm * q_dim + in].dval != xmax)
387
+ {
388
+ for (i = 0; i < klm1; ++i)
389
+ {
390
+ q2[i * q_dim + in].dval = -q2[i * q_dim + in].dval;
391
+ }
392
+ q2[klm1 * q_dim + in].ival = -q2[klm1 * q_dim + in].ival;
393
+ /* L290: */
394
+ q2[klm * q_dim + in].dval = xmax;
395
+ }
396
+ /* DETERMINE THE VECTOR TO LEAVE THE BASIS. */
397
+ if (iphase != 1 && ia != -1)
398
+ {
399
+ xmax = 0.;
400
+ /* find maximum absolute value in column "in" */
401
+ for (i = 0; i <= ia; ++i)
402
+ {
403
+ l_z = fabs(q2[i * q_dim + in].dval);
404
+ if (l_z > xmax)
405
+ {
406
+ xmax = l_z;
407
+ iout = i;
408
+ }
409
+ }
410
+ /* L310: */
411
+ #ifdef DEBUG_CL1
412
+ output_msg(sformatf( "L310, xmax %e\n", xmax));
413
+ #endif
414
+ /* switch row ia with row iout, use memcpy */
415
+ if (xmax > l_toler)
416
+ {
417
+ if (ia != iout)
418
+ {
419
+ memcpy((void *) &(scratch[0]), (void *) &(q2[ia * q_dim]),
420
+ (size_t) n2 * sizeof(LDBLE));
421
+ memcpy((void *) &(q2[ia * q_dim]), (void *) &(q2[iout * q_dim]),
422
+ (size_t) n2 * sizeof(LDBLE));
423
+ memcpy((void *) &(q2[iout * q_dim]), (void *) &(scratch[0]),
424
+ (size_t) n2 * sizeof(LDBLE));
425
+ }
426
+ /* L320: */
427
+ /* set pivot to row ia, column in */
428
+ iout = ia;
429
+ --ia;
430
+ pivot = q2[iout * q_dim + in].dval;
431
+ goto L420; /* Gauss Jordan */
432
+ }
433
+ }
434
+ /* L330: */
435
+ #ifdef DEBUG_CL1
436
+ output_msg(sformatf( "L330, xmax %e\n", xmax));
437
+ #endif
438
+ kk = -1;
439
+ /* divide column n1 by positive value in column "in" greater than toler */
440
+ for (i = 0; i < klm; ++i)
441
+ {
442
+ l_z = q2[i * q_dim + in].dval;
443
+ if (l_z > l_toler)
444
+ {
445
+ ++kk;
446
+ l_res[kk] = q2[i * q_dim + n].dval / l_z;
447
+ l_s[kk] = i;
448
+ }
449
+ }
450
+ /* L340: */
451
+ #ifdef DEBUG_CL1
452
+ if (kk < 0)
453
+ {
454
+ output_msg(sformatf( "kode = 2 in loop 340.\n"));
455
+ }
456
+ #endif
457
+ L350:
458
+ #ifdef DEBUG_CL1
459
+ output_msg(sformatf( "L350, xmax %e\n", xmax));
460
+ #endif
461
+ if (kk < 0)
462
+ {
463
+ /* no positive value found in L340 or bypass intermediate vertices */
464
+ *l_kode = 2;
465
+ goto L590;
466
+ }
467
+ /* L360: */
468
+ #ifdef DEBUG_CL1
469
+ output_msg(sformatf( "L360, xmax %e\n", xmax));
470
+ #endif
471
+ /* find minimum residual */
472
+ xmin = l_res[0];
473
+ iout = l_s[0];
474
+ j = 0;
475
+ if (kk != 0)
476
+ {
477
+ for (i = 1; i <= kk; ++i)
478
+ {
479
+ if (l_res[i] < xmin)
480
+ {
481
+ j = i;
482
+ xmin = l_res[i];
483
+ iout = l_s[i];
484
+ }
485
+ }
486
+ /* L370: */
487
+ /* put kk in position j */
488
+ l_res[j] = l_res[kk];
489
+ l_s[j] = l_s[kk];
490
+ }
491
+ /* L380: */
492
+ #ifdef DEBUG_CL1
493
+ output_msg(sformatf( "L380 iout %d, xmin %e, xmax %e\n", iout,
494
+ xmin, xmax));
495
+ #endif
496
+ --kk;
497
+ pivot = q2[iout * q_dim + in].dval;
498
+ ii = q2[iout * q_dim + n1].ival;
499
+ if (iphase != 1)
500
+ {
501
+ if (ii < 0)
502
+ {
503
+ /* L390: */
504
+ if (l_iu[-ii - 1] == 1)
505
+ {
506
+ goto L420;
507
+ }
508
+ }
509
+ else
510
+ {
511
+ if (l_iu[cu_dim + ii - 1] == 1)
512
+ {
513
+ goto L420;
514
+ }
515
+ }
516
+ }
517
+ /* L400: */
518
+ #ifdef DEBUG_CL1
519
+ output_msg(sformatf( "L400\n"));
520
+ #endif
521
+ ii = abs(ii);
522
+ cuv = l_cu[ii - 1] + l_cu[cu_dim + ii - 1];
523
+ if (q2[klm * q_dim + in].dval - pivot * cuv > l_toler)
524
+ {
525
+
526
+ /* BYPASS INTERMEDIATE VERTICES. */
527
+ for (j = js; j < n1; ++j)
528
+ {
529
+ l_z = q2[iout * q_dim + j].dval;
530
+ q2[klm * q_dim + j].dval -= l_z * cuv;
531
+ q2[iout * q_dim + j].dval = -l_z;
532
+ }
533
+ /* L410: */
534
+ q2[iout * q_dim + n1].ival = -q2[iout * q_dim + n1].ival;
535
+ goto L350;
536
+ }
537
+ /* GAUSS-JORDAN ELIMINATION. */
538
+ L420:
539
+ #ifdef DEBUG_CL1
540
+ output_msg(sformatf( "Gauss Jordon %d\n", *l_iter));
541
+ #endif
542
+ if (*l_iter >= maxit)
543
+ {
544
+ *l_kode = 3;
545
+ goto L590;
546
+ }
547
+ /* L430: */
548
+ #ifdef DEBUG_CL1
549
+ output_msg(sformatf( "L430\n"));
550
+ #endif
551
+ ++(*l_iter);
552
+ for (j = js; j < n1; ++j)
553
+ {
554
+ if (j != in)
555
+ {
556
+ q2[iout * q_dim + j].dval /= pivot;
557
+ }
558
+ }
559
+ /* L440: */
560
+ for (j = js; j < n1; ++j)
561
+ {
562
+ if (j != in)
563
+ {
564
+ l_z = -q2[iout * q_dim + j].dval;
565
+ for (i = 0; i < klm1; ++i)
566
+ {
567
+ if (i != iout)
568
+ {
569
+ q2[i * q_dim + j].dval += l_z * q2[i * q_dim + in].dval;
570
+ }
571
+ }
572
+ /* L450: */
573
+ }
574
+ }
575
+ /* L460: */
576
+ #ifdef DEBUG_CL1
577
+ output_msg(sformatf( "L460\n"));
578
+ #endif
579
+ tpivot = -pivot;
580
+ for (i = 0; i < klm1; ++i)
581
+ {
582
+ if (i != iout)
583
+ {
584
+ q2[i * q_dim + in].dval /= tpivot;
585
+ }
586
+ }
587
+ /* L470: */
588
+ q2[iout * q_dim + in].dval = 1. / pivot;
589
+ ii = q2[iout * q_dim + n1].ival;
590
+ q2[iout * q_dim + n1].ival = q2[klm1 * q_dim + in].ival;
591
+ q2[klm1 * q_dim + in].ival = ii;
592
+ ii = abs(ii);
593
+ if (l_iu[ii - 1] == 0 || l_iu[cu_dim + ii - 1] == 0)
594
+ {
595
+ goto L240;
596
+ }
597
+ /* switch column */
598
+ for (i = 0; i < klm1; ++i)
599
+ {
600
+ l_z = q2[i * q_dim + in].dval;
601
+ q2[i * q_dim + in].dval = q2[i * q_dim + js].dval;
602
+ q2[i * q_dim + js].dval = l_z;
603
+ }
604
+ i = q2[klm1 * q_dim + in].ival;
605
+ q2[klm1 * q_dim + in].ival = q2[klm1 * q_dim + js].ival;
606
+ q2[klm1 * q_dim + js].ival = i;
607
+ /* L480: */
608
+ ++js;
609
+ goto L240;
610
+ /* TEST FOR OPTIMALITY. */
611
+ L490:
612
+ #ifdef DEBUG_CL1
613
+ output_msg(sformatf( "L490\n"));
614
+ #endif
615
+ if (kforce == 0)
616
+ {
617
+ if (iphase == 1)
618
+ {
619
+ if (q2[klm * q_dim + n].dval <= l_toler)
620
+ {
621
+ goto L500;
622
+ }
623
+ #ifdef DEBUG_CL1
624
+ output_msg(sformatf( "q2[klm1-1, n1-1] > *toler. %e\n",
625
+ q2[(klm1 - 1) * q_dim + n1 - 1].dval));
626
+ #endif
627
+ *l_kode = 1;
628
+ goto L590;
629
+ }
630
+ *l_kode = 0;
631
+ goto L590;
632
+ }
633
+ if (iphase != 1 || q2[klm * q_dim + n].dval > l_toler)
634
+ {
635
+ kforce = 0;
636
+ goto L240;
637
+ }
638
+ /* SET UP PHASE 2 COSTS. */
639
+ L500:
640
+ #ifdef DEBUG_CL1
641
+ output_msg(sformatf( "Set up phase 2 costs %d\n", *l_iter));
642
+ #endif
643
+ iphase = 2;
644
+ for (j = 0; j < nklm; ++j)
645
+ {
646
+ l_cu[j] = 0.;
647
+ }
648
+ /* L510: */
649
+ for (j = n; j < nk; ++j)
650
+ {
651
+ l_cu[j] = 1.;
652
+ }
653
+ memcpy((void *) &(l_cu[cu_dim]), (void *) &(l_cu[0]),
654
+ (size_t) nklm * sizeof(LDBLE));
655
+ /* L520: */
656
+ for (i = 0; i < klm; ++i)
657
+ {
658
+ ii = q2[i * q_dim + n1].ival;
659
+ if (ii <= 0)
660
+ {
661
+ if (l_iu[cu_dim - ii - 1] == 0)
662
+ {
663
+ continue;
664
+ }
665
+ l_cu[cu_dim - ii - 1] = 0.;
666
+ }
667
+ else
668
+ {
669
+ /* L530: */
670
+ if (l_iu[ii - 1] == 0)
671
+ {
672
+ continue;
673
+ }
674
+ l_cu[ii - 1] = 0.;
675
+ }
676
+ /* L540: */
677
+ ++ia;
678
+ /* switch row */
679
+ if (ia != i)
680
+ {
681
+ memcpy((void *) &(scratch[0]), (void *) &(q2[ia * q_dim]),
682
+ (size_t) n2 * sizeof(LDBLE));
683
+ memcpy((void *) &(q2[ia * q_dim]), (void *) &(q2[i * q_dim]),
684
+ (size_t) n2 * sizeof(LDBLE));
685
+ memcpy((void *) &(q2[i * q_dim]), (void *) &(scratch[0]),
686
+ (size_t) n2 * sizeof(LDBLE));
687
+ }
688
+ /* L550: */
689
+ }
690
+ /* L560: */
691
+ goto L160;
692
+
693
+
694
+ /* PREPARE OUTPUT. */
695
+ L590:
696
+ #ifdef DEBUG_CL1
697
+ output_msg(sformatf( "L590\n"));
698
+ #endif
699
+ sum = 0.;
700
+ for (j = 0; j < n; ++j)
701
+ {
702
+ l_x[j] = 0.;
703
+ }
704
+ /* L600: */
705
+ for (i = 0; i < klm; ++i)
706
+ {
707
+ l_res[i] = 0.;
708
+ }
709
+ /* L610: */
710
+ for (i = 0; i < klm; ++i)
711
+ {
712
+ ii = q2[i * q_dim + n1].ival;
713
+ sn = 1.;
714
+ if (ii < 0)
715
+ {
716
+ ii = -ii;
717
+ sn = -1.;
718
+ }
719
+ if (ii <= n)
720
+ {
721
+ /* L620: */
722
+ l_x[ii - 1] = sn * q2[i * q_dim + n].dval;
723
+ }
724
+ else
725
+ {
726
+ /* L630: */
727
+ l_res[ii - n - 1] = sn * q2[i * q_dim + n].dval;
728
+ if (ii >= n1 && ii <= nk)
729
+ {
730
+ /* * DBLE(Q(I,N1)) */
731
+ sum += (long double) q2[i * q_dim + n].dval;
732
+ }
733
+ }
734
+ }
735
+ /* L640: */
736
+ #ifdef DEBUG_CL1
737
+ output_msg(sformatf( "L640\n"));
738
+ #endif
739
+ *l_error = (double)sum;
740
+ /*
741
+ * Check calculation
742
+ */
743
+ if ((check == 1) && (*l_kode == 0))
744
+ {
745
+ check_toler = 10. * l_toler;
746
+ /*
747
+ * Check optimization constraints
748
+ */
749
+ if (kode_arg == 1)
750
+ {
751
+ for (i = 0; i < k; ++i)
752
+ {
753
+ if (res_arg[i] < 0.0)
754
+ {
755
+ if (l_res[i] > check_toler)
756
+ {
757
+ #ifdef CHECK_ERRORS
758
+ output_msg(sformatf(
759
+ "\tCL1: optimization constraint not satisfied row %d, res %s, constraint %f.\n",
760
+ row_name[row_back[i]], l_res[i], res_arg[i]));
761
+ #endif
762
+ *l_kode = 1;
763
+ }
764
+ }
765
+ else if (res_arg[i] > 0.0)
766
+ {
767
+ if (l_res[i] < -check_toler)
768
+ {
769
+ #ifdef CHECK_ERRORS
770
+ output_msg(sformatf(
771
+ "\tCL1: optimization constraint not satisfied row %s, res %e, constraint %f.\n",
772
+ row_name[row_back[i]], l_res[i], res_arg[i]));
773
+ #endif
774
+ *l_kode = 1;
775
+ }
776
+ }
777
+ }
778
+ }
779
+ /*
780
+ * Check equalities
781
+ */
782
+ for (i = k; i < k + l; ++i)
783
+ {
784
+ if (fabs(l_res[i]) > check_toler)
785
+ {
786
+ #ifdef CHECK_ERRORS
787
+ output_msg(sformatf(
788
+ "\tCL1: equality constraint not satisfied row %s, res %e, tolerance %e.\n",
789
+ row_name[row_back[i]], l_res[i], check_toler));
790
+ #endif
791
+ *l_kode = 1;
792
+ }
793
+ }
794
+ /*
795
+ * Check inequalities
796
+ */
797
+ for (i = k + l; i < k + l + m; ++i)
798
+ {
799
+ if (l_res[i] < -check_toler)
800
+ {
801
+ #ifdef CHECK_ERRORS
802
+ output_msg(sformatf(
803
+ "\tCL1: inequality constraint not satisfied row %s, res %e, tolerance %e.\n",
804
+ row_name[row_back[i]], l_res[i], check_toler));
805
+ #endif
806
+ *l_kode = 1;
807
+ }
808
+ }
809
+ /*
810
+ * Check dissolution/precipitation constraints
811
+ */
812
+ if (kode_arg == 1)
813
+ {
814
+ for (i = 0; i < n; ++i)
815
+ {
816
+ if (x_arg[i] < 0.0)
817
+ {
818
+ if (l_x[i] > check_toler)
819
+ {
820
+ #ifdef CHECK_ERRORS
821
+ output_msg(sformatf(
822
+ "\tCL1: dis/pre constraint not satisfied column %s, x %e, constraint %f.\n",
823
+ col_name[col_back[i]], l_x[i], x_arg[i]));
824
+ #endif
825
+ *l_kode = 1;
826
+ }
827
+ }
828
+ else if (x_arg[i] > 0.0)
829
+ {
830
+ if (l_x[i] < -check_toler)
831
+ {
832
+ #ifdef CHECK_ERRORS
833
+ output_msg(sformatf(
834
+ "\tCL1: dis/pre constraint not satisfied column %s, x %e, constraint %f.\n",
835
+ col_name[col_back[i]], l_x[i], x_arg[i]));
836
+ #endif
837
+ *l_kode = 1;
838
+ }
839
+ }
840
+ }
841
+ }
842
+ if (*l_kode == 1)
843
+ {
844
+ output_msg(sformatf(
845
+ "\n\tCL1: Roundoff errors in optimization.\n\t Try using -multiple_precision in INVERSE_MODELING\n"));
846
+ }
847
+ }
848
+ return 0;
849
+ }
850
+
851
+ void Phreeqc::
852
+ cl1_space(int check, int l_n2d, int klm, int l_nklmd)
853
+ {
854
+ if (check == 1)
855
+ {
856
+ if ((size_t)l_n2d > x_arg.size())
857
+ {
858
+ x_arg.resize((size_t)l_n2d);
859
+ }
860
+ memset(&x_arg[0], 0, sizeof(double) * (size_t)l_n2d);
861
+
862
+ if ((size_t)klm > res_arg.size())
863
+ {
864
+ res_arg.resize((size_t)klm);
865
+ }
866
+ memset(&res_arg[0], 0, sizeof(double) * (size_t)klm);
867
+ }
868
+ if (l_nklmd > 0)
869
+ {
870
+ if ((size_t)l_nklmd > scratch.size())
871
+ {
872
+ scratch.resize(l_nklmd);
873
+ }
874
+ memset(&scratch[0], 0, sizeof(double) * (size_t)l_nklmd);
875
+ }
876
+ else if (scratch.size() == 0)
877
+ {
878
+ scratch.resize(1);
879
+ memset(&scratch[0], 0, sizeof(double));
880
+ }
881
+ }