mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
Merge commit 'b48944232055d481aa15138b4802159ad321495b'
This commit is contained in:
commit
ed9af14319
@ -24,7 +24,8 @@ class cxxGasPhase:public cxxNumKeyword
|
|||||||
enum GP_TYPE
|
enum GP_TYPE
|
||||||
{
|
{
|
||||||
GP_PRESSURE = 0,
|
GP_PRESSURE = 0,
|
||||||
GP_VOLUME = 1
|
GP_VOLUME = 1,
|
||||||
|
GP_UNKNOWN = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
//void dump_xml(std::ostream& os, unsigned int indent = 0)const;
|
//void dump_xml(std::ostream& os, unsigned int indent = 0)const;
|
||||||
|
|||||||
@ -453,6 +453,7 @@ void Phreeqc::init(void)
|
|||||||
last_model.count_kinetics = -1;
|
last_model.count_kinetics = -1;
|
||||||
last_model.kinetics = NULL;
|
last_model.kinetics = NULL;
|
||||||
last_model.count_gas_phase = -1;
|
last_model.count_gas_phase = -1;
|
||||||
|
last_model.gas_phase_type = cxxGasPhase::GP_UNKNOWN;
|
||||||
last_model.gas_phase = NULL;
|
last_model.gas_phase = NULL;
|
||||||
last_model.count_ss_assemblage = -1;
|
last_model.count_ss_assemblage = -1;
|
||||||
last_model.ss_assemblage = NULL;
|
last_model.ss_assemblage = NULL;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#ifndef _INC_GLOBAL_STRUCTURES_H
|
#ifndef _INC_GLOBAL_STRUCTURES_H
|
||||||
#define _INC_GLOBAL_STRUCTURES_H
|
#define _INC_GLOBAL_STRUCTURES_H
|
||||||
#include "Surface.h"
|
#include "Surface.h"
|
||||||
|
#include "GasPhase.h"
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
* #define DEFINITIONS
|
* #define DEFINITIONS
|
||||||
* ---------------------------------------------------------------------- */
|
* ---------------------------------------------------------------------- */
|
||||||
@ -246,6 +247,7 @@ struct model
|
|||||||
struct kinetics *kinetics;
|
struct kinetics *kinetics;
|
||||||
|
|
||||||
int count_gas_phase;
|
int count_gas_phase;
|
||||||
|
cxxGasPhase::GP_TYPE gas_phase_type;
|
||||||
struct phase **gas_phase;
|
struct phase **gas_phase;
|
||||||
|
|
||||||
int count_ss_assemblage;
|
int count_ss_assemblage;
|
||||||
|
|||||||
@ -5860,6 +5860,7 @@ save_model(void)
|
|||||||
{
|
{
|
||||||
cxxGasPhase * gas_phase_ptr = use.Get_gas_phase_ptr();
|
cxxGasPhase * gas_phase_ptr = use.Get_gas_phase_ptr();
|
||||||
last_model.count_gas_phase = (int) gas_phase_ptr->Get_gas_comps().size();
|
last_model.count_gas_phase = (int) gas_phase_ptr->Get_gas_comps().size();
|
||||||
|
last_model.gas_phase_type = gas_phase_ptr->Get_type();
|
||||||
last_model.gas_phase =
|
last_model.gas_phase =
|
||||||
(struct phase **) PHRQ_malloc((size_t) last_model.count_gas_phase *
|
(struct phase **) PHRQ_malloc((size_t) last_model.count_gas_phase *
|
||||||
sizeof(struct phase *));
|
sizeof(struct phase *));
|
||||||
@ -5877,6 +5878,7 @@ save_model(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
last_model.count_gas_phase = 0;
|
last_model.count_gas_phase = 0;
|
||||||
|
last_model.gas_phase_type = cxxGasPhase::GP_UNKNOWN;
|
||||||
last_model.gas_phase = NULL;
|
last_model.gas_phase = NULL;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@ -6059,6 +6061,8 @@ check_same_model(void)
|
|||||||
return (FALSE);
|
return (FALSE);
|
||||||
if (last_model.count_gas_phase != (int) gas_phase_ptr->Get_gas_comps().size())
|
if (last_model.count_gas_phase != (int) gas_phase_ptr->Get_gas_comps().size())
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
|
if (last_model.gas_phase_type != gas_phase_ptr->Get_type())
|
||||||
|
return (FALSE);
|
||||||
for (i = 0; i < (int) gas_phase_ptr->Get_gas_comps().size(); i++)
|
for (i = 0; i < (int) gas_phase_ptr->Get_gas_comps().size(); i++)
|
||||||
{
|
{
|
||||||
cxxGasComp *gc_ptr = &(gas_phase_ptr->Get_gas_comps()[i]);
|
cxxGasComp *gc_ptr = &(gas_phase_ptr->Get_gas_comps()[i]);
|
||||||
|
|||||||
@ -5471,6 +5471,7 @@ reset_last_model(void)
|
|||||||
last_model.exchange =
|
last_model.exchange =
|
||||||
(struct master **) free_check_null(last_model.exchange);
|
(struct master **) free_check_null(last_model.exchange);
|
||||||
last_model.count_gas_phase = 0;
|
last_model.count_gas_phase = 0;
|
||||||
|
last_model.gas_phase_type = cxxGasPhase::GP_UNKNOWN;
|
||||||
last_model.gas_phase =
|
last_model.gas_phase =
|
||||||
(struct phase **) free_check_null(last_model.gas_phase);
|
(struct phase **) free_check_null(last_model.gas_phase);
|
||||||
last_model.count_ss_assemblage = 0;
|
last_model.count_ss_assemblage = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user