/*
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 .
*/
#include
#include
namespace {
constexpr auto one_bit = static_cast(1);
constexpr auto failed_bit = one_bit << 0u;
constexpr auto critical_bit = one_bit << 1u;
}
// ===========================================================================
template
void Opm::Satfunc::PhaseChecks::PhaseCheckBase::
test(const EclEpsScalingPointsInfo& endPoints)
{
this->flags_ = static_cast(0);
this->testImpl(endPoints);
}
template
bool Opm::Satfunc::PhaseChecks::PhaseCheckBase::isViolated() const
{
return (this->flags_ & failed_bit) != 0;
}
template
bool Opm::Satfunc::PhaseChecks::PhaseCheckBase::isCritical() const
{
return (this->flags_ & critical_bit) != 0;
}
template
void Opm::Satfunc::PhaseChecks::PhaseCheckBase::setViolated()
{
this->flags_ |= failed_bit;
}
template
void Opm::Satfunc::PhaseChecks::PhaseCheckBase::setCritical()
{
this->flags_ |= critical_bit;
}
// ===========================================================================
// Explicit Specialisations of PhaseCheckBase Templates
//
// No other code below this separator
// ===========================================================================
template class Opm::Satfunc::PhaseChecks::PhaseCheckBase;
template class Opm::Satfunc::PhaseChecks::PhaseCheckBase;