EclIOdata.hpp
Go to the documentation of this file.
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
25namespace Opm { namespace EclIO {
26
27 // type MESS have no assisiated data
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
const int sizeOfChar
Definition: EclIOdata.hpp:42
const unsigned int false_value
Definition: EclIOdata.hpp:35
const int numColumnsInte
Definition: EclIOdata.hpp:57
const int MaxBlockSizeLogi
Definition: EclIOdata.hpp:47
const int numColumnsChar
Definition: EclIOdata.hpp:61
const int sizeOfDoub
Definition: EclIOdata.hpp:40
const unsigned int true_value_ecl
Definition: EclIOdata.hpp:33
const int numColumnsReal
Definition: EclIOdata.hpp:58
const int MaxNumBlockChar
Definition: EclIOdata.hpp:55
const int MaxBlockSizeChar
Definition: EclIOdata.hpp:48
const int MaxNumBlockDoub
Definition: EclIOdata.hpp:53
const int columnWidthInte
Definition: EclIOdata.hpp:63
eclArrType
Definition: EclIOdata.hpp:28
@ MESS
Definition: EclIOdata.hpp:29
@ CHAR
Definition: EclIOdata.hpp:29
@ DOUB
Definition: EclIOdata.hpp:29
@ LOGI
Definition: EclIOdata.hpp:29
@ INTE
Definition: EclIOdata.hpp:29
@ REAL
Definition: EclIOdata.hpp:29
@ C0NN
Definition: EclIOdata.hpp:29
const int MaxBlockSizeDoub
Definition: EclIOdata.hpp:46
const int MaxBlockSizeInte
Definition: EclIOdata.hpp:44
const int columnWidthLogi
Definition: EclIOdata.hpp:66
const int numColumnsDoub
Definition: EclIOdata.hpp:59
const int columnWidthChar
Definition: EclIOdata.hpp:67
const unsigned int true_value_ix
Definition: EclIOdata.hpp:34
const int MaxNumBlockLogi
Definition: EclIOdata.hpp:54
const int sizeOfInte
Definition: EclIOdata.hpp:38
const int MaxNumBlockReal
Definition: EclIOdata.hpp:52
const int sizeOfLogi
Definition: EclIOdata.hpp:41
const int columnWidthDoub
Definition: EclIOdata.hpp:65
const int MaxBlockSizeReal
Definition: EclIOdata.hpp:45
const int numColumnsLogi
Definition: EclIOdata.hpp:60
const int sizeOfReal
Definition: EclIOdata.hpp:39
const int columnWidthReal
Definition: EclIOdata.hpp:64
const int MaxNumBlockInte
Definition: EclIOdata.hpp:51
Definition: A.hpp:4