Loading...
Searching...
No Matches
EclEpsTwoPhaseLawParams.hpp
Go to the documentation of this file.
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*
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 2 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/>.
Consult the COPYING file in the top-level source directory of this
module for the precise wording of the license and the list of
copyright holders.
*/
#ifndef OPM_ECL_EPS_TWO_PHASE_LAW_PARAMS_HPP
#define OPM_ECL_EPS_TWO_PHASE_LAW_PARAMS_HPP
#include "EclEpsConfig.hpp"
#include "EclEpsScalingPoints.hpp"
#include <memory>
#include <cassert>
#include <opm/material/common/EnsureFinalized.hpp>
namespace Opm {
template <class EffLawT>
class EclEpsTwoPhaseLawParams : public EnsureFinalized
{
using EffLawParams = typename EffLawT::Params;
using Scalar = typename EffLawParams::Traits::Scalar;
public:
using Traits = typename EffLawParams::Traits;
using ScalingPoints = EclEpsScalingPoints<Scalar>;
EclEpsTwoPhaseLawParams()
{
}
void finalize()
{
#ifndef NDEBUG
if (config_.enableSatScaling()) {
assert(unscaledPoints_);
}
assert(effectiveLawParams_);
#endif
EnsureFinalized :: finalize();
}
void setConfig(const EclEpsConfig& value)
{ config_ = value; }
const EclEpsConfig& config() const
{ return config_; }
void setUnscaledPoints(std::shared_ptr<ScalingPoints> value)
{ unscaledPoints_ = value.get(); }
const ScalingPoints& unscaledPoints() const
{ return *unscaledPoints_; }
void setScaledPoints(const ScalingPoints& value)
{ scaledPoints_ = value; }
const ScalingPoints& scaledPoints() const
{ return scaledPoints_; }
ScalingPoints& scaledPoints()
{ return scaledPoints_; }
Scalar SnTrapped([[maybe_unused]] bool maximumTrapping) const
{
return 0.0;
}
Scalar SnStranded([[maybe_unused]] Scalar sg, [[maybe_unused]] Scalar krg) const
{
return 0.0;
}
Scalar SwTrapped() const
{
return 0.0;
}
void setEffectiveLawParams(std::shared_ptr<EffLawParams> value)
{ effectiveLawParams_ = value.get(); }
const EffLawParams& effectiveLawParams() const
{ return *effectiveLawParams_; }
template<class Serializer>
void serializeOp(Serializer&)
{
// Do nothing, this class has no dynamic state!
// It is still somewhat useful to have this function,
// as then we do not need to embed that knowledge in
// other classes that may contain this one.
}
private:
EffLawParams* effectiveLawParams_{};
EclEpsConfig config_;
ScalingPoints* unscaledPoints_{};
ScalingPoints scaledPoints_;
};
} // namespace Opm
#endif
EclEpsConfig.hpp
Specifies the configuration used by the endpoint scaling code.
EclEpsScalingPoints.hpp
EnsureFinalized.hpp
Default implementation for asserting finalization of parameter objects.
Opm::EclEpsConfig
Specifies the configuration used by the endpoint scaling code.
Definition EclEpsConfig.hpp:56
Opm::EclEpsScalingPoints
Represents the points on the X and Y axis to be scaled if endpoint scaling is used.
Definition EclEpsScalingPoints.hpp:155
Opm::EclEpsTwoPhaseLawParams::finalize
void finalize()
Calculate all dependent quantities once the independent quantities of the parameter object have been ...
Definition EclEpsTwoPhaseLawParams.hpp:63
Opm::EclEpsTwoPhaseLawParams::config
const EclEpsConfig & config() const
Returns the endpoint scaling configuration object.
Definition EclEpsTwoPhaseLawParams.hpp:83
Opm::EclEpsTwoPhaseLawParams::scaledPoints
ScalingPoints & scaledPoints()
Returns the scaling points which are seen by the physical model.
Definition EclEpsTwoPhaseLawParams.hpp:113
Opm::EclEpsTwoPhaseLawParams::unscaledPoints
const ScalingPoints & unscaledPoints() const
Returns the scaling points which are seen by the nested material law.
Definition EclEpsTwoPhaseLawParams.hpp:95
Opm::EclEpsTwoPhaseLawParams::setEffectiveLawParams
void setEffectiveLawParams(std::shared_ptr< EffLawParams > value)
Sets the parameter object for the effective/nested material law.
Definition EclEpsTwoPhaseLawParams.hpp:134
Opm::EclEpsTwoPhaseLawParams::setConfig
void setConfig(const EclEpsConfig &value)
Set the endpoint scaling configuration object.
Definition EclEpsTwoPhaseLawParams.hpp:77
Opm::EclEpsTwoPhaseLawParams::effectiveLawParams
const EffLawParams & effectiveLawParams() const
Returns the parameter object for the effective/nested material law.
Definition EclEpsTwoPhaseLawParams.hpp:140
Opm::EclEpsTwoPhaseLawParams::setScaledPoints
void setScaledPoints(const ScalingPoints &value)
Set the scaling points which are seen by the physical model.
Definition EclEpsTwoPhaseLawParams.hpp:101
Opm::EclEpsTwoPhaseLawParams::scaledPoints
const ScalingPoints & scaledPoints() const
Returns the scaling points which are seen by the physical model.
Definition EclEpsTwoPhaseLawParams.hpp:107
Opm::EclEpsTwoPhaseLawParams::setUnscaledPoints
void setUnscaledPoints(std::shared_ptr< ScalingPoints > value)
Set the scaling points which are seen by the nested material law.
Definition EclEpsTwoPhaseLawParams.hpp:89
Opm::EnsureFinalized::EnsureFinalized
OPM_HOST_DEVICE EnsureFinalized()
The default constructor.
Definition EnsureFinalized.hpp:58
Opm::Serializer
Class for (de-)serializing.
Definition Serializer.hpp:94
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30