mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 08:38:23 +01:00
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
This commit is contained in:
parent
e65ab2ea73
commit
2b76f04a8b
15
ExchComp.cxx
15
ExchComp.cxx
@ -5,16 +5,23 @@
|
|||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
#include <iostream> // std::cout std::cerr
|
#include <iostream> // std::cout std::cerr
|
||||||
|
#include <cassert> // assert
|
||||||
|
#include <algorithm> // std::sort
|
||||||
|
#include <float.h>
|
||||||
|
|
||||||
#include "Utils.h" // define first
|
#include "Utils.h" // define first
|
||||||
#include "ExchComp.h"
|
#if !defined(PHREEQC_CLASS)
|
||||||
#include "Dictionary.h"
|
|
||||||
#define EXTERNAL extern
|
#define EXTERNAL extern
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "ExchComp.h"
|
||||||
|
#include "Dictionary.h"
|
||||||
#include "phqalloc.h"
|
#include "phqalloc.h"
|
||||||
#include "phrqproto.h"
|
#include "phrqproto.h"
|
||||||
#include "output.h"
|
#include "output.h"
|
||||||
#include <cassert> // assert
|
|
||||||
#include <algorithm> // std::sort
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
|
|||||||
@ -1,15 +1,14 @@
|
|||||||
#if !defined(EXCHCOMP_H_INCLUDED)
|
#if !defined(EXCHCOMP_H_INCLUDED)
|
||||||
#define EXCHCOMP_H_INCLUDED
|
#define EXCHCOMP_H_INCLUDED
|
||||||
|
|
||||||
#include "NameDouble.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
|
|
||||||
|
#include "NameDouble.h"
|
||||||
|
|
||||||
class cxxExchComp
|
class cxxExchComp
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
35
Exchange.cxx
35
Exchange.cxx
@ -4,18 +4,22 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <iostream> // std::cout std::cerr
|
#include <iostream> // std::cout std::cerr
|
||||||
|
#include <cassert> // assert
|
||||||
|
#include <algorithm> // std::sort
|
||||||
|
|
||||||
#include "Utils.h" // define first
|
#include "Utils.h" // define first
|
||||||
#include "Exchange.h"
|
#if !defined(PHREEQC_CLASS)
|
||||||
#include "ExchComp.h"
|
|
||||||
#define EXTERNAL extern
|
#define EXTERNAL extern
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "cxxMix.h"
|
||||||
|
#include "Exchange.h"
|
||||||
#include "phqalloc.h"
|
#include "phqalloc.h"
|
||||||
#include "phrqproto.h"
|
#include "phrqproto.h"
|
||||||
#include "output.h"
|
#include "output.h"
|
||||||
#include <cassert> // assert
|
|
||||||
#include <algorithm> // std::sort
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
@ -558,3 +562,24 @@ cxxExchange::totalize()
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
bool
|
||||||
|
cxxExchange::get_pitzer_exchange_gammas()
|
||||||
|
{
|
||||||
|
return this->pitzer_exchange_gammas;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
cxxExchange::set_pitzer_exchange_gammas(bool b)
|
||||||
|
{
|
||||||
|
this->pitzer_exchange_gammas = b;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::map < std::string, cxxExchComp > &
|
||||||
|
cxxExchange::get_exchComps(void)
|
||||||
|
{
|
||||||
|
return (this->exchComps);
|
||||||
|
}
|
||||||
|
const cxxNameDouble &
|
||||||
|
cxxExchange::get_totals() const
|
||||||
|
{
|
||||||
|
return totals;
|
||||||
|
};
|
||||||
29
Exchange.h
29
Exchange.h
@ -1,20 +1,19 @@
|
|||||||
#if !defined(EXCHANGE_H_INCLUDED)
|
#if !defined(EXCHANGE_H_INCLUDED)
|
||||||
#define EXCHANGE_H_INCLUDED
|
#define EXCHANGE_H_INCLUDED
|
||||||
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
|
#include "NumKeyword.h"
|
||||||
#include "ExchComp.h"
|
#include "ExchComp.h"
|
||||||
#include "cxxMix.h"
|
#include "NameDouble.h"
|
||||||
|
class cxxMix;
|
||||||
|
|
||||||
class cxxExchange:public cxxNumKeyword
|
class cxxExchange:public cxxNumKeyword
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
cxxExchange();
|
cxxExchange();
|
||||||
cxxExchange(int n_user);
|
cxxExchange(int n_user);
|
||||||
cxxExchange(struct exchange *);
|
cxxExchange(struct exchange *);
|
||||||
@ -34,25 +33,13 @@ class cxxExchange:public cxxNumKeyword
|
|||||||
|
|
||||||
bool get_related_rate(void);
|
bool get_related_rate(void);
|
||||||
|
|
||||||
bool get_pitzer_exchange_gammas()
|
bool get_pitzer_exchange_gammas();
|
||||||
{
|
void set_pitzer_exchange_gammas(bool b);
|
||||||
return this->pitzer_exchange_gammas;
|
|
||||||
}
|
|
||||||
void set_pitzer_exchange_gammas(bool b)
|
|
||||||
{
|
|
||||||
this->pitzer_exchange_gammas = b;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::map < std::string, cxxExchComp > &get_exchComps(void)
|
std::map < std::string, cxxExchComp > &get_exchComps(void);
|
||||||
{
|
|
||||||
return (this->exchComps);
|
|
||||||
}
|
|
||||||
void totalize();
|
void totalize();
|
||||||
|
|
||||||
const cxxNameDouble & get_totals() const
|
const cxxNameDouble & get_totals() const;
|
||||||
{
|
|
||||||
return totals;
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef USE_MPI
|
#ifdef USE_MPI
|
||||||
void mpi_pack(std::vector < int >&ints, std::vector < double >&doubles);
|
void mpi_pack(std::vector < int >&ints, std::vector < double >&doubles);
|
||||||
|
|||||||
13
GasPhase.cxx
13
GasPhase.cxx
@ -4,16 +4,23 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
#include <cassert> // assert
|
||||||
|
#include <algorithm> // std::sort
|
||||||
|
#include <float.h>
|
||||||
|
|
||||||
#include "Utils.h" // define first
|
#include "Utils.h" // define first
|
||||||
#include "GasPhase.h"
|
#if !defined(PHREEQC_CLASS)
|
||||||
#define EXTERNAL extern
|
#define EXTERNAL extern
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "GasPhase.h"
|
||||||
|
#include "cxxMix.h"
|
||||||
#include "phqalloc.h"
|
#include "phqalloc.h"
|
||||||
#include "phrqproto.h"
|
#include "phrqproto.h"
|
||||||
#include "output.h"
|
#include "output.h"
|
||||||
#include <cassert> // assert
|
|
||||||
#include <algorithm> // std::sort
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
|
|||||||
@ -1,17 +1,15 @@
|
|||||||
#if !defined(GASPHASE_H_INCLUDED)
|
#if !defined(GASPHASE_H_INCLUDED)
|
||||||
#define GASPHASE_H_INCLUDED
|
#define GASPHASE_H_INCLUDED
|
||||||
|
|
||||||
#include "NumKeyword.h"
|
|
||||||
#include "NameDouble.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
|
|
||||||
#include "cxxMix.h"
|
#include "NumKeyword.h"
|
||||||
|
#include "NameDouble.h"
|
||||||
|
class cxxMix;
|
||||||
|
|
||||||
class cxxGasPhase:public cxxNumKeyword
|
class cxxGasPhase:public cxxNumKeyword
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,18 +4,22 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
#include <cassert> // assert
|
||||||
|
#include <algorithm> // std::sort
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
#include "ISolution.h"
|
#include "Utils.h" // define first
|
||||||
#include "ISolutionComp.h"
|
#if !defined(PHREEQC_CLASS)
|
||||||
#define EXTERNAL extern
|
#define EXTERNAL extern
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "ISolution.h"
|
||||||
#include "phqalloc.h"
|
#include "phqalloc.h"
|
||||||
#include "phrqproto.h"
|
#include "phrqproto.h"
|
||||||
#include "output.h"
|
#include "output.h"
|
||||||
|
|
||||||
#include <cassert> // assert
|
|
||||||
#include <algorithm> // std::sort
|
|
||||||
#include <sstream>
|
|
||||||
#ifdef ORCHESTRA
|
#ifdef ORCHESTRA
|
||||||
extern void ORCH_write_chemistry_species(std::ostream & chemistry_dat);
|
extern void ORCH_write_chemistry_species(std::ostream & chemistry_dat);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
10
ISolution.h
10
ISolution.h
@ -1,11 +1,6 @@
|
|||||||
#if !defined(ISOLUTION_H_INCLUDED)
|
#if !defined(ISOLUTION_H_INCLUDED)
|
||||||
#define ISOLUTION_H_INCLUDED
|
#define ISOLUTION_H_INCLUDED
|
||||||
|
|
||||||
//#include "Parser.h"
|
|
||||||
#include "ISolutionComp.h"
|
|
||||||
#include "NumKeyword.h"
|
|
||||||
#include "Solution.h"
|
|
||||||
//#include "Isotope.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
@ -15,6 +10,11 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
#include "ISolutionComp.h"
|
||||||
|
#include "NumKeyword.h"
|
||||||
|
#include "Solution.h"
|
||||||
|
|
||||||
class cxxISolution:public cxxSolution
|
class cxxISolution:public cxxSolution
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,16 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "ISolutionComp.h"
|
|
||||||
#include "ISolution.h"
|
|
||||||
#include "Utils.h"
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#include "Utils.h"
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
#define EXTERNAL extern
|
#define EXTERNAL extern
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "ISolutionComp.h"
|
||||||
#include "phrqproto.h"
|
#include "phrqproto.h"
|
||||||
#include "phqalloc.h"
|
#include "phqalloc.h"
|
||||||
#include "output.h"
|
#include "output.h"
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
#if !defined(ISOLUTIONCOMP_H_INCLUDED)
|
#if !defined(ISOLUTIONCOMP_H_INCLUDED)
|
||||||
#define ISOLUTIONCOMP_H_INCLUDED
|
#define ISOLUTIONCOMP_H_INCLUDED
|
||||||
|
|
||||||
//#include "Parser.h"
|
|
||||||
#include "Utils.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include "phqalloc.h"
|
|
||||||
#include "phrqproto.h"
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|||||||
@ -4,17 +4,22 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Utils.h" // define first
|
|
||||||
#include "KineticsComp.h"
|
|
||||||
#include "Dictionary.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include "phqalloc.h"
|
|
||||||
#include "phrqproto.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <algorithm> // std::sort
|
#include <algorithm> // std::sort
|
||||||
|
|
||||||
|
#include "Utils.h" // define first
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
|
#define EXTERNAL extern
|
||||||
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "KineticsComp.h"
|
||||||
|
#include "Dictionary.h"
|
||||||
|
#include "phqalloc.h"
|
||||||
|
#include "phrqproto.h"
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@ -1,15 +1,14 @@
|
|||||||
#if !defined(KINETICSCOMP_H_INCLUDED)
|
#if !defined(KINETICSCOMP_H_INCLUDED)
|
||||||
#define KINETICSCOMP_H_INCLUDED
|
#define KINETICSCOMP_H_INCLUDED
|
||||||
|
|
||||||
#include "NameDouble.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
|
|
||||||
|
#include "NameDouble.h"
|
||||||
|
|
||||||
class cxxKineticsComp
|
class cxxKineticsComp
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -4,19 +4,22 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <iostream> // std::cout std::cerr
|
|
||||||
#include "Utils.h" // define first
|
|
||||||
#include "NameDouble.h"
|
|
||||||
#include "Dictionary.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include "output.h"
|
|
||||||
#include "phqalloc.h"
|
|
||||||
#include "phrqproto.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <algorithm> // std::sort
|
#include <algorithm> // std::sort
|
||||||
#include <map> // std::sort
|
#include <map> // std::sort
|
||||||
|
#include <iostream> // std::cout std::cerr
|
||||||
|
|
||||||
|
#include "Utils.h" // define first
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
|
#define EXTERNAL extern
|
||||||
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "NameDouble.h"
|
||||||
|
#include "Dictionary.h"
|
||||||
|
#include "phqalloc.h"
|
||||||
|
#include "phrqproto.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
|
|
||||||
#include "Parser.h"
|
#include "Parser.h"
|
||||||
|
|
||||||
class cxxNameDouble:public
|
class cxxNameDouble:public
|
||||||
std::map < std::string, double >
|
std::map < std::string, double >
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "NumKeyword.h"
|
#include "NumKeyword.h"
|
||||||
|
#include "Parser.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
|
|||||||
@ -1,12 +1,11 @@
|
|||||||
#if !defined(NUMKEYWORD_H_INCLUDED)
|
#if !defined(NUMKEYWORD_H_INCLUDED)
|
||||||
#define NUMKEYWORD_H_INCLUDED
|
#define NUMKEYWORD_H_INCLUDED
|
||||||
|
|
||||||
#include "Parser.h"
|
//#include "Parser.h"
|
||||||
#include <ostream> // std::ostream
|
#include <ostream> // std::ostream
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
//#define EXTERNAL extern
|
class CParser;
|
||||||
//#include "global.h"
|
|
||||||
//#include "phrqproto.h"
|
|
||||||
extern char *string_duplicate(const char *);
|
extern char *string_duplicate(const char *);
|
||||||
|
|
||||||
class cxxNumKeyword
|
class cxxNumKeyword
|
||||||
|
|||||||
@ -4,17 +4,21 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Utils.h" // define first
|
|
||||||
#include "PPassemblage.h"
|
|
||||||
#include "PPassemblageComp.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include "phqalloc.h"
|
|
||||||
#include "phrqproto.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <algorithm> // std::sort
|
#include <algorithm> // std::sort
|
||||||
|
|
||||||
|
#include "Utils.h" // define first
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
|
#define EXTERNAL extern
|
||||||
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "PPassemblage.h"
|
||||||
|
#include "cxxMix.h"
|
||||||
|
#include "phqalloc.h"
|
||||||
|
#include "phrqproto.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@ -1,17 +1,15 @@
|
|||||||
#if !defined(PPASSEMBLAGE_H_INCLUDED)
|
#if !defined(PPASSEMBLAGE_H_INCLUDED)
|
||||||
#define PPASSEMBLAGE_H_INCLUDED
|
#define PPASSEMBLAGE_H_INCLUDED
|
||||||
|
|
||||||
#include "NumKeyword.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
|
|
||||||
|
#include "NumKeyword.h"
|
||||||
#include "PPassemblageComp.h"
|
#include "PPassemblageComp.h"
|
||||||
#include "cxxMix.h"
|
class cxxMix;
|
||||||
|
|
||||||
class cxxPPassemblage:public cxxNumKeyword
|
class cxxPPassemblage:public cxxNumKeyword
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,17 +4,22 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
#include <cassert> // assert
|
||||||
|
#include <algorithm> // std::sort
|
||||||
|
|
||||||
#include "Utils.h" // define first
|
#include "Utils.h" // define first
|
||||||
#include "PPassemblageComp.h"
|
#if !defined(PHREEQC_CLASS)
|
||||||
#include "Dictionary.h"
|
|
||||||
#define EXTERNAL extern
|
#define EXTERNAL extern
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "PPassemblageComp.h"
|
||||||
|
#include "Dictionary.h"
|
||||||
#include "phqalloc.h"
|
#include "phqalloc.h"
|
||||||
#include "phrqproto.h"
|
#include "phrqproto.h"
|
||||||
#include "output.h"
|
#include "output.h"
|
||||||
#include <cassert> // assert
|
|
||||||
#include <algorithm> // std::sort
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
@ -365,15 +370,13 @@ cxxPPassemblageComp::read_raw(CParser & parser, bool check)
|
|||||||
if (initial_moles_defined == false)
|
if (initial_moles_defined == false)
|
||||||
{
|
{
|
||||||
parser.incr_input_error();
|
parser.incr_input_error();
|
||||||
parser.
|
parser.error_msg("Initial_moles not defined for PPassemblageComp input.",
|
||||||
error_msg("Initial_moles not defined for PPassemblageComp input.",
|
|
||||||
CParser::OT_CONTINUE);
|
CParser::OT_CONTINUE);
|
||||||
}
|
}
|
||||||
if (dissolve_only_defined == false)
|
if (dissolve_only_defined == false)
|
||||||
{
|
{
|
||||||
parser.incr_input_error();
|
parser.incr_input_error();
|
||||||
parser.
|
parser.error_msg("Dissolve_only not defined for PPassemblageComp input.",
|
||||||
error_msg("Dissolve_only not defined for PPassemblageComp input.",
|
|
||||||
CParser::OT_CONTINUE);
|
CParser::OT_CONTINUE);
|
||||||
}
|
}
|
||||||
/* don't check to maintain backward compatibility
|
/* don't check to maintain backward compatibility
|
||||||
@ -388,8 +391,7 @@ cxxPPassemblageComp::read_raw(CParser & parser, bool check)
|
|||||||
if (force_equality_defined == false)
|
if (force_equality_defined == false)
|
||||||
{
|
{
|
||||||
parser.incr_input_error();
|
parser.incr_input_error();
|
||||||
parser.
|
parser.error_msg
|
||||||
error_msg
|
|
||||||
("Force_equality not defined for PPassemblageComp input.",
|
("Force_equality not defined for PPassemblageComp input.",
|
||||||
CParser::OT_CONTINUE);
|
CParser::OT_CONTINUE);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,15 +1,14 @@
|
|||||||
#if !defined(PPASSEMBLAGECOMP_H_INCLUDED)
|
#if !defined(PPASSEMBLAGECOMP_H_INCLUDED)
|
||||||
#define PPASSEMBLAGECOMP_H_INCLUDED
|
#define PPASSEMBLAGECOMP_H_INCLUDED
|
||||||
|
|
||||||
#include "NameDouble.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
|
|
||||||
|
#include "NameDouble.h"
|
||||||
|
|
||||||
class cxxPPassemblageComp
|
class cxxPPassemblageComp
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
18
Reaction.cxx
18
Reaction.cxx
@ -4,16 +4,20 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Utils.h" // define first
|
|
||||||
#include "Reaction.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include "phqalloc.h"
|
|
||||||
#include "phrqproto.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <algorithm> // std::sort
|
#include <algorithm> // std::sort
|
||||||
|
|
||||||
|
#include "Utils.h" // define first
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
|
#define EXTERNAL extern
|
||||||
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "Reaction.h"
|
||||||
|
#include "phqalloc.h"
|
||||||
|
#include "phrqproto.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@ -1,16 +1,15 @@
|
|||||||
#if !defined(REACTION_H_INCLUDED)
|
#if !defined(REACTION_H_INCLUDED)
|
||||||
#define REACTION_H_INCLUDED
|
#define REACTION_H_INCLUDED
|
||||||
|
|
||||||
#include "NumKeyword.h"
|
|
||||||
#include "NameDouble.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
|
|
||||||
|
#include "NumKeyword.h"
|
||||||
|
#include "NameDouble.h"
|
||||||
|
|
||||||
class cxxReaction:public cxxNumKeyword
|
class cxxReaction:public cxxNumKeyword
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,16 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
|
#define EXTERNAL extern
|
||||||
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
#include "Parser.h"
|
#include "Parser.h"
|
||||||
#include "Solution.h"
|
#include "Solution.h"
|
||||||
#include "Exchange.h"
|
#include "Exchange.h"
|
||||||
@ -14,14 +24,10 @@
|
|||||||
#include "Temperature.h"
|
#include "Temperature.h"
|
||||||
#include "dumper.h"
|
#include "dumper.h"
|
||||||
#include "runner.h"
|
#include "runner.h"
|
||||||
#define EXTERNAL extern
|
#include "cxxMix.h"
|
||||||
#include "global.h"
|
|
||||||
#include "phqalloc.h"
|
#include "phqalloc.h"
|
||||||
#include "output.h"
|
|
||||||
#include "phrqproto.h"
|
#include "phrqproto.h"
|
||||||
#include <iostream>
|
#include "output.h"
|
||||||
#include <fstream>
|
|
||||||
#include <sstream>
|
|
||||||
|
|
||||||
static int streamify_to_next_keyword(std::istringstream & lines);
|
static int streamify_to_next_keyword(std::istringstream & lines);
|
||||||
extern int reading_database(void);
|
extern int reading_database(void);
|
||||||
|
|||||||
@ -9,17 +9,18 @@
|
|||||||
#include <algorithm> // std::sort
|
#include <algorithm> // std::sort
|
||||||
|
|
||||||
#include "Utils.h" // define first
|
#include "Utils.h" // define first
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
|
#define EXTERNAL extern
|
||||||
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
#include "SSassemblage.h"
|
#include "SSassemblage.h"
|
||||||
#include "SSassemblageSS.h"
|
#include "SSassemblageSS.h"
|
||||||
#include "cxxMix.h"
|
#include "cxxMix.h"
|
||||||
#if defined(PHREEQC_CLASS)
|
|
||||||
#define CLASS_STATIC static
|
|
||||||
#endif
|
|
||||||
#include "global_structures.h"
|
|
||||||
#include "phqalloc.h"
|
#include "phqalloc.h"
|
||||||
#include "phrqproto.h"
|
#include "phrqproto.h"
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
#if !defined(SSASSEMBLAGE_H_INCLUDED)
|
#if !defined(SSASSEMBLAGE_H_INCLUDED)
|
||||||
#define SSASSEMBLAGE_H_INCLUDED
|
#define SSASSEMBLAGE_H_INCLUDED
|
||||||
|
|
||||||
#include "NumKeyword.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
|
|
||||||
//#include "SSassemblageSS.h"
|
#include "NumKeyword.h"
|
||||||
#include "NameDouble.h"
|
#include "NameDouble.h"
|
||||||
class cxxSSassemblageSS;
|
class cxxSSassemblageSS;
|
||||||
|
|
||||||
|
|||||||
@ -4,18 +4,22 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Utils.h" // define first
|
|
||||||
#include "SSassemblageSS.h"
|
|
||||||
#include "NameDouble.h"
|
|
||||||
#include "Dictionary.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include "phqalloc.h"
|
|
||||||
#include "phrqproto.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <algorithm> // std::sort
|
#include <algorithm> // std::sort
|
||||||
|
|
||||||
|
#include "Utils.h" // define first
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
|
#define EXTERNAL extern
|
||||||
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "SSassemblageSS.h"
|
||||||
|
#include "Dictionary.h"
|
||||||
|
#include "phqalloc.h"
|
||||||
|
#include "phrqproto.h"
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
#if !defined(SSASSEMBLAGESS_H_INCLUDED)
|
#if !defined(SSASSEMBLAGESS_H_INCLUDED)
|
||||||
#define SSASSEMBLAGESS_H_INCLUDED
|
#define SSASSEMBLAGESS_H_INCLUDED
|
||||||
|
|
||||||
#include "NameDouble.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
|
|
||||||
|
#include "NameDouble.h"
|
||||||
|
|
||||||
class cxxSSassemblageSS
|
class cxxSSassemblageSS
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
13
Solution.cxx
13
Solution.cxx
@ -4,19 +4,26 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
#include <cassert> // assert
|
||||||
|
#include <algorithm> // std::sort
|
||||||
|
|
||||||
#ifdef USE_MPI
|
#ifdef USE_MPI
|
||||||
//MPICH seems to require mpi.h to be first
|
//MPICH seems to require mpi.h to be first
|
||||||
#include <mpi.h>
|
#include <mpi.h>
|
||||||
#endif
|
#endif
|
||||||
#include "Utils.h" // define first
|
#include "Utils.h" // define first
|
||||||
#include "Solution.h"
|
#if !defined(PHREEQC_CLASS)
|
||||||
#define EXTERNAL extern
|
#define EXTERNAL extern
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "Solution.h"
|
||||||
|
#include "cxxMix.h"
|
||||||
#include "phqalloc.h"
|
#include "phqalloc.h"
|
||||||
#include "phrqproto.h"
|
#include "phrqproto.h"
|
||||||
#include "output.h"
|
#include "output.h"
|
||||||
#include <cassert> // assert
|
|
||||||
#include <algorithm> // std::sort
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
12
Solution.h
12
Solution.h
@ -1,19 +1,17 @@
|
|||||||
#if !defined(SOLUTION_H_INCLUDED)
|
#if !defined(SOLUTION_H_INCLUDED)
|
||||||
#define SOLUTION_H_INCLUDED
|
#define SOLUTION_H_INCLUDED
|
||||||
|
|
||||||
#include "NumKeyword.h"
|
|
||||||
#include "SolutionIsotopeList.h"
|
|
||||||
#include "NameDouble.h"
|
|
||||||
#include "cxxMix.h"
|
|
||||||
|
|
||||||
//#define EXTERNAL extern
|
|
||||||
//#include "global.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include "NumKeyword.h"
|
||||||
|
#include "SolutionIsotopeList.h"
|
||||||
|
#include "NameDouble.h"
|
||||||
|
class cxxMix;
|
||||||
|
|
||||||
class cxxSolution:public cxxNumKeyword
|
class cxxSolution:public cxxNumKeyword
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
#include "SolutionIsotope.h"
|
|
||||||
#include "Utils.h"
|
|
||||||
#include "Parser.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include "phqalloc.h"
|
|
||||||
#include "phrqproto.h"
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <sstream> // std::ostrstream
|
#include <sstream> // std::ostrstream
|
||||||
|
|
||||||
|
#include "Utils.h"
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
|
#define EXTERNAL extern
|
||||||
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "SolutionIsotope.h"
|
||||||
|
#include "phqalloc.h"
|
||||||
|
#include "phrqproto.h"
|
||||||
|
|
||||||
cxxSolutionIsotope::cxxSolutionIsotope(void):
|
cxxSolutionIsotope::cxxSolutionIsotope(void):
|
||||||
isotope_number(0.0)
|
isotope_number(0.0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
#if !defined(SOLUTIONISOTOPE_H_INCLUDED)
|
#if !defined(SOLUTIONISOTOPE_H_INCLUDED)
|
||||||
#define SOLUTIONISOTOPE_H_INCLUDED
|
#define SOLUTIONISOTOPE_H_INCLUDED
|
||||||
|
|
||||||
#include "Parser.h"
|
|
||||||
#include <ostream> // std::ostream
|
#include <ostream> // std::ostream
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
|
#include "Parser.h"
|
||||||
|
|
||||||
class cxxSolutionIsotope
|
class cxxSolutionIsotope
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,12 +1,18 @@
|
|||||||
#include "Utils.h" // define first
|
#include "Utils.h" // define first
|
||||||
#include "SolutionIsotopeList.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include "phqalloc.h"
|
|
||||||
#include "phrqproto.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <algorithm> // std::sort
|
#include <algorithm> // std::sort
|
||||||
|
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
|
#define EXTERNAL extern
|
||||||
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "SolutionIsotopeList.h"
|
||||||
|
#include "phqalloc.h"
|
||||||
|
#include "phrqproto.h"
|
||||||
|
|
||||||
|
|
||||||
cxxSolutionIsotopeList::cxxSolutionIsotopeList(void)
|
cxxSolutionIsotopeList::cxxSolutionIsotopeList(void)
|
||||||
//
|
//
|
||||||
// default constructor for cxxSolution
|
// default constructor for cxxSolution
|
||||||
|
|||||||
@ -1,18 +1,14 @@
|
|||||||
#if !defined(SOLUTIONISOTOPELIST_H_INCLUDED)
|
#if !defined(SOLUTIONISOTOPELIST_H_INCLUDED)
|
||||||
#define SOLUTIONISOTOPELIST_H_INCLUDED
|
#define SOLUTIONISOTOPELIST_H_INCLUDED
|
||||||
|
|
||||||
//#define EXTERNAL extern
|
|
||||||
#include "SolutionIsotope.h"
|
|
||||||
//#include "global.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
|
|
||||||
#include "Parser.h"
|
#include "SolutionIsotope.h"
|
||||||
|
|
||||||
class cxxSolutionIsotopeList:public
|
class cxxSolutionIsotopeList:public
|
||||||
std::list <
|
std::list < cxxSolutionIsotope >
|
||||||
cxxSolutionIsotope >
|
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -29,7 +25,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -4,14 +4,22 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
#include <fstream>
|
||||||
|
#include <iostream> // std::cout std::cerr
|
||||||
|
#include <cassert> // assert
|
||||||
|
#include <algorithm> // std::sort
|
||||||
|
|
||||||
#ifdef USE_MPI
|
#ifdef USE_MPI
|
||||||
//MPICH seems to require mpi.h to be first
|
//MPICH seems to require mpi.h to be first
|
||||||
#include <mpi.h>
|
#include <mpi.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <fstream>
|
|
||||||
#include <iostream> // std::cout std::cerr
|
|
||||||
#include "Utils.h" // define first
|
#include "Utils.h" // define first
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
|
#define EXTERNAL extern
|
||||||
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
#include "NameDouble.h"
|
#include "NameDouble.h"
|
||||||
#include "StorageBin.h"
|
#include "StorageBin.h"
|
||||||
#include "SSassemblage.h"
|
#include "SSassemblage.h"
|
||||||
@ -26,14 +34,9 @@
|
|||||||
#include "cxxMix.h"
|
#include "cxxMix.h"
|
||||||
#include "Reaction.h"
|
#include "Reaction.h"
|
||||||
#include "Temperature.h"
|
#include "Temperature.h"
|
||||||
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include "phqalloc.h"
|
#include "phqalloc.h"
|
||||||
#include "phrqproto.h"
|
#include "phrqproto.h"
|
||||||
#include "output.h"
|
#include "output.h"
|
||||||
#include <cassert> // assert
|
|
||||||
#include <algorithm> // std::sort
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
|
|||||||
@ -6,9 +6,7 @@
|
|||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
|
|
||||||
//#include "Utils.h"
|
#include "System.h"
|
||||||
//#include "Parser.h"
|
|
||||||
|
|
||||||
class cxxSolution;
|
class cxxSolution;
|
||||||
class cxxExchange;
|
class cxxExchange;
|
||||||
class cxxGasPhase;
|
class cxxGasPhase;
|
||||||
@ -16,11 +14,9 @@ class cxxKinetics;
|
|||||||
class cxxPPassemblage;
|
class cxxPPassemblage;
|
||||||
class cxxSSassemblage;
|
class cxxSSassemblage;
|
||||||
class cxxSurface;
|
class cxxSurface;
|
||||||
#include "System.h"
|
|
||||||
class cxxReaction;
|
class cxxReaction;
|
||||||
class cxxTemperature;
|
class cxxTemperature;
|
||||||
|
|
||||||
|
|
||||||
class cxxStorageBin
|
class cxxStorageBin
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
#include "StorageBinList.h"
|
|
||||||
#include <algorithm> // std::replace
|
#include <algorithm> // std::replace
|
||||||
|
#include "StorageBinList.h"
|
||||||
|
#include "Parser.h"
|
||||||
|
|
||||||
StorageBinListItem::StorageBinListItem(void)
|
StorageBinListItem::StorageBinListItem(void)
|
||||||
{
|
{
|
||||||
this->defined = false;
|
this->defined = false;
|
||||||
|
|||||||
@ -4,7 +4,9 @@
|
|||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
#include "Parser.h"
|
|
||||||
|
class CParser;
|
||||||
|
|
||||||
class StorageBinListItem
|
class StorageBinListItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
20
Surface.cxx
20
Surface.cxx
@ -4,17 +4,21 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Utils.h" // define first
|
|
||||||
#include "Surface.h"
|
|
||||||
#include "SurfaceComp.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include "phqalloc.h"
|
|
||||||
#include "phrqproto.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <algorithm> // std::sort
|
#include <algorithm> // std::sort
|
||||||
|
|
||||||
|
#include "Utils.h" // define first
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
|
#define EXTERNAL extern
|
||||||
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "Surface.h"
|
||||||
|
#include "cxxMix.h"
|
||||||
|
#include "phqalloc.h"
|
||||||
|
#include "phrqproto.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@ -1,18 +1,16 @@
|
|||||||
#if !defined(SURFACE_H_INCLUDED)
|
#if !defined(SURFACE_H_INCLUDED)
|
||||||
#define SURFACE_H_INCLUDED
|
#define SURFACE_H_INCLUDED
|
||||||
|
|
||||||
#include "NumKeyword.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
|
|
||||||
|
#include "NumKeyword.h"
|
||||||
#include "SurfaceComp.h"
|
#include "SurfaceComp.h"
|
||||||
#include "SurfaceCharge.h"
|
#include "SurfaceCharge.h"
|
||||||
#include "cxxMix.h"
|
class cxxMix;
|
||||||
|
|
||||||
class cxxSurface:public cxxNumKeyword
|
class cxxSurface:public cxxNumKeyword
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,26 +4,30 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Utils.h" // define first
|
|
||||||
#include "SurfaceCharge.h"
|
|
||||||
#include "Dictionary.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include "output.h"
|
|
||||||
#include "phqalloc.h"
|
|
||||||
#include "phrqproto.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <algorithm> // std::sort
|
#include <algorithm> // std::sort
|
||||||
|
|
||||||
|
#include "Utils.h" // define first
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
|
#define EXTERNAL extern
|
||||||
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "SurfaceCharge.h"
|
||||||
|
#include "Dictionary.h"
|
||||||
|
#include "phqalloc.h"
|
||||||
|
#include "phrqproto.h"
|
||||||
|
#include "output.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
cxxSurfaceCharge::cxxSurfaceCharge()
|
cxxSurfaceCharge::cxxSurfaceCharge()
|
||||||
//
|
//
|
||||||
// default constructor for cxxSurfaceCharge
|
// default constructor for cxxSurfaceCharge
|
||||||
//
|
//
|
||||||
{
|
{
|
||||||
specific_area = 0.0;
|
specific_area = 0.0;
|
||||||
grams = 0.0;
|
grams = 0.0;
|
||||||
@ -38,10 +42,10 @@ cxxSurfaceCharge::cxxSurfaceCharge()
|
|||||||
}
|
}
|
||||||
|
|
||||||
cxxSurfaceCharge::cxxSurfaceCharge(struct surface_charge *surf_charge_ptr)
|
cxxSurfaceCharge::cxxSurfaceCharge(struct surface_charge *surf_charge_ptr)
|
||||||
//
|
//
|
||||||
// constructor for cxxSurfaceCharge from struct surface_charge
|
// constructor for cxxSurfaceCharge from struct surface_charge
|
||||||
//
|
//
|
||||||
:
|
:
|
||||||
diffuse_layer_totals(surf_charge_ptr->diffuse_layer_totals)
|
diffuse_layer_totals(surf_charge_ptr->diffuse_layer_totals)
|
||||||
{
|
{
|
||||||
this->set_name(surf_charge_ptr->name);
|
this->set_name(surf_charge_ptr->name);
|
||||||
@ -61,7 +65,7 @@ cxxSurfaceCharge::~cxxSurfaceCharge()
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct master *
|
struct master *
|
||||||
cxxSurfaceCharge::get_psi_master()
|
cxxSurfaceCharge::get_psi_master()
|
||||||
{
|
{
|
||||||
struct master *master_ptr = NULL;
|
struct master *master_ptr = NULL;
|
||||||
std::string str = this->name;
|
std::string str = this->name;
|
||||||
|
|||||||
@ -1,19 +1,18 @@
|
|||||||
#if !defined(SURFACECHARGE_H_INCLUDED)
|
#if !defined(SURFACECHARGE_H_INCLUDED)
|
||||||
#define SURFACECHARGE_H_INCLUDED
|
#define SURFACECHARGE_H_INCLUDED
|
||||||
|
|
||||||
#include "NameDouble.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
|
|
||||||
|
#include "NameDouble.h"
|
||||||
|
|
||||||
class cxxSurfaceCharge
|
class cxxSurfaceCharge
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
cxxSurfaceCharge();
|
cxxSurfaceCharge();
|
||||||
cxxSurfaceCharge(struct surface_charge *);
|
cxxSurfaceCharge(struct surface_charge *);
|
||||||
|
|||||||
102
SurfaceComp.cxx
102
SurfaceComp.cxx
@ -4,26 +4,30 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
#include <cassert> // assert
|
||||||
|
#include <algorithm> // std::sort
|
||||||
|
|
||||||
#include "Utils.h" // define first
|
#include "Utils.h" // define first
|
||||||
#include "SurfaceComp.h"
|
#if !defined(PHREEQC_CLASS)
|
||||||
#include "Dictionary.h"
|
|
||||||
#define EXTERNAL extern
|
#define EXTERNAL extern
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "SurfaceComp.h"
|
||||||
|
#include "Dictionary.h"
|
||||||
#include "phqalloc.h"
|
#include "phqalloc.h"
|
||||||
#include "phrqproto.h"
|
#include "phrqproto.h"
|
||||||
#include "output.h"
|
#include "output.h"
|
||||||
#include <cassert> // assert
|
|
||||||
#include <algorithm> // std::sort
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
cxxSurfaceComp::cxxSurfaceComp()
|
cxxSurfaceComp::cxxSurfaceComp()
|
||||||
//
|
//
|
||||||
// default constructor for cxxSurfaceComp
|
// default constructor for cxxSurfaceComp
|
||||||
//
|
//
|
||||||
{
|
{
|
||||||
formula_totals.type = cxxNameDouble::ND_ELT_MOLES;
|
formula_totals.type = cxxNameDouble::ND_ELT_MOLES;
|
||||||
formula_z = 0.0;
|
formula_z = 0.0;
|
||||||
@ -37,10 +41,10 @@ cxxSurfaceComp::cxxSurfaceComp()
|
|||||||
}
|
}
|
||||||
|
|
||||||
cxxSurfaceComp::cxxSurfaceComp(struct surface_comp *surf_comp_ptr)
|
cxxSurfaceComp::cxxSurfaceComp(struct surface_comp *surf_comp_ptr)
|
||||||
//
|
//
|
||||||
// constructor for cxxSurfaceComp from struct surface_comp
|
// constructor for cxxSurfaceComp from struct surface_comp
|
||||||
//
|
//
|
||||||
:
|
:
|
||||||
formula_totals(surf_comp_ptr->formula_totals),
|
formula_totals(surf_comp_ptr->formula_totals),
|
||||||
totals(surf_comp_ptr->totals)
|
totals(surf_comp_ptr->totals)
|
||||||
{
|
{
|
||||||
@ -61,7 +65,7 @@ cxxSurfaceComp::~cxxSurfaceComp()
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct master *
|
struct master *
|
||||||
cxxSurfaceComp::get_master()
|
cxxSurfaceComp::get_master()
|
||||||
{
|
{
|
||||||
struct master *master_ptr = NULL;
|
struct master *master_ptr = NULL;
|
||||||
//for (std::map <char *, double, CHARSTAR_LESS>::iterator it = totals.begin(); it != totals.end(); it++) {
|
//for (std::map <char *, double, CHARSTAR_LESS>::iterator it = totals.begin(); it != totals.end(); it++) {
|
||||||
@ -658,3 +662,77 @@ cxxSurfaceComp::multiply(double extensive)
|
|||||||
//char *rate_name;
|
//char *rate_name;
|
||||||
//double Dw;
|
//double Dw;
|
||||||
}
|
}
|
||||||
|
const std::string &
|
||||||
|
cxxSurfaceComp::get_phase_name() const
|
||||||
|
{
|
||||||
|
return this->phase_name;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
cxxSurfaceComp::set_phase_name(char * f)
|
||||||
|
{
|
||||||
|
if (f != NULL)
|
||||||
|
this->phase_name = std::string(f);
|
||||||
|
else
|
||||||
|
this->phase_name.clear();
|
||||||
|
}
|
||||||
|
const std::string &
|
||||||
|
cxxSurfaceComp::get_rate_name() const
|
||||||
|
{
|
||||||
|
return this->rate_name;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
cxxSurfaceComp::set_rate_name(char * f)
|
||||||
|
{
|
||||||
|
if (f != NULL)
|
||||||
|
this->rate_name = std::string(f);
|
||||||
|
else
|
||||||
|
this->rate_name.clear();
|
||||||
|
}
|
||||||
|
const std::string &
|
||||||
|
cxxSurfaceComp::get_formula() const
|
||||||
|
{
|
||||||
|
return this->formula;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
cxxSurfaceComp::set_formula(char * f)
|
||||||
|
{
|
||||||
|
if (f != NULL)
|
||||||
|
this->formula = std::string(f);
|
||||||
|
else
|
||||||
|
this->formula.clear();
|
||||||
|
}
|
||||||
|
double
|
||||||
|
cxxSurfaceComp::get_charge_balance() const
|
||||||
|
{
|
||||||
|
return this->charge_balance;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
cxxSurfaceComp::set_charge_balance(double d)
|
||||||
|
{
|
||||||
|
this->charge_balance = d;
|
||||||
|
}
|
||||||
|
const cxxNameDouble &
|
||||||
|
cxxSurfaceComp::get_totals() const
|
||||||
|
{
|
||||||
|
return (this->totals);
|
||||||
|
};
|
||||||
|
std::string
|
||||||
|
cxxSurfaceComp::charge_name()
|
||||||
|
{
|
||||||
|
char * str = string_hsave(this->formula.c_str());
|
||||||
|
return (get_charge_name(str));
|
||||||
|
};
|
||||||
|
std::string
|
||||||
|
cxxSurfaceComp::get_charge_name(char *token)
|
||||||
|
{
|
||||||
|
char name[100];
|
||||||
|
int l;
|
||||||
|
char *ptr1 = token;
|
||||||
|
get_elt(&ptr1, name, &l);
|
||||||
|
ptr1 = strchr(name, '_');
|
||||||
|
if (ptr1 != NULL)
|
||||||
|
{
|
||||||
|
ptr1[0] = '\0';
|
||||||
|
}
|
||||||
|
return (std::string(name));
|
||||||
|
};
|
||||||
108
SurfaceComp.h
108
SurfaceComp.h
@ -1,123 +1,47 @@
|
|||||||
#if !defined(SURFACECOMP_H_INCLUDED)
|
#if !defined(SURFACECOMP_H_INCLUDED)
|
||||||
#define SURFACECOMP_H_INCLUDED
|
#define SURFACECOMP_H_INCLUDED
|
||||||
|
|
||||||
#include "NameDouble.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include "phrqproto.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
|
|
||||||
|
#include "NameDouble.h"
|
||||||
|
|
||||||
class cxxSurfaceComp
|
class cxxSurfaceComp
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
cxxSurfaceComp();
|
cxxSurfaceComp();
|
||||||
cxxSurfaceComp(struct surface_comp *);
|
cxxSurfaceComp(struct surface_comp *);
|
||||||
~cxxSurfaceComp();
|
~cxxSurfaceComp();
|
||||||
|
|
||||||
|
|
||||||
struct master *get_master();
|
struct master *get_master();
|
||||||
const std::string &get_phase_name() const
|
const std::string &get_phase_name() const;
|
||||||
{
|
void set_phase_name(char * f);
|
||||||
return this->phase_name;
|
const std::string &get_rate_name() const;
|
||||||
}
|
void set_rate_name(char * f);
|
||||||
void set_phase_name(char * f)
|
const std::string &get_formula() const;
|
||||||
{
|
void set_formula(char * f);
|
||||||
if (f != NULL)
|
double get_charge_balance() const;
|
||||||
this->phase_name = std::string(f);
|
void set_charge_balance(double d);
|
||||||
else
|
|
||||||
this->phase_name.clear();
|
|
||||||
}
|
|
||||||
const std::string &get_rate_name() const
|
|
||||||
{
|
|
||||||
return this->rate_name;
|
|
||||||
}
|
|
||||||
void set_rate_name(char * f)
|
|
||||||
{
|
|
||||||
if (f != NULL)
|
|
||||||
this->rate_name = std::string(f);
|
|
||||||
else
|
|
||||||
this->rate_name.clear();
|
|
||||||
}
|
|
||||||
const std::string &get_formula() const
|
|
||||||
{
|
|
||||||
return this->formula;
|
|
||||||
}
|
|
||||||
void set_formula(char * f)
|
|
||||||
{
|
|
||||||
if (f != NULL)
|
|
||||||
this->formula = std::string(f);
|
|
||||||
else
|
|
||||||
this->formula.clear();
|
|
||||||
}
|
|
||||||
double get_charge_balance() const
|
|
||||||
{
|
|
||||||
return this->charge_balance;
|
|
||||||
}
|
|
||||||
void set_charge_balance(double d)
|
|
||||||
{
|
|
||||||
this->charge_balance = d;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct surface_comp *cxxSurfaceComp2surface_comp(std::map < std::string, cxxSurfaceComp > &el);
|
static struct surface_comp *cxxSurfaceComp2surface_comp(std::map < std::string, cxxSurfaceComp > &el);
|
||||||
|
|
||||||
void dump_xml(std::ostream & os, unsigned int indent = 0) const;
|
void dump_xml(std::ostream & os, unsigned int indent = 0) const;
|
||||||
|
|
||||||
void dump_raw(std::ostream & s_oss, unsigned int indent) const;
|
void dump_raw(std::ostream & s_oss, unsigned int indent) const;
|
||||||
|
|
||||||
void read_raw(CParser & parser, bool check = true);
|
void read_raw(CParser & parser, bool check = true);
|
||||||
const cxxNameDouble & get_totals() const
|
const cxxNameDouble & get_totals() const;
|
||||||
{
|
|
||||||
return (this->totals);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
void add(const cxxSurfaceComp & comp, double extensive);
|
void add(const cxxSurfaceComp & comp, double extensive);
|
||||||
void multiply(double extensive);
|
void multiply(double extensive);
|
||||||
|
std::string charge_name();
|
||||||
std::string charge_name()
|
static std::string get_charge_name(char *token);
|
||||||
{
|
|
||||||
char * str = string_hsave(this->formula.c_str());
|
|
||||||
return (get_charge_name(str));
|
|
||||||
};
|
|
||||||
|
|
||||||
//static std::string &get_charge_name(char *token)
|
|
||||||
//{
|
|
||||||
// char name[100];
|
|
||||||
// int l;
|
|
||||||
// char *ptr1 = token;
|
|
||||||
// get_elt(&ptr1, name, &l);
|
|
||||||
// ptr1 = strchr(name, '_');
|
|
||||||
// if (ptr1 != NULL)
|
|
||||||
// {
|
|
||||||
// ptr1[0] = '\0';
|
|
||||||
// }
|
|
||||||
// return (string_hsave(name));
|
|
||||||
//};
|
|
||||||
static std::string get_charge_name(char *token)
|
|
||||||
{
|
|
||||||
char name[100];
|
|
||||||
int l;
|
|
||||||
char *ptr1 = token;
|
|
||||||
get_elt(&ptr1, name, &l);
|
|
||||||
ptr1 = strchr(name, '_');
|
|
||||||
if (ptr1 != NULL)
|
|
||||||
{
|
|
||||||
ptr1[0] = '\0';
|
|
||||||
}
|
|
||||||
return (std::string(name));
|
|
||||||
};
|
|
||||||
#ifdef USE_MPI
|
#ifdef USE_MPI
|
||||||
void mpi_pack(std::vector < int >&ints, std::vector < double >&doubles);
|
void mpi_pack(std::vector < int >&ints, std::vector < double >&doubles);
|
||||||
void mpi_unpack(int *ints, int *ii, double *doubles, int *dd);
|
void mpi_unpack(int *ints, int *ii, double *doubles, int *dd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string formula;
|
std::string formula;
|
||||||
cxxNameDouble formula_totals;
|
cxxNameDouble formula_totals;
|
||||||
double formula_z;
|
double formula_z;
|
||||||
@ -130,7 +54,7 @@ class cxxSurfaceComp
|
|||||||
double phase_proportion;
|
double phase_proportion;
|
||||||
std::string rate_name;
|
std::string rate_name;
|
||||||
double Dw;
|
double Dw;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
23
System.cxx
23
System.cxx
@ -1,5 +1,26 @@
|
|||||||
#include "System.h"
|
|
||||||
#include <algorithm> // std::replace
|
#include <algorithm> // std::replace
|
||||||
|
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
|
#define EXTERNAL extern
|
||||||
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "System.h"
|
||||||
|
#include "SSassemblage.h"
|
||||||
|
#include "Solution.h"
|
||||||
|
#include "Exchange.h"
|
||||||
|
#include "GasPhase.h"
|
||||||
|
#include "cxxKinetics.h"
|
||||||
|
#include "PPassemblage.h"
|
||||||
|
#include "SSassemblageSS.h"
|
||||||
|
#include "SSassemblage.h"
|
||||||
|
#include "Surface.h"
|
||||||
|
#include "cxxMix.h"
|
||||||
|
#include "Reaction.h"
|
||||||
|
#include "Temperature.h"
|
||||||
|
|
||||||
|
|
||||||
extern void ORCH_write_chemistry_species(std::ostream & chemistry_dat);
|
extern void ORCH_write_chemistry_species(std::ostream & chemistry_dat);
|
||||||
cxxSystem::cxxSystem(void)
|
cxxSystem::cxxSystem(void)
|
||||||
{
|
{
|
||||||
|
|||||||
32
System.h
32
System.h
@ -1,15 +1,27 @@
|
|||||||
#if !defined(SYSTEM_H_INCLUDED)
|
#if !defined(SYSTEM_H_INCLUDED)
|
||||||
#define SYSTEM_H_INCLUDED
|
#define SYSTEM_H_INCLUDED
|
||||||
#include "Solution.h"
|
//#include "Solution.h"
|
||||||
#include "Exchange.h"
|
//#include "Exchange.h"
|
||||||
#include "GasPhase.h"
|
//#include "GasPhase.h"
|
||||||
#include "cxxKinetics.h"
|
//#include "cxxKinetics.h"
|
||||||
#include "PPassemblage.h"
|
//#include "PPassemblage.h"
|
||||||
#include "SSassemblage.h"
|
//#include "SSassemblage.h"
|
||||||
#include "Surface.h"
|
//#include "Surface.h"
|
||||||
#include "cxxMix.h"
|
//#include "cxxMix.h"
|
||||||
#include "Reaction.h"
|
//#include "Reaction.h"
|
||||||
#include "Temperature.h"
|
//#include "Temperature.h"
|
||||||
|
#include "NameDouble.h"
|
||||||
|
class cxxSolution;
|
||||||
|
class cxxExchange;
|
||||||
|
class cxxGasPhase;
|
||||||
|
class cxxKinetics;
|
||||||
|
class cxxPPassemblage;
|
||||||
|
class cxxSSassemblage;
|
||||||
|
class cxxSurface;
|
||||||
|
class cxxReaction;
|
||||||
|
class cxxTemperature;
|
||||||
|
class cxxMix;
|
||||||
|
|
||||||
class cxxSystem
|
class cxxSystem
|
||||||
{
|
{
|
||||||
public:cxxSystem(void);
|
public:cxxSystem(void);
|
||||||
|
|||||||
@ -4,16 +4,22 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Utils.h" // define first
|
|
||||||
#include "Temperature.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include "phqalloc.h"
|
|
||||||
#include "phrqproto.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <algorithm> // std::sort
|
#include <algorithm> // std::sort
|
||||||
|
|
||||||
|
#include "Utils.h" // define first
|
||||||
|
#include "Parser.h"
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
|
#define EXTERNAL extern
|
||||||
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "Temperature.h"
|
||||||
|
#include "phqalloc.h"
|
||||||
|
#include "phrqproto.h"
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@ -1,15 +1,14 @@
|
|||||||
#if !defined(TEMPERATURE_H_INCLUDED)
|
#if !defined(TEMPERATURE_H_INCLUDED)
|
||||||
#define TEMPERATURE_H_INCLUDED
|
#define TEMPERATURE_H_INCLUDED
|
||||||
|
|
||||||
#include "NumKeyword.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
|
|
||||||
|
#include "NumKeyword.h"
|
||||||
|
|
||||||
class cxxTemperature:public cxxNumKeyword
|
class cxxTemperature:public cxxNumKeyword
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -4,17 +4,24 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Utils.h" // define first
|
|
||||||
#include "cxxKinetics.h"
|
|
||||||
#include "KineticsComp.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include "phqalloc.h"
|
|
||||||
#include "phrqproto.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <algorithm> // std::sort
|
#include <algorithm> // std::sort
|
||||||
|
|
||||||
|
#include "Utils.h" // define first
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
|
#define EXTERNAL extern
|
||||||
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "cxxKinetics.h"
|
||||||
|
#include "cxxMix.h"
|
||||||
|
|
||||||
|
#include "phqalloc.h"
|
||||||
|
#include "phrqproto.h"
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@ -1,18 +1,15 @@
|
|||||||
#if !defined(CXXKINETICS_H_INCLUDED)
|
#if !defined(CXXKINETICS_H_INCLUDED)
|
||||||
#define CXXKINETICS_H_INCLUDED
|
#define CXXKINETICS_H_INCLUDED
|
||||||
|
|
||||||
#include "NumKeyword.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
|
|
||||||
#include "char_star.h"
|
#include "NumKeyword.h"
|
||||||
#include "KineticsComp.h"
|
#include "KineticsComp.h"
|
||||||
#include "cxxMix.h"
|
class cxxMix;
|
||||||
|
|
||||||
class cxxKinetics:public cxxNumKeyword
|
class cxxKinetics:public cxxNumKeyword
|
||||||
{
|
{
|
||||||
|
|||||||
20
cxxMix.cxx
20
cxxMix.cxx
@ -4,16 +4,22 @@
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
#pragma warning(disable : 4786) // disable truncation warning (Only used by debugger)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Utils.h" // define first
|
|
||||||
#include "cxxMix.h"
|
|
||||||
#define EXTERNAL extern
|
|
||||||
#include "global.h"
|
|
||||||
#include "phqalloc.h"
|
|
||||||
#include "phrqproto.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <algorithm> // std::sort
|
#include <algorithm> // std::sort
|
||||||
|
|
||||||
|
#include "Utils.h" // define first
|
||||||
|
#include "Parser.h"
|
||||||
|
#if !defined(PHREEQC_CLASS)
|
||||||
|
#define EXTERNAL extern
|
||||||
|
#include "global.h"
|
||||||
|
#else
|
||||||
|
#include "Phreeqc.h"
|
||||||
|
#endif
|
||||||
|
#include "cxxMix.h"
|
||||||
|
#include "phqalloc.h"
|
||||||
|
#include "phrqproto.h"
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Construction/Destruction
|
// Construction/Destruction
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
5
cxxMix.h
5
cxxMix.h
@ -1,16 +1,13 @@
|
|||||||
#if !defined(CXXMIX_H_INCLUDED)
|
#if !defined(CXXMIX_H_INCLUDED)
|
||||||
#define CXXMIX_H_INCLUDED
|
#define CXXMIX_H_INCLUDED
|
||||||
|
|
||||||
#include "NumKeyword.h"
|
|
||||||
//#define EXTERNAL extern
|
|
||||||
//#include "global.h"
|
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <map> // std::map
|
#include <map> // std::map
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
|
|
||||||
#include "char_star.h"
|
#include "NumKeyword.h"
|
||||||
|
|
||||||
class cxxMix:public cxxNumKeyword
|
class cxxMix:public cxxNumKeyword
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
#include "dumper.h"
|
|
||||||
#include <algorithm> // std::replace
|
#include <algorithm> // std::replace
|
||||||
|
|
||||||
|
#include "dumper.h"
|
||||||
|
#include "Parser.h"
|
||||||
|
|
||||||
dumper::dumper(void)
|
dumper::dumper(void)
|
||||||
{
|
{
|
||||||
this->file_name = "dump.out";
|
this->file_name = "dump.out";
|
||||||
|
|||||||
3
dumper.h
3
dumper.h
@ -4,8 +4,9 @@
|
|||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include <list> // std::list
|
#include <list> // std::list
|
||||||
#include <vector> // std::vector
|
#include <vector> // std::vector
|
||||||
#include "Parser.h"
|
|
||||||
#include "StorageBinList.h"
|
#include "StorageBinList.h"
|
||||||
|
class CParser;
|
||||||
|
|
||||||
class dumper
|
class dumper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#include "runner.h"
|
#include "runner.h"
|
||||||
|
#include "Parser.h"
|
||||||
runner::runner(void)
|
runner::runner(void)
|
||||||
{
|
{
|
||||||
this->time_step = 0;
|
this->time_step = 0;
|
||||||
|
|||||||
4
runner.h
4
runner.h
@ -2,8 +2,10 @@
|
|||||||
#define RUNNER_H_INCLUDED
|
#define RUNNER_H_INCLUDED
|
||||||
#include <set> // std::set
|
#include <set> // std::set
|
||||||
#include <string> // std::string
|
#include <string> // std::string
|
||||||
#include "Parser.h"
|
|
||||||
#include "StorageBinList.h"
|
#include "StorageBinList.h"
|
||||||
|
class CParser;
|
||||||
|
|
||||||
class runner
|
class runner
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user