mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 16:44:49 +01:00
git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@6084 1feff8c3-07ed-0310-ac33-dd36852eb9cd
80 lines
2.6 KiB
C++
80 lines
2.6 KiB
C++
#if !defined(CXXKINETICS_H_INCLUDED)
|
|
#define CXXKINETICS_H_INCLUDED
|
|
|
|
#include <cassert> // assert
|
|
#include <map> // std::map
|
|
#include <string> // std::string
|
|
#include <list> // std::list
|
|
#include <vector> // std::vector
|
|
#include "phrqtype.h"
|
|
#include "NumKeyword.h"
|
|
#include "KineticsComp.h"
|
|
#include "PHRQ_base.h"
|
|
class cxxMix;
|
|
|
|
class cxxKinetics:public cxxNumKeyword
|
|
{
|
|
|
|
public:
|
|
cxxKinetics(PHRQ_io *io=NULL);
|
|
//cxxKinetics(struct kinetics *, PHRQ_io *io=NULL);
|
|
cxxKinetics(const std::map < int, cxxKinetics > &entity_map, cxxMix & mx,
|
|
int n_user, PHRQ_io *io=NULL);
|
|
~cxxKinetics();
|
|
|
|
//void dump_xml(std::ostream& os, unsigned int indent = 0)const;
|
|
|
|
void dump_raw(std::ostream & s_oss, unsigned int indent, int * n_out=NULL) const;
|
|
|
|
void read_raw(CParser & parser, bool check = true);
|
|
|
|
//bool Get_related_phases(void) const;
|
|
//bool Get_related_rate(void) const;
|
|
|
|
std::vector < LDBLE > &Get_steps(void) {return steps;}
|
|
LDBLE Get_step_divide(void) const {return step_divide;}
|
|
void Set_step_divide(LDBLE t) {step_divide = t;}
|
|
int Get_rk(void) const {return rk;};
|
|
void Set_rk(int t) {rk = t;}
|
|
int Get_bad_step_max(void) const {return bad_step_max;}
|
|
void Set_bad_step_max(int t) {bad_step_max = t;}
|
|
bool Get_use_cvode(void) const {return use_cvode;}
|
|
void Set_use_cvode(bool tf) {use_cvode = tf;}
|
|
int Get_cvode_steps(void) const {return cvode_steps;}
|
|
void Set_cvode_steps(int t) {cvode_steps = t;}
|
|
int Get_cvode_order(void) const {return cvode_order;}
|
|
void Set_cvode_order(int t) {cvode_order = t;}
|
|
std::vector < cxxKineticsComp > &Get_kinetics_comps(void) {return kinetics_comps;}
|
|
cxxNameDouble & Get_totals(void) {return this->totals;}
|
|
void Set_totals(const cxxNameDouble &nd) {totals = nd;}
|
|
bool Get_equalIncrements(void) const {return equalIncrements;}
|
|
void Set_equalIncrements(bool tf) {equalIncrements = tf;}
|
|
int Get_count(void) const {return count;}
|
|
void Set_count(int i) {count = i;}
|
|
int Get_reaction_steps(void) const;
|
|
cxxKineticsComp * Find(const std::string &str);
|
|
LDBLE Current_step(const bool incremental_reactions, const int reaction_step) const;
|
|
|
|
#ifdef USE_MPI
|
|
void mpi_unpack(int *ints, int *ii, LDBLE *doubles, int *dd);
|
|
void mpi_pack(std::vector < int >&ints, std::vector < LDBLE >&doubles);
|
|
#endif
|
|
protected:
|
|
void add(const cxxKinetics & addee, LDBLE extensive);
|
|
|
|
protected:
|
|
std::vector < cxxKineticsComp > kinetics_comps;
|
|
std::vector < LDBLE >steps;
|
|
int count;
|
|
bool equalIncrements;
|
|
cxxNameDouble totals;
|
|
LDBLE step_divide;
|
|
int rk;
|
|
int bad_step_max;
|
|
bool use_cvode;
|
|
int cvode_steps;
|
|
int cvode_order;
|
|
};
|
|
|
|
#endif // !defined(CXXKINETICS_H_INCLUDED)
|