opm-common
AggregateActionxData.hpp
1 /*
2  Copyright (c) 2018 Statoil ASA
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 OPM_AGGREGATE_Actionx_DATA_HPP
21 #define OPM_AGGREGATE_Actionx_DATA_HPP
22 
24 
25 #include <opm/io/eclipse/PaddedOutputString.hpp>
26 
27 #include <cstddef>
28 #include <vector>
29 
30 namespace Opm {
31  class Actdims;
32  class Schedule;
33  class SummaryState;
34  class UDQInput;
35 } // namespace Opm
36 
37 namespace Opm { namespace Action {
38  class State;
39 }} // Opm::Action
40 
41 namespace Opm { namespace RestartIO { namespace Helpers {
42 
44 {
45 public:
47  const Opm::Action::State& action_state,
48  const Opm::SummaryState& st,
49  const std::size_t simStep);
50 
51  const std::vector<int>& getIACT() const
52  {
53  return this->iACT_.data();
54  }
55 
56  const std::vector<float>& getSACT() const
57  {
58  return this->sACT_.data();
59  }
60 
61  const std::vector<EclIO::PaddedOutputString<8>>& getZACT() const
62  {
63  return this->zACT_.data();
64  }
65 
66  const std::vector<EclIO::PaddedOutputString<8>>& getZLACT() const
67  {
68  return this->zLACT_.data();
69  }
70 
71  const std::vector<EclIO::PaddedOutputString<8>>& getZACN() const
72  {
73  return this->zACN_.data();
74  }
75 
76  const std::vector<int>& getIACN() const
77  {
78  return this->iACN_.data();
79  }
80 
81  // Note: Type 'double' despite the S* name.
82  const std::vector<double>& getSACN() const
83  {
84  return this->sACN_.data();
85  }
86 
87 private:
88  AggregateActionxData(const std::vector<int>& rst_dims,
89  std::size_t num_actions,
90  const Opm::Actdims& actdims,
91  const Opm::Schedule& sched,
92  const Opm::Action::State& action_state,
93  const Opm::SummaryState& st,
94  const std::size_t simStep);
95 
97  WindowedArray<int> iACT_;
98 
100  WindowedArray<float> sACT_;
101 
104 
107 
110 
112  WindowedArray<int> iACN_;
113 
116 
117 };
118 
119 }}} // Opm::RestartIO::Helpers
120 
121 #endif //OPM_AGGREGATE_WELL_DATA_HPP
Definition: Actdims.hpp:30
const std::vector< T > & data() const
Get read-only access to full, linearised data items for all windows.
Definition: WindowedArray.hpp:137
Definition: Schedule.hpp:100
Definition: AggregateActionxData.hpp:43
Management information about the current run&#39;s ACTION system, especially concerning the number of tim...
Definition: State.hpp:50
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Definition: SummaryState.hpp:72
Provide facilities to simplify constructing restart vectors such as IWEL or RSEG. ...
auto data() const -> decltype(std::declval< const WindowedArray< T >>().data())
Get read-only access to full, linearised data items for all windows.
Definition: WindowedArray.hpp:256