My Project
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 = 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.
 
SatfuncConsistencyCheckManagercollectFailuresTo (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
ScalarElement type. Typically float or double.

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]numSamplePointsUpper 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]eclipseStateContainer of static properties such as the scaled saturation function end-points.
[in]localToGlobalCallback 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]rootFailure 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]levelReport's severity level.
[in]emitReportRecordCall-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
GridViewDune grid view type.
GetCellIndexCallback 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)
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
in which Element is the type representing a co-dimension zero entity in the grid view.
Parameters
[in]gvGrid 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]getCellIndexCallback 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: