Ifdef'd ORCHESTRA.

Added lines at end of files.

Ran test cases, a few had changes from format and Tony.





git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@2182 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2007-08-16 19:49:38 +00:00
parent 7ab1e21ce7
commit 37b1add946
11 changed files with 210 additions and 319 deletions

View File

@ -16,7 +16,9 @@
#include <cassert> // assert
#include <algorithm> // std::sort
#include <sstream>
#ifdef ORCHESTRA
extern void ORCH_write_chemistry_species(std::ostream &chemistry_dat);
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
@ -420,6 +422,7 @@ void cxxISolution::dump_xml(std::ostream& os, unsigned int indent)const
}
#endif
#ifdef ORCHESTRA
void cxxISolution::ORCH_write_chemistry(std::ostream &chemistry_dat)
{
this->ORCH_write_chemistry_water(chemistry_dat);
@ -924,3 +927,4 @@ void cxxISolution::ORCH_write(std::ostream &chemistry_dat, std::ostream &input_d
//std::cerr << chemistry_dat.str() << input_dat.str() << output_dat.str();
}
#endif

View File

@ -41,10 +41,19 @@ public:
//void dump_xml(std::ostream& os, unsigned int indent = 0)const;
void ConvertUnits();
#ifdef ORCHESTRA
void ORCH_write(std::ostream &chemistry_dat, std::ostream &input_dat, std::ostream &output_dat);
void ORCH_write_chemistry(std::ostream &chemistry_dat);
void ORCH_write_input(std::ostream &input_dat);
void ORCH_write_output_vars(std::ostream &input_dat);
private:
void ORCH_write_chemistry_water(std::ostream &chemistry_dat);
void ORCH_write_chemistry_primary(std::ostream &chemistry_dat);
void ORCH_write_chemistry_total_O_H(std::ostream &chemistry_dat);
void ORCH_write_chemistry_alkalinity(std::ostream &chemistry_dat);
void ORCH_write_chemistry_minerals(std::ostream &chemistry_dat);
#endif
protected:
friend class cxxISolutionComp; // for this->pe access
@ -57,12 +66,6 @@ protected:
public:
//static std::map<int, cxxISolution>& map;
private:
void ORCH_write_chemistry_water(std::ostream &chemistry_dat);
void ORCH_write_chemistry_primary(std::ostream &chemistry_dat);
void ORCH_write_chemistry_total_O_H(std::ostream &chemistry_dat);
void ORCH_write_chemistry_alkalinity(std::ostream &chemistry_dat);
void ORCH_write_chemistry_minerals(std::ostream &chemistry_dat);
};
#endif // !defined(ISOLUTION_H_INCLUDED)

230
Makefile
View File

@ -163,6 +163,7 @@ COMMON_CXXOBJS = \
Surface.o \
SurfaceCharge.o \
SurfaceComp.o \
System.o \
Temperature.o \
Utils.o
@ -181,178 +182,127 @@ ${PROGRAM} : ${OBJECT_FILES}
# CXX files
#
cxxKinetics.o: ../cxxKinetics.cxx ../Utils.h ../char_star.h \
../cxxKinetics.h ../NumKeyword.h ../Parser.h ../char_star.h \
../phreeqc/global.h ../phreeqc/phrqtype.h ../char_star.h \
../KineticsComp.h ../NameDouble.h ../char_star.h ../Parser.h \
../char_star.h ../KineticsComp.h ../phreeqc/phqalloc.h \
../phreeqc/phrqproto.h
../cxxKinetics.h ../NumKeyword.h ../Parser.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../KineticsComp.h ../NameDouble.h ../cxxMix.h \
../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
cxxMix.o: ../cxxMix.cxx ../Utils.h ../char_star.h ../cxxMix.h \
../NumKeyword.h ../Parser.h ../char_star.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../char_star.h ../phreeqc/phqalloc.h \
../phreeqc/phrqproto.h
../NumKeyword.h ../Parser.h ../phreeqc/global.h ../phreeqc/phrqtype.h \
../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
Dictionary.o: ../Dictionary.cxx ../Dictionary.h ../Solution.h \
../NumKeyword.h ../Parser.h ../char_star.h ../SolutionIsotopeList.h \
../SolutionIsotope.h ../Parser.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../char_star.h ../Parser.h ../NameDouble.h \
../char_star.h ../Parser.h ../cxxMix.h ../NumKeyword.h ../char_star.h \
../char_star.h ../NameDouble.h ../phreeqc/phqalloc.h \
../phreeqc/phrqproto.h ../phreeqc/output.h
EntityMap.o: ../EntityMap.cxx ../Utils.h ../char_star.h ../EntityMap.h \
../phreeqc/global.h ../phreeqc/phrqtype.h ../char_star.h ../Parser.h \
../char_star.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
../SolutionIsotope.h ../NameDouble.h ../cxxMix.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h \
../phreeqc/output.h
Exchange.o: ../Exchange.cxx ../Utils.h ../char_star.h ../Exchange.h \
../NumKeyword.h ../Parser.h ../char_star.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../char_star.h ../ExchComp.h ../NameDouble.h \
../char_star.h ../Parser.h ../char_star.h ../ExchComp.h \
../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
../phreeqc/global.h ../phreeqc/phrqtype.h ../ExchComp.h ../NameDouble.h \
../Parser.h ../cxxMix.h ../NumKeyword.h ../phreeqc/phqalloc.h \
../phreeqc/phrqproto.h ../phreeqc/output.h
ExchComp.o: ../ExchComp.cxx ../Utils.h ../char_star.h ../ExchComp.h \
../NameDouble.h ../phreeqc/global.h ../phreeqc/phrqtype.h \
../char_star.h ../Parser.h ../char_star.h ../char_star.h \
../NameDouble.h ../Parser.h ../phreeqc/global.h ../phreeqc/phrqtype.h \
../phreeqc/phqalloc.h ../phreeqc/phrqproto.h ../phreeqc/output.h
GasPhase.o: ../GasPhase.cxx ../Utils.h ../char_star.h ../GasPhase.h \
../NumKeyword.h ../Parser.h ../char_star.h ../NameDouble.h \
../phreeqc/global.h ../phreeqc/phrqtype.h ../char_star.h ../Parser.h \
../char_star.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
../NumKeyword.h ../Parser.h ../NameDouble.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../cxxMix.h ../phreeqc/phqalloc.h \
../phreeqc/phrqproto.h ../phreeqc/output.h
ISolutionComp.o: ../ISolutionComp.cxx ../ISolutionComp.h ../Utils.h \
../char_star.h ../char_star.h ../ISolution.h ../ISolutionComp.h \
../NumKeyword.h ../Parser.h ../char_star.h ../Solution.h \
../NumKeyword.h ../SolutionIsotopeList.h ../SolutionIsotope.h \
../Parser.h ../phreeqc/global.h ../phreeqc/phrqtype.h ../char_star.h \
../Parser.h ../NameDouble.h ../char_star.h ../Parser.h ../cxxMix.h \
../NumKeyword.h ../char_star.h ../char_star.h ../Utils.h \
../phreeqc/phrqproto.h ../phreeqc/phqalloc.h
../char_star.h ../phreeqc/global.h ../phreeqc/phrqtype.h \
../phreeqc/phqalloc.h ../phreeqc/phrqproto.h ../ISolution.h \
../NumKeyword.h ../Parser.h ../Solution.h ../SolutionIsotopeList.h \
../SolutionIsotope.h ../NameDouble.h ../cxxMix.h ../phreeqc/output.h
ISolution.o: ../ISolution.cxx ../ISolution.h ../ISolutionComp.h \
../Utils.h ../char_star.h ../char_star.h ../NumKeyword.h ../Parser.h \
../char_star.h ../Solution.h ../NumKeyword.h ../SolutionIsotopeList.h \
../SolutionIsotope.h ../Parser.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../char_star.h ../Parser.h ../NameDouble.h \
../char_star.h ../Parser.h ../cxxMix.h ../NumKeyword.h ../char_star.h \
../char_star.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
../Utils.h ../char_star.h ../phreeqc/global.h ../phreeqc/phrqtype.h \
../phreeqc/phqalloc.h ../phreeqc/phrqproto.h ../NumKeyword.h \
../Parser.h ../Solution.h ../SolutionIsotopeList.h ../SolutionIsotope.h \
../NameDouble.h ../cxxMix.h ../phreeqc/output.h
KineticsComp.o: ../KineticsComp.cxx ../Utils.h ../char_star.h \
../KineticsComp.h ../NameDouble.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../char_star.h ../Parser.h ../char_star.h \
../char_star.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
../KineticsComp.h ../NameDouble.h ../Parser.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
NameDouble.o: ../NameDouble.cxx ../Utils.h ../char_star.h ../NameDouble.h \
../phreeqc/global.h ../phreeqc/phrqtype.h ../char_star.h ../Parser.h \
../char_star.h ../phreeqc/output.h ../phreeqc/phqalloc.h \
../phreeqc/phrqproto.h
../Parser.h ../phreeqc/global.h ../phreeqc/phrqtype.h \
../phreeqc/output.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
NumKeyword.o: ../NumKeyword.cxx ../NumKeyword.h ../Parser.h \
../char_star.h
Parser.o: ../Parser.cxx ../Parser.h ../char_star.h ../Utils.h \
../char_star.h ../char_star.h
../phreeqc/output.h
PPassemblageComp.o: ../PPassemblageComp.cxx ../Utils.h ../char_star.h \
../PPassemblageComp.h ../NameDouble.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../char_star.h ../Parser.h ../char_star.h \
../char_star.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
../PPassemblageComp.h ../NameDouble.h ../Parser.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h \
../phreeqc/output.h
PPassemblage.o: ../PPassemblage.cxx ../Utils.h ../char_star.h \
../PPassemblage.h ../NumKeyword.h ../Parser.h ../char_star.h \
../phreeqc/global.h ../phreeqc/phrqtype.h ../char_star.h \
../PPassemblageComp.h ../NameDouble.h ../char_star.h ../Parser.h \
../char_star.h ../PPassemblageComp.h ../phreeqc/phqalloc.h \
../phreeqc/phrqproto.h
../PPassemblage.h ../NumKeyword.h ../Parser.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../PPassemblageComp.h ../NameDouble.h ../cxxMix.h \
../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
Reaction.o: ../Reaction.cxx ../Utils.h ../char_star.h ../Reaction.h \
../NumKeyword.h ../Parser.h ../char_star.h ../NameDouble.h \
../phreeqc/global.h ../phreeqc/phrqtype.h ../char_star.h ../Parser.h \
../char_star.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
../NumKeyword.h ../Parser.h ../NameDouble.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
ReadClass.o: ../ReadClass.cxx ../Parser.h ../char_star.h ../Solution.h \
../NumKeyword.h ../Parser.h ../SolutionIsotopeList.h \
../SolutionIsotope.h ../Parser.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../char_star.h ../Parser.h ../NameDouble.h \
../char_star.h ../Parser.h ../cxxMix.h ../NumKeyword.h ../char_star.h \
../char_star.h ../Exchange.h ../NumKeyword.h ../char_star.h \
../ExchComp.h ../NameDouble.h ../char_star.h ../Surface.h \
../NumKeyword.h ../char_star.h ../SurfaceComp.h ../NameDouble.h \
../char_star.h ../SurfaceCharge.h ../NameDouble.h ../char_star.h \
../PPassemblage.h ../NumKeyword.h ../char_star.h ../PPassemblageComp.h \
../NameDouble.h ../char_star.h ../cxxKinetics.h ../NumKeyword.h \
../char_star.h ../KineticsComp.h ../NameDouble.h ../char_star.h \
../SSassemblage.h ../NumKeyword.h ../char_star.h ../SSassemblageSS.h \
../NameDouble.h ../char_star.h ../GasPhase.h ../NumKeyword.h \
../NameDouble.h ../char_star.h ../Reaction.h ../NumKeyword.h \
../NameDouble.h ../char_star.h ../cxxMix.h ../Temperature.h \
../NumKeyword.h ../char_star.h ../phreeqc/phqalloc.h \
../phreeqc/output.h ../phreeqc/phrqproto.h
../NumKeyword.h ../SolutionIsotopeList.h ../SolutionIsotope.h \
../NameDouble.h ../cxxMix.h ../Exchange.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../ExchComp.h ../Surface.h ../SurfaceComp.h \
../phreeqc/phrqproto.h ../SurfaceCharge.h ../PPassemblage.h \
../PPassemblageComp.h ../cxxKinetics.h ../KineticsComp.h \
../SSassemblage.h ../SSassemblageSS.h ../GasPhase.h ../Reaction.h \
../Temperature.h ../phreeqc/phqalloc.h ../phreeqc/output.h
SAXPhreeqc.o: ../SAXPhreeqc.cxx ../SAXPhreeqc.h ../SaxPhreeqcHandlers.h \
../phreeqc/global.h ../phreeqc/phrqtype.h ../phreeqc/phrqproto.h \
../phreeqc/phqalloc.h ../phreeqc/output.h
Solution.o: ../Solution.cxx ../Utils.h ../char_star.h ../Solution.h \
../NumKeyword.h ../Parser.h ../char_star.h ../SolutionIsotopeList.h \
../SolutionIsotope.h ../Parser.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../char_star.h ../Parser.h ../NameDouble.h \
../char_star.h ../Parser.h ../cxxMix.h ../NumKeyword.h ../char_star.h \
../char_star.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h \
../phreeqc/output.h ../ISolution.h ../ISolutionComp.h ../Utils.h \
../char_star.h ../NumKeyword.h ../Solution.h ../Exchange.h \
../NumKeyword.h ../char_star.h ../ExchComp.h ../NameDouble.h \
../char_star.h ../Surface.h ../NumKeyword.h ../char_star.h \
../SurfaceComp.h ../NameDouble.h ../char_star.h ../SurfaceCharge.h \
../NameDouble.h ../char_star.h ../PPassemblage.h ../NumKeyword.h \
../char_star.h ../PPassemblageComp.h ../NameDouble.h ../char_star.h \
../cxxKinetics.h ../NumKeyword.h ../char_star.h ../KineticsComp.h \
../NameDouble.h ../char_star.h ../SSassemblage.h ../NumKeyword.h \
../char_star.h ../SSassemblageSS.h ../NameDouble.h ../char_star.h \
../GasPhase.h ../NumKeyword.h ../NameDouble.h ../char_star.h \
../Reaction.h ../NumKeyword.h ../NameDouble.h ../char_star.h \
../Temperature.h ../NumKeyword.h ../char_star.h ../StorageBin.h \
../Utils.h ../Parser.h ../Solution.h ../Exchange.h ../GasPhase.h \
../cxxKinetics.h ../PPassemblage.h ../SSassemblage.h ../Surface.h \
../cxxMix.h ../Reaction.h ../Temperature.h ../NumKeyword.h
../NumKeyword.h ../Parser.h ../SolutionIsotopeList.h \
../SolutionIsotope.h ../NameDouble.h ../cxxMix.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h \
../phreeqc/output.h ../ISolution.h ../ISolutionComp.h ../Exchange.h \
../ExchComp.h ../Surface.h ../SurfaceComp.h ../SurfaceCharge.h \
../PPassemblage.h ../PPassemblageComp.h ../cxxKinetics.h \
../KineticsComp.h ../SSassemblage.h ../SSassemblageSS.h ../GasPhase.h \
../Reaction.h ../Temperature.h ../StorageBin.h ../System.h
SolutionIsotope.o: ../SolutionIsotope.cxx ../SolutionIsotope.h \
../Parser.h ../char_star.h ../Utils.h ../char_star.h ../Parser.h \
../phreeqc/global.h ../phreeqc/phrqtype.h ../phreeqc/phqalloc.h \
../phreeqc/phrqproto.h
../Parser.h ../char_star.h ../Utils.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
SolutionIsotopeList.o: ../SolutionIsotopeList.cxx ../Utils.h \
../char_star.h ../SolutionIsotopeList.h ../SolutionIsotope.h \
../Parser.h ../char_star.h ../phreeqc/global.h ../phreeqc/phrqtype.h \
../char_star.h ../Parser.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
../Parser.h ../phreeqc/global.h ../phreeqc/phrqtype.h \
../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
SSassemblage.o: ../SSassemblage.cxx ../Utils.h ../char_star.h \
../SSassemblage.h ../NumKeyword.h ../Parser.h ../char_star.h \
../phreeqc/global.h ../phreeqc/phrqtype.h ../char_star.h \
../SSassemblageSS.h ../NameDouble.h ../char_star.h ../Parser.h \
../char_star.h ../SSassemblageSS.h ../phreeqc/phqalloc.h \
../phreeqc/phrqproto.h
../SSassemblage.h ../NumKeyword.h ../Parser.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../SSassemblageSS.h ../NameDouble.h ../cxxMix.h \
../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
SSassemblageSS.o: ../SSassemblageSS.cxx ../Utils.h ../char_star.h \
../SSassemblageSS.h ../NameDouble.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../char_star.h ../Parser.h ../char_star.h \
../char_star.h ../NameDouble.h ../phreeqc/phqalloc.h \
../phreeqc/phrqproto.h
../SSassemblageSS.h ../NameDouble.h ../Parser.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
StorageBin.o: ../StorageBin.cxx ../Utils.h ../char_star.h ../StorageBin.h \
../Utils.h ../Parser.h ../char_star.h ../Solution.h ../NumKeyword.h \
../Parser.h ../SolutionIsotopeList.h ../SolutionIsotope.h ../Parser.h \
../phreeqc/global.h ../phreeqc/phrqtype.h ../char_star.h ../Parser.h \
../NameDouble.h ../char_star.h ../Parser.h ../cxxMix.h ../NumKeyword.h \
../char_star.h ../char_star.h ../Exchange.h ../NumKeyword.h \
../char_star.h ../ExchComp.h ../NameDouble.h ../char_star.h \
../GasPhase.h ../NumKeyword.h ../NameDouble.h ../char_star.h \
../cxxKinetics.h ../NumKeyword.h ../char_star.h ../KineticsComp.h \
../NameDouble.h ../char_star.h ../PPassemblage.h ../NumKeyword.h \
../char_star.h ../PPassemblageComp.h ../NameDouble.h ../char_star.h \
../SSassemblage.h ../NumKeyword.h ../char_star.h ../SSassemblageSS.h \
../NameDouble.h ../char_star.h ../Surface.h ../NumKeyword.h \
../char_star.h ../SurfaceComp.h ../NameDouble.h ../char_star.h \
../SurfaceCharge.h ../NameDouble.h ../char_star.h ../cxxMix.h \
../Reaction.h ../NumKeyword.h ../NameDouble.h ../char_star.h \
../Temperature.h ../NumKeyword.h ../char_star.h ../Solution.h \
../phreeqc/phqalloc.h ../phreeqc/phrqproto.h ../phreeqc/output.h
../Parser.h ../Solution.h ../NumKeyword.h ../SolutionIsotopeList.h \
../SolutionIsotope.h ../NameDouble.h ../cxxMix.h ../Exchange.h \
../phreeqc/global.h ../phreeqc/phrqtype.h ../ExchComp.h ../GasPhase.h \
../cxxKinetics.h ../KineticsComp.h ../PPassemblage.h \
../PPassemblageComp.h ../SSassemblage.h ../SSassemblageSS.h \
../Surface.h ../SurfaceComp.h ../phreeqc/phrqproto.h ../SurfaceCharge.h \
../System.h ../Reaction.h ../Temperature.h ../phreeqc/phqalloc.h \
../phreeqc/output.h
SurfaceCharge.o: ../SurfaceCharge.cxx ../Utils.h ../char_star.h \
../SurfaceCharge.h ../NameDouble.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../char_star.h ../Parser.h ../char_star.h \
../char_star.h ../phreeqc/output.h ../phreeqc/phqalloc.h \
../SurfaceCharge.h ../NameDouble.h ../Parser.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../phreeqc/output.h ../phreeqc/phqalloc.h \
../phreeqc/phrqproto.h
SurfaceComp.o: ../SurfaceComp.cxx ../Utils.h ../char_star.h \
../SurfaceComp.h ../NameDouble.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../char_star.h ../Parser.h ../char_star.h \
../char_star.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h \
../SurfaceComp.h ../NameDouble.h ../Parser.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../phreeqc/phrqproto.h ../phreeqc/phqalloc.h \
../phreeqc/output.h
Surface.o: ../Surface.cxx ../Utils.h ../char_star.h ../Surface.h \
../NumKeyword.h ../Parser.h ../char_star.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../char_star.h ../SurfaceComp.h ../NameDouble.h \
../char_star.h ../Parser.h ../char_star.h ../SurfaceCharge.h \
../NameDouble.h ../char_star.h ../SurfaceComp.h ../phreeqc/phqalloc.h \
../phreeqc/phrqproto.h
../NumKeyword.h ../Parser.h ../phreeqc/global.h ../phreeqc/phrqtype.h \
../SurfaceComp.h ../NameDouble.h ../phreeqc/phrqproto.h \
../SurfaceCharge.h ../cxxMix.h ../phreeqc/phqalloc.h
System.o: ../System.cxx ../System.h ../Solution.h ../NumKeyword.h \
../Parser.h ../char_star.h ../SolutionIsotopeList.h \
../SolutionIsotope.h ../NameDouble.h ../cxxMix.h ../Exchange.h \
../phreeqc/global.h ../phreeqc/phrqtype.h ../ExchComp.h ../GasPhase.h \
../cxxKinetics.h ../KineticsComp.h ../PPassemblage.h \
../PPassemblageComp.h ../SSassemblage.h ../SSassemblageSS.h \
../Surface.h ../SurfaceComp.h ../phreeqc/phrqproto.h ../SurfaceCharge.h \
../Reaction.h ../Temperature.h
Temperature.o: ../Temperature.cxx ../Utils.h ../char_star.h \
../Temperature.h ../NumKeyword.h ../Parser.h ../char_star.h \
../phreeqc/global.h ../phreeqc/phrqtype.h ../char_star.h \
../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
../Temperature.h ../NumKeyword.h ../Parser.h ../phreeqc/global.h \
../phreeqc/phrqtype.h ../phreeqc/phqalloc.h ../phreeqc/phrqproto.h
Utils.o: ../Utils.cxx ../Utils.h ../char_star.h ../Parser.h \
../char_star.h ../phreeqc/output.h
../phreeqc/output.h
#
# PHREEQC files
#

View File

@ -285,6 +285,7 @@ void cxxPPassemblage::add(const cxxPPassemblage &addee, double extensive)
//cxxNameDouble eltList;
this->eltList.add_extensive(addee.eltList, extensive);
}
#ifdef ORCHESTRA
void cxxPPassemblage::ORCH_write_chemistry(std::ostream &chemistry_dat)
{
chemistry_dat << std::endl << "//********* Mineral equilibria" << std::endl;
@ -331,6 +332,7 @@ void cxxPPassemblage::ORCH_write_output_vars(std::ostream &outstream)
}
outstream << "\tend_ppassemblage";
}
void cxxPPassemblage::ORCH_read(std::vector <std::pair <std::string, double> > output_vector, std::vector < std::pair < std::string, double > >::iterator &it)
{
while (it->first.compare("end_ppassemblage") != 0)
@ -358,3 +360,4 @@ void cxxPPassemblage::ORCH_store_global(std::map < std::string, double > output_
}
}
}
#endif

View File

@ -42,10 +42,12 @@ public:
#endif
void totalize();
#ifdef ORCHESTRA
void ORCH_write_chemistry(std::ostream &chemistry_dat);
void ORCH_write_output_vars(std::ostream &outstream);
void ORCH_read(std::vector <std::pair <std::string, double> > output_vector, std::vector < std::pair < std::string, double > >::iterator &it);
void ORCH_store_global(std::map < std::string, double > output_map);
#endif
private:
void add(const cxxPPassemblage &addee, double extensive);

View File

@ -506,93 +506,6 @@ void cxxSolution::dump_raw(std::ostream& s_oss, unsigned int indent)const
return;
}
void cxxSolution::ORCH_write(std::ostream& headings, std::ostream& data)const
{
data.precision(DBL_DIG - 1);
// Solution element and attributes
//s_oss << "SOLUTION_RAW " << this->n_user << " " << this->description << std::endl;
//s_oss << "-temp " << this->tc << std::endl;
//s_oss << "-pH " << this->ph << std::endl;
headings << "pH\t";
data << this->ph << "\t";
//s_oss << "-pe " << this->pe << std::endl;
headings << "pe\t";
data << this->pe << "\t";
//s_oss << "-mu " << this->mu << std::endl;
//s_oss << "-ah2o " << this->ah2o << std::endl;
headings << "H2O.act\t";
data << 1 << "\t";
//s_oss << "-total_h " << this->total_h << std::endl;
//s_oss << "-total_o " << this->total_o << std::endl;
//s_oss << "-cb " << this->cb << std::endl;
//s_oss << "-mass_water " << this->mass_water << std::endl;
//s_oss << "-total_alkalinity " << this->total_alkalinity << std::endl;
// soln_total conc structures
//this->totals.dump_raw(s_oss, indent + 2);
//this->totals.write_orchestra(headings, s_oss);
for (std::map <char *, double, CHARSTAR_LESS>::const_iterator it = totals.begin(); it != totals.end(); ++it)
{
std::string master_name;
struct master *master_ptr;
master_ptr = master_bsearch (it->first);
if (master_ptr != NULL)
{
//headings << it->first << ".tot" << "\t";
headings << master_ptr->s->name << ".diss" << "\t";
data << it->second << "\t";
} else
{
assert(false);
}
}
// master_activity map
//this->master_activity.dump_raw(s_oss, indent + 2);
/*
{
for (std::map <char *, double>::const_iterator it = master_activity.begin(); it != master_activity.end(); ++it) {
s_oss << indent2;
s_oss << it->first << " " << it->second << std::endl;
}
}
*/
// species_gamma map
//this->species_gamma.dump_raw(s_oss, indent + 2);
/*
{
{
for (std::map <char *, double>::const_iterator it = species_gamma.begin(); it != species_gamma.end(); ++it) {
s_oss << indent2;
s_oss << it->first << " " << it->second << std::endl;
}
}
}
*/
// Isotopes
//s_oss << "-Isotopes" << std::endl;
/*
{
for (std::list<cxxSolutionIsotope>::const_iterator it = this->isotopes.begin(); it != isotopes.end(); ++it) {
it->dump_raw(s_oss, indent + 2);
}
}
*/
return;
}
void cxxSolution::read_raw(CParser& parser)
{
static std::vector<std::string> vopts;
@ -965,6 +878,95 @@ double cxxSolution::get_master_activity(char *string)const
}
}
#ifdef ORCHESTRA
void cxxSolution::ORCH_write(std::ostream& headings, std::ostream& data)const
{
data.precision(DBL_DIG - 1);
// Solution element and attributes
//s_oss << "SOLUTION_RAW " << this->n_user << " " << this->description << std::endl;
//s_oss << "-temp " << this->tc << std::endl;
//s_oss << "-pH " << this->ph << std::endl;
headings << "pH\t";
data << this->ph << "\t";
//s_oss << "-pe " << this->pe << std::endl;
headings << "pe\t";
data << this->pe << "\t";
//s_oss << "-mu " << this->mu << std::endl;
//s_oss << "-ah2o " << this->ah2o << std::endl;
headings << "H2O.act\t";
data << 1 << "\t";
//s_oss << "-total_h " << this->total_h << std::endl;
//s_oss << "-total_o " << this->total_o << std::endl;
//s_oss << "-cb " << this->cb << std::endl;
//s_oss << "-mass_water " << this->mass_water << std::endl;
//s_oss << "-total_alkalinity " << this->total_alkalinity << std::endl;
// soln_total conc structures
//this->totals.dump_raw(s_oss, indent + 2);
//this->totals.write_orchestra(headings, s_oss);
for (std::map <char *, double, CHARSTAR_LESS>::const_iterator it = totals.begin(); it != totals.end(); ++it)
{
std::string master_name;
struct master *master_ptr;
master_ptr = master_bsearch (it->first);
if (master_ptr != NULL)
{
//headings << it->first << ".tot" << "\t";
headings << master_ptr->s->name << ".diss" << "\t";
data << it->second << "\t";
} else
{
assert(false);
}
}
// master_activity map
//this->master_activity.dump_raw(s_oss, indent + 2);
/*
{
for (std::map <char *, double>::const_iterator it = master_activity.begin(); it != master_activity.end(); ++it) {
s_oss << indent2;
s_oss << it->first << " " << it->second << std::endl;
}
}
*/
// species_gamma map
//this->species_gamma.dump_raw(s_oss, indent + 2);
/*
{
{
for (std::map <char *, double>::const_iterator it = species_gamma.begin(); it != species_gamma.end(); ++it) {
s_oss << indent2;
s_oss << it->first << " " << it->second << std::endl;
}
}
}
*/
// Isotopes
//s_oss << "-Isotopes" << std::endl;
/*
{
for (std::list<cxxSolutionIsotope>::const_iterator it = this->isotopes.begin(); it != isotopes.end(); ++it) {
it->dump_raw(s_oss, indent + 2);
}
}
*/
return;
}
void cxxSolution::ORCH_read(std::vector <std::pair <std::string, double> > output_vector, std::vector < std::pair < std::string, double > >::iterator &it)
{
this->tc = it->second; it++;
@ -1069,7 +1071,7 @@ void cxxSolution::ORCH_store_global(std::map < std::string, double > output_map)
}
}
}
#endif
#ifdef USE_MPI
#include <mpi.h>
/* ---------------------------------------------------------------------- */

View File

@ -84,9 +84,11 @@ public:
void read_raw(CParser& parser);
void multiply(double extensive);
#ifdef ORCHESTRA
void ORCH_write(std::ostream& headings, std::ostream& input_data)const;
void ORCH_read(std::vector <std::pair <std::string, double> > output_vector, std::vector < std::pair < std::string, double > >::iterator &it);
void ORCH_store_global(std::map < std::string, double > output_map);
#endif
#ifdef USE_MPI
void mpi_pack(std::vector<int>& ints, std::vector<double>& doubles);

View File

@ -984,6 +984,7 @@ cxxExchange *cxxStorageBin::mix_cxxExchange(cxxMix &mixmap)
}
#endif
#ifdef ORCHESTRA
void cxxStorageBin::ORCH_write(std::ostream &chemistry_dat, std::ostream &input_dat, std::ostream &output_dat)
{
//std::ostringstream oss;
@ -992,6 +993,7 @@ void cxxStorageBin::ORCH_write(std::ostream &chemistry_dat, std::ostream &input_
this->system.ORCH_write(chemistry_dat, input_dat, output_dat);
}
#endif
void cxxStorageBin::setSystem(struct Use *use_ptr)
{
// Initialize
@ -1086,4 +1088,4 @@ void cxxStorageBin::setSystem(struct Use *use_ptr)
this->system.setTemperature(&(it->second));
}
}
}
}

View File

@ -206,7 +206,9 @@ public:
void mpi_send(int n, int task_number);
void mpi_recv(int task_number);
#endif
#ifdef ORCHESTRA
void ORCH_write(std::ostream &chemistry_dat, std::ostream &input_dat, std::ostream &output_dat);
#endif
protected:
// Tidied classes
std::map<int, cxxSolution> Solutions;

View File

@ -79,6 +79,7 @@ void cxxSystem::totalize(void)
//this->totals.dump_raw(std::cerr, 1);
return;
}
#ifdef ORCHESTRA
void cxxSystem::ORCH_write(std::ostream &chemistry_dat, std::ostream &input_dat, std::ostream &output_dat)
{
//
@ -214,88 +215,6 @@ void cxxSystem::ORCH_write_chemistry_total_O_H(std::ostream &chemistry_dat)
chemistry_dat << "\")" << std::endl;
chemistry_dat << std::endl;
}
#ifdef SKIP
void cxxSystem::ORCH_write_input(std::ostream &input_dat)
{
//
// Write orchestra input file info
//
std::ostringstream headings, data;
data.precision(DBL_DIG - 1);
headings << "var: ";
data << "data: ";
headings << "tempc\t";
data << this->solution->get_tc() << "\t";
headings << "pH\t";
data << this->solution->get_ph() << "\t";
headings << "pe\t";
data << this->solution->get_pe() << "\t";
headings << "H2O.act\t";
data << 1 << "\t";
for (cxxNameDouble::iterator iter = this->totals.begin(); iter != this->totals.end(); ++iter)
{
if (iter->first == "O") continue;
std::string master_name;
struct master *master_ptr;
master_ptr = master_bsearch (iter->first);
assert (master_ptr != NULL);
double coef = master_ptr->coef;
if (master_ptr->coef == 0)
{
coef = 1;
}
if (iter->first == "H")
{
headings << "system_hydrogen" << "\t";
data << iter->second << "\t";
continue;
} else
{
headings << master_ptr->s->name << ".liter" << "\t";
data << iter->second / coef << "\t";
}
// activity estimate
cxxNameDouble ma = this->solution->get_master_activity();
cxxNameDouble::iterator it = ma.find(iter->first);
if (it == ma.end())
{
it = ma.find(master_ptr->s->secondary->elt->name);
}
headings << master_ptr->s->name << ".act\t";
if (it != ma.end())
{
data << pow(10., it->second) << "\t";
} else
{
data << 1e-9 << "\t";
}
}
// Isotopes
//s_oss << "-Isotopes" << std::endl;
/*
{
for (std::list<cxxSolutionIsotope>::const_iterator it = this->isotopes.begin(); it != isotopes.end(); ++it) {
it->dump_raw(s_oss, indent + 2);
}
}
*/
// Write data to string
input_dat << headings.str() << std::endl;
input_dat << data.str() << std::endl;
return;
}
#endif
void cxxSystem::ORCH_write_input(std::ostream &input_dat)
{
@ -495,7 +414,6 @@ void cxxSystem::ORCH_write_output_vars(std::ostream &outstream)
for (cxxNameDouble::iterator it = this->orch_totals.begin(); it != this->orch_totals.end(); it++)
{
if ( it->first == "H+" || it->first == "H2O" || it->first == "e-") continue;
struct species *s_ptr = s_search(it->first);
outstream << "\t" << it->first << ".act";
}
outstream << "\tend_master_activities";
@ -510,4 +428,5 @@ void cxxSystem::ORCH_write_output_vars(std::ostream &outstream)
outstream << "\t" << name.c_str() << ".act" << "\t" << name.c_str() << ".con";
}
outstream << "\tend_species";
}
}
#endif

View File

@ -48,6 +48,7 @@ public:
this->temperature = entity;
}
void totalize();
#ifdef ORCHESTRA
void ORCH_components();
void ORCH_write(std::ostream &chemistry_dat, std::ostream &input_dat, std::ostream &output_dat);
void ORCH_write_chemistry_water(std::ostream &chemistry_dat);
@ -55,6 +56,7 @@ public:
void ORCH_write_chemistry_total_O_H(std::ostream &chemistry_dat);
void ORCH_write_output_vars(std::ostream &outstream);
void ORCH_write_input(std::ostream &input_dat);
#endif
private:
cxxSolution *solution;