39 Commits

Author SHA1 Message Date
Scott R Charlton
a4d8672a6b made get_line and get_logical_line virtual
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@6515 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-04-20 03:55:39 +00:00
Scott R Charlton
a512faafbe setup for ERROR_OSTREAM
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@6364 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-04-05 03:38:52 +00:00
Scott R Charlton
8e9a4e0c3e made istream_getc static;
made some routines virtual;
added virtual getc method;

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@6355 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-04-04 04:53:03 +00:00
David L Parkhurst
91f650a5e9 Merged ErrorHandling 6119-6268 changes.
All reactant structs have been removed.
Tony's pressure uses mu in pressure term of log_k.
Test cases run, discriminant check at 1e-8.

Still want to optimize out some k_temp calls and checks for same T, P, mu.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@6269 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-03-06 23:42:49 +00:00
Scott R Charlton
20b360fec9 modified for warnings in 2010
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@6147 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-01-27 05:33:26 +00:00
Scott R Charlton
89153db839 turn off warnings for dll linkage for std::list
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@6010 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-01-10 05:19:21 +00:00
Scott R Charlton
d0c049ed5d windows log functions passed
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5988 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-01-05 22:02:04 +00:00
David L Parkhurst
acf62c7881 gas_phase and irrev removed.
get_line moved to PHRQ_io.

Still debugging some.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5967 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-01-04 16:07:40 +00:00
Scott R Charlton
a4c8e993d3 moved istreams from Phreeqc class to PHRQ_io class
changed modes std::ifstream:: to std::ios_base::
deleted some #ifdef SKIP


git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5872 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-12-08 06:16:03 +00:00
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
b260023bbf replaced dump_file with dump_ostream
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5867 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-12-06 07:30:12 +00:00
Scott R Charlton
1f7e4e16e9 added IPQ_DLL_EXPORT for IPhreeqc dll versions
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5865 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-12-06 06:00:34 +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
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
d2c28c17a4 safe_close now takes pointer to file pointer
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5729 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-11-02 23:54:22 +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
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
fbaa4906ff Done with OUTPUT_WARNING
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5702 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-19 20:20:29 +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
e2e3ba09b7 Renamed methods and added _msg to output (_temp for now), punch, error, log, dump.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5699 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-19 16:10:45 +00:00
David L Parkhurst
ab42554893 Beginning to remove enum OUTPUT_MESSAGE, OUTPUT_ERROR, etc.
Wrote individual methods for each file to open, close, rewind, flush, isopen.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5698 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-19 15:37:39 +00:00
David L Parkhurst
ecd1d9c620 Working on interface for run_reactions.
Added a PHRQ_io to RM_interface class for now.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5697 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-18 21:13:40 +00:00
David L Parkhurst
534005377e Cleaned up kinetics.cpp.
Changed io in Parser.cxx a little.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5696 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-18 19:27:52 +00:00
David L Parkhurst
1fb2150c82 Removed OUTPUT_CVODE, OUTPUT_STDERR, OUTPUT_BASIC, and commented OUTPUT_SEND_MESSAGE.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5695 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-18 19:00:15 +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
e89dd5938c Removed SKIP code in PHRQ_io and Parser.
removes old handler code from PHRQ_io.cpp
remove error_msg, warning_msg from Parser. 

Removed commented lines.

rewrote a couple places in parser that used cerr instead of error_msg.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5666 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-30 19:28:20 +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
4d3231479e Changed longjmp to throw for PHREEQC_CLASS
added some safe_close for PHRQ_io.cpp

added isopen_handler

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5663 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-29 23:22:18 +00:00
David L Parkhurst
9201846ce1 Added isopen_handler
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5662 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-29 20:32:05 +00:00
David L Parkhurst
b7729cf254 Changed all check of input_error to get_input_errors for phreeqc.
Started removing PHREEQC_PTR and P_INSTANCE. Redid all read_raw.

Breaks some echoing or printing of output. Need to check why.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5646 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-23 22:33:19 +00:00
David L Parkhurst
11da9fec8f Worked on output. Added output_string to PHRQ_io.
Rewrote output_msg in PHRQ_io_output.cpp to move phreeqc processing out of PHRQ_io.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5639 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-20 22:38:29 +00:00
David L Parkhurst
aba479648c Added file_on variables to PHRQ_io.
Set dump, log, and punch file_on variables whereever
pr.dump, pr.log, and pr.punch were set in PHREEQC.

Added base class to Solution, ISolution, and StorageBin. Required a PHRQ_io in the constructor to find all places they were constructed.

Need to do the same to all other classes (Exchange, Surface, NameDouble, etc.)

Then need to take PHREEQC instance out of parser and fix all places a parser is constructed.

Need to move phreeqc2class constructors to phreeqc.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5628 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-09 22:05:32 +00:00
David L Parkhurst
02797e6934 Added PHRQ_base and PHRQ_io to project.
PHRQ_base has not been added to the C++ classes yet.

PHRQ_io is implemented enough to run. Need to work on 
reimplementing logic by moving some things that were in
phreeqc_files.cpp (now implemented as PHRQ_io class) to PHRQ_io_output, which is derived from output.cpp.

PHRQ_io_output has methods of Phreeqc class and knows the data in the phreeqc class. PHRQ_io does not know about the phreeqc class.

The ifdef USE_OLD_IO should cause io to revert to the old way of doing it. 

I have only worked on ClrClass_debug to now.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5627 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-08 23:07:14 +00:00