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(std::shared_ptr<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_; }
void setEffectiveLawParams(std::shared_ptr<EffLawParams> value)
{ effectiveLawParams_ = value.get(); }
const EffLawParams& effectiveLawParams() const
{ return *effectiveLawParams_; }
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::EclEpsConfig::enableSatScaling
bool enableSatScaling() const
Returns whether saturation scaling is enabled.
Definition EclEpsConfig.hpp:67
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
A default implementation of the parameters for the material law adapter class which implements ECL en...
Definition EclEpsTwoPhaseLawParams.hpp:47
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::setConfig
void setConfig(std::shared_ptr< EclEpsConfig > value)
Set the endpoint scaling configuration object.
Definition EclEpsTwoPhaseLawParams.hpp:77
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:119
Opm::EclEpsTwoPhaseLawParams::effectiveLawParams
const EffLawParams & effectiveLawParams() const
Returns the parameter object for the effective/nested material law.
Definition EclEpsTwoPhaseLawParams.hpp:125
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
Default implementation for asserting finalization of parameter objects.
Definition EnsureFinalized.hpp:49
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30