My Project
|
Define and execute saturation function consistency checks for all cells in model. More...
#include <SatfuncConsistencyCheckManager.hpp>
Public Types | |
using | LocalToGlobal = std::function< std::size_t(int)> |
Callback for translating active cell index to globally unique point ID. | |
using | ReportRecordOutput = typename SatfuncConsistencyChecks< Scalar >::ReportRecordOutput |
Call-back function type for outputting a single record of a consistency condition violation report. | |
using | ViolationLevel = typename SatfuncConsistencyChecks< Scalar >::ViolationLevel |
Severity level for consistency condition violation. | |
Public Member Functions | |
SatfuncConsistencyCheckManager (const std::size_t numSamplePoints, const EclipseState &eclipseState, const LocalToGlobal &localToGlobal) | |
Constructor. | |
SatfuncConsistencyCheckManager & | collectFailuresTo (const int root) |
Set rank to which failure reports should be collected. | |
template<typename GridView , typename GetCellIndex > | |
void | run (const GridView &gv, GetCellIndex &&getCellIndex) |
Execute collection of saturation function consistency checks for all cells in simulation model. | |
bool | anyFailedStandardChecks () const |
Whether or not any checks failed at the Standard level. | |
bool | anyFailedCriticalChecks () const |
Whether or not any checks failed at the Critical level. | |
void | reportFailures (const ViolationLevel level, const ReportRecordOutput &emitReportRecord) const |
Generate textual summary output of all failed consistency checks at specific level. | |
Define and execute saturation function consistency checks for all cells in model.
Scalar | Element type. Typically float or double . |
|
explicit |
Constructor.
Creates a collection of saturation function checks based on the characteristics of the simulation model, e.g., whether or not end-point scaling is active or whether or not the run uses the alternative (three-point) scaling method.
[in] | numSamplePoints | Upper bound on the number of end-point check violations to preserve for reporting purposes. Should normally be a small number like 5 or 10. |
[in] | eclipseState | Container of static properties such as the scaled saturation function end-points. |
[in] | localToGlobal | Callback for translating active cell indices to globally unique point IDs. |
|
inline |
Set rank to which failure reports should be collected.
[in] | root | Failure report destination rank. Should normally be the run's I/O rank. |
void Opm::Satfunc::PhaseChecks::SatfuncConsistencyCheckManager< Scalar >::reportFailures | ( | const ViolationLevel | level, |
const ReportRecordOutput & | emitReportRecord | ||
) | const |
Generate textual summary output of all failed consistency checks at specific level.
Reports only those conditions/checks for which there is at least one violation.
In a parallel run this function does nothing on ranks other than the root process defined by collectFailuresTo().
[in] | level | Report's severity level. |
[in] | emitReportRecord | Call-back function for outputting a single record/line of a violation report. Typically a wrapper of OpmLog::info()
|
|
inline |
Execute collection of saturation function consistency checks for all cells in simulation model.
GridView | Dune grid view type. |
GetCellIndex | Callback function type for translating an active cell object into a numeric index. Assumed to support a function call operator of the form constexpr auto getPropValue() get the value data member of a property Definition propertysystem.hh:242 Element is the type representing a co-dimension zero entity in the grid view. |
[in] | gv | Grid view for which to analyse the saturation function consistency. Each MPI rank will analyse its interior cells only, and any failure reports will be subsequently gathered on the root process defined by collectFailuresTo(). |
[in] | getCellIndex | Callback function for computing a numeric lookup index associated to each interior element of the grid view. |