mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 08:38:23 +01:00
Worked through solution removing PHREEQC_PTR_ARG.
More cleaning up to do. git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5653 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
02ab5c208c
commit
62a55134be
11
Phreeqc.h
11
Phreeqc.h
@ -46,6 +46,8 @@ class cxxTemperature;
|
||||
class cxxPPassemblage;
|
||||
class cxxPPassemblageComp;
|
||||
class cxxReaction;
|
||||
class cxxSolution;
|
||||
class cxxSolutionIsotopeList;
|
||||
|
||||
class Phreeqc
|
||||
{
|
||||
@ -1244,9 +1246,7 @@ extern void MergeFinalize(void);
|
||||
|
||||
struct mix * cxxMix2mix(cxxMix *mx);
|
||||
struct kinetics *cxxKinetics2kinetics(cxxKinetics * kin);
|
||||
struct elt_list * cxxNameDouble2elt_list(const cxxNameDouble * nd);
|
||||
struct kinetics_comp * cxxKineticsComp2kinetics_comp(std::list < cxxKineticsComp > * el);
|
||||
struct name_coef * cxxNameDouble2name_coef(const cxxNameDouble * nd);
|
||||
struct exchange * cxxExchange2exchange(cxxExchange * ex);
|
||||
struct exch_comp * cxxExchComp2exch_comp(const std::map < std::string, cxxExchComp > * el);
|
||||
struct master * Get_exch_master(const cxxExchComp * ec);
|
||||
@ -1256,7 +1256,12 @@ struct temperature * cxxTemperature2temperature(const cxxTemperature *temp);
|
||||
struct pp_assemblage * cxxPPassemblage2pp_assemblage(const cxxPPassemblage * pp);
|
||||
struct pure_phase * cxxPPassemblageComp2pure_phase(const std::map < std::string, cxxPPassemblageComp > * ppc);
|
||||
struct irrev * cxxReaction2irrev(const cxxReaction * rxn);
|
||||
|
||||
struct solution * cxxSolution2solution(const cxxSolution * sol);
|
||||
struct isotope * cxxSolutionIsotopeList2isotope(const cxxSolutionIsotopeList * il);
|
||||
struct conc * cxxNameDouble2conc(const cxxNameDouble *nd);
|
||||
struct elt_list * cxxNameDouble2elt_list(const cxxNameDouble * nd);
|
||||
struct name_coef * cxxNameDouble2name_coef(const cxxNameDouble * nd);
|
||||
struct master_activity * cxxNameDouble2master_activity(const cxxNameDouble * nd);
|
||||
/* tally.c */
|
||||
|
||||
void add_all_components_tally(void);
|
||||
|
||||
@ -112,7 +112,8 @@ read_solution_raw(void)
|
||||
|
||||
cxxSolution sol(&phrq_io);
|
||||
sol.read_raw(parser);
|
||||
struct solution *soln_ptr = sol.cxxSolution2solution(PHREEQC_THIS);
|
||||
//struct solution *soln_ptr = sol.cxxSolution2solution(PHREEQC_THIS);
|
||||
struct solution *soln_ptr = cxxSolution2solution(&sol);
|
||||
int n;
|
||||
|
||||
/*
|
||||
@ -1337,7 +1338,8 @@ read_solution_modify(void)
|
||||
|
||||
sol.modify_activities(PHREEQC_THIS_COMMA orig);
|
||||
|
||||
struct solution *soln_ptr = sol.cxxSolution2solution(PHREEQC_THIS);
|
||||
//struct solution *soln_ptr = sol.cxxSolution2solution(PHREEQC_THIS);
|
||||
struct solution *soln_ptr = cxxSolution2solution(&sol);
|
||||
|
||||
/*
|
||||
* This is not quite right, may not produce sort order, forced sort
|
||||
|
||||
@ -137,7 +137,7 @@ isotopes(io)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SKIP_OR_MOVE_TO_STRUCTURES
|
||||
cxxSolution::cxxSolution(PHREEQC_PTR_ARG_COMMA int l_n_user, PHRQ_io * io)
|
||||
//
|
||||
// constructor for cxxSolution from results of calculation
|
||||
@ -278,10 +278,12 @@ isotopes(io)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
cxxSolution::~cxxSolution()
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef MOVE_TO_STRUCTURES
|
||||
struct solution *
|
||||
cxxSolution::cxxSolution2solution(PHREEQC_PTR_ARG)
|
||||
//
|
||||
@ -336,6 +338,7 @@ cxxSolution::cxxSolution2solution(PHREEQC_PTR_ARG)
|
||||
|
||||
return (solution_ptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
cxxSolution::dump_xml(std::ostream & s_oss, unsigned int indent) const
|
||||
|
||||
@ -19,7 +19,7 @@ class cxxSolution:public cxxNumKeyword
|
||||
public:
|
||||
cxxSolution(PHRQ_io *io=NULL);
|
||||
cxxSolution(struct solution *, PHRQ_io *io=NULL);
|
||||
cxxSolution(PHREEQC_PTR_ARG_COMMA int n_user, PHRQ_io *io=NULL);
|
||||
//cxxSolution(PHREEQC_PTR_ARG_COMMA int n_user, PHRQ_io *io=NULL);
|
||||
cxxSolution( const std::map < int, cxxSolution > &solution_map,
|
||||
cxxMix & mx, int n_user, PHRQ_io *io=NULL);
|
||||
~cxxSolution();
|
||||
@ -142,8 +142,13 @@ class cxxSolution:public cxxNumKeyword
|
||||
{
|
||||
return this->master_activity;
|
||||
}
|
||||
const cxxNameDouble & get_species_gamma(void) const
|
||||
{
|
||||
return this->species_gamma;
|
||||
}
|
||||
double get_master_activity(char *string) const;
|
||||
void set_master_activity(char *string, double value);
|
||||
const cxxSolutionIsotopeList & Get_isotopes(void) const {return isotopes;};
|
||||
|
||||
/*
|
||||
double get_species_gamma(char *string)const;
|
||||
@ -153,7 +158,7 @@ class cxxSolution:public cxxNumKeyword
|
||||
void set_isotope(char *string, double value);
|
||||
*/
|
||||
|
||||
struct solution *cxxSolution2solution(PHREEQC_PTR_ARG);
|
||||
//struct solution *cxxSolution2solution(PHREEQC_PTR_ARG);
|
||||
|
||||
void dump_raw(std::ostream & s_oss, unsigned int indent) const;
|
||||
|
||||
|
||||
@ -88,6 +88,7 @@ cxxSolutionIsotopeList::multiply(double extensive)
|
||||
it->total *= extensive;
|
||||
}
|
||||
}
|
||||
#ifdef MOVE_TO_STRUCTURES
|
||||
struct isotope *
|
||||
cxxSolutionIsotopeList::cxxSolutionIsotopeList2isotope(PHREEQC_PTR_ARG)
|
||||
{
|
||||
@ -119,3 +120,4 @@ cxxSolutionIsotopeList::cxxSolutionIsotopeList2isotope(PHREEQC_PTR_ARG)
|
||||
}
|
||||
return (iso);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1001,7 +1001,8 @@ cxxStorageBin::cxxStorageBin2phreeqc(PHREEQC_PTR_ARG_COMMA int n)
|
||||
std::map < int, cxxSolution >::iterator it = this->Solutions.find(n);
|
||||
if (it != this->Solutions.end())
|
||||
{
|
||||
P_INSTANCE_POINTER solution[0] = (it->second).cxxSolution2solution(P_INSTANCE);
|
||||
//P_INSTANCE_POINTER solution[0] = (it->second).cxxSolution2solution(P_INSTANCE);
|
||||
P_INSTANCE_POINTER solution[0] = P_INSTANCE_POINTER cxxSolution2solution(&(it->second));
|
||||
P_INSTANCE_POINTER solution[0]->n_user = n;
|
||||
P_INSTANCE_POINTER solution[0]->n_user_end = n;
|
||||
P_INSTANCE_POINTER count_solution++;
|
||||
@ -1256,7 +1257,8 @@ cxxStorageBin::cxxStorageBin2system(PHREEQC_PTR_ARG_COMMA int n)
|
||||
|
||||
if (this->getSolution(n) != NULL)
|
||||
{
|
||||
system_ptr->solution = (this->getSolution(n))->cxxSolution2solution(P_INSTANCE);
|
||||
//system_ptr->solution = (this->getSolution(n))->cxxSolution2solution(P_INSTANCE);
|
||||
system_ptr->solution = P_INSTANCE_POINTER cxxSolution2solution(this->getSolution(n));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user