mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 16:44:49 +01:00
Finished ss_assemblage rename.
Added Use class git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@6020 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
cbd736da15
commit
4f0fb6c928
@ -245,7 +245,7 @@ size_t Phreeqc::list_components(std::list<std::string> &list_c)
|
||||
}
|
||||
|
||||
// solid-solutions
|
||||
for (i = 0; i < count_s_s_assemblage; i++)
|
||||
for (i = 0; i < count_ss_assemblage; i++)
|
||||
{
|
||||
cxxSSassemblage entity(&ss_assemblage[i]);
|
||||
entity.totalize(this);
|
||||
@ -334,7 +334,7 @@ void Phreeqc::init(void)
|
||||
max_surface = MAX_PP_ASSEMBLAGE;
|
||||
//max_gas_phase = MAX_PP_ASSEMBLAGE;
|
||||
max_kinetics = MAX_PP_ASSEMBLAGE;
|
||||
max_s_s_assemblage = MAX_PP_ASSEMBLAGE;
|
||||
max_ss_assemblage = MAX_PP_ASSEMBLAGE;
|
||||
|
||||
max_elements = MAX_ELEMENTS;
|
||||
max_elts = MAX_ELTS;
|
||||
@ -354,7 +354,7 @@ void Phreeqc::init(void)
|
||||
count_surface = 0;
|
||||
//count_gas_phase = 0;
|
||||
count_kinetics = 0;
|
||||
count_s_s_assemblage = 0;
|
||||
count_ss_assemblage = 0;
|
||||
|
||||
count_elements = 0;
|
||||
//count_irrev = 0;
|
||||
@ -669,7 +669,7 @@ void Phreeqc::init(void)
|
||||
copy_pp_assemblage.n_user = copy_pp_assemblage.start = copy_pp_assemblage.end = 0;
|
||||
copy_exchange.n_user = copy_exchange.start = copy_exchange.end = 0;
|
||||
copy_surface.n_user = copy_surface.start = copy_surface.end = 0;
|
||||
copy_s_s_assemblage.n_user = copy_s_s_assemblage.start = copy_s_s_assemblage.end = 0;
|
||||
copy_ss_assemblage.n_user = copy_ss_assemblage.start = copy_ss_assemblage.end = 0;
|
||||
copy_gas_phase.n_user = copy_gas_phase.start = copy_gas_phase.end = 0;
|
||||
copy_kinetics.n_user = copy_kinetics.start = copy_kinetics.end = 0;
|
||||
copy_mix.n_user = copy_mix.start = copy_mix.end = 0;
|
||||
|
||||
64
Phreeqc.h
64
Phreeqc.h
@ -132,7 +132,7 @@ public:
|
||||
int system_total_solids(cxxExchange *exchange_ptr,
|
||||
cxxPPassemblage *pp_assemblage_ptr,
|
||||
cxxGasPhase *gas_phase_ptr,
|
||||
struct ss_assemblage *s_s_assemblage_ptr,
|
||||
struct ss_assemblage *ss_assemblage_ptr,
|
||||
struct surface *surface_ptr);
|
||||
|
||||
static LDBLE f_rho(LDBLE rho_old, void *cookie);
|
||||
@ -417,7 +417,7 @@ public:
|
||||
int xexchange_save(int n_user);
|
||||
int xgas_save(int n_user);
|
||||
int xpp_assemblage_save(int n_user);
|
||||
int xs_s_assemblage_save(int n_user);
|
||||
int xss_assemblage_save(int n_user);
|
||||
int xsurface_save(int n_user);
|
||||
int do_initialize(void);
|
||||
int do_status(void);
|
||||
@ -543,7 +543,7 @@ public:
|
||||
int build_min_exch(void);
|
||||
int build_model(void);
|
||||
int build_pure_phases(void);
|
||||
int build_s_s_assemblage(void);
|
||||
int build_ss_assemblage(void);
|
||||
int build_solution_phase_boundaries(void);
|
||||
int build_species_list(int n);
|
||||
int build_min_surface(void);
|
||||
@ -578,7 +578,7 @@ public:
|
||||
int setup_pure_phases(void);
|
||||
int adjust_setup_pure_phases(void);
|
||||
int setup_related_surface(void);
|
||||
int setup_s_s_assemblage(void);
|
||||
int setup_ss_assemblage(void);
|
||||
int setup_solution(void);
|
||||
int adjust_setup_solution(void);
|
||||
int setup_surface(void);
|
||||
@ -627,7 +627,7 @@ public:
|
||||
int print_kinetics(void);
|
||||
int print_mix(void);
|
||||
int print_pp_assemblage(void);
|
||||
int print_s_s_assemblage(void);
|
||||
int print_ss_assemblage(void);
|
||||
int print_saturation_indices(void);
|
||||
int print_surface_cd_music(void);
|
||||
int print_totals(void);
|
||||
@ -639,7 +639,7 @@ public:
|
||||
int punch_molalities(void);
|
||||
int punch_activities(void);
|
||||
int punch_pp_assemblage(void);
|
||||
int punch_s_s_assemblage(void);
|
||||
int punch_ss_assemblage(void);
|
||||
int punch_saturation_indices(void);
|
||||
int punch_totals(void);
|
||||
int punch_user_punch(void);
|
||||
@ -774,7 +774,7 @@ public:
|
||||
int dump_mix(int k);
|
||||
int dump_pp_assemblage(int k);
|
||||
int dump_reaction(int k);
|
||||
int dump_s_s_assemblage(int k);
|
||||
int dump_ss_assemblage(int k);
|
||||
int dump_solution(int k);
|
||||
int dump_surface(int k);
|
||||
int dump_cpp(void);
|
||||
@ -833,7 +833,7 @@ public:
|
||||
// LDBLE step_fraction);
|
||||
int add_reaction(cxxReaction *reaction_ptr, int step_number,
|
||||
LDBLE step_fraction);
|
||||
int add_s_s_assemblage(struct ss_assemblage *s_s_assemblage_ptr);
|
||||
int add_ss_assemblage(struct ss_assemblage *ss_assemblage_ptr);
|
||||
int add_solution(struct solution *solution_ptr, LDBLE extensive,
|
||||
LDBLE intensive);
|
||||
int add_surface(struct surface *surface_ptr);
|
||||
@ -845,7 +845,7 @@ public:
|
||||
//int reaction_calc(struct irrev *irrev_ptr);
|
||||
int reaction_calc(cxxReaction *reaction_ptr);
|
||||
int solution_check(void);
|
||||
int s_s_assemblage_check(struct ss_assemblage *s_s_assemblage_ptr);
|
||||
int ss_assemblage_check(struct ss_assemblage *ss_assemblage_ptr);
|
||||
|
||||
// structures.cpp -------------------------------
|
||||
int clean_up(void);
|
||||
@ -969,30 +969,30 @@ protected:
|
||||
struct species *s_search(const char *name);
|
||||
struct species *s_store(const char *name, LDBLE z, int replace_if_found);
|
||||
public:
|
||||
struct ss_assemblage *s_s_assemblage_alloc(void);
|
||||
struct ss_assemblage *s_s_assemblage_bsearch(int k, int *n);
|
||||
struct ss_assemblage *ss_assemblage_alloc(void);
|
||||
struct ss_assemblage *ss_assemblage_bsearch(int k, int *n);
|
||||
protected:
|
||||
static int s_s_assemblage_compare(const void *ptr1, const void *ptr2);
|
||||
static int ss_assemblage_compare(const void *ptr1, const void *ptr2);
|
||||
public:
|
||||
int s_s_assemblage_copy(struct ss_assemblage *s_s_assemblage_old_ptr,
|
||||
struct ss_assemblage *s_s_assemblage_new_ptr,
|
||||
int ss_assemblage_copy(struct ss_assemblage *ss_assemblage_old_ptr,
|
||||
struct ss_assemblage *ss_assemblage_new_ptr,
|
||||
int n_user_new);
|
||||
protected:
|
||||
int s_s_assemblage_copy_to_last(int n, int n_user);
|
||||
int s_s_assemblage_duplicate(int n_user_old, int n_user_new);
|
||||
int s_s_assemblage_delete(int n_user_old);
|
||||
int ss_assemblage_copy_to_last(int n, int n_user);
|
||||
int ss_assemblage_duplicate(int n_user_old, int n_user_new);
|
||||
int ss_assemblage_delete(int n_user_old);
|
||||
public:
|
||||
int s_s_assemblage_free(struct ss_assemblage *s_s_assemblage_ptr);
|
||||
int ss_assemblage_free(struct ss_assemblage *ss_assemblage_ptr);
|
||||
protected:
|
||||
int s_s_assemblage_init(struct ss_assemblage *s_s_assemblage_ptr,
|
||||
int ss_assemblage_init(struct ss_assemblage *ss_assemblage_ptr,
|
||||
int n_user, int n_user_end, char *description);
|
||||
int s_s_assemblage_ptr_to_user(struct ss_assemblage *s_s_assemblage_ptr_old,
|
||||
int ss_assemblage_ptr_to_user(struct ss_assemblage *ss_assemblage_ptr_old,
|
||||
int n_user_new);
|
||||
struct ss_assemblage *s_s_assemblage_replicate(struct ss_assemblage
|
||||
*s_s_assemblage_old_ptr,
|
||||
struct ss_assemblage *ss_assemblage_replicate(struct ss_assemblage
|
||||
*ss_assemblage_old_ptr,
|
||||
int n_user_new);
|
||||
struct ss_assemblage *s_s_assemblage_search(int n_user, int *n);
|
||||
int s_s_assemblage_sort(void);
|
||||
struct ss_assemblage *ss_assemblage_search(int n_user, int *n);
|
||||
int ss_assemblage_sort(void);
|
||||
static int s_s_compare(const void *ptr1, const void *ptr2);
|
||||
struct save_values *save_values_bsearch(struct save_values *k, int *n);
|
||||
static int save_values_compare(const void *ptr1, const void *ptr2);
|
||||
@ -1083,7 +1083,7 @@ public:
|
||||
struct species *s_alloc(void);
|
||||
int s_free(struct species *s_ptr);
|
||||
int s_init(struct species *s_ptr);
|
||||
static int s_s_assemblage_compare_int(const void *ptr1, const void *ptr2);
|
||||
static int ss_assemblage_compare_int(const void *ptr1, const void *ptr2);
|
||||
static int solution_compare(const void *ptr1, const void *ptr2);
|
||||
static int solution_compare_int(const void *ptr1, const void *ptr2);
|
||||
static int species_list_compare(const void *ptr1, const void *ptr2);
|
||||
@ -1114,7 +1114,7 @@ public:
|
||||
//struct irrev * cxxReaction2irrev(const cxxReaction * rxn);
|
||||
struct solution * cxxSolution2solution(const cxxSolution * sol);
|
||||
struct isotope * cxxSolutionIsotopeList2isotope(const cxxSolutionIsotopeList * il);
|
||||
struct ss_assemblage * cxxSSassemblage2s_s_assemblage(const cxxSSassemblage * ss);
|
||||
struct ss_assemblage * cxxSSassemblage2ss_assemblage(const cxxSSassemblage * ss);
|
||||
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);
|
||||
@ -1188,7 +1188,7 @@ public:
|
||||
int tidy_phases(void);
|
||||
int tidy_pp_assemblage(void);
|
||||
int tidy_solutions(void);
|
||||
int tidy_s_s_assemblage(void);
|
||||
int tidy_ss_assemblage(void);
|
||||
int tidy_species(void);
|
||||
int tidy_surface(void);
|
||||
int scan(LDBLE f(LDBLE x, void *), LDBLE * xx0, LDBLE * xx1);
|
||||
@ -1371,7 +1371,7 @@ protected:
|
||||
struct copier copy_pp_assemblage;
|
||||
struct copier copy_exchange;
|
||||
struct copier copy_surface;
|
||||
struct copier copy_s_s_assemblage;
|
||||
struct copier copy_ss_assemblage;
|
||||
struct copier copy_gas_phase;
|
||||
struct copier copy_kinetics;
|
||||
struct copier copy_mix;
|
||||
@ -1406,8 +1406,8 @@ protected:
|
||||
* Solid solution
|
||||
*---------------------------------------------------------------------- */
|
||||
|
||||
int count_s_s_assemblage;
|
||||
int max_s_s_assemblage;
|
||||
int count_ss_assemblage;
|
||||
int max_ss_assemblage;
|
||||
struct ss_assemblage *ss_assemblage;
|
||||
/*----------------------------------------------------------------------
|
||||
* Pure-phase assemblage
|
||||
@ -1554,7 +1554,7 @@ protected:
|
||||
*---------------------------------------------------------------------- */
|
||||
int new_model, new_exchange, new_pp_assemblage, new_surface,
|
||||
new_reaction, new_temperature, new_mix, new_solution, new_gas_phase,
|
||||
new_inverse, new_punch, new_s_s_assemblage, new_kinetics, new_copy,
|
||||
new_inverse, new_punch, new_ss_assemblage, new_kinetics, new_copy,
|
||||
new_pitzer;
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
@ -1908,7 +1908,7 @@ public:
|
||||
N_Vector kinetics_y, kinetics_abstol;
|
||||
void *kinetics_cvode_mem;
|
||||
//struct pp_assemblage *cvode_pp_assemblage_save;
|
||||
struct ss_assemblage *cvode_s_s_assemblage_save;
|
||||
struct ss_assemblage *cvode_ss_assemblage_save;
|
||||
cxxPPassemblage *cvode_pp_assemblage_save;
|
||||
LDBLE *m_original;
|
||||
LDBLE *m_temp;
|
||||
|
||||
@ -456,35 +456,35 @@ read_solid_solutions_raw(void)
|
||||
|
||||
cxxSSassemblage ex;
|
||||
ex.read_raw(parser);
|
||||
//struct ss_assemblage *s_s_assemblage_ptr = ex.cxxSSassemblage2s_s_assemblage(PHREEQC_THIS);
|
||||
struct ss_assemblage *s_s_assemblage_ptr = cxxSSassemblage2s_s_assemblage(&ex);
|
||||
//struct ss_assemblage *ss_assemblage_ptr = ex.cxxSSassemblage2ss_assemblage(PHREEQC_THIS);
|
||||
struct ss_assemblage *ss_assemblage_ptr = cxxSSassemblage2ss_assemblage(&ex);
|
||||
int n;
|
||||
|
||||
/*
|
||||
* This is not quite right, may not produce sort order, forced sort
|
||||
*/
|
||||
|
||||
if (s_s_assemblage_bsearch(s_s_assemblage_ptr->n_user, &n) != NULL)
|
||||
if (ss_assemblage_bsearch(ss_assemblage_ptr->n_user, &n) != NULL)
|
||||
{
|
||||
s_s_assemblage_free(&ss_assemblage[n]);
|
||||
s_s_assemblage_copy(s_s_assemblage_ptr, &ss_assemblage[n],
|
||||
s_s_assemblage_ptr->n_user);
|
||||
ss_assemblage_free(&ss_assemblage[n]);
|
||||
ss_assemblage_copy(ss_assemblage_ptr, &ss_assemblage[n],
|
||||
ss_assemblage_ptr->n_user);
|
||||
}
|
||||
else
|
||||
{
|
||||
n = count_s_s_assemblage++;
|
||||
if (count_s_s_assemblage >= max_s_s_assemblage)
|
||||
n = count_ss_assemblage++;
|
||||
if (count_ss_assemblage >= max_ss_assemblage)
|
||||
{
|
||||
space((void **) ((void *) &(ss_assemblage)),
|
||||
count_s_s_assemblage, &max_s_s_assemblage,
|
||||
count_ss_assemblage, &max_ss_assemblage,
|
||||
sizeof(struct ss_assemblage));
|
||||
}
|
||||
s_s_assemblage_copy(s_s_assemblage_ptr, &ss_assemblage[n],
|
||||
s_s_assemblage_ptr->n_user);
|
||||
s_s_assemblage_sort();
|
||||
ss_assemblage_copy(ss_assemblage_ptr, &ss_assemblage[n],
|
||||
ss_assemblage_ptr->n_user);
|
||||
ss_assemblage_sort();
|
||||
}
|
||||
s_s_assemblage_free(s_s_assemblage_ptr);
|
||||
free_check_null(s_s_assemblage_ptr);
|
||||
ss_assemblage_free(ss_assemblage_ptr);
|
||||
free_check_null(ss_assemblage_ptr);
|
||||
|
||||
// Need to output the next keyword
|
||||
if (return_value == KEYWORD) echo_msg(sformatf( "\t%s\n", line));
|
||||
@ -977,7 +977,7 @@ read_solid_solutions_modify(void)
|
||||
parser.set_echo_file(CParser::EO_NOKEYWORDS);
|
||||
}
|
||||
|
||||
if (s_s_assemblage_bsearch(n_user, &n) == NULL)
|
||||
if (ss_assemblage_bsearch(n_user, &n) == NULL)
|
||||
{
|
||||
input_error++;
|
||||
error_string = sformatf( "Solid_solutions %d not found for SOLID_SOLUTIONS_MODIFY.\n", n_user);
|
||||
@ -990,13 +990,13 @@ read_solid_solutions_modify(void)
|
||||
entity.read_raw(parser, false);
|
||||
|
||||
// save entity
|
||||
//struct ss_assemblage *entity_ptr = entity.cxxSSassemblage2s_s_assemblage(PHREEQC_THIS);
|
||||
struct ss_assemblage *entity_ptr = cxxSSassemblage2s_s_assemblage(&entity);
|
||||
s_s_assemblage_free(&(ss_assemblage[n]));
|
||||
s_s_assemblage_copy(entity_ptr, &(ss_assemblage[n]), entity_ptr->n_user);
|
||||
//struct ss_assemblage *entity_ptr = entity.cxxSSassemblage2ss_assemblage(PHREEQC_THIS);
|
||||
struct ss_assemblage *entity_ptr = cxxSSassemblage2ss_assemblage(&entity);
|
||||
ss_assemblage_free(&(ss_assemblage[n]));
|
||||
ss_assemblage_copy(entity_ptr, &(ss_assemblage[n]), entity_ptr->n_user);
|
||||
free_check_null(ss_assemblage[n].description);
|
||||
ss_assemblage[n].description = string_duplicate(entity_ptr->description);
|
||||
s_s_assemblage_free(entity_ptr);
|
||||
ss_assemblage_free(entity_ptr);
|
||||
free_check_null(entity_ptr);
|
||||
|
||||
// Need to output the next keyword
|
||||
@ -1184,7 +1184,7 @@ delete_entities(void)
|
||||
!delete_info.Get_pp_assemblage().Get_defined() &&
|
||||
!delete_info.Get_exchange().Get_defined() &&
|
||||
!delete_info.Get_surface().Get_defined() &&
|
||||
!delete_info.Get_s_s_assemblage().Get_defined() &&
|
||||
!delete_info.Get_ss_assemblage().Get_defined() &&
|
||||
!delete_info.Get_gas_phase().Get_defined() &&
|
||||
!delete_info.Get_kinetics().Get_defined() &&
|
||||
!delete_info.Get_mix().Get_defined() &&
|
||||
@ -1297,24 +1297,24 @@ delete_entities(void)
|
||||
}
|
||||
}
|
||||
|
||||
// s_s_assemblages
|
||||
if (delete_info.Get_s_s_assemblage().Get_defined())
|
||||
// ss_assemblages
|
||||
if (delete_info.Get_ss_assemblage().Get_defined())
|
||||
{
|
||||
if (delete_info.Get_s_s_assemblage().Get_numbers().size() == 0)
|
||||
if (delete_info.Get_ss_assemblage().Get_numbers().size() == 0)
|
||||
{
|
||||
for (i = 0; i < count_s_s_assemblage; i++)
|
||||
for (i = 0; i < count_ss_assemblage; i++)
|
||||
{
|
||||
s_s_assemblage_delete(ss_assemblage[i].n_user);
|
||||
ss_assemblage_delete(ss_assemblage[i].n_user);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::set < int >::iterator it;
|
||||
for (it = delete_info.Get_s_s_assemblage().Get_numbers().begin(); it != delete_info.Get_s_s_assemblage().Get_numbers().end(); it++)
|
||||
for (it = delete_info.Get_ss_assemblage().Get_numbers().begin(); it != delete_info.Get_ss_assemblage().Get_numbers().end(); it++)
|
||||
{
|
||||
if (s_s_assemblage_bsearch(*it, &n) != NULL)
|
||||
if (ss_assemblage_bsearch(*it, &n) != NULL)
|
||||
{
|
||||
s_s_assemblage_delete(*it);
|
||||
ss_assemblage_delete(*it);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1773,12 +1773,12 @@ dump_ostream(std::ostream& os)
|
||||
}
|
||||
}
|
||||
|
||||
// s_s_assemblages
|
||||
if (dump_info.Get_bool_s_s_assemblage())
|
||||
// ss_assemblages
|
||||
if (dump_info.Get_bool_ss_assemblage())
|
||||
{
|
||||
if (dump_info.Get_s_s_assemblage().size() == 0)
|
||||
if (dump_info.Get_ss_assemblage().size() == 0)
|
||||
{
|
||||
for (i = 0; i < count_s_s_assemblage; i++)
|
||||
for (i = 0; i < count_ss_assemblage; i++)
|
||||
{
|
||||
cxxSSassemblage cxxentity(&ss_assemblage[i]);
|
||||
cxxentity.dump_raw(os,0);
|
||||
@ -1787,10 +1787,10 @@ dump_ostream(std::ostream& os)
|
||||
else
|
||||
{
|
||||
std::set < int >::iterator it;
|
||||
for (it = dump_info.Get_s_s_assemblage().begin(); it != dump_info.Get_s_s_assemblage().end(); it++)
|
||||
for (it = dump_info.Get_ss_assemblage().begin(); it != dump_info.Get_ss_assemblage().end(); it++)
|
||||
{
|
||||
|
||||
if (s_s_assemblage_bsearch(*it, &n) != NULL)
|
||||
if (ss_assemblage_bsearch(*it, &n) != NULL)
|
||||
{
|
||||
cxxSSassemblage cxxentity(&ss_assemblage[n]);
|
||||
cxxentity.dump_raw(os,0);
|
||||
|
||||
@ -28,7 +28,7 @@ cxxSSassemblage::cxxSSassemblage(PHRQ_io * io)
|
||||
{
|
||||
}
|
||||
|
||||
cxxSSassemblage::cxxSSassemblage(struct ss_assemblage * s_s_assemblage_ptr, PHRQ_io * io)
|
||||
cxxSSassemblage::cxxSSassemblage(struct ss_assemblage * ss_assemblage_ptr, PHRQ_io * io)
|
||||
//
|
||||
// constructor for cxxSSassemblage from struct SSassemblage
|
||||
//
|
||||
@ -36,12 +36,12 @@ cxxSSassemblage::cxxSSassemblage(struct ss_assemblage * s_s_assemblage_ptr, PHRQ
|
||||
cxxNumKeyword(io)
|
||||
{
|
||||
int i;
|
||||
this->Set_description(s_s_assemblage_ptr->description);
|
||||
n_user = s_s_assemblage_ptr->n_user;
|
||||
n_user_end = s_s_assemblage_ptr->n_user_end;
|
||||
for (i = 0; i < s_s_assemblage_ptr->count_s_s; i++)
|
||||
this->Set_description(ss_assemblage_ptr->description);
|
||||
n_user = ss_assemblage_ptr->n_user;
|
||||
n_user_end = ss_assemblage_ptr->n_user_end;
|
||||
for (i = 0; i < ss_assemblage_ptr->count_s_s; i++)
|
||||
{
|
||||
cxxSS ssSS(&(s_s_assemblage_ptr->s_s[i]), this->Get_io());
|
||||
cxxSS ssSS(&(ss_assemblage_ptr->s_s[i]), this->Get_io());
|
||||
std::string str(ssSS.Get_name());
|
||||
ssAssemblageSSs[str] = ssSS;
|
||||
}
|
||||
|
||||
16
Solution.cxx
16
Solution.cxx
@ -1635,7 +1635,7 @@ cxxSolution::Update(const cxxNameDouble &nd)
|
||||
// kinetics_free(kinetics_ptr);
|
||||
// free_check_null(kinetics_ptr);
|
||||
// }
|
||||
// for (i = 0; i < count_s_s_assemblage; i++)
|
||||
// for (i = 0; i < count_ss_assemblage; i++)
|
||||
// {
|
||||
// if (ss_assemblage[i].new_def != TRUE)
|
||||
// {
|
||||
@ -1659,13 +1659,13 @@ cxxSolution::Update(const cxxNameDouble &nd)
|
||||
//
|
||||
// ex1.read_raw(cparser);
|
||||
//
|
||||
// struct ss_assemblage *s_s_assemblage_ptr =
|
||||
// ex1.cxxSSassemblage2s_s_assemblage();
|
||||
// s_s_assemblage_free(&ss_assemblage[i]);
|
||||
// s_s_assemblage_copy(s_s_assemblage_ptr, &ss_assemblage[i],
|
||||
// s_s_assemblage_ptr->n_user);
|
||||
// s_s_assemblage_free(s_s_assemblage_ptr);
|
||||
// free_check_null(s_s_assemblage_ptr);
|
||||
// struct ss_assemblage *ss_assemblage_ptr =
|
||||
// ex1.cxxSSassemblage2ss_assemblage();
|
||||
// ss_assemblage_free(&ss_assemblage[i]);
|
||||
// ss_assemblage_copy(ss_assemblage_ptr, &ss_assemblage[i],
|
||||
// ss_assemblage_ptr->n_user);
|
||||
// ss_assemblage_free(ss_assemblage_ptr);
|
||||
// free_check_null(ss_assemblage_ptr);
|
||||
//
|
||||
// }
|
||||
//
|
||||
|
||||
@ -1017,9 +1017,9 @@ cxxStorageBin::cxxStorageBin2system(PHREEQC_PTR_ARG_COMMA int n)
|
||||
if (this->getSSassemblage(n) != NULL)
|
||||
{
|
||||
//system_ptr->ss_assemblage =
|
||||
// (this->getSSassemblage(n))->cxxSSassemblage2s_s_assemblage(P_INSTANCE);
|
||||
// (this->getSSassemblage(n))->cxxSSassemblage2ss_assemblage(P_INSTANCE);
|
||||
system_ptr->ss_assemblage =
|
||||
P_INSTANCE_POINTER cxxSSassemblage2s_s_assemblage((this->getSSassemblage(n)));
|
||||
P_INSTANCE_POINTER cxxSSassemblage2ss_assemblage((this->getSSassemblage(n)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1473,10 +1473,10 @@ cxxStorageBin::Set_System(struct Use *use_ptr)
|
||||
}
|
||||
}
|
||||
// ss_assemblage
|
||||
if (use_ptr->s_s_assemblage_ptr != NULL)
|
||||
if (use_ptr->ss_assemblage_ptr != NULL)
|
||||
{
|
||||
std::map < int, cxxSSassemblage >::iterator it =
|
||||
this->SSassemblages.find(use_ptr->n_s_s_assemblage_user);
|
||||
this->SSassemblages.find(use_ptr->n_ss_assemblage_user);
|
||||
if (it != this->SSassemblages.end())
|
||||
{
|
||||
this->system.Set_SSassemblage(&(it->second));
|
||||
|
||||
@ -211,7 +211,7 @@ bool StorageBinList::Read(CParser & parser)
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
item = &(this->Get_s_s_assemblage());
|
||||
item = &(this->Get_ss_assemblage());
|
||||
break;
|
||||
case 8:
|
||||
item = &(this->Get_gas_phase());
|
||||
|
||||
@ -37,7 +37,7 @@ public:
|
||||
StorageBinListItem & Get_pp_assemblage(void) { return(this->pp_assemblage); };
|
||||
StorageBinListItem & Get_exchange(void) { return(this->exchange); };
|
||||
StorageBinListItem & Get_surface(void) { return(this->surface); };
|
||||
StorageBinListItem & Get_s_s_assemblage(void) { return(this->ss_assemblage); };
|
||||
StorageBinListItem & Get_ss_assemblage(void) { return(this->ss_assemblage); };
|
||||
StorageBinListItem & Get_gas_phase(void) { return(this->gas_phase); };
|
||||
StorageBinListItem & Get_kinetics(void) { return(this->kinetics); };
|
||||
StorageBinListItem & Get_mix(void) { return(this->mix); };
|
||||
|
||||
69
Use.cpp
Normal file
69
Use.cpp
Normal file
@ -0,0 +1,69 @@
|
||||
#include <stdio.h>
|
||||
#include "Use.h"
|
||||
|
||||
Use::Use()
|
||||
{
|
||||
solution_in = false;
|
||||
n_solution_user = -999;
|
||||
n_solution = -999;
|
||||
solution_ptr = NULL;
|
||||
|
||||
pp_assemblage_in = false;
|
||||
n_pp_assemblage_user = -999;
|
||||
pp_assemblage_ptr = NULL;
|
||||
|
||||
mix_in = false;
|
||||
n_mix_user = -999;
|
||||
mix_ptr = NULL;
|
||||
n_mix_user_orig = -999;
|
||||
|
||||
reaction_in = false;
|
||||
n_reaction_user = -999;
|
||||
reaction_ptr = NULL;
|
||||
|
||||
exchange_in = false;
|
||||
n_exchange_user = -999;
|
||||
exchange_ptr = NULL;
|
||||
|
||||
kinetics_in = false;
|
||||
n_kinetics_user = -999;
|
||||
n_kinetics = -999;
|
||||
kinetics *kinetics_ptr = NULL;
|
||||
|
||||
surface_in = false;
|
||||
n_surface_user = -999;
|
||||
n_surface = -999;
|
||||
surface_ptr = NULL;
|
||||
|
||||
pressure_in = false;
|
||||
n_pressure_user = -999;
|
||||
pressure_ptr = NULL;
|
||||
|
||||
temperature_in = false;
|
||||
n_temperature_user = -999;
|
||||
temperature_ptr = NULL;
|
||||
|
||||
inverse_in = false;
|
||||
n_inverse_user = -999;
|
||||
n_inverse = -999;
|
||||
inverse *inverse_ptr = NULL;
|
||||
|
||||
gas_phase_in = false;
|
||||
n_gas_phase_user = -999;
|
||||
gas_phase_ptr = NULL;
|
||||
|
||||
ss_assemblage_in = false;
|
||||
n_ss_assemblage_user = -999;
|
||||
n_ss_assemblage = -999;
|
||||
ss_assemblage *ss_assemblage_ptr = NULL;
|
||||
|
||||
trans_in = false;
|
||||
advect_in = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Use::~Use(void)
|
||||
{
|
||||
}
|
||||
|
||||
168
Use.h
Normal file
168
Use.h
Normal file
@ -0,0 +1,168 @@
|
||||
#if !defined(USE_H_INCLUDED)
|
||||
#define USE_H_INCLUDED
|
||||
class cxxPPassemblage;
|
||||
class cxxMix;
|
||||
class cxxReaction;
|
||||
class cxxExchange;
|
||||
class cxxGasPhase;
|
||||
class cxxPressure;
|
||||
class cxxTemperature;
|
||||
|
||||
class Use
|
||||
{
|
||||
public:
|
||||
Use();
|
||||
virtual ~Use(void);
|
||||
|
||||
bool Get_solution_in(void) const {return this->solution_in;}
|
||||
bool Get_pp_assemblage_in(void) const {return this->pp_assemblage_in;}
|
||||
bool Get_mix_in(void) const {return this->mix_in;}
|
||||
bool Get_reaction_in(void) const {return this->reaction_in;}
|
||||
bool Get_exchange_in(void) const {return this->exchange_in;}
|
||||
bool Get_kinetics_in(void) const {return this->kinetics_in;}
|
||||
bool Get_surface_in(void) const {return this->surface_in;}
|
||||
bool Get_pressure_in(void) const {return this->pressure_in;}
|
||||
bool Get_temperature_in(void) const {return this->temperature_in;}
|
||||
bool Get_gas_phase_in(void) const {return this->gas_phase_in;}
|
||||
bool Get_inverse_in(void) const {return this->inverse_in;}
|
||||
bool Get_ss_assemblage_in(void) const {return this->ss_assemblage_in;}
|
||||
|
||||
void Set_solution_in(bool tf) {solution_in = tf;}
|
||||
void Set_pp_assemblage_in(bool tf) {pp_assemblage_in = tf;}
|
||||
void Set_mix_in(bool tf) {mix_in = tf;}
|
||||
void Set_reaction_in(bool tf) {reaction_in = tf;}
|
||||
void Set_exchange_in(bool tf) {exchange_in = tf;}
|
||||
void Set_kinetics_in(bool tf) {kinetics_in = tf;}
|
||||
void Set_surface_in(bool tf) {surface_in = tf;}
|
||||
void Set_pressure_in(bool tf) {pressure_in = tf;}
|
||||
void Set_temperature_in(bool tf) {temperature_in = tf;}
|
||||
void Set_gas_phase_in(bool tf) {gas_phase_in = tf;}
|
||||
void Set_inverse_in(bool tf) {inverse_in = tf;}
|
||||
void Set_ss_assemblage_in(bool tf) {ss_assemblage_in = tf;}
|
||||
|
||||
int Get_n_solution_user(void) const {return n_solution_user;}
|
||||
int Get_n_pp_assemblage_user(void) const {return n_pp_assemblage_user;}
|
||||
int Get_n_mix_user(void) const {return n_mix_user;}
|
||||
int Get_n_reaction_user(void) const {return n_reaction_user;}
|
||||
int Get_n_exchange_user(void) const {return n_exchange_user;}
|
||||
int Get_n_kinetics_user(void) const {return n_kinetics_user;}
|
||||
int Get_n_surface_user(void) const {return n_surface_user;}
|
||||
int Get_n_pressure_user(void) const {return n_pressure_user;}
|
||||
int Get_n_temperature_user(void) const {return n_temperature_user;}
|
||||
int Get_n_gas_phase_user(void) const {return n_gas_phase_user;}
|
||||
int Get_n_inverse_user(void) const {return n_inverse_user;}
|
||||
int Get_n_ss_assemblage_user(void) const {return n_ss_assemblage_user;}
|
||||
|
||||
void Set_n_solution_user(int i) {n_solution_user = i;}
|
||||
void Set_n_pp_assemblage_user(int i) {n_pp_assemblage_user = i;}
|
||||
void Set_n_mix_user(int i) {n_mix_user = i;}
|
||||
void Set_n_reaction_user(int i) {n_reaction_user = i;}
|
||||
void Set_n_exchange_user(int i) {n_exchange_user = i;}
|
||||
void Set_n_kinetics_user(int i) {n_kinetics_user = i;}
|
||||
void Set_n_surface_user(int i) {n_surface_user = i;}
|
||||
void Set_n_pressure_user(int i) {n_pressure_user = i;}
|
||||
void Set_n_temperature_user(int i) {n_temperature_user = i;}
|
||||
void Set_n_gas_phase_user(int i) {n_gas_phase_user = i;}
|
||||
void Set_n_inverse_user(int i) {n_inverse_user = i;}
|
||||
void Set_n_ss_assemblage_user(int i) {n_ss_assemblage_user = i;}
|
||||
|
||||
int Get_n_solution(void) const {return n_solution;}
|
||||
//int Get_n_mix(void) const {return n_mix;}
|
||||
int Get_n_kinetics(void) const {return n_kinetics;}
|
||||
int Get_n_surface(void) const {return n_surface;}
|
||||
int Get_n_inverse(void) const {return n_inverse;}
|
||||
int Get_n_ss_assemblage(void) const {return n_ss_assemblage;}
|
||||
|
||||
void Set_n_solution(int i) {n_solution = i;}
|
||||
//void Set_n_mix(int i) {n_mix = i;}
|
||||
void Set_n_kinetics(int i) {n_kinetics = i;}
|
||||
void Set_n_surface(int i) {n_surface = i;}
|
||||
void Set_n_inverse(int i) {n_inverse = i;}
|
||||
void Set_n_ss_assemblage(int i) {n_ss_assemblage = i;}
|
||||
|
||||
struct solution * Get_solution_ptr(void) const {return this->solution_ptr;}
|
||||
cxxPPassemblage * Get_pp_assemblage_ptr(void) const {return this->pp_assemblage_ptr;}
|
||||
cxxMix * Get_mix_ptr(void) const {return this->mix_ptr;}
|
||||
cxxReaction * Get_reaction_ptr(void) const {return this->reaction_ptr;}
|
||||
cxxExchange * Get_exchange_ptr(void) const {return this->exchange_ptr;}
|
||||
struct kinetics * Get_kinetics_ptr(void) const {return this->kinetics_ptr;}
|
||||
struct surface * Get_surface_ptr(void) const {return this->surface_ptr;}
|
||||
cxxPressure * Get_pressure_ptr(void) const {return this->pressure_ptr;}
|
||||
cxxTemperature * Get_temperature_ptr(void) const {return this->temperature_ptr;}
|
||||
cxxGasPhase * Get_gas_phase_ptr(void) const {return this->gas_phase_ptr;}
|
||||
struct inverse * Get_inverse_ptr(void) const {return this->inverse_ptr;}
|
||||
struct ss_assemblage * Get_ss_assemblage_ptr(void) const {return this->ss_assemblage_ptr;}
|
||||
|
||||
void Set_solution_ptr(struct solution * p) {this->solution_ptr = p;}
|
||||
void Set_pp_assemblage_ptr(cxxPPassemblage * p) {this->pp_assemblage_ptr = p;}
|
||||
void Set_mix_ptr(cxxMix * p) {this->mix_ptr = p;}
|
||||
void Set_reaction_ptr(cxxReaction * p) {this->reaction_ptr = p;}
|
||||
void Set_exchange_ptr(cxxExchange * p) {this->exchange_ptr = p;}
|
||||
void Set_kinetics_ptr(struct kinetics * p) {this->kinetics_ptr = p;}
|
||||
void Set_surface_ptr(struct surface * p) {this->surface_ptr = p;}
|
||||
void Set_pressure_ptr(cxxPressure * p) {this->pressure_ptr = p;}
|
||||
void Set_temperature_ptr(cxxTemperature * p) {this->temperature_ptr = p;}
|
||||
void Set_gas_phase_ptr(cxxGasPhase * p) {this->gas_phase_ptr = p;}
|
||||
void Set_inverse_ptr(struct inverse * p) {this->inverse_ptr = p;}
|
||||
void Set_ss_assemblage_ptr(struct ss_assemblage * p) {this->ss_assemblage_ptr = p;}
|
||||
|
||||
protected:
|
||||
bool solution_in;
|
||||
int n_solution_user;
|
||||
int n_solution;
|
||||
struct solution *solution_ptr;
|
||||
|
||||
bool pp_assemblage_in;
|
||||
int n_pp_assemblage_user;
|
||||
cxxPPassemblage *pp_assemblage_ptr;
|
||||
|
||||
bool mix_in;
|
||||
int n_mix_user;
|
||||
//int n_mix;
|
||||
cxxMix * mix_ptr;
|
||||
int n_mix_user_orig;
|
||||
|
||||
bool reaction_in;
|
||||
int n_reaction_user;
|
||||
cxxReaction * reaction_ptr;
|
||||
|
||||
bool exchange_in;
|
||||
int n_exchange_user;
|
||||
cxxExchange * exchange_ptr;
|
||||
|
||||
bool kinetics_in;
|
||||
int n_kinetics_user;
|
||||
int n_kinetics;
|
||||
struct kinetics *kinetics_ptr;
|
||||
|
||||
bool surface_in;
|
||||
int n_surface_user;
|
||||
int n_surface;
|
||||
struct surface *surface_ptr;
|
||||
|
||||
bool pressure_in;
|
||||
int n_pressure_user;
|
||||
cxxPressure *pressure_ptr;
|
||||
|
||||
bool temperature_in;
|
||||
int n_temperature_user;
|
||||
cxxTemperature *temperature_ptr;
|
||||
|
||||
bool inverse_in;
|
||||
int n_inverse_user;
|
||||
int n_inverse;
|
||||
struct inverse *inverse_ptr;
|
||||
|
||||
bool gas_phase_in;
|
||||
int n_gas_phase_user;
|
||||
cxxGasPhase * gas_phase_ptr;
|
||||
|
||||
bool ss_assemblage_in;
|
||||
int n_ss_assemblage_user;
|
||||
int n_ss_assemblage;
|
||||
struct ss_assemblage *ss_assemblage_ptr;
|
||||
|
||||
bool trans_in;
|
||||
bool advect_in;
|
||||
};
|
||||
#endif // !defined(USE_H_INCLUDED)
|
||||
@ -122,7 +122,7 @@ bool dumper::Read(CParser & parser)
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
item = &(this->binList.Get_s_s_assemblage());
|
||||
item = &(this->binList.Get_ss_assemblage());
|
||||
break;
|
||||
case 16:
|
||||
case 17:
|
||||
@ -262,7 +262,7 @@ bool dumper::Get_bool_any(void)
|
||||
Get_bool_pp_assemblage() ||
|
||||
Get_bool_exchange() ||
|
||||
Get_bool_surface() ||
|
||||
Get_bool_s_s_assemblage() ||
|
||||
Get_bool_ss_assemblage() ||
|
||||
Get_bool_gas_phase() ||
|
||||
Get_bool_kinetics() ||
|
||||
Get_bool_mix() ||
|
||||
|
||||
4
dumper.h
4
dumper.h
@ -22,7 +22,7 @@ public:
|
||||
bool Get_bool_pp_assemblage(void) { return(this->binList.Get_pp_assemblage().Get_defined()); };
|
||||
bool Get_bool_exchange(void) { return(this->binList.Get_exchange().Get_defined()); };
|
||||
bool Get_bool_surface(void) { return(this->binList.Get_surface().Get_defined()); };
|
||||
bool Get_bool_s_s_assemblage(void) { return(this->binList.Get_s_s_assemblage().Get_defined()); };
|
||||
bool Get_bool_ss_assemblage(void) { return(this->binList.Get_ss_assemblage().Get_defined()); };
|
||||
bool Get_bool_gas_phase(void) { return(this->binList.Get_gas_phase().Get_defined()); };
|
||||
bool Get_bool_kinetics(void) { return(this->binList.Get_kinetics().Get_defined()); };
|
||||
bool Get_bool_mix(void) { return(this->binList.Get_mix().Get_defined()); };
|
||||
@ -35,7 +35,7 @@ public:
|
||||
std::set < int > & Get_pp_assemblage(void) { return(this->binList.Get_pp_assemblage().Get_numbers()); };
|
||||
std::set < int > & Get_exchange(void) { return(this->binList.Get_exchange().Get_numbers()); };
|
||||
std::set < int > & Get_surface(void) { return(this->binList.Get_surface().Get_numbers()); };
|
||||
std::set < int > & Get_s_s_assemblage(void) { return(this->binList.Get_s_s_assemblage().Get_numbers()); };
|
||||
std::set < int > & Get_ss_assemblage(void) { return(this->binList.Get_ss_assemblage().Get_numbers()); };
|
||||
std::set < int > & Get_gas_phase(void) { return(this->binList.Get_gas_phase().Get_numbers()); };
|
||||
std::set < int > & Get_kinetics(void) { return(this->binList.Get_kinetics().Get_numbers()); };
|
||||
std::set < int > & Get_mix(void) { return(this->binList.Get_mix().Get_numbers()); };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user