ScaledSatfuncCheckPoint.hpp
Go to the documentation of this file.
1/*
2 Copyright 2024 Equinor AS
3
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef SCALED_SATFUNC_CHECKPOINT_HPP_INCLUDED
21#define SCALED_SATFUNC_CHECKPOINT_HPP_INCLUDED
22
25
26#include <cstddef>
27#include <functional>
28#include <optional>
29
30namespace Opm {
31 class EclipseState;
32 class EclEpsGridProperties;
33
34 template <typename Scalar>
35 struct EclEpsScalingPointsInfo;
36} // namespace Opm
37
39
44 template <typename Scalar>
46 {
47 public:
50 using LocalToGlobal = std::function<std::size_t(const int)>;
51
66 const EclipseState* eclipseState,
67 const EclEpsGridProperties* epsGridProps,
68 const LocalToGlobal& localToGlobal)
69 : unscaled_ { unscaled }
70 , eclipseState_ { eclipseState }
71 , epsGridProps_ { epsGridProps }
72 , localToGlobal_ { localToGlobal }
73 {}
74
81 std::optional<std::size_t> pointID(const int cellIdx) const override
82 {
83 return { this->localToGlobal_(cellIdx) };
84 }
85
91 void populateCheckPoint(const int cellIdx,
92 EclEpsScalingPointsInfo<Scalar>& endPoints) const override;
93
94 private:
98
101 const EclipseState* eclipseState_{nullptr};
102
104 const EclEpsGridProperties* epsGridProps_{nullptr};
105
108 LocalToGlobal localToGlobal_{};
109 };
110
111} // namespace Opm::Satfunc::PhaseChecks
112
113#endif // SCALED_SATFUNC_CHECKPOINT_HPP_INCLUDED
Definition: ScaledSatfuncCheckPoint.hpp:46
std::function< std::size_t(const int)> LocalToGlobal
Definition: ScaledSatfuncCheckPoint.hpp:50
ScaledSatfuncCheckPoint(const UnscaledSatfuncCheckPoint< Scalar > &unscaled, const EclipseState *eclipseState, const EclEpsGridProperties *epsGridProps, const LocalToGlobal &localToGlobal)
Definition: ScaledSatfuncCheckPoint.hpp:65
std::optional< std::size_t > pointID(const int cellIdx) const override
Definition: ScaledSatfuncCheckPoint.hpp:81
void populateCheckPoint(const int cellIdx, EclEpsScalingPointsInfo< Scalar > &endPoints) const override
Definition: UnscaledSatfuncCheckPoint.hpp:47
Definition: GasPhaseConsistencyChecks.hpp:29
Definition: blackoilboundaryratevector.hh:39
Definition: SatfuncCheckPointInterface.hpp:28
Definition: SatfuncCheckPointInterface.hpp:40