EclipseWriteRFTHandler.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2015 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_ECLIPSE_WRITE_RFT_HANDLER_HPP
21 #define OPM_ECLIPSE_WRITE_RFT_HANDLER_HPP
22 
26 
27 #include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
28 
29 #include <ert/ecl/ecl_rft_node.h>
30 #include <ert/ecl/ecl_util.h>
31 
32 
33 namespace Opm {
34 namespace EclipseWriterDetails {
35 
36 
38 
39  public:
40  EclipseWriteRFTHandler(const int * compressedToCartesianCellIdx, size_t numCells, size_t cartesianSize);
41 
42 
43  void writeTimeStep(const std::string& filename,
44  const ert_ecl_unit_enum ecl_unit,
45  const SimulatorTimerInterface& simulatorTimer,
46  std::vector<WellConstPtr>& wells,
47  EclipseGridConstPtr eclipseGrid,
48  std::vector<double>& pressure,
49  std::vector<double>& swat,
50  std::vector<double>& sgas);
51 
52 
53 
54  private:
55 
56  ecl_rft_node_type * createEclRFTNode(WellConstPtr well,
57  const SimulatorTimerInterface& simulatorTimer,
58  EclipseGridConstPtr eclipseGrid,
59  const std::vector<double>& pressure,
60  const std::vector<double>& swat,
61  const std::vector<double>& sgas);
62 
63  void initGlobalToActiveIndex(const int * compressedToCartesianCellIdx, size_t numCells, size_t cartesianSize);
64 
65  std::vector<int> globalToActiveIndex_;
66 
67  };
68 
69 
70 
71 
72 }//namespace EclipseWriterDetails
73 }//namespace Opm
74 
75 
76 #endif //OPM_ECLIPSE_WRITE_RFT_HANDLER_HPP
void writeTimeStep(const std::string &filename, const ert_ecl_unit_enum ecl_unit, const SimulatorTimerInterface &simulatorTimer, std::vector< WellConstPtr > &wells, EclipseGridConstPtr eclipseGrid, std::vector< double > &pressure, std::vector< double > &swat, std::vector< double > &sgas)
EclipseWriteRFTHandler(const int *compressedToCartesianCellIdx, size_t numCells, size_t cartesianSize)
Definition: AnisotropicEikonal.hpp:43
int numCells(const UnstructuredGrid &grid)
Get the number of cells of a grid.
Interface class for SimulatorTimer objects, to be improved.
Definition: SimulatorTimerInterface.hpp:33
Definition: EclipseWriteRFTHandler.hpp:37