pyEQL 1.4.0rc9__cp313-cp313-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-313-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,1795 @@
|
|
|
1
|
+
// Solution.cxx: implementation of the cxxSolution class.
|
|
2
|
+
//
|
|
3
|
+
//////////////////////////////////////////////////////////////////////
|
|
4
|
+
#ifdef _DEBUG
|
|
5
|
+
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
#include <set>
|
|
9
|
+
#include <cassert> // assert
|
|
10
|
+
#include <algorithm> // std::sort
|
|
11
|
+
#include "Utils.h" // define first
|
|
12
|
+
#include "Phreeqc.h"
|
|
13
|
+
#include "Solution.h"
|
|
14
|
+
#include "cxxMix.h"
|
|
15
|
+
#include "phqalloc.h"
|
|
16
|
+
#include "Dictionary.h"
|
|
17
|
+
|
|
18
|
+
#if defined(PHREEQCI_GUI)
|
|
19
|
+
#ifdef _DEBUG
|
|
20
|
+
#define new DEBUG_NEW
|
|
21
|
+
#undef THIS_FILE
|
|
22
|
+
static char THIS_FILE[] = __FILE__;
|
|
23
|
+
#endif
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
//////////////////////////////////////////////////////////////////////
|
|
27
|
+
// Construction/Destruction
|
|
28
|
+
//////////////////////////////////////////////////////////////////////
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
cxxSolution::cxxSolution(PHRQ_io * io)
|
|
32
|
+
//
|
|
33
|
+
// default constructor for cxxSolution
|
|
34
|
+
//
|
|
35
|
+
: cxxNumKeyword(io)
|
|
36
|
+
{
|
|
37
|
+
this->io = io;
|
|
38
|
+
this->new_def = false;
|
|
39
|
+
this->patm = 1.0;
|
|
40
|
+
this->potV = 0.0;
|
|
41
|
+
this->tc = 25.0;
|
|
42
|
+
this->ph = 7.0;
|
|
43
|
+
this->pe = 4.0;
|
|
44
|
+
this->mu = 1e-7;
|
|
45
|
+
this->ah2o = 1.0;
|
|
46
|
+
this->total_h = 111.1;
|
|
47
|
+
this->total_o = 55.55;
|
|
48
|
+
this->cb = 0.0;
|
|
49
|
+
this->density = 1.0;
|
|
50
|
+
this->viscosity = 1.0;
|
|
51
|
+
this->viscos_0 = 1.0;
|
|
52
|
+
this->mass_water = 1.0;
|
|
53
|
+
this->soln_vol = 1.0;
|
|
54
|
+
this->total_alkalinity = 0.0;
|
|
55
|
+
this->totals.type = cxxNameDouble::ND_ELT_MOLES;
|
|
56
|
+
this->master_activity.type = cxxNameDouble::ND_SPECIES_LA;
|
|
57
|
+
this->species_gamma.type = cxxNameDouble::ND_SPECIES_GAMMA;
|
|
58
|
+
this->initial_data = NULL;
|
|
59
|
+
}
|
|
60
|
+
cxxSolution::cxxSolution(const cxxSolution &old_sol)
|
|
61
|
+
: initial_data(NULL)
|
|
62
|
+
{
|
|
63
|
+
*this = old_sol;
|
|
64
|
+
}
|
|
65
|
+
const cxxSolution &
|
|
66
|
+
cxxSolution::operator =(const cxxSolution &rhs)
|
|
67
|
+
{
|
|
68
|
+
if (this != &rhs)
|
|
69
|
+
{
|
|
70
|
+
this->io = rhs.io;
|
|
71
|
+
this->n_user = rhs.n_user;
|
|
72
|
+
this->n_user_end = rhs.n_user_end;
|
|
73
|
+
this->description = rhs.description;
|
|
74
|
+
this->new_def = rhs.new_def;
|
|
75
|
+
this->patm = rhs.patm;
|
|
76
|
+
this->potV = rhs.potV;
|
|
77
|
+
this->tc = rhs.tc;
|
|
78
|
+
this->ph = rhs.ph;
|
|
79
|
+
this->pe = rhs.pe;
|
|
80
|
+
this->mu = rhs.mu;
|
|
81
|
+
this->ah2o = rhs.ah2o;
|
|
82
|
+
this->total_h = rhs.total_h;
|
|
83
|
+
this->total_o = rhs.total_o;
|
|
84
|
+
this->density = rhs.density;
|
|
85
|
+
this->viscosity = rhs.viscosity;
|
|
86
|
+
this->viscos_0 = rhs.viscos_0;
|
|
87
|
+
this->cb = rhs.cb;
|
|
88
|
+
this->mass_water = rhs.mass_water;
|
|
89
|
+
this->soln_vol = rhs.soln_vol;
|
|
90
|
+
this->total_alkalinity = rhs.total_alkalinity;
|
|
91
|
+
this->totals = rhs.totals;
|
|
92
|
+
this->master_activity = rhs.master_activity;
|
|
93
|
+
this->species_gamma = rhs.species_gamma;
|
|
94
|
+
this->isotopes = rhs.isotopes;
|
|
95
|
+
this->species_map = rhs.species_map;
|
|
96
|
+
this->log_gamma_map = rhs.log_gamma_map;
|
|
97
|
+
this->log_molalities_map = rhs.log_molalities_map;
|
|
98
|
+
if (this->initial_data)
|
|
99
|
+
delete initial_data;
|
|
100
|
+
if (rhs.initial_data != NULL)
|
|
101
|
+
this->initial_data = new cxxISolution(*rhs.initial_data);
|
|
102
|
+
else
|
|
103
|
+
this->initial_data = NULL;
|
|
104
|
+
}
|
|
105
|
+
return *this;
|
|
106
|
+
}
|
|
107
|
+
cxxSolution::cxxSolution(std::map < int, cxxSolution > &solutions,
|
|
108
|
+
cxxMix & mix, int l_n_user, PHRQ_io * io)
|
|
109
|
+
//
|
|
110
|
+
// constructor for cxxSolution from mixture of solutions
|
|
111
|
+
//
|
|
112
|
+
: cxxNumKeyword(io)
|
|
113
|
+
{
|
|
114
|
+
//
|
|
115
|
+
// Zero out solution data
|
|
116
|
+
//
|
|
117
|
+
this->zero();
|
|
118
|
+
this->n_user = this->n_user_end = l_n_user;
|
|
119
|
+
this->new_def = false;
|
|
120
|
+
this->ah2o = 0;
|
|
121
|
+
// potV is an external variable, imposed in a given solution, not mixed.
|
|
122
|
+
std::map < int, cxxSolution >::const_iterator sol = solutions.find(mix.Get_n_user());
|
|
123
|
+
const cxxSolution *cxxsoln_ptr1;
|
|
124
|
+
if (sol != solutions.end())
|
|
125
|
+
{
|
|
126
|
+
cxxsoln_ptr1 = &(sol->second);
|
|
127
|
+
if (cxxsoln_ptr1->new_def)
|
|
128
|
+
this->potV = 0.0;
|
|
129
|
+
else
|
|
130
|
+
this->potV = cxxsoln_ptr1->potV;
|
|
131
|
+
}
|
|
132
|
+
//
|
|
133
|
+
// Mix solutions
|
|
134
|
+
//
|
|
135
|
+
const std::map < int, LDBLE >&mixcomps = mix.Get_mixComps();
|
|
136
|
+
std::map < int, LDBLE >::const_iterator it;
|
|
137
|
+
for (it = mixcomps.begin(); it != mixcomps.end(); it++)
|
|
138
|
+
{
|
|
139
|
+
sol = solutions.find(it->first);
|
|
140
|
+
if (sol == solutions.end())
|
|
141
|
+
{
|
|
142
|
+
std::ostringstream msg;
|
|
143
|
+
msg << "Solution " << it->first << " not found in mix_cxxSolutions.";
|
|
144
|
+
error_msg(msg.str(), CONTINUE);
|
|
145
|
+
}
|
|
146
|
+
else
|
|
147
|
+
{
|
|
148
|
+
cxxsoln_ptr1 = &(sol->second);
|
|
149
|
+
this->add(*cxxsoln_ptr1, it->second);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
}
|
|
154
|
+
cxxSolution::~cxxSolution()
|
|
155
|
+
{
|
|
156
|
+
delete this->initial_data;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
void
|
|
160
|
+
cxxSolution::dump_xml(std::ostream & s_oss, unsigned int indent) const
|
|
161
|
+
{
|
|
162
|
+
unsigned int i;
|
|
163
|
+
s_oss.precision(DBL_DIG - 1);
|
|
164
|
+
std::string indent0(""), indent1("");
|
|
165
|
+
for (i = 0; i < indent; ++i)
|
|
166
|
+
indent0.append(Utilities::INDENT);
|
|
167
|
+
for (i = 0; i < indent + 1; ++i)
|
|
168
|
+
indent1.append(Utilities::INDENT);
|
|
169
|
+
|
|
170
|
+
// Solution element and attributes
|
|
171
|
+
s_oss << indent0;
|
|
172
|
+
s_oss << "<solution " << "\n";
|
|
173
|
+
|
|
174
|
+
s_oss << indent1;
|
|
175
|
+
s_oss << "soln_n_user=\"" << this->n_user << "\" " << "\n";
|
|
176
|
+
|
|
177
|
+
s_oss << indent1;
|
|
178
|
+
s_oss << "soln_description=\"" << this->description << "\"" << "\n";
|
|
179
|
+
|
|
180
|
+
s_oss << indent1;
|
|
181
|
+
s_oss << "soln_tc=\"" << this->tc << "\"" << "\n";
|
|
182
|
+
|
|
183
|
+
s_oss << indent1;
|
|
184
|
+
s_oss << "soln_ph=\"" << this->ph << "\"" << "\n";
|
|
185
|
+
|
|
186
|
+
s_oss << indent1;
|
|
187
|
+
s_oss << "soln_solution_pe=\"" << this->pe << "\"" << "\n";
|
|
188
|
+
|
|
189
|
+
s_oss << indent1;
|
|
190
|
+
s_oss << "soln_mu=\"" << this->mu << "\"" << "\n";
|
|
191
|
+
|
|
192
|
+
s_oss << indent1;
|
|
193
|
+
s_oss << "soln_ah2o=\"" << this->ah2o << "\"" << "\n";
|
|
194
|
+
|
|
195
|
+
s_oss << indent1;
|
|
196
|
+
s_oss << "soln_total_h=\"" << this->total_h << "\"" << "\n";
|
|
197
|
+
|
|
198
|
+
s_oss << indent1;
|
|
199
|
+
s_oss << "soln_total_o=\"" << this->total_o << "\"" << "\n";
|
|
200
|
+
|
|
201
|
+
s_oss << indent1;
|
|
202
|
+
s_oss << "soln_cb=\"" << this->cb << "\"" << "\n";
|
|
203
|
+
|
|
204
|
+
s_oss << indent1;
|
|
205
|
+
s_oss << "soln_mass_water=\"" << this->mass_water << "\"" << "\n";
|
|
206
|
+
|
|
207
|
+
s_oss << indent1;
|
|
208
|
+
s_oss << "soln_vol=\"" << this->soln_vol << "\"" << "\n";
|
|
209
|
+
|
|
210
|
+
s_oss << indent1;
|
|
211
|
+
s_oss << "soln_total_alkalinity=\"" << this->
|
|
212
|
+
total_alkalinity << "\"" << "\n";
|
|
213
|
+
|
|
214
|
+
s_oss << indent1;
|
|
215
|
+
s_oss << "\">" << "\n";
|
|
216
|
+
|
|
217
|
+
// soln_total conc structures
|
|
218
|
+
this->totals.dump_xml(s_oss, indent + 1);
|
|
219
|
+
|
|
220
|
+
// master_activity map
|
|
221
|
+
this->master_activity.dump_xml(s_oss, indent + 1);
|
|
222
|
+
|
|
223
|
+
// species_gamma map
|
|
224
|
+
this->species_gamma.dump_xml(s_oss, indent + 1);
|
|
225
|
+
|
|
226
|
+
// End of solution
|
|
227
|
+
s_oss << indent0;
|
|
228
|
+
s_oss << "</solution>" << "\n";
|
|
229
|
+
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
void
|
|
234
|
+
cxxSolution::dump_raw(std::ostream & s_oss, unsigned int indent, int *n_out) const
|
|
235
|
+
{
|
|
236
|
+
unsigned int i;
|
|
237
|
+
s_oss.precision(DBL_DIG - 1);
|
|
238
|
+
std::string indent0(""), indent1(""), indent2("");
|
|
239
|
+
for (i = 0; i < indent; ++i)
|
|
240
|
+
indent0.append(Utilities::INDENT);
|
|
241
|
+
for (i = 0; i < indent + 1; ++i)
|
|
242
|
+
indent1.append(Utilities::INDENT);
|
|
243
|
+
for (i = 0; i < indent + 2; ++i)
|
|
244
|
+
indent2.append(Utilities::INDENT);
|
|
245
|
+
|
|
246
|
+
// Solution element and attributes
|
|
247
|
+
s_oss << indent0;
|
|
248
|
+
int n_user_local = (n_out != NULL) ? *n_out : this->n_user;
|
|
249
|
+
s_oss << "SOLUTION_RAW " << n_user_local << " " << this->description << "\n";
|
|
250
|
+
|
|
251
|
+
s_oss << indent1;
|
|
252
|
+
s_oss << "-temp " << this->tc << "\n";
|
|
253
|
+
|
|
254
|
+
s_oss << indent1;
|
|
255
|
+
s_oss << "-pressure " << this->patm << "\n";
|
|
256
|
+
|
|
257
|
+
s_oss << indent1;
|
|
258
|
+
s_oss << "-potential " << this->potV << "\n";
|
|
259
|
+
|
|
260
|
+
// new identifier
|
|
261
|
+
s_oss << indent1;
|
|
262
|
+
s_oss << "-total_h " << this->total_h << "\n";
|
|
263
|
+
|
|
264
|
+
// new identifier
|
|
265
|
+
s_oss << indent1;
|
|
266
|
+
s_oss << "-total_o " << this->total_o << "\n";
|
|
267
|
+
|
|
268
|
+
// new identifier
|
|
269
|
+
s_oss << indent1;
|
|
270
|
+
s_oss << "-cb " << this->cb << "\n";
|
|
271
|
+
|
|
272
|
+
// new identifier
|
|
273
|
+
s_oss << indent1;
|
|
274
|
+
s_oss << "-density " << this->density << "\n";
|
|
275
|
+
|
|
276
|
+
// new identifier
|
|
277
|
+
s_oss << indent1;
|
|
278
|
+
s_oss << "-viscosity " << this->viscosity << "\n";
|
|
279
|
+
s_oss << indent1;
|
|
280
|
+
s_oss << "-viscos_0 " << this->viscos_0 << "\n";
|
|
281
|
+
|
|
282
|
+
// soln_total conc structures
|
|
283
|
+
s_oss << indent1;
|
|
284
|
+
s_oss << "-totals" << "\n";
|
|
285
|
+
this->totals.dump_raw(s_oss, indent + 2);
|
|
286
|
+
|
|
287
|
+
// Isotopes
|
|
288
|
+
{
|
|
289
|
+
for (std::map < std::string, cxxSolutionIsotope >::const_iterator it =
|
|
290
|
+
this->isotopes.begin(); it != isotopes.end(); ++it)
|
|
291
|
+
{
|
|
292
|
+
s_oss << indent1 << "-Isotope" << "\n";
|
|
293
|
+
it->second.dump_raw(s_oss, indent + 2);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
s_oss << indent1;
|
|
298
|
+
s_oss << "-pH " << this->ph << "\n";
|
|
299
|
+
|
|
300
|
+
s_oss << indent1;
|
|
301
|
+
s_oss << "-pe " << this->pe << "\n";
|
|
302
|
+
|
|
303
|
+
// new identifier
|
|
304
|
+
s_oss << indent1;
|
|
305
|
+
s_oss << "-mu " << this->mu << "\n";
|
|
306
|
+
|
|
307
|
+
// new identifier
|
|
308
|
+
s_oss << indent1;
|
|
309
|
+
s_oss << "-ah2o " << this->ah2o << "\n";
|
|
310
|
+
|
|
311
|
+
// new identifier
|
|
312
|
+
s_oss << indent1;
|
|
313
|
+
s_oss << "-mass_water " << this->mass_water << "\n";
|
|
314
|
+
|
|
315
|
+
// new identifier
|
|
316
|
+
s_oss << indent1;
|
|
317
|
+
s_oss << "-soln_vol " << this->soln_vol << "\n";
|
|
318
|
+
|
|
319
|
+
// new identifier
|
|
320
|
+
s_oss << indent1;
|
|
321
|
+
s_oss << "-total_alkalinity " << this->total_alkalinity << "\n";
|
|
322
|
+
|
|
323
|
+
// master_activity map
|
|
324
|
+
s_oss << indent1;
|
|
325
|
+
s_oss << "-activities" << "\n";
|
|
326
|
+
this->master_activity.dump_raw(s_oss, indent + 2);
|
|
327
|
+
|
|
328
|
+
// species_gamma map
|
|
329
|
+
s_oss << indent1;
|
|
330
|
+
s_oss << "-gammas" << "\n";
|
|
331
|
+
this->species_gamma.dump_raw(s_oss, indent + 2);
|
|
332
|
+
|
|
333
|
+
// species_map
|
|
334
|
+
if (species_map.size() > 0)
|
|
335
|
+
{
|
|
336
|
+
s_oss << indent1;
|
|
337
|
+
s_oss << "-species_map" << "\n";
|
|
338
|
+
std::map<int, double>::const_iterator it = this->species_map.begin();
|
|
339
|
+
for ( ; it != species_map.end(); it++)
|
|
340
|
+
{
|
|
341
|
+
s_oss << indent2;
|
|
342
|
+
s_oss << it->first << " " << it->second << "\n";
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// log_gamma_map
|
|
347
|
+
if (log_gamma_map.size() > 0)
|
|
348
|
+
{
|
|
349
|
+
s_oss << indent1;
|
|
350
|
+
s_oss << "-log_gamma_map" << "\n";
|
|
351
|
+
std::map<int, double>::const_iterator it = this->log_gamma_map.begin();
|
|
352
|
+
for ( ; it != log_gamma_map.end(); it++)
|
|
353
|
+
{
|
|
354
|
+
s_oss << indent2;
|
|
355
|
+
s_oss << it->first << " " << it->second << "\n";
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// log_molalities_map
|
|
360
|
+
if (log_molalities_map.size() > 0)
|
|
361
|
+
{
|
|
362
|
+
s_oss << indent1;
|
|
363
|
+
s_oss << "-log_molalities_map" << "\n";
|
|
364
|
+
std::map<int, double>::const_iterator it = this->log_molalities_map.begin();
|
|
365
|
+
for (; it != log_molalities_map.end(); it++)
|
|
366
|
+
{
|
|
367
|
+
s_oss << indent2;
|
|
368
|
+
s_oss << it->first << " " << it->second << "\n";
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
#ifdef USE_REVISED_READ_RAW
|
|
375
|
+
void
|
|
376
|
+
cxxSolution::read_raw(CParser & parser, bool check)
|
|
377
|
+
{
|
|
378
|
+
|
|
379
|
+
// Used if it is modify
|
|
380
|
+
cxxNameDouble original_totals = this->totals;
|
|
381
|
+
cxxNameDouble original_activities(this->master_activity);
|
|
382
|
+
|
|
383
|
+
this->master_activity.clear();
|
|
384
|
+
|
|
385
|
+
std::istream::pos_type ptr;
|
|
386
|
+
std::istream::pos_type next_char;
|
|
387
|
+
std::string token;
|
|
388
|
+
int opt_save;
|
|
389
|
+
|
|
390
|
+
// Read solution number and description
|
|
391
|
+
this->read_number_description(parser.line());
|
|
392
|
+
this->Set_new_def(false);
|
|
393
|
+
|
|
394
|
+
opt_save = CParser::OPT_ERROR;
|
|
395
|
+
bool tc_defined(false);
|
|
396
|
+
bool ph_defined(false);
|
|
397
|
+
bool pe_defined(false);
|
|
398
|
+
bool mu_defined(false);
|
|
399
|
+
bool ah2o_defined(false);
|
|
400
|
+
bool total_h_defined(false);
|
|
401
|
+
bool total_o_defined(false);
|
|
402
|
+
bool cb_defined(false);
|
|
403
|
+
bool mass_water_defined(false);
|
|
404
|
+
bool total_alkalinity_defined(false);
|
|
405
|
+
|
|
406
|
+
for (;;)
|
|
407
|
+
{
|
|
408
|
+
int opt = parser.get_option(vopts, next_char);
|
|
409
|
+
if (opt == CParser::OPT_DEFAULT)
|
|
410
|
+
{
|
|
411
|
+
opt = opt_save;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
switch (opt)
|
|
415
|
+
{
|
|
416
|
+
case CParser::OPT_EOF:
|
|
417
|
+
break;
|
|
418
|
+
case CParser::OPT_KEYWORD:
|
|
419
|
+
break;
|
|
420
|
+
case CParser::OPT_DEFAULT:
|
|
421
|
+
case CParser::OPT_ERROR:
|
|
422
|
+
opt = CParser::OPT_EOF;
|
|
423
|
+
parser.error_msg("Unknown input in SOLUTION_RAW keyword.",
|
|
424
|
+
PHRQ_io::OT_CONTINUE);
|
|
425
|
+
parser.error_msg(parser.line().c_str(), PHRQ_io::OT_CONTINUE);
|
|
426
|
+
continue;
|
|
427
|
+
|
|
428
|
+
case 0: // totals
|
|
429
|
+
{
|
|
430
|
+
cxxNameDouble temp_totals;
|
|
431
|
+
if (temp_totals.read_raw(parser, next_char) != CParser::PARSER_OK)
|
|
432
|
+
{
|
|
433
|
+
parser.incr_input_error();
|
|
434
|
+
parser.
|
|
435
|
+
error_msg("Expected element name and moles for totals.",
|
|
436
|
+
PHRQ_io::OT_CONTINUE);
|
|
437
|
+
}
|
|
438
|
+
else
|
|
439
|
+
{
|
|
440
|
+
this->totals.merge_redox(temp_totals);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
opt_save = 0;
|
|
444
|
+
break;
|
|
445
|
+
|
|
446
|
+
case 1: // activities
|
|
447
|
+
if (this->master_activity.read_raw(parser, next_char) !=
|
|
448
|
+
CParser::PARSER_OK)
|
|
449
|
+
{
|
|
450
|
+
parser.incr_input_error();
|
|
451
|
+
parser.
|
|
452
|
+
error_msg
|
|
453
|
+
("Expected species name and log activity for activities.",
|
|
454
|
+
PHRQ_io::OT_CONTINUE);
|
|
455
|
+
}
|
|
456
|
+
opt_save = 1;
|
|
457
|
+
break;
|
|
458
|
+
|
|
459
|
+
case 2: // gammas
|
|
460
|
+
if (this->species_gamma.read_raw(parser, next_char) !=
|
|
461
|
+
CParser::PARSER_OK)
|
|
462
|
+
{
|
|
463
|
+
parser.incr_input_error();
|
|
464
|
+
parser.
|
|
465
|
+
error_msg
|
|
466
|
+
("Expected species name and activity coefficient for gammas.",
|
|
467
|
+
PHRQ_io::OT_CONTINUE);
|
|
468
|
+
}
|
|
469
|
+
opt_save = 2;
|
|
470
|
+
break;
|
|
471
|
+
|
|
472
|
+
case 3: // isotope
|
|
473
|
+
{
|
|
474
|
+
std::string name;
|
|
475
|
+
if (!(parser.get_iss() >> name))
|
|
476
|
+
{
|
|
477
|
+
parser.incr_input_error();
|
|
478
|
+
parser.error_msg("Expected character value for isotope name.",
|
|
479
|
+
PHRQ_io::OT_CONTINUE);
|
|
480
|
+
}
|
|
481
|
+
else
|
|
482
|
+
{
|
|
483
|
+
cxxSolutionIsotope iso(this->Get_io());
|
|
484
|
+
iso.Set_isotope_name(name.c_str());
|
|
485
|
+
iso.read_raw(parser, check);
|
|
486
|
+
this->isotopes[name] = iso;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
490
|
+
break;
|
|
491
|
+
|
|
492
|
+
case 4: // temp
|
|
493
|
+
case 5: // tc_avoid_conflict_with_technetium
|
|
494
|
+
case 6: // temperature
|
|
495
|
+
if (!(parser.get_iss() >> this->tc))
|
|
496
|
+
{
|
|
497
|
+
this->tc = 25.0;
|
|
498
|
+
parser.incr_input_error();
|
|
499
|
+
parser.error_msg("Expected numeric value for temperature.",
|
|
500
|
+
PHRQ_io::OT_CONTINUE);
|
|
501
|
+
}
|
|
502
|
+
tc_defined = true;
|
|
503
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
504
|
+
break;
|
|
505
|
+
|
|
506
|
+
case 7: // ph
|
|
507
|
+
if (!(parser.get_iss() >> this->ph))
|
|
508
|
+
{
|
|
509
|
+
this->ph = 7.0;
|
|
510
|
+
parser.incr_input_error();
|
|
511
|
+
parser.error_msg("Expected numeric value for pH.",
|
|
512
|
+
PHRQ_io::OT_CONTINUE);
|
|
513
|
+
}
|
|
514
|
+
ph_defined = true;
|
|
515
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
516
|
+
break;
|
|
517
|
+
|
|
518
|
+
case 8: // pe
|
|
519
|
+
if (!(parser.get_iss() >> this->pe))
|
|
520
|
+
{
|
|
521
|
+
this->pe = 4.0;
|
|
522
|
+
parser.incr_input_error();
|
|
523
|
+
parser.error_msg("Expected numeric value for pe.",
|
|
524
|
+
PHRQ_io::OT_CONTINUE);
|
|
525
|
+
}
|
|
526
|
+
pe_defined = true;
|
|
527
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
528
|
+
break;
|
|
529
|
+
|
|
530
|
+
case 9: // mu
|
|
531
|
+
case 10: // ionic_strength
|
|
532
|
+
if (!(parser.get_iss() >> this->mu))
|
|
533
|
+
{
|
|
534
|
+
this->mu = 1e-7;
|
|
535
|
+
parser.incr_input_error();
|
|
536
|
+
parser.error_msg("Expected numeric value for ionic strength.",
|
|
537
|
+
PHRQ_io::OT_CONTINUE);
|
|
538
|
+
}
|
|
539
|
+
mu_defined = true;
|
|
540
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
541
|
+
break;
|
|
542
|
+
|
|
543
|
+
case 11: // ah2o
|
|
544
|
+
case 12: // activity_water
|
|
545
|
+
if (!(parser.get_iss() >> this->ah2o))
|
|
546
|
+
{
|
|
547
|
+
this->ah2o = 1.0;
|
|
548
|
+
parser.incr_input_error();
|
|
549
|
+
parser.
|
|
550
|
+
error_msg("Expected numeric value for activity of water.",
|
|
551
|
+
PHRQ_io::OT_CONTINUE);
|
|
552
|
+
}
|
|
553
|
+
ah2o_defined = true;
|
|
554
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
555
|
+
break;
|
|
556
|
+
|
|
557
|
+
case 13: // total_h
|
|
558
|
+
if (!(parser.get_iss() >> this->total_h))
|
|
559
|
+
{
|
|
560
|
+
this->total_h = 111.1;
|
|
561
|
+
parser.incr_input_error();
|
|
562
|
+
parser.error_msg("Expected numeric value for total hydrogen.",
|
|
563
|
+
PHRQ_io::OT_CONTINUE);
|
|
564
|
+
}
|
|
565
|
+
total_h_defined = true;
|
|
566
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
567
|
+
break;
|
|
568
|
+
|
|
569
|
+
case 14: // total_o
|
|
570
|
+
if (!(parser.get_iss() >> this->total_o))
|
|
571
|
+
{
|
|
572
|
+
this->total_o = 55.55;
|
|
573
|
+
parser.incr_input_error();
|
|
574
|
+
parser.error_msg("Expected numeric value for total oxygen.",
|
|
575
|
+
PHRQ_io::OT_CONTINUE);
|
|
576
|
+
}
|
|
577
|
+
total_o_defined = true;
|
|
578
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
579
|
+
break;
|
|
580
|
+
|
|
581
|
+
case 15: // mass_water
|
|
582
|
+
case 16: // mass_h2o
|
|
583
|
+
if (!(parser.get_iss() >> this->mass_water))
|
|
584
|
+
{
|
|
585
|
+
this->mass_water = 1.0;
|
|
586
|
+
parser.incr_input_error();
|
|
587
|
+
parser.error_msg("Expected numeric value for mass of water.",
|
|
588
|
+
PHRQ_io::OT_CONTINUE);
|
|
589
|
+
}
|
|
590
|
+
mass_water_defined = true;
|
|
591
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
592
|
+
break;
|
|
593
|
+
|
|
594
|
+
case 17: // total_alkalinity
|
|
595
|
+
case 18: // total_alk
|
|
596
|
+
if (!(parser.get_iss() >> this->total_alkalinity))
|
|
597
|
+
{
|
|
598
|
+
this->total_alkalinity = 0;
|
|
599
|
+
parser.incr_input_error();
|
|
600
|
+
parser.
|
|
601
|
+
error_msg("Expected numeric value for total_alkalinity.",
|
|
602
|
+
PHRQ_io::OT_CONTINUE);
|
|
603
|
+
}
|
|
604
|
+
total_alkalinity_defined = true;
|
|
605
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
606
|
+
break;
|
|
607
|
+
|
|
608
|
+
case 19: // cb
|
|
609
|
+
case 20: // charge_balance
|
|
610
|
+
if (!(parser.get_iss() >> this->cb))
|
|
611
|
+
{
|
|
612
|
+
this->cb = 0;
|
|
613
|
+
parser.incr_input_error();
|
|
614
|
+
parser.error_msg("Expected numeric value for charge balance.",
|
|
615
|
+
PHRQ_io::OT_CONTINUE);
|
|
616
|
+
}
|
|
617
|
+
cb_defined = true;
|
|
618
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
619
|
+
break;
|
|
620
|
+
case 21: // density
|
|
621
|
+
if (!(parser.get_iss() >> this->density))
|
|
622
|
+
{
|
|
623
|
+
this->density = 1.0;
|
|
624
|
+
parser.incr_input_error();
|
|
625
|
+
parser.error_msg("Expected numeric value for density.",
|
|
626
|
+
PHRQ_io::OT_CONTINUE);
|
|
627
|
+
}
|
|
628
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
629
|
+
break;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
if (opt == CParser::OPT_EOF || opt == CParser::OPT_KEYWORD)
|
|
633
|
+
break;
|
|
634
|
+
}
|
|
635
|
+
if (check)
|
|
636
|
+
{
|
|
637
|
+
// all members must be defined
|
|
638
|
+
if (tc_defined == false)
|
|
639
|
+
{
|
|
640
|
+
parser.incr_input_error();
|
|
641
|
+
parser.error_msg("Temp not defined for SOLUTION_RAW input.",
|
|
642
|
+
PHRQ_io::OT_CONTINUE);
|
|
643
|
+
}
|
|
644
|
+
if (ph_defined == false)
|
|
645
|
+
{
|
|
646
|
+
parser.incr_input_error();
|
|
647
|
+
parser.error_msg("pH not defined for SOLUTION_RAW input.",
|
|
648
|
+
PHRQ_io::OT_CONTINUE);
|
|
649
|
+
}
|
|
650
|
+
if (pe_defined == false)
|
|
651
|
+
{
|
|
652
|
+
parser.incr_input_error();
|
|
653
|
+
parser.error_msg("pe not defined for SOLUTION_RAW input.",
|
|
654
|
+
PHRQ_io::OT_CONTINUE);
|
|
655
|
+
}
|
|
656
|
+
if (mu_defined == false)
|
|
657
|
+
{
|
|
658
|
+
parser.incr_input_error();
|
|
659
|
+
parser.error_msg("Ionic strength not defined for SOLUTION_RAW input.",
|
|
660
|
+
PHRQ_io::OT_CONTINUE);
|
|
661
|
+
}
|
|
662
|
+
if (ah2o_defined == false)
|
|
663
|
+
{
|
|
664
|
+
parser.incr_input_error();
|
|
665
|
+
parser.
|
|
666
|
+
error_msg("Activity of water not defined for SOLUTION_RAW input.",
|
|
667
|
+
PHRQ_io::OT_CONTINUE);
|
|
668
|
+
}
|
|
669
|
+
if (total_h_defined == false)
|
|
670
|
+
{
|
|
671
|
+
parser.incr_input_error();
|
|
672
|
+
parser.error_msg("Total hydrogen not defined for SOLUTION_RAW input.",
|
|
673
|
+
PHRQ_io::OT_CONTINUE);
|
|
674
|
+
}
|
|
675
|
+
if (total_o_defined == false)
|
|
676
|
+
{
|
|
677
|
+
parser.incr_input_error();
|
|
678
|
+
parser.error_msg("Total oxygen not defined for SOLUTION_RAW input.",
|
|
679
|
+
PHRQ_io::OT_CONTINUE);
|
|
680
|
+
}
|
|
681
|
+
if (cb_defined == false)
|
|
682
|
+
{
|
|
683
|
+
parser.incr_input_error();
|
|
684
|
+
parser.error_msg("Charge balance not defined for SOLUTION_RAW input.",
|
|
685
|
+
PHRQ_io::OT_CONTINUE);
|
|
686
|
+
}
|
|
687
|
+
if (mass_water_defined == false)
|
|
688
|
+
{
|
|
689
|
+
parser.incr_input_error();
|
|
690
|
+
parser.error_msg("Temp not defined for SOLUTION_RAW input.",
|
|
691
|
+
PHRQ_io::OT_CONTINUE);
|
|
692
|
+
}
|
|
693
|
+
if (total_alkalinity_defined == false)
|
|
694
|
+
{
|
|
695
|
+
parser.incr_input_error();
|
|
696
|
+
parser.
|
|
697
|
+
error_msg("Total alkalinity not defined for SOLUTION_RAW input.",
|
|
698
|
+
PHRQ_io::OT_CONTINUE);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
// Update activities
|
|
703
|
+
|
|
704
|
+
if (original_activities.size() > 0)
|
|
705
|
+
{
|
|
706
|
+
cxxNameDouble new_activities = this->master_activity;
|
|
707
|
+
this->master_activity = original_activities;
|
|
708
|
+
this->Update_activities(original_totals);
|
|
709
|
+
cxxNameDouble::iterator it = new_activities.begin();
|
|
710
|
+
for ( ; it != new_activities.end(); it++)
|
|
711
|
+
{
|
|
712
|
+
this->master_activity[it->first] = it->second;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
return;
|
|
716
|
+
}
|
|
717
|
+
#endif
|
|
718
|
+
void
|
|
719
|
+
cxxSolution::read_raw(CParser & parser, bool check)
|
|
720
|
+
{
|
|
721
|
+
|
|
722
|
+
// Used if it is modify
|
|
723
|
+
cxxNameDouble simple_original_totals = this->totals.Simplify_redox();
|
|
724
|
+
cxxNameDouble original_activities(this->master_activity);
|
|
725
|
+
|
|
726
|
+
this->master_activity.clear();
|
|
727
|
+
|
|
728
|
+
std::istream::pos_type ptr;
|
|
729
|
+
std::istream::pos_type next_char;
|
|
730
|
+
std::string token;
|
|
731
|
+
int opt_save;
|
|
732
|
+
|
|
733
|
+
// Read solution number and description
|
|
734
|
+
this->read_number_description(parser.line());
|
|
735
|
+
|
|
736
|
+
opt_save = CParser::OPT_ERROR;
|
|
737
|
+
bool tc_defined(false);
|
|
738
|
+
bool ph_defined(false);
|
|
739
|
+
bool pe_defined(false);
|
|
740
|
+
bool mu_defined(false);
|
|
741
|
+
bool ah2o_defined(false);
|
|
742
|
+
bool total_h_defined(false);
|
|
743
|
+
bool total_o_defined(false);
|
|
744
|
+
bool cb_defined(false);
|
|
745
|
+
bool mass_water_defined(false);
|
|
746
|
+
bool total_alkalinity_defined(false);
|
|
747
|
+
|
|
748
|
+
for (;;)
|
|
749
|
+
{
|
|
750
|
+
int opt = parser.get_option(vopts, next_char);
|
|
751
|
+
if (opt == CParser::OPT_DEFAULT)
|
|
752
|
+
{
|
|
753
|
+
opt = opt_save;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
switch (opt)
|
|
757
|
+
{
|
|
758
|
+
case CParser::OPT_EOF:
|
|
759
|
+
break;
|
|
760
|
+
case CParser::OPT_KEYWORD:
|
|
761
|
+
break;
|
|
762
|
+
case CParser::OPT_DEFAULT:
|
|
763
|
+
case CParser::OPT_ERROR:
|
|
764
|
+
opt = CParser::OPT_EOF;
|
|
765
|
+
parser.error_msg("Unknown input in SOLUTION_RAW keyword.",
|
|
766
|
+
PHRQ_io::OT_CONTINUE);
|
|
767
|
+
parser.error_msg(parser.line().c_str(), PHRQ_io::OT_CONTINUE);
|
|
768
|
+
continue;
|
|
769
|
+
|
|
770
|
+
case 0: // totals
|
|
771
|
+
{
|
|
772
|
+
cxxNameDouble temp_totals;
|
|
773
|
+
if (temp_totals.read_raw(parser, next_char) != CParser::PARSER_OK)
|
|
774
|
+
{
|
|
775
|
+
parser.incr_input_error();
|
|
776
|
+
parser.
|
|
777
|
+
error_msg("Expected element name and moles for totals.",
|
|
778
|
+
PHRQ_io::OT_CONTINUE);
|
|
779
|
+
}
|
|
780
|
+
else
|
|
781
|
+
{
|
|
782
|
+
this->totals.merge_redox(temp_totals);
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
opt_save = 0;
|
|
786
|
+
break;
|
|
787
|
+
|
|
788
|
+
case 1: // activities
|
|
789
|
+
if (this->master_activity.read_raw(parser, next_char) !=
|
|
790
|
+
CParser::PARSER_OK)
|
|
791
|
+
{
|
|
792
|
+
parser.incr_input_error();
|
|
793
|
+
parser.
|
|
794
|
+
error_msg
|
|
795
|
+
("Expected species name and log activity for activities.",
|
|
796
|
+
PHRQ_io::OT_CONTINUE);
|
|
797
|
+
}
|
|
798
|
+
opt_save = 1;
|
|
799
|
+
break;
|
|
800
|
+
|
|
801
|
+
case 2: // gammas
|
|
802
|
+
if (this->species_gamma.read_raw(parser, next_char) !=
|
|
803
|
+
CParser::PARSER_OK)
|
|
804
|
+
{
|
|
805
|
+
parser.incr_input_error();
|
|
806
|
+
parser.
|
|
807
|
+
error_msg
|
|
808
|
+
("Expected species name and activity coefficient for gammas.",
|
|
809
|
+
PHRQ_io::OT_CONTINUE);
|
|
810
|
+
}
|
|
811
|
+
opt_save = 2;
|
|
812
|
+
break;
|
|
813
|
+
|
|
814
|
+
case 3: // isotope
|
|
815
|
+
{
|
|
816
|
+
std::string name;
|
|
817
|
+
if (!(parser.get_iss() >> name))
|
|
818
|
+
{
|
|
819
|
+
parser.incr_input_error();
|
|
820
|
+
parser.error_msg("Expected character value for isotope name.",
|
|
821
|
+
PHRQ_io::OT_CONTINUE);
|
|
822
|
+
}
|
|
823
|
+
else
|
|
824
|
+
{
|
|
825
|
+
cxxSolutionIsotope iso(this->Get_io());
|
|
826
|
+
iso.Set_isotope_name(name.c_str());
|
|
827
|
+
iso.read_raw(parser, check);
|
|
828
|
+
this->isotopes[name] = iso;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
832
|
+
break;
|
|
833
|
+
|
|
834
|
+
case 4: // temp
|
|
835
|
+
case 5: // tc_avoid_conflict_with_technetium
|
|
836
|
+
case 6: // temperature
|
|
837
|
+
if (!(parser.get_iss() >> this->tc))
|
|
838
|
+
{
|
|
839
|
+
this->tc = 25.0;
|
|
840
|
+
parser.incr_input_error();
|
|
841
|
+
parser.error_msg("Expected numeric value for temperature.",
|
|
842
|
+
PHRQ_io::OT_CONTINUE);
|
|
843
|
+
}
|
|
844
|
+
tc_defined = true;
|
|
845
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
846
|
+
break;
|
|
847
|
+
|
|
848
|
+
case 7: // ph
|
|
849
|
+
if (!(parser.get_iss() >> this->ph))
|
|
850
|
+
{
|
|
851
|
+
this->ph = 7.0;
|
|
852
|
+
parser.incr_input_error();
|
|
853
|
+
parser.error_msg("Expected numeric value for pH.",
|
|
854
|
+
PHRQ_io::OT_CONTINUE);
|
|
855
|
+
}
|
|
856
|
+
ph_defined = true;
|
|
857
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
858
|
+
break;
|
|
859
|
+
|
|
860
|
+
case 8: // pe
|
|
861
|
+
if (!(parser.get_iss() >> this->pe))
|
|
862
|
+
{
|
|
863
|
+
this->pe = 4.0;
|
|
864
|
+
parser.incr_input_error();
|
|
865
|
+
parser.error_msg("Expected numeric value for pe.",
|
|
866
|
+
PHRQ_io::OT_CONTINUE);
|
|
867
|
+
}
|
|
868
|
+
pe_defined = true;
|
|
869
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
870
|
+
break;
|
|
871
|
+
|
|
872
|
+
case 9: // mu
|
|
873
|
+
case 10: // ionic_strength
|
|
874
|
+
if (!(parser.get_iss() >> this->mu))
|
|
875
|
+
{
|
|
876
|
+
this->mu = 1e-7;
|
|
877
|
+
parser.incr_input_error();
|
|
878
|
+
parser.error_msg("Expected numeric value for ionic strength.",
|
|
879
|
+
PHRQ_io::OT_CONTINUE);
|
|
880
|
+
}
|
|
881
|
+
mu_defined = true;
|
|
882
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
883
|
+
break;
|
|
884
|
+
|
|
885
|
+
case 11: // ah2o
|
|
886
|
+
case 12: // activity_water
|
|
887
|
+
if (!(parser.get_iss() >> this->ah2o))
|
|
888
|
+
{
|
|
889
|
+
this->ah2o = 1.0;
|
|
890
|
+
parser.incr_input_error();
|
|
891
|
+
parser.
|
|
892
|
+
error_msg("Expected numeric value for activity of water.",
|
|
893
|
+
PHRQ_io::OT_CONTINUE);
|
|
894
|
+
}
|
|
895
|
+
ah2o_defined = true;
|
|
896
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
897
|
+
break;
|
|
898
|
+
|
|
899
|
+
case 13: // total_h
|
|
900
|
+
if (!(parser.get_iss() >> this->total_h))
|
|
901
|
+
{
|
|
902
|
+
this->total_h = 111.1;
|
|
903
|
+
parser.incr_input_error();
|
|
904
|
+
parser.error_msg("Expected numeric value for total hydrogen.",
|
|
905
|
+
PHRQ_io::OT_CONTINUE);
|
|
906
|
+
}
|
|
907
|
+
total_h_defined = true;
|
|
908
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
909
|
+
break;
|
|
910
|
+
|
|
911
|
+
case 14: // total_o
|
|
912
|
+
if (!(parser.get_iss() >> this->total_o))
|
|
913
|
+
{
|
|
914
|
+
this->total_o = 55.55;
|
|
915
|
+
parser.incr_input_error();
|
|
916
|
+
parser.error_msg("Expected numeric value for total oxygen.",
|
|
917
|
+
PHRQ_io::OT_CONTINUE);
|
|
918
|
+
}
|
|
919
|
+
total_o_defined = true;
|
|
920
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
921
|
+
break;
|
|
922
|
+
|
|
923
|
+
case 15: // mass_water
|
|
924
|
+
case 16: // mass_h2o
|
|
925
|
+
if (!(parser.get_iss() >> this->mass_water))
|
|
926
|
+
{
|
|
927
|
+
this->mass_water = 1.0;
|
|
928
|
+
parser.incr_input_error();
|
|
929
|
+
parser.error_msg("Expected numeric value for mass of water.",
|
|
930
|
+
PHRQ_io::OT_CONTINUE);
|
|
931
|
+
}
|
|
932
|
+
mass_water_defined = true;
|
|
933
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
934
|
+
break;
|
|
935
|
+
|
|
936
|
+
case 17: // total_alkalinity
|
|
937
|
+
case 18: // total_alk
|
|
938
|
+
if (!(parser.get_iss() >> this->total_alkalinity))
|
|
939
|
+
{
|
|
940
|
+
this->total_alkalinity = 0;
|
|
941
|
+
parser.incr_input_error();
|
|
942
|
+
parser.
|
|
943
|
+
error_msg("Expected numeric value for total_alkalinity.",
|
|
944
|
+
PHRQ_io::OT_CONTINUE);
|
|
945
|
+
}
|
|
946
|
+
total_alkalinity_defined = true;
|
|
947
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
948
|
+
break;
|
|
949
|
+
|
|
950
|
+
case 19: // cb
|
|
951
|
+
case 20: // charge_balance
|
|
952
|
+
if (!(parser.get_iss() >> this->cb))
|
|
953
|
+
{
|
|
954
|
+
this->cb = 0;
|
|
955
|
+
parser.incr_input_error();
|
|
956
|
+
parser.error_msg("Expected numeric value for charge balance.",
|
|
957
|
+
PHRQ_io::OT_CONTINUE);
|
|
958
|
+
}
|
|
959
|
+
cb_defined = true;
|
|
960
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
961
|
+
break;
|
|
962
|
+
case 21: // density
|
|
963
|
+
if (!(parser.get_iss() >> this->density))
|
|
964
|
+
{
|
|
965
|
+
this->density = 1.0;
|
|
966
|
+
parser.incr_input_error();
|
|
967
|
+
parser.error_msg("Expected numeric value for density.",
|
|
968
|
+
PHRQ_io::OT_CONTINUE);
|
|
969
|
+
}
|
|
970
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
971
|
+
break;
|
|
972
|
+
case 22: // pressure
|
|
973
|
+
if (!(parser.get_iss() >> this->patm))
|
|
974
|
+
{
|
|
975
|
+
this->patm = 1.0;
|
|
976
|
+
parser.incr_input_error();
|
|
977
|
+
parser.error_msg("Expected numeric value for pressure.",
|
|
978
|
+
PHRQ_io::OT_CONTINUE);
|
|
979
|
+
}
|
|
980
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
981
|
+
break;
|
|
982
|
+
|
|
983
|
+
case 23: // soln_vol
|
|
984
|
+
if (!(parser.get_iss() >> this->soln_vol))
|
|
985
|
+
{
|
|
986
|
+
this->soln_vol = 1.0;
|
|
987
|
+
parser.incr_input_error();
|
|
988
|
+
parser.error_msg("Expected numeric value for solution volume.",
|
|
989
|
+
PHRQ_io::OT_CONTINUE);
|
|
990
|
+
}
|
|
991
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
992
|
+
break;
|
|
993
|
+
|
|
994
|
+
case 24: // species_map
|
|
995
|
+
{
|
|
996
|
+
int s_num;
|
|
997
|
+
if (parser.peek_token() != CParser::TT_EMPTY)
|
|
998
|
+
{
|
|
999
|
+
if (!(parser.get_iss() >> s_num))
|
|
1000
|
+
{
|
|
1001
|
+
parser.incr_input_error();
|
|
1002
|
+
parser.error_msg("Expected integer for species number.",
|
|
1003
|
+
PHRQ_io::OT_CONTINUE);
|
|
1004
|
+
}
|
|
1005
|
+
else
|
|
1006
|
+
{
|
|
1007
|
+
double d;
|
|
1008
|
+
if (!(parser.get_iss() >> d))
|
|
1009
|
+
{
|
|
1010
|
+
parser.incr_input_error();
|
|
1011
|
+
parser.error_msg("Expected double for species concentration.",
|
|
1012
|
+
PHRQ_io::OT_CONTINUE);
|
|
1013
|
+
}
|
|
1014
|
+
this->species_map[s_num] = d;
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
opt_save = 24;
|
|
1018
|
+
}
|
|
1019
|
+
break;
|
|
1020
|
+
case 25: // log_gamma_map
|
|
1021
|
+
{
|
|
1022
|
+
int s_num;
|
|
1023
|
+
if (parser.peek_token() != CParser::TT_EMPTY)
|
|
1024
|
+
{
|
|
1025
|
+
if (!(parser.get_iss() >> s_num))
|
|
1026
|
+
{
|
|
1027
|
+
parser.incr_input_error();
|
|
1028
|
+
parser.error_msg("Expected integer for species number.",
|
|
1029
|
+
PHRQ_io::OT_CONTINUE);
|
|
1030
|
+
}
|
|
1031
|
+
else
|
|
1032
|
+
{
|
|
1033
|
+
double d;
|
|
1034
|
+
if (!(parser.get_iss() >> d))
|
|
1035
|
+
{
|
|
1036
|
+
parser.incr_input_error();
|
|
1037
|
+
parser.error_msg("Expected double for species concentration.",
|
|
1038
|
+
PHRQ_io::OT_CONTINUE);
|
|
1039
|
+
}
|
|
1040
|
+
this->log_gamma_map[s_num] = d;
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
opt_save = 25;
|
|
1044
|
+
}
|
|
1045
|
+
break;
|
|
1046
|
+
|
|
1047
|
+
case 26: // potential
|
|
1048
|
+
if (!(parser.get_iss() >> this->potV))
|
|
1049
|
+
{
|
|
1050
|
+
this->potV = 0.0;
|
|
1051
|
+
parser.incr_input_error();
|
|
1052
|
+
parser.error_msg("Expected numeric value for potential (V).",
|
|
1053
|
+
PHRQ_io::OT_CONTINUE);
|
|
1054
|
+
}
|
|
1055
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
1056
|
+
break;
|
|
1057
|
+
case 27: // log_molalities_map
|
|
1058
|
+
{
|
|
1059
|
+
int s_num;
|
|
1060
|
+
if (parser.peek_token() != CParser::TT_EMPTY)
|
|
1061
|
+
{
|
|
1062
|
+
if (!(parser.get_iss() >> s_num))
|
|
1063
|
+
{
|
|
1064
|
+
parser.incr_input_error();
|
|
1065
|
+
parser.error_msg("Expected integer for species number.",
|
|
1066
|
+
PHRQ_io::OT_CONTINUE);
|
|
1067
|
+
}
|
|
1068
|
+
else
|
|
1069
|
+
{
|
|
1070
|
+
double d;
|
|
1071
|
+
if (!(parser.get_iss() >> d))
|
|
1072
|
+
{
|
|
1073
|
+
parser.incr_input_error();
|
|
1074
|
+
parser.error_msg("Expected double for species molality.",
|
|
1075
|
+
PHRQ_io::OT_CONTINUE);
|
|
1076
|
+
}
|
|
1077
|
+
this->log_molalities_map[s_num] = d;
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
opt_save = 27;
|
|
1081
|
+
}
|
|
1082
|
+
break;
|
|
1083
|
+
case 28: // viscosity
|
|
1084
|
+
if (!(parser.get_iss() >> this->viscosity))
|
|
1085
|
+
{
|
|
1086
|
+
this->viscosity = 1.0;
|
|
1087
|
+
parser.incr_input_error();
|
|
1088
|
+
parser.error_msg("Expected numeric value for viscosity.",
|
|
1089
|
+
PHRQ_io::OT_CONTINUE);
|
|
1090
|
+
}
|
|
1091
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
1092
|
+
break;
|
|
1093
|
+
case 29: // viscos_0
|
|
1094
|
+
if (!(parser.get_iss() >> this->viscos_0))
|
|
1095
|
+
{
|
|
1096
|
+
this->viscos_0 = 1.0;
|
|
1097
|
+
parser.incr_input_error();
|
|
1098
|
+
parser.error_msg("Expected numeric value for viscos_0.",
|
|
1099
|
+
PHRQ_io::OT_CONTINUE);
|
|
1100
|
+
}
|
|
1101
|
+
opt_save = CParser::OPT_DEFAULT;
|
|
1102
|
+
break;
|
|
1103
|
+
}
|
|
1104
|
+
if (opt == CParser::OPT_EOF || opt == CParser::OPT_KEYWORD)
|
|
1105
|
+
break;
|
|
1106
|
+
}
|
|
1107
|
+
if (check)
|
|
1108
|
+
{
|
|
1109
|
+
// all members must be defined
|
|
1110
|
+
if (tc_defined == false)
|
|
1111
|
+
{
|
|
1112
|
+
parser.incr_input_error();
|
|
1113
|
+
parser.error_msg("Temp not defined for SOLUTION_RAW input.",
|
|
1114
|
+
PHRQ_io::OT_CONTINUE);
|
|
1115
|
+
}
|
|
1116
|
+
if (ph_defined == false)
|
|
1117
|
+
{
|
|
1118
|
+
parser.incr_input_error();
|
|
1119
|
+
parser.error_msg("pH not defined for SOLUTION_RAW input.",
|
|
1120
|
+
PHRQ_io::OT_CONTINUE);
|
|
1121
|
+
}
|
|
1122
|
+
if (pe_defined == false)
|
|
1123
|
+
{
|
|
1124
|
+
parser.incr_input_error();
|
|
1125
|
+
parser.error_msg("pe not defined for SOLUTION_RAW input.",
|
|
1126
|
+
PHRQ_io::OT_CONTINUE);
|
|
1127
|
+
}
|
|
1128
|
+
if (mu_defined == false)
|
|
1129
|
+
{
|
|
1130
|
+
parser.incr_input_error();
|
|
1131
|
+
parser.error_msg("Ionic strength not defined for SOLUTION_RAW input.",
|
|
1132
|
+
PHRQ_io::OT_CONTINUE);
|
|
1133
|
+
}
|
|
1134
|
+
if (ah2o_defined == false)
|
|
1135
|
+
{
|
|
1136
|
+
parser.incr_input_error();
|
|
1137
|
+
parser.
|
|
1138
|
+
error_msg("Activity of water not defined for SOLUTION_RAW input.",
|
|
1139
|
+
PHRQ_io::OT_CONTINUE);
|
|
1140
|
+
}
|
|
1141
|
+
if (total_h_defined == false)
|
|
1142
|
+
{
|
|
1143
|
+
parser.incr_input_error();
|
|
1144
|
+
parser.error_msg("Total hydrogen not defined for SOLUTION_RAW input.",
|
|
1145
|
+
PHRQ_io::OT_CONTINUE);
|
|
1146
|
+
}
|
|
1147
|
+
if (total_o_defined == false)
|
|
1148
|
+
{
|
|
1149
|
+
parser.incr_input_error();
|
|
1150
|
+
parser.error_msg("Total oxygen not defined for SOLUTION_RAW input.",
|
|
1151
|
+
PHRQ_io::OT_CONTINUE);
|
|
1152
|
+
}
|
|
1153
|
+
if (cb_defined == false)
|
|
1154
|
+
{
|
|
1155
|
+
parser.incr_input_error();
|
|
1156
|
+
parser.error_msg("Charge balance not defined for SOLUTION_RAW input.",
|
|
1157
|
+
PHRQ_io::OT_CONTINUE);
|
|
1158
|
+
}
|
|
1159
|
+
if (mass_water_defined == false)
|
|
1160
|
+
{
|
|
1161
|
+
parser.incr_input_error();
|
|
1162
|
+
parser.error_msg("Temp not defined for SOLUTION_RAW input.",
|
|
1163
|
+
PHRQ_io::OT_CONTINUE);
|
|
1164
|
+
}
|
|
1165
|
+
if (total_alkalinity_defined == false)
|
|
1166
|
+
{
|
|
1167
|
+
parser.incr_input_error();
|
|
1168
|
+
parser.
|
|
1169
|
+
error_msg("Total alkalinity not defined for SOLUTION_RAW input.",
|
|
1170
|
+
PHRQ_io::OT_CONTINUE);
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
// Update activities
|
|
1175
|
+
if (original_activities.size() > 0)
|
|
1176
|
+
{
|
|
1177
|
+
|
|
1178
|
+
cxxNameDouble simple_this_totals = this->totals.Simplify_redox();
|
|
1179
|
+
cxxNameDouble::iterator it = simple_original_totals.begin();
|
|
1180
|
+
for ( ; it != simple_original_totals.end(); it++)
|
|
1181
|
+
{
|
|
1182
|
+
cxxNameDouble::iterator jit = simple_this_totals.find(it->first);
|
|
1183
|
+
if (jit != simple_this_totals.end())
|
|
1184
|
+
{
|
|
1185
|
+
if (it->second > 0 && jit->second > 0.0)
|
|
1186
|
+
{
|
|
1187
|
+
LDBLE f = jit->second / it->second;
|
|
1188
|
+
if (f != 1)
|
|
1189
|
+
{
|
|
1190
|
+
original_activities.Multiply_activities_redox(it->first, f);
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
original_activities.merge_redox(this->master_activity);
|
|
1196
|
+
this->master_activity = original_activities;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
return;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
void
|
|
1203
|
+
cxxSolution::Update(LDBLE h_tot, LDBLE o_tot, LDBLE charge, const cxxNameDouble &const_nd)
|
|
1204
|
+
{
|
|
1205
|
+
// H, O, charge, totals, and activities of solution are updated
|
|
1206
|
+
this->total_h = h_tot;
|
|
1207
|
+
this->total_o = o_tot;
|
|
1208
|
+
this->cb = charge;
|
|
1209
|
+
this->mass_water = o_tot / 55.5;
|
|
1210
|
+
|
|
1211
|
+
// Don`t bother to update activities?
|
|
1212
|
+
this->Update(const_nd);
|
|
1213
|
+
//this->totals = const_nd;
|
|
1214
|
+
cxxNameDouble::iterator it;
|
|
1215
|
+
for (it = this->totals.begin(); it != this->totals.end(); it++)
|
|
1216
|
+
{
|
|
1217
|
+
if (it->second < 1e-25)
|
|
1218
|
+
{
|
|
1219
|
+
it->second = 0.0;
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
void
|
|
1224
|
+
cxxSolution::Update_activities(const cxxNameDouble &original_tot)
|
|
1225
|
+
{
|
|
1226
|
+
// Totals and activities of solution are updated
|
|
1227
|
+
// nd does not have H, O, charge
|
|
1228
|
+
cxxNameDouble simple_original = original_tot.Simplify_redox();
|
|
1229
|
+
// totals after read
|
|
1230
|
+
cxxNameDouble simple_new = this->totals.Simplify_redox();
|
|
1231
|
+
|
|
1232
|
+
// make factors
|
|
1233
|
+
cxxNameDouble factors;
|
|
1234
|
+
{
|
|
1235
|
+
cxxNameDouble::iterator it = simple_new.begin();
|
|
1236
|
+
cxxNameDouble::iterator jit = simple_original.begin();
|
|
1237
|
+
while (it != simple_new.end() && jit != simple_original.end())
|
|
1238
|
+
{
|
|
1239
|
+
int j = strcmp(it->first.c_str(), jit->first.c_str());
|
|
1240
|
+
if (j < 0)
|
|
1241
|
+
{
|
|
1242
|
+
it++;
|
|
1243
|
+
}
|
|
1244
|
+
else if (j == 0)
|
|
1245
|
+
{
|
|
1246
|
+
if (jit->second != it->second)
|
|
1247
|
+
{
|
|
1248
|
+
if (it->second > 0 && jit->second > 0)
|
|
1249
|
+
{
|
|
1250
|
+
factors[it->first] = log10(jit->second / it->second);
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
it++;
|
|
1254
|
+
jit++;
|
|
1255
|
+
}
|
|
1256
|
+
else
|
|
1257
|
+
{
|
|
1258
|
+
jit++;
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
|
|
1263
|
+
// simple_new now has factors for master activities
|
|
1264
|
+
// Now add factors to activities
|
|
1265
|
+
{
|
|
1266
|
+
cxxNameDouble::iterator activity_it = this->master_activity.begin();
|
|
1267
|
+
cxxNameDouble::iterator factors_it = factors.begin();
|
|
1268
|
+
std::string activity_ename;
|
|
1269
|
+
std::basic_string < char >::size_type indexCh;
|
|
1270
|
+
while (activity_it != master_activity.end() && factors_it != factors.end())
|
|
1271
|
+
{
|
|
1272
|
+
activity_ename = activity_it->first;
|
|
1273
|
+
if (activity_ename.size() > 3)
|
|
1274
|
+
{
|
|
1275
|
+
indexCh = activity_ename.find("(");
|
|
1276
|
+
if (indexCh != std::string::npos)
|
|
1277
|
+
{
|
|
1278
|
+
activity_ename = activity_ename.substr(0, indexCh);
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
int j = strcmp(factors_it->first.c_str(), activity_ename.c_str());
|
|
1282
|
+
if (j < 0)
|
|
1283
|
+
{
|
|
1284
|
+
factors_it++;
|
|
1285
|
+
}
|
|
1286
|
+
else if (j == 0)
|
|
1287
|
+
{
|
|
1288
|
+
activity_it->second += factors_it->second;
|
|
1289
|
+
activity_it++;
|
|
1290
|
+
}
|
|
1291
|
+
else
|
|
1292
|
+
{
|
|
1293
|
+
activity_it++;
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
void
|
|
1300
|
+
cxxSolution::Update(const cxxNameDouble &const_nd)
|
|
1301
|
+
{
|
|
1302
|
+
// const_nd is a list of new totals, assumed to be inclusive of all elements
|
|
1303
|
+
// Totals and activities of solution are updated
|
|
1304
|
+
// nd does not have H, O, charge
|
|
1305
|
+
cxxNameDouble simple_original = this->totals.Simplify_redox();
|
|
1306
|
+
cxxNameDouble simple_new = const_nd.Simplify_redox();
|
|
1307
|
+
|
|
1308
|
+
cxxNameDouble factors;
|
|
1309
|
+
{
|
|
1310
|
+
// make factors
|
|
1311
|
+
cxxNameDouble::iterator it = simple_new.begin();
|
|
1312
|
+
cxxNameDouble::iterator jit = simple_original.begin();
|
|
1313
|
+
while (it != simple_new.end() && jit != simple_original.end())
|
|
1314
|
+
{
|
|
1315
|
+
int j = strcmp(it->first.c_str(), jit->first.c_str());
|
|
1316
|
+
if (j < 0)
|
|
1317
|
+
{
|
|
1318
|
+
it++;
|
|
1319
|
+
}
|
|
1320
|
+
else if (j == 0)
|
|
1321
|
+
{
|
|
1322
|
+
if (jit->second != it->second)
|
|
1323
|
+
{
|
|
1324
|
+
if (it->second > 0 && jit->second > 0)
|
|
1325
|
+
{
|
|
1326
|
+
factors[it->first] = log10(it->second / jit->second);
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
it++;
|
|
1330
|
+
jit++;
|
|
1331
|
+
}
|
|
1332
|
+
else
|
|
1333
|
+
{
|
|
1334
|
+
jit++;
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
// simple_new now has factors for master activities
|
|
1338
|
+
// Now add log factors to log activities
|
|
1339
|
+
{
|
|
1340
|
+
cxxNameDouble::iterator activity_it = this->master_activity.begin();
|
|
1341
|
+
cxxNameDouble::iterator factors_it = factors.begin();
|
|
1342
|
+
std::string activity_ename;
|
|
1343
|
+
std::basic_string < char >::size_type indexCh;
|
|
1344
|
+
while (activity_it != master_activity.end() && factors_it != factors.end())
|
|
1345
|
+
{
|
|
1346
|
+
activity_ename = activity_it->first;
|
|
1347
|
+
if (factors_it->first[0] < activity_ename[0])
|
|
1348
|
+
{
|
|
1349
|
+
factors_it++;
|
|
1350
|
+
continue;
|
|
1351
|
+
}
|
|
1352
|
+
else if (factors_it->first[0] > activity_ename[0])
|
|
1353
|
+
{
|
|
1354
|
+
activity_it++;
|
|
1355
|
+
continue;
|
|
1356
|
+
}
|
|
1357
|
+
if (activity_ename.size() > 3)
|
|
1358
|
+
{
|
|
1359
|
+
indexCh = activity_ename.find("(");
|
|
1360
|
+
if (indexCh != std::string::npos)
|
|
1361
|
+
{
|
|
1362
|
+
activity_ename = activity_ename.substr(0, indexCh);
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
int j = strcmp(factors_it->first.c_str(), activity_ename.c_str());
|
|
1366
|
+
if (j < 0)
|
|
1367
|
+
{
|
|
1368
|
+
factors_it++;
|
|
1369
|
+
}
|
|
1370
|
+
else if (j == 0)
|
|
1371
|
+
{
|
|
1372
|
+
activity_it->second += factors_it->second;
|
|
1373
|
+
activity_it++;
|
|
1374
|
+
}
|
|
1375
|
+
else
|
|
1376
|
+
{
|
|
1377
|
+
activity_it++;
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
// update totals
|
|
1384
|
+
this->totals = simple_new;
|
|
1385
|
+
}
|
|
1386
|
+
void
|
|
1387
|
+
cxxSolution::zero()
|
|
1388
|
+
{
|
|
1389
|
+
this->tc = 0.0;
|
|
1390
|
+
this->ph = 0.0;
|
|
1391
|
+
this->pe = 0.0;
|
|
1392
|
+
this->mu = 0.0;
|
|
1393
|
+
this->ah2o = 0.0;
|
|
1394
|
+
this->total_h = 0.0;
|
|
1395
|
+
this->total_o = 0.0;
|
|
1396
|
+
this->cb = 0.0;
|
|
1397
|
+
this->density = 1.0;
|
|
1398
|
+
this->viscosity = 1.0;
|
|
1399
|
+
this->viscos_0 = 1.0;
|
|
1400
|
+
this->mass_water = 0.0;
|
|
1401
|
+
this->soln_vol = 0.0;
|
|
1402
|
+
this->total_alkalinity = 0.0;
|
|
1403
|
+
this->totals.type = cxxNameDouble::ND_ELT_MOLES;
|
|
1404
|
+
this->master_activity.type = cxxNameDouble::ND_SPECIES_LA;
|
|
1405
|
+
this->species_gamma.type = cxxNameDouble::ND_SPECIES_GAMMA;
|
|
1406
|
+
this->patm = 1.0;
|
|
1407
|
+
this->potV = 0.0;
|
|
1408
|
+
this->initial_data = NULL;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
void
|
|
1412
|
+
cxxSolution::add(const cxxSolution & addee, LDBLE extensive)
|
|
1413
|
+
//
|
|
1414
|
+
// Add existing solution to "this" solution
|
|
1415
|
+
//
|
|
1416
|
+
{
|
|
1417
|
+
if (extensive == 0.0)
|
|
1418
|
+
return;
|
|
1419
|
+
LDBLE ext1 = this->mass_water;
|
|
1420
|
+
LDBLE ext2 = addee.mass_water * extensive;
|
|
1421
|
+
LDBLE f1 = ext1 / (ext1 + ext2);
|
|
1422
|
+
LDBLE f2 = ext2 / (ext1 + ext2);
|
|
1423
|
+
this->tc = f1 * this->tc + f2 * addee.tc;
|
|
1424
|
+
this->ph = f1 * this->ph + f2 * addee.ph;
|
|
1425
|
+
this->pe = f1 * this->pe + f2 * addee.pe;
|
|
1426
|
+
this->mu = f1 * this->mu + f2 * addee.mu;
|
|
1427
|
+
this->ah2o = f1 * this->ah2o + f2 * addee.ah2o;
|
|
1428
|
+
this->total_h += addee.total_h * extensive;
|
|
1429
|
+
this->total_o += addee.total_o * extensive;
|
|
1430
|
+
this->cb += addee.cb * extensive;
|
|
1431
|
+
this->density = f1 * this->density + f2 * addee.density;
|
|
1432
|
+
this->viscosity = f1 * this->viscosity + f2 * addee.viscosity;
|
|
1433
|
+
this->viscos_0 = f1 * this->viscos_0 + f2 * addee.viscos_0;
|
|
1434
|
+
this->patm = f1 * this->patm + f2 * addee.patm;
|
|
1435
|
+
// this->potV = f1 * this->potV + f2 * addee.potV; // appt
|
|
1436
|
+
this->mass_water += addee.mass_water * extensive;
|
|
1437
|
+
this->soln_vol += addee.soln_vol * extensive;
|
|
1438
|
+
this->total_alkalinity += addee.total_alkalinity * extensive;
|
|
1439
|
+
this->totals.add_extensive(addee.totals, extensive);
|
|
1440
|
+
this->master_activity.add_log_activities(addee.master_activity, f1, f2);
|
|
1441
|
+
this->species_gamma.add_intensive(addee.species_gamma, f1, f2);
|
|
1442
|
+
this->Add_isotopes(addee.isotopes, f2, extensive);
|
|
1443
|
+
{
|
|
1444
|
+
// Add species
|
|
1445
|
+
std::map<int, double>::const_iterator it = addee.species_map.begin();
|
|
1446
|
+
for ( ; it != addee.species_map.end(); it++)
|
|
1447
|
+
{
|
|
1448
|
+
if (this->species_map.find(it->first) != this->species_map.end())
|
|
1449
|
+
{
|
|
1450
|
+
this->species_map[it->first] = this->species_map[it->first] * f1 + it->second * f2;
|
|
1451
|
+
}
|
|
1452
|
+
else
|
|
1453
|
+
{
|
|
1454
|
+
this->species_map[it->first] = it->second;
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
// Add gammas
|
|
1458
|
+
std::map<int, double>::const_iterator git = addee.log_gamma_map.begin();
|
|
1459
|
+
for ( ; git != addee.log_gamma_map.end(); git++)
|
|
1460
|
+
{
|
|
1461
|
+
if (this->log_gamma_map.find(git->first) != this->log_gamma_map.end())
|
|
1462
|
+
{
|
|
1463
|
+
this->log_gamma_map[git->first] = this->log_gamma_map[git->first] * f1 + git->second * f2;
|
|
1464
|
+
}
|
|
1465
|
+
else
|
|
1466
|
+
{
|
|
1467
|
+
this->log_gamma_map[git->first] = git->second;
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
// Add molalities
|
|
1471
|
+
std::map<int, double>::const_iterator mit = addee.log_molalities_map.begin();
|
|
1472
|
+
for (; mit != addee.log_molalities_map.end(); mit++)
|
|
1473
|
+
{
|
|
1474
|
+
if (this->log_molalities_map.find(mit->first) != this->log_molalities_map.end())
|
|
1475
|
+
{
|
|
1476
|
+
this->log_molalities_map[mit->first] = this->log_molalities_map[mit->first] * f1 + mit->second * f2;
|
|
1477
|
+
}
|
|
1478
|
+
else
|
|
1479
|
+
{
|
|
1480
|
+
this->log_molalities_map[mit->first] = mit->second;
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
void
|
|
1487
|
+
cxxSolution::multiply(LDBLE extensive)
|
|
1488
|
+
//
|
|
1489
|
+
// Multiply existing solution by extensive
|
|
1490
|
+
//
|
|
1491
|
+
{
|
|
1492
|
+
if (extensive == 0.0 || extensive == 1.0)
|
|
1493
|
+
return;
|
|
1494
|
+
this->total_h *= extensive;
|
|
1495
|
+
this->total_o *= extensive;
|
|
1496
|
+
this->cb *= extensive;
|
|
1497
|
+
this->mass_water *= extensive;
|
|
1498
|
+
this->soln_vol *= extensive;
|
|
1499
|
+
this->total_alkalinity *= extensive;
|
|
1500
|
+
this->totals.multiply(extensive);
|
|
1501
|
+
this->Multiply_isotopes(extensive);
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
LDBLE
|
|
1505
|
+
cxxSolution::Get_total(const char *string) const
|
|
1506
|
+
{
|
|
1507
|
+
cxxNameDouble::const_iterator it = this->totals.find(string);
|
|
1508
|
+
if (it == this->totals.end())
|
|
1509
|
+
{
|
|
1510
|
+
return (0.0);
|
|
1511
|
+
}
|
|
1512
|
+
else
|
|
1513
|
+
{
|
|
1514
|
+
return (it->second);
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
void
|
|
1519
|
+
cxxSolution::Set_total(char *string, LDBLE d)
|
|
1520
|
+
{
|
|
1521
|
+
this->totals[string] = d;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
LDBLE
|
|
1525
|
+
cxxSolution::Get_master_activity(char *string) const
|
|
1526
|
+
{
|
|
1527
|
+
cxxNameDouble::const_iterator it = this->master_activity.find(string);
|
|
1528
|
+
if (it == this->master_activity.end())
|
|
1529
|
+
{
|
|
1530
|
+
return (0.0);
|
|
1531
|
+
}
|
|
1532
|
+
else
|
|
1533
|
+
{
|
|
1534
|
+
return (it->second);
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
void
|
|
1539
|
+
cxxSolution::Set_master_activity(char *string, LDBLE d)
|
|
1540
|
+
{
|
|
1541
|
+
this->master_activity[string] = d;
|
|
1542
|
+
}
|
|
1543
|
+
void
|
|
1544
|
+
cxxSolution::Add_isotopes(const std::map < std::string, cxxSolutionIsotope > & old, LDBLE intensive, LDBLE extensive)
|
|
1545
|
+
{
|
|
1546
|
+
for (std::map < std::string, cxxSolutionIsotope >::const_iterator itold = old.begin(); itold != old.end(); ++itold)
|
|
1547
|
+
{
|
|
1548
|
+
std::map < std::string, cxxSolutionIsotope >::iterator it_this;
|
|
1549
|
+
it_this = this->isotopes.find(itold->first);
|
|
1550
|
+
if (it_this != this->isotopes.end())
|
|
1551
|
+
{
|
|
1552
|
+
LDBLE t = it_this->second.Get_total();
|
|
1553
|
+
t += itold->second.Get_total() * extensive;
|
|
1554
|
+
it_this->second.Set_total(t);
|
|
1555
|
+
|
|
1556
|
+
t = it_this->second.Get_ratio();
|
|
1557
|
+
t += itold->second.Get_ratio() * intensive;
|
|
1558
|
+
it_this->second.Set_ratio(t);
|
|
1559
|
+
|
|
1560
|
+
t = it_this->second.Get_ratio_uncertainty();
|
|
1561
|
+
t += itold->second.Get_ratio_uncertainty() * intensive;
|
|
1562
|
+
it_this->second.Set_ratio_uncertainty(t);
|
|
1563
|
+
it_this->second.Set_ratio_uncertainty_defined(it_this->second.Get_ratio_uncertainty_defined()
|
|
1564
|
+
|| itold->second.Get_ratio_uncertainty_defined());
|
|
1565
|
+
}
|
|
1566
|
+
else
|
|
1567
|
+
{
|
|
1568
|
+
cxxSolutionIsotope iso(itold->second);
|
|
1569
|
+
iso.Set_total(itold->second.Get_total() * extensive);
|
|
1570
|
+
this->Get_isotopes()[iso.Get_isotope_name()] = iso;
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
void
|
|
1575
|
+
cxxSolution::Multiply_isotopes(LDBLE extensive)
|
|
1576
|
+
{
|
|
1577
|
+
std::map < std::string, cxxSolutionIsotope>::iterator it;
|
|
1578
|
+
for (it = this->isotopes.begin(); it != this->isotopes.end(); it++)
|
|
1579
|
+
{
|
|
1580
|
+
LDBLE total = it->second.Get_total();
|
|
1581
|
+
total *= extensive;
|
|
1582
|
+
it->second.Set_total(total);
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
/* ---------------------------------------------------------------------- */
|
|
1587
|
+
void
|
|
1588
|
+
cxxSolution::Serialize(Dictionary & dictionary, std::vector < int >&ints,
|
|
1589
|
+
std::vector < double >&doubles)
|
|
1590
|
+
/* ---------------------------------------------------------------------- */
|
|
1591
|
+
{
|
|
1592
|
+
/*
|
|
1593
|
+
* Make list of list of ints and doubles from solution structure
|
|
1594
|
+
* This list is not the complete structure, but only enough
|
|
1595
|
+
* for batch-reaction, advection, and transport calculations
|
|
1596
|
+
*/
|
|
1597
|
+
ints.push_back(this->n_user);
|
|
1598
|
+
ints.push_back(this->new_def ? 1 : 0);
|
|
1599
|
+
doubles.push_back(this->patm);
|
|
1600
|
+
doubles.push_back(this->potV);
|
|
1601
|
+
doubles.push_back(this->tc);
|
|
1602
|
+
doubles.push_back(this->ph);
|
|
1603
|
+
doubles.push_back(this->pe);
|
|
1604
|
+
doubles.push_back(this->mu);
|
|
1605
|
+
doubles.push_back(this->ah2o);
|
|
1606
|
+
doubles.push_back(this->total_h);
|
|
1607
|
+
doubles.push_back(this->total_o);
|
|
1608
|
+
doubles.push_back(this->cb);
|
|
1609
|
+
doubles.push_back(this->mass_water);
|
|
1610
|
+
doubles.push_back(this->density);
|
|
1611
|
+
doubles.push_back(this->viscosity);
|
|
1612
|
+
doubles.push_back(this->soln_vol);
|
|
1613
|
+
doubles.push_back(this->total_alkalinity);
|
|
1614
|
+
/*
|
|
1615
|
+
* struct conc *totals;
|
|
1616
|
+
*/
|
|
1617
|
+
this->totals.Serialize(dictionary, ints, doubles);
|
|
1618
|
+
/*
|
|
1619
|
+
* struct master_activity *master_activity;
|
|
1620
|
+
*/
|
|
1621
|
+
this->master_activity.Serialize(dictionary, ints, doubles);
|
|
1622
|
+
/*
|
|
1623
|
+
* struct master_activity *species_gamma
|
|
1624
|
+
*/
|
|
1625
|
+
this->species_gamma.Serialize(dictionary, ints, doubles);
|
|
1626
|
+
/*
|
|
1627
|
+
* isotopes
|
|
1628
|
+
*/
|
|
1629
|
+
ints.push_back((int) isotopes.size());
|
|
1630
|
+
{
|
|
1631
|
+
std::map < std::string, cxxSolutionIsotope >::iterator it;
|
|
1632
|
+
for (it = isotopes.begin(); it != isotopes.end(); it++)
|
|
1633
|
+
{
|
|
1634
|
+
ints.push_back(dictionary.Find(it->first));
|
|
1635
|
+
it->second.Serialize(dictionary, ints, doubles);
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
/*
|
|
1639
|
+
* species_map
|
|
1640
|
+
*/
|
|
1641
|
+
ints.push_back((int) species_map.size());
|
|
1642
|
+
{
|
|
1643
|
+
std::map < int, double >::iterator it;
|
|
1644
|
+
for (it = species_map.begin(); it != species_map.end(); it++)
|
|
1645
|
+
{
|
|
1646
|
+
ints.push_back(it->first);
|
|
1647
|
+
doubles.push_back(it->second);
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
/*
|
|
1651
|
+
* log_gamma_map
|
|
1652
|
+
*/
|
|
1653
|
+
ints.push_back((int) log_gamma_map.size());
|
|
1654
|
+
{
|
|
1655
|
+
std::map < int, double >::iterator it;
|
|
1656
|
+
for (it = log_gamma_map.begin(); it != log_gamma_map.end(); it++)
|
|
1657
|
+
{
|
|
1658
|
+
ints.push_back(it->first);
|
|
1659
|
+
doubles.push_back(it->second);
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
/*
|
|
1663
|
+
* log_molalities_map
|
|
1664
|
+
*/
|
|
1665
|
+
ints.push_back((int)log_molalities_map.size());
|
|
1666
|
+
{
|
|
1667
|
+
std::map < int, double >::iterator it;
|
|
1668
|
+
for (it = log_molalities_map.begin(); it != log_molalities_map.end(); it++)
|
|
1669
|
+
{
|
|
1670
|
+
ints.push_back(it->first);
|
|
1671
|
+
doubles.push_back(it->second);
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
/* ---------------------------------------------------------------------- */
|
|
1677
|
+
void
|
|
1678
|
+
cxxSolution::Deserialize(Dictionary & dictionary, std::vector < int >&ints, std::vector < double >&doubles, int &ii, int &dd)
|
|
1679
|
+
/* ---------------------------------------------------------------------- */
|
|
1680
|
+
{
|
|
1681
|
+
this->n_user = ints[ii++];
|
|
1682
|
+
this->n_user_end = this->n_user;
|
|
1683
|
+
this->description = " ";
|
|
1684
|
+
|
|
1685
|
+
this->new_def = (ints[ii++] != 0);
|
|
1686
|
+
this->patm = doubles[dd++];
|
|
1687
|
+
this->potV = doubles[dd++];
|
|
1688
|
+
this->tc = doubles[dd++];
|
|
1689
|
+
this->ph = doubles[dd++];
|
|
1690
|
+
this->pe = doubles[dd++];
|
|
1691
|
+
this->mu = doubles[dd++];
|
|
1692
|
+
this->ah2o = doubles[dd++];
|
|
1693
|
+
this->total_h = doubles[dd++];
|
|
1694
|
+
this->total_o = doubles[dd++];
|
|
1695
|
+
this->cb = doubles[dd++];
|
|
1696
|
+
this->mass_water = doubles[dd++];
|
|
1697
|
+
this->density = doubles[dd++];
|
|
1698
|
+
this->viscosity = doubles[dd++];
|
|
1699
|
+
this->soln_vol = doubles[dd++];
|
|
1700
|
+
this->total_alkalinity = doubles[dd++];
|
|
1701
|
+
/*
|
|
1702
|
+
* struct conc *totals;
|
|
1703
|
+
*/
|
|
1704
|
+
this->totals.Deserialize(dictionary, ints, doubles, ii, dd);
|
|
1705
|
+
/*
|
|
1706
|
+
* struct master_activity *master_activity;
|
|
1707
|
+
*/
|
|
1708
|
+
this->master_activity.Deserialize(dictionary, ints, doubles, ii, dd);
|
|
1709
|
+
/*
|
|
1710
|
+
* struct master_activity *species_gamma;
|
|
1711
|
+
*/
|
|
1712
|
+
this->species_gamma.Deserialize(dictionary, ints, doubles, ii, dd);
|
|
1713
|
+
/*
|
|
1714
|
+
* isotopes
|
|
1715
|
+
*/
|
|
1716
|
+
{
|
|
1717
|
+
isotopes.clear();
|
|
1718
|
+
int n = ints[ii++];
|
|
1719
|
+
for (int i = 0; i < n; i++)
|
|
1720
|
+
{
|
|
1721
|
+
std::string str = dictionary.GetWords()[ints[ii++]];
|
|
1722
|
+
cxxSolutionIsotope iso;
|
|
1723
|
+
iso.Deserialize(dictionary, ints, doubles, ii, dd);
|
|
1724
|
+
isotopes[str] = iso;
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
/*
|
|
1728
|
+
* species_map
|
|
1729
|
+
*/
|
|
1730
|
+
{
|
|
1731
|
+
species_map.clear();
|
|
1732
|
+
int n = ints[ii++];
|
|
1733
|
+
for (int i = 0; i < n; i++)
|
|
1734
|
+
{
|
|
1735
|
+
species_map[ints[ii++]] = doubles[dd++];
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
/*
|
|
1739
|
+
* log_gamma_map
|
|
1740
|
+
*/
|
|
1741
|
+
{
|
|
1742
|
+
log_gamma_map.clear();
|
|
1743
|
+
int n = ints[ii++];
|
|
1744
|
+
for (int i = 0; i < n; i++)
|
|
1745
|
+
{
|
|
1746
|
+
log_gamma_map[ints[ii++]] = doubles[dd++];
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
/*
|
|
1750
|
+
* log_molalities_map
|
|
1751
|
+
*/
|
|
1752
|
+
{
|
|
1753
|
+
log_molalities_map.clear();
|
|
1754
|
+
int n = ints[ii++];
|
|
1755
|
+
for (int i = 0; i < n; i++)
|
|
1756
|
+
{
|
|
1757
|
+
log_molalities_map[ints[ii++]] = doubles[dd++];
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
|
|
1763
|
+
const std::vector< std::string >::value_type temp_vopts[] = {
|
|
1764
|
+
std::vector< std::string >::value_type("totals"), // 0
|
|
1765
|
+
std::vector< std::string >::value_type("activities"), // 1
|
|
1766
|
+
std::vector< std::string >::value_type("gammas"), // 2
|
|
1767
|
+
std::vector< std::string >::value_type("isotopes"), // 3
|
|
1768
|
+
std::vector< std::string >::value_type("temp"), // 4
|
|
1769
|
+
std::vector< std::string >::value_type("tc_avoid_conflict_with_technetium"), // 5
|
|
1770
|
+
std::vector< std::string >::value_type("temperature"), // 6
|
|
1771
|
+
std::vector< std::string >::value_type("ph"), // 7
|
|
1772
|
+
std::vector< std::string >::value_type("pe"), // 8
|
|
1773
|
+
std::vector< std::string >::value_type("mu"), // 9
|
|
1774
|
+
std::vector< std::string >::value_type("ionic_strength"), // 10
|
|
1775
|
+
std::vector< std::string >::value_type("ah2o"), // 11
|
|
1776
|
+
std::vector< std::string >::value_type("activity_water"), // 12
|
|
1777
|
+
std::vector< std::string >::value_type("total_h"), // 13
|
|
1778
|
+
std::vector< std::string >::value_type("total_o"), // 14
|
|
1779
|
+
std::vector< std::string >::value_type("mass_water"), // 15
|
|
1780
|
+
std::vector< std::string >::value_type("mass_h2o"), // 16
|
|
1781
|
+
std::vector< std::string >::value_type("total_alkalinity"), // 17
|
|
1782
|
+
std::vector< std::string >::value_type("total_alk"), // 18
|
|
1783
|
+
std::vector< std::string >::value_type("cb"), // 19
|
|
1784
|
+
std::vector< std::string >::value_type("charge_balance"), // 20
|
|
1785
|
+
std::vector< std::string >::value_type("density"), // 21
|
|
1786
|
+
std::vector< std::string >::value_type("pressure"), // 22
|
|
1787
|
+
std::vector< std::string >::value_type("soln_vol"), // 23
|
|
1788
|
+
std::vector< std::string >::value_type("species_map"), // 24
|
|
1789
|
+
std::vector< std::string >::value_type("log_gamma_map"), // 25
|
|
1790
|
+
std::vector< std::string >::value_type("potential"), // 26
|
|
1791
|
+
std::vector< std::string >::value_type("log_molalities_map"), // 27
|
|
1792
|
+
std::vector< std::string >::value_type("viscosity"), // 28
|
|
1793
|
+
std::vector< std::string >::value_type("viscos_0") // 29
|
|
1794
|
+
};
|
|
1795
|
+
const std::vector< std::string > cxxSolution::vopts(temp_vopts, temp_vopts + sizeof temp_vopts / sizeof temp_vopts[0]);
|