mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 08:38:23 +01:00
Fixing hidden variables in
M src/cxxKinetics.cxx M src/NameDouble.cxx M src/Exchange.cxx M src/ISolution.cxx M src/ISolutionComp.cxx M src/ISolutionComp.h M src/SSassemblage.cxx M src/Solution.cxx M src/GasPhase.cxx M src/PPassemblage.cxx M src/ISolution.h git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@4654 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
261bc0113a
commit
579a283747
10
Exchange.cxx
10
Exchange.cxx
@ -59,10 +59,10 @@ cxxNumKeyword()
|
||||
|
||||
}
|
||||
cxxExchange::cxxExchange(PHREEQC_PTR_ARG_COMMA const std::map < int, cxxExchange > &entities,
|
||||
cxxMix & mix, int n_user):
|
||||
cxxMix & mix, int n_user1):
|
||||
cxxNumKeyword()
|
||||
{
|
||||
this->n_user = this->n_user_end = n_user;
|
||||
this->n_user = this->n_user_end = n_user1;
|
||||
this->pitzer_exchange_gammas = false;
|
||||
//
|
||||
// Mix exchangers
|
||||
@ -92,7 +92,7 @@ cxxNumKeyword()
|
||||
}
|
||||
}
|
||||
|
||||
cxxExchange::cxxExchange(PHREEQC_PTR_ARG_COMMA int n_user)
|
||||
cxxExchange::cxxExchange(PHREEQC_PTR_ARG_COMMA int n_user1)
|
||||
//
|
||||
// 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_user;
|
||||
this->n_user_end = n_user;
|
||||
this->n_user = n_user1;
|
||||
this->n_user_end = n_user1;
|
||||
this->pitzer_exchange_gammas =
|
||||
(P_INSTANCE_POINTER use.exchange_ptr->pitzer_exchange_gammas == TRUE);
|
||||
this->totals.type = cxxNameDouble::ND_ELT_MOLES;
|
||||
|
||||
@ -70,10 +70,10 @@ cxxNumKeyword()
|
||||
}
|
||||
}
|
||||
cxxGasPhase::cxxGasPhase(PHREEQC_PTR_ARG_COMMA const std::map < int, cxxGasPhase > &entities,
|
||||
cxxMix & mix, int n_user):
|
||||
cxxMix & mix, int n_user1):
|
||||
cxxNumKeyword()
|
||||
{
|
||||
this->n_user = this->n_user_end = n_user;
|
||||
this->n_user = this->n_user_end = n_user1;
|
||||
gasPhaseComps.type = cxxNameDouble::ND_NAME_COEF;
|
||||
total_p = 0;
|
||||
volume = 0;
|
||||
|
||||
@ -155,23 +155,23 @@ cxxISolution::ConvertUnits(PHREEQC_PTR_ARG)
|
||||
/*
|
||||
* Convert /kgs to /kgw
|
||||
*/
|
||||
double mass_water;
|
||||
double mass_water1;
|
||||
if ((this->units.find("kgs") != std::string::npos) ||
|
||||
(this->units.find("/l") != std::string::npos))
|
||||
{
|
||||
mass_water = 1.0 - 1e-3 * sum_solutes;
|
||||
mass_water1 = 1.0 - 1e-3 * sum_solutes;
|
||||
for (; iter != this->comps.end(); ++iter)
|
||||
{
|
||||
iter->second.set_moles(iter->second.get_moles() / mass_water);
|
||||
iter->second.set_moles(iter->second.get_moles() / mass_water1);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Scale by mass of water in solution
|
||||
*/
|
||||
mass_water = this->mass_water;
|
||||
mass_water1 = this->mass_water;
|
||||
for (; iter != this->comps.end(); ++iter)
|
||||
{
|
||||
iter->second.set_moles(iter->second.get_moles() * mass_water);
|
||||
iter->second.set_moles(iter->second.get_moles() * mass_water1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
14
ISolution.h
14
ISolution.h
@ -34,23 +34,23 @@ class cxxISolution:public cxxSolution
|
||||
{
|
||||
return this->density;
|
||||
}
|
||||
void set_density(double density)
|
||||
void set_density(double density1)
|
||||
{
|
||||
this->density = density;
|
||||
this->density = density1;
|
||||
}
|
||||
|
||||
std::string get_units() const
|
||||
{
|
||||
return units;
|
||||
}
|
||||
void set_units(std::string units)
|
||||
void set_units(std::string units1)
|
||||
{
|
||||
units = units;
|
||||
units = units1;
|
||||
}
|
||||
void set_units(char * units)
|
||||
void set_units(char * units1)
|
||||
{
|
||||
if (units != NULL)
|
||||
this->units = std::string(units);
|
||||
if (units1 != NULL)
|
||||
this->units = std::string(units1);
|
||||
else
|
||||
this->units.clear();
|
||||
}
|
||||
|
||||
@ -118,8 +118,8 @@ cxxISolutionComp::set_gfw(PHREEQC_PTR_ARG)
|
||||
if (this->as.size() != 0)
|
||||
{
|
||||
/* use given chemical formula to calculate gfw */
|
||||
double gfw;
|
||||
if (P_INSTANCE_POINTER compute_gfw(this->as.c_str(), &gfw) == ERROR)
|
||||
double gfw1;
|
||||
if (P_INSTANCE_POINTER compute_gfw(this->as.c_str(), &gfw1) == 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"))
|
||||
{
|
||||
gfw /= 2.;
|
||||
gfw1 /= 2.;
|
||||
}
|
||||
this->gfw = gfw;
|
||||
this->gfw = gfw1;
|
||||
return;
|
||||
}
|
||||
/* use gfw of master species */
|
||||
|
||||
@ -26,10 +26,10 @@ class cxxISolutionComp
|
||||
{
|
||||
return this->description;
|
||||
}
|
||||
void set_description(char *description)
|
||||
void set_description(char *description1)
|
||||
{
|
||||
if (description != NULL)
|
||||
this->description = std::string(description);
|
||||
if (description1 != NULL)
|
||||
this->description = std::string(description1);
|
||||
else
|
||||
this->description.clear();
|
||||
}
|
||||
|
||||
@ -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 type)
|
||||
cxxNameDouble::ND_TYPE type1)
|
||||
//
|
||||
// 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 = type;
|
||||
this->type = type1;
|
||||
}
|
||||
/*
|
||||
cxxNameDouble::cxxNameDouble(struct name_coef *nc, int count)
|
||||
|
||||
@ -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_user):
|
||||
int n_user1):
|
||||
cxxNumKeyword()
|
||||
{
|
||||
this->n_user = this->n_user_end = n_user;
|
||||
this->n_user = this->n_user_end = n_user1;
|
||||
eltList.type = cxxNameDouble::ND_ELT_MOLES;
|
||||
//
|
||||
// Mix
|
||||
|
||||
@ -53,10 +53,10 @@ cxxNumKeyword()
|
||||
}
|
||||
cxxSSassemblage::cxxSSassemblage(const std::map < int,
|
||||
cxxSSassemblage > &entities, cxxMix & mix,
|
||||
int n_user):
|
||||
int n_user1):
|
||||
cxxNumKeyword()
|
||||
{
|
||||
this->n_user = this->n_user_end = n_user;
|
||||
this->n_user = this->n_user_end = n_user1;
|
||||
//std::list<cxxSSassemblageSS> ssAssemblageSSs;
|
||||
//
|
||||
// Mix
|
||||
|
||||
10
Solution.cxx
10
Solution.cxx
@ -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_user)
|
||||
cxxMix & mix, int n_user1)
|
||||
//
|
||||
// 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_user;
|
||||
this->n_user = this->n_user_end = n_user1;
|
||||
//
|
||||
// Mix solutions
|
||||
//
|
||||
@ -133,7 +133,7 @@ cxxNumKeyword()
|
||||
}
|
||||
}
|
||||
|
||||
cxxSolution::cxxSolution(PHREEQC_PTR_ARG_COMMA int n_user)
|
||||
cxxSolution::cxxSolution(PHREEQC_PTR_ARG_COMMA int n_user1)
|
||||
//
|
||||
// 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_user;
|
||||
this->n_user_end = n_user;
|
||||
this->n_user = n_user1;
|
||||
this->n_user_end = n_user1;
|
||||
this->tc = P_INSTANCE_POINTER tc_x;
|
||||
this->ph = P_INSTANCE_POINTER ph_x;
|
||||
this->pe = P_INSTANCE_POINTER solution_pe_x;
|
||||
|
||||
@ -77,10 +77,10 @@ totals(kinetics_ptr->totals)
|
||||
}
|
||||
}
|
||||
cxxKinetics::cxxKinetics(const std::map < int, cxxKinetics > &entities,
|
||||
cxxMix & mix, int n_user):
|
||||
cxxMix & mix, int n_user1):
|
||||
cxxNumKeyword()
|
||||
{
|
||||
this->n_user = this->n_user_end = n_user;
|
||||
this->n_user = this->n_user_end = n_user1;
|
||||
step_divide = 1.0;
|
||||
rk = 3;
|
||||
bad_step_max = 500;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user