My Project
PartiallySupportedFlowKeywords.hpp
1 /*
2  Copyright 2021 Equinor.
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_PARTIALLYSUPPORTEDFLOWKEYWORDS_HEADER_INCLUDED
21 #define OPM_PARTIALLYSUPPORTEDFLOWKEYWORDS_HEADER_INCLUDED
22 
23 
24 #include <opm/simulators/flow/KeywordValidation.hpp>
25 
26 #include <string>
27 
28 /*
29  Here keywords are defined that are supported by flow, but have items that
30  are only partially supported.
31 
32  The keywords are specified in a mapping with the keyword names as keys, and
33  values that describe the set of supported items. These are described by a
34  mapping from the item name to a struct of properties, defined in KeywordValidation.hpp.
35 
36  This struct has the following fields:
37 
38  critical (bool) : if this is a critical error.
39  validator (function wrapper) : A function wrapper object that is used to test values.
40  message (itemal string): an optional message to add to the error reported by flow.
41 
42  For convenience there is a small class KeywordValidation::allow_values which
43  can be initialized with a list of permitted values, and used as a validator.
44 */
45 
46 namespace Opm::FlowKeywordValidation
47 {
48 
49 template <typename T>
50 const KeywordValidation::PartiallySupportedKeywords<T>& partiallySupported();
51 
52 } // namespace Opm::FlowKeywordValidation
53 
54 
55 #endif