mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
Squashed 'src/' changes from c41c4e02..a826eecc
a826eecc Merge commit '754ea3a9bc11cd1f7d350ff217bdb3dcd3af3d97' 754ea3a9 Squashed 'phreeqcpp/' changes from a376a40..40f9a93 git-subtree-dir: src git-subtree-split: a826eecc87a37acb91cc80fd757e8322c3f9bf24
This commit is contained in:
parent
141cad0190
commit
c995d50084
@ -851,7 +851,9 @@ public:
|
||||
class master* surface_get_psi_master(const char* name, int plane);
|
||||
//
|
||||
class phase* phase_bsearch(const char* cptr, int* j, int print);
|
||||
#ifdef OBSOLETE
|
||||
static int phase_compare(const void* ptr1, const void* ptr2);
|
||||
#endif
|
||||
int phase_delete(int i);
|
||||
class phase* phase_store(const char* name);
|
||||
//
|
||||
|
||||
@ -3361,7 +3361,7 @@ reset(void)
|
||||
}
|
||||
if (old_moles <= 0 && x[i]->moles > 0)
|
||||
{
|
||||
x[i]->master[0]->s->la = log10(x[i]->moles) - 5.;
|
||||
x[i]->master[0]->s->la = log10(x[i]->moles) - 15.;
|
||||
}
|
||||
}
|
||||
else if (comp_ptr->Get_phase_name().size() > 0)
|
||||
|
||||
@ -1080,7 +1080,7 @@ phase_alloc(void)
|
||||
phase_init(phase_ptr);
|
||||
return (phase_ptr);
|
||||
}
|
||||
|
||||
#ifdef OBSOLETE
|
||||
/* ---------------------------------------------------------------------- */
|
||||
int Phreeqc::
|
||||
phase_compare(const void *ptr1, const void *ptr2)
|
||||
@ -1094,7 +1094,7 @@ phase_compare(const void *ptr1, const void *ptr2)
|
||||
phase_ptr2 = *(const class phase **) ptr2;
|
||||
return (strcmp_nocase(phase_ptr1->name, phase_ptr2->name));
|
||||
}
|
||||
|
||||
#endif
|
||||
/* ---------------------------------------------------------------------- */
|
||||
int Phreeqc::
|
||||
phase_compare_string(const void *ptr1, const void *ptr2)
|
||||
|
||||
@ -155,18 +155,39 @@ tidy_model(void)
|
||||
* Sort arrays
|
||||
*/
|
||||
|
||||
/* species */
|
||||
if (new_model == TRUE)
|
||||
{
|
||||
if (s.size() > 1) qsort(&s[0], s.size(), sizeof(class species *), s_compare);
|
||||
|
||||
/* master species */
|
||||
if (master.size() > 1) qsort(&master[0], master.size(), sizeof(class master *), master_compare);
|
||||
/* elements */
|
||||
if (elements.size() > 1) qsort(&elements[0], elements.size(), sizeof(class element *), element_compare);
|
||||
/* phases */
|
||||
if (phases.size() > 1) qsort(&phases[0], phases.size(), sizeof(class phase *), phase_compare);
|
||||
|
||||
/* species */
|
||||
if (s.size() > 1) //qsort(&s[0], s.size(), sizeof(class species*), s_compare);
|
||||
{
|
||||
s.clear();
|
||||
std::map<std::string, class species*>::iterator it;
|
||||
for (it = species_map.begin(); it != species_map.end(); it++)
|
||||
{
|
||||
s.push_back(it->second);
|
||||
}
|
||||
}
|
||||
/* master species */
|
||||
if (master.size() > 1) qsort(&master[0], master.size(), sizeof(class master*), master_compare);
|
||||
/* elements */
|
||||
if (elements.size() > 1) //qsort(&elements[0], elements.size(), sizeof(class element*), element_compare);
|
||||
{
|
||||
elements.clear();
|
||||
std::map<std::string, class element*>::iterator it;
|
||||
for (it = elements_map.begin(); it != elements_map.end(); it++)
|
||||
{
|
||||
elements.push_back(it->second);
|
||||
}
|
||||
} /* phases */
|
||||
if (phases.size() > 1) //qsort(&phases[0], phases.size(), sizeof(class phase *), phase_compare);
|
||||
{
|
||||
phases.clear();
|
||||
std::map<std::string, class phase*>::iterator it;
|
||||
for (it = phases_map.begin(); it != phases_map.end(); it++)
|
||||
{
|
||||
phases.push_back(it->second);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* named_log_k */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user