iphreeqc/litephreeqc/test/IPhreeqcReader.hpp
Max Lübke 85762ad3f3 chore: Add LICENSE.txt for poet directory
refactor: Rename 'poet' directory to 'litephreeqc'
2025-10-28 09:39:40 +01:00

29 lines
701 B
C++

#pragma once
#include "IPhreeqc.hpp"
#include <cstdint>
#include <map>
#include <memory>
#include <string>
class IPhreeqcReader {
public:
IPhreeqcReader(const std::string &database, const std::string &script);
void setOutputID(std::uint32_t cell_id);
double operator[](const std::string &name) const;
void run(double dt, std::vector<std::uint32_t> &&cell_ids);
private:
std::unique_ptr<IPhreeqc> _m_pqc;
std::string _m_raw_output = "";
const std::map<std::string, std::string> _m_rename_map = {
{"H", "-total_h"}, {"O", "-total_o"}, {"Charge", "-cb"},
{"tc", "-temp"}, {"patm", "-pressure"}, {"SolVol", "-soln_vol"},
{"pH", "-pH"}, {"pe", "-pe"}};
};