My Project
EclIOdata.hpp
1 /*
2  Copyright 2019 Equinor 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_IO_ECLIODATA_HPP
21 #define OPM_IO_ECLIODATA_HPP
22 
23 #include <tuple>
24 
25 namespace Opm { namespace EclIO {
26 
27  // type MESS have no assisiated data
28  enum eclArrType {
29  INTE, REAL, DOUB, CHAR, LOGI, MESS, C0NN
30  };
31 
32  // named constants related to binary file format
33  const unsigned int true_value_ecl = 0xffffffff;
34  const unsigned int true_value_ix = 0x1000000;
35  const unsigned int false_value = 0x00000000;
36 
37 
38  const int sizeOfInte = 4; // number of bytes pr integer (inte) element
39  const int sizeOfReal = 4; // number of bytes pr float (real) element
40  const int sizeOfDoub = 8; // number of bytes pr double (doub) element
41  const int sizeOfLogi = 4; // number of bytes pr bool (logi) element
42  const int sizeOfChar = 8; // number of bytes pr string (char) element
43 
44  const int MaxBlockSizeInte = 4000; // Maximum block size for INTE arrays in binary files
45  const int MaxBlockSizeReal = 4000; // Maximum block size for REAL arrays in binary files
46  const int MaxBlockSizeDoub = 8000; // Maximum block size for DOUB arrays in binary files
47  const int MaxBlockSizeLogi = 4000; // Maximum block size for LOGI arrays in binary files
48  const int MaxBlockSizeChar = 840; // Maximum block size for CHAR arrays in binary files
49 
50  // named constants related to formatted file file format
51  const int MaxNumBlockInte = 1000; // maximum number of Inte values in block => hard line shift
52  const int MaxNumBlockReal = 1000; // maximum number of Real values in block => hard line shift
53  const int MaxNumBlockDoub = 1000; // maximum number of Doub values in block => hard line shift
54  const int MaxNumBlockLogi = 1000; // maximum number of Logi values in block => hard line shift
55  const int MaxNumBlockChar = 105; // maximum number of Char values in block => hard line shift
56 
57  const int numColumnsInte = 6; // number of columns for Inte values
58  const int numColumnsReal = 4; // number of columns for Real values
59  const int numColumnsDoub = 3; // number of columns for Doub values
60  const int numColumnsLogi = 25; // number of columns for Logi values
61  const int numColumnsChar = 7; // number of columns for Char values
62 
63  const int columnWidthInte = 12; // number of characters fore each Inte Element
64  const int columnWidthReal = 17; // number of characters fore each Inte Element
65  const int columnWidthDoub = 23; // number of characters fore each Inte Element
66  const int columnWidthLogi = 3; // number of characters fore each Inte Element
67  const int columnWidthChar = 11; // number of characters fore each Inte Element
68 
69 }} // namespace Opm::EclIO
70 
71 #endif // OPM_IO_ECLIODATA_HPP
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29