Forward compatibility: flex
[foam-extend-3.2.git] / src / mesh / cfMesh / utilities / checkMeshDict / checkMeshDict.H
bloba56e35ae50ee0fe96936734b1ed886c9ac31916e
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | cfMesh: A library for mesh generation
4    \\    /   O peration     |
5     \\  /    A nd           | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6      \\/     M anipulation  | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
9     This file is part of cfMesh.
11     cfMesh is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 3 of the License, or (at your
14     option) any later version.
16     cfMesh 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.
21     You should have received a copy of the GNU General Public License
22     along with cfMesh.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     checkMeshDict
27 Description
28     Check whether the meshDict file is set correctly
30 SourceFiles
31     checkMeshDict.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef checkMeshDict_H
36 #define checkMeshDict_H
38 #include "objectRegistry.H"
39 #include "foamTime.H"
40 #include "IOdictionary.H"
42 #include <map>
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace Foam
49 /*---------------------------------------------------------------------------*\
50                         Class checkMeshDict Declaration
51 \*---------------------------------------------------------------------------*/
53 class checkMeshDict
55         //- Reference to the mesh
56         IOdictionary& meshDict_;
58     // Private member functions
59         //- check settings for cell size in meshDict
60         void checkBasicSettings() const;
62         //- check patchCellSize entry
63         void checkPatchCellSize() const;
65         //- check subsetCellSize entry
66         void checkSubsetCellSize() const;
68         //- check local refinement level
69         void checkLocalRefinementLevel() const;
71         //- check keepCellsIntersectingPatches entry
72         void checkKeepCellsIntersectingPatches() const;
74         //- check removeCellsIntersectingPatches entry
75         void checkRemoveCellsIntersectingPatches() const;
77         //- check objectRefinements entry
78         void checkObjectRefinements() const;
80         //- check anisotropic sources
81         void checkAnisotropicSources() const;
83         //- check surfaceRefinements entry
84         void checkSurfaceRefinements() const;
86         //- check edgeMeshRefinements entry
87         void checkEdgeMeshRefinements() const;
89         //- check entry for boundary layers
90         void checkBoundaryLayers() const;
92         //- check renameBoundary entry
93         void checkRenameBoundary() const;
95         //- perform all checks
96         void checkEntries() const;
98         //- update patchCellSize entry
99         void updatePatchCellSize(const std::map<word, wordList>&);
101         //- update subsetCellSize entry
102         void updateSubsetCellSize(const std::map<word, wordList>&);
104         //- update local refinement
105         void updateLocalRefinement(const std::map<word, wordList>&);
107         //- check keepCellsIntersectingPatches entry
108         void updateKeepCellsIntersectingPatches
109         (
110             const std::map<word, wordList>&
111         );
113         //- check removeCellsIntersectingPatches entry
114         void updateRemoveCellsIntersectingPatches
115         (
116             const std::map<word, wordList>&
117         );
119         //- check objectRefinements entry
120         void updateObjectRefinements(const std::map<word, wordList>&);
122         //- check entry for boundary layers
123         void updateBoundaryLayers(const std::map<word, wordList>&);
125         //- check renameBoundary entry
126         void updateRenameBoundary
127         (
128             const std::map<word, wordList>&,
129             const std::map<word, word>&
130         );
132     public:
134     // Constructors
136         //- Construct from IOdictionary
137         checkMeshDict(IOdictionary& meshDict);
139     // Destructor
140         ~checkMeshDict();
142     // Public member functions
144         //- update meshDict based on modification of patches in the surface
145         void updateDictionaries
146         (
147             const std::map<word, wordList>& patchesForPatch,
148             const std::map<word, word>& patchTypes,
149             const bool renamePatches = true
150         );
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 } // End namespace Foam
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 #endif
162 // ************************************************************************* //