83 Commits

Author SHA1 Message Date
David L Parkhurst
b0b007ca92 const static vopts
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@6793 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-07-17 17:12:50 +00:00
David L Parkhurst
a826fa57fd Added Update method, removed unused prototypes.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@6790 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-07-16 22:20:03 +00:00
David L Parkhurst
f069c8e57d renamed c files.
updated project.

moved PHAST_IPhreeqc to IPhreeqcPhast

removed const from StorageBin getters.

Fixed some compile errors.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@6776 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-07-12 22:10:02 +00:00
David L Parkhurst
0ca9654356 Reversed logic to NO_STATIC_VOPTS, default is now static vopts. No changes to Makefile or project needed now.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@6771 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-07-11 16:39:13 +00:00
David L Parkhurst
8823f0ff2f Added STATIC_VOPTS to make vopts static, not static unless defined.
Guy had problems with static variables with OpenMP.

Also removed other static variables fpunchf_user s_warning and buffer, spread length, utilities spinner. Put in Phreeqc.h.

Removed static fnbuf from Pbasic.cpp, put in Pbasic.h.

I think only static variables are in Keywords.h and are necessary for initialization.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@6770 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-07-11 16:23:02 +00:00
David L Parkhurst
fc2d4425fb Added SOLUTION_MIX m-n keyword that mixes solutions without doing a full reaction calculation.
Results of mix are stored as SOLUTION m-n.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@6665 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-06-13 23:15:49 +00:00
David L Parkhurst
3d2e4ae4be Removed Phreeqc_class.h.
Replaced all PHREEQC_PTR, P_INSTANCE, p_instance1.

Now uses Phreeqc * phreeqc_ptr for Phreeqc cookies.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@6509 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-04-19 18:35:14 +00:00
Scott R Charlton
fd26a7edb1 fixed memory leak caused by duplicate numbered solutions (see ex12 -- solution 0) (previous fix was just a band-aid)
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@6271 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-03-07 05:43:33 +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
David L Parkhurst
7683982877 changed all double to LDBLE
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@6038 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-01-11 21:13:51 +00:00
David L Parkhurst
4f0fb6c928 Finished ss_assemblage rename.
Added Use class

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@6020 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-01-10 20:11:15 +00:00
David L Parkhurst
f085546091 Renaming SSassemblageSS
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@6018 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-01-10 19:10:05 +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
David L Parkhurst
95aa3278de Removed phrqproto.h from project and svn deleted.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5718 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-20 23:53:44 +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
7e26eec197 Last checkin svn deleted obsolete files output.h, output.cpp, phreeqc_files, main.cpp.
removed all PHREEQC_CLASS ifdefs

Need to remove old_io ifdefs

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5712 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-20 21:14:33 +00:00
David L Parkhurst
601d8515b8 Removed PHREEQC_CPP and some PHREEQC_CLASS.
Will continue to remove PHREEQC_CLASS.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5711 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-20 20:06:32 +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
03dcbf8eee Added Simplify_totals method and
Update method to aid in PHAST implementation.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5687 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-13 22:37:06 +00:00
David L Parkhurst
7ccdb1613b removed dead code, mostly P_INSTANCE and PHREEQC_PTR
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5681 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-05 19:32:29 +00:00
David L Parkhurst
58c0e3f7c8 Added optional argument to dump_raw to a different user number.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5680 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-05 17:20:16 +00:00
David L Parkhurst
fe9f31443e Replaced modify_activities so that PHREEQC instance is not needed.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5677 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-10-04 21:32:25 +00:00
David L Parkhurst
9fe532eaaf Cleaned up Get_ and Set_ except for parser.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5661 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-29 18:51:39 +00:00
David L Parkhurst
4d728afcbe Removed MOVE_TO_STRUCTURES ifdefs.
Removed most SKIP ifdefs

ran test cases OK.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5657 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-28 20:25:20 +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
David L Parkhurst
12d62e8e54 Removed P_INSTANCE for error_msg, which removed entirely from
some methods.

Began moving xx2struct into phreeqc from class definitions.

First moved was cxxMix2mix to structures.c.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5648 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-26 20:24:17 +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
7eeeab4569 all classes inherit from PHRQ_base, except
NameDouble, StorageBinListItem.

NumKeyword inherits from PHRQ_base, others inherit NumKeyword.

ChartHandler and ChartObject inherit from PHRQ_base.

CurveObject does not inherit from PHRQ_base.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5637 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-09-20 20:05:43 +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
a36a7924cd Worked on bug with DUMP and read_raw of isotopes.
Also checked that dump/read/dump gave equivalent files for isotopes. 

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@5453 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-06-23 22:35:43 +00:00
David L Parkhurst
16c2689a8a Fixed adjustments of activities after solution_modify. Better treatment of redox states; bug in get_total_element.
Rewrote error.inp printout.

Rewrote cxxStorageBin constructor from use structure. 

Added reaction, temperature, and mix to StorageBin dump_raw.


git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@5281 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-03-31 17:15:59 +00:00
David L Parkhurst
1e8147c06e Added note on automatic modification of activities
after SOLUTION_MODIFY.

Updating modifyact files for Linux.

Unused variable in Solution.cxx.




git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@5272 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-03-30 20:11:50 +00:00
David L Parkhurst
e746bb8e07 Added code to adjust activities of master species in solution when totals are adjusted by SOLUTION_MODIFY.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@5270 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2011-03-30 19:21:36 +00:00
David L Parkhurst
4b31197710 Redid modifications for hidden variables using l_ prefix.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@4674 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2010-07-21 00:18:01 +00:00
David L Parkhurst
579a283747 Fixing hidden variables in
M    src/cxxKinetics.cxx
M    src/NameDouble.cxx
M    src/Exchange.cxx
M    src/ISolution.cxx
M    src/ISolutionComp.cxx
M    src/ISolutionComp.h
M    src/SSassemblage.cxx
M    src/Solution.cxx
M    src/GasPhase.cxx
M    src/PPassemblage.cxx
M    src/ISolution.h



git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@4654 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2010-07-16 20:45:26 +00:00
David L Parkhurst
694c07488e Bugs with kinetics in PHAST.
The formula was not correct when converted to a phreeqcpp class, only the last instance of an element was kept and the rest were lost. Modified NameDouble to accumulate the sum of coefficients for each element when converting from a PHREEQC structure.

The order of the kinetics components was not maintained when converted to a phreeqcpp class. Components were in alphabetical order. This posed a problem with get and put statements because the gets could end up before the puts. Changed from map of components to list of components, which should maintain the order correctly.

Problems with modify solution and redox elements. Laurin pointed out that adding N may leave all the N(x) in place, which increases the total N. Revised read_solution to merge the valence states. If N defined, then all N(x) are removed. If N() defined, then N is removed. Still need to test.


git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@3927 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2010-01-14 16:26:14 +00:00
David L Parkhurst
d850641336 mpi.h needs to be defined first because of a conflict with stdio (SEEK_SET ifdef).
output.h is needed for NameDouble mpi version.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@3886 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2009-12-09 17:35:19 +00:00
David L Parkhurst
3131740cfb Compiles as class, debug, and Release.
Requires recompilation of the entire solution for some reason.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@3878 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2009-12-08 22:12:42 +00:00
David L Parkhurst
9f4eefd214 Made all the changes to add phreeqc pointer as argument to
Phreeqcpp class methods.

Still compiles on Debug and Release, but problem with
phrq_malloc in cvdense and cvode.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@3876 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2009-12-08 18:09:39 +00:00
David L Parkhurst
157e5cc729 Slowly adding arguments and qualifiers to pass phreeqc class instance to routines that need it.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@3873 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2009-12-08 00:56:50 +00:00
David L Parkhurst
2b76f04a8b Cleaned up header files to remove unnecessary includes of .h files. Moved includes to source code where possible.
Moved some methods for .h to source files to avoid need for includes.

Debug and Release compile. 

Still need to get class version working. 

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@3868 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2009-12-07 19:49:38 +00:00
Scott R Charlton
07d5fa7413 merged 3750-3846 of plusify; system.cxx and system.h need to be formated
removed char * and used std::string's and std::map's

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@3847 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2009-12-03 01:49:56 +00:00
David L Parkhurst
f015759286 exchange_modify is working.
changed list of comps to map of comps.

made sure that description changes were captured for solution, equilibrium_phases, and exchange.

surface is next.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@3725 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2009-10-27 22:57:49 +00:00
David L Parkhurst
cbfb768381 Initial testing of SOLUTION_MODIFY and EQUILIBRIUM_PHASES_MODIFY.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@3721 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2009-10-27 16:38:25 +00:00
David L Parkhurst
6ca3a6d3b2 Added the suite of modify keywords:
SOLUTION_MODIFY
	EQUILIBRIUM_PHASES_MODIFY
	EXCHANGE_MODIFY
	SURFACE_MODIFY
	SOLID_SOLUTIONS_MODIFY
	GAS_PHASE_MODIFY
	KINETICS_MODIFY

May now revisit dump to add a delete capability.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@3714 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2009-10-21 19:40:43 +00:00
David L Parkhurst
ccd310298d SOLUTION_RAW: c++ version used in PHAST misinterpreted the
element Tc as the temperature identifier and crashed
	when additional elements followed in -totals or 
	-activity_coefficients.
	
	Removed "tc" as an identifier for temperature.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@3613 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2009-08-12 16:55:42 +00:00
David L Parkhurst
cefe071f17 Reindented, fixed errors, ran test cases.
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@3176 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2008-10-31 19:09:45 +00:00
David L Parkhurst
3313c814a9 Ran indent program on phreeqcpp
indent -bli0 -i4 -ts4 -npcs -nbc *.cxx




git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@3168 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2008-10-31 15:19:39 +00:00
David L Parkhurst
5764f894ad Simplified get_total_element a bit
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@2378 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2007-11-08 00:08:45 +00:00