ParserAdditions.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2014 by Andreas Lauser
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_UPSCALING_PARSER_ADDITIONS_HPP
21 #define OPM_UPSCALING_PARSER_ADDITIONS_HPP
22 
23 #include <opm/parser/eclipse/Parser/Parser.hpp>
24 #include <opm/parser/eclipse/Parser/ParserKeyword.hpp>
25 #include <opm/json/JsonObject.hpp>
26 
27 namespace Opm {
28 
36 inline void addNonStandardUpscalingKeywords(Opm::ParserPtr parser)
37 {
38  const char *rhoJsonData =
39  "{\"name\" : \"RHO\", \"sections\" : [], \"data\" : {\"value_type\" : \"DOUBLE\" }}\n";
40 
41  Json::JsonObject rhoJson(rhoJsonData);
42  parser->addParserKeyword( std::make_shared<const ParserKeyword>( rhoJson ));
43 }
44 
45 }
46 
47 #endif
Definition: applier.hpp:18
void addNonStandardUpscalingKeywords(Opm::ParserPtr parser)
This function registers the non-standard keywords used by opm-upscaling in a parser object...
Definition: ParserAdditions.hpp:36