iphreeqc/ISolution.h
David L Parkhurst c78dd87daf Have version working that formats an input file for Orchestra, runs Orchestra with a system call to a batch file, reads results from Orchestra, stores results in global phreeqc storage, and prints results.
Works only for initial solution calculation.

Still some problems with the solver. Ex1 fails.

Cleaned up organization a little. Ready to start on "reaction" calculation.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@2176 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2007-08-07 15:04:13 +00:00

69 lines
2.1 KiB
C++

#if !defined(ISOLUTION_H_INCLUDED)
#define ISOLUTION_H_INCLUDED
//#include "Parser.h"
#include "ISolutionComp.h"
#include "NumKeyword.h"
#include "Solution.h"
//#include "Isotope.h"
#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>
class cxxISolution : public cxxSolution
{
public:
cxxISolution();
cxxISolution(struct solution *);
//cxxISolution(const cxxISolution&);
~cxxISolution();
//static cxxISolution& read(CParser& parser);
//void add(cxxISolutionComp conc) { this->concs.push_back(conc); }
struct solution *cxxISolution2solution();
double get_density()const {return this->density;}
void set_density(double density) {this->density = density;}
std::string get_units()const {return units;}
void set_units(std::string units) {units = units;}
//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();
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);
protected:
friend class cxxISolutionComp; // for this->pe access
double density;
std::string units;
std::map<char *, cxxISolutionComp, CHARSTAR_LESS> comps;
struct pe_data *pes;
int default_pe;
public:
//static std::map<int, cxxISolution>& map;
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_species(std::ostream &chemistry_dat);
void ORCH_write_chemistry_minerals(std::ostream &chemistry_dat);
};
#endif // !defined(ISOLUTION_H_INCLUDED)