includeFuncEntry.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::functionEntries::includeFuncEntry
26 
27 Description
28  Specify a functionObject dictionary file to include, expects the
29  functionObject name to follow with option arguments (without quotes).
30 
31  Searches for functionObject dictionary file in user/group/shipped
32  directories allowing for version-specific and version-independent files
33  using the following hierarchy:
34  - \b user settings:
35  - ~/.OpenFOAM/<VERSION>/caseDicts/postProcessing
36  - ~/.OpenFOAM/caseDicts/postProcessing
37  - \b group (site) settings (when $WM_PROJECT_SITE is set):
38  - $WM_PROJECT_SITE/<VERSION>/caseDicts/postProcessing
39  - $WM_PROJECT_SITE/caseDicts/postProcessing
40  - \b group (site) settings (when $WM_PROJECT_SITE is not set):
41  - $WM_PROJECT_INST_DIR/site/<VERSION>/caseDicts/postProcessing
42  - $WM_PROJECT_INST_DIR/site/caseDicts/postProcessing
43  - \b other (shipped) settings:
44  - $WM_PROJECT_DIR/etc/caseDicts/postProcessing
45 
46  The optional field arguments included in the name are inserted in 'field' or
47  'fields' entries in the functionObject dictionary and included in the name
48  of the functionObject entry to avoid conflict.
49 
50  Examples:
51  \verbatim
52  #includeFunc Q
53  #includeFunc components(U)
54  #includeFunc mag(Ux)
55  #includeFunc mag(p)
56  \endverbatim
57 
58  Other dictionary entries may also be specified using named arguments, for
59  example the \c name of the \c faceZone in the \c flowRateFaceZone \c
60  functionObject configuration set and the \c orientedFields entry which
61  defaults to \c phi may also be overridden as required, e.g.
62 
63  \verbatim
64  #includeFunc flowRateFaceZone(name=fZone1)
65  #includeFunc flowRateFaceZone(orientedFields=(phiAlpha),name=fZone1)
66  \endverbatim
67 
68 See also
69  Foam::functionObjectList
70 
71 SourceFiles
72  includeFuncEntry.C
73 
74 \*---------------------------------------------------------------------------*/
75 
76 #ifndef includeFuncEntry_H
77 #define includeFuncEntry_H
78 
79 #include "functionEntry.H"
80 
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83 namespace Foam
84 {
85 namespace functionEntries
86 {
87 
88 /*---------------------------------------------------------------------------*\
89  Class includeFuncEntry Declaration
90 \*---------------------------------------------------------------------------*/
91 
92 class includeFuncEntry
93 :
94  public functionEntry
95 {
96 
97 public:
98 
99  //- Runtime type information
100  ClassName("includeFunc");
101 
102 
103  // Member Functions
104 
105  //- Execute the functionEntry in a sub-dict context
106  static bool execute(dictionary& parentDict, Istream&);
107 };
108 
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 } // End namespace functionEntries
113 } // End namespace Foam
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #endif
118 
119 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
Specify a functionObject dictionary file to include, expects the functionObject name to follow with o...
ClassName("includeFunc")
Runtime type information.
A functionEntry causes entries to be added/manipulated on the specified dictionary given an input str...
Definition: functionEntry.H:63
static bool execute(dictionary &parentDict, Istream &)
Execute the functionEntry in a sub-dict context.
Namespace for OpenFOAM.