mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
105 lines
3.5 KiB
C++
105 lines
3.5 KiB
C++
#pragma once
|
|
|
|
#include <limits>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace base_test {
|
|
const std::string script = R"(SOLUTION 1
|
|
units mol/kgw
|
|
temp 25
|
|
Ca 0.1
|
|
Mg 0.1
|
|
Cl 0.5 charge
|
|
Na 0.1
|
|
PURE 1
|
|
Calcite 0.0 1
|
|
Dolomite 0.0 0
|
|
## RUN_CELLS
|
|
## -cells 1
|
|
END)";
|
|
|
|
const std::vector<std::string> expected_names = {
|
|
"ID", "H", "O", "Charge", "Ca", "Cl",
|
|
"Mg", "Na", "Calcite_eq", "Calcite_si", "Dolomite_eq", "Dolomite_si"};
|
|
|
|
const std::vector<double> expected_values = {1,
|
|
111.01243521533338,
|
|
55.506218386370165,
|
|
-4.7941959748097226e-13,
|
|
0.1,
|
|
0.5,
|
|
0.1,
|
|
0.1,
|
|
1,
|
|
0,
|
|
0,
|
|
0};
|
|
const std::vector<double> expected_errors = {
|
|
0, 1e-3, 1e-3, 1e-15, 1e-5, 1e-5, 1e-5, 1e-5, 1e-5, 0, 1e-5, 0};
|
|
|
|
const std::string phreeqc_database = R"database(@POET_PHREEQCDAT_DB@)database";
|
|
} // namespace base_test
|
|
|
|
namespace barite_test {
|
|
const std::string script = R"barite(@POET_BARITE_PQI@)barite";
|
|
const std::string database = R"barite(@POET_BARITE_DB@)barite";
|
|
|
|
const std::vector<std::string> expected_names = {"ID",
|
|
"H",
|
|
"O",
|
|
"Charge",
|
|
"Ba",
|
|
"Cl",
|
|
"S(-2)",
|
|
"S(6)",
|
|
"Sr",
|
|
"Barite",
|
|
"Barite_p1",
|
|
"Celestite",
|
|
"Celestite_p1",
|
|
"Celestite_eq",
|
|
"Celestite_si"};
|
|
|
|
const std::vector<double> expected_values_line_one = {
|
|
1,
|
|
111.01243359383071,
|
|
55.508698688362124,
|
|
-1.2153078399577636e-09,
|
|
1.0000001848805677e-12,
|
|
1.0000000116187218e-12,
|
|
0,
|
|
0.00062047270964839664,
|
|
0.00062047270964840271,
|
|
std::numeric_limits<double>::quiet_NaN(),
|
|
std::numeric_limits<double>::quiet_NaN(),
|
|
std::numeric_limits<double>::quiet_NaN(),
|
|
std::numeric_limits<double>::quiet_NaN(),
|
|
0.99937952729135193,
|
|
0};
|
|
|
|
const std::vector<double> expected_errors = {
|
|
0,
|
|
1e-3,
|
|
1e-3,
|
|
1e-15,
|
|
1e-5,
|
|
1e-5,
|
|
1e-5,
|
|
1e-5,
|
|
1e-5,
|
|
std::numeric_limits<double>::quiet_NaN(),
|
|
std::numeric_limits<double>::quiet_NaN(),
|
|
std::numeric_limits<double>::quiet_NaN(),
|
|
std::numeric_limits<double>::quiet_NaN(),
|
|
1e-5,
|
|
0};
|
|
|
|
const std::vector<std::string> expected_names_erased = {
|
|
"ID", "H", "O", "Charge", "Ba", "Cl", "S(-2)",
|
|
"S(6)", "Sr", "Barite", "Barite_p1", "Celestite", "Celestite_p1"};
|
|
|
|
const std::vector<std::string> expected_names_subset = {
|
|
"ID", "H", "O", "Charge", "Ba", "Cl",
|
|
"S(-2)", "S(6)", "Sr", "Celestite_eq", "Celestite_si"};
|
|
} // namespace barite_test
|