pyEQL 1.4.0rc9__cp312-cp312-macosx_10_13_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyEQL/__init__.py +50 -0
- pyEQL/_phreeqc.cpython-312-darwin.so +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/CMakeFiles/CTestScript.cmake +167 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/CSelectedOutput.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqc.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqcLib.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqc_interface_F.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/Var.c.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Dictionary.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ExchComp.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Exchange.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/GasComp.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/GasPhase.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ISolution.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ISolutionComp.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/KineticsComp.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/NameDouble.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/NumKeyword.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PBasic.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PHRQ_io_output.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PPassemblage.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PPassemblageComp.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Phreeqc.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PhreeqcKeywords/Keywords.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Pressure.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Reaction.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ReadClass.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SS.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SSassemblage.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SScomp.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SelectedOutput.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Serializer.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Solution.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SolutionIsotope.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/StorageBin.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/StorageBinList.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Surface.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SurfaceCharge.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SurfaceComp.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/System.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Temperature.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Use.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/UserPunch.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/advection.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/basicsubs.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cl1.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/PHRQ_base.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/PHRQ_io.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/Parser.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/Utils.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cvdense.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cvode.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cxxKinetics.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cxxMix.cxx.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/dense.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/dumper.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/gases.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/input.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/integrate.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/inverse.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/isotopes.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/kinetics.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/mainsubs.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/model.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/nvector.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/nvector_serial.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/parse.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/phqalloc.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/pitzer.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/pitzer_structures.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/prep.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/print.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/read.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/readtr.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/runner.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/sit.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/smalldense.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/spread.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/step.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/structures.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/sundialsmath.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/tally.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/tidy.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/transport.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/utilities.cpp.o +0 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CTestTestfile.cmake +6 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/DartConfiguration.tcl +109 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/cmake_install.cmake +45 -0
- pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/libIPhreeqc.a +0 -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 +491 -0
- pyeql-1.4.0rc9.dist-info/WHEEL +6 -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,1813 @@
|
|
|
1
|
+
#include "Phreeqc.h"
|
|
2
|
+
#include "phqalloc.h"
|
|
3
|
+
#include "Solution.h"
|
|
4
|
+
#include "Utils.h"
|
|
5
|
+
|
|
6
|
+
#if defined(PHREEQCI_GUI)
|
|
7
|
+
#ifdef _DEBUG
|
|
8
|
+
#define new DEBUG_NEW
|
|
9
|
+
#undef THIS_FILE
|
|
10
|
+
static char THIS_FILE[] = __FILE__;
|
|
11
|
+
#endif
|
|
12
|
+
#endif
|
|
13
|
+
|
|
14
|
+
/* ---------------------------------------------------------------------- */
|
|
15
|
+
int Phreeqc::
|
|
16
|
+
read_isotopes(void)
|
|
17
|
+
/* ---------------------------------------------------------------------- */
|
|
18
|
+
{
|
|
19
|
+
/*
|
|
20
|
+
* Reads master species information for isotopes
|
|
21
|
+
*
|
|
22
|
+
* Arguments:
|
|
23
|
+
* none
|
|
24
|
+
*
|
|
25
|
+
* Returns:
|
|
26
|
+
* KEYWORD if keyword encountered, input_error may be incremented if
|
|
27
|
+
* a keyword is encountered in an unexpected position
|
|
28
|
+
* EOF if eof encountered while reading mass balance concentrations
|
|
29
|
+
* ERROR if error occurred reading data
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
int l;
|
|
34
|
+
class master_isotope *master_isotope_ptr;
|
|
35
|
+
char token[MAX_LENGTH];
|
|
36
|
+
class element *elt_ptr;
|
|
37
|
+
|
|
38
|
+
int return_value, opt, opt_save;
|
|
39
|
+
const char* next_char;
|
|
40
|
+
const char *opt_list[] = {
|
|
41
|
+
"isotope", /* 0 */
|
|
42
|
+
"total_is_major" /* 1 */
|
|
43
|
+
};
|
|
44
|
+
int count_opt_list = 2;
|
|
45
|
+
|
|
46
|
+
master_isotope_ptr = NULL;
|
|
47
|
+
elt_ptr = NULL;
|
|
48
|
+
/*
|
|
49
|
+
* Read name followed by options
|
|
50
|
+
*/
|
|
51
|
+
opt_save = OPTION_DEFAULT;
|
|
52
|
+
return_value = UNKNOWN;
|
|
53
|
+
for (;;)
|
|
54
|
+
{
|
|
55
|
+
opt = get_option(opt_list, count_opt_list, &next_char);
|
|
56
|
+
if (opt == OPTION_DEFAULT)
|
|
57
|
+
{
|
|
58
|
+
opt = opt_save;
|
|
59
|
+
}
|
|
60
|
+
switch (opt)
|
|
61
|
+
{
|
|
62
|
+
case OPTION_EOF: /* end of file */
|
|
63
|
+
return_value = EOF;
|
|
64
|
+
break;
|
|
65
|
+
case OPTION_KEYWORD: /* keyword */
|
|
66
|
+
return_value = KEYWORD;
|
|
67
|
+
break;
|
|
68
|
+
case OPTION_ERROR:
|
|
69
|
+
input_error++;
|
|
70
|
+
error_msg("Unknown input in SPECIES keyword.", CONTINUE);
|
|
71
|
+
error_msg(line_save, CONTINUE);
|
|
72
|
+
break;
|
|
73
|
+
case 0: /* isotope */
|
|
74
|
+
if (elt_ptr == NULL)
|
|
75
|
+
{
|
|
76
|
+
error_string = sformatf(
|
|
77
|
+
"The element of which this isotope is a minor isotope has not been defined, %s. ISOTOPES data block.",
|
|
78
|
+
line);
|
|
79
|
+
error_msg(error_string, CONTINUE);
|
|
80
|
+
input_error++;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
/*
|
|
84
|
+
* Save an isotope
|
|
85
|
+
*/
|
|
86
|
+
master_isotope_ptr = NULL;
|
|
87
|
+
copy_token(token, &next_char, &l);
|
|
88
|
+
master_isotope_ptr = master_isotope_store(token, TRUE);
|
|
89
|
+
master_isotope_ptr->elt = elt_ptr;
|
|
90
|
+
master_isotope_ptr->minor_isotope = TRUE;
|
|
91
|
+
master_isotope_ptr->total_is_major = FALSE;
|
|
92
|
+
/*
|
|
93
|
+
* Read units
|
|
94
|
+
*/
|
|
95
|
+
if (copy_token(token, &next_char, &l) == EMPTY)
|
|
96
|
+
{
|
|
97
|
+
error_string = sformatf(
|
|
98
|
+
"Expecting units for isotopic values, %s. ISOTOPES data block.",
|
|
99
|
+
line);
|
|
100
|
+
error_msg(error_string, CONTINUE);
|
|
101
|
+
input_error++;
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
master_isotope_ptr->units = string_hsave(token);
|
|
105
|
+
/*
|
|
106
|
+
* Read standard
|
|
107
|
+
*/
|
|
108
|
+
if (copy_token(token, &next_char, &l) == EMPTY)
|
|
109
|
+
{
|
|
110
|
+
error_string = sformatf(
|
|
111
|
+
"Expecting isotope ratio of standard, %s. ISOTOPES data block.",
|
|
112
|
+
line);
|
|
113
|
+
error_msg(error_string, CONTINUE);
|
|
114
|
+
input_error++;
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
(void)sscanf(token, SCANFORMAT, &(master_isotope_ptr->standard));
|
|
118
|
+
opt_save = OPTION_DEFAULT;
|
|
119
|
+
break;
|
|
120
|
+
case 1: /* total_is_major_isotope */
|
|
121
|
+
error_string = sformatf(
|
|
122
|
+
"Obsolete identifier. The total of the element must be the sum of all isotopes. ISOTOPES data block.\n%s",
|
|
123
|
+
line);
|
|
124
|
+
warning_msg(error_string);
|
|
125
|
+
break;
|
|
126
|
+
case OPTION_DEFAULT:
|
|
127
|
+
/*
|
|
128
|
+
* Read and element name
|
|
129
|
+
*/
|
|
130
|
+
if (copy_token(token, &next_char, &l) == EMPTY)
|
|
131
|
+
{
|
|
132
|
+
error_string = sformatf(
|
|
133
|
+
"Expecting an element name for isotope definition, %s. ISOTOPES data block.",
|
|
134
|
+
line);
|
|
135
|
+
error_msg(error_string, CONTINUE);
|
|
136
|
+
input_error++;
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
elt_ptr = element_store(token);
|
|
140
|
+
master_isotope_ptr = master_isotope_store(token, TRUE);
|
|
141
|
+
master_isotope_ptr->elt = elt_ptr;
|
|
142
|
+
master_isotope_ptr->minor_isotope = FALSE;
|
|
143
|
+
master_isotope_ptr->total_is_major = FALSE;
|
|
144
|
+
opt_save = OPTION_DEFAULT;
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
if (return_value == EOF || return_value == KEYWORD)
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
return (return_value);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* ---------------------------------------------------------------------- */
|
|
154
|
+
int Phreeqc::
|
|
155
|
+
read_calculate_values(void)
|
|
156
|
+
/* ---------------------------------------------------------------------- */
|
|
157
|
+
{
|
|
158
|
+
/*
|
|
159
|
+
* Reads basic code with which to calculate calculate_value
|
|
160
|
+
*
|
|
161
|
+
* Arguments:
|
|
162
|
+
* none
|
|
163
|
+
*
|
|
164
|
+
* Returns:
|
|
165
|
+
* KEYWORD if keyword encountered, input_error may be incremented if
|
|
166
|
+
* a keyword is encountered in an unexpected position
|
|
167
|
+
* EOF if eof encountered while reading mass balance concentrations
|
|
168
|
+
* ERROR if error occurred reading data
|
|
169
|
+
*
|
|
170
|
+
*/
|
|
171
|
+
int l;
|
|
172
|
+
int return_value, opt, opt_save;
|
|
173
|
+
char token[MAX_LENGTH];
|
|
174
|
+
class calculate_value *calculate_value_ptr;
|
|
175
|
+
const char* next_char;
|
|
176
|
+
const char *opt_list[] = {
|
|
177
|
+
"start", /* 0 */
|
|
178
|
+
"end" /* 1 */
|
|
179
|
+
};
|
|
180
|
+
int count_opt_list = 2;
|
|
181
|
+
opt_save = OPTION_DEFAULT;
|
|
182
|
+
/*
|
|
183
|
+
* Read lines
|
|
184
|
+
*/
|
|
185
|
+
return_value = UNKNOWN;
|
|
186
|
+
calculate_value_ptr = NULL;
|
|
187
|
+
for (;;)
|
|
188
|
+
{
|
|
189
|
+
opt = get_option(opt_list, count_opt_list, &next_char);
|
|
190
|
+
if (opt == OPTION_DEFAULT)
|
|
191
|
+
{
|
|
192
|
+
opt = opt_save;
|
|
193
|
+
}
|
|
194
|
+
switch (opt)
|
|
195
|
+
{
|
|
196
|
+
case OPTION_EOF: /* end of file */
|
|
197
|
+
return_value = EOF;
|
|
198
|
+
break;
|
|
199
|
+
case OPTION_KEYWORD: /* keyword */
|
|
200
|
+
return_value = KEYWORD;
|
|
201
|
+
break;
|
|
202
|
+
case OPTION_ERROR:
|
|
203
|
+
input_error++;
|
|
204
|
+
error_msg("Unknown input in CALCULATE_VALUE keyword.", CONTINUE);
|
|
205
|
+
error_msg(line_save, CONTINUE);
|
|
206
|
+
break;
|
|
207
|
+
case 0: /* start */
|
|
208
|
+
opt_save = OPT_1;
|
|
209
|
+
break;
|
|
210
|
+
case 1: /* end */
|
|
211
|
+
opt_save = OPTION_DEFAULT;
|
|
212
|
+
break;
|
|
213
|
+
case OPTION_DEFAULT: /* read calculate_value name */
|
|
214
|
+
/*
|
|
215
|
+
* Read calculate_value name
|
|
216
|
+
*/
|
|
217
|
+
if (copy_token(token, &next_char, &l) == EMPTY)
|
|
218
|
+
{
|
|
219
|
+
error_string = sformatf(
|
|
220
|
+
"Expecting a name for calculate_value definition, %s. CALCULATE_VALUES data block.",
|
|
221
|
+
line);
|
|
222
|
+
error_msg(error_string, CONTINUE);
|
|
223
|
+
input_error++;
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
calculate_value_ptr = calculate_value_store(token, TRUE);
|
|
227
|
+
calculate_value_ptr->new_def = TRUE;
|
|
228
|
+
calculate_value_ptr->commands.clear();
|
|
229
|
+
calculate_value_ptr->linebase = NULL;
|
|
230
|
+
calculate_value_ptr->varbase = NULL;
|
|
231
|
+
calculate_value_ptr->loopbase = NULL;
|
|
232
|
+
opt_save = OPT_1;
|
|
233
|
+
break;
|
|
234
|
+
|
|
235
|
+
case OPT_1: /* read command */
|
|
236
|
+
if (calculate_value_ptr)
|
|
237
|
+
{
|
|
238
|
+
calculate_value_ptr->commands.append(";\0");
|
|
239
|
+
calculate_value_ptr->commands.append(line);
|
|
240
|
+
opt_save = OPT_1;
|
|
241
|
+
}
|
|
242
|
+
else
|
|
243
|
+
{
|
|
244
|
+
error_string = sformatf(
|
|
245
|
+
"Expecting a calculate_value definition, %s. CALCULATE_VALUES data block.",
|
|
246
|
+
line);
|
|
247
|
+
error_msg(error_string, CONTINUE);
|
|
248
|
+
input_error++;
|
|
249
|
+
}
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
if (return_value == EOF || return_value == KEYWORD)
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
/* output_msg(sformatf( "%s", calculate_value[0].commands));
|
|
256
|
+
*/ return (return_value);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/* ---------------------------------------------------------------------- */
|
|
260
|
+
int Phreeqc::
|
|
261
|
+
read_isotope_ratios(void)
|
|
262
|
+
/* ---------------------------------------------------------------------- */
|
|
263
|
+
{
|
|
264
|
+
/*
|
|
265
|
+
* Reads isotope_ratio info, ratios are calculated with
|
|
266
|
+
* Basic programs read in CALCULATE_VALUE data block
|
|
267
|
+
*
|
|
268
|
+
* Arguments:
|
|
269
|
+
* none
|
|
270
|
+
*
|
|
271
|
+
* Returns:
|
|
272
|
+
* KEYWORD if keyword encountered, input_error may be incremented if
|
|
273
|
+
* a keyword is encountered in an unexpected position
|
|
274
|
+
* EOF if eof encountered while reading mass balance concentrations
|
|
275
|
+
* ERROR if error occurred reading data
|
|
276
|
+
*
|
|
277
|
+
*/
|
|
278
|
+
int l;
|
|
279
|
+
int return_value, opt, opt_save;
|
|
280
|
+
char token[MAX_LENGTH];
|
|
281
|
+
class isotope_ratio *isotope_ratio_ptr;
|
|
282
|
+
const char* next_char;
|
|
283
|
+
const char *opt_list[] = {
|
|
284
|
+
"no_options" /* 0 */
|
|
285
|
+
};
|
|
286
|
+
int count_opt_list = 0;
|
|
287
|
+
opt_save = OPTION_DEFAULT;
|
|
288
|
+
/*
|
|
289
|
+
* Read lines
|
|
290
|
+
*/
|
|
291
|
+
return_value = UNKNOWN;
|
|
292
|
+
isotope_ratio_ptr = NULL;
|
|
293
|
+
for (;;)
|
|
294
|
+
{
|
|
295
|
+
opt = get_option(opt_list, count_opt_list, &next_char);
|
|
296
|
+
if (opt == OPTION_DEFAULT)
|
|
297
|
+
{
|
|
298
|
+
opt = opt_save;
|
|
299
|
+
}
|
|
300
|
+
switch (opt)
|
|
301
|
+
{
|
|
302
|
+
case OPTION_EOF: /* end of file */
|
|
303
|
+
return_value = EOF;
|
|
304
|
+
break;
|
|
305
|
+
case OPTION_KEYWORD: /* keyword */
|
|
306
|
+
return_value = KEYWORD;
|
|
307
|
+
break;
|
|
308
|
+
case OPTION_ERROR:
|
|
309
|
+
input_error++;
|
|
310
|
+
error_msg("Unknown input in ISOTOPE_RATIOS keyword.", CONTINUE);
|
|
311
|
+
error_msg(line_save, CONTINUE);
|
|
312
|
+
break;
|
|
313
|
+
case OPTION_DEFAULT: /* read isotope_ratio name */
|
|
314
|
+
/*
|
|
315
|
+
* Read isotope_ratio name
|
|
316
|
+
*/
|
|
317
|
+
if (copy_token(token, &next_char, &l) == EMPTY)
|
|
318
|
+
{
|
|
319
|
+
error_string = sformatf(
|
|
320
|
+
"Expecting a name for isotope_ratio definition, %s. ISOTOPE_RATIOS data block.",
|
|
321
|
+
line);
|
|
322
|
+
error_msg(error_string, CONTINUE);
|
|
323
|
+
input_error++;
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
isotope_ratio_ptr = isotope_ratio_store(token, TRUE);
|
|
327
|
+
/*
|
|
328
|
+
* Read isotope
|
|
329
|
+
*/
|
|
330
|
+
if (copy_token(token, &next_char, &l) == EMPTY)
|
|
331
|
+
{
|
|
332
|
+
error_string = sformatf(
|
|
333
|
+
"Expecting a name of isotope for an isotope_ratio definition, %s. ISOTOPE_RATIOS data block.",
|
|
334
|
+
line);
|
|
335
|
+
error_msg(error_string, CONTINUE);
|
|
336
|
+
input_error++;
|
|
337
|
+
break;
|
|
338
|
+
}
|
|
339
|
+
isotope_ratio_ptr->isotope_name = string_hsave(token);
|
|
340
|
+
opt_save = OPTION_DEFAULT;
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
if (return_value == EOF || return_value == KEYWORD)
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
return (return_value);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/* ---------------------------------------------------------------------- */
|
|
350
|
+
int Phreeqc::
|
|
351
|
+
read_isotope_alphas(void)
|
|
352
|
+
/* ---------------------------------------------------------------------- */
|
|
353
|
+
{
|
|
354
|
+
/*
|
|
355
|
+
* Reads isotope_alpha info, ratios are calculated with
|
|
356
|
+
* Basic programs read in CALCULATE_VALUE data block
|
|
357
|
+
*
|
|
358
|
+
* Arguments:
|
|
359
|
+
* none
|
|
360
|
+
*
|
|
361
|
+
* Returns:
|
|
362
|
+
* KEYWORD if keyword encountered, input_error may be incremented if
|
|
363
|
+
* a keyword is encountered in an unexpected position
|
|
364
|
+
* EOF if eof encountered while reading mass balance concentrations
|
|
365
|
+
* ERROR if error occurred reading data
|
|
366
|
+
*
|
|
367
|
+
*/
|
|
368
|
+
int l;
|
|
369
|
+
int return_value, opt, opt_save;
|
|
370
|
+
char token[MAX_LENGTH];
|
|
371
|
+
class isotope_alpha *isotope_alpha_ptr;
|
|
372
|
+
const char* next_char;
|
|
373
|
+
const char *opt_list[] = {
|
|
374
|
+
"no_options" /* 0 */
|
|
375
|
+
};
|
|
376
|
+
int count_opt_list = 0;
|
|
377
|
+
opt_save = OPTION_DEFAULT;
|
|
378
|
+
/*
|
|
379
|
+
* Read lines
|
|
380
|
+
*/
|
|
381
|
+
return_value = UNKNOWN;
|
|
382
|
+
isotope_alpha_ptr = NULL;
|
|
383
|
+
for (;;)
|
|
384
|
+
{
|
|
385
|
+
opt = get_option(opt_list, count_opt_list, &next_char);
|
|
386
|
+
if (opt == OPTION_DEFAULT)
|
|
387
|
+
{
|
|
388
|
+
opt = opt_save;
|
|
389
|
+
}
|
|
390
|
+
switch (opt)
|
|
391
|
+
{
|
|
392
|
+
case OPTION_EOF: /* end of file */
|
|
393
|
+
return_value = EOF;
|
|
394
|
+
break;
|
|
395
|
+
case OPTION_KEYWORD: /* keyword */
|
|
396
|
+
return_value = KEYWORD;
|
|
397
|
+
break;
|
|
398
|
+
case OPTION_ERROR:
|
|
399
|
+
input_error++;
|
|
400
|
+
error_msg("Unknown input in ISOTOPE_ALPHAS keyword.", CONTINUE);
|
|
401
|
+
error_msg(line_save, CONTINUE);
|
|
402
|
+
break;
|
|
403
|
+
case OPTION_DEFAULT: /* read isotope_alpha name */
|
|
404
|
+
/*
|
|
405
|
+
* Read isotope_alpha name
|
|
406
|
+
*/
|
|
407
|
+
if (copy_token(token, &next_char, &l) == EMPTY)
|
|
408
|
+
{
|
|
409
|
+
error_string = sformatf(
|
|
410
|
+
"Expecting a name for isotope_alpha definition, %s. ISOTOPE_ALPHAS data block.",
|
|
411
|
+
line);
|
|
412
|
+
error_msg(error_string, CONTINUE);
|
|
413
|
+
input_error++;
|
|
414
|
+
break;
|
|
415
|
+
}
|
|
416
|
+
isotope_alpha_ptr = isotope_alpha_store(token, TRUE);
|
|
417
|
+
isotope_alpha_ptr->name = string_hsave(token);
|
|
418
|
+
if (copy_token(token, &next_char, &l) != EMPTY)
|
|
419
|
+
{
|
|
420
|
+
isotope_alpha_ptr->named_logk = string_hsave(token);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
opt_save = OPTION_DEFAULT;
|
|
425
|
+
break;
|
|
426
|
+
}
|
|
427
|
+
if (return_value == EOF || return_value == KEYWORD)
|
|
428
|
+
break;
|
|
429
|
+
}
|
|
430
|
+
return (return_value);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/* ---------------------------------------------------------------------- */
|
|
434
|
+
int Phreeqc::
|
|
435
|
+
add_isotopes(cxxSolution &solution_ref)
|
|
436
|
+
/* ---------------------------------------------------------------------- */
|
|
437
|
+
{
|
|
438
|
+
int i;
|
|
439
|
+
class master_isotope *master_isotope_ptr;
|
|
440
|
+
LDBLE total_moles;
|
|
441
|
+
/*
|
|
442
|
+
* zero out isotopes
|
|
443
|
+
*/
|
|
444
|
+
for (i = 0; i < (int)master_isotope.size(); i++)
|
|
445
|
+
{
|
|
446
|
+
master_isotope[i]->moles = 0;
|
|
447
|
+
}
|
|
448
|
+
master_isotope_ptr = master_isotope_search("H");
|
|
449
|
+
if (master_isotope_ptr != NULL)
|
|
450
|
+
{
|
|
451
|
+
total_moles = total_h_x;
|
|
452
|
+
calculate_isotope_moles(master_isotope_ptr->elt, &solution_ref,
|
|
453
|
+
total_moles);
|
|
454
|
+
}
|
|
455
|
+
master_isotope_ptr = master_isotope_search("O");
|
|
456
|
+
if (master_isotope_ptr != NULL)
|
|
457
|
+
{
|
|
458
|
+
total_moles = total_o_x;
|
|
459
|
+
calculate_isotope_moles(master_isotope_ptr->elt, &solution_ref,
|
|
460
|
+
total_moles);
|
|
461
|
+
}
|
|
462
|
+
cxxNameDouble::iterator it = solution_ref.Get_totals().begin();
|
|
463
|
+
for ( ; it != solution_ref.Get_totals().end(); it++)
|
|
464
|
+
{
|
|
465
|
+
master_isotope_ptr = master_isotope_search(it->first.c_str());
|
|
466
|
+
if (master_isotope_ptr == NULL)
|
|
467
|
+
continue;
|
|
468
|
+
if (master_isotope_ptr->minor_isotope == FALSE)
|
|
469
|
+
{
|
|
470
|
+
total_moles = total(master_isotope_ptr->name) * mass_water_aq_x;
|
|
471
|
+
calculate_isotope_moles(master_isotope_ptr->elt, &solution_ref,
|
|
472
|
+
total_moles);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
/*
|
|
476
|
+
* Set isotopes flag
|
|
477
|
+
*/
|
|
478
|
+
initial_solution_isotopes = FALSE;
|
|
479
|
+
for (i = 0; i < (int)master_isotope.size(); i++)
|
|
480
|
+
{
|
|
481
|
+
if (master_isotope[i]->minor_isotope == TRUE
|
|
482
|
+
&& master_isotope[i]->moles > 0)
|
|
483
|
+
{
|
|
484
|
+
initial_solution_isotopes = TRUE;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
return (OK);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/* ---------------------------------------------------------------------- */
|
|
491
|
+
int Phreeqc::
|
|
492
|
+
calculate_isotope_moles(class element *elt_ptr,
|
|
493
|
+
cxxSolution *solution_ptr, LDBLE total_moles)
|
|
494
|
+
/* ---------------------------------------------------------------------- */
|
|
495
|
+
{
|
|
496
|
+
int i, j, l_iter;
|
|
497
|
+
int count_isotopes, total_is_major;
|
|
498
|
+
class master_isotope *master_isotope_ptr, *master_isotope_ptr1;
|
|
499
|
+
class master_isotope list[MAX_ELTS];
|
|
500
|
+
LDBLE m_major, tot;
|
|
501
|
+
/*
|
|
502
|
+
* Get total concentration of elt_ptr
|
|
503
|
+
*/
|
|
504
|
+
if (total_moles <= 0)
|
|
505
|
+
{
|
|
506
|
+
error_string = sformatf(
|
|
507
|
+
"Cannot calculate molality of isotopes, molality of element is zero, %s",
|
|
508
|
+
elt_ptr->name);
|
|
509
|
+
warning_msg(error_string);
|
|
510
|
+
return (ERROR);
|
|
511
|
+
}
|
|
512
|
+
m_major = total_moles;
|
|
513
|
+
/*
|
|
514
|
+
* Make a list of isotopes
|
|
515
|
+
*/
|
|
516
|
+
count_isotopes = 0;
|
|
517
|
+
total_is_major = FALSE;
|
|
518
|
+
master_isotope_ptr = master_isotope_search("H");
|
|
519
|
+
if ((master_isotope_ptr != NULL) && (master_isotope_ptr->elt == elt_ptr))
|
|
520
|
+
{
|
|
521
|
+
// memcpy(&(list[count_isotopes]), master_isotope_ptr,
|
|
522
|
+
// sizeof(class master_isotope));
|
|
523
|
+
list[count_isotopes] = *master_isotope_ptr;
|
|
524
|
+
list[count_isotopes].ratio = 1.0;
|
|
525
|
+
if (list[count_isotopes].minor_isotope == FALSE)
|
|
526
|
+
{
|
|
527
|
+
total_is_major = list[count_isotopes].total_is_major;
|
|
528
|
+
}
|
|
529
|
+
count_isotopes++;
|
|
530
|
+
}
|
|
531
|
+
master_isotope_ptr = master_isotope_search("O");
|
|
532
|
+
if ((master_isotope_ptr != NULL) && (master_isotope_ptr->elt == elt_ptr))
|
|
533
|
+
{
|
|
534
|
+
// memcpy(&(list[count_isotopes]), master_isotope_ptr,
|
|
535
|
+
// sizeof(class master_isotope));
|
|
536
|
+
list[count_isotopes] = *master_isotope_ptr;
|
|
537
|
+
list[count_isotopes].ratio = 1.0;
|
|
538
|
+
if (list[count_isotopes].minor_isotope == FALSE)
|
|
539
|
+
{
|
|
540
|
+
total_is_major = list[count_isotopes].total_is_major;
|
|
541
|
+
}
|
|
542
|
+
count_isotopes++;
|
|
543
|
+
}
|
|
544
|
+
if (solution_ptr->Get_initial_data() != NULL)
|
|
545
|
+
{
|
|
546
|
+
std::map<std::string, cxxISolutionComp>::iterator it = solution_ptr->Get_initial_data()->Get_comps().begin();
|
|
547
|
+
for ( ; it != solution_ptr->Get_initial_data()->Get_comps().end(); it++)
|
|
548
|
+
{
|
|
549
|
+
master_isotope_ptr = master_isotope_search(it->first.c_str());
|
|
550
|
+
if (master_isotope_ptr == NULL)
|
|
551
|
+
continue;
|
|
552
|
+
if (master_isotope_ptr->elt != elt_ptr)
|
|
553
|
+
continue;
|
|
554
|
+
// memcpy(&(list[count_isotopes]), master_isotope_ptr,
|
|
555
|
+
// sizeof(class master_isotope));
|
|
556
|
+
list[count_isotopes] = *master_isotope_ptr;
|
|
557
|
+
if (list[count_isotopes].minor_isotope == FALSE)
|
|
558
|
+
{
|
|
559
|
+
total_is_major = list[count_isotopes].total_is_major;
|
|
560
|
+
}
|
|
561
|
+
count_isotopes++;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
/*
|
|
565
|
+
* Loop to calculate isotope molalities
|
|
566
|
+
*/
|
|
567
|
+
for (l_iter = 0; l_iter < itmax; l_iter++)
|
|
568
|
+
{
|
|
569
|
+
tot = 0;
|
|
570
|
+
for (i = 0; i < count_isotopes; i++)
|
|
571
|
+
{
|
|
572
|
+
if (list[i].minor_isotope == FALSE)
|
|
573
|
+
{
|
|
574
|
+
list[i].moles = m_major;
|
|
575
|
+
tot += m_major;
|
|
576
|
+
continue;
|
|
577
|
+
}
|
|
578
|
+
if (strcmp_nocase(list[i].units, "permil") == 0)
|
|
579
|
+
{
|
|
580
|
+
from_permil(&(list[i]), m_major);
|
|
581
|
+
tot += list[i].moles;
|
|
582
|
+
continue;
|
|
583
|
+
}
|
|
584
|
+
if (strcmp_nocase(list[i].units, "pct") == 0)
|
|
585
|
+
{
|
|
586
|
+
from_pct(&(list[i]), total_moles);
|
|
587
|
+
tot += list[i].moles;
|
|
588
|
+
continue;
|
|
589
|
+
}
|
|
590
|
+
if (strcmp_nocase(list[i].units, "pmc") == 0)
|
|
591
|
+
{
|
|
592
|
+
from_pct(&(list[i]), total_moles);
|
|
593
|
+
tot += list[i].moles;
|
|
594
|
+
continue;
|
|
595
|
+
}
|
|
596
|
+
if (strcmp_nocase(list[i].units, "tu") == 0)
|
|
597
|
+
{
|
|
598
|
+
from_tu(&(list[i]));
|
|
599
|
+
tot += list[i].moles;
|
|
600
|
+
continue;
|
|
601
|
+
}
|
|
602
|
+
if (strcmp_nocase(list[i].units, "pci/l") == 0)
|
|
603
|
+
{
|
|
604
|
+
from_pcil(&(list[i]));
|
|
605
|
+
tot += list[i].moles;
|
|
606
|
+
continue;
|
|
607
|
+
}
|
|
608
|
+
error_string = sformatf( "Isotope units not recognized, %s",
|
|
609
|
+
list[i].units);
|
|
610
|
+
input_error++;
|
|
611
|
+
error_msg(error_string, CONTINUE);
|
|
612
|
+
}
|
|
613
|
+
if (total_is_major == TRUE)
|
|
614
|
+
break;
|
|
615
|
+
if (fabs(total_moles - tot) < convergence_tolerance * total_moles)
|
|
616
|
+
{
|
|
617
|
+
break;
|
|
618
|
+
}
|
|
619
|
+
else
|
|
620
|
+
{
|
|
621
|
+
m_major = m_major * total_moles / tot;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
if (l_iter >= itmax)
|
|
625
|
+
{
|
|
626
|
+
error_msg("Failed to converge in CALCULATE_ISOTOPE_MOLES.", STOP);
|
|
627
|
+
}
|
|
628
|
+
/*
|
|
629
|
+
* Update master_isotope
|
|
630
|
+
*/
|
|
631
|
+
for (j = 0; j < (int)master_isotope.size(); j++)
|
|
632
|
+
{
|
|
633
|
+
for (i = 0; i < count_isotopes; i++)
|
|
634
|
+
{
|
|
635
|
+
if (list[i].name == master_isotope[j]->name)
|
|
636
|
+
{
|
|
637
|
+
// memcpy(master_isotope[j], &(list[i]),
|
|
638
|
+
// sizeof(class master_isotope));
|
|
639
|
+
*master_isotope[j] = list[i];
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
/*
|
|
644
|
+
* Update solution
|
|
645
|
+
*/
|
|
646
|
+
master_isotope_ptr1 = master_isotope_search("H");
|
|
647
|
+
if (master_isotope_ptr1 != NULL && master_isotope_ptr1->elt == elt_ptr)
|
|
648
|
+
{
|
|
649
|
+
total_h_x = m_major;
|
|
650
|
+
}
|
|
651
|
+
master_isotope_ptr1 = master_isotope_search("O");
|
|
652
|
+
if (master_isotope_ptr1 != NULL && master_isotope_ptr1->elt == elt_ptr)
|
|
653
|
+
{
|
|
654
|
+
total_o_x = m_major;
|
|
655
|
+
}
|
|
656
|
+
//cxxNameDouble nd(solution_ptr->Get_totals());
|
|
657
|
+
//cxxNameDouble::iterator iit = solution_ptr->Get_totals().begin();
|
|
658
|
+
//for ( ; iit != solution_ptr->Get_totals().end(); iit++)
|
|
659
|
+
//{
|
|
660
|
+
// master_isotope_ptr = master_isotope_search(iit->first.c_str());
|
|
661
|
+
// if (master_isotope_ptr == NULL)
|
|
662
|
+
// continue;
|
|
663
|
+
// if (master_isotope_ptr->elt != elt_ptr)
|
|
664
|
+
// continue;
|
|
665
|
+
// nd[iit->first] = master_isotope_ptr->moles;
|
|
666
|
+
//}
|
|
667
|
+
|
|
668
|
+
return (OK);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
/* ---------------------------------------------------------------------- */
|
|
672
|
+
int Phreeqc::
|
|
673
|
+
from_permil(class master_isotope *master_isotope_ptr, LDBLE major_total)
|
|
674
|
+
/* ---------------------------------------------------------------------- */
|
|
675
|
+
{
|
|
676
|
+
LDBLE r;
|
|
677
|
+
|
|
678
|
+
r = (master_isotope_ptr->ratio / 1000. +
|
|
679
|
+
1.0) * master_isotope_ptr->standard;
|
|
680
|
+
master_isotope_ptr->moles = major_total * r;
|
|
681
|
+
return (OK);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
/* ---------------------------------------------------------------------- */
|
|
685
|
+
int Phreeqc::
|
|
686
|
+
from_pct(class master_isotope *master_isotope_ptr, LDBLE total_moles)
|
|
687
|
+
/* ---------------------------------------------------------------------- */
|
|
688
|
+
{
|
|
689
|
+
master_isotope_ptr->moles =
|
|
690
|
+
master_isotope_ptr->ratio / 100 * master_isotope_ptr->standard *
|
|
691
|
+
total_moles;
|
|
692
|
+
return (OK);
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
/* ---------------------------------------------------------------------- */
|
|
696
|
+
int Phreeqc::
|
|
697
|
+
from_tu(class master_isotope *master_isotope_ptr)
|
|
698
|
+
/* ---------------------------------------------------------------------- */
|
|
699
|
+
{
|
|
700
|
+
master_isotope_ptr->moles =
|
|
701
|
+
master_isotope_ptr->ratio * master_isotope_ptr->standard *
|
|
702
|
+
mass_water_aq_x / gfw_water;
|
|
703
|
+
return (OK);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
/* ---------------------------------------------------------------------- */
|
|
707
|
+
int Phreeqc::
|
|
708
|
+
from_pcil(class master_isotope *master_isotope_ptr)
|
|
709
|
+
/* ---------------------------------------------------------------------- */
|
|
710
|
+
{
|
|
711
|
+
master_isotope_ptr->moles =
|
|
712
|
+
master_isotope_ptr->ratio * master_isotope_ptr->standard *
|
|
713
|
+
mass_water_aq_x / gfw_water;
|
|
714
|
+
return (OK);
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/* ---------------------------------------------------------------------- */
|
|
718
|
+
int Phreeqc::
|
|
719
|
+
print_initial_solution_isotopes(void)
|
|
720
|
+
/* ---------------------------------------------------------------------- */
|
|
721
|
+
{
|
|
722
|
+
/*
|
|
723
|
+
* Print isotopes for initial solution
|
|
724
|
+
*/
|
|
725
|
+
int i, j;
|
|
726
|
+
int print_isotope;
|
|
727
|
+
|
|
728
|
+
if (pr.initial_isotopes == FALSE || pr.all == FALSE)
|
|
729
|
+
return (OK);
|
|
730
|
+
if (state != INITIAL_SOLUTION)
|
|
731
|
+
return (OK);
|
|
732
|
+
if (initial_solution_isotopes == FALSE)
|
|
733
|
+
return (OK);
|
|
734
|
+
/*
|
|
735
|
+
* Print heading
|
|
736
|
+
*/
|
|
737
|
+
print_centered("Isotopes");
|
|
738
|
+
output_msg(sformatf( "%10s\t%12s\t%12s\t%12s\t%12s\n\n", "Isotope",
|
|
739
|
+
"Molality", "Moles", "Ratio", "Units"));
|
|
740
|
+
for (i = 0; i < (int)master_isotope.size(); i++)
|
|
741
|
+
{
|
|
742
|
+
if (master_isotope[i]->minor_isotope == FALSE)
|
|
743
|
+
{
|
|
744
|
+
print_isotope = FALSE;
|
|
745
|
+
for (j = 0; j < (int)master_isotope.size(); j++)
|
|
746
|
+
{
|
|
747
|
+
if ((master_isotope[j]->elt == master_isotope[i]->elt) &&
|
|
748
|
+
(master_isotope[j]->minor_isotope == TRUE) &&
|
|
749
|
+
(master_isotope[j]->moles > 0))
|
|
750
|
+
{
|
|
751
|
+
print_isotope = TRUE;
|
|
752
|
+
break;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
if (print_isotope == FALSE)
|
|
756
|
+
continue;
|
|
757
|
+
/*
|
|
758
|
+
* Print isotope values
|
|
759
|
+
*/
|
|
760
|
+
output_msg(sformatf( "%10s\t%12.5e\t%12.5e\n",
|
|
761
|
+
master_isotope[i]->name,
|
|
762
|
+
(double) (master_isotope[i]->moles / mass_water_aq_x),
|
|
763
|
+
(double) master_isotope[i]->moles));
|
|
764
|
+
for (j = 0; j < (int)master_isotope.size(); j++)
|
|
765
|
+
{
|
|
766
|
+
if (i == j)
|
|
767
|
+
continue;
|
|
768
|
+
if ((master_isotope[j]->elt == master_isotope[i]->elt) &&
|
|
769
|
+
(master_isotope[j]->minor_isotope == TRUE))
|
|
770
|
+
{
|
|
771
|
+
output_msg(sformatf(
|
|
772
|
+
"%10s\t%12.5e\t%12.5e\t%12.5e\t%12s\n",
|
|
773
|
+
master_isotope[j]->name,
|
|
774
|
+
(double) (master_isotope[j]->moles /
|
|
775
|
+
mass_water_aq_x),
|
|
776
|
+
(double) master_isotope[j]->moles,
|
|
777
|
+
(double) master_isotope[j]->ratio,
|
|
778
|
+
master_isotope[j]->units));
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
output_msg(sformatf( "\n"));
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
return (OK);
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
/* ---------------------------------------------------------------------- */
|
|
788
|
+
int Phreeqc::
|
|
789
|
+
punch_isotopes(void)
|
|
790
|
+
/* ---------------------------------------------------------------------- */
|
|
791
|
+
{
|
|
792
|
+
/*
|
|
793
|
+
* Punch isotope ratios relative to standards
|
|
794
|
+
*/
|
|
795
|
+
//int i;
|
|
796
|
+
LDBLE iso;
|
|
797
|
+
class isotope_ratio *isotope_ratio_ptr;
|
|
798
|
+
class master_isotope *master_isotope_ptr;
|
|
799
|
+
|
|
800
|
+
//if (punch.in == FALSE || punch.isotopes == FALSE)
|
|
801
|
+
// return (OK);
|
|
802
|
+
if (current_selected_output->Get_isotopes().size() == 0)
|
|
803
|
+
return(OK);
|
|
804
|
+
//if (punch.count_isotopes == 0)
|
|
805
|
+
// return (OK);
|
|
806
|
+
//for (i = 0; i < punch.count_isotopes; i++)
|
|
807
|
+
for (size_t i = 0; i < current_selected_output->Get_isotopes().size(); i++)
|
|
808
|
+
{
|
|
809
|
+
iso = MISSING;
|
|
810
|
+
if (state == INITIAL_SOLUTION)
|
|
811
|
+
{
|
|
812
|
+
isotope_ratio_ptr = isotope_ratio_search(current_selected_output->Get_isotopes()[i].first.c_str());
|
|
813
|
+
if (isotope_ratio_ptr != NULL)
|
|
814
|
+
{
|
|
815
|
+
master_isotope_ptr =
|
|
816
|
+
master_isotope_search(isotope_ratio_ptr->isotope_name);
|
|
817
|
+
if (master_isotope_ptr != NULL
|
|
818
|
+
&& master_isotope_ptr->minor_isotope == TRUE)
|
|
819
|
+
{
|
|
820
|
+
iso = master_isotope_ptr->ratio;
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
else
|
|
825
|
+
{
|
|
826
|
+
isotope_ratio_ptr = isotope_ratio_search(current_selected_output->Get_isotopes()[i].first.c_str());
|
|
827
|
+
if (isotope_ratio_ptr != NULL)
|
|
828
|
+
{
|
|
829
|
+
iso = isotope_ratio_ptr->converted_ratio;
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
if (!current_selected_output->Get_high_precision())
|
|
833
|
+
{
|
|
834
|
+
fpunchf(sformatf("I_%s", current_selected_output->Get_isotopes()[i].first.c_str()), "%12.4e\t",
|
|
835
|
+
(double) iso);
|
|
836
|
+
}
|
|
837
|
+
else
|
|
838
|
+
{
|
|
839
|
+
fpunchf(sformatf("I_%s", current_selected_output->Get_isotopes()[i].first.c_str()), "%20.12e\t",
|
|
840
|
+
(double) iso);
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
}
|
|
844
|
+
return (OK);
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
/* ---------------------------------------------------------------------- */
|
|
848
|
+
int Phreeqc::
|
|
849
|
+
punch_calculate_values(void)
|
|
850
|
+
/* ---------------------------------------------------------------------- */
|
|
851
|
+
{
|
|
852
|
+
/*
|
|
853
|
+
* Punch calculate values
|
|
854
|
+
*/
|
|
855
|
+
//int i;
|
|
856
|
+
LDBLE result;
|
|
857
|
+
class calculate_value *calculate_value_ptr;
|
|
858
|
+
char l_command[] = "run";
|
|
859
|
+
|
|
860
|
+
if (current_selected_output->Get_calculate_values().size() == 0)
|
|
861
|
+
return OK;
|
|
862
|
+
|
|
863
|
+
for (size_t i = 0; i < current_selected_output->Get_calculate_values().size(); i++)
|
|
864
|
+
{
|
|
865
|
+
result = MISSING;
|
|
866
|
+
calculate_value_ptr =
|
|
867
|
+
calculate_value_search(current_selected_output->Get_calculate_values()[i].first.c_str());
|
|
868
|
+
if (!calculate_value_ptr)
|
|
869
|
+
{
|
|
870
|
+
error_string = sformatf(
|
|
871
|
+
"Definition not found for CALCULATE_VALUES %s.",
|
|
872
|
+
current_selected_output->Get_calculate_values()[i].first.c_str());
|
|
873
|
+
error_msg(error_string, STOP);
|
|
874
|
+
#if !defined(R_SO)
|
|
875
|
+
exit(4);
|
|
876
|
+
#endif
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
if (calculate_value_ptr->calculated == FALSE)
|
|
880
|
+
{
|
|
881
|
+
rate_moles = NAN;
|
|
882
|
+
if (calculate_value_ptr->new_def == TRUE)
|
|
883
|
+
{
|
|
884
|
+
if (basic_compile
|
|
885
|
+
(calculate_value_ptr->commands.c_str(), &calculate_value_ptr->linebase,
|
|
886
|
+
&calculate_value_ptr->varbase,
|
|
887
|
+
&calculate_value_ptr->loopbase) != 0)
|
|
888
|
+
{
|
|
889
|
+
error_string = sformatf(
|
|
890
|
+
"Fatal Basic error in CALCULATE_VALUES %s.",
|
|
891
|
+
calculate_value_ptr->name);
|
|
892
|
+
error_msg(error_string, STOP);
|
|
893
|
+
}
|
|
894
|
+
calculate_value_ptr->new_def = FALSE;
|
|
895
|
+
}
|
|
896
|
+
if (basic_run
|
|
897
|
+
(l_command, calculate_value_ptr->linebase,
|
|
898
|
+
calculate_value_ptr->varbase, calculate_value_ptr->loopbase) != 0)
|
|
899
|
+
{
|
|
900
|
+
error_string = sformatf( "Fatal Basic error in calculate_value %s.",
|
|
901
|
+
calculate_value_ptr->name);
|
|
902
|
+
error_msg(error_string, STOP);
|
|
903
|
+
}
|
|
904
|
+
if (std::isnan(rate_moles))
|
|
905
|
+
{
|
|
906
|
+
error_string = sformatf( "Calculated value not SAVEed for %s.",
|
|
907
|
+
calculate_value_ptr->name);
|
|
908
|
+
error_msg(error_string, STOP);
|
|
909
|
+
}
|
|
910
|
+
else
|
|
911
|
+
{
|
|
912
|
+
calculate_value_ptr->calculated = TRUE;
|
|
913
|
+
calculate_value_ptr->value = rate_moles;
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
if (calculate_value_ptr != NULL)
|
|
917
|
+
{
|
|
918
|
+
result = calculate_value_ptr->value;
|
|
919
|
+
}
|
|
920
|
+
if (!current_selected_output->Get_high_precision())
|
|
921
|
+
{
|
|
922
|
+
fpunchf(sformatf("V_%s", current_selected_output->Get_calculate_values()[i].first.c_str()),
|
|
923
|
+
"%12.4e\t", (double) result);
|
|
924
|
+
}
|
|
925
|
+
else
|
|
926
|
+
{
|
|
927
|
+
fpunchf(sformatf("V_%s", current_selected_output->Get_calculate_values()[i].first.c_str()),
|
|
928
|
+
"%20.12e\t", (double) result);
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
return (OK);
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
/* ---------------------------------------------------------------------- */
|
|
935
|
+
int Phreeqc::
|
|
936
|
+
print_isotope_ratios(void)
|
|
937
|
+
/* ---------------------------------------------------------------------- */
|
|
938
|
+
{
|
|
939
|
+
/*
|
|
940
|
+
* Print isotopes for initial solution
|
|
941
|
+
*/
|
|
942
|
+
int i, j;
|
|
943
|
+
int print_isotope;
|
|
944
|
+
class master *master_ptr;
|
|
945
|
+
class master_isotope *master_isotope_ptr;
|
|
946
|
+
char token[MAX_LENGTH];
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
if (pr.isotope_ratios == FALSE || pr.all == FALSE)
|
|
950
|
+
return (OK);
|
|
951
|
+
if (state == INITIAL_SOLUTION)
|
|
952
|
+
return (OK);
|
|
953
|
+
/*
|
|
954
|
+
* Print heading
|
|
955
|
+
*/
|
|
956
|
+
print_isotope = FALSE;
|
|
957
|
+
for (i = 0; i < (int)master_isotope.size(); i++)
|
|
958
|
+
{
|
|
959
|
+
if (master_isotope[i]->minor_isotope == FALSE)
|
|
960
|
+
continue;
|
|
961
|
+
master_ptr = master_bsearch(master_isotope[i]->name);
|
|
962
|
+
if (master_ptr == NULL)
|
|
963
|
+
continue;
|
|
964
|
+
if (master_ptr->total > 0 || master_ptr->s->moles > 0)
|
|
965
|
+
{
|
|
966
|
+
print_isotope = TRUE;
|
|
967
|
+
break;
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
if (print_isotope == FALSE)
|
|
971
|
+
return (OK);
|
|
972
|
+
|
|
973
|
+
print_centered("Isotope Ratios");
|
|
974
|
+
output_msg(sformatf( "%25s\t%12s\t%15s\n\n", "Isotope Ratio",
|
|
975
|
+
"Ratio", "Input Units"));
|
|
976
|
+
|
|
977
|
+
for (j = 0; j < (int)isotope_ratio.size(); j++)
|
|
978
|
+
{
|
|
979
|
+
if (isotope_ratio[j]->ratio == MISSING)
|
|
980
|
+
continue;
|
|
981
|
+
master_isotope_ptr =
|
|
982
|
+
master_isotope_search(isotope_ratio[j]->isotope_name);
|
|
983
|
+
/*
|
|
984
|
+
* Print isotope ratio
|
|
985
|
+
*/
|
|
986
|
+
Utilities::strcpy_safe(token, MAX_LENGTH, isotope_ratio[j]->name);
|
|
987
|
+
while (replace("_", " ", token) == TRUE);
|
|
988
|
+
output_msg(sformatf( " %-20s\t%12.5e\t%15.5g %-10s\n",
|
|
989
|
+
token, (double) isotope_ratio[j]->ratio,
|
|
990
|
+
(double) isotope_ratio[j]->converted_ratio,
|
|
991
|
+
master_isotope_ptr->units));
|
|
992
|
+
}
|
|
993
|
+
output_msg(sformatf( "\n"));
|
|
994
|
+
return (OK);
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
/* ---------------------------------------------------------------------- */
|
|
998
|
+
int Phreeqc::
|
|
999
|
+
print_isotope_alphas(void)
|
|
1000
|
+
/* ---------------------------------------------------------------------- */
|
|
1001
|
+
{
|
|
1002
|
+
/*
|
|
1003
|
+
* Print isotopes for initial solution
|
|
1004
|
+
*/
|
|
1005
|
+
int i, j;
|
|
1006
|
+
int print_isotope;
|
|
1007
|
+
class master *master_ptr;
|
|
1008
|
+
char token[MAX_LENGTH];
|
|
1009
|
+
LDBLE log_alpha;
|
|
1010
|
+
|
|
1011
|
+
if (pr.isotope_alphas == FALSE || pr.all == FALSE)
|
|
1012
|
+
return (OK);
|
|
1013
|
+
if (state == INITIAL_SOLUTION)
|
|
1014
|
+
return (OK);
|
|
1015
|
+
/*
|
|
1016
|
+
* Print heading
|
|
1017
|
+
*/
|
|
1018
|
+
print_isotope = FALSE;
|
|
1019
|
+
for (i = 0; i < (int)master_isotope.size(); i++)
|
|
1020
|
+
{
|
|
1021
|
+
if (master_isotope[i]->minor_isotope == FALSE)
|
|
1022
|
+
continue;
|
|
1023
|
+
master_ptr = master_bsearch(master_isotope[i]->name);
|
|
1024
|
+
if (master_ptr == NULL)
|
|
1025
|
+
continue;
|
|
1026
|
+
if (master_ptr->total > 0 || master_ptr->s->moles > 0)
|
|
1027
|
+
{
|
|
1028
|
+
print_isotope = TRUE;
|
|
1029
|
+
break;
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
if (print_isotope == FALSE)
|
|
1033
|
+
return (OK);
|
|
1034
|
+
|
|
1035
|
+
print_centered("Isotope Alphas");
|
|
1036
|
+
output_msg(sformatf( "%75s\n", "1000ln(Alpha)"));
|
|
1037
|
+
output_msg(sformatf( "%79s\n", "----------------------"));
|
|
1038
|
+
output_msg(sformatf( "%-37s%14s%14s%12.1f C\n\n",
|
|
1039
|
+
" Isotope Ratio", "Solution alpha", "Solution",
|
|
1040
|
+
(double) tc_x));
|
|
1041
|
+
|
|
1042
|
+
for (j = 0; j < (int)isotope_alpha.size(); j++)
|
|
1043
|
+
{
|
|
1044
|
+
if (isotope_alpha[j]->value == MISSING)
|
|
1045
|
+
continue;
|
|
1046
|
+
/*
|
|
1047
|
+
* Print isotope ratio
|
|
1048
|
+
*/
|
|
1049
|
+
Utilities::strcpy_safe(token, MAX_LENGTH, isotope_alpha[j]->name);
|
|
1050
|
+
while (replace("_", " ", token) == TRUE);
|
|
1051
|
+
if (isotope_alpha[j]->named_logk != NULL)
|
|
1052
|
+
{
|
|
1053
|
+
if (isotope_alpha[j]->value <= 0)
|
|
1054
|
+
{
|
|
1055
|
+
log_alpha = -999.999;
|
|
1056
|
+
}
|
|
1057
|
+
else
|
|
1058
|
+
{
|
|
1059
|
+
log_alpha = 1000 * log(isotope_alpha[j]->value);
|
|
1060
|
+
}
|
|
1061
|
+
output_msg(sformatf( "%-37s%14.5g%14.5g%14.5g\n", token,
|
|
1062
|
+
(double) isotope_alpha[j]->value, (double) log_alpha,
|
|
1063
|
+
(double) (1000 *
|
|
1064
|
+
calc_logk_n(isotope_alpha[j]->named_logk) *
|
|
1065
|
+
LOG_10)));
|
|
1066
|
+
}
|
|
1067
|
+
else
|
|
1068
|
+
{
|
|
1069
|
+
output_msg(sformatf( "%-37s%14.5g%14.5g\n", token,
|
|
1070
|
+
(double) isotope_alpha[j]->value,
|
|
1071
|
+
(double) (1000 * log(isotope_alpha[j]->value))));
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
}
|
|
1075
|
+
output_msg(sformatf( "\n"));
|
|
1076
|
+
return (OK);
|
|
1077
|
+
}
|
|
1078
|
+
/* ---------------------------------------------------------------------- */
|
|
1079
|
+
int Phreeqc::
|
|
1080
|
+
calculate_values(void)
|
|
1081
|
+
/* ---------------------------------------------------------------------- */
|
|
1082
|
+
{
|
|
1083
|
+
int j;
|
|
1084
|
+
class calculate_value *calculate_value_ptr;
|
|
1085
|
+
class isotope_ratio *isotope_ratio_ptr;
|
|
1086
|
+
class isotope_alpha *isotope_alpha_ptr;
|
|
1087
|
+
class master_isotope *master_isotope_ptr;
|
|
1088
|
+
char l_command[] = "run";
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
/*
|
|
1092
|
+
* initialize ratios as missing
|
|
1093
|
+
*/
|
|
1094
|
+
for (j = 0; j < calculate_value.size(); j++)
|
|
1095
|
+
{
|
|
1096
|
+
calculate_value[j]->calculated = FALSE;
|
|
1097
|
+
calculate_value[j]->value = MISSING;
|
|
1098
|
+
}
|
|
1099
|
+
if (pr.isotope_ratios == TRUE)
|
|
1100
|
+
{
|
|
1101
|
+
for (j = 0; j < (int)isotope_ratio.size(); j++)
|
|
1102
|
+
{
|
|
1103
|
+
isotope_ratio_ptr = isotope_ratio[j];
|
|
1104
|
+
master_isotope_ptr =
|
|
1105
|
+
master_isotope_search(isotope_ratio_ptr->isotope_name);
|
|
1106
|
+
if (master_isotope_ptr->master->s->in == FALSE) continue;
|
|
1107
|
+
calculate_value_ptr = calculate_value_search(isotope_ratio_ptr->name);
|
|
1108
|
+
if (calculate_value_ptr->calculated == FALSE)
|
|
1109
|
+
{
|
|
1110
|
+
rate_moles = NAN;
|
|
1111
|
+
if (calculate_value_ptr->new_def == TRUE)
|
|
1112
|
+
{
|
|
1113
|
+
if (basic_compile
|
|
1114
|
+
(calculate_value_ptr->commands.c_str(), &calculate_value_ptr->linebase,
|
|
1115
|
+
&calculate_value_ptr->varbase,
|
|
1116
|
+
&calculate_value_ptr->loopbase) != 0)
|
|
1117
|
+
{
|
|
1118
|
+
error_string = sformatf(
|
|
1119
|
+
"Fatal Basic error in CALCULATE_VALUES %s.",
|
|
1120
|
+
calculate_value_ptr->name);
|
|
1121
|
+
error_msg(error_string, STOP);
|
|
1122
|
+
}
|
|
1123
|
+
calculate_value_ptr->new_def = FALSE;
|
|
1124
|
+
}
|
|
1125
|
+
if (basic_run
|
|
1126
|
+
(l_command, calculate_value_ptr->linebase,
|
|
1127
|
+
calculate_value_ptr->varbase, calculate_value_ptr->loopbase) != 0)
|
|
1128
|
+
{
|
|
1129
|
+
error_string = sformatf( "Fatal Basic error in calculate_value %s.",
|
|
1130
|
+
calculate_value_ptr->name);
|
|
1131
|
+
error_msg(error_string, STOP);
|
|
1132
|
+
}
|
|
1133
|
+
if (std::isnan(rate_moles))
|
|
1134
|
+
{
|
|
1135
|
+
error_string = sformatf( "Calculated value not SAVEed for %s.",
|
|
1136
|
+
calculate_value_ptr->name);
|
|
1137
|
+
error_msg(error_string, STOP);
|
|
1138
|
+
}
|
|
1139
|
+
else
|
|
1140
|
+
{
|
|
1141
|
+
calculate_value_ptr->calculated = TRUE;
|
|
1142
|
+
calculate_value_ptr->value = rate_moles;
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
/*
|
|
1146
|
+
* Calculate converted isotope ratio
|
|
1147
|
+
*/
|
|
1148
|
+
if (calculate_value_ptr->value == MISSING)
|
|
1149
|
+
{
|
|
1150
|
+
isotope_ratio_ptr->ratio = MISSING;
|
|
1151
|
+
isotope_ratio_ptr->converted_ratio = MISSING;
|
|
1152
|
+
}
|
|
1153
|
+
else
|
|
1154
|
+
{
|
|
1155
|
+
isotope_ratio_ptr->ratio = calculate_value_ptr->value;
|
|
1156
|
+
isotope_ratio_ptr->converted_ratio =
|
|
1157
|
+
convert_isotope(master_isotope_ptr,
|
|
1158
|
+
calculate_value_ptr->value);
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
if (pr.isotope_alphas == TRUE)
|
|
1163
|
+
{
|
|
1164
|
+
for (j = 0; j < (int)isotope_alpha.size(); j++)
|
|
1165
|
+
{
|
|
1166
|
+
isotope_alpha_ptr = isotope_alpha[j];
|
|
1167
|
+
calculate_value_ptr = calculate_value_search(isotope_alpha_ptr->name);
|
|
1168
|
+
/*
|
|
1169
|
+
* Calculate converted isotope ratio
|
|
1170
|
+
*/
|
|
1171
|
+
if (calculate_value_ptr->calculated == FALSE)
|
|
1172
|
+
{
|
|
1173
|
+
rate_moles = NAN;
|
|
1174
|
+
if (calculate_value_ptr->new_def == TRUE)
|
|
1175
|
+
{
|
|
1176
|
+
if (basic_compile
|
|
1177
|
+
(calculate_value_ptr->commands.c_str(), &calculate_value_ptr->linebase,
|
|
1178
|
+
&calculate_value_ptr->varbase,
|
|
1179
|
+
&calculate_value_ptr->loopbase) != 0)
|
|
1180
|
+
{
|
|
1181
|
+
error_string = sformatf(
|
|
1182
|
+
"Fatal Basic error in CALCULATE_VALUES %s.",
|
|
1183
|
+
calculate_value_ptr->name);
|
|
1184
|
+
error_msg(error_string, STOP);
|
|
1185
|
+
}
|
|
1186
|
+
calculate_value_ptr->new_def = FALSE;
|
|
1187
|
+
}
|
|
1188
|
+
if (basic_run
|
|
1189
|
+
(l_command, calculate_value_ptr->linebase,
|
|
1190
|
+
calculate_value_ptr->varbase, calculate_value_ptr->loopbase) != 0)
|
|
1191
|
+
{
|
|
1192
|
+
error_string = sformatf( "Fatal Basic error in calculate_value %s.",
|
|
1193
|
+
calculate_value_ptr->name);
|
|
1194
|
+
error_msg(error_string, STOP);
|
|
1195
|
+
}
|
|
1196
|
+
if (std::isnan(rate_moles))
|
|
1197
|
+
{
|
|
1198
|
+
error_string = sformatf( "Calculated value not SAVEed for %s.",
|
|
1199
|
+
calculate_value_ptr->name);
|
|
1200
|
+
error_msg(error_string, STOP);
|
|
1201
|
+
}
|
|
1202
|
+
else
|
|
1203
|
+
{
|
|
1204
|
+
calculate_value_ptr->calculated = TRUE;
|
|
1205
|
+
calculate_value_ptr->value = rate_moles;
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
if (calculate_value_ptr->value == MISSING)
|
|
1209
|
+
{
|
|
1210
|
+
isotope_alpha_ptr->value = MISSING;
|
|
1211
|
+
}
|
|
1212
|
+
else
|
|
1213
|
+
{
|
|
1214
|
+
isotope_alpha_ptr->value = calculate_value_ptr->value;
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
return (OK);
|
|
1219
|
+
}
|
|
1220
|
+
/* ---------------------------------------------------------------------- */
|
|
1221
|
+
LDBLE Phreeqc::
|
|
1222
|
+
convert_isotope(class master_isotope * master_isotope_ptr, LDBLE ratio)
|
|
1223
|
+
/* ---------------------------------------------------------------------- */
|
|
1224
|
+
{
|
|
1225
|
+
const char *units;
|
|
1226
|
+
units = master_isotope_ptr->units;
|
|
1227
|
+
|
|
1228
|
+
if (strcmp_nocase(units, "permil") == 0)
|
|
1229
|
+
{
|
|
1230
|
+
return ((ratio / master_isotope_ptr->standard - 1) * 1000);
|
|
1231
|
+
}
|
|
1232
|
+
if (strcmp_nocase(units, "pct") == 0)
|
|
1233
|
+
{
|
|
1234
|
+
return (ratio / master_isotope_ptr->standard * 100.);
|
|
1235
|
+
}
|
|
1236
|
+
if (strcmp_nocase(units, "pmc") == 0)
|
|
1237
|
+
{
|
|
1238
|
+
return (ratio / master_isotope_ptr->standard * 100.);
|
|
1239
|
+
}
|
|
1240
|
+
if (strcmp_nocase(units, "tu") == 0)
|
|
1241
|
+
{
|
|
1242
|
+
return (ratio / master_isotope_ptr->standard);
|
|
1243
|
+
}
|
|
1244
|
+
if (strcmp_nocase(units, "pci/l") == 0)
|
|
1245
|
+
{
|
|
1246
|
+
return (ratio / master_isotope_ptr->standard);
|
|
1247
|
+
}
|
|
1248
|
+
error_string = sformatf(
|
|
1249
|
+
"Did not recognize isotope units in convert_isotope, %s", units);
|
|
1250
|
+
error_msg(error_string, STOP);
|
|
1251
|
+
return (-99.0);
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
/*
|
|
1255
|
+
* Utility routines for master_isotope
|
|
1256
|
+
*/
|
|
1257
|
+
|
|
1258
|
+
/* ---------------------------------------------------------------------- */
|
|
1259
|
+
class master_isotope * Phreeqc::
|
|
1260
|
+
master_isotope_store(const char *name, int replace_if_found)
|
|
1261
|
+
/* ---------------------------------------------------------------------- */
|
|
1262
|
+
{
|
|
1263
|
+
/*
|
|
1264
|
+
* Function locates the string "name" in the map for master_isotope.
|
|
1265
|
+
*
|
|
1266
|
+
* Pointer to a master_isotope structure is always returned.
|
|
1267
|
+
*
|
|
1268
|
+
* If the string is not found, a new entry is made in the map. Pointer to
|
|
1269
|
+
* the new structure is returned.
|
|
1270
|
+
* If "name" is found and replace is true, pointers in old master_isotope structure
|
|
1271
|
+
* are freed and replaced with additional input.
|
|
1272
|
+
* If "name" is found and replace is false, the old master_isotope structure is not
|
|
1273
|
+
* modified and a pointer to it is returned.
|
|
1274
|
+
*
|
|
1275
|
+
* Arguments:
|
|
1276
|
+
* name input, character string to be found in "master_isotope".
|
|
1277
|
+
* replace_if_found input, TRUE means reinitialize master_isotope structure if found
|
|
1278
|
+
* FALSE means just return pointer if found.
|
|
1279
|
+
*
|
|
1280
|
+
* Returns:
|
|
1281
|
+
* pointer to master_isotope structure "master_isotope" where "name" can be found.
|
|
1282
|
+
*/
|
|
1283
|
+
int n;
|
|
1284
|
+
class master_isotope *master_isotope_ptr;
|
|
1285
|
+
/*
|
|
1286
|
+
* Search list
|
|
1287
|
+
*/
|
|
1288
|
+
std::map<std::string, class master_isotope*>::iterator mi_it =
|
|
1289
|
+
master_isotope_map.find(name);
|
|
1290
|
+
if (mi_it != master_isotope_map.end() && replace_if_found == FALSE)
|
|
1291
|
+
{
|
|
1292
|
+
master_isotope_ptr = mi_it->second;
|
|
1293
|
+
return (master_isotope_ptr);
|
|
1294
|
+
}
|
|
1295
|
+
else if (mi_it != master_isotope_map.end() && replace_if_found == TRUE)
|
|
1296
|
+
{
|
|
1297
|
+
master_isotope_ptr = mi_it->second;
|
|
1298
|
+
master_isotope_init(master_isotope_ptr);
|
|
1299
|
+
}
|
|
1300
|
+
else
|
|
1301
|
+
{
|
|
1302
|
+
n = (int)master_isotope.size();
|
|
1303
|
+
master_isotope.resize((size_t)n + 1);
|
|
1304
|
+
/* Make new master_isotope structure */
|
|
1305
|
+
master_isotope[n] = master_isotope_alloc();
|
|
1306
|
+
master_isotope_ptr = master_isotope[n];
|
|
1307
|
+
}
|
|
1308
|
+
/* set name and z in pointer in master_isotope structure */
|
|
1309
|
+
master_isotope_ptr->name = string_hsave(name);
|
|
1310
|
+
/*
|
|
1311
|
+
* Update map
|
|
1312
|
+
*/
|
|
1313
|
+
master_isotope_map[name] = master_isotope_ptr;
|
|
1314
|
+
return (master_isotope_ptr);
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
/* ---------------------------------------------------------------------- */
|
|
1318
|
+
class master_isotope * Phreeqc::
|
|
1319
|
+
master_isotope_alloc(void)
|
|
1320
|
+
/* ---------------------------------------------------------------------- */
|
|
1321
|
+
/*
|
|
1322
|
+
* Allocates space to a master_isotope structure, initializes
|
|
1323
|
+
* arguments: void
|
|
1324
|
+
* return: pointer to a master_isotope structure
|
|
1325
|
+
*/
|
|
1326
|
+
{
|
|
1327
|
+
class master_isotope *master_isotope_ptr = new class master_isotope;
|
|
1328
|
+
/*
|
|
1329
|
+
* set pointers in structure to NULL, variables to zero
|
|
1330
|
+
*/
|
|
1331
|
+
master_isotope_init(master_isotope_ptr);
|
|
1332
|
+
|
|
1333
|
+
return (master_isotope_ptr);
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
/* ---------------------------------------------------------------------- */
|
|
1337
|
+
int Phreeqc::
|
|
1338
|
+
master_isotope_init(class master_isotope *master_isotope_ptr)
|
|
1339
|
+
/* ---------------------------------------------------------------------- */
|
|
1340
|
+
/*
|
|
1341
|
+
* return: pointer to a master_isotope structure
|
|
1342
|
+
*/
|
|
1343
|
+
{
|
|
1344
|
+
/*
|
|
1345
|
+
* set pointers in structure to NULL
|
|
1346
|
+
*/
|
|
1347
|
+
if (master_isotope_ptr)
|
|
1348
|
+
{
|
|
1349
|
+
master_isotope_ptr->name = NULL;
|
|
1350
|
+
master_isotope_ptr->master = NULL;
|
|
1351
|
+
master_isotope_ptr->elt = NULL;
|
|
1352
|
+
master_isotope_ptr->units = NULL;
|
|
1353
|
+
master_isotope_ptr->standard = 0;
|
|
1354
|
+
master_isotope_ptr->ratio = 0;
|
|
1355
|
+
master_isotope_ptr->moles = 0;
|
|
1356
|
+
master_isotope_ptr->total_is_major = 0;
|
|
1357
|
+
master_isotope_ptr->minor_isotope = 1;
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
return (OK);
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
/* ---------------------------------------------------------------------- */
|
|
1364
|
+
class master_isotope * Phreeqc::
|
|
1365
|
+
master_isotope_search(const char *name)
|
|
1366
|
+
/* ---------------------------------------------------------------------- */
|
|
1367
|
+
{
|
|
1368
|
+
/*
|
|
1369
|
+
* Function locates the string "name" in the map for master_isotope.
|
|
1370
|
+
*
|
|
1371
|
+
* Arguments:
|
|
1372
|
+
* name input, character string to be found in "master_isotope".
|
|
1373
|
+
*
|
|
1374
|
+
* Returns:
|
|
1375
|
+
* pointer to master_isotope structure "master_isotope" where "name" can be found.
|
|
1376
|
+
* or NULL if not found.
|
|
1377
|
+
*/
|
|
1378
|
+
class master_isotope* master_isotope_ptr = NULL;
|
|
1379
|
+
/*
|
|
1380
|
+
* Search list
|
|
1381
|
+
*/
|
|
1382
|
+
std::map<std::string, class master_isotope*>::iterator mi_it =
|
|
1383
|
+
master_isotope_map.find(name);
|
|
1384
|
+
if (mi_it != master_isotope_map.end())
|
|
1385
|
+
{
|
|
1386
|
+
master_isotope_ptr = mi_it->second;
|
|
1387
|
+
return (master_isotope_ptr);
|
|
1388
|
+
}
|
|
1389
|
+
return (NULL);
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
/*
|
|
1393
|
+
* Utility routines for calculate_value
|
|
1394
|
+
*/
|
|
1395
|
+
|
|
1396
|
+
/* ---------------------------------------------------------------------- */
|
|
1397
|
+
class calculate_value * Phreeqc::
|
|
1398
|
+
calculate_value_store(const char *name_in, int replace_if_found)
|
|
1399
|
+
/* ---------------------------------------------------------------------- */
|
|
1400
|
+
{
|
|
1401
|
+
/*
|
|
1402
|
+
* Function locates the string "name" in the map for calculate_value.
|
|
1403
|
+
*
|
|
1404
|
+
* Pointer to a calculate_value structure is always returned.
|
|
1405
|
+
*
|
|
1406
|
+
* If the string is not found, a new entry is made in the map. Pointer to
|
|
1407
|
+
* the new structure is returned.
|
|
1408
|
+
* If "name" is found and replace is true, pointers in old calculate_value structure
|
|
1409
|
+
* are freed and replaced with additional input.
|
|
1410
|
+
* If "name" is found and replace is false, the old calculate_value structure is not
|
|
1411
|
+
* modified and a pointer to it is returned.
|
|
1412
|
+
*
|
|
1413
|
+
* Arguments:
|
|
1414
|
+
* name input, character string to be found in "calculate_value".
|
|
1415
|
+
* replace_if_found input, TRUE means reinitialize calculate_value structure if found
|
|
1416
|
+
* FALSE means just return pointer if found.
|
|
1417
|
+
*
|
|
1418
|
+
* Returns:
|
|
1419
|
+
* pointer to calculate_value structure "calculate_value" where "name" can be found.
|
|
1420
|
+
*/
|
|
1421
|
+
class calculate_value *calculate_value_ptr=NULL;
|
|
1422
|
+
/*
|
|
1423
|
+
* Search list
|
|
1424
|
+
*/
|
|
1425
|
+
std::string name = name_in;
|
|
1426
|
+
str_tolower(name);
|
|
1427
|
+
std::map<std::string, class calculate_value*>::iterator cv_it =
|
|
1428
|
+
calculate_value_map.find(name);
|
|
1429
|
+
if (cv_it != calculate_value_map.end() && replace_if_found == FALSE)
|
|
1430
|
+
{
|
|
1431
|
+
calculate_value_ptr = cv_it->second;
|
|
1432
|
+
return (calculate_value_ptr);
|
|
1433
|
+
}
|
|
1434
|
+
else if (cv_it != calculate_value_map.end() && replace_if_found == TRUE)
|
|
1435
|
+
{
|
|
1436
|
+
calculate_value_ptr = cv_it->second;
|
|
1437
|
+
calculate_value_free(calculate_value_ptr);
|
|
1438
|
+
calculate_value_init(calculate_value_ptr);
|
|
1439
|
+
}
|
|
1440
|
+
else
|
|
1441
|
+
{
|
|
1442
|
+
size_t n = calculate_value.size();
|
|
1443
|
+
calculate_value.resize(n+1);
|
|
1444
|
+
/* Make new calculate_value structure */
|
|
1445
|
+
calculate_value[n] = calculate_value_alloc();
|
|
1446
|
+
calculate_value_ptr = calculate_value[n];
|
|
1447
|
+
}
|
|
1448
|
+
/* set name in calculate_value structure */
|
|
1449
|
+
calculate_value_ptr->name = string_hsave(name_in);
|
|
1450
|
+
/*
|
|
1451
|
+
* Update map
|
|
1452
|
+
*/
|
|
1453
|
+
calculate_value_map[name] = calculate_value_ptr;
|
|
1454
|
+
return (calculate_value_ptr);
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
/* ---------------------------------------------------------------------- */
|
|
1458
|
+
class calculate_value * Phreeqc::
|
|
1459
|
+
calculate_value_alloc(void)
|
|
1460
|
+
/* ---------------------------------------------------------------------- */
|
|
1461
|
+
/*
|
|
1462
|
+
* Allocates space to a calculate_value structure, initializes
|
|
1463
|
+
* arguments: void
|
|
1464
|
+
* return: pointer to a calculate_value structure
|
|
1465
|
+
*/
|
|
1466
|
+
{
|
|
1467
|
+
class calculate_value *calculate_value_ptr =
|
|
1468
|
+
new class calculate_value;
|
|
1469
|
+
/*
|
|
1470
|
+
* set pointers in structure to NULL, variables to zero
|
|
1471
|
+
*/
|
|
1472
|
+
calculate_value_init(calculate_value_ptr);
|
|
1473
|
+
|
|
1474
|
+
return (calculate_value_ptr);
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
/* ---------------------------------------------------------------------- */
|
|
1478
|
+
int Phreeqc::
|
|
1479
|
+
calculate_value_init(class calculate_value *calculate_value_ptr)
|
|
1480
|
+
/* ---------------------------------------------------------------------- */
|
|
1481
|
+
/*
|
|
1482
|
+
* return: pointer to a calculate_value structure
|
|
1483
|
+
*/
|
|
1484
|
+
{
|
|
1485
|
+
/*
|
|
1486
|
+
* set pointers in structure to NULL
|
|
1487
|
+
*/
|
|
1488
|
+
if (calculate_value_ptr)
|
|
1489
|
+
{
|
|
1490
|
+
calculate_value_ptr->name = NULL;
|
|
1491
|
+
calculate_value_ptr->value = 0.0;
|
|
1492
|
+
calculate_value_ptr->commands.clear();
|
|
1493
|
+
calculate_value_ptr->new_def = TRUE;
|
|
1494
|
+
calculate_value_ptr->calculated = FALSE;
|
|
1495
|
+
calculate_value_ptr->linebase = NULL;
|
|
1496
|
+
calculate_value_ptr->varbase = NULL;
|
|
1497
|
+
calculate_value_ptr->loopbase = NULL;
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
return (OK);
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
/* ---------------------------------------------------------------------- */
|
|
1504
|
+
class calculate_value * Phreeqc::
|
|
1505
|
+
calculate_value_search(const char *name_in)
|
|
1506
|
+
/* ---------------------------------------------------------------------- */
|
|
1507
|
+
{
|
|
1508
|
+
/*
|
|
1509
|
+
* Function locates the string "name" in the map for calculate_value.
|
|
1510
|
+
*
|
|
1511
|
+
* Arguments:
|
|
1512
|
+
* name input, character string to be found in "calculate_value".
|
|
1513
|
+
*
|
|
1514
|
+
* Returns:
|
|
1515
|
+
* pointer to calculate_value structure "calculate_value" where "name" can be found.
|
|
1516
|
+
* or NULL if not found.
|
|
1517
|
+
*/
|
|
1518
|
+
std::string name = name_in;
|
|
1519
|
+
str_tolower(name);
|
|
1520
|
+
std::map<std::string, class calculate_value*>::iterator cv_it =
|
|
1521
|
+
calculate_value_map.find(name);
|
|
1522
|
+
if (cv_it != calculate_value_map.end())
|
|
1523
|
+
{
|
|
1524
|
+
return (cv_it->second);
|
|
1525
|
+
}
|
|
1526
|
+
return (NULL);
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
/* ---------------------------------------------------------------------- */
|
|
1530
|
+
int Phreeqc::
|
|
1531
|
+
calculate_value_free(class calculate_value *calculate_value_ptr)
|
|
1532
|
+
/* ---------------------------------------------------------------------- */
|
|
1533
|
+
{
|
|
1534
|
+
/*
|
|
1535
|
+
* Frees memory allocated within calculate_value[i], does not free calculate_value structure
|
|
1536
|
+
* Input: i, number of calculate_value
|
|
1537
|
+
* Return: OK
|
|
1538
|
+
*/
|
|
1539
|
+
char cmd[] = "new; quit";
|
|
1540
|
+
|
|
1541
|
+
if (calculate_value_ptr == NULL)
|
|
1542
|
+
return (ERROR);
|
|
1543
|
+
calculate_value_ptr->commands.clear();
|
|
1544
|
+
basic_run(cmd, calculate_value_ptr->linebase,
|
|
1545
|
+
calculate_value_ptr->varbase, calculate_value_ptr->loopbase);
|
|
1546
|
+
calculate_value_ptr->linebase = NULL;
|
|
1547
|
+
calculate_value_ptr->varbase = NULL;
|
|
1548
|
+
calculate_value_ptr->loopbase = NULL;
|
|
1549
|
+
return (OK);
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
/*
|
|
1553
|
+
* Utility routines for isotope_ratio
|
|
1554
|
+
*/
|
|
1555
|
+
|
|
1556
|
+
/* ---------------------------------------------------------------------- */
|
|
1557
|
+
class isotope_ratio * Phreeqc::
|
|
1558
|
+
isotope_ratio_store(const char *name_in, int replace_if_found)
|
|
1559
|
+
/* ---------------------------------------------------------------------- */
|
|
1560
|
+
{
|
|
1561
|
+
/*
|
|
1562
|
+
* Function locates the string "name" in the map for isotope_ratio.
|
|
1563
|
+
*
|
|
1564
|
+
* Pointer to a isotope_ratio structure is always returned.
|
|
1565
|
+
*
|
|
1566
|
+
* If the string is not found, a new entry is made in the map. Pointer to
|
|
1567
|
+
* the new structure is returned.
|
|
1568
|
+
* If "name" is found and replace is true, pointers in old isotope_ratio structure
|
|
1569
|
+
* are freed and replaced with additional input.
|
|
1570
|
+
* If "name" is found and replace is false, the old isotope_ratio structure is not
|
|
1571
|
+
* modified and a pointer to it is returned.
|
|
1572
|
+
*
|
|
1573
|
+
* Arguments:
|
|
1574
|
+
* name input, character string to be found in "isotope_ratio".
|
|
1575
|
+
* replace_if_found input, TRUE means reinitialize isotope_ratio structure if found
|
|
1576
|
+
* FALSE means just return pointer if found.
|
|
1577
|
+
*
|
|
1578
|
+
* Returns:
|
|
1579
|
+
* pointer to isotope_ratio structure "isotope_ratio" where "name" can be found.
|
|
1580
|
+
*/
|
|
1581
|
+
class isotope_ratio *isotope_ratio_ptr;
|
|
1582
|
+
/*
|
|
1583
|
+
* Search list
|
|
1584
|
+
*/
|
|
1585
|
+
std::string name = name_in;
|
|
1586
|
+
str_tolower(name);
|
|
1587
|
+
std::map<std::string, class isotope_ratio*>::iterator it =
|
|
1588
|
+
isotope_ratio_map.find(name);
|
|
1589
|
+
|
|
1590
|
+
if (it != isotope_ratio_map.end() && replace_if_found == FALSE)
|
|
1591
|
+
{
|
|
1592
|
+
isotope_ratio_ptr = it->second;
|
|
1593
|
+
return (isotope_ratio_ptr);
|
|
1594
|
+
}
|
|
1595
|
+
else if (it != isotope_ratio_map.end() && replace_if_found == TRUE)
|
|
1596
|
+
{
|
|
1597
|
+
isotope_ratio_ptr = it->second;
|
|
1598
|
+
isotope_ratio_init(isotope_ratio_ptr);
|
|
1599
|
+
}
|
|
1600
|
+
else
|
|
1601
|
+
{
|
|
1602
|
+
size_t n = isotope_ratio.size();
|
|
1603
|
+
isotope_ratio.resize(n + 1);
|
|
1604
|
+
/* Make new isotope_ratio structure */
|
|
1605
|
+
isotope_ratio[n] = isotope_ratio_alloc();
|
|
1606
|
+
isotope_ratio_ptr = isotope_ratio[n];
|
|
1607
|
+
}
|
|
1608
|
+
/* set name and z in pointer in isotope_ratio structure */
|
|
1609
|
+
isotope_ratio_ptr->name = string_hsave(name_in);
|
|
1610
|
+
/*
|
|
1611
|
+
* Update map
|
|
1612
|
+
*/
|
|
1613
|
+
isotope_ratio_map[name] = isotope_ratio_ptr;
|
|
1614
|
+
return (isotope_ratio_ptr);
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
/* ---------------------------------------------------------------------- */
|
|
1618
|
+
class isotope_ratio * Phreeqc::
|
|
1619
|
+
isotope_ratio_alloc(void)
|
|
1620
|
+
/* ---------------------------------------------------------------------- */
|
|
1621
|
+
/*
|
|
1622
|
+
* Allocates space to a isotope_ratio structure, initializes
|
|
1623
|
+
* arguments: void
|
|
1624
|
+
* return: pointer to a isotope_ratio structure
|
|
1625
|
+
*/
|
|
1626
|
+
{
|
|
1627
|
+
class isotope_ratio* isotope_ratio_ptr =
|
|
1628
|
+
new class isotope_ratio;
|
|
1629
|
+
/*
|
|
1630
|
+
* set pointers in structure to NULL, variables to zero
|
|
1631
|
+
*/
|
|
1632
|
+
isotope_ratio_init(isotope_ratio_ptr);
|
|
1633
|
+
|
|
1634
|
+
return (isotope_ratio_ptr);
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
/* ---------------------------------------------------------------------- */
|
|
1638
|
+
int Phreeqc::
|
|
1639
|
+
isotope_ratio_init(class isotope_ratio *isotope_ratio_ptr)
|
|
1640
|
+
/* ---------------------------------------------------------------------- */
|
|
1641
|
+
/*
|
|
1642
|
+
* return: pointer to a isotope_ratio structure
|
|
1643
|
+
*/
|
|
1644
|
+
{
|
|
1645
|
+
/*
|
|
1646
|
+
* set pointers in structure to NULL
|
|
1647
|
+
*/
|
|
1648
|
+
if (isotope_ratio_ptr)
|
|
1649
|
+
{
|
|
1650
|
+
isotope_ratio_ptr->name = NULL;
|
|
1651
|
+
isotope_ratio_ptr->isotope_name = NULL;
|
|
1652
|
+
isotope_ratio_ptr->ratio = MISSING;
|
|
1653
|
+
isotope_ratio_ptr->converted_ratio = MISSING;
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
return (OK);
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
/* ---------------------------------------------------------------------- */
|
|
1660
|
+
class isotope_ratio * Phreeqc::
|
|
1661
|
+
isotope_ratio_search(const char *name_in)
|
|
1662
|
+
/* ---------------------------------------------------------------------- */
|
|
1663
|
+
{
|
|
1664
|
+
/*
|
|
1665
|
+
* Function locates the string "name" in the map for isotope_ratio.
|
|
1666
|
+
*
|
|
1667
|
+
* Arguments:
|
|
1668
|
+
* name input, character string to be found in "isotope_ratio".
|
|
1669
|
+
*
|
|
1670
|
+
* Returns:
|
|
1671
|
+
* pointer to isotope_ratio structure "isotope_ratio" where "name" can be found.
|
|
1672
|
+
* or NULL if not found.
|
|
1673
|
+
*/
|
|
1674
|
+
std::string name = name_in;
|
|
1675
|
+
str_tolower(name);
|
|
1676
|
+
std::map<std::string, class isotope_ratio*>::iterator it =
|
|
1677
|
+
isotope_ratio_map.find(name);
|
|
1678
|
+
|
|
1679
|
+
if (it != isotope_ratio_map.end())
|
|
1680
|
+
{
|
|
1681
|
+
return (it->second);
|
|
1682
|
+
}
|
|
1683
|
+
return (NULL);
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
/*
|
|
1687
|
+
* Utility routines for isotope_alpha
|
|
1688
|
+
*/
|
|
1689
|
+
|
|
1690
|
+
/* ---------------------------------------------------------------------- */
|
|
1691
|
+
class isotope_alpha * Phreeqc::
|
|
1692
|
+
isotope_alpha_store(const char *name_in, int replace_if_found)
|
|
1693
|
+
/* ---------------------------------------------------------------------- */
|
|
1694
|
+
{
|
|
1695
|
+
/*
|
|
1696
|
+
* Function locates the string "name" in the map for isotope_alpha.
|
|
1697
|
+
*
|
|
1698
|
+
* Pointer to a isotope_alpha structure is always returned.
|
|
1699
|
+
*
|
|
1700
|
+
* If the string is not found, a new entry is made in the map. Pointer to
|
|
1701
|
+
* the new structure is returned.
|
|
1702
|
+
* If "name" is found and replace is true, pointers in old isotope_alpha structure
|
|
1703
|
+
* are freed and replaced with additional input.
|
|
1704
|
+
* If "name" is found and replace is false, the old isotope_alpha structure is not
|
|
1705
|
+
* modified and a pointer to it is returned.
|
|
1706
|
+
*
|
|
1707
|
+
* Arguments:
|
|
1708
|
+
* name input, character string to be found in "isotope_alpha".
|
|
1709
|
+
* replace_if_found input, TRUE means reinitialize isotope_alpha structure if found
|
|
1710
|
+
* FALSE means just return pointer if found.
|
|
1711
|
+
*
|
|
1712
|
+
* Returns:
|
|
1713
|
+
* pointer to isotope_alpha structure "isotope_alpha" where "name" can be found.
|
|
1714
|
+
*/
|
|
1715
|
+
class isotope_alpha *isotope_alpha_ptr;
|
|
1716
|
+
std::string name = name_in;
|
|
1717
|
+
str_tolower(name);
|
|
1718
|
+
std::map<std::string, class isotope_alpha*>::iterator it =
|
|
1719
|
+
isotope_alpha_map.find(name);
|
|
1720
|
+
|
|
1721
|
+
if (it != isotope_alpha_map.end() && replace_if_found == FALSE)
|
|
1722
|
+
{
|
|
1723
|
+
return (it->second);
|
|
1724
|
+
}
|
|
1725
|
+
else if (it != isotope_alpha_map.end() && replace_if_found == TRUE)
|
|
1726
|
+
{
|
|
1727
|
+
isotope_alpha_ptr = it->second;
|
|
1728
|
+
isotope_alpha_init(isotope_alpha_ptr);
|
|
1729
|
+
}
|
|
1730
|
+
else
|
|
1731
|
+
{
|
|
1732
|
+
size_t n = isotope_alpha.size();
|
|
1733
|
+
isotope_alpha.resize(n + 1);
|
|
1734
|
+
/* Make new isotope_alpha structure */
|
|
1735
|
+
isotope_alpha[n] = isotope_alpha_alloc();
|
|
1736
|
+
isotope_alpha_ptr = isotope_alpha[n];
|
|
1737
|
+
}
|
|
1738
|
+
/* set name and z in pointer in isotope_alpha structure */
|
|
1739
|
+
isotope_alpha_ptr->name = string_hsave(name_in);
|
|
1740
|
+
/*
|
|
1741
|
+
* Update map
|
|
1742
|
+
*/
|
|
1743
|
+
isotope_alpha_map[name] = isotope_alpha_ptr;
|
|
1744
|
+
return (isotope_alpha_ptr);
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
/* ---------------------------------------------------------------------- */
|
|
1748
|
+
class isotope_alpha * Phreeqc::
|
|
1749
|
+
isotope_alpha_alloc(void)
|
|
1750
|
+
/* ---------------------------------------------------------------------- */
|
|
1751
|
+
/*
|
|
1752
|
+
* Allocates space to a isotope_alpha structure, initializes
|
|
1753
|
+
* arguments: void
|
|
1754
|
+
* return: pointer to a isotope_alpha structure
|
|
1755
|
+
*/
|
|
1756
|
+
{
|
|
1757
|
+
class isotope_alpha* isotope_alpha_ptr =
|
|
1758
|
+
new class isotope_alpha;
|
|
1759
|
+
/*
|
|
1760
|
+
* set pointers in structure to NULL, variables to zero
|
|
1761
|
+
*/
|
|
1762
|
+
isotope_alpha_init(isotope_alpha_ptr);
|
|
1763
|
+
|
|
1764
|
+
return (isotope_alpha_ptr);
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
/* ---------------------------------------------------------------------- */
|
|
1768
|
+
int Phreeqc::
|
|
1769
|
+
isotope_alpha_init(class isotope_alpha *isotope_alpha_ptr)
|
|
1770
|
+
/* ---------------------------------------------------------------------- */
|
|
1771
|
+
/*
|
|
1772
|
+
* return: pointer to a isotope_alpha structure
|
|
1773
|
+
*/
|
|
1774
|
+
{
|
|
1775
|
+
/*
|
|
1776
|
+
* set pointers in structure to NULL
|
|
1777
|
+
*/
|
|
1778
|
+
if (isotope_alpha_ptr)
|
|
1779
|
+
{
|
|
1780
|
+
isotope_alpha_ptr->name = NULL;
|
|
1781
|
+
isotope_alpha_ptr->named_logk = NULL;
|
|
1782
|
+
isotope_alpha_ptr->value = MISSING;
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
return (OK);
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
/* ---------------------------------------------------------------------- */
|
|
1789
|
+
class isotope_alpha * Phreeqc::
|
|
1790
|
+
isotope_alpha_search(const char *name_in)
|
|
1791
|
+
/* ---------------------------------------------------------------------- */
|
|
1792
|
+
{
|
|
1793
|
+
/*
|
|
1794
|
+
* Function locates the string "name" in the map for isotope_alpha.
|
|
1795
|
+
*
|
|
1796
|
+
* Arguments:
|
|
1797
|
+
* name input, character string to be found in "isotope_alpha".
|
|
1798
|
+
*
|
|
1799
|
+
* Returns:
|
|
1800
|
+
* pointer to isotope_alpha structure "isotope_alpha" where "name" can be found.
|
|
1801
|
+
* or NULL if not found.
|
|
1802
|
+
*/
|
|
1803
|
+
std::string name = name_in;
|
|
1804
|
+
str_tolower(name);
|
|
1805
|
+
std::map<std::string, class isotope_alpha*>::iterator it =
|
|
1806
|
+
isotope_alpha_map.find(name);
|
|
1807
|
+
|
|
1808
|
+
if (it != isotope_alpha_map.end())
|
|
1809
|
+
{
|
|
1810
|
+
return (it->second);
|
|
1811
|
+
}
|
|
1812
|
+
return (NULL);
|
|
1813
|
+
}
|