Redid modifications for hidden variables using l_ prefix.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@4674 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2010-07-21 00:18:01 +00:00
parent 053c817df8
commit 4b31197710
14 changed files with 79 additions and 80 deletions

View File

@ -59,10 +59,10 @@ cxxNumKeyword()
}
cxxExchange::cxxExchange(PHREEQC_PTR_ARG_COMMA const std::map < int, cxxExchange > &entities,
cxxMix & mix, int n_user1):
cxxMix & mix, int l_n_user):
cxxNumKeyword()
{
this->n_user = this->n_user_end = n_user1;
this->n_user = this->n_user_end = l_n_user;
this->pitzer_exchange_gammas = false;
//
// Mix exchangers
@ -92,7 +92,7 @@ cxxNumKeyword()
}
}
cxxExchange::cxxExchange(PHREEQC_PTR_ARG_COMMA int n_user1)
cxxExchange::cxxExchange(PHREEQC_PTR_ARG_COMMA int l_n_user)
//
// constructor for cxxExchange from reaction calculation
// equivalent of xexchange_save
@ -105,8 +105,8 @@ cxxNumKeyword()
int i;
//this->set_description(exchange_ptr->description);
this->n_user = n_user1;
this->n_user_end = n_user1;
this->n_user = l_n_user;
this->n_user_end = l_n_user;
this->pitzer_exchange_gammas =
(P_INSTANCE_POINTER use.exchange_ptr->pitzer_exchange_gammas == TRUE);
this->totals.type = cxxNameDouble::ND_ELT_MOLES;

View File

@ -70,10 +70,10 @@ cxxNumKeyword()
}
}
cxxGasPhase::cxxGasPhase(PHREEQC_PTR_ARG_COMMA const std::map < int, cxxGasPhase > &entities,
cxxMix & mix, int n_user1):
cxxMix & mix, int l_n_user):
cxxNumKeyword()
{
this->n_user = this->n_user_end = n_user1;
this->n_user = this->n_user_end = l_n_user;
gasPhaseComps.type = cxxNameDouble::ND_NAME_COEF;
total_p = 0;
volume = 0;

View File

@ -155,23 +155,23 @@ cxxISolution::ConvertUnits(PHREEQC_PTR_ARG)
/*
* Convert /kgs to /kgw
*/
double mass_water1;
double l_mass_water;
if ((this->units.find("kgs") != std::string::npos) ||
(this->units.find("/l") != std::string::npos))
{
mass_water1 = 1.0 - 1e-3 * sum_solutes;
l_mass_water = 1.0 - 1e-3 * sum_solutes;
for (; iter != this->comps.end(); ++iter)
{
iter->second.set_moles(iter->second.get_moles() / mass_water1);
iter->second.set_moles(iter->second.get_moles() / l_mass_water);
}
}
/*
* Scale by mass of water in solution
*/
mass_water1 = this->mass_water;
l_mass_water = this->mass_water;
for (; iter != this->comps.end(); ++iter)
{
iter->second.set_moles(iter->second.get_moles() * mass_water1);
iter->second.set_moles(iter->second.get_moles() * l_mass_water);
}
}

View File

@ -34,23 +34,23 @@ class cxxISolution:public cxxSolution
{
return this->density;
}
void set_density(double density1)
void set_density(double l_density)
{
this->density = density1;
this->density = l_density;
}
std::string get_units() const
{
return units;
}
void set_units(std::string units1)
void set_units(std::string l_units)
{
units = units1;
units = l_units;
}
void set_units(char * units1)
void set_units(char * l_units)
{
if (units1 != NULL)
this->units = std::string(units1);
if (l_units != NULL)
this->units = std::string(l_units);
else
this->units.clear();
}

View File

@ -118,8 +118,8 @@ cxxISolutionComp::set_gfw(PHREEQC_PTR_ARG)
if (this->as.size() != 0)
{
/* use given chemical formula to calculate gfw */
double gfw1;
if (P_INSTANCE_POINTER compute_gfw(this->as.c_str(), &gfw1) == ERROR)
double l_gfw;
if (P_INSTANCE_POINTER compute_gfw(this->as.c_str(), &l_gfw) == ERROR)
{
std::ostringstream oss;
oss << "Could not compute gfw, " << this->as;
@ -131,9 +131,9 @@ cxxISolutionComp::set_gfw(PHREEQC_PTR_ARG)
if (strcmp(this->description.c_str(), "Alkalinity") == 0
&& strcmp(this->as.c_str(), "CaCO3"))
{
gfw1 /= 2.;
l_gfw /= 2.;
}
this->gfw = gfw1;
this->gfw = l_gfw;
return;
}
/* use gfw of master species */

View File

@ -26,10 +26,10 @@ class cxxISolutionComp
{
return this->description;
}
void set_description(char *description1)
void set_description(char *l_description)
{
if (description1 != NULL)
this->description = std::string(description1);
if (l_description != NULL)
this->description = std::string(l_description);
else
this->description.clear();
}
@ -38,28 +38,28 @@ class cxxISolutionComp
{
return this->moles;
}
void set_moles(double moles1)
void set_moles(double l_moles)
{
this->moles = moles1;
this->moles = l_moles;
}
double get_input_conc() const
{
return this->input_conc;
}
void set_input_conc(double input_conc1)
void set_input_conc(double l_input_conc)
{
this->input_conc = input_conc1;
this->input_conc = l_input_conc;
}
std::string get_units()const
{
return this->units;
}
void set_units(char *units1)
void set_units(char *l_units)
{
if (units1 != NULL)
this->units = std::string(units1);
if (l_units != NULL)
this->units = std::string(l_units);
else
this->units.clear();
}
@ -68,10 +68,10 @@ class cxxISolutionComp
{
return this->equation_name;
}
void set_equation_name(char *equation_name1)
void set_equation_name(char *l_equation_name)
{
if (equation_name1 != NULL)
this->equation_name = std::string(equation_name1);
if (l_equation_name != NULL)
this->equation_name = std::string(l_equation_name);
else
this->equation_name.clear();
@ -81,28 +81,28 @@ class cxxISolutionComp
{
return this->phase_si;
}
void set_phase_si(int phase_si1)
void set_phase_si(int l_phase_si)
{
this->phase_si = phase_si1;
this->phase_si = l_phase_si;
}
int get_n_pe() const
{
return this->n_pe;
}
void set_n_pe(int n_pe1)
void set_n_pe(int l_n_pe)
{
this->n_pe = n_pe1;
this->n_pe = l_n_pe;
}
const std::string &get_as() const
{
return this->as;
}
void set_as(char *as1)
void set_as(char *l_as)
{
if (as1 != NULL)
this->as = std::string(as1);
if (l_as != NULL)
this->as = std::string(l_as);
else
this->as.clear();
}
@ -112,9 +112,9 @@ class cxxISolutionComp
{
return this->gfw;
};
void set_gfw(double gfw1)
void set_gfw(double l_gfw)
{
this->gfw = gfw1;
this->gfw = l_gfw;
}
void set_gfw(PHREEQC_PTR_ARG);

View File

@ -100,7 +100,7 @@ cxxNameDouble::cxxNameDouble(struct conc *tots)
this->type = ND_ELT_MOLES;
}
cxxNameDouble::cxxNameDouble(struct master_activity *ma, int count,
cxxNameDouble::ND_TYPE type1)
cxxNameDouble::ND_TYPE l_type)
//
// constructor for cxxNameDouble from list of elt_list
//
@ -112,7 +112,7 @@ cxxNameDouble::cxxNameDouble(struct master_activity *ma, int count,
continue;
(*this)[ma[i].description] = ma[i].la;
}
this->type = type1;
this->type = l_type;
}
/*
cxxNameDouble::cxxNameDouble(struct name_coef *nc, int count)

View File

@ -55,10 +55,10 @@ eltList(pp_assemblage_ptr->next_elt)
}
cxxPPassemblage::cxxPPassemblage(PHREEQC_PTR_ARG_COMMA const std::map < int,
cxxPPassemblage > &entities, cxxMix & mix,
int n_user1):
int l_n_user):
cxxNumKeyword()
{
this->n_user = this->n_user_end = n_user1;
this->n_user = this->n_user_end = l_n_user;
eltList.type = cxxNameDouble::ND_ELT_MOLES;
//
// Mix

View File

@ -11,7 +11,6 @@
#include <iostream> // std::cout std::cerr
#include "Utils.h"
#include <stdio.h>
#include <stdlib.h>
#if defined (PHREEQC_CLASS)
#include "Phreeqc.h"
#endif
@ -62,7 +61,7 @@ m_next_keyword(KT_NONE)
echo_stream = EO_NONE;
accumulate = false;
#if defined(PHREEQC_CLASS)
this->p_instance = p_instance1;
this->p_instance = p_instance;
#endif
}

View File

@ -53,10 +53,10 @@ cxxNumKeyword()
}
cxxSSassemblage::cxxSSassemblage(const std::map < int,
cxxSSassemblage > &entities, cxxMix & mix,
int n_user1):
int l_n_user):
cxxNumKeyword()
{
this->n_user = this->n_user_end = n_user1;
this->n_user = this->n_user_end = l_n_user;
//std::list<cxxSSassemblageSS> ssAssemblageSSs;
//
// Mix

View File

@ -96,7 +96,7 @@ species_gamma(solution_ptr->species_gamma, solution_ptr->count_species_gamma,
cxxSolution::cxxSolution(PHREEQC_PTR_ARG_COMMA const std::map < int, cxxSolution > &solutions,
cxxMix & mix, int n_user1)
cxxMix & mix, int l_n_user)
//
// constructor for cxxSolution from mixture of solutions
//
@ -108,7 +108,7 @@ cxxNumKeyword()
// Zero out solution data
//
this->zero();
this->n_user = this->n_user_end = n_user1;
this->n_user = this->n_user_end = l_n_user;
//
// Mix solutions
//
@ -133,7 +133,7 @@ cxxNumKeyword()
}
}
cxxSolution::cxxSolution(PHREEQC_PTR_ARG_COMMA int n_user1)
cxxSolution::cxxSolution(PHREEQC_PTR_ARG_COMMA int l_n_user)
//
// constructor for cxxSolution from results of calculation
// does not work in phast because phast uses only the total molalities
@ -143,8 +143,8 @@ cxxNumKeyword()
{
//this->set_description none;
this->n_user = n_user1;
this->n_user_end = n_user1;
this->n_user = l_n_user;
this->n_user_end = l_n_user;
this->tc = P_INSTANCE_POINTER tc_x;
this->ph = P_INSTANCE_POINTER ph_x;
this->pe = P_INSTANCE_POINTER solution_pe_x;

View File

@ -29,9 +29,9 @@ class cxxSolution:public cxxNumKeyword
{
return this->tc;
}
void set_tc(double tc1)
void set_tc(double l_tc)
{
this->tc = tc1;
this->tc = l_tc;
}
double get_ph() const
@ -47,72 +47,72 @@ class cxxSolution:public cxxNumKeyword
{
return this->pe;
}
void set_pe(double pe1)
void set_pe(double l_pe)
{
this->pe = pe1;
this->pe = l_pe;
}
double get_mu() const
{
return this->mu;
}
void set_mu(double mu1)
void set_mu(double l_mu)
{
this->mu = mu1;
this->mu = l_mu;
}
double get_ah2o() const
{
return this->ah2o;
}
void set_ah2o(double ah2o1)
void set_ah2o(double l_ah2o)
{
this->ah2o = ah2o1;
this->ah2o = l_ah2o;
}
double get_total_h() const
{
return this->total_h;
}
void set_total_h(double total_h1)
void set_total_h(double l_total_h)
{
this->total_h = total_h1;
this->total_h = l_total_h;
}
double get_total_o() const
{
return this->total_o;
}
void set_total_o(double total_o1)
void set_total_o(double l_total_o)
{
this->total_o = total_o1;
this->total_o = l_total_o;
}
double get_cb() const
{
return this->cb;
}
void set_cb(double cb1)
void set_cb(double l_cb)
{
this->cb = cb1;
this->cb = l_cb;
}
double get_mass_water() const
{
return this->mass_water;
}
void set_mass_water(long double mass_water1)
void set_mass_water(long double l_mass_water)
{
this->mass_water = mass_water1;
this->mass_water = l_mass_water;
}
double get_total_alkalinity() const
{
return this->total_alkalinity;
}
void set_total_alkalinity(double total_alkalinity1)
void set_total_alkalinity(double l_total_alkalinity)
{
this->total_alkalinity = total_alkalinity1;
this->total_alkalinity = l_total_alkalinity;
}
double get_total(char *string) const;

View File

@ -83,10 +83,10 @@ cxxNumKeyword()
}
}
cxxSurface::cxxSurface(PHREEQC_PTR_ARG_COMMA const std::map < int, cxxSurface > &entities,
cxxMix & mix, int n_user1):
cxxMix & mix, int l_n_user):
cxxNumKeyword()
{
this->n_user = this->n_user_end = n_user1;
this->n_user = this->n_user_end = l_n_user;
type = DDL;
dl_type = NO_DL;
sites_units = SITES_ABSOLUTE;

View File

@ -77,10 +77,10 @@ totals(kinetics_ptr->totals)
}
}
cxxKinetics::cxxKinetics(const std::map < int, cxxKinetics > &entities,
cxxMix & mix, int n_user1):
cxxMix & mix, int l_n_user):
cxxNumKeyword()
{
this->n_user = this->n_user_end = n_user1;
this->n_user = this->n_user_end = l_n_user;
step_divide = 1.0;
rk = 3;
bad_step_max = 500;