Remove Deck argument to RelpermDiagnostic

This commit is contained in:
Joakim Hove 2020-03-13 08:53:57 +01:00
parent 3c6c889623
commit 8473aa38e5
5 changed files with 6 additions and 12 deletions

View File

@ -552,7 +552,7 @@ protected:
if (enableExperiments) {
Opm::RelpermDiagnostics relpermDiagnostics;
relpermDiagnostics.diagnosis(*eclState_, *deck_, asImp_().grid());
relpermDiagnostics.diagnosis(*eclState_, asImp_().grid());
}
}
private:

View File

@ -29,7 +29,6 @@
#include <opm/common/utility/numeric/linearInterpolation.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/common/OpmLog/OpmLog.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SsfnTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/MiscTable.hpp>
@ -52,11 +51,9 @@ namespace Opm {
///eclipse data file. Errors and warings will be
///output if they're found.
///\param[in] eclState eclipse state.
///\param[in] deck ecliplise data file.
///\param[in] grid unstructured grid.
template <class GridT>
void diagnosis(const EclipseState& eclState,
const Deck& deck,
const GridT& grid);
private:
@ -95,8 +92,7 @@ namespace Opm {
void unscaledEndPointsCheck_(const EclipseState& eclState);
template <class GridT>
void scaledEndPointsCheck_(const Deck& deck,
const EclipseState& eclState,
void scaledEndPointsCheck_(const EclipseState& eclState,
const GridT& grid);
///For every table, need to deal with case by case.

View File

@ -33,7 +33,6 @@ namespace Opm {
template <class GridT>
void RelpermDiagnostics::diagnosis(const Opm::EclipseState& eclState,
const Opm::Deck& deck,
const GridT& grid)
{
OpmLog::info("\n===============Saturation Functions Diagnostics===============\n");
@ -41,12 +40,11 @@ namespace Opm {
satFamilyCheck_(eclState);
tableCheck_(eclState);
unscaledEndPointsCheck_(eclState);
scaledEndPointsCheck_(deck, eclState, grid);
scaledEndPointsCheck_(eclState, grid);
}
template <class GridT>
void RelpermDiagnostics::scaledEndPointsCheck_(const Deck& deck,
const EclipseState& eclState,
void RelpermDiagnostics::scaledEndPointsCheck_(const EclipseState& eclState,
const GridT& grid)
{
// All end points are subject to round-off errors, checks should account for it

View File

@ -454,7 +454,7 @@ namespace Opm
this->grid().switchToGlobalView();
static_cast<ParallelEclipseState&>(this->eclState()).switchToGlobalProps();
}
diagnostic.diagnosis(eclState(), deck(), this->grid());
diagnostic.diagnosis(eclState(), this->grid());
if (mpi_size_ > 1) {
this->grid().switchToDistributedView();
static_cast<ParallelEclipseState&>(this->eclState()).switchToDistributedProps();

View File

@ -53,7 +53,7 @@ BOOST_AUTO_TEST_CASE(diagnosis)
std::shared_ptr<CounterLog> counterLog = std::make_shared<CounterLog>(Log::DefaultMessageTypes);
OpmLog::addBackend( "COUNTERLOG" , counterLog );
RelpermDiagnostics diagnostics;
diagnostics.diagnosis(eclState, deck, grid);
diagnostics.diagnosis(eclState, grid);
BOOST_CHECK_EQUAL(1, counterLog->numMessages(Log::MessageType::Warning));
}
BOOST_AUTO_TEST_SUITE_END()