mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 08:38:23 +01:00
All reactant structs have been removed. Tony's pressure uses mu in pressure term of log_k. Test cases run, discriminant check at 1e-8. Still want to optimize out some k_temp calls and checks for same T, P, mu. git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@6269 1feff8c3-07ed-0310-ac33-dd36852eb9cd
67 lines
1.8 KiB
C++
67 lines
1.8 KiB
C++
#if !defined(NAMEDOUBLE_H_INCLUDED)
|
|
#define NAMEDOUBLE_H_INCLUDED
|
|
|
|
#include <cassert> // assert
|
|
#include <map> // std::map
|
|
#include <string> // std::string
|
|
#include <list> // std::list
|
|
#include <vector> // std::vector
|
|
class Phreeqc;
|
|
#include "Parser.h"
|
|
#include "phrqtype.h"
|
|
class cxxISolutionComp;
|
|
|
|
class cxxNameDouble:public
|
|
std::map < std::string, LDBLE >
|
|
{
|
|
|
|
public:
|
|
enum ND_TYPE
|
|
{
|
|
ND_ELT_MOLES = 1,
|
|
ND_SPECIES_LA = 2,
|
|
ND_SPECIES_GAMMA = 3,
|
|
ND_NAME_COEF = 4
|
|
};
|
|
|
|
cxxNameDouble();
|
|
cxxNameDouble(struct elt_list *);
|
|
cxxNameDouble(struct elt_list *, int count);
|
|
cxxNameDouble(std::map < std::string, cxxISolutionComp > &comps);
|
|
|
|
cxxNameDouble(struct name_coef *nc, int count);
|
|
cxxNameDouble(const cxxNameDouble & old, LDBLE factor);
|
|
~cxxNameDouble();
|
|
|
|
LDBLE Get_total_element(const char *string) const;
|
|
cxxNameDouble Simplify_redox(void);
|
|
void Multiply_activities_redox(std::string, LDBLE f);
|
|
|
|
void dump_xml(std::ostream & s_oss, unsigned int indent) const;
|
|
void dump_raw(std::ostream & s_oss, unsigned int indent) const;
|
|
CParser::STATUS_TYPE read_raw(CParser & parser, std::istream::pos_type & pos);
|
|
void add_extensive(const cxxNameDouble & old, LDBLE factor);
|
|
void add_intensive(const cxxNameDouble & addee, LDBLE fthis, LDBLE f2);
|
|
void add_log_activities(const cxxNameDouble & addee, LDBLE fthis, LDBLE f2);
|
|
void add(const char *key, LDBLE total);
|
|
void multiply(LDBLE factor);
|
|
void merge_redox(const cxxNameDouble & source);
|
|
|
|
std::vector< std::pair<std::string, LDBLE> > sort_second(void);
|
|
|
|
void
|
|
insert(const char *str, LDBLE d)
|
|
{
|
|
(*this)[str] = d;
|
|
}
|
|
|
|
void mpi_pack(std::vector < int >&ints, std::vector < LDBLE >&doubles);
|
|
void mpi_pack(int *ints, int *ii, LDBLE *doubles, int *dd);
|
|
void mpi_unpack(int *ints, int *ii, LDBLE *doubles, int *dd);
|
|
|
|
enum ND_TYPE type;
|
|
|
|
};
|
|
|
|
#endif // !defined(NAMEDOUBLE_H_INCLUDED)
|