25 std::size_t
const num_chemical_systems)
31 std::string aqueous_solution_prev;
32 std::size_t chemical_system_id = 0;
33 while (std::getline(in, line))
35 if (line.find(
"USE reaction_pressure none") != std::string::npos)
40 if (line.find(
"SOLUTION_RAW") != std::string::npos)
42 aqueous_solution_prev =
44 std::to_string(num_chemical_systems + chemical_system_id + 1) +
49 aqueous_solution_prev += line +
"\n";
51 if (line.find(
"-gammas") != std::string::npos)
54 aqueous_solution_prev.clear();
61 std::size_t
const num_chemical_systems)
66 std::string_view line;
67 std::string aqueous_solution_prev;
68 std::size_t chemical_system_id = 0;
71 while (pos < dump_content.size())
74 if (
const auto newline_pos = dump_content.find(
'\n', pos);
75 newline_pos == std::string_view::npos)
77 line = dump_content.substr(pos);
78 pos = dump_content.size();
82 line = dump_content.substr(pos, newline_pos - pos);
83 pos = newline_pos + 1;
87 if (!line.empty() && line.back() ==
'\r')
89 line.remove_suffix(1);
92 if (line.find(
"USE reaction_pressure none") != std::string::npos)
97 if (line.find(
"SOLUTION_RAW") != std::string::npos)
99 aqueous_solution_prev =
101 std::to_string(num_chemical_systems + chemical_system_id + 1) +
106 aqueous_solution_prev += line;
107 aqueous_solution_prev +=
"\n";
109 if (line.find(
"-gammas") != std::string::npos)
112 aqueous_solution_prev.clear();
113 ++chemical_system_id;