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