Adding cfMesh-v1.0 into the repository
[foam-extend-3.2.git] / src / meshLibrary / utilities / checkMeshDict / checkMeshDict.H
blobc97d2addb6bc4c5bfd06f9ec27a5c6f7c662a50a
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 "IOdictionary.H"
40 #include <map>
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                         Class checkMeshDict Declaration
49 \*---------------------------------------------------------------------------*/
51 class checkMeshDict
53         //- Reference to the mesh
54         IOdictionary& meshDict_;
56     // Private member functions
57         //- check patchCellSize entry
58         void checkPatchCellSize() const;
60         //- check subsetCellSize entry
61         void checkSubsetCellSize() const;
63         //- check local refinement level
64         void checkLocalRefinementLevel() const;
66         //- check keepCellsIntersectingPatches entry
67         void checkKeepCellsIntersectingPatches() const;
69         //- check removeCellsIntersectingPatches entry
70         void checkRemoveCellsIntersectingPatches() const;
72         //- check objectRefinements entry
73         void checkObjectRefinements() const;
75         //- check entry for boundary layers
76         void checkBoundaryLayers() const;
78         //- check renameBoundary entry
79         void checkRenameBoundary() const;
81         //- perform all checks
82         void checkEntries() const;
84         //- update patchCellSize entry
85         void updatePatchCellSize(const std::map<word, wordList>&);
87         //- update subsetCellSize entry
88         void updateSubsetCellSize(const std::map<word, wordList>&);
90         //- update local refinement
91         void updateLocalRefinementLevel(const std::map<word, wordList>&);
93         //- check keepCellsIntersectingPatches entry
94         void updateKeepCellsIntersectingPatches
95         (
96             const std::map<word, wordList>&
97         );
99         //- check removeCellsIntersectingPatches entry
100         void updateRemoveCellsIntersectingPatches
101         (
102             const std::map<word, wordList>&
103         );
105         //- check objectRefinements entry
106         void updateObjectRefinements(const std::map<word, wordList>&);
108         //- check entry for boundary layers
109         void updateBoundaryLayers(const std::map<word, wordList>&);
111         //- check renameBoundary entry
112         void updateRenameBoundary
113         (
114             const std::map<word, wordList>&,
115             const std::map<word, word>&
116         );
118     public:
120     // Constructors
122         //- Construct from IOdictionary
123         checkMeshDict(IOdictionary& meshDict);
125     // Destructor
126         ~checkMeshDict();
128     // Public member functions
130         //- update meshDict based on modification of patches in the surface
131         void updateDictionaries
132         (
133             const std::map<word, wordList>& patchesForPatch,
134             const std::map<word, word>& patchTypes,
135             const bool renamePatches = true
136         );
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 } // End namespace Foam
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 #endif
148 // ************************************************************************* //