Cells.hpp
Go to the documentation of this file.
1/*
2 Copyright 2016 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_OUTPUT_CELLS_HPP
21#define OPM_OUTPUT_CELLS_HPP
22
23#include <map>
24#include <vector>
25
27
28namespace Opm {
29
30namespace data {
31
32
33 /*
34 The 3D data which are saved to file are assembled in one large
35 container. In the container the data is tagged with an element
36 from the TargetType enum which indicates why they they have been
37 added to the container - and where they are headed.
38
39 RESTART_SOLUTION : Fields which represent primary variables, and
40 are reqired for restart. Typically pressure and
41 suturation. WIll end up in the SOLUTION section of the restart
42 file.
43
44 RESTART_AUXILIARY : Fields with extra information, not required
45 for restart. Examples of this include fluid in place values or
46 evaluations of relative permeability. Will end up in the
47 restart file.
48
49 SUMMARY : Fields which are added only to serve as input data for
50 calculations of summary results. The Summary implementation can
51 use data with any tag value, but if it is tagged as SUMMARY it
52 will not be output anywhere else.
53
54 INIT : Fields which should go to the INIT file.
55 */
56
57
58 enum class TargetType {
61 SUMMARY,
62 INIT,
63 };
64
68 struct CellData {
69 UnitSystem::measure dim; //< Dimension of the data to write
70 std::vector<double> data; //< The actual data itself
72
73 bool operator==(const CellData& cell2) const
74 {
75 return dim == cell2.dim &&
76 data == cell2.data &&
77 target == cell2.target;
78 }
79 };
80
81}
82}
83
84#endif //OPM_OUTPUT_CELLS_HPP
measure
Definition: UnitSystem.hpp:42
TargetType
Definition: Cells.hpp:58
Definition: A.hpp:4
static std::string data()
Definition: exprtk.hpp:40022
Definition: Cells.hpp:68
UnitSystem::measure dim
Definition: Cells.hpp:69
std::vector< double > data
Definition: Cells.hpp:70
TargetType target
Definition: Cells.hpp:71
bool operator==(const CellData &cell2) const
Definition: Cells.hpp:73