boundaryTemplates.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2015 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::boundaryTemplates
26 
27 Description
28  Class to store boundary template specifications
29 
30  Templates are typically stored centrally, and constructed in a hierarchical
31  manner. The main use is to convert the (user) specified conditions into
32  a form which can be inserted into each field file as dictionary entries.
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef boundaryTemplates_H
37 #define boundaryTemplates_H
38 
39 #include "dictionary.H"
40 #include "wordList.H"
41 #include "wordReList.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 class Time;
49 
50 /*---------------------------------------------------------------------------*\
51  Class boundaryTemplates Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 {
56  // Private data
57 
58  //- Dictionary of boundary templates
60 
61  //- Dictionary of boundary template options
63 
64 
65 public:
66 
67  //- Constructor
69  (
70  const fileName& baseDir,
71  const Time& runTime,
72  const word& solverType
73  );
74 
75 
76  // Public member functions
77 
78  //- Return the dictionary of boundary templates
79  const dictionary& templates() const;
80 
81  //- Generate a dictionary representation of patch boundary condition
83  (
84  const word& regionPrefix,
85  const word& fieldName,
86  const word& condition,
87  const word& category,
88  const word& patchType,
89  const dictionary& conditionOptions
90  ) const;
91 
92  //- Check that user supplied patch info is valid
93  void checkPatch
94  (
95  const word& regionPrefix,
96  const word& condition,
97  const word& category,
98  const word& patchType
99  ) const;
100 
101  //- Return true if condition requires additional user options
102  bool optionsRequired
103  (
104  const word& regionPrefix,
105  const word& category,
106  const word& patchType
107  ) const;
108 };
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 } // End namespace Foam
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 #endif
117 
118 // ************************************************************************* //
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::boundaryTemplates::checkPatch
void checkPatch(const word &regionPrefix, const word &condition, const word &category, const word &patchType) const
Check that user supplied patch info is valid.
Foam::boundaryTemplates::templates_
dictionary templates_
Dictionary of boundary templates.
Definition: boundaryTemplates.H:58
wordList.H
Foam::boundaryTemplates::boundaryTemplates
boundaryTemplates(const fileName &baseDir, const Time &runTime, const word &solverType)
Constructor.
Foam::boundaryTemplates::options_
dictionary options_
Dictionary of boundary template options.
Definition: boundaryTemplates.H:61
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
wordReList.H
Foam::boundaryTemplates::templates
const dictionary & templates() const
Return the dictionary of boundary templates.
dictionary.H
Foam::boundaryTemplates::generatePatchDict
dictionary generatePatchDict(const word &regionPrefix, const word &fieldName, const word &condition, const word &category, const word &patchType, const dictionary &conditionOptions) const
Generate a dictionary representation of patch boundary condition.
Foam::boundaryTemplates
Class to store boundary template specifications.
Definition: boundaryTemplates.H:53
Foam::boundaryTemplates::optionsRequired
bool optionsRequired(const word &regionPrefix, const word &category, const word &patchType) const
Return true if condition requires additional user options.