opm-simulators
SatfuncCheckPointInterface.hpp
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 SATFUNC_CHECKPOINT_INTERFACE_HPP_INCLUDED
21 #define SATFUNC_CHECKPOINT_INTERFACE_HPP_INCLUDED
22 
23 #include <cstddef>
24 #include <optional>
25 
26 namespace Opm {
27  template <typename Scalar>
29 } // namespace Opm
30 
31 namespace Opm::Satfunc::PhaseChecks {
32 
38  template <typename Scalar>
40  {
42  virtual ~SatfuncCheckPointInterface() = default;
43 
56  virtual std::optional<std::size_t>
57  pointID(const int cellIdx) const = 0;
58 
66  virtual void
67  populateCheckPoint(const int cellIdx,
68  EclEpsScalingPointsInfo<Scalar>& endPoints) const = 0;
69  };
70 
71 } // namespace Opm::Satfunc::PhaseChecks
72 
73 #endif // SATFUNC_CHECKPOINT_INTERFACE_HPP_INCLUDED
virtual std::optional< std::size_t > pointID(const int cellIdx) const =0
Compute locally unique, i.e., per MPI rank, ID of this check for a particular cell index...
Callback protocol for single saturation function consistency check point.
Definition: SatfuncCheckPointInterface.hpp:39
virtual void populateCheckPoint(const int cellIdx, EclEpsScalingPointsInfo< Scalar > &endPoints) const =0
Populate check point values for a particular cell.
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
virtual ~SatfuncCheckPointInterface()=default
Virtual destructor for public inheritance.
Definition: SatfuncCheckPointInterface.hpp:28