11#if !defined(PHREEQCRM_H_INCLUDED)
12#define PHREEQCRM_H_INCLUDED
15#define MP_TYPE MPI_Comm
23#include "NameDouble.h"
34#include "irm_dll_export.h"
52 const char *
what()
const throw () {
return "Failure in PhreeqcRM\n";}
154 return search->second;
159 template<
typename Derived>
166 if (Derived* derived =
dynamic_cast<Derived*
>(search->second))
179 assert(
dynamic_cast<T*
>(search->second));
180 delete search->second;
207 assert(
dynamic_cast<T*
>(pair.second));
208 items.push_back(pair.second);
210 for (
auto item : items)
275 virtual void AddOutputVars(std::string option, std::string def);
276 virtual void ClearBMISelectedOutput();
277 virtual void GenerateAutoOutputVars();
278 virtual void UpdateBMI(RMVARS v_enum);
373 PhreeqcRM(
int nxyz,
MP_TYPE thread_count_or_communicator, PHRQ_io * io=NULL,
bool delay_construct=
false);
438 const std::vector< double > &tc,
const std::vector< double > &p_atm);
570 void ErrorMessage(
const std::string &error_string,
bool prepend =
true);
680 void GetBackwardMappingSWIG(std::vector<int>& nback_output, std::vector<int>& cellnumbers_output);
749const std::vector< std::string > &
GetComponents(
void)
const {
return this->components;}
921 const std::vector < int> &
GetEndCell(
void) {
return this->end_cell;}
1058const std::vector< std::string > &
GetExchangeNames(
void)
const {
return this->ExchangeNamesList; }
1093const std::vector< std::string > &
GetExchangeSpecies(
void)
const {
return this->ExchangeSpeciesNamesList; }
1197const std::vector< std::string > &
GetGasComponents(
void)
const {
return this->GasComponentsList; }
1389 const std::vector < double > &
GetGfw(
void) {
return this->gfw;}
1706 std::vector< double > & GetPoreVolume(
void) {
return this->pore_volume;}
2202int GetSICount(
void)
const {
return (
int) this->SINamesList.size(); }
2236const std::vector< std::string > &
GetSINames(
void)
const {
return this->SINamesList; }
2687 void GetSpeciesStoichiometrySWIG(std::vector<std::string>& species_output,
2688 std::vector<int>& nelt_output, std::vector<std::string>& elts_output, std::vector<double>& coef_output);
2721 const std::vector< double > &
GetSpeciesZ(
void) {
return this->species_z;}
2794const std::vector< std::string > &
GetSurfaceNames(
void)
const {
return this->SurfaceNamesList; }
2831const std::vector< std::string > &
GetSurfaceSpecies(
void)
const {
return this->SurfaceSpeciesNamesList; }
2905const std::vector< std::string > &
GetSurfaceTypes(
void)
const {
return this->SurfaceTypesList; }
3274 const std::vector<IPhreeqcPhast *> &
GetWorkers() {
return this->workers;}
3425 const std::vector < int > & boundary_solution1);
3465 std::vector < double > & destination_c,
3466 const std::vector < int > & boundary_solution1,
3467 const std::vector < int > & boundary_solution2,
3468 const std::vector < double > & fraction1);
3691 const std::vector < int >& initial_conditions1,
3692 const std::vector < int >& initial_conditions2,
3693 const std::vector < double >& fraction1);
3724 const std::vector < int >& boundary_solution1);
3765 const std::vector < int >& boundary_solution1,
3766 const std::vector < int >& boundary_solution2,
3767 const std::vector < double >& fraction1);
3795 const std::vector< int >& cell_numbers);
4130 IRM_RESULT RunFile(
bool workers,
bool initial_phreeqc,
bool utility,
const std::string & chemistry_name);
5635 static void FileRename(
const std::string &temp_name,
const std::string &name,
5636 const std::string &backup_name);
5642 const int *initial_conditions1,
5643 const int *initial_conditions2,
5645 std::set<std::string> &error_set);
5647 int CheckSelectedOutput();
5650 IPhreeqc * Concentrations2UtilityH2O(
const std::vector< double > &c_in,
5651 const std::vector< double > &t_in,
const std::vector< double > &p_in);
5652 IPhreeqc * Concentrations2UtilityNoH2O(
const std::vector< double > &c_in,
5653 const std::vector< double > &t_in,
const std::vector< double > &p_in);
5654 void Concentrations2Solutions(
int n, std::vector< double > &c);
5655 void Concentrations2SolutionsH2O(
int n, std::vector< double > &c);
5656 void Concentrations2SolutionsNoH2O(
int n, std::vector< double > &c);
5657 void cxxSolution2concentration(cxxSolution * cxxsoln_ptr, std::vector< double > & d,
double v,
double dens);
5658 void cxxSolution2concentrationH2O(cxxSolution * cxxsoln_ptr, std::vector< double > & d,
double v,
double dens);
5659 void cxxSolution2concentrationNoH2O(cxxSolution * cxxsoln_ptr, std::vector< double > & d,
double v,
double dens);
5660 void GatherNchem(std::vector< double > &source, std::vector< double > &destination);
5661 cxxStorageBin & Get_phreeqc_bin(
void) {
return *this->phreeqc_bin;}
5662 IRM_RESULT HandleErrorsInternal(std::vector< int > & r);
5663 void PartitionUZ(
int n,
int iphrq,
int ihst,
double new_frac);
5664 void RebalanceLoad(
void);
5665 void RebalanceLoadPerCell(
void);
5668 IRM_RESULT RunStringThread(
int n, std::string & input);
5670 void Scale_solids(
int n,
int iphrq,
double frac);
5671 void ScatterNchem(
double *d_array);
5672 void ScatterNchem(
int *i_array);
5673 void ScatterNchem(std::vector< double > &source, std::vector< double > &destination);
5674 void ScatterNchem(std::vector< int > &source, std::vector< int > &destination);
5675 IRM_RESULT SetChemistryFileName(
const char * prefix = NULL);
5676 IRM_RESULT SetDatabaseFileName(
const char * db = NULL);
5677 void SetEndCells(
void);
5678 void SetEndCellsHeterogeneous(
void);
5679 double TimeStandardTask(
void);
5680 IRM_RESULT TransferCells(cxxStorageBin &t_bin,
int old,
int nnew);
5681 IRM_RESULT TransferCellsUZ(std::ostringstream &raw_stream,
int old,
int nnew);
5685 IRM_RESULT SetGeneric(
const std::vector< double > &source, std::vector< double > &destination_root, std::vector< double > &destination_worker,
int mpiMethod,
const std::string &name);
5690#if defined(_MSC_VER)
5692#pragma warning(disable:4251)
5697 std::string database_file_name;
5698 std::string chemistry_file_name;
5699 std::string dump_file_name;
5700 std::string file_prefix;
5701 cxxStorageBin * phreeqc_bin;
5704 std::vector <std::string> components;
5705 std::vector <double> gfw;
5707 bool partition_uz_solids;
5709 int count_chemistry;
5712 double time_conversion;
5713 std::vector <double> CurrentConcentrations;
5714 std::vector <double> CurrentSpeciesConcentrations;
5715 std::vector <double> IthCurrentConcentrations;
5716 std::vector <double> IthCurrentSpeciesConcentrations;
5717 std::set<int> IthConcentrationSet;
5718 std::set<int> IthSpeciesConcentrationSet;
5719 std::vector <double> old_saturation_root;
5720 std::vector <double> old_saturation_worker;
5721 std::vector< double > saturation_root;
5722 std::vector< double > saturation_worker;
5723 std::vector< double > pressure_root;
5724 std::vector< double > pressure_worker;
5725 std::vector< double > rv_root;
5726 std::vector< double > rv_worker;
5727 std::vector< double > porosity_root;
5728 std::vector< double > porosity_worker;
5729 std::vector< double > tempc_root;
5730 std::vector< double > tempc_worker;
5731 std::vector< double > density_root;
5732 std::vector< double > density_worker;
5733 std::vector< double > viscosity_root;
5734 std::vector< double > viscosity_worker;
5735 std::vector< double > solution_volume_root;
5736 std::vector< double > solution_volume_worker;
5737 std::vector< int > print_chem_mask_root;
5738 std::vector< int > print_chem_mask_worker;
5739 bool rebalance_by_cell;
5740 double rebalance_fraction;
5742 int units_PPassemblage;
5746 int units_SSassemblage;
5748 std::vector <int> forward_mapping_root;
5749 std::vector <std::vector <int> > backward_mapping;
5750 bool use_solution_density_volume;
5751 bool worker_waiting;
5753 std::vector< bool > print_chemistry_on;
5754 bool selected_output_on;
5757 int error_handler_mode;
5758 bool need_error_check;
5759 std::string phreeqcrm_error_string;
5761 std::map<std::string, int> method_map;
5764 std::vector<IPhreeqcPhast *> workers;
5767 PHRQ_io *phreeqcrm_io;
5768 bool delete_phreeqcrm_io;
5772 MPI_Comm phreeqcrm_comm;
5774 int (*mpi_worker_callback_fortran) (
int *method);
5775 int (*mpi_worker_callback_c) (
int *method,
void *cookie);
5776 void *mpi_worker_callback_cookie;
5779 bool species_save_on;
5780 std::vector <std::string> species_names;
5781 std::vector <double> species_z;
5782 std::vector <double> species_d_25;
5783 std::vector <cxxNameDouble> species_stoichiometry;
5784 std::map<int, int> s_num2rm_species_num;
5785 std::vector< double > standard_task_vector;
5787 std::vector< int > start_cell;
5788 std::vector< int > end_cell;
5790 std::vector <std::string> ExchangeSpeciesNamesList;
5791 std::vector <std::string> ExchangeNamesList;
5792 std::vector <std::string> SurfaceSpeciesNamesList;
5793 std::vector <std::string> SurfaceTypesList;
5794 std::vector <std::string> SurfaceNamesList;
5796 std::vector <std::string> EquilibriumPhasesList;
5797 std::vector <std::string> GasComponentsList;
5798 std::vector <std::string> KineticReactionsList;
5799 std::vector <std::string> SolidSolutionComponentsList;
5800 std::vector <std::string> SolidSolutionNamesList;
5801 std::vector <std::string> SINamesList;
5802 std::set <std::string> ElementRedoxSet;
5805 static const int default_nxyz = 10;
5806 static const MP_TYPE default_data_for_parallel_processing;
5807 struct Initializer {
5809 MP_TYPE data_for_parallel_processing;
5813 : nxyz_arg(default_nxyz) , data_for_parallel_processing(default_data_for_parallel_processing), io(NULL) {}
5815 Initializer(
int nxyz_arg,
MP_TYPE data_for_parallel_processing, PHRQ_io *io)
5816 : nxyz_arg(nxyz_arg) , data_for_parallel_processing(data_for_parallel_processing), io(io) {}
5820 virtual void Construct(Initializer initializer);
5826 friend class VarManager;
5828#if defined(_MSC_VER)
5830#pragma warning(default:4251)
Enumeration used to return error codes.
IRM_RESULT
Enumeration for PhreeqcRM function return codes.
Definition IrmResult.h:8
@ IRM_BADINSTANCE
Definition IrmResult.h:15
@ IRM_OK
Definition IrmResult.h:9
@ METHOD_GETSPECIESLOG10GAMMAS
Definition PhreeqcRM.h:78
@ METHOD_SETCONCENTRATIONS
Definition PhreeqcRM.h:90
@ METHOD_STATEDELETE
Definition PhreeqcRM.h:121
@ METHOD_RUNCELLS
Definition PhreeqcRM.h:86
@ METHOD_CONSTRUCT
Definition PhreeqcRM.h:62
@ METHOD_SETSELECTEDOUTPUTON
Definition PhreeqcRM.h:105
@ METHOD_SETTEMPERATURE
Definition PhreeqcRM.h:107
@ METHOD_SETCOMPONENTH2O
Definition PhreeqcRM.h:89
@ METHOD_GETSATURATIONCALCULATED
Definition PhreeqcRM.h:74
@ METHOD_GETSPECIESCONCENTRATIONS
Definition PhreeqcRM.h:77
@ METHOD_SETUNITSGASPHASE
Definition PhreeqcRM.h:112
@ METHOD_SETSPECIESSAVEON
Definition PhreeqcRM.h:106
@ METHOD_FINDCOMPONENTS
Definition PhreeqcRM.h:65
@ METHOD_CREATEMAPPING
Definition PhreeqcRM.h:63
@ METHOD_SETPOROSITY
Definition PhreeqcRM.h:97
@ METHOD_GETSPECIESLOG10MOLALITIES
Definition PhreeqcRM.h:79
@ METHOD_GETPRESSURE
Definition PhreeqcRM.h:73
@ METHOD_RUNSTRING
Definition PhreeqcRM.h:88
@ METHOD_GETCONCENTRATIONS
Definition PhreeqcRM.h:66
@ METHOD_SETPRINTCHEMISTRYON
Definition PhreeqcRM.h:99
@ METHOD_GETGASCOMPPHI
Definition PhreeqcRM.h:71
@ METHOD_GETGASCOMPPRESSURES
Definition PhreeqcRM.h:70
@ METHOD_SETUNITSKINETICS
Definition PhreeqcRM.h:113
@ METHOD_SETFILEPREFIX
Definition PhreeqcRM.h:93
@ METHOD_INITIALPHREEQCCELL2MODULE
Definition PhreeqcRM.h:83
@ METHOD_SETSATURATIONUSER
Definition PhreeqcRM.h:104
@ METHOD_GETGASCOMPMOLES
Definition PhreeqcRM.h:69
@ METHOD_INITIALPHREEQC2MODULE
Definition PhreeqcRM.h:82
@ METHOD_SETREBALANCEFRACTION
Definition PhreeqcRM.h:102
@ METHOD_GETTEMPERATURE
Definition PhreeqcRM.h:80
@ METHOD_SETUNITSEXCHANGE
Definition PhreeqcRM.h:111
@ METHOD_RUNFILE
Definition PhreeqcRM.h:87
@ METHOD_SETPARTITIONUZSOLIDS
Definition PhreeqcRM.h:96
@ METHOD_SETTIMESTEP
Definition PhreeqcRM.h:110
@ METHOD_GETERRORSTRING
Definition PhreeqcRM.h:68
@ METHOD_GETVISCOSITY
Definition PhreeqcRM.h:81
@ METHOD_SETUNITSPPASSEMBLAGE
Definition PhreeqcRM.h:114
@ METHOD_GETSOLUTIONVOLUME
Definition PhreeqcRM.h:76
@ METHOD_SETGASCOMPMOLES
Definition PhreeqcRM.h:94
@ METHOD_SETTIMECONVERSION
Definition PhreeqcRM.h:109
@ METHOD_STATESAVE
Definition PhreeqcRM.h:119
@ METHOD_SETGASPHASEVOLUME
Definition PhreeqcRM.h:95
@ METHOD_GETGASPHASEVOLUME
Definition PhreeqcRM.h:72
@ METHOD_SETUNITSSOLUTION
Definition PhreeqcRM.h:115
@ METHOD_SETREPRESENTATIVEVOLUME
Definition PhreeqcRM.h:103
@ METHOD_SETTIME
Definition PhreeqcRM.h:108
@ METHOD_MPIWORKERBREAK
Definition PhreeqcRM.h:85
@ METHOD_GETDENSITYCALCULATED
Definition PhreeqcRM.h:67
@ METHOD_SETERRORHANDLERMODE
Definition PhreeqcRM.h:92
@ METHOD_SETREBALANCEBYCELL
Definition PhreeqcRM.h:101
@ METHOD_SETUNITSSURFACE
Definition PhreeqcRM.h:117
@ METHOD_SETUNITSSSASSEMBLAGE
Definition PhreeqcRM.h:116
@ METHOD_LOADDATABASE
Definition PhreeqcRM.h:84
@ METHOD_SETPRINTCHEMISTRYMASK
Definition PhreeqcRM.h:100
@ METHOD_USESOLUTIONDENSITYVOLUME
Definition PhreeqcRM.h:122
@ METHOD_GETSELECTEDOUTPUT
Definition PhreeqcRM.h:75
@ METHOD_SETDENSITYUSER
Definition PhreeqcRM.h:91
@ METHOD_SETPRESSURE
Definition PhreeqcRM.h:98
@ METHOD_DUMPMODULE
Definition PhreeqcRM.h:64
@ METHOD_SPECIESCONCENTRATIONS2MODULE
Definition PhreeqcRM.h:118
@ METHOD_STATEAPPLY
Definition PhreeqcRM.h:120
#define MP_TYPE
Definition PhreeqcRM.h:17
Basic Model Interface implementation of the geochemical reaction module PhreeqcRM.
Definition BMIPhreeqcRM.h:44
This class is derived from std::exception and is thrown when an unrecoverable error has occurred.
Definition PhreeqcRM.h:50
const char * what() const
Definition PhreeqcRM.h:52
Geochemical reaction module.
Definition PhreeqcRM.h:269
IRM_RESULT CloseFiles(void)
const std::vector< double > & GetGfw(void)
Definition PhreeqcRM.h:1389
IRM_RESULT GetSaturation(std::vector< double > &sat_output)
int GetExchangeSpeciesCount(void) const
Definition PhreeqcRM.h:1125
IRM_RESULT SetNthSelectedOutput(int n)
IRM_RESULT RunCells(void)
IRM_RESULT SetUnitsKinetics(int option)
static IRM_RESULT Int2IrmResult(int r, bool positive_ok)
IRM_RESULT SetScreenOn(bool tf)
IRM_RESULT GetIthSpeciesConcentration(int i, std::vector< double > &c_output)
int GetSolidSolutionComponentsCount(void) const
Definition PhreeqcRM.h:2306
IRM_RESULT SetMpiWorkerCallbackFortran(int(*fcn)(int *method))
IRM_RESULT SetPrintChemistryOn(bool workers, bool initial_phreeqc, bool utility)
static IRM_RESULT DestroyReactionModule(int n)
IRM_RESULT InitialSolidSolutions2Module(const std::vector< int > &solid_solutions)
const std::vector< int > & GetPrintChemistryMask(void)
Definition PhreeqcRM.h:1770
IRM_RESULT SetFilePrefix(const std::string &prefix)
IRM_RESULT InitialEquilibriumPhases2Module(const std::vector< int > &equilibrium_phases)
IRM_RESULT GetSelectedOutputHeadings(std::vector< std::string > &headings)
IRM_RESULT GetDensityCalculated(std::vector< double > &d_output)
int GetSelectedOutputCount(void)
IRM_RESULT GetSaturationCalculated(std::vector< double > &sat_output)
void LogMessage(const std::string &str)
bool GetRebalanceByCell(void) const
Definition PhreeqcRM.h:1823
IPhreeqc * Concentrations2Utility(const std::vector< double > &c, const std::vector< double > &tc, const std::vector< double > &p_atm)
const std::vector< double > & GetTemperature(void)
int GetUnitsKinetics(void)
Definition PhreeqcRM.h:3099
const std::vector< std::string > & GetKineticReactions(void) const
Definition PhreeqcRM.h:1526
int GetUnitsSSassemblage(void)
Definition PhreeqcRM.h:3204
int GetChemistryCellCount(void) const
Definition PhreeqcRM.h:704
IRM_RESULT SetUnitsSSassemblage(int option)
const std::vector< double > & GetSpeciesD25(void)
Definition PhreeqcRM.h:2479
IRM_RESULT SetPorosity(const std::vector< double > &por)
int GetCurrentSelectedOutputUserNumber(void)
const std::vector< std::string > & GetGasComponents(void) const
Definition PhreeqcRM.h:1197
IRM_RESULT InitialGasPhases2Module(const std::vector< int > &gas_phases)
const std::vector< cxxNameDouble > & GetSpeciesStoichiometry(void)
Definition PhreeqcRM.h:2685
const std::vector< std::string > & GetExchangeNames(void) const
Definition PhreeqcRM.h:1058
IRM_RESULT SetDumpFileName(const std::string &dump_name)
IRM_RESULT SetErrorOn(bool tf)
void ScreenMessage(const std::string &str)
static int GetGridCellCountYAML(const char *YAML_file)
bool GetSpeciesSaveOn(void)
Definition PhreeqcRM.h:2634
const std::vector< std::string > & GetExchangeSpecies(void) const
Definition PhreeqcRM.h:1093
IRM_RESULT SetSelectedOutputOn(bool tf)
const std::vector< std::string > & GetSpeciesNames(void)
Definition PhreeqcRM.h:2598
IRM_RESULT InitialPhreeqc2SpeciesConcentrations(std::vector< double > &destination_c, const std::vector< int > &boundary_solution1)
IRM_RESULT InitialPhreeqc2SpeciesConcentrations(std::vector< double > &destination_c, const std::vector< int > &boundary_solution1, const std::vector< int > &boundary_solution2, const std::vector< double > &fraction1)
int GetUnitsPPassemblage(void)
Definition PhreeqcRM.h:3124
IRM_RESULT SetUnitsPPassemblage(int option)
const std::vector< int > & GetEndCell(void)
Definition PhreeqcRM.h:921
int GetThreadCount()
Definition PhreeqcRM.h:2952
IRM_RESULT InitialPhreeqc2Module(const std::vector< int > &initial_conditions1, const std::vector< int > &initial_conditions2, const std::vector< double > &fraction1)
IRM_RESULT StateSave(int istate)
const std::vector< double > & GetPorosity(void)
IRM_RESULT SetTime(double time)
int GetComponentCount(void) const
Definition PhreeqcRM.h:724
IRM_RESULT RunString(bool workers, bool initial_phreeqc, bool utility, const std::string &input_string)
IRM_RESULT SetPartitionUZSolids(bool tf)
const std::vector< std::string > & GetSolidSolutionComponents(void) const
Definition PhreeqcRM.h:2273
std::string GetDatabaseFileName(void)
Definition PhreeqcRM.h:857
IRM_RESULT RunFile(bool workers, bool initial_phreeqc, bool utility, const std::string &chemistry_name)
PhreeqcRM(int nxyz, int thread_count_or_communicator, PHRQ_io *io=NULL, bool delay_construct=false)
IRM_RESULT GetGasPhaseVolume(std::vector< double > &gas_volume_output)
IRM_RESULT InitialPhreeqc2Concentrations(std::vector< double > &destination_c, const std::vector< int > &boundary_solution1, const std::vector< int > &boundary_solution2, const std::vector< double > &fraction1)
IRM_RESULT GetSpeciesConcentrations(std::vector< double > &species_conc_output)
const std::vector< std::string > & GetSurfaceNames(void) const
Definition PhreeqcRM.h:2794
static std::string Char2TrimString(const char *str, size_t l=0)
IRM_RESULT GetSpeciesLog10Gammas(std::vector< double > &species_log10gammas)
IRM_RESULT SetIthSpeciesConcentration(int i, std::vector< double > &c)
IRM_RESULT SetPrintChemistryMask(const std::vector< int > &cell_mask)
IRM_RESULT GetConcentrations(std::vector< double > &c_output)
IRM_RESULT SpeciesConcentrations2Module(const std::vector< double > &species_conc)
int GetSelectedOutputRowCount(void)
IRM_RESULT GetSelectedOutputHeading(int icol, std::string &heading)
void DecodeError(int result)
bool GetPartitionUZSolids(void) const
Definition PhreeqcRM.h:1684
IRM_RESULT GetGasCompPhi(std::vector< double > &gas_phi)
int GetMpiMyself(void) const
Definition PhreeqcRM.h:1580
const std::vector< std::string > & GetSolidSolutionNames(void) const
Definition PhreeqcRM.h:2344
const std::vector< std::string > & GetComponents(void) const
Definition PhreeqcRM.h:749
IRM_RESULT InitialSolutions2Module(const std::vector< int > &solutions)
double GetTime(void) const
Definition PhreeqcRM.h:2975
int GetEquilibriumPhasesCount(void) const
Definition PhreeqcRM.h:979
int GetMpiTasks(void) const
Definition PhreeqcRM.h:1606
IRM_RESULT SetGasPhaseVolume(const std::vector< double > &gas_volume)
IRM_RESULT StateApply(int istate)
int GetSpeciesCount(void)
Definition PhreeqcRM.h:2444
IRM_RESULT SetMpiWorkerCallbackCookie(void *cookie)
static void FileRename(const std::string &temp_name, const std::string &name, const std::string &backup_name)
const std::vector< double > & GetPressure(void)
int GetNthSelectedOutputUserNumber(int n)
const std::vector< int > & GetForwardMapping(void)
Definition PhreeqcRM.h:1166
int GetSelectedOutputColumnCount(void)
IRM_RESULT InitializeYAML(std::string yamlfile)
IRM_RESULT SetUnitsExchange(int option)
std::string GetErrorString(void)
int GetGridCellCount(void)
Definition PhreeqcRM.h:1411
IRM_RESULT GetSpeciesLog10Molalities(std::vector< double > &species_log10molalities)
IRM_RESULT ReturnHandler(IRM_RESULT result, const std::string &e_string)
IRM_RESULT InitialPhreeqc2Concentrations(std::vector< double > &destination_c, const std::vector< int > &boundary_solution1)
const std::vector< std::string > & GetSINames(void) const
Definition PhreeqcRM.h:2236
void ErrorMessage(const std::string &error_string, bool prepend=true)
const std::vector< int > & GetStartCell(void)
Definition PhreeqcRM.h:2756
int GetErrorHandlerMode(void)
Definition PhreeqcRM.h:1002
bool GetSelectedOutputOn(void)
Definition PhreeqcRM.h:2126
static int CreateReactionModule(int nxyz, int nthreads)
void OutputMessage(const std::string &str)
IRM_RESULT SetSpeciesSaveOn(bool save_on)
IRM_RESULT OpenFiles(void)
IRM_RESULT SetRebalanceFraction(double f)
int GetKineticReactionsCount(void) const
Definition PhreeqcRM.h:1554
IRM_RESULT LoadDatabase(const std::string &database)
IRM_RESULT SetSaturation(const std::vector< double > &sat)
IRM_RESULT SetMpiWorkerCallbackC(int(*fcn)(int *method, void *cookie))
IRM_RESULT SetTemperature(const std::vector< double > &t)
IPhreeqc * GetIPhreeqcPointer(int i)
IRM_RESULT InitialPhreeqc2Module(const std::vector< int > &initial_conditions1)
IRM_RESULT SetPressure(const std::vector< double > &p)
const std::vector< std::vector< int > > & GetBackwardMapping(void)
Definition PhreeqcRM.h:678
IRM_RESULT SetUnitsSolution(int option)
IRM_RESULT InitialSurfaces2Module(const std::vector< int > &surfaces)
double GetTimeStep(void)
Definition PhreeqcRM.h:3024
int GetUnitsExchange(void)
Definition PhreeqcRM.h:3049
static void CleanupReactionModuleInstances(void)
IRM_RESULT SetIthConcentration(int i, std::vector< double > &c)
IRM_RESULT SetTimeStep(double time_step)
const std::vector< IPhreeqcPhast * > & GetWorkers()
Definition PhreeqcRM.h:3274
IRM_RESULT SetDensityUser(const std::vector< double > &density)
IRM_RESULT CreateMapping(const std::vector< int > &grid2chem)
std::string GetFilePrefix(void)
Definition PhreeqcRM.h:1145
const std::vector< double > & GetSpeciesZ(void)
Definition PhreeqcRM.h:2721
IRM_RESULT SetCurrentSelectedOutputUserNumber(int n_user)
int GetSICount(void) const
Definition PhreeqcRM.h:2202
IRM_RESULT SetUnitsSurface(int option)
double GetTimeConversion(void)
Definition PhreeqcRM.h:3000
IRM_RESULT GetDensity(std::vector< double > &d_output)
double GetRebalanceFraction(void) const
Definition PhreeqcRM.h:1848
void WarningMessage(const std::string &warnstr)
const std::vector< double > & GetSolutionVolume(void)
IRM_RESULT SetErrorHandlerMode(int mode)
int GetGasComponentsCount(void) const
Definition PhreeqcRM.h:1225
IRM_RESULT SetSaturationUser(const std::vector< double > &sat)
const std::vector< std::string > & GetSurfaceTypes(void) const
Definition PhreeqcRM.h:2905
IRM_RESULT InitialKinetics2Module(const std::vector< int > &kinetics)
IRM_RESULT SetGasCompMoles(const std::vector< double > &gas_moles)
IRM_RESULT GetSelectedOutput(std::vector< double > &s_output)
const std::vector< std::string > & GetEquilibriumPhases(void) const
Definition PhreeqcRM.h:951
IRM_RESULT GetGasCompMoles(std::vector< double > &gas_moles_output)
IRM_RESULT SetRebalanceByCell(bool tf)
IRM_RESULT InitialExchanges2Module(const std::vector< int > &exchanges)
IRM_RESULT SetComponentH2O(bool tf)
IRM_RESULT InitialPhreeqcCell2Module(int n, const std::vector< int > &cell_numbers)
IRM_RESULT SetTimeConversion(double conv_factor)
IRM_RESULT StateDelete(int istate)
IRM_RESULT SetRepresentativeVolume(const std::vector< double > &rv)
void UseSolutionDensityVolume(bool tf)
const std::vector< double > & GetViscosity()
const std::vector< bool > & GetPrintChemistryOn(void)
Definition PhreeqcRM.h:1799
const std::vector< std::string > & GetSurfaceSpecies(void) const
Definition PhreeqcRM.h:2831
static bool FileExists(const std::string &name)
IRM_RESULT GetGasCompPressures(std::vector< double > &gas_pressure)
IRM_RESULT SetConcentrations(const std::vector< double > &c)
IRM_RESULT GetIthConcentration(int i, std::vector< double > &c_output)
IRM_RESULT MpiWorkerBreak()
IRM_RESULT DumpModule(bool dump_on, bool append=false)
void ErrorHandler(int result, const std::string &e_string)
int GetUnitsSurface(void)
Definition PhreeqcRM.h:3229
int GetSurfaceSpeciesCount(void) const
Definition PhreeqcRM.h:2865
int GetUnitsSolution(void)
Definition PhreeqcRM.h:3179
IRM_RESULT SetDensity(const std::vector< double > &density)
int GetUnitsGasPhase(void)
Definition PhreeqcRM.h:3074
IRM_RESULT SetUnitsGasPhase(int option)
Definition PhreeqcRM.h:128
static std::map< size_t, T * > _Instances
Definition PhreeqcRM.h:244
static IRM_RESULT Destroy(int id)
Definition PhreeqcRM.h:174
static Derived * GetInstance(int id)
Definition PhreeqcRM.h:160
static size_t _InstancesIndex
Definition PhreeqcRM.h:245
size_t _Index
Definition PhreeqcRM.h:241
StaticIndexer(T *self)
Definition PhreeqcRM.h:130
int GetIndex()
Definition PhreeqcRM.h:235
~StaticIndexer()
Definition PhreeqcRM.h:137
static void DestroyAll()
Definition PhreeqcRM.h:202
static std::mutex _InstancesLock
Definition PhreeqcRM.h:243
static T * GetInstance(int id)
Definition PhreeqcRM.h:148