Loading...
Searching...
No Matches
PhaseCheckBase.hpp
/*
Copyright 2024 Equinor AS
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PHASE_CHECK_BASE_HPP_INCLUDED
#define PHASE_CHECK_BASE_HPP_INCLUDED
#include <opm/simulators/utils/satfunc/SatfuncConsistencyChecks.hpp>
namespace Opm::Satfunc::PhaseChecks {
template <typename Scalar>
class PhaseCheckBase : public SatfuncConsistencyChecks<Scalar>::Check
{
public:
void test(const EclEpsScalingPointsInfo<Scalar>& endPoints) override;
bool isViolated() const override;
bool isCritical() const override;
protected:
void setViolated();
void setCritical();
private:
unsigned char flags_{0};
virtual void testImpl(const EclEpsScalingPointsInfo<Scalar>& endPoints) = 0;
};
} // namespace Opm::Satfunc::PhaseChecks
#endif // PHASE_CHECK_BASE_HPP_INCLUDED
Opm::SatfuncConsistencyChecks
Platform for running sets of consistency checks against collection of saturation function end-points.
Definition SatfuncConsistencyChecks.hpp:46
Opm::Satfunc::PhaseChecks::PhaseCheckBase
Base class for all phase saturation function consistency checks.
Definition PhaseCheckBase.hpp:35
Opm::Satfunc::PhaseChecks::PhaseCheckBase::isCritical
bool isCritical() const override
Whether or not this check is critical to the simulator's ability to run the case.
Definition PhaseCheckBase.cpp:48
Opm::Satfunc::PhaseChecks::PhaseCheckBase::setViolated
void setViolated()
Mark check as violated.
Definition PhaseCheckBase.cpp:54
Opm::Satfunc::PhaseChecks::PhaseCheckBase::setCritical
void setCritical()
Mark check as violated at critical level.
Definition PhaseCheckBase.cpp:60
Opm::Satfunc::PhaseChecks::PhaseCheckBase::isViolated
bool isViolated() const override
Whether or not last set of end-points violated this particular check.
Definition PhaseCheckBase.cpp:42
Opm::Satfunc::PhaseChecks::PhaseCheckBase::test
void test(const EclEpsScalingPointsInfo< Scalar > &endPoints) override
Run specific check against a set of saturation function end-points.
Definition PhaseCheckBase.cpp:34
Opm::EclEpsScalingPointsInfo
Definition SatfuncCheckPointInterface.hpp:28