pyEQL 1.4.0rc9__cp311-cp311-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-311-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,1382 @@
1
+ // ChartObject.cpp: implementation of the ChartObject class.
2
+ //
3
+ //////////////////////////////////////////////////////////////////////
4
+ #ifdef MULTICHART
5
+ #include "Phreeqc.h"
6
+ #ifdef _DEBUG
7
+ #pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
8
+ #endif
9
+ #include "Utils.h"
10
+ #include <iostream>
11
+ #include "ChartObject.h"
12
+ #include "Parser.h"
13
+ #include <fstream>
14
+ #include <cmath>
15
+ #include <iomanip>
16
+ #include "phqalloc.h"
17
+
18
+ #include "Form1.h"
19
+ using namespace zdg_ui2;
20
+
21
+ #if defined(PHREEQCI_GUI)
22
+ #ifdef _DEBUG
23
+ #define new DEBUG_NEW
24
+ #undef THIS_FILE
25
+ static char THIS_FILE[] = __FILE__;
26
+ #endif
27
+ #endif
28
+
29
+ //////////////////////////////////////////////////////////////////////
30
+ // Construction/Destruction
31
+ //////////////////////////////////////////////////////////////////////
32
+
33
+ ChartObject::ChartObject(PHRQ_io *io)
34
+ //
35
+ // default constructor for cxxExchComp
36
+ //
37
+ :
38
+ cxxNumKeyword(io)
39
+ {
40
+ new_ug = false;
41
+ FirstCallToUSER_GRAPH = true;
42
+
43
+ update_time_chart = 150;
44
+ PanelHeight = 510;
45
+ PanelWidth = 640;
46
+
47
+ Symbol_map["Square"] = 0;
48
+ Symbol_map["Diamond"] = 1;
49
+ Symbol_map["Triangle"] = 2;
50
+ Symbol_map["Circle"] = 3;
51
+ Symbol_map["XCross"] = 4;
52
+ Symbol_map["Plus"] = 5;
53
+ Symbol_map["Star"] = 6;
54
+ Symbol_map["TriangleDown"] = 7;
55
+ Symbol_map["HDash"] = 8;
56
+ Symbol_map["VDash"] = 9;
57
+ Symbol_map["None"] = 10;
58
+
59
+ Color_vector.push_back("Red");
60
+ Color_vector.push_back("Green");
61
+ Color_vector.push_back("Blue");
62
+ Color_vector.push_back("Orange");
63
+ Color_vector.push_back("Magenta");
64
+ // Color_vector.push_back("Yellow");
65
+ Color_vector.push_back("Black");
66
+ Color_vector.push_back("Cyan");
67
+ Color_vector.push_back("Brown");
68
+ Color_vector.push_back("Lime");
69
+ Color_vector.push_back("Gray");
70
+
71
+ chart_title.clear();
72
+ axis_titles.clear();
73
+
74
+ int i;
75
+ for (i = 0; i < 5; i++)
76
+ {
77
+ axis_scale_x[i] = NA;
78
+ axis_scale_y[i] = NA;
79
+ axis_scale_y2[i] = NA;
80
+ }
81
+
82
+ chart_type = 0;
83
+ graph_initial_solutions = false;
84
+ shifts_as_points = false;
85
+ connect_simulations = true;
86
+ colnr = 0;
87
+ ColumnOffset = 0;
88
+ prev_advection_step = 0;
89
+ prev_transport_step = 0;
90
+ prev_sim_no = 0;
91
+ end_timer = false;
92
+ done = false;
93
+
94
+ curve_added = false;
95
+ point_added = false;
96
+
97
+ user_graph = new rate;
98
+ user_graph->commands.clear();
99
+ user_graph->name = NULL;
100
+ user_graph->new_def = 0;
101
+ user_graph->linebase = user_graph->loopbase = user_graph->varbase = NULL;
102
+
103
+ default_symbol = 0;
104
+ default_symbol_csv = 0;
105
+ default_color = 0;
106
+ default_color_csv = 0;
107
+
108
+ graph_x = NA;
109
+ graph_y.clear();
110
+ secondary_y.clear();
111
+
112
+ usingResource = 0;
113
+ form_started = false;
114
+ active = true;
115
+ detach = false;
116
+
117
+ batch_background = true;
118
+ batch_grid = true;
119
+ batch = ChO_NO_BATCH;
120
+ }
121
+
122
+ ChartObject::~ChartObject()
123
+ {
124
+ while (0 != System::Threading::Interlocked::CompareExchange(this->usingResource, 7, 0))
125
+ {
126
+ System::Threading::Thread::Sleep(5);
127
+ }
128
+ this->Rate_free();
129
+ delete this->user_graph;
130
+
131
+ std::vector<CurveObject *>::iterator it;
132
+ for (it = this->CurvesCSV.begin(); it != CurvesCSV.end(); it++)
133
+ {
134
+ delete *it;
135
+ }
136
+
137
+ for (it = this->Curves.begin(); it != Curves.end(); it++)
138
+ {
139
+ delete *it;
140
+ }
141
+ }
142
+
143
+ bool
144
+ ChartObject::Set_axis_scale(CParser & parser)
145
+ {
146
+ std::istream::pos_type ptr;
147
+ std::istream::pos_type next_char;
148
+ std::string token;
149
+ LDBLE *scale_ptr = NULL;
150
+ std::vector<std::string> string_vector;
151
+ size_t j = 0;
152
+
153
+ // rereads option
154
+ parser.copy_token(token, next_char);
155
+
156
+ // reads parameters
157
+ while ((j < 6) && (parser.copy_token(token, next_char)) != CParser::TT_EMPTY)
158
+ {
159
+ string_vector.push_back(token);
160
+ j++;
161
+ }
162
+ if (string_vector.size() == 0)
163
+ {
164
+ error_msg("No axis defined for scales", PHRQ_io::OT_CONTINUE);
165
+ return false;
166
+ }
167
+ std::string str = string_vector[0];
168
+ std::string type;
169
+ Utilities::str_tolower(str);
170
+ if (str.substr(0,2) == "y2" || str.substr(0,1) == "s")
171
+ {
172
+ type = "sy";
173
+ scale_ptr = this->axis_scale_y2;
174
+ }
175
+ else if (str.substr(0,1) == "y")
176
+ {
177
+ type = "y";
178
+ scale_ptr = this->axis_scale_y;
179
+ }
180
+ else if (str.substr(0,1) == "x")
181
+ {
182
+ type = "x";
183
+ scale_ptr = this->axis_scale_x;
184
+ }
185
+ else
186
+ {
187
+ std::ostringstream estream;
188
+ estream << "Found " << str;
189
+ estream << ", but expect axis type \'x\', \'y\', \'y2\'or \'sy\'.";
190
+ estream << "\n";
191
+ error_msg(estream.str().c_str(), PHRQ_io::OT_CONTINUE);
192
+ return false;
193
+ }
194
+
195
+ for (j = 1; j < string_vector.size() && j < 5; j++)
196
+ {
197
+ std::string s = string_vector[j];
198
+ if (s[0] == 'a' || s[0] == 'A')
199
+ {
200
+ scale_ptr[j - 1] = NA;
201
+ }
202
+ else if (CParser::token_type(s) == CParser::TT_DIGIT)
203
+ {
204
+ scale_ptr[j - 1] = atof(s.c_str());
205
+ }
206
+ else
207
+ {
208
+ std::ostringstream estream;
209
+ estream << "Found " << s;
210
+ estream << ", but expect number or 'a(uto)'.";
211
+ estream << "\n";
212
+ error_msg(estream.str().c_str(), CONTINUE);
213
+ return false;
214
+ }
215
+ }
216
+ if (string_vector.size() == 6)
217
+ {
218
+ std::string s = string_vector[5];
219
+ if (s[0] == 't' || s[0] == 'T' || s[0] == 'l' || s[0] == 'L')
220
+ {
221
+ scale_ptr[4] = 10.0;
222
+ if (((fabs(scale_ptr[0] - NA) > 1e-3) && scale_ptr[0] <=0) ||
223
+ ((fabs(scale_ptr[1] - NA) > 1e-3) && scale_ptr[1] <=0))
224
+ {
225
+ std::ostringstream estream;
226
+ estream << "MIN and MAX must be > 0 for log " << type << "-scale.";
227
+ estream << "\n";
228
+ error_msg(estream.str().c_str(), CONTINUE);
229
+ return false;
230
+ }
231
+
232
+ }
233
+ }
234
+ if ((fabs(scale_ptr[0] - NA) > 1e-3) && (fabs(scale_ptr[1] - NA) > 1e-3))
235
+ {
236
+ if (scale_ptr[0] > scale_ptr[1])
237
+ {
238
+ std::ostringstream estream;
239
+ estream << "Maximum must be larger than minimum of axis_scale " << type << "-scale." << "\n";
240
+ estream << "Switching values for MIN and MAX. " << "\n";
241
+ warning_msg(estream.str().c_str());
242
+ LDBLE t;
243
+ t = scale_ptr[0];
244
+ scale_ptr[0] = scale_ptr[1];
245
+ scale_ptr[1] = scale_ptr[0];
246
+ return false;
247
+ }
248
+ }
249
+ return true;
250
+ }
251
+
252
+ bool
253
+ ChartObject::Read(CParser & parser)
254
+ {
255
+
256
+ std::istream::pos_type ptr;
257
+ std::istream::pos_type next_char;
258
+ std::string token;
259
+ int opt_save;
260
+ bool useLastLine(false);
261
+ bool new_command_lines(false);
262
+ // if no definitions in USER_GRAPH data block, deactivate plot
263
+ bool no_def(true);
264
+ if (this->FirstCallToUSER_GRAPH)
265
+ {
266
+ this->new_ug = true;
267
+ }
268
+ else
269
+ {
270
+ this->ColumnOffset = (int) this->Curves.size();
271
+ this->new_ug = true;
272
+ }
273
+ this->new_plotxy_curves.clear();
274
+
275
+ // Read number and description
276
+ {
277
+ this->read_number_description(parser);
278
+ }
279
+
280
+ opt_save = CParser::OPT_DEFAULT;
281
+
282
+ for (;;)
283
+ {
284
+ int opt;
285
+ if (useLastLine == false)
286
+ {
287
+ opt = parser.get_option(vopts, next_char);
288
+ }
289
+ else
290
+ {
291
+ opt = parser.getOptionFromLastLine(vopts, next_char, true);
292
+ }
293
+ if (opt == CParser::OPT_DEFAULT)
294
+ {
295
+ opt = opt_save;
296
+ }
297
+ switch (opt)
298
+ {
299
+ case CParser::OPT_EOF:
300
+ break;
301
+ case CParser::OPT_KEYWORD:
302
+ break;
303
+ case CParser::OPT_ERROR:
304
+ opt = CParser::OPT_EOF;
305
+ error_msg("Unknown input in USER_GRAPH keyword.", CONTINUE);
306
+ error_msg(parser.line().c_str(), CONTINUE);
307
+ useLastLine = false;
308
+ break;
309
+ case 0: /* start */
310
+ opt_save = CParser::OPT_DEFAULT;
311
+ break;
312
+ case 1: /* end */
313
+ opt_save = CParser::OPT_DEFAULT;
314
+ break;
315
+ case 2: /* headings */
316
+ case 3: /* heading */
317
+ this->new_headings.clear();
318
+ while (parser.copy_token(token, next_char) != CParser::TT_EMPTY)
319
+ {
320
+ this->new_headings.push_back(token);
321
+ }
322
+ this->headings_original = this->new_headings;
323
+ break;
324
+ case 4: /* chart title */
325
+ {
326
+ std::string tok;
327
+ parser.get_rest_of_line(tok);
328
+ std::string::iterator b = tok.begin();
329
+ std::string::iterator e = tok.end();
330
+ CParser::copy_title(this->chart_title, b, e);
331
+ }
332
+ break;
333
+ case 5: /* axis titles */
334
+ {
335
+ this->axis_titles.clear();
336
+ std::string l;
337
+ parser.get_rest_of_line(l);
338
+ std::string tok;
339
+ std::string::iterator b = l.begin();
340
+ std::string::iterator e = l.end();
341
+ this->axis_titles.clear();
342
+ while(parser.copy_title(tok, b, e) != CParser::TT_EMPTY)
343
+ {
344
+ this->axis_titles.push_back(tok);
345
+ }
346
+ }
347
+ while (this->axis_titles.size() < 3) this->axis_titles.push_back("");
348
+ break;
349
+ case 6: /* axis scales */
350
+ {
351
+ this->Set_axis_scale(parser);
352
+ }
353
+ break;
354
+ case 7: /* initial_solutions */
355
+ this->graph_initial_solutions = parser.get_true_false(next_char, FALSE);
356
+ break;
357
+ case 8: /* plot_concentration_vs */
358
+ parser.copy_token(token, next_char);
359
+ Utilities::str_tolower(token);
360
+ if (token[0] == 'x' || token[0] == 'd')
361
+ chart_type = 0;
362
+ else if (token[0] == 't')
363
+ chart_type = 1;
364
+ else
365
+ {
366
+ std::ostringstream estream;
367
+ estream << "Found " << token << ", but expect plot type: (\'x\' or \'dist\') for distance, (\'t\') for time.";
368
+ error_msg(estream.str().c_str(), CONTINUE);
369
+ }
370
+ break;
371
+ case 9: /* shifts_as_points */
372
+ this->shifts_as_points = parser.get_true_false(next_char, true);
373
+ if (this->shifts_as_points)
374
+ this->chart_type = 0;
375
+ else
376
+ this->chart_type = 1;
377
+ break;
378
+ case 10: /* grid_offset */
379
+ break;
380
+ case 11: /* connect_simulations */
381
+ this->connect_simulations = parser.get_true_false(next_char, true);
382
+ break;
383
+ case 12: /* plot_csv_file */
384
+ case 17: /* plot_tsv_file */
385
+ {
386
+ std::string file_name;
387
+ parser.get_rest_of_line(file_name);
388
+ file_name = trim(file_name);
389
+ this->OpenCSVFile(file_name);
390
+ this->csv_file_names.push_back(file_name);
391
+ }
392
+ break;
393
+ case 13: /* clear */
394
+ case 14: /* detach */
395
+ this->detach = true;
396
+ break;
397
+ /* End of modifications */
398
+ case 15: /* active */
399
+ this->active = parser.get_true_false(next_char, true);
400
+ if (this->active && this->Get_connect_simulations())
401
+ {
402
+ this->ColumnOffset = 0;//this->Curves.size();
403
+ this->new_ug = false;
404
+ }
405
+ break;
406
+ /* End of modifications */
407
+ case 16: /* batch */
408
+ {
409
+ this->batch = ChartObject::ChO_BATCH_ONLY;
410
+ std::string rest_of_line, lc_rest_of_line;
411
+ parser.get_rest_of_line(rest_of_line);
412
+ lc_rest_of_line = rest_of_line;
413
+ Utilities::str_tolower(lc_rest_of_line);
414
+
415
+ std::vector<std::string> file_types;
416
+ file_types.push_back(".emf");
417
+ file_types.push_back(".png");
418
+ file_types.push_back(".jpg");
419
+ file_types.push_back(".gif");
420
+ file_types.push_back(".tiff");
421
+ file_types.push_back(".bmp");
422
+ file_types.push_back(".jpeg");
423
+
424
+ size_t first, last;
425
+ size_t i;
426
+ for (i = 0; i < file_types.size(); i++)
427
+ {
428
+ first = lc_rest_of_line.rfind(file_types[i].c_str());
429
+ if (first != std::string::npos)
430
+ {
431
+ break;
432
+ }
433
+ }
434
+ if (i >= file_types.size())
435
+ {
436
+ std::ostringstream estream;
437
+ estream << "Batch file name must have suffix emf, png, jpg, jpeg, gif, tiff, or bmp.";
438
+ error_msg(estream.str().c_str(), CONTINUE);
439
+ break;
440
+ }
441
+ switch (i)
442
+ {
443
+ case 0:
444
+ this->batch = ChartObject::ChO_EMF;
445
+ last = first + 4;
446
+ break;
447
+ case 1:
448
+ this->batch = ChartObject::ChO_PNG;
449
+ last = first + 4;
450
+ break;
451
+ case 2:
452
+ this->batch = ChartObject::ChO_JPG;
453
+ last = first + 4;
454
+ break;
455
+ case 3:
456
+ this->batch = ChartObject::ChO_GIF;
457
+ last = first + 4;
458
+ break;
459
+ case 4:
460
+ this->batch = ChartObject::ChO_TIFF;
461
+ last = first + 5;
462
+ break;
463
+ case 5:
464
+ this->batch = ChartObject::ChO_BMP;
465
+ last = first + 4;
466
+ break;
467
+ case 6:
468
+ this->batch = ChartObject::ChO_JPG;
469
+ last = first + 5;
470
+ break;
471
+ }
472
+
473
+ this->batch_fn = rest_of_line.substr(0, last);
474
+ if (last+1 < rest_of_line.size())
475
+ {
476
+ token = rest_of_line.substr(last);
477
+ token = trim(token);
478
+ std::string tf;
479
+ std::string::iterator b = token.begin();
480
+ std::string::iterator e = token.end();
481
+
482
+ CParser::copy_token(tf, b, e);
483
+ if (tf.size() > 0)
484
+ {
485
+ Utilities::str_tolower(tf);
486
+ if (tf[0] == 'f')
487
+ {
488
+ this->batch_background = false;
489
+ }
490
+ }
491
+ CParser::copy_token(tf, b, e);
492
+ if (tf.size() > 0)
493
+ {
494
+ Utilities::str_tolower(tf);
495
+ if (tf[0] == 'f')
496
+ {
497
+ this->batch_grid = false;
498
+ }
499
+ }
500
+ }
501
+ }
502
+ break;
503
+ case CParser::OPT_DEFAULT: // Read Basic commands
504
+ {
505
+ if (!new_command_lines)
506
+ {
507
+ this->rate_command_list.clear();
508
+ this->rate_command_list_original.clear();
509
+ new_command_lines = true;
510
+ }
511
+ this->rate_new_def = true;
512
+ /* read command */
513
+ std::string cmd(parser.line());
514
+ this->rate_command_list_original.push_back(cmd);
515
+ std::string cmd_lower = cmd;
516
+ Utilities::str_tolower(cmd_lower);
517
+ if ((cmd_lower.find("graph_y") != std::string::npos) ||
518
+ (cmd_lower.find("graph_sy") != std::string::npos))
519
+ {
520
+ //Number of curves not known here
521
+ //Curves are created in Basic cmds
522
+ }
523
+ if (cmd_lower.find("plot_xy") != std::string::npos)
524
+ {
525
+ //Curves are created in Basic cmds
526
+ CurveObject new_curve = ExtractCurveInfo(cmd); // truncates cmd
527
+ // Add to list of new plotxy curves
528
+ this->new_plotxy_curves.push_back(new_curve);
529
+ }
530
+ this->rate_command_list.push_back(cmd);
531
+ }
532
+ opt_save = CParser::OPT_DEFAULT;
533
+ break;
534
+ }
535
+ if (opt == CParser::OPT_EOF || opt == CParser::OPT_KEYWORD)
536
+ break;
537
+ no_def = false;
538
+ }
539
+
540
+ // install new plotxy commands
541
+ // disable this user_graph if USER_GRAPH block is empty
542
+ //if (new_command_lines || no_def) this->Set_rate_struct();
543
+ if (new_command_lines) this->Set_rate_struct();
544
+ if (no_def) this->Set_active(false);
545
+ return true;
546
+ }
547
+ bool
548
+ ChartObject::OpenCSVFile(std::string file_name)
549
+ {
550
+ std::string token;
551
+
552
+ std::ifstream f_csv(file_name.c_str(), std::ifstream::in);
553
+
554
+ if (!f_csv.is_open())
555
+ {
556
+ std::ostringstream estream;
557
+ estream << "Could not open tsv file for USER_GRAPH " << file_name << "\n Please, give the full path + filename.";
558
+ error_msg(estream.str().c_str(), CONTINUE);
559
+ return false;
560
+ }
561
+
562
+ CParser parser(f_csv, this->Get_io());
563
+ parser.set_echo_file(CParser::EO_NONE);
564
+
565
+ /* Get lines */
566
+ int linenr = 0;
567
+
568
+ // temporary storage for new CSV curves
569
+ std::vector<std::string> headings;
570
+ std::vector<CurveObject *> csv_curves;
571
+
572
+ // Read file line by line into temporary curves
573
+ while (parser.check_line("cvs file", false, true, true, false) != PHRQ_io::LT_EOF)
574
+ {
575
+ // Headings line
576
+ if (linenr == 0)
577
+ {
578
+ // Skip x in 1st column
579
+ parser.get_iss() >> token;
580
+
581
+ // Read rest of headings
582
+ while (parser.get_iss() >> token)
583
+ {
584
+ headings.push_back(token);
585
+ }
586
+ // add curves to temporary csv_curves
587
+ size_t i;
588
+ for (i = 0; i < headings.size(); i++)
589
+ {
590
+ CurveObject *c = new CurveObject;
591
+ c->Set_id(headings[i]);
592
+ c->Set_line_w(0);
593
+ std::string sym = "";
594
+ this->Get_legal_symbol_csv(sym);
595
+ c->Set_symbol(sym);
596
+ csv_curves.push_back(c);
597
+ }
598
+
599
+ linenr++;
600
+ continue;
601
+ }
602
+
603
+ token = parser.line();
604
+ std::string tok1;
605
+ CParser::TOKEN_TYPE tt = CParser::parse_delimited(token, tok1, "\t");
606
+
607
+ // Curve properties lines
608
+ if (linenr < 6 && tt != CParser::TT_DIGIT)
609
+ {
610
+ Utilities::str_tolower(tok1);
611
+ std::string tok2;
612
+ size_t i=0;
613
+ while (token.size() != 0 && i < csv_curves.size())
614
+ {
615
+ CParser::parse_delimited(token, tok2, "\t");
616
+ tok2 = trim(tok2);
617
+ if (!strncmp(tok1.c_str(), "color", 5))
618
+ {
619
+ csv_curves[i]->Set_color(tok2);
620
+ }
621
+ else if (!strncmp(tok1.c_str(), "symbol", 5) && (strstr(tok1.c_str(), "_si") == NULL)
622
+ && (strstr(tok1.c_str(), "-si") == NULL))
623
+ {
624
+ csv_curves[i]->Set_symbol(tok2);
625
+ }
626
+ else if (!strncmp(tok1.c_str(), "symbol_size", 8) || !strncmp(tok1.c_str(), "symbol-size", 8))
627
+ {
628
+ if (tok2.size() > 0)
629
+ {
630
+ csv_curves[i]->Set_symbol_size(atof(tok2.c_str()));
631
+ }
632
+ }
633
+ else if (!strncmp(tok1.c_str(), "line_w", 5) || !strncmp(tok1.c_str(), "line-w", 5))
634
+ {
635
+ csv_curves[i]->Set_line_w(atof(tok2.c_str()));
636
+ }
637
+ else if (!strncmp(tok1.c_str(), "y_axis", 5) || !strncmp(tok1.c_str(), "y-axis", 5))
638
+ {
639
+ if (tok2.size() > 0)
640
+ {
641
+ csv_curves[i]->Set_y_axis(atoi(tok2.c_str()));
642
+ }
643
+ }
644
+ i++;
645
+ }
646
+ linenr++;
647
+ continue;
648
+ }
649
+
650
+ // Curve data
651
+ if (linenr < 6) linenr = 6;
652
+ if (tt != CParser::TT_DIGIT)
653
+ {
654
+ linenr++;
655
+ continue;
656
+ }
657
+
658
+ // x value for all curves
659
+ LDBLE x_value = atof(tok1.c_str());
660
+
661
+ // y values for curves
662
+ std::string tok2;
663
+ size_t i=0;
664
+ while (token.size() != 0 && i < csv_curves.size())
665
+ {
666
+ CParser::parse_delimited(token, tok2, "\t");
667
+ Utilities::squeeze_white(tok2);
668
+ if (tok2.size() == 0)
669
+ {
670
+ //csv_curves[i].Get_x().push_back(NA);
671
+ //csv_curves[i].Get_y().push_back(NA);
672
+ }
673
+ else
674
+ {
675
+ csv_curves[i]->Get_x().push_back(x_value);
676
+ csv_curves[i]->Get_y().push_back(atof(tok2.c_str()));
677
+ }
678
+ i++;
679
+ }
680
+ linenr++;
681
+ }
682
+
683
+ // Append new curves
684
+
685
+ std::vector<CurveObject *>::iterator it = csv_curves.begin();
686
+ for (; it != csv_curves.end(); it++)
687
+ {
688
+ if ((*it)->Get_x().size() > 0)
689
+ {
690
+ std::string col = (*it)->Get_color();
691
+ this->Get_color_string_csv(col);
692
+ (*it)->Set_color(col);
693
+ this->CurvesCSV.push_back(*it);
694
+ this->Set_curve_added(true);
695
+ }
696
+ }
697
+ return true;
698
+ }
699
+
700
+ CurveObject
701
+ ChartObject::ExtractCurveInfo(std::string & cmd_line)
702
+ {
703
+ /* plot_xy x, tot("Cl"), color = Red, symbol = Circle, symbol_size = 0.0, line_w = 1.0, y_axis = 2 */
704
+
705
+ // Make copy of cmd_line
706
+ //int curvenr = (int) this->Curves.size();
707
+ std::string str_line = cmd_line;
708
+
709
+ // Massage line
710
+ while (Utilities::replace(" ,",",",str_line));
711
+ while (Utilities::replace("\t,",",",str_line));
712
+ while (Utilities::replace(",","#",str_line));
713
+ while (Utilities::replace("#",", ", str_line));
714
+
715
+ int sel;
716
+ std::string token, tok1, tok2;
717
+ std::string revised_line;
718
+ std::string::iterator b = str_line.begin();
719
+ std::string::iterator e = str_line.end();
720
+ // new curve
721
+ CurveObject new_curve;
722
+
723
+ while (CParser::copy_token(token, b, e) != CParser::TT_EMPTY)
724
+ {
725
+ sel = -1;
726
+ std::string token_save = token;
727
+ Utilities::str_tolower(token);
728
+ tok1 = token;
729
+ if (!strncmp(tok1.c_str(), "color", 5))
730
+ {
731
+ sel = 0;
732
+ }
733
+ else if (!strncmp(tok1.c_str(), "symbol", 5) && (strstr(tok1.c_str(), "_si") == NULL)
734
+ && (strstr(tok1.c_str(), "-si") == NULL))
735
+ {
736
+ sel = 1;
737
+ }
738
+ else if (!strncmp(tok1.c_str(), "symbol_size", 8) || !strncmp(tok1.c_str(), "symbol-size", 8))
739
+ {
740
+ sel = 2;
741
+ }
742
+ else if (!strncmp(tok1.c_str(), "line_w", 5) || !strncmp(tok1.c_str(), "line-w", 5))
743
+ {
744
+ sel = 3;
745
+ }
746
+ else if (!strncmp(tok1.c_str(), "y_axis", 5) || !strncmp(tok1.c_str(), "y-axis", 5))
747
+ {
748
+ sel = 4;
749
+ }
750
+
751
+ // Append to command line
752
+ if (sel < 0)
753
+ {
754
+ revised_line.append(token_save);
755
+ revised_line.append(" ");
756
+ }
757
+ // Parse plot_xy pair
758
+ else
759
+ {
760
+ // remove preceding comma
761
+ std::string comma = revised_line.substr(revised_line.size() - 2);
762
+ if (comma == ", ")
763
+ {
764
+ revised_line = revised_line.substr(0, revised_line.size() - 2);
765
+ revised_line.append(" ");
766
+ }
767
+
768
+ token = token_save;
769
+ size_t p1 = token.find("=");
770
+ std::string tok2;
771
+ // "=" found
772
+ if(p1 != std::string::npos)
773
+ {
774
+ if (p1 != token.size() - 1)
775
+ {
776
+ // color=Red
777
+ tok2 = token.substr(p1 + 1);
778
+ }
779
+ else
780
+ {
781
+ // color= Red
782
+ CParser::copy_token(tok2, b, e);
783
+ }
784
+ }
785
+ else
786
+ {
787
+ // no "=" found
788
+ CParser::copy_token(tok2, b, e);
789
+ p1 = tok2.find("=");
790
+ if (tok2 == "=")
791
+ {
792
+ // color = Red
793
+ CParser::copy_token(tok2, b, e);
794
+ }
795
+ else if (p1 != std::string::npos)
796
+ {
797
+ // color =Red
798
+ tok2 = tok2.substr(p1 + 1);
799
+ }
800
+ else
801
+ {
802
+ // color Red
803
+ tok2 = tok2;
804
+ }
805
+ }
806
+ // remove any commas
807
+ while(Utilities::replace(",","",tok1));
808
+ while(Utilities::replace(",","",tok2));
809
+
810
+ // tok1 is name, tok2 is value
811
+
812
+ switch (sel)
813
+ {
814
+ case 0:
815
+ new_curve.Set_color(tok2);
816
+ break;
817
+ case 1:
818
+ new_curve.Set_symbol(tok2);
819
+ break;
820
+ case 2:
821
+ new_curve.Set_symbol_size(atof(tok2.c_str()));
822
+ break;
823
+ case 3:
824
+ new_curve.Set_line_w(atof(tok2.c_str()));
825
+ break;
826
+ case 4:
827
+ new_curve.Set_y_axis(atoi(tok2.c_str()));
828
+ break;
829
+ }
830
+ }
831
+ }
832
+
833
+ cmd_line = revised_line;
834
+ return new_curve;
835
+ }
836
+ void
837
+ ChartObject::Set_rate_struct(void)
838
+ {
839
+
840
+ if (rate_command_list.size() == 0) return;
841
+ std::list<std::string>::iterator it = rate_command_list.begin();
842
+ std::ostringstream oss;
843
+ for (; it != rate_command_list.end(); it++)
844
+ {
845
+ oss << *it << "\n";
846
+ }
847
+ this->Rate_free();
848
+ this->user_graph->commands = oss.str().c_str();
849
+ this->user_graph->new_def = this->rate_new_def;
850
+ this->user_graph->loopbase = NULL;
851
+ this->user_graph->varbase = NULL;
852
+ this->user_graph->linebase = NULL;
853
+ this->user_graph->name = NULL;
854
+ }
855
+ void
856
+ ChartObject::Get_legal_symbol(std::string &sym)
857
+ {
858
+ std::map<std::string, int>::iterator it;
859
+ if ((it = this->Symbol_map.find(sym)) == this->Symbol_map.end())
860
+ {
861
+ sym = "Default";
862
+ for (it = this->Symbol_map.begin(); it != this->Symbol_map.end(); it++)
863
+ {
864
+ if (default_symbol == it->second)
865
+ {
866
+ sym = it->first;
867
+ break;
868
+ }
869
+ }
870
+ default_symbol++;
871
+ default_symbol = default_symbol % this->Symbol_map.size();
872
+ }
873
+ return;
874
+ }
875
+ void
876
+ ChartObject::Get_legal_symbol_csv(std::string &sym)
877
+ {
878
+ std::map<std::string, int>::iterator it;
879
+ if ((it = this->Symbol_map.find(sym)) == this->Symbol_map.end())
880
+ {
881
+ sym = "Default";
882
+ for (it = this->Symbol_map.begin(); it != this->Symbol_map.end(); it++)
883
+ {
884
+ if (this->default_symbol_csv == it->second)
885
+ {
886
+ sym = it->first;
887
+ break;
888
+ }
889
+ }
890
+ default_symbol_csv++;
891
+ default_symbol_csv = default_symbol_csv % this->Symbol_map.size();
892
+ }
893
+ return;
894
+ }
895
+ void
896
+ ChartObject::Get_color_string(std::string &color)
897
+ {
898
+ if (color.size() == 0)
899
+ {
900
+ color = Color_vector[this->default_color];
901
+ default_color++;
902
+ default_color = default_color % this->Color_vector.size();
903
+ }
904
+ return;
905
+ }
906
+ void
907
+ ChartObject::Get_color_string_csv(std::string &color)
908
+ {
909
+ if (color.size() == 0)
910
+ {
911
+ color = Color_vector[this->default_color_csv];
912
+ default_color_csv++;
913
+ default_color_csv = default_color_csv % this->Color_vector.size();
914
+ }
915
+ return;
916
+ }
917
+ ZedGraph::SymbolType
918
+ ChartObject::Return_SymbolType(const std::string sym)
919
+ {
920
+ int i;
921
+ std::map<std::string, int>::iterator it;
922
+ if ((it = this->Symbol_map.find(sym)) != this->Symbol_map.end())
923
+ {
924
+ i = it->second;
925
+ }
926
+ else
927
+ {
928
+ i = default_symbol++;
929
+ default_symbol = default_symbol % this->Symbol_map.size();
930
+ }
931
+
932
+ switch (i)
933
+ {
934
+ case 0:
935
+ return SymbolType::Square;
936
+ break;
937
+ case 1:
938
+ return SymbolType::Diamond;
939
+ break;
940
+ case 2:
941
+ return SymbolType::Triangle;
942
+ break;
943
+ case 3:
944
+ return SymbolType::Circle;
945
+ break;
946
+ case 4:
947
+ return SymbolType::XCross;
948
+ break;
949
+ case 5:
950
+ return SymbolType::Plus;
951
+ break;
952
+ case 6:
953
+ return SymbolType::Star;
954
+ break;
955
+ case 7:
956
+ return SymbolType::TriangleDown;
957
+ break;
958
+ case 8:
959
+ return SymbolType::HDash;
960
+ break;
961
+ case 9:
962
+ return SymbolType::VDash;
963
+ break;
964
+ case 10:
965
+ return SymbolType::None;
966
+ break;
967
+ default:
968
+ return SymbolType::Default;
969
+ break;
970
+ }
971
+ }
972
+ void
973
+ ChartObject::SaveCurvesToFile(std::string &file_name)
974
+ {
975
+ // reimplemented in Form
976
+ // This version not currently used
977
+ std::ofstream f_out(file_name.c_str(), std::ifstream::out);
978
+
979
+ if (!f_out.is_open())
980
+ {
981
+ std::ostringstream estream;
982
+ estream << "Could not open csv file for USER_GRAPH " << file_name;
983
+ error_msg(estream.str().c_str(), CONTINUE);
984
+ return;
985
+ }
986
+
987
+ // list of curves
988
+ std::vector<CurveObject *> all_curves;
989
+ size_t i;
990
+ for (i = 0; i < this->CurvesCSV.size(); i++)
991
+ {
992
+ all_curves.push_back(this->CurvesCSV[i]);
993
+ }
994
+ for (i = 0; i < this->Curves.size(); i++)
995
+ {
996
+ all_curves.push_back(Curves[i]);
997
+ }
998
+ // write headings
999
+ size_t max_points = 0;
1000
+ std::vector<CurveObject *>::iterator it = all_curves.begin();
1001
+ f_out.precision(4);
1002
+ i = 0;
1003
+ for ( ; it != all_curves.end(); it++)
1004
+ {
1005
+ f_out.width(12);
1006
+ f_out << "x" << "\t";
1007
+ f_out.width(12);
1008
+ if ((*it)->Get_id().size() > 0)
1009
+ {
1010
+ f_out << (*it)->Get_id() << "\t";
1011
+ }
1012
+ else
1013
+ {
1014
+ f_out << "y" << "\t";;
1015
+ }
1016
+ if ((*it)->Get_x().size() > max_points)
1017
+ max_points = (*it)->Get_x().size();
1018
+ }
1019
+ f_out << "\n";
1020
+
1021
+ // write data
1022
+ size_t i2 = 0;
1023
+ f_out << std::scientific;
1024
+ f_out.precision(4);
1025
+ while (i2 < max_points)
1026
+ {
1027
+ for (it = all_curves.begin(); it != all_curves.end(); it++)
1028
+ {
1029
+ if (i2 < (*it)->Get_x().size())
1030
+ {
1031
+ f_out.width(12);
1032
+ f_out << (*it)->Get_x()[i2] << "\t";
1033
+ f_out.width(12);
1034
+ f_out << (*it)->Get_y()[i2] << "\t";
1035
+ }
1036
+ else if (i2 < max_points)
1037
+ {
1038
+ f_out.width(13);
1039
+ f_out << "\t";
1040
+ f_out.width(13);
1041
+ f_out << "\t";
1042
+ }
1043
+ }
1044
+ f_out << "\n";
1045
+ i2++;
1046
+ }
1047
+ f_out.close();
1048
+ return;
1049
+ }
1050
+ // file only used with MULTICHART
1051
+ bool
1052
+ ChartObject::start_chart(void)
1053
+ {
1054
+ Application::EnableVisualStyles();
1055
+ Application::SetCompatibleTextRenderingDefault(true);
1056
+
1057
+ // needed to send ChartObject pointer to thread
1058
+ Thread ^t = gcnew Thread(
1059
+ gcnew ParameterizedThreadStart(Form1::ThreadForm));
1060
+
1061
+ t->SetApartmentState(ApartmentState::STA);
1062
+ t->IsBackground = false;
1063
+ t->Priority = ThreadPriority::Normal;
1064
+
1065
+ ChartObj ^p = gcnew ChartObj(this);
1066
+ t->Start(p);
1067
+ this->form_started = true;
1068
+
1069
+ //Thread::Sleep( 1 ); /* this when debugging... */
1070
+ //_beginthread(void (Form1::ThreadForm), 0, NULL);
1071
+ return true;
1072
+ }
1073
+
1074
+ void
1075
+ ChartObject::Rate_free(void)
1076
+ {
1077
+
1078
+
1079
+ if (this->phreeqc_ptr)
1080
+ {
1081
+ user_graph->commands.clear();
1082
+ }
1083
+ if (user_graph->linebase != NULL)
1084
+ {
1085
+ char cmd[] = "new; quit";
1086
+ if (this->phreeqc_ptr)
1087
+ {
1088
+ phreeqc_ptr-> basic_run(cmd, user_graph->linebase, user_graph->varbase, user_graph->loopbase);
1089
+ }
1090
+ user_graph->linebase = NULL;
1091
+ user_graph->varbase = NULL;
1092
+ user_graph->loopbase = NULL;
1093
+ }
1094
+ }
1095
+ void ChartObject::Initialize_graph_pts(void)
1096
+ {
1097
+ graph_x = NA;
1098
+ graph_y.clear();
1099
+ secondary_y.clear();
1100
+ }
1101
+
1102
+ void
1103
+ ChartObject::Finalize_graph_pts(void)
1104
+ {
1105
+ if (graph_x != NA)
1106
+ {
1107
+ std::map<int, LDBLE>::iterator it;
1108
+ for (it = graph_y.begin(); it != graph_y.end(); it++)
1109
+ {
1110
+ Curves[it->first]->Get_x().push_back(graph_x);
1111
+ Curves[it->first]->Get_y().push_back(it->second);
1112
+ // Mark added curve for first point, might have been invisible in DefineCurves
1113
+ if (Curves[it->first]->Get_x().size() == 1)
1114
+ this->Set_curve_added(true);
1115
+ }
1116
+ }
1117
+ if (graph_x != NA)
1118
+ {
1119
+ std::map<int, bool>::iterator it;
1120
+ for (it = secondary_y.begin(); it != secondary_y.end(); it++)
1121
+ {
1122
+ Curves[it->first]->Set_y_axis(2);
1123
+ }
1124
+ }
1125
+ }
1126
+ void
1127
+ ChartObject::Add_new_series(void)
1128
+ {
1129
+ std::vector<CurveObject *> Curves;
1130
+ size_t i;
1131
+ size_t e = this->Curves.size();
1132
+ for (i = this->ColumnOffset; i < e; i++)
1133
+ {
1134
+ this->Add_curve(false,
1135
+ this->Curves[i]->Get_id(),
1136
+ this->Curves[i]->Get_line_w(),
1137
+ "",
1138
+ this->Curves[i]->Get_symbol_size(),
1139
+ this->Curves[i]->Get_y_axis(),
1140
+ "");
1141
+ }
1142
+ this->ColumnOffset = (int) e;
1143
+ this->curve_added = true;
1144
+ }
1145
+ void
1146
+ ChartObject::Add_curve(bool plotxy, std::string id,
1147
+ LDBLE line_width,
1148
+ std::string symbol,
1149
+ LDBLE symbol_size,
1150
+ int y_axis,
1151
+ std::string color)
1152
+ {
1153
+ CurveObject *c = new CurveObject;
1154
+ c->Set_id(id);
1155
+ c->Set_line_w(line_width);
1156
+ this->Get_legal_symbol(symbol);
1157
+ c->Set_symbol(symbol);
1158
+ c->Set_symbol_size(symbol_size);
1159
+ if (this->CurvesCSV.size() > this->Curves.size() && !plotxy)
1160
+ {
1161
+ c->Set_symbol_size(0.0);
1162
+ }
1163
+ c->Set_y_axis(y_axis);
1164
+ this->Get_color_string(color);
1165
+ c->Set_color(color);
1166
+
1167
+ this->Curves.push_back(c);
1168
+ }
1169
+ void
1170
+ ChartObject::Set_rate_new_def(bool tf)
1171
+ {
1172
+ this->rate_new_def = tf;
1173
+ if (this->user_graph != NULL)
1174
+ {
1175
+ if (tf)
1176
+ {
1177
+ this->user_graph->new_def = 1;
1178
+ }
1179
+ else
1180
+ {
1181
+ this->user_graph->new_def = 0;
1182
+ }
1183
+ }
1184
+ }
1185
+ void
1186
+ ChartObject::dump(std::ostream & oss, unsigned int indent)
1187
+ {
1188
+ size_t i;
1189
+ oss.precision(DBL_DIG - 1);
1190
+ std::string indent0(""), indent1("");
1191
+ for (i = 0; i < indent; ++i)
1192
+ indent0.append(Utilities::INDENT);
1193
+ for (i = 0; i < indent + 1; ++i)
1194
+ indent1.append(Utilities::INDENT);
1195
+ oss << indent0 << "USER_GRAPH " << this->n_user << " " << this->description << "\n";
1196
+
1197
+ // chart title
1198
+ oss << indent1 << "-chart_title \"" << this->chart_title << "\"" << "\n";
1199
+
1200
+ // axis titles
1201
+ if (this->axis_titles.size() > 0)
1202
+ {
1203
+ oss << indent1 << "-axis_titles ";
1204
+
1205
+ for (i = 0; i < this->axis_titles.size(); i++)
1206
+ {
1207
+ oss << "\"" << axis_titles[i] << "\" ";
1208
+ }
1209
+ oss << "\n";
1210
+ }
1211
+
1212
+ // axis_scale_x
1213
+ LDBLE *scale_ptr = this->axis_scale_x;
1214
+ {
1215
+ oss << indent1 << "-axis_scale x_axis ";
1216
+ for (i = 0; i < 4; i++)
1217
+ {
1218
+ if (scale_ptr[i] == NA)
1219
+ {
1220
+ oss << " auto";
1221
+ }
1222
+ else
1223
+ {
1224
+ oss << " " << scale_ptr[i];
1225
+ }
1226
+ }
1227
+ if (scale_ptr[4] == 10.0)
1228
+ {
1229
+ oss << " log";
1230
+ }
1231
+ oss << "\n";
1232
+ }
1233
+ // axis_scale_y
1234
+ scale_ptr = this->axis_scale_y;
1235
+ {
1236
+ oss << indent1 << "-axis_scale y_axis ";
1237
+ for (i = 0; i < 4; i++)
1238
+ {
1239
+ if (scale_ptr[i] == NA)
1240
+ {
1241
+ oss << " auto";
1242
+ }
1243
+ else
1244
+ {
1245
+ oss << " " << scale_ptr[i];
1246
+ }
1247
+ }
1248
+ if (scale_ptr[4] == 10.0)
1249
+ {
1250
+ oss << " log";
1251
+ }
1252
+ oss << "\n";
1253
+ }
1254
+ // axis_scale_sy
1255
+ scale_ptr = this->axis_scale_y2;
1256
+ {
1257
+ oss << indent1 << "-axis_scale sy_axis ";
1258
+ for (i = 0; i < 4; i++)
1259
+ {
1260
+ if (scale_ptr[i] == NA)
1261
+ {
1262
+ oss << " auto";
1263
+ }
1264
+ else
1265
+ {
1266
+ oss << " " << scale_ptr[i];
1267
+ }
1268
+ }
1269
+ if (scale_ptr[4] == 10.0)
1270
+ {
1271
+ oss << " log";
1272
+ }
1273
+ oss << "\n";
1274
+ }
1275
+ // chart type
1276
+ if (this->chart_type == 0)
1277
+ {
1278
+ oss << indent1 << "-plot_concentration_vs x" << "\n";
1279
+ }
1280
+ else
1281
+ {
1282
+ oss << indent1 << "-plot_concentration_vs t" << "\n";
1283
+ }
1284
+ // graph_initial_solutions
1285
+ if (this->graph_initial_solutions)
1286
+ {
1287
+ oss << indent1 << "-initial_solutions true" << "\n";
1288
+ }
1289
+ else
1290
+ {
1291
+ oss << indent1 << "-initial_solutions false" << "\n";
1292
+ }
1293
+ // connect_simulations
1294
+ if (this->connect_simulations)
1295
+ {
1296
+ oss << indent1 << "-connect_simulations true" << "\n";
1297
+ }
1298
+ else
1299
+ {
1300
+ oss << indent1 << "-connect_simulations false" << "\n";
1301
+ }
1302
+ // csv files
1303
+ for (i = 0; i < this->csv_file_names.size(); i++)
1304
+ {
1305
+ oss << indent1 << "-plot_tsv_file " << this->csv_file_names[i] << "\n";
1306
+ }
1307
+
1308
+ // headings
1309
+ if (this->headings_original.size() > 0)
1310
+ {
1311
+ oss << indent1 << "-headings ";
1312
+ for (i = 0; i < this->headings_original.size(); i++)
1313
+ {
1314
+ oss << this->headings_original[i] << " ";
1315
+ }
1316
+ oss << "\n";
1317
+ }
1318
+
1319
+ // commands
1320
+ oss << indent1 << "-start" << "\n";
1321
+ std::list<std::string>::iterator it = rate_command_list_original.begin();
1322
+ for (; it != rate_command_list_original.end(); it++)
1323
+ {
1324
+ oss << *it << "\n";
1325
+ }
1326
+ oss << indent1 << "-end" << "\n";
1327
+
1328
+ /*
1329
+ class rate *user_graph;
1330
+ // C++ for rate struct
1331
+ std::string rate_name;
1332
+ std::list<std::string> rate_command_list;
1333
+ bool rate_new_def;
1334
+
1335
+ int default_symbol;
1336
+ int default_symbol_csv;
1337
+ int default_color;
1338
+ int default_color_csv;
1339
+
1340
+ // temporary storage before stored graph_x/y/sy data are stored in curves
1341
+ // Initialize_graph_pts and Finalize_graph_pts use this storage.
1342
+ LDBLE graph_x;
1343
+ std::map<int, LDBLE> graph_y;
1344
+ std::map<int, bool> secondary_y;
1345
+
1346
+ // temporary plotxy curve definitions before stored in curves
1347
+ // a plotxy curve is copied to Curves when cmdplotxy is encountered
1348
+ // this keeps order correct between plotxy and graph_x/y/sy
1349
+ std::vector<CurveObject> new_plotxy_curves;
1350
+
1351
+ // temporary headings until stored during basic_run
1352
+ std::vector<std::string> new_headings;
1353
+ bool active;
1354
+ bool detach;
1355
+ bool form_started;
1356
+ */
1357
+ }
1358
+
1359
+ const std::vector< std::string >::value_type temp_vopts[] = {
1360
+ std::vector< std::string >::value_type("start"), // 0
1361
+ std::vector< std::string >::value_type("end"), // 1
1362
+ std::vector< std::string >::value_type("heading"), // 2
1363
+ std::vector< std::string >::value_type("headings"), // 3
1364
+ std::vector< std::string >::value_type("chart_title"), // 4
1365
+ std::vector< std::string >::value_type("axis_titles"), // 5
1366
+ std::vector< std::string >::value_type("axis_scale"), // 6
1367
+ std::vector< std::string >::value_type("initial_solutions"), // 7
1368
+ std::vector< std::string >::value_type("plot_concentration_vs"), // 8
1369
+ std::vector< std::string >::value_type("shifts_as_points"), // 9
1370
+ std::vector< std::string >::value_type("grid_offset"), // 10
1371
+ std::vector< std::string >::value_type("connect_simulations"), // 11
1372
+ std::vector< std::string >::value_type("plot_csv_file"), // 12
1373
+ std::vector< std::string >::value_type("clear"), // 13
1374
+ std::vector< std::string >::value_type("detach"), // 14
1375
+ std::vector< std::string >::value_type("active"), // 15
1376
+ std::vector< std::string >::value_type("batch"), // 16
1377
+ std::vector< std::string >::value_type("plot_tsv_file") // 17
1378
+ };
1379
+ const std::vector< std::string > ChartObject::vopts(temp_vopts, temp_vopts + sizeof temp_vopts / sizeof temp_vopts[0]);
1380
+
1381
+
1382
+ #endif // MULTICHART