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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2015 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::boundaryTemplates
28 
29 Description
30  Class to store boundary template specifications
31 
32  Templates are typically stored centrally, and constructed hierarchically.
33  The main use is to convert the (user) specified conditions into
34  a form that can be inserted into each field file as dictionary entries.
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef boundaryTemplates_H
39 #define boundaryTemplates_H
40 
41 #include "dictionary.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
59  dictionary templates_;
60 
61  //- Dictionary of boundary template options
62  dictionary 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 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::fileName
A class for handling file names.
Definition: fileName.H:73
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::boundaryTemplates
boundaryTemplates(const fileName &baseDir, const Time &runTime, const word &solverType)
Constructor.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
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.