Renaming SSassemblageSS to SS and cxxSS

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@6019 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2012-01-10 19:14:07 +00:00
parent f085546091
commit cbd736da15
7 changed files with 41 additions and 41 deletions

View File

@ -46,7 +46,7 @@ class cxxReaction;
class cxxSolution;
class cxxSolutionIsotopeList;
class cxxSSassemblage;
class cxxSSassemblageSS;
class cxxSS;
class cxxSurface;
class cxxSurfaceCharge;
class cxxSurfaceComp;
@ -1115,7 +1115,7 @@ public:
struct solution * cxxSolution2solution(const cxxSolution * sol);
struct isotope * cxxSolutionIsotopeList2isotope(const cxxSolutionIsotopeList * il);
struct ss_assemblage * cxxSSassemblage2s_s_assemblage(const cxxSSassemblage * ss);
struct s_s * cxxSSassemblageSS2s_s(const std::map < std::string, cxxSSassemblageSS > * sscomp);
struct s_s * cxxSSassemblageSS2s_s(const std::map < std::string, cxxSS > * sscomp);
struct surface * cxxSurface2surface(const cxxSurface * surf);
struct surface_comp * cxxSurfaceComp2surface_comp(const std::map < std::string, cxxSurfaceComp > * sc);
struct surface_charge * cxxSurfaceCharge2surface_charge(const std::map < std::string, cxxSurfaceCharge > * s_ch);

30
SS.cxx
View File

@ -1,4 +1,4 @@
// SSassemblageSS.cxx: implementation of the cxxSSassemblageSS class.
// SSassemblageSS.cxx: implementation of the cxxSS class.
//
//////////////////////////////////////////////////////////////////////
#ifdef _DEBUG
@ -8,7 +8,7 @@
#include <algorithm> // std::sort
#include "Utils.h" // define first
#include "SSassemblageSS.h"
#include "SS.h"
//#include "Dictionary.h"
#include "phqalloc.h"
@ -18,11 +18,11 @@
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
cxxSSassemblageSS::cxxSSassemblageSS(PHRQ_io *io)
cxxSS::cxxSS(PHRQ_io *io)
:
PHRQ_base(io)
//
// default constructor for cxxSSassemblageSS
// default constructor for cxxSS
//
{
//total_moles = 0;
@ -39,10 +39,10 @@ PHRQ_base(io)
//double p[4];
}
cxxSSassemblageSS::cxxSSassemblageSS(struct s_s *s_s_ptr, PHRQ_io *io)
cxxSS::cxxSS(struct s_s *s_s_ptr, PHRQ_io *io)
:
PHRQ_base(io) //
// constructor for cxxSSassemblageSS from struct s_s
// constructor for cxxSS from struct s_s
//
{
this->Set_name(s_s_ptr->name);
@ -69,13 +69,13 @@ PHRQ_base(io) //
}
}
cxxSSassemblageSS::~cxxSSassemblageSS()
cxxSS::~cxxSS()
{
}
#ifdef SKIP
void
cxxSSassemblageSS::dump_xml(std::ostream & s_oss, unsigned int indent) const const
cxxSS::dump_xml(std::ostream & s_oss, unsigned int indent) const const
{
//const char ERR_MESSAGE[] = "Packing s_s message: %s, element not found\n";
unsigned int i;
@ -104,7 +104,7 @@ cxxSSassemblageSS::dump_xml(std::ostream & s_oss, unsigned int indent) const con
}
#endif
void
cxxSSassemblageSS::dump_raw(std::ostream & s_oss, unsigned int indent) const
cxxSS::dump_raw(std::ostream & s_oss, unsigned int indent) const
{
//const char ERR_MESSAGE[] = "Packing s_s message: %s, element not found\n";
unsigned int i;
@ -132,7 +132,7 @@ cxxSSassemblageSS::dump_raw(std::ostream & s_oss, unsigned int indent) const
}
void
cxxSSassemblageSS::read_raw(CParser & parser, bool check)
cxxSS::read_raw(CParser & parser, bool check)
{
std::string str;
@ -420,7 +420,7 @@ cxxSSassemblageSS::read_raw(CParser & parser, bool check)
#ifdef USE_MPI
void
cxxSSassemblageSS::mpi_pack(std::vector < int >&ints,
cxxSS::mpi_pack(std::vector < int >&ints,
std::vector < double >&doubles)
{
extern cxxDictionary dictionary;
@ -436,7 +436,7 @@ cxxSSassemblageSS::mpi_pack(std::vector < int >&ints,
}
void
cxxSSassemblageSS::mpi_unpack(int *ints, int *ii, double *doubles, int *dd)
cxxSS::mpi_unpack(int *ints, int *ii, double *doubles, int *dd)
{
extern cxxDictionary dictionary;
int i = *ii;
@ -456,7 +456,7 @@ cxxSSassemblageSS::mpi_unpack(int *ints, int *ii, double *doubles, int *dd)
#endif
void
cxxSSassemblageSS::totalize(PHREEQC_PTR_ARG)
cxxSS::totalize(PHREEQC_PTR_ARG)
{
this->totals.clear();
// component structures
@ -480,7 +480,7 @@ cxxSSassemblageSS::totalize(PHREEQC_PTR_ARG)
}
void
cxxSSassemblageSS::add(const cxxSSassemblageSS & addee, double extensive)
cxxSS::add(const cxxSS & addee, double extensive)
{
if (extensive == 0.0)
return;
@ -499,7 +499,7 @@ cxxSSassemblageSS::add(const cxxSSassemblageSS & addee, double extensive)
}
void
cxxSSassemblageSS::multiply(double extensive)
cxxSS::multiply(double extensive)
{
//char *name;
//cxxNameDouble comps;

10
SS.h
View File

@ -9,13 +9,13 @@
#include "NameDouble.h"
#include "Phreeqc_class.h"
class cxxSSassemblageSS: public PHRQ_base
class cxxSS: public PHRQ_base
{
public:
cxxSSassemblageSS(PHRQ_io *io=NULL);
cxxSSassemblageSS(struct s_s *, PHRQ_io *io=NULL);
~cxxSSassemblageSS();
cxxSS(PHRQ_io *io=NULL);
cxxSS(struct s_s *, PHRQ_io *io=NULL);
~cxxSS();
enum SS_PARAMETER_TYPE
{
@ -65,7 +65,7 @@ class cxxSSassemblageSS: public PHRQ_base
void mpi_unpack(int *ints, int *ii, double *doubles, int *dd);
#endif
void add(const cxxSSassemblageSS & comp, double extensive);
void add(const cxxSS & comp, double extensive);
void multiply(double extensive);
double Get_a0() const {return (this->a0);};
double Get_a1() const {return (this->a1);};

View File

@ -11,7 +11,7 @@
#include "Utils.h" // define first
#include "Phreeqc.h"
#include "SSassemblage.h"
#include "SSassemblageSS.h"
#include "SS.h"
#include "cxxMix.h"
#include "phqalloc.h"
@ -41,7 +41,7 @@ cxxNumKeyword(io)
n_user_end = s_s_assemblage_ptr->n_user_end;
for (i = 0; i < s_s_assemblage_ptr->count_s_s; i++)
{
cxxSSassemblageSS ssSS(&(s_s_assemblage_ptr->s_s[i]), this->Get_io());
cxxSS ssSS(&(s_s_assemblage_ptr->s_s[i]), this->Get_io());
std::string str(ssSS.Get_name());
ssAssemblageSSs[str] = ssSS;
}
@ -52,7 +52,7 @@ cxxSSassemblage::cxxSSassemblage(const std::map < int,
cxxNumKeyword(io)
{
this->n_user = this->n_user_end = l_n_user;
//std::list<cxxSSassemblageSS> ssAssemblageSSs;
//std::list<cxxSS> ssAssemblageSSs;
//
// Mix
//
@ -98,7 +98,7 @@ cxxSSassemblage::dump_xml(std::ostream & s_oss, unsigned int indent) const const
// ssAssemblageSSs
s_oss << indent1;
s_oss << "<pure_phases " << "\n";
for (std::list < cxxSSassemblageSS >::const_iterator it =
for (std::list < cxxSS >::const_iterator it =
ssAssemblageSSs.begin(); it != ssAssemblageSSs.end(); ++it)
{
it->dump_xml(s_oss, indent + 2);
@ -125,7 +125,7 @@ cxxSSassemblage::dump_raw(std::ostream & s_oss, unsigned int indent, int *n_out)
s_oss << "SOLID_SOLUTIONS_RAW " << n_user_local << " " << this->description << "\n";
// ssAssemblageSSs
for (std::map < std::string, cxxSSassemblageSS >::const_iterator it =
for (std::map < std::string, cxxSS >::const_iterator it =
ssAssemblageSSs.begin(); it != ssAssemblageSSs.end(); ++it)
{
s_oss << indent1;
@ -188,7 +188,7 @@ cxxSSassemblage::read_raw(CParser & parser, bool check)
case 0: // solid_solution
{
cxxSSassemblageSS ec(this->Get_io());
cxxSS ec(this->Get_io());
// preliminary read
parser.set_accumulate(true);
@ -200,12 +200,12 @@ cxxSSassemblage::read_raw(CParser & parser, bool check)
reread.set_echo_stream(CParser::EO_NONE);
if (this->ssAssemblageSSs.find(ec.Get_name()) != this->ssAssemblageSSs.end())
{
cxxSSassemblageSS & ec1 = this->ssAssemblageSSs.find(ec.Get_name())->second;
cxxSS & ec1 = this->ssAssemblageSSs.find(ec.Get_name())->second;
ec1.read_raw(reread, false);
}
else
{
cxxSSassemblageSS ec1(this->Get_io());
cxxSS ec1(this->Get_io());
ec1.read_raw(reread, false);
std::string str(ec1.Get_name());
this->ssAssemblageSSs[str] = ec1;
@ -229,7 +229,7 @@ cxxSSassemblage::mpi_pack(std::vector < int >&ints,
/* int n_user; */
ints.push_back(this->n_user);
ints.push_back((int) this->ssAssemblageSSs.size());
for (std::map < std::string, cxxSSassemblageSS >::iterator it =
for (std::map < std::string, cxxSS >::iterator it =
this->ssAssemblageSSs.begin(); it != this->ssAssemblageSSs.end();
it++)
{
@ -253,7 +253,7 @@ cxxSSassemblage::mpi_unpack(int *ints, int *ii, double *doubles, int *dd)
this->ssAssemblageSSs.clear();
for (int n = 0; n < count; n++)
{
cxxSSassemblageSS ssc;
cxxSS ssc;
ssc.mpi_unpack(ints, &i, doubles, &d);
std::string str(ssc.get_name());
this->ssAssemblageSSs[str] = ssc;
@ -268,7 +268,7 @@ cxxSSassemblage::totalize(PHREEQC_PTR_ARG)
{
this->totals.clear();
// component structures
for (std::map < std::string, cxxSSassemblageSS >::iterator it =
for (std::map < std::string, cxxSS >::iterator it =
ssAssemblageSSs.begin(); it != ssAssemblageSSs.end(); ++it)
{
(*it).second.totalize(P_INSTANCE);
@ -285,11 +285,11 @@ cxxSSassemblage::add(const cxxSSassemblage & addee, double extensive)
if (extensive == 0.0)
return;
for (std::map < std::string, cxxSSassemblageSS >::const_iterator itadd =
for (std::map < std::string, cxxSS >::const_iterator itadd =
addee.ssAssemblageSSs.begin(); itadd != addee.ssAssemblageSSs.end();
++itadd)
{
std::map < std::string, cxxSSassemblageSS >::iterator it =
std::map < std::string, cxxSS >::iterator it =
this->ssAssemblageSSs.find((*itadd).first);
if (it != this->ssAssemblageSSs.end())
{
@ -297,7 +297,7 @@ cxxSSassemblage::add(const cxxSSassemblage & addee, double extensive)
}
else
{
cxxSSassemblageSS entity = (*itadd).second;
cxxSS entity = (*itadd).second;
entity.multiply(extensive);
std::string str(entity.Get_name());
this->ssAssemblageSSs[str] = entity;

View File

@ -12,7 +12,7 @@
#include "NameDouble.h"
#include "Phreeqc_class.h"
class cxxSSassemblageSS;
class cxxSS;
//#include "cxxMix.h"
class cxxMix;
@ -32,7 +32,7 @@ public:
void dump_raw(std::ostream & s_oss, unsigned int indent, int *n_out=NULL) const;
void read_raw(CParser & parser, bool check = true);
const std::map <std::string, cxxSSassemblageSS > & Get_ssAssemblageSSs() const
const std::map <std::string, cxxSS > & Get_ssAssemblageSSs() const
{
return this->ssAssemblageSSs;
};
@ -53,7 +53,7 @@ protected:
void add(const cxxSSassemblage & addee, double extensive);
protected:
std::map < std::string, cxxSSassemblageSS > ssAssemblageSSs;
std::map < std::string, cxxSS > ssAssemblageSSs;
cxxNameDouble totals;
};

View File

@ -23,7 +23,7 @@
#include "GasPhase.h"
#include "cxxKinetics.h"
#include "PPassemblage.h"
#include "SSassemblageSS.h"
#include "SS.h"
#include "SSassemblage.h"
#include "Surface.h"
#include "cxxMix.h"

View File

@ -8,7 +8,7 @@
#include "GasPhase.h"
#include "cxxKinetics.h"
#include "PPassemblage.h"
#include "SSassemblageSS.h"
#include "SS.h"
#include "SSassemblage.h"
#include "Surface.h"
#include "cxxMix.h"