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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::boundaryTemplates
28
29Description
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
45namespace Foam
46{
47
48class Time;
49
50/*---------------------------------------------------------------------------*\
51 Class boundaryTemplates Declaration
52\*---------------------------------------------------------------------------*/
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
65public:
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// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
Class to store boundary template specifications.
void checkPatch(const word &regionPrefix, const word &condition, const word &category, const word &patchType) const
Check that user supplied patch info is valid.
boundaryTemplates(const fileName &baseDir, const Time &runTime, const word &solverType)
Constructor.
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.
bool optionsRequired(const word &regionPrefix, const word &category, const word &patchType) const
Return true if condition requires additional user options.
const dictionary & templates() const
Return the dictionary of boundary templates.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A class for handling file names.
Definition: fileName.H:76
A class for handling words, derived from Foam::string.
Definition: word.H:68
engineTime & runTime
Namespace for OpenFOAM.