mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 08:38:23 +01:00
Set dump, log, and punch file_on variables whereever pr.dump, pr.log, and pr.punch were set in PHREEQC. Added base class to Solution, ISolution, and StorageBin. Required a PHRQ_io in the constructor to find all places they were constructed. Need to do the same to all other classes (Exchange, Surface, NameDouble, etc.) Then need to take PHREEQC instance out of parser and fix all places a parser is constructed. Need to move phreeqc2class constructors to phreeqc. git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5628 1feff8c3-07ed-0310-ac33-dd36852eb9cd
93 lines
2.3 KiB
C++
93 lines
2.3 KiB
C++
#if !defined(ISOLUTION_H_INCLUDED)
|
|
#define ISOLUTION_H_INCLUDED
|
|
|
|
#include <cassert> // assert
|
|
#include <map> // std::map
|
|
#include <string> // std::string
|
|
#include <list> // std::list
|
|
#include <vector> // std::vector
|
|
#include <set> // std::set
|
|
#include <iostream>
|
|
#include <sstream>
|
|
#include <fstream>
|
|
|
|
#include "ISolutionComp.h"
|
|
//#include "NumKeyword.h"
|
|
#include "Solution.h"
|
|
|
|
class cxxISolution:public cxxSolution
|
|
{
|
|
|
|
public:
|
|
cxxISolution(PHRQ_io *io);
|
|
cxxISolution(PHREEQC_PTR_ARG_COMMA struct solution *, PHRQ_io *io);
|
|
//cxxISolution(const cxxISolution&);
|
|
~cxxISolution();
|
|
|
|
//static cxxISolution& read(CParser& parser);
|
|
|
|
//void add(cxxISolutionComp conc) { this->concs.push_back(conc); }
|
|
|
|
struct solution *cxxISolution2solution(PHREEQC_PTR_ARG);
|
|
|
|
double get_density() const
|
|
{
|
|
return this->density;
|
|
}
|
|
void set_density(double l_density)
|
|
{
|
|
this->density = l_density;
|
|
}
|
|
|
|
std::string get_units() const
|
|
{
|
|
return units;
|
|
}
|
|
void set_units(std::string l_units)
|
|
{
|
|
units = l_units;
|
|
}
|
|
void set_units(char * l_units)
|
|
{
|
|
if (l_units != NULL)
|
|
this->units = std::string(l_units);
|
|
else
|
|
this->units.clear();
|
|
}
|
|
|
|
//char * get_redox()const {return this->pe[this->default_pe].get_name();}
|
|
|
|
//void dump_xml(std::ostream& os, unsigned int indent = 0)const;
|
|
|
|
void ConvertUnits(PHREEQC_PTR_ARG);
|
|
|
|
#ifdef ORCHESTRA
|
|
void ORCH_write(std::ostream & chemistry_dat, std::ostream & input_dat,
|
|
std::ostream & output_dat);
|
|
void ORCH_write_chemistry(std::ostream & chemistry_dat);
|
|
void ORCH_write_input(std::ostream & input_dat);
|
|
void ORCH_write_output_vars(std::ostream & input_dat);
|
|
private:
|
|
void ORCH_write_chemistry_water(std::ostream & chemistry_dat);
|
|
void ORCH_write_chemistry_primary(std::ostream & chemistry_dat);
|
|
void ORCH_write_chemistry_total_O_H(std::ostream & chemistry_dat);
|
|
void ORCH_write_chemistry_alkalinity(std::ostream & chemistry_dat);
|
|
void ORCH_write_chemistry_minerals(std::ostream & chemistry_dat);
|
|
#endif
|
|
|
|
protected:
|
|
friend class cxxISolutionComp; // for this->pe access
|
|
double density;
|
|
std::string units;
|
|
//std::map < char *, cxxISolutionComp, CHARSTAR_LESS > comps;
|
|
std::map < std::string, cxxISolutionComp > comps;
|
|
struct pe_data *pes;
|
|
int default_pe;
|
|
|
|
public:
|
|
//static std::map<int, cxxISolution>& map;
|
|
|
|
};
|
|
|
|
#endif // !defined(ISOLUTION_H_INCLUDED)
|