OGS
ClampingStats.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <cstddef>
7#include <string_view>
8
9namespace ChemistryLib
10{
11namespace PhreeqcIOData
12{
27{
28 std::string_view worst_component_name;
29 std::size_t n_cells = 0;
30 std::size_t n_values = 0;
31 std::size_t n_severe_cells = 0;
32 std::size_t n_severe_values = 0;
35
42 double clamp(double c, double warning_threshold, std::string_view name);
43
46
48 void report(double warning_threshold) const;
49};
50} // namespace PhreeqcIOData
51} // namespace ChemistryLib
std::string_view worst_component_name
aliases Component::name
std::size_t n_severe_values
total severe values clamped
std::size_t n_severe_cells
cells with a severe clamp
double clamp(double c, double warning_threshold, std::string_view name)
ClampingStats & operator+=(ClampingStats const &other)
Folds another stats object into this accumulator (identity = {}).
void report(double warning_threshold) const
WARN for severe clamps, DBUG for silent noise clamps. No-op when empty.
std::size_t n_values
total values clamped
std::size_t n_cells
cells with any clamping