245 Commits

Author SHA1 Message Date
David L Parkhurst
8cbaba8ea4 Converted output to streams.
Input streams are still in Phreeqc, not in PHRQ_io.

Process_file_names and open_input_stream and open_output_stream are in PHRQ_io_output.cpp, maybe should be in PHRQ_io.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5869 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-12-06 23:28:12 +00:00
Scott R Charlton
6fb5faa23b added PHRQ_io member
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5864 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-12-06 02:48:53 +00:00
David L Parkhurst
e803c8dbc1 Fixed but in TRIM.
Added routine to switch back to input stream after a parser.

PHRQ_io_output error msg still needs a \n to make the screen paint correctly.
See if change works for Scott.

Need to move last line from parser to line.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5855 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-12-02 23:45:11 +00:00
David L Parkhurst
0a98983f48 Think reaction_pressure is done.
worked on dumper and copy.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5846 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-12-02 00:07:18 +00:00
David L Parkhurst
99b8eac54d Have read_reaction_pressure and read_reaction_pressure_raw working.
Dump reaction_pressure raw also works.

Started using templates in Utils.h for map manipulations.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5842 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-12-01 20:03:56 +00:00
Scott R Charlton
0f6547cc32 IPhreeqc passes all unit tests on VS2005
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5841 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-12-01 06:33:54 +00:00
David L Parkhurst
ae868f0a20 Got reader for reaction_pressure working.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5840 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-12-01 01:00:37 +00:00
David L Parkhurst
2c80bb5ff1 Needed header file on Linux?
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5837 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-30 20:29:25 +00:00
David L Parkhurst
17a4c8442d Moved keywords to separate class
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5835 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-30 18:30:51 +00:00
David L Parkhurst
584b79bd5d roughed in cxxPressure class. A lot more to do.
Added screen_msg and echo_msg to PHRQ_base.

Added screen_msg and echo_msg to PHRQ_io

Added enum to direct echo to log or output.

Switched back to 3 digit exponent in mainsubs.cpp.


git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5833 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-30 16:50:52 +00:00
David L Parkhurst
041db99144 Removed keyword hash.
Added enum for unique keywords, static map of phreeqc keywords, map of keyword names.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5832 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-29 23:05:26 +00:00
David L Parkhurst
02119ae8db Fixed but for David Kinniburg.
Trim example overflowed allowed space (256?). Modified factor to use
std::strings to avoid overwrite.

Made string pad const char argument.

Assert in check_line was incorrect for EOF.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5826 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-28 19:52:27 +00:00
David L Parkhurst
03bc3d3848 Going to try checking cl1 results for inverse modeling.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5818 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-23 20:58:42 +00:00
Scott R Charlton
c552aab892 updated reading for istream cookies removed PFN_READ_CALLBACK
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5808 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-23 00:18:43 +00:00
David L Parkhurst
14ef22ef15 reordered calls to calc_PR in prep.c.
eliminated call in tidy.c. and step.c.

eliminated call to k_temp in step.c.



git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5807 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-22 23:19:52 +00:00
David L Parkhurst
aa77b78d40 Tony's changes to gases.
Merges Crapsi changes with his changes.

Some new test cases.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5797 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-21 19:06:24 +00:00
David L Parkhurst
97caf60b9a Indented Phreeqc.h, read_delta_v_only
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5773 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-14 23:07:59 +00:00
David L Parkhurst
9c73b964c5 Needed to merge two read_delta_v_only
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5771 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-14 22:47:54 +00:00
David L Parkhurst
4c938e63e7 Crapsi changes
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5770 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-14 22:25:58 +00:00
David L Parkhurst
122f2b8772 Cleaned up PBasic some.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5757 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-09 20:08:32 +00:00
David L Parkhurst
ff2d48f1ad Going with new PBasic.
Removing basic.h, basic_class.h, basic.cpp, p2c.h, and p2clib.cpp.

renamed to basic_interpreter.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5755 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-09 15:50:24 +00:00
David L Parkhurst
5930d762bc Changes to set_pz and set_sit. Avoids setting lg = 0 for the first attempt in set_and_run_wrapper, but then sets = 0 for additional attempts.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5752 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-09 00:19:29 +00:00
David L Parkhurst
516bd2ea1f Added PBasic with #ifdef PBASIC.
Fixed one or two bugs with PR, copying or saving. (v_m in xgas_save.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5739 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-07 20:09:14 +00:00
David L Parkhurst
7f18c67b25 fixed bug in phqalloc.cpp.
Comment in Phreeqc.h for prep.c

s_init initializes all variables.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5733 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-03 21:01:02 +00:00
David L Parkhurst
f8887170b9 Implemented Tony's Peng-Robinson changes. Need to run his test cases.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5731 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-03 18:02:02 +00:00
David L Parkhurst
2efc1ee2c1 Rearranged header files.
Put almost everything into Phreeqc.h.

SVN deleted global.h, input.h, pitzer.h, and pitzer_structures.h.

Added basic_class.h in preparation for making Basic into a class.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5724 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-25 18:40:30 +00:00
David L Parkhurst
21da7bae55 Renamed output_temp_ to output_.
Guarded use of *phrq_io for NULL.

Changed PHRQ_io error_msg to write only to error file.

PHRQ_base error message writes to output, log, and error.

PHRQ_io_output writes to output, log, and error.

Just 4 configurations

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5721 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-23 14:07:05 +00:00
David L Parkhurst
980e680241 removed setjmp except in Basic.
Starting to cleanup header files.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5719 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-21 18:24:24 +00:00
David L Parkhurst
be8d41f2a9 removed MERGE_INCLUDE_FILES
some static and extern
unused static maps

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5717 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-20 23:50:11 +00:00
David L Parkhurst
de377b6642 CLASS_STATIC replaced with static
STATIC replaced with empty

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5716 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-20 22:26:47 +00:00
David L Parkhurst
9eb1ba4eec Removed EXTERNAL, PITZER_EXTERNAL, and kinetics.h.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5715 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-20 22:18:25 +00:00
David L Parkhurst
e0cbcff713 CLASS_QUALIFIER is gone, svnid gone
removed dead code from PHRQ_io.cpp


git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5714 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-20 21:57:51 +00:00
David L Parkhurst
05495494ec Removed output.h throughout.
Will svn delete output.h, output.cpp, phreeqc_files.cpp, main.cpp.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5710 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-20 19:26:08 +00:00
David L Parkhurst
53a00d4a98 Finished fpunchf.
Old output_msg is commented.

Seems to work.

Ran all test cases.

Time to clean up and make class-only versions.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5709 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-20 19:02:39 +00:00
David L Parkhurst
6c2f0b5bf2 Did OUTPUT_PUNCH.
The switch between user_punch and inverse modeling punch may not work exactly right.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5708 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-20 18:14:27 +00:00
David L Parkhurst
d57af05353 OUTPUT_MESSAGE removed, need to check a bit.
sformatf now returns char *. Should be more efficient.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5706 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-20 13:41:03 +00:00
David L Parkhurst
92d8a3b98a OUTPUT_CHECKLINE and OUTPUT_ECHO done.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5704 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-19 22:13:03 +00:00
David L Parkhurst
efe04692ff OUTPUT_SCREEN and OUTPUT_LOG are done.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5703 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-19 21:48:09 +00:00
David L Parkhurst
3630733e09 Will not compile non-class versions!
Removed OUTPUT_ERROR.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5701 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-19 19:32:47 +00:00
David L Parkhurst
c0cc6d8bbf Removed OUTPUT_DUMP.
Ran test cases.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5700 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-19 18:56:48 +00:00
David L Parkhurst
cbc2c21020 Added ptr_to_user for mix, irrev, and temperature.
Removed cxxStorageBin2phreeqc0. Now writes reactants n from storage bin to phreeqc without restrictions with extra arg to cxxStorageBin2phreeqc.

cxxStorageBin2phreeqc with just a storagebin copies all reactants into phreeqc. 



git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5691 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-15 18:45:36 +00:00
David L Parkhurst
ee9dcce40b writing cxxStorageBin2phreeqc.
clean up some consts.

Adding methods for Mix, Reaction, Temperature.

Need parallel method for exchange_ptr_to_user for mix, irrev, temperature.


git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5689 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-15 00:40:56 +00:00
David L Parkhurst
6e4445faf5 Working on reaction module and RM_interface.
Changed most declarations to protected: from private:

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5688 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-14 15:44:52 +00:00
David L Parkhurst
5b39b2f7cd NumKeyword reads negative user numbers.
Allow copy to negative numbers.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5672 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-03 22:15:15 +00:00
David L Parkhurst
6fa41ac02e Rewrote PHRQ_io. Removed handlers.
Now 1-1 correspondence between phreeqc output methods and PHRQ_io output methods.

Removed error_msg and output_msg from Parser.

Moved prototype for fpnunchf, _user, _end_row, to output.h.

Scott needs to finalize as interface.

Next will remove dead code from PHRQ_io, PHRQ_io_output.cpp, and Parse.cxx.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5665 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-30 18:36:28 +00:00
David L Parkhurst
bf84746d3e Converted last StorageBin to remove P_INSTANCE.
Not sure about the cxx to system. Commented for now.


git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5660 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-29 17:44:10 +00:00
David L Parkhurst
b18bda26b4 Working on StorageBin. Moved 3 routines to structures to eliminate P_INSTANCEs.
Runs mytest OK.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5659 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-29 17:03:44 +00:00
David L Parkhurst
9efcd6ecb8 Finished all but loose ends with P_INSTANCEs.
Did Surface, charge and comp.

Now can clean up some more.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5656 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-28 17:05:01 +00:00
David L Parkhurst
9561576af7 Finished SSassemblage.cxx
Cleaned up other files some.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5655 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-27 23:36:52 +00:00
David L Parkhurst
62a55134be Worked through solution removing PHREEQC_PTR_ARG.
More cleaning up to do.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5653 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-27 21:18:38 +00:00