Loading...
Searching...
No Matches
Opm::Satfunc::PhaseChecks::SatfuncConsistencyCheckManager< Scalar > Class Template Reference

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
| Call-back function type for outputting a single record of a consistency condition violation report.
using | 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.

## Detailed Description

template<typename Scalar>
class Opm::Satfunc::PhaseChecks::SatfuncConsistencyCheckManager< Scalar >

Define and execute saturation function consistency checks for all cells in model.

Template Parameters

  Scalar | Element type. Typically `float` or `double`.

## Member Typedef Documentation

## ReportRecordOutput

template<typename Scalar>

using Opm::Satfunc::PhaseChecks::SatfuncConsistencyCheckManager< Scalar >::ReportRecordOutput

Initial value:
typename
SatfuncConsistencyChecks<Scalar>::ReportRecordOutput
Opm::SatfuncConsistencyChecks::ReportRecordOutput
std::function< void(std::string_view)> ReportRecordOutput
Call-back function type for outputting a single record of a consistency condition violation report.
Definition SatfuncConsistencyChecks.hpp:122

Call-back function type for outputting a single record of a consistency condition violation report.

## ViolationLevel

template<typename Scalar>

using Opm::Satfunc::PhaseChecks::SatfuncConsistencyCheckManager< Scalar >::ViolationLevel

Initial value:
typename
SatfuncConsistencyChecks<Scalar>::ViolationLevel
Opm::SatfuncConsistencyChecks::ViolationLevel
ViolationLevel
Severity level for consistency condition violation.
Definition SatfuncConsistencyChecks.hpp:107

Severity level for consistency condition violation.

## Constructor & Destructor Documentation

## SatfuncConsistencyCheckManager()

template<typename Scalar>

Opm::Satfunc::PhaseChecks::SatfuncConsistencyCheckManager< Scalar >::SatfuncConsistencyCheckManager | ( | const std::size_t | numSamplePoints,
|  | const EclipseState & | eclipseState,
|  | const LocalToGlobal & | localToGlobal )

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.

Parameters

  [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.

## Member Function Documentation

## collectFailuresTo()

template<typename Scalar>

SatfuncConsistencyCheckManager & Opm::Satfunc::PhaseChecks::SatfuncConsistencyCheckManager< Scalar >::collectFailuresTo | ( | const int | root | ) |

inline

Set rank to which failure reports should be collected.

Parameters

  [in] | root | Failure report destination rank. Should normally be the run's I/O rank.

Returns
  *this

## reportFailures()

template<typename Scalar>

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().

Parameters

  [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() . It is the responsibility of emitReportRecord() to properly display the text lines to end users.

## run()

template<typename Scalar>
template<typename GridView, typename GetCellIndex>

void Opm::Satfunc::PhaseChecks::SatfuncConsistencyCheckManager< Scalar >::run | ( | const GridView & | gv,
|  | GetCellIndex && | getCellIndex )

inline

Execute collection of saturation function consistency checks for all cells in simulation model.

Template Parameters

  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 int operator()(const Element& e) in which `Element` is the type representing a co-dimension zero entity in the grid view.

Parameters

  [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.

The documentation for this class was generated from the following files:

- opm/simulators/utils/satfunc/SatfuncConsistencyCheckManager.hpp
- opm/simulators/utils/satfunc/SatfuncConsistencyCheckManager.cpp