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.
- pyEQL/__init__.py +50 -0
- pyEQL/_phreeqc.cp310-win_amd64.pyd +0 -0
- pyEQL/activity_correction.py +879 -0
- pyEQL/database/geothermal.dat +5693 -0
- pyEQL/database/llnl.dat +19305 -0
- pyEQL/database/phreeqc_license.txt +54 -0
- pyEQL/database/pyeql_db.json +35607 -0
- pyEQL/engines.py +1153 -0
- pyEQL/equilibrium.py +227 -0
- pyEQL/functions.py +281 -0
- pyEQL/phreeqc/__init__.py +5 -0
- pyEQL/phreeqc/bindings.cpp +84 -0
- pyEQL/phreeqc/core.py +239 -0
- pyEQL/phreeqc/database/Amm.dat +1968 -0
- pyEQL/phreeqc/database/CMakeLists.txt +32 -0
- pyEQL/phreeqc/database/ColdChem.dat +267 -0
- pyEQL/phreeqc/database/Concrete_PHR.dat +158 -0
- pyEQL/phreeqc/database/Concrete_PZ.dat +195 -0
- pyEQL/phreeqc/database/Kinec.v2.dat +12039 -0
- pyEQL/phreeqc/database/Kinec_v3.dat +12159 -0
- pyEQL/phreeqc/database/Makefile.am +28 -0
- pyEQL/phreeqc/database/Makefile.in +530 -0
- pyEQL/phreeqc/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
- pyEQL/phreeqc/database/Tipping_Hurley.dat +4137 -0
- pyEQL/phreeqc/database/__init__.py +0 -0
- pyEQL/phreeqc/database/core10.dat +6824 -0
- pyEQL/phreeqc/database/frezchem.dat +634 -0
- pyEQL/phreeqc/database/iso.dat +7235 -0
- pyEQL/phreeqc/database/llnl.dat +19310 -0
- pyEQL/phreeqc/database/minteq.dat +5654 -0
- pyEQL/phreeqc/database/minteq.v4.dat +13212 -0
- pyEQL/phreeqc/database/phreeqc.dat +1972 -0
- pyEQL/phreeqc/database/phreeqc_rates.dat +3158 -0
- pyEQL/phreeqc/database/pitzer.dat +1044 -0
- pyEQL/phreeqc/database/sit.dat +14348 -0
- pyEQL/phreeqc/database/wateq4f.dat +4036 -0
- pyEQL/phreeqc/ext/README.md +10 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/CMakeLists.txt +476 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/INSTALL +302 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/IPhreeqc.rc +61 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/IPhreeqcConfig.cmake.in +4 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/Makefile.am +8 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/Makefile.in +816 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/aclocal.m4 +1217 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/ALL_BUILD.vcxproj +185 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/ALL_BUILD.vcxproj.filters +8 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/generate.stamp +1 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/generate.stamp.depend +79 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CTestTestfile.cmake +6 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Continuous.vcxproj +240 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Continuous.vcxproj.filters +17 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/DartConfiguration.tcl +109 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Experimental.vcxproj +240 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Experimental.vcxproj.filters +17 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/INSTALL.vcxproj +209 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/INSTALL.vcxproj.filters +13 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/CSelectedOutput.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Dictionary.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/ExchComp.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Exchange.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/GasComp.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/GasPhase.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.lib.recipe +11 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CL.command.1.tlog +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CL.read.1.tlog +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CL.write.1.tlog +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/Cl.items.tlog +82 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CustomBuild.command.1.tlog +10 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CustomBuild.read.1.tlog +78 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/CustomBuild.write.1.tlog +2 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/IPhreeqc.lastbuildstate +2 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/Lib-link.read.1.tlog +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/Lib-link.write.1.tlog +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc.tlog/Lib.command.1.tlog +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqcLib.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/IPhreeqc_interface_F.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/ISolution.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/ISolutionComp.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Keywords.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/KineticsComp.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/NameDouble.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/NumKeyword.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PBasic.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PHRQ_base.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PHRQ_io.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PHRQ_io_output.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PPassemblage.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/PPassemblageComp.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Parser.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Phreeqc.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Pressure.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Reaction.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/ReadClass.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SS.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SSassemblage.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SScomp.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SelectedOutput.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Serializer.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Solution.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SolutionIsotope.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/StorageBin.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/StorageBinList.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Surface.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SurfaceCharge.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/SurfaceComp.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/System.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Temperature.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Use.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/UserPunch.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Utils.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/Var.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/advection.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/basicsubs.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cl1.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cvdense.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cvode.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cxxKinetics.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/cxxMix.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/dense.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/dumper.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/gases.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/input.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/integrate.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/inverse.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/isotopes.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/kinetics.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/mainsubs.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/model.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/nvector.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/nvector_serial.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/parse.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/phqalloc.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/pitzer.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/pitzer_structures.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/prep.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/print.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/read.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/readtr.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/runner.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/sit.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/smalldense.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/spread.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/step.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/structures.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/sundialsmath.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/tally.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/tidy.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/transport.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.dir/Release/utilities.obj +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.sln +116 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.vcxproj +443 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/IPhreeqc.vcxproj.filters +456 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Nightly.vcxproj +240 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Nightly.vcxproj.filters +17 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/NightlyMemoryCheck.vcxproj +240 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/NightlyMemoryCheck.vcxproj.filters +17 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/Release/IPhreeqc.lib +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/cmake_install.cmake +40 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ar-lib +270 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/compile +347 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.guess +1441 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.sub +1813 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/depcomp +791 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/install-sh +508 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ltmain.sh +11156 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/missing +215 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/test-driver +148 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure +23867 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure.ac +136 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Amm.dat +1968 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/CMakeLists.txt +32 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/ColdChem.dat +267 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PHR.dat +158 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PZ.dat +195 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec.v2.dat +12039 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec_v3.dat +12159 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.am +28 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.in +530 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Tipping_Hurley.dat +4137 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/core10.dat +6824 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/frezchem.dat +634 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/iso.dat +7235 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/llnl.dat +19310 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.dat +5654 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.v4.dat +13212 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc.dat +1972 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc_rates.dat +3158 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/pitzer.dat +1044 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/sit.dat +14348 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/wateq4f.dat +4036 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/CMakeLists.txt +35 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/IPhreeqc.pdf +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.am +24 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.in +545 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/NOTICE +51 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_2_1999_manual.pdf +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_3_2013_manual.pdf +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/README +428 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/RELEASE +7294 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h.html +5096 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h_source.html +389 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp.html +83 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp_source.html +478 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h.html +318 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h_source.html +200 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bc_s.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bdwn.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.html +2274 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.html +69 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/closed.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +68 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.css +1440 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dynsections.js +97 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2blank.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2doc.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderclosed.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderopen.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2lastnode.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2link.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mlastnode.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mnode.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2node.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2plastnode.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2pnode.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2splitbar.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2vertline.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/index.html +58 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/jquery.js +31 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_f.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_g.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_h.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/open.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/structVAR.html +143 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_off.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_on.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_a.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_b.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_h.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_s.png +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tabs.css +60 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/phreeqc3.chm +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/CMakeLists.txt +11 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.am +88 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.in +696 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/CMakeLists.txt +1 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt +35 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt.in +21 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/README.txt +44 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/advect.c +101 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/ic +17 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/phreeqc.dat +1579 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/CMakeLists.txt +10 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/README.txt +3 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/CMakeLists.txt +9 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/phreeqc.dat +1582 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/runphreeqc.xls +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/withcallback.xls +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/CMakeLists.txt +11 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/Gypsum.py +52 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/parallel_advect.py +465 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/phreeqc.dat +1582 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/pitzer.dat +790 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/wateq4f.dat +3846 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/CMakeLists.txt +1 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt +35 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt.in +20 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/README.txt +45 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/advect.cpp +110 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/ic +17 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/phreeqc.dat +1579 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/CMakeLists.txt +1 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt +44 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt.in +24 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/README.txt +45 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/advect.F90 +102 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/ic +17 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/phreeqc.dat +1579 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt +26 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt.in +20 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/README.txt +37 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/ex2 +26 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/main.cpp +20 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/phreeqc.dat +1837 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/post-install.cmake.in +7 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/CMakeLists.txt +185 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.cpp +171 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.h +34 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.am +18 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.in +466 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestCVar.cpp +9 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqc.cpp +4901 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqcLib.cpp +4644 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestSelectedOutput.cpp +669 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestVar.cpp +10 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/conv_fail.in +11 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/dump +42 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/iso.dat +7231 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/kinn20140218 +349 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/missing_e.dat +1556 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch +105 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch_no_set +102 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.90a6449 +1935 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.old +1556 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/libtool.m4 +8388 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltoptions.m4 +437 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltsugar.m4 +124 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltversion.m4 +23 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/lt~obsolete.m4 +99 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/resource.h +14 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.cpp +401 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.hxx +77 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CVar.hxx +162 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Debug.h +12 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/ErrorReporter.hxx +70 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.cpp +1889 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f.inc +91 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f90.inc +603 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.h +2182 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.hpp +1027 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcCallbacks.h +19 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcF.f +653 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcLib.cpp +1098 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface.F90 +1283 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.cpp +535 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.h +162 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.am +210 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.in +1294 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/README.Fortran +17 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.c +84 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.h +152 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Version.h +36 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fimpl.h +282 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.cpp +646 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.h +163 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap1.cpp +24 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap2.cpp +24 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap3.cpp +24 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap4.cpp +24 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap5.cpp +24 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap6.cpp +25 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap7.cpp +25 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap8.cpp +24 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.cpp +225 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.h +59 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.cpp +1382 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.h +444 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.cpp +42 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.h +79 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.cpp +41 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.h +28 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.cxx +398 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.h +117 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.cxx +466 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.h +74 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.h +1184 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.resX +36 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.cxx +265 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.h +59 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.cxx +659 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.h +103 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.cxx +40 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.h +53 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.cxx +202 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.h +138 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.cxx +318 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.h +81 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NA.h +1 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.cxx +537 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.h +66 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.cxx +190 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.h +67 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.cpp +8350 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.h +572 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PHRQ_io_output.cpp +411 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.cxx +375 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.h +70 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.cxx +441 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.h +83 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.cpp +2087 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.h +2164 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.cpp +242 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.h +104 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.cxx +417 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.h +43 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.cxx +284 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.h +57 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ReadClass.cxx +1150 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.cxx +609 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.h +128 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.cxx +317 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.h +59 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.cxx +297 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.h +66 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.cpp +115 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.h +209 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.cxx +213 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.h +42 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.cxx +1795 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.h +154 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.cxx +333 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.h +85 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.cxx +1507 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.h +141 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.cpp +358 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.h +81 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.cxx +837 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.h +108 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.cxx +617 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.h +137 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.cxx +509 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.h +70 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.cxx +103 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.h +89 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.cxx +423 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.h +42 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.cpp +78 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.h +159 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.cpp +32 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.h +39 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ZedGraph.dll +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/advection.cpp +140 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/basicsubs.cpp +4333 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cl1.cpp +881 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.cxx +117 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.h +48 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_exports.h +20 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.cpp +914 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.h +207 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.cxx +1331 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.h +310 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.cxx +263 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.h +29 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/phrqtype.h +18 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.cpp +566 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.h +267 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.cpp +3939 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.h +940 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.cxx +617 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.h +78 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.cxx +154 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.h +58 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.cpp +175 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.h +341 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.cpp +277 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.h +60 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/gases.cpp +748 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/global_structures.h +1672 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/input.cpp +133 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/integrate.cpp +1219 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/inverse.cpp +5135 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/isotopes.cpp +1813 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/kinetics.cpp +3180 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/mainsubs.cpp +2320 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/model.cpp +5843 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.cpp +272 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.h +485 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.cpp +1032 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.h +369 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/parse.cpp +1044 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.cpp +316 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.h +47 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer.cpp +2709 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer_structures.cpp +225 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/prep.cpp +6267 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/print.cpp +3673 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/read.cpp +10245 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/readtr.cpp +1495 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.cpp +158 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.h +33 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sit.cpp +1684 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.cpp +324 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.h +261 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/spread.cpp +1309 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/step.cpp +1566 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/structures.cpp +3381 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.cpp +133 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.h +162 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialstypes.h +183 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tally.cpp +1288 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tidy.cpp +5600 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/transport.cpp +6403 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/utilities.cpp +1339 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/thread.h +64 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/CMakeLists.txt +133 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.am +45 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.in +1128 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/ex2.in +26 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main.f90 +31 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main77.f +6 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main_fortran.cxx +8 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/phreeqc.dat.in +1556 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_c.c +148 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_cxx.cxx +152 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_f90.F90 +328 -0
- pyEQL/phreeqc/iphreeqc_wrapper.cpp +75 -0
- pyEQL/phreeqc/solution.py +74 -0
- pyEQL/phreeqc/var.py +50 -0
- pyEQL/presets/Ringers lactate.yaml +20 -0
- pyEQL/presets/__init__.py +17 -0
- pyEQL/presets/normal saline.yaml +17 -0
- pyEQL/presets/rainwater.yaml +17 -0
- pyEQL/presets/seawater.yaml +29 -0
- pyEQL/presets/urine.yaml +26 -0
- pyEQL/presets/wastewater.yaml +21 -0
- pyEQL/py.typed +0 -0
- pyEQL/salt_ion_match.py +112 -0
- pyEQL/solute.py +163 -0
- pyEQL/solution.py +2714 -0
- pyEQL/utils.py +237 -0
- pyeql-1.4.0rc9.dist-info/METADATA +130 -0
- pyeql-1.4.0rc9.dist-info/RECORD +519 -0
- pyeql-1.4.0rc9.dist-info/WHEEL +5 -0
- pyeql-1.4.0rc9.dist-info/licenses/AUTHORS.md +21 -0
- pyeql-1.4.0rc9.dist-info/licenses/LICENSE.txt +20 -0
|
@@ -0,0 +1,1044 @@
|
|
|
1
|
+
#include "Phreeqc.h"
|
|
2
|
+
#include "phqalloc.h"
|
|
3
|
+
#include "Utils.h"
|
|
4
|
+
|
|
5
|
+
#if defined(PHREEQCI_GUI)
|
|
6
|
+
#ifdef _DEBUG
|
|
7
|
+
#define new DEBUG_NEW
|
|
8
|
+
#undef THIS_FILE
|
|
9
|
+
static char THIS_FILE[] = __FILE__;
|
|
10
|
+
#endif
|
|
11
|
+
#endif
|
|
12
|
+
|
|
13
|
+
/* ---------------------------------------------------------------------- */
|
|
14
|
+
int Phreeqc::
|
|
15
|
+
parse_eq(char* eqn, std::vector<class elt_list>& new_elt_list, int association)
|
|
16
|
+
/* ---------------------------------------------------------------------- */
|
|
17
|
+
/*
|
|
18
|
+
* function to break equation up into component species
|
|
19
|
+
* returns species name, coefficient, and charge in global variable "rxn_list".
|
|
20
|
+
* Also returns pointer to elt_list structure array with list of elements
|
|
21
|
+
* and coefficients in species.
|
|
22
|
+
* rxn_list global variable, output with contiguous rxn_list structures,
|
|
23
|
+
* which is the reaction. Target species is first in
|
|
24
|
+
* list, coefficient is -1.0.
|
|
25
|
+
*
|
|
26
|
+
* Argurments:
|
|
27
|
+
* *eqn input, pointer to equation to be parsed.
|
|
28
|
+
* **elt_ptr output, pointer to contiguous elt_list structures,
|
|
29
|
+
* which is list of elements and coefficients in the
|
|
30
|
+
* target species.
|
|
31
|
+
* association input, TRUE or FALSE if reaction is an association reaction
|
|
32
|
+
*/
|
|
33
|
+
{
|
|
34
|
+
int i;
|
|
35
|
+
LDBLE coef, l_z;
|
|
36
|
+
char c;
|
|
37
|
+
const char* cptr;
|
|
38
|
+
char token[MAX_LENGTH];
|
|
39
|
+
|
|
40
|
+
paren_count = 0;
|
|
41
|
+
/*
|
|
42
|
+
* Remove white space
|
|
43
|
+
*/
|
|
44
|
+
squeeze_white(eqn);
|
|
45
|
+
/*
|
|
46
|
+
* Check for illegal characters
|
|
47
|
+
*/
|
|
48
|
+
for (i = 0; (c = eqn[i]) != '\0'; i++)
|
|
49
|
+
{
|
|
50
|
+
if (islegit(c) == FALSE)
|
|
51
|
+
{
|
|
52
|
+
error_string = sformatf("Character is not allowed,\
|
|
53
|
+
%c (octal: %o).", c, c);
|
|
54
|
+
error_msg(error_string, CONTINUE);
|
|
55
|
+
return (ERROR);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/*
|
|
60
|
+
* Find coefficients, name, and charge for each species for lhs
|
|
61
|
+
*/
|
|
62
|
+
count_trxn = 0;
|
|
63
|
+
trxn.dz[0] = trxn.dz[1] = trxn.dz[2] = 0.0;
|
|
64
|
+
cptr = eqn;
|
|
65
|
+
c = cptr[0];
|
|
66
|
+
for (;;)
|
|
67
|
+
{
|
|
68
|
+
if (c == '=')
|
|
69
|
+
break;
|
|
70
|
+
if (c == '\0')
|
|
71
|
+
{
|
|
72
|
+
error_string = sformatf("Equation has no equal sign.\n\t%s", eqn);
|
|
73
|
+
error_msg(error_string, CONTINUE);
|
|
74
|
+
return (ERROR);
|
|
75
|
+
}
|
|
76
|
+
if (get_species(&cptr) == ERROR)
|
|
77
|
+
{
|
|
78
|
+
return (ERROR);
|
|
79
|
+
}
|
|
80
|
+
c = cptr[0];
|
|
81
|
+
if (association == FALSE)
|
|
82
|
+
{
|
|
83
|
+
trxn.token[count_trxn].coef *= -1.0;
|
|
84
|
+
}
|
|
85
|
+
count_trxn++;
|
|
86
|
+
}
|
|
87
|
+
/*
|
|
88
|
+
* Get coefficient, name, and charge of species for dissociation reaction
|
|
89
|
+
*/
|
|
90
|
+
cptr++;
|
|
91
|
+
if (association == TRUE)
|
|
92
|
+
{
|
|
93
|
+
if (get_species(&cptr) == ERROR)
|
|
94
|
+
{
|
|
95
|
+
return (ERROR);
|
|
96
|
+
}
|
|
97
|
+
trxn.token[count_trxn].coef *= -1.0;
|
|
98
|
+
/* Swap species into first structure position */
|
|
99
|
+
const char* char_ptr = trxn.token[0].name;
|
|
100
|
+
coef = trxn.token[0].coef;
|
|
101
|
+
l_z = trxn.token[0].z;
|
|
102
|
+
trxn.token[0].name = trxn.token[count_trxn].name;
|
|
103
|
+
trxn.token[0].coef = trxn.token[count_trxn].coef;
|
|
104
|
+
trxn.token[0].z = trxn.token[count_trxn].z;
|
|
105
|
+
trxn.token[count_trxn].name = char_ptr;
|
|
106
|
+
trxn.token[count_trxn].coef = coef;
|
|
107
|
+
trxn.token[count_trxn].z = l_z;
|
|
108
|
+
count_trxn++;
|
|
109
|
+
}
|
|
110
|
+
/*
|
|
111
|
+
* Get reaction species from rhs of equation
|
|
112
|
+
*/
|
|
113
|
+
c = cptr[0];
|
|
114
|
+
for (;;)
|
|
115
|
+
{
|
|
116
|
+
if (c == '\0')
|
|
117
|
+
break;
|
|
118
|
+
if (get_species(&cptr) == ERROR)
|
|
119
|
+
{
|
|
120
|
+
return (ERROR);
|
|
121
|
+
}
|
|
122
|
+
c = cptr[0];
|
|
123
|
+
if (association == TRUE)
|
|
124
|
+
{
|
|
125
|
+
trxn.token[count_trxn].coef *= -1.0;
|
|
126
|
+
}
|
|
127
|
+
count_trxn++;
|
|
128
|
+
}
|
|
129
|
+
/*
|
|
130
|
+
* Sort list of reaction species
|
|
131
|
+
*/
|
|
132
|
+
trxn_sort();
|
|
133
|
+
/*
|
|
134
|
+
* Get elements in species or mineral formula
|
|
135
|
+
*/
|
|
136
|
+
count_elts = 0;
|
|
137
|
+
Utilities::strcpy_safe(token, MAX_LENGTH, trxn.token[0].name);
|
|
138
|
+
replace("(s)", "", token);
|
|
139
|
+
replace("(S)", "", token);
|
|
140
|
+
replace("(g)", "", token);
|
|
141
|
+
replace("(G)", "", token);
|
|
142
|
+
const char* char_ptr = token;
|
|
143
|
+
|
|
144
|
+
if (get_elts_in_species(&char_ptr, trxn.token[0].coef) == ERROR)
|
|
145
|
+
{
|
|
146
|
+
return (ERROR);
|
|
147
|
+
}
|
|
148
|
+
/*
|
|
149
|
+
* Sort elements in reaction and combine
|
|
150
|
+
*/
|
|
151
|
+
if (elt_list_combine() == ERROR)
|
|
152
|
+
return (ERROR);
|
|
153
|
+
/*
|
|
154
|
+
* Malloc space and store element data for return
|
|
155
|
+
*/
|
|
156
|
+
new_elt_list.resize(count_elts + 1);
|
|
157
|
+
for (i = 0; i < count_elts; i++)
|
|
158
|
+
{
|
|
159
|
+
new_elt_list[i].elt = elt_list[i].elt;
|
|
160
|
+
new_elt_list[i].coef = -elt_list[i].coef;
|
|
161
|
+
}
|
|
162
|
+
new_elt_list[count_elts].elt = NULL;
|
|
163
|
+
|
|
164
|
+
/*
|
|
165
|
+
* Debugging print of parsed equation
|
|
166
|
+
trxn_print();
|
|
167
|
+
*/
|
|
168
|
+
return (OK);
|
|
169
|
+
}
|
|
170
|
+
/* ---------------------------------------------------------------------- */
|
|
171
|
+
int Phreeqc::
|
|
172
|
+
check_eqn(int association)
|
|
173
|
+
/* ---------------------------------------------------------------------- */
|
|
174
|
+
/*
|
|
175
|
+
* Check that equation is balanced reaction. Uses array "trxn.token" and
|
|
176
|
+
* assumes "count_trxn" is set to number of species in reaction.
|
|
177
|
+
* Charge and elements are checked.
|
|
178
|
+
*
|
|
179
|
+
* Arguments:
|
|
180
|
+
*
|
|
181
|
+
* association input, TRUE or FALSE if reaction is an association reaction.
|
|
182
|
+
*/
|
|
183
|
+
{
|
|
184
|
+
int i;
|
|
185
|
+
int oops = 0;
|
|
186
|
+
LDBLE sumcharge;
|
|
187
|
+
|
|
188
|
+
paren_count = 0;
|
|
189
|
+
count_elts = 0;
|
|
190
|
+
/*
|
|
191
|
+
* Check that coefficient of first species is -1.0
|
|
192
|
+
*/
|
|
193
|
+
if (equal(trxn.token[0].coef, -1.0, TOL) == FALSE)
|
|
194
|
+
{
|
|
195
|
+
if (association == TRUE)
|
|
196
|
+
{
|
|
197
|
+
error_string = sformatf(
|
|
198
|
+
"Coefficient of first species on rhs is not equal to 1.0.");
|
|
199
|
+
error_msg(error_string, CONTINUE);
|
|
200
|
+
}
|
|
201
|
+
else
|
|
202
|
+
{
|
|
203
|
+
error_string = sformatf(
|
|
204
|
+
"Coefficient of mineral (first on lhs) is not equal to 1.0.");
|
|
205
|
+
error_msg(error_string, CONTINUE);
|
|
206
|
+
}
|
|
207
|
+
return (ERROR);
|
|
208
|
+
}
|
|
209
|
+
/*
|
|
210
|
+
* Go through all species in the reaction; sum the charge and store elements
|
|
211
|
+
*/
|
|
212
|
+
sumcharge = 0.0;
|
|
213
|
+
for (i = 0; i < count_trxn; i++)
|
|
214
|
+
{
|
|
215
|
+
sumcharge += (trxn.token[i].coef) * (trxn.token[i].z);
|
|
216
|
+
const char* t_ptr = trxn.token[i].name;
|
|
217
|
+
if (get_elts_in_species(&t_ptr, trxn.token[i].coef) == ERROR)
|
|
218
|
+
{
|
|
219
|
+
return (ERROR);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
/*
|
|
223
|
+
* Sort elements in reaction and combine
|
|
224
|
+
*/
|
|
225
|
+
if (elt_list_combine() == ERROR)
|
|
226
|
+
return (ERROR);
|
|
227
|
+
/*
|
|
228
|
+
* Check charge
|
|
229
|
+
*/
|
|
230
|
+
if (equal(sumcharge, 0.0, TOL) == FALSE)
|
|
231
|
+
{
|
|
232
|
+
error_string = sformatf( "Equation is not charge balanced, right - left = %7.4f moles charge", sumcharge);
|
|
233
|
+
error_msg(error_string, CONTINUE);
|
|
234
|
+
oops++;
|
|
235
|
+
}
|
|
236
|
+
/*
|
|
237
|
+
* Check mass balance
|
|
238
|
+
*/
|
|
239
|
+
for (i = 0; i < count_elts; i++)
|
|
240
|
+
{
|
|
241
|
+
if ((equal(elt_list[i].coef, 0.0, TOL) == FALSE) &&
|
|
242
|
+
strncmp((elt_list[i].elt)->name, "e", MAX_LENGTH) != 0)
|
|
243
|
+
{
|
|
244
|
+
error_string = sformatf(
|
|
245
|
+
"Equation does not balance for element, %s: right - left = %7.4f moles",
|
|
246
|
+
(elt_list[i].elt)->name, elt_list[i].coef);
|
|
247
|
+
error_msg(error_string, CONTINUE);
|
|
248
|
+
oops++;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
if (oops == 0)
|
|
252
|
+
{
|
|
253
|
+
return (OK);
|
|
254
|
+
}
|
|
255
|
+
else
|
|
256
|
+
{
|
|
257
|
+
return (ERROR);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/* ---------------------------------------------------------------------- */
|
|
262
|
+
int Phreeqc::
|
|
263
|
+
get_charge(char *charge, size_t charge_size, LDBLE * l_z)
|
|
264
|
+
/* ---------------------------------------------------------------------- */
|
|
265
|
+
/*
|
|
266
|
+
* Function takes character string and calculates the charge on
|
|
267
|
+
* the species. Charge can be in two forms: (1) string of "+" or "-"
|
|
268
|
+
* or (2) + or - followed by an integer. Charge is reduced to form (2)
|
|
269
|
+
* and stored in the pointer location *charge.
|
|
270
|
+
*
|
|
271
|
+
* Arguments:
|
|
272
|
+
* *charge input, string containing charge
|
|
273
|
+
* output, string containing charge of the form + or -
|
|
274
|
+
* followed by an integer, if integer greater than 1.
|
|
275
|
+
* *z output, value of charge.
|
|
276
|
+
*
|
|
277
|
+
* Returns:
|
|
278
|
+
* ERROR,
|
|
279
|
+
* OK.
|
|
280
|
+
*/
|
|
281
|
+
{
|
|
282
|
+
int i;
|
|
283
|
+
char* ptr;
|
|
284
|
+
char c, c1;
|
|
285
|
+
/*
|
|
286
|
+
* Charge is zero
|
|
287
|
+
*/
|
|
288
|
+
if ((c = charge[0]) == '\0')
|
|
289
|
+
{
|
|
290
|
+
*l_z = 0.0;
|
|
291
|
+
return (OK);
|
|
292
|
+
}
|
|
293
|
+
/*
|
|
294
|
+
* Error check for + or - at start of string
|
|
295
|
+
*/
|
|
296
|
+
if (c != '+' && c != '-')
|
|
297
|
+
{
|
|
298
|
+
error_string = sformatf(
|
|
299
|
+
"Character string for charge does not start with + or -,\t%s.",
|
|
300
|
+
charge);
|
|
301
|
+
error_msg(error_string, CONTINUE);
|
|
302
|
+
return (ERROR);
|
|
303
|
+
}
|
|
304
|
+
/*
|
|
305
|
+
* Count string of +'s or -'s
|
|
306
|
+
*/
|
|
307
|
+
i = 0;
|
|
308
|
+
while (c == (c1 = charge[i++]));
|
|
309
|
+
i--;
|
|
310
|
+
if (c1 == '\0')
|
|
311
|
+
{
|
|
312
|
+
if (c == '-')
|
|
313
|
+
i = -i;
|
|
314
|
+
}
|
|
315
|
+
else
|
|
316
|
+
{
|
|
317
|
+
/*
|
|
318
|
+
* + or - followed by a number
|
|
319
|
+
*/
|
|
320
|
+
errno = 0;
|
|
321
|
+
i = strtol(charge, &ptr, 0);
|
|
322
|
+
/*
|
|
323
|
+
* Truncate fractional part of charge if all zeros
|
|
324
|
+
*/
|
|
325
|
+
if (*ptr != '\0')
|
|
326
|
+
{
|
|
327
|
+
if (*ptr == '.')
|
|
328
|
+
{
|
|
329
|
+
while (*(++ptr) != '\0')
|
|
330
|
+
{
|
|
331
|
+
if (*ptr != '0')
|
|
332
|
+
{
|
|
333
|
+
char* ptr;
|
|
334
|
+
*l_z = strtod(charge, &ptr);
|
|
335
|
+
return (OK);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
/*
|
|
339
|
+
* Non-numeric characters
|
|
340
|
+
*/
|
|
341
|
+
}
|
|
342
|
+
else
|
|
343
|
+
{
|
|
344
|
+
error_string = sformatf(
|
|
345
|
+
"Error in character string for charge, %s.", charge);
|
|
346
|
+
error_msg(error_string, CONTINUE);
|
|
347
|
+
return (ERROR);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
/*
|
|
352
|
+
* Charge is zero, must have had +0 or -0 in eqn
|
|
353
|
+
*/
|
|
354
|
+
if (i == 0)
|
|
355
|
+
{
|
|
356
|
+
charge[0] = '\0';
|
|
357
|
+
}
|
|
358
|
+
/*
|
|
359
|
+
* Charge is +1 or -1, single + or -
|
|
360
|
+
*/
|
|
361
|
+
if (abs(i) == 1)
|
|
362
|
+
{
|
|
363
|
+
charge[0] = c;
|
|
364
|
+
charge[1] = '\0';
|
|
365
|
+
}
|
|
366
|
+
/*
|
|
367
|
+
* Abs(z)>1, set charge to + or - plus integer
|
|
368
|
+
*/
|
|
369
|
+
if (abs(i) > 1)
|
|
370
|
+
{
|
|
371
|
+
if (snprintf(charge, charge_size, "%-+d", i) == EOF)
|
|
372
|
+
{
|
|
373
|
+
error_string = sformatf(
|
|
374
|
+
"Error converting charge to character string, %s.",
|
|
375
|
+
charge);
|
|
376
|
+
error_msg(error_string, CONTINUE);
|
|
377
|
+
return (ERROR);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
*l_z = i;
|
|
381
|
+
return (OK);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/* ---------------------------------------------------------------------- */
|
|
385
|
+
int Phreeqc::
|
|
386
|
+
get_coef(LDBLE * coef, const char **eqnaddr)
|
|
387
|
+
/* ---------------------------------------------------------------------- */
|
|
388
|
+
/*
|
|
389
|
+
* Function reads through eqn and determines the coefficient of the next
|
|
390
|
+
* species.
|
|
391
|
+
*
|
|
392
|
+
* Arguments:
|
|
393
|
+
* *coef output, coefficient of next species.
|
|
394
|
+
*
|
|
395
|
+
* **eqnaddr input, pointer to a position in eqn to start parsing
|
|
396
|
+
* output, pointer to next position after coefficient
|
|
397
|
+
*
|
|
398
|
+
* Returns:
|
|
399
|
+
* ERROR,
|
|
400
|
+
* OK.
|
|
401
|
+
*/
|
|
402
|
+
{
|
|
403
|
+
int i;
|
|
404
|
+
char c, c1;
|
|
405
|
+
const char* cptr;
|
|
406
|
+
const char* rest;
|
|
407
|
+
char* ptr1;
|
|
408
|
+
char token[MAX_LENGTH];;
|
|
409
|
+
|
|
410
|
+
rest = *eqnaddr;
|
|
411
|
+
cptr = *eqnaddr; /* address of a position in eqn */
|
|
412
|
+
c = *cptr; /* character in eqn */
|
|
413
|
+
*coef = 0.0;
|
|
414
|
+
/*
|
|
415
|
+
* No leading sign or number
|
|
416
|
+
*/
|
|
417
|
+
if (isalpha((int) c) ||
|
|
418
|
+
(c == '(') || (c == ')') || (c == '[') || (c == ']'))
|
|
419
|
+
{
|
|
420
|
+
*coef = 1.0;
|
|
421
|
+
return (OK);
|
|
422
|
+
}
|
|
423
|
+
/*
|
|
424
|
+
* Leading +, no digits
|
|
425
|
+
*/
|
|
426
|
+
c1 = *(cptr + 1);
|
|
427
|
+
if (c == '+' &&
|
|
428
|
+
(isalpha((int) c1) ||
|
|
429
|
+
(c1 == '(') || (c1 == ')') || (c1 == '[') || (c1 == ']')))
|
|
430
|
+
{
|
|
431
|
+
*eqnaddr = ++cptr;
|
|
432
|
+
*coef = 1.0;
|
|
433
|
+
return (OK);
|
|
434
|
+
}
|
|
435
|
+
/*
|
|
436
|
+
* Leading -, no digits
|
|
437
|
+
*/
|
|
438
|
+
if (c == '-' &&
|
|
439
|
+
(isalpha((int) c1) ||
|
|
440
|
+
(c1 == '(') || (c1 == ')') || (c1 == '[') || (c1 == ']')))
|
|
441
|
+
{
|
|
442
|
+
*eqnaddr = ++cptr;
|
|
443
|
+
*coef = -1.0;
|
|
444
|
+
return (OK);
|
|
445
|
+
}
|
|
446
|
+
i = 0;
|
|
447
|
+
/*
|
|
448
|
+
* Has number coefficient
|
|
449
|
+
*/
|
|
450
|
+
if (isdigit((int) c) || c == '+' || c == '-' || c == '.')
|
|
451
|
+
{
|
|
452
|
+
while (isdigit((int) c) || c == '+' || c == '-' || c == '.')
|
|
453
|
+
{
|
|
454
|
+
token[i++] = c;
|
|
455
|
+
if (i >= MAX_LENGTH)
|
|
456
|
+
{
|
|
457
|
+
error_string = sformatf(
|
|
458
|
+
"Coefficient has more than MAX_LENGTH characters.");
|
|
459
|
+
error_msg(error_string, CONTINUE);
|
|
460
|
+
return (ERROR);
|
|
461
|
+
}
|
|
462
|
+
c = *(++cptr);
|
|
463
|
+
}
|
|
464
|
+
token[i] = '\0';
|
|
465
|
+
*eqnaddr = cptr;
|
|
466
|
+
errno = 0;
|
|
467
|
+
*coef = strtod(token, &ptr1);
|
|
468
|
+
if ((errno == ERANGE) || (*ptr1 != '\0'))
|
|
469
|
+
{
|
|
470
|
+
error_string = sformatf(
|
|
471
|
+
"Error converting coefficient in get_coef, %s.", token);
|
|
472
|
+
error_msg(error_string, CONTINUE);
|
|
473
|
+
return (ERROR);
|
|
474
|
+
}
|
|
475
|
+
return (OK);
|
|
476
|
+
}
|
|
477
|
+
/*
|
|
478
|
+
* None of the above, unknown construct
|
|
479
|
+
*/
|
|
480
|
+
error_string = sformatf(
|
|
481
|
+
"Illegal equation construct detected in get_coef.\n\t%s.", rest);
|
|
482
|
+
error_msg(error_string, CONTINUE);
|
|
483
|
+
return (ERROR);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/* ---------------------------------------------------------------------- */
|
|
487
|
+
int Phreeqc::
|
|
488
|
+
get_elt(const char** t_ptr, std::string& element, int* i)
|
|
489
|
+
/* ---------------------------------------------------------------------- */
|
|
490
|
+
/*
|
|
491
|
+
* Function reads an element name out of the equation string.
|
|
492
|
+
* An element name is composed of a capital letter followed by any number
|
|
493
|
+
* of lower case characters.
|
|
494
|
+
*
|
|
495
|
+
* Arguments:
|
|
496
|
+
* **t_ptr input, points to position in the equation to begin
|
|
497
|
+
* output, points to next character of equation after
|
|
498
|
+
* element name.
|
|
499
|
+
* *element input pointer to place to return element character string
|
|
500
|
+
*/
|
|
501
|
+
{
|
|
502
|
+
char c;
|
|
503
|
+
|
|
504
|
+
element.clear();
|
|
505
|
+
c = *(*t_ptr)++;
|
|
506
|
+
if (c == '\0')
|
|
507
|
+
{
|
|
508
|
+
error_string = sformatf(
|
|
509
|
+
"Empty string in get_elt. Expected an element name.");
|
|
510
|
+
error_msg(error_string, CONTINUE);
|
|
511
|
+
return (ERROR);
|
|
512
|
+
}
|
|
513
|
+
/*
|
|
514
|
+
* Load name into char array element
|
|
515
|
+
*/
|
|
516
|
+
element.push_back(c);
|
|
517
|
+
*i = 1;
|
|
518
|
+
if (c == '[')
|
|
519
|
+
{
|
|
520
|
+
while ((c = (**t_ptr)) != ']')
|
|
521
|
+
{
|
|
522
|
+
element.push_back(c);
|
|
523
|
+
(*i)++;
|
|
524
|
+
(*t_ptr)++;
|
|
525
|
+
if ((c = (**t_ptr)) == ']')
|
|
526
|
+
{
|
|
527
|
+
element.push_back(c);
|
|
528
|
+
(*i)++;
|
|
529
|
+
(*t_ptr)++;
|
|
530
|
+
break;
|
|
531
|
+
}
|
|
532
|
+
else if (**t_ptr == '\0')
|
|
533
|
+
{
|
|
534
|
+
error_msg("No ending bracket (]) for element name", CONTINUE);
|
|
535
|
+
input_error++;
|
|
536
|
+
break;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
while (islower((int)(c = (**t_ptr))) || c == '_')
|
|
540
|
+
{
|
|
541
|
+
element.push_back(c);
|
|
542
|
+
(*i)++;
|
|
543
|
+
(*t_ptr)++;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
else
|
|
547
|
+
{
|
|
548
|
+
while (islower((int)(c = (**t_ptr))) || c == '_')
|
|
549
|
+
{
|
|
550
|
+
element.push_back(c);
|
|
551
|
+
(*i)++;
|
|
552
|
+
(*t_ptr)++;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
return (OK);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/* ---------------------------------------------------------------------- */
|
|
559
|
+
int Phreeqc::
|
|
560
|
+
get_elts_in_species(const char **t_ptr, LDBLE coef)
|
|
561
|
+
/* ---------------------------------------------------------------------- */
|
|
562
|
+
{
|
|
563
|
+
/*
|
|
564
|
+
* Makes a list of elements with their coefficients, stores elements
|
|
565
|
+
* in elt_list at position count_elts. Global variable count_elts is
|
|
566
|
+
* updated with each stored element. Also uses static global variable
|
|
567
|
+
* paren_count.
|
|
568
|
+
*
|
|
569
|
+
* Arguments:
|
|
570
|
+
* **t_ptr input, point in token string to start looking
|
|
571
|
+
* output, is next position to start looking
|
|
572
|
+
* coef input, coefficient to multiply subscripts by
|
|
573
|
+
*/
|
|
574
|
+
int l;
|
|
575
|
+
size_t count;
|
|
576
|
+
char c, c1;
|
|
577
|
+
LDBLE d;
|
|
578
|
+
std::string element;
|
|
579
|
+
const char** t_ptr_save = t_ptr;
|
|
580
|
+
while (((c = **t_ptr) != '+') && (c != '-') && (c != '\0'))
|
|
581
|
+
{
|
|
582
|
+
/* close parenthesis */
|
|
583
|
+
if (c == ')')
|
|
584
|
+
{
|
|
585
|
+
paren_count--;
|
|
586
|
+
if (paren_count < 0)
|
|
587
|
+
{
|
|
588
|
+
error_string = sformatf( "Too many right parentheses.");
|
|
589
|
+
error_msg(error_string, CONTINUE);
|
|
590
|
+
return (ERROR);
|
|
591
|
+
}
|
|
592
|
+
(*t_ptr)++;
|
|
593
|
+
return (OK);
|
|
594
|
+
}
|
|
595
|
+
c1 = *((*t_ptr) + 1);
|
|
596
|
+
/* beginning of element name */
|
|
597
|
+
if (isupper((int) c) || (c == 'e' && c1 == '-') || (c == '['))
|
|
598
|
+
{
|
|
599
|
+
/*
|
|
600
|
+
* Get new element and subscript
|
|
601
|
+
*/
|
|
602
|
+
if (get_elt(t_ptr, element, &l) == ERROR)
|
|
603
|
+
{
|
|
604
|
+
return (ERROR);
|
|
605
|
+
}
|
|
606
|
+
if (count_elts >= (int)elt_list.size())
|
|
607
|
+
{
|
|
608
|
+
elt_list.resize(count_elts + 1);
|
|
609
|
+
}
|
|
610
|
+
elt_list[count_elts].elt = element_store(element.c_str());
|
|
611
|
+
if (get_num(t_ptr, &d) == ERROR)
|
|
612
|
+
{
|
|
613
|
+
return (ERROR);
|
|
614
|
+
}
|
|
615
|
+
elt_list[count_elts].coef = d * coef;
|
|
616
|
+
count_elts++;
|
|
617
|
+
/*
|
|
618
|
+
* Expand working space for elements if necessary
|
|
619
|
+
*/
|
|
620
|
+
if (count_elts >= (int)elt_list.size())
|
|
621
|
+
{
|
|
622
|
+
elt_list.resize(count_elts + 1);
|
|
623
|
+
}
|
|
624
|
+
continue;
|
|
625
|
+
}
|
|
626
|
+
/*
|
|
627
|
+
* Open parentheses
|
|
628
|
+
*/
|
|
629
|
+
if (c == '(')
|
|
630
|
+
{
|
|
631
|
+
count = count_elts;
|
|
632
|
+
if (c1 == ')')
|
|
633
|
+
{
|
|
634
|
+
error_string = sformatf( "Empty parentheses.");
|
|
635
|
+
warning_msg(error_string);
|
|
636
|
+
}
|
|
637
|
+
paren_count++;
|
|
638
|
+
(*t_ptr)++;
|
|
639
|
+
if (get_elts_in_species(t_ptr, coef) == ERROR)
|
|
640
|
+
{
|
|
641
|
+
return (ERROR);
|
|
642
|
+
}
|
|
643
|
+
if (get_num(t_ptr, &d) == ERROR)
|
|
644
|
+
{
|
|
645
|
+
return (ERROR);
|
|
646
|
+
}
|
|
647
|
+
for (size_t i = count; i < count_elts; i++)
|
|
648
|
+
{
|
|
649
|
+
elt_list[i].coef *= d;
|
|
650
|
+
}
|
|
651
|
+
continue;
|
|
652
|
+
}
|
|
653
|
+
/*
|
|
654
|
+
* Colon
|
|
655
|
+
*/
|
|
656
|
+
if (c == ':')
|
|
657
|
+
{
|
|
658
|
+
count = count_elts;
|
|
659
|
+
(*t_ptr)++;
|
|
660
|
+
if (get_num(t_ptr, &d) == ERROR)
|
|
661
|
+
{
|
|
662
|
+
return (ERROR);
|
|
663
|
+
}
|
|
664
|
+
if (get_elts_in_species(t_ptr, coef) == ERROR)
|
|
665
|
+
{
|
|
666
|
+
return (ERROR);
|
|
667
|
+
}
|
|
668
|
+
for (size_t i = count; i < count_elts; i++)
|
|
669
|
+
{
|
|
670
|
+
elt_list[i].coef *= d;
|
|
671
|
+
}
|
|
672
|
+
continue;
|
|
673
|
+
}
|
|
674
|
+
/*
|
|
675
|
+
* Not beginning of element and not opening paren
|
|
676
|
+
*/
|
|
677
|
+
error_string = sformatf(
|
|
678
|
+
"Parsing error in get_elts_in_species, unexpected character, %c.",
|
|
679
|
+
c);
|
|
680
|
+
error_msg(error_string, CONTINUE);
|
|
681
|
+
input_error++;
|
|
682
|
+
return (ERROR);
|
|
683
|
+
}
|
|
684
|
+
if (paren_count != 0)
|
|
685
|
+
{
|
|
686
|
+
error_string = sformatf( "Unbalanced parentheses: %s", *t_ptr_save);
|
|
687
|
+
error_msg(error_string, CONTINUE);
|
|
688
|
+
input_error++;
|
|
689
|
+
return (ERROR);
|
|
690
|
+
}
|
|
691
|
+
return (OK);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
/* ---------------------------------------------------------------------- */
|
|
695
|
+
int Phreeqc::
|
|
696
|
+
get_secondary(const char **t_ptr, char *element, int *i)
|
|
697
|
+
/* ---------------------------------------------------------------------- */
|
|
698
|
+
/*
|
|
699
|
+
* Function reads an element name out of the equation string.
|
|
700
|
+
* An element name is composed of a capital letter followed by any number
|
|
701
|
+
* of lower case characters.
|
|
702
|
+
*
|
|
703
|
+
* Arguments:
|
|
704
|
+
* **t_ptr input, points to position in the equation to begin
|
|
705
|
+
* output, points to next character of equation after
|
|
706
|
+
* element name.
|
|
707
|
+
* *element input pointer to place to return element character string
|
|
708
|
+
*/
|
|
709
|
+
{
|
|
710
|
+
int j;
|
|
711
|
+
char c;
|
|
712
|
+
const char* cptr;
|
|
713
|
+
|
|
714
|
+
c = *(*t_ptr)++;
|
|
715
|
+
if (c == '\0')
|
|
716
|
+
{
|
|
717
|
+
error_string = sformatf(
|
|
718
|
+
"Empty string in get_elt. Expected an element name.");
|
|
719
|
+
error_msg(error_string, CONTINUE);
|
|
720
|
+
input_error++;
|
|
721
|
+
return (ERROR);
|
|
722
|
+
}
|
|
723
|
+
/*
|
|
724
|
+
* Load name into char array element
|
|
725
|
+
*/
|
|
726
|
+
element[0] = c;
|
|
727
|
+
*i = 1;
|
|
728
|
+
if (c == '[')
|
|
729
|
+
{
|
|
730
|
+
while ((c = (**t_ptr)) != ']')
|
|
731
|
+
{
|
|
732
|
+
element[*i] = c;
|
|
733
|
+
(*i)++;
|
|
734
|
+
(*t_ptr)++;
|
|
735
|
+
if ((c = (**t_ptr)) == ']')
|
|
736
|
+
{
|
|
737
|
+
element[*i] = c;
|
|
738
|
+
(*i)++;
|
|
739
|
+
(*t_ptr)++;
|
|
740
|
+
c = (**t_ptr);
|
|
741
|
+
break;
|
|
742
|
+
}
|
|
743
|
+
else if ((c = (**t_ptr)) == '\0')
|
|
744
|
+
{
|
|
745
|
+
error_msg("Did not find ending bracket (])", CONTINUE);
|
|
746
|
+
input_error++;
|
|
747
|
+
return (ERROR);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
while (islower((int) (c = (**t_ptr))) || c == '_')
|
|
751
|
+
{
|
|
752
|
+
element[*i] = c;
|
|
753
|
+
(*i)++;
|
|
754
|
+
(*t_ptr)++;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
else
|
|
758
|
+
{
|
|
759
|
+
while (islower((int) (c = (**t_ptr))) || c == '_')
|
|
760
|
+
{
|
|
761
|
+
element[*i] = c;
|
|
762
|
+
(*i)++;
|
|
763
|
+
(*t_ptr)++;
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
/*
|
|
767
|
+
* Check if secondary master species element
|
|
768
|
+
*/
|
|
769
|
+
j = *i;
|
|
770
|
+
cptr = *t_ptr;
|
|
771
|
+
if (c == '(')
|
|
772
|
+
{
|
|
773
|
+
/* copy parenthesis */
|
|
774
|
+
element[*i] = c;
|
|
775
|
+
(*i)++;
|
|
776
|
+
(*t_ptr)++;
|
|
777
|
+
/* copy number */
|
|
778
|
+
for (;;)
|
|
779
|
+
{
|
|
780
|
+
c = **t_ptr;
|
|
781
|
+
if (isdigit((int) c) || c == '-' || c == '.')
|
|
782
|
+
{
|
|
783
|
+
element[*i] = c;
|
|
784
|
+
(*i)++;
|
|
785
|
+
(*t_ptr)++;
|
|
786
|
+
}
|
|
787
|
+
else if (c == '+')
|
|
788
|
+
{
|
|
789
|
+
(*t_ptr)++;
|
|
790
|
+
}
|
|
791
|
+
else
|
|
792
|
+
{
|
|
793
|
+
break;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
/* go back to before parenthesis */
|
|
797
|
+
if (c != ')')
|
|
798
|
+
{
|
|
799
|
+
*i = j;
|
|
800
|
+
*t_ptr = cptr;
|
|
801
|
+
/* put in closing parenthesis */
|
|
802
|
+
}
|
|
803
|
+
else
|
|
804
|
+
{
|
|
805
|
+
element[*i] = c;
|
|
806
|
+
(*i)++;
|
|
807
|
+
(*t_ptr)++;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
element[*i] = '\0';
|
|
811
|
+
return (OK);
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
/* ---------------------------------------------------------------------- */
|
|
815
|
+
int Phreeqc::
|
|
816
|
+
get_secondary_in_species(const char **t_ptr, LDBLE coef)
|
|
817
|
+
/* ---------------------------------------------------------------------- */
|
|
818
|
+
{
|
|
819
|
+
/*
|
|
820
|
+
* Makes a list of elements with their coefficients, stores elements
|
|
821
|
+
* in elt_list at position count_elts. Global variable count_elts is
|
|
822
|
+
* updated with each stored element. Also uses static global variable
|
|
823
|
+
* paren_count.
|
|
824
|
+
*
|
|
825
|
+
* Arguments:
|
|
826
|
+
* **t_ptr input, point in token string to start looking
|
|
827
|
+
* output, is next position to start looking
|
|
828
|
+
* coef input, coefficient to multiply subscripts by
|
|
829
|
+
*/
|
|
830
|
+
int l;
|
|
831
|
+
size_t count;
|
|
832
|
+
char c, c1;
|
|
833
|
+
LDBLE d;
|
|
834
|
+
char element[MAX_LENGTH];
|
|
835
|
+
const char** t_ptr_save = t_ptr;
|
|
836
|
+
while (((c = **t_ptr) != '+') && (c != '-') && (c != '\0'))
|
|
837
|
+
{
|
|
838
|
+
/* close parenthesis */
|
|
839
|
+
if (c == ')')
|
|
840
|
+
{
|
|
841
|
+
paren_count--;
|
|
842
|
+
if (paren_count < 0)
|
|
843
|
+
{
|
|
844
|
+
error_string = sformatf( "Too many right parentheses.");
|
|
845
|
+
error_msg(error_string, CONTINUE);
|
|
846
|
+
input_error++;
|
|
847
|
+
return (ERROR);
|
|
848
|
+
}
|
|
849
|
+
(*t_ptr)++;
|
|
850
|
+
return (OK);
|
|
851
|
+
}
|
|
852
|
+
c1 = *((*t_ptr) + 1);
|
|
853
|
+
/* beginning of element name */
|
|
854
|
+
if (isupper((int) c) || c == '[' || (c == 'e' && c1 == '-'))
|
|
855
|
+
{
|
|
856
|
+
/*
|
|
857
|
+
* Get new element and subscript
|
|
858
|
+
*/
|
|
859
|
+
if (get_secondary(t_ptr, element, &l) == ERROR)
|
|
860
|
+
{
|
|
861
|
+
return (ERROR);
|
|
862
|
+
}
|
|
863
|
+
elt_list[count_elts].elt = element_store(element);
|
|
864
|
+
if (get_num(t_ptr, &d) == ERROR)
|
|
865
|
+
{
|
|
866
|
+
return (ERROR);
|
|
867
|
+
}
|
|
868
|
+
elt_list[count_elts].coef = d * coef;
|
|
869
|
+
count_elts++;
|
|
870
|
+
/*
|
|
871
|
+
* Expand working space for elements if necessary
|
|
872
|
+
*/
|
|
873
|
+
if (count_elts >= (int)elt_list.size())
|
|
874
|
+
{
|
|
875
|
+
elt_list.resize(count_elts + 1);
|
|
876
|
+
}
|
|
877
|
+
continue;
|
|
878
|
+
}
|
|
879
|
+
/*
|
|
880
|
+
* Open parentheses
|
|
881
|
+
*/
|
|
882
|
+
if (c == '(')
|
|
883
|
+
{
|
|
884
|
+
count = count_elts;
|
|
885
|
+
if (c1 == ')')
|
|
886
|
+
{
|
|
887
|
+
error_string = sformatf( "Empty parentheses.");
|
|
888
|
+
warning_msg(error_string);
|
|
889
|
+
}
|
|
890
|
+
paren_count++;
|
|
891
|
+
(*t_ptr)++;
|
|
892
|
+
if (get_secondary_in_species(t_ptr, coef) == ERROR)
|
|
893
|
+
{
|
|
894
|
+
return (ERROR);
|
|
895
|
+
}
|
|
896
|
+
if (get_num(t_ptr, &d) == ERROR)
|
|
897
|
+
{
|
|
898
|
+
return (ERROR);
|
|
899
|
+
}
|
|
900
|
+
for (size_t i = count; i < count_elts; i++)
|
|
901
|
+
{
|
|
902
|
+
elt_list[i].coef *= d;
|
|
903
|
+
}
|
|
904
|
+
continue;
|
|
905
|
+
}
|
|
906
|
+
/*
|
|
907
|
+
* Colon
|
|
908
|
+
*/
|
|
909
|
+
if (c == ':')
|
|
910
|
+
{
|
|
911
|
+
count = count_elts;
|
|
912
|
+
(*t_ptr)++;
|
|
913
|
+
if (get_num(t_ptr, &d) == ERROR)
|
|
914
|
+
{
|
|
915
|
+
return (ERROR);
|
|
916
|
+
}
|
|
917
|
+
if (get_secondary_in_species(t_ptr, coef) == ERROR)
|
|
918
|
+
{
|
|
919
|
+
return (ERROR);
|
|
920
|
+
}
|
|
921
|
+
for (size_t i = count; i < count_elts; i++)
|
|
922
|
+
{
|
|
923
|
+
elt_list[i].coef *= d;
|
|
924
|
+
}
|
|
925
|
+
continue;
|
|
926
|
+
}
|
|
927
|
+
/*
|
|
928
|
+
* Not beginning of element and not opening paren
|
|
929
|
+
*/
|
|
930
|
+
error_string = sformatf(
|
|
931
|
+
"Parsing error in get_secondary_in_species, unexpected character, %c.",
|
|
932
|
+
c);
|
|
933
|
+
error_msg(error_string, CONTINUE);
|
|
934
|
+
return (ERROR);
|
|
935
|
+
}
|
|
936
|
+
if (paren_count != 0)
|
|
937
|
+
{
|
|
938
|
+
error_string = sformatf("Unbalanced parentheses: %s", *t_ptr_save);
|
|
939
|
+
error_msg(error_string, CONTINUE);
|
|
940
|
+
return (ERROR);
|
|
941
|
+
}
|
|
942
|
+
return (OK);
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
/* ---------------------------------------------------------------------- */
|
|
946
|
+
int Phreeqc::
|
|
947
|
+
get_num(const char **t_ptr, LDBLE * num)
|
|
948
|
+
/* ---------------------------------------------------------------------- */
|
|
949
|
+
/*
|
|
950
|
+
* Function reads through a string looking for leading numeric field
|
|
951
|
+
* if no numeric field is found, the number is set to 1.0.
|
|
952
|
+
*
|
|
953
|
+
* Arguments:
|
|
954
|
+
*
|
|
955
|
+
* **t_ptr input, points to a position in a character string from which
|
|
956
|
+
* a number is to be extracted.
|
|
957
|
+
* output, points to next position to be parsed.
|
|
958
|
+
* *num address where the number is to be stored.
|
|
959
|
+
*
|
|
960
|
+
* Returns:
|
|
961
|
+
* ERROR,
|
|
962
|
+
* OK.
|
|
963
|
+
*/
|
|
964
|
+
{
|
|
965
|
+
int i, decimal;
|
|
966
|
+
char c;
|
|
967
|
+
char* ptr1;
|
|
968
|
+
char token[MAX_LENGTH];
|
|
969
|
+
|
|
970
|
+
*num = 1.0;
|
|
971
|
+
i = 0;
|
|
972
|
+
c = **t_ptr;
|
|
973
|
+
decimal = 0;
|
|
974
|
+
if (isdigit((int) c) || (c == '.'))
|
|
975
|
+
{
|
|
976
|
+
while (isdigit((int) c) || (c == '.'))
|
|
977
|
+
{
|
|
978
|
+
if (c == '.')
|
|
979
|
+
decimal++;
|
|
980
|
+
if (decimal > 1)
|
|
981
|
+
break;
|
|
982
|
+
token[i++] = c;
|
|
983
|
+
/* check number length */
|
|
984
|
+
if (i >= MAX_LENGTH)
|
|
985
|
+
{
|
|
986
|
+
error_string = sformatf(
|
|
987
|
+
"Number was greater than MAX_LENGTH characters.");
|
|
988
|
+
error_msg(error_string, CONTINUE);
|
|
989
|
+
input_error++;
|
|
990
|
+
return (ERROR);
|
|
991
|
+
}
|
|
992
|
+
c = *(++(*t_ptr));
|
|
993
|
+
}
|
|
994
|
+
token[i] = '\0';
|
|
995
|
+
errno = 0;
|
|
996
|
+
*num = strtod(token, &ptr1);
|
|
997
|
+
if (errno == ERANGE)
|
|
998
|
+
{
|
|
999
|
+
error_string = sformatf( "Converting number in get_num, %s.", token);
|
|
1000
|
+
input_error++;
|
|
1001
|
+
error_msg(error_string, CONTINUE);
|
|
1002
|
+
return (ERROR);
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
return (OK);
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
/* ---------------------------------------------------------------------- */
|
|
1009
|
+
int Phreeqc::
|
|
1010
|
+
get_species(const char **cptr)
|
|
1011
|
+
/* ---------------------------------------------------------------------- */
|
|
1012
|
+
{
|
|
1013
|
+
/* Function reads next species out of the equation, including optional
|
|
1014
|
+
* preceding coefficient and optional trailing charge. Data are
|
|
1015
|
+
* store in trxn.token[count].
|
|
1016
|
+
*
|
|
1017
|
+
* Arguments:
|
|
1018
|
+
* **cptr input, points to the position in the equation to pick up the species.
|
|
1019
|
+
* output, points to the next character after the species charge.
|
|
1020
|
+
*
|
|
1021
|
+
*/
|
|
1022
|
+
std::string string;
|
|
1023
|
+
int l;
|
|
1024
|
+
|
|
1025
|
+
if ((size_t) count_trxn + 1 > trxn.token.size())
|
|
1026
|
+
trxn.token.resize(count_trxn + 1);
|
|
1027
|
+
/* coefficient */
|
|
1028
|
+
if (get_coef(&(trxn.token[count_trxn].coef), cptr) == ERROR)
|
|
1029
|
+
{
|
|
1030
|
+
return (ERROR);
|
|
1031
|
+
}
|
|
1032
|
+
/* name and charge */
|
|
1033
|
+
if (get_token(cptr, string, &trxn.token[count_trxn].z, &l) == ERROR)
|
|
1034
|
+
{
|
|
1035
|
+
return (ERROR);
|
|
1036
|
+
}
|
|
1037
|
+
trxn.token[count_trxn].name = string_hsave(string.c_str());
|
|
1038
|
+
/*
|
|
1039
|
+
trxn.token[count_trxn].z = 0;
|
|
1040
|
+
trxn.token[count_trxn].s = NULL;
|
|
1041
|
+
trxn.token[count_trxn].unknown = NULL;
|
|
1042
|
+
*/
|
|
1043
|
+
return (OK);
|
|
1044
|
+
}
|