opm-common
Toggle main menu visibility
Loading...
Searching...
No Matches
value_status.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 VALUE_STATUS
21
#define VALUE_STATUS
22
23
namespace
Opm::value {
24
25
enum class
status :
unsigned
char
{
26
uninitialized = 0,
27
deck_value = 1,
28
empty_default = 2,
29
valid_default = 3,
30
};
31
32
inline
bool
defaulted(
const
status st)
33
{
34
return
(st == status::empty_default)
35
|| (st == status::valid_default);
36
}
37
38
inline
bool
has_value(
const
status st)
39
{
40
return
(st == status::deck_value)
41
|| (st == status::valid_default);
42
43
}
44
45
}
// namespace Opm::value
46
47
#endif
// VALUE_STATUS
opm
input
eclipse
Deck
value_status.hpp
Generated by
1.17.0