checkMeshDict.H
Go to the documentation of this file.
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.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  checkMeshDict
26 
27 Description
28  Check whether the meshDict file is set correctly
29 
30 SourceFiles
31  checkMeshDict.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef checkMeshDict_H
36 #define checkMeshDict_H
37 
38 #include "IOdictionary.H"
39 
40 #include <map>
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class checkMeshDict Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class checkMeshDict
52 {
53  //- Reference to the mesh
55 
56  // Private member functions
57  //- check settings for cell size in meshDict
58  void checkBasicSettings() const;
59 
60  //- check patchCellSize entry
61  void checkPatchCellSize() const;
62 
63  //- check subsetCellSize entry
64  void checkSubsetCellSize() const;
65 
66  //- check local refinement level
67  void checkLocalRefinementLevel() const;
68 
69  //- check keepCellsIntersectingPatches entry
71 
72  //- check removeCellsIntersectingPatches entry
74 
75  //- check objectRefinements entry
76  void checkObjectRefinements() const;
77 
78  //- check anisotropic sources
79  void checkAnisotropicSources() const;
80 
81  //- check surfaceRefinements entry
82  void checkSurfaceRefinements() const;
83 
84  //- check edgeMeshRefinements entry
85  void checkEdgeMeshRefinements() const;
86 
87  //- check entry for boundary layers
88  void checkBoundaryLayers() const;
89 
90  //- check renameBoundary entry
91  void checkRenameBoundary() const;
92 
93  //- perform all checks
94  void checkEntries() const;
95 
96  //- update patchCellSize entry
97  void updatePatchCellSize(const std::map<word, wordList>&);
98 
99  //- update subsetCellSize entry
100  void updateSubsetCellSize(const std::map<word, wordList>&);
101 
102  //- update local refinement
103  void updateLocalRefinement(const std::map<word, wordList>&);
104 
105  //- check keepCellsIntersectingPatches entry
107  (
108  const std::map<word, wordList>&
109  );
110 
111  //- check removeCellsIntersectingPatches entry
113  (
114  const std::map<word, wordList>&
115  );
116 
117  //- check objectRefinements entry
118  void updateObjectRefinements(const std::map<word, wordList>&);
119 
120  //- check entry for boundary layers
121  void updateBoundaryLayers(const std::map<word, wordList>&);
122 
123  //- check renameBoundary entry
125  (
126  const std::map<word, wordList>&,
127  const std::map<word, word>&
128  );
129 
130  public:
131 
132  // Constructors
133 
134  //- Construct from IOdictionary
135  checkMeshDict(IOdictionary& meshDict);
136 
137  // Destructor
138  ~checkMeshDict();
139 
140  // Public member functions
141 
142  //- update meshDict based on modification of patches in the surface
143  void updateDictionaries
144  (
145  const std::map<word, wordList>& patchesForPatch,
146  const std::map<word, word>& patchTypes,
147  const bool renamePatches = true
148  );
149 };
150 
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 } // End namespace Foam
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #endif
159 
160 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
Foam::checkMeshDict::checkRenameBoundary
void checkRenameBoundary() const
check renameBoundary entry
Definition: checkMeshDict.C:706
Foam::checkMeshDict::checkPatchCellSize
void checkPatchCellSize() const
check patchCellSize entry
Definition: checkMeshDict.C:121
Foam::checkMeshDict::updateLocalRefinement
void updateLocalRefinement(const std::map< word, wordList > &)
update local refinement
Definition: checkMeshDict.C:870
Foam::checkMeshDict::updateRenameBoundary
void updateRenameBoundary(const std::map< word, wordList > &, const std::map< word, word > &)
check renameBoundary entry
Definition: checkMeshDict.C:1079
Foam::checkMeshDict::checkEdgeMeshRefinements
void checkEdgeMeshRefinements() const
check edgeMeshRefinements entry
Definition: checkMeshDict.C:471
Foam::checkMeshDict::checkKeepCellsIntersectingPatches
void checkKeepCellsIntersectingPatches() const
check keepCellsIntersectingPatches entry
Definition: checkMeshDict.C:234
Foam::checkMeshDict
Definition: checkMeshDict.H:50
Foam::checkMeshDict::~checkMeshDict
~checkMeshDict()
Definition: checkMeshDict.C:1276
Foam::checkMeshDict::checkAnisotropicSources
void checkAnisotropicSources() const
check anisotropic sources
Definition: checkMeshDict.C:336
Foam::checkMeshDict::updatePatchCellSize
void updatePatchCellSize(const std::map< word, wordList > &)
update patchCellSize entry
Definition: checkMeshDict.C:791
Foam::checkMeshDict::checkBoundaryLayers
void checkBoundaryLayers() const
check entry for boundary layers
Definition: checkMeshDict.C:574
patchTypes
wordList patchTypes(nPatches)
Foam::checkMeshDict::checkMeshDict
checkMeshDict(IOdictionary &meshDict)
Construct from IOdictionary.
Definition: checkMeshDict.C:1265
Foam::checkMeshDict::checkSubsetCellSize
void checkSubsetCellSize() const
check subsetCellSize entry
Definition: checkMeshDict.C:140
Foam::checkMeshDict::checkSurfaceRefinements
void checkSurfaceRefinements() const
check surfaceRefinements entry
Definition: checkMeshDict.C:368
Foam::checkMeshDict::checkLocalRefinementLevel
void checkLocalRefinementLevel() const
check local refinement level
Definition: checkMeshDict.C:158
Foam::checkMeshDict::checkEntries
void checkEntries() const
perform all checks
Definition: checkMeshDict.C:767
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::checkMeshDict::updateRemoveCellsIntersectingPatches
void updateRemoveCellsIntersectingPatches(const std::map< word, wordList > &)
check removeCellsIntersectingPatches entry
Definition: checkMeshDict.C:967
Foam::checkMeshDict::updateKeepCellsIntersectingPatches
void updateKeepCellsIntersectingPatches(const std::map< word, wordList > &)
check keepCellsIntersectingPatches entry
Definition: checkMeshDict.C:908
Foam::checkMeshDict::checkBasicSettings
void checkBasicSettings() const
check settings for cell size in meshDict
Definition: checkMeshDict.C:42
IOdictionary.H
Foam::checkMeshDict::checkRemoveCellsIntersectingPatches
void checkRemoveCellsIntersectingPatches() const
check removeCellsIntersectingPatches entry
Definition: checkMeshDict.C:253
Foam::checkMeshDict::updateSubsetCellSize
void updateSubsetCellSize(const std::map< word, wordList > &)
update subsetCellSize entry
Definition: checkMeshDict.C:862
Foam::checkMeshDict::updateDictionaries
void updateDictionaries(const std::map< word, wordList > &patchesForPatch, const std::map< word, word > &patchTypes, const bool renamePatches=true)
update meshDict based on modification of patches in the surface
Definition: checkMeshDict.C:1282
Foam::checkMeshDict::updateObjectRefinements
void updateObjectRefinements(const std::map< word, wordList > &)
check objectRefinements entry
Definition: checkMeshDict.C:1030
Foam::checkMeshDict::checkObjectRefinements
void checkObjectRefinements() const
check objectRefinements entry
Definition: checkMeshDict.C:272
Foam::checkMeshDict::updateBoundaryLayers
void updateBoundaryLayers(const std::map< word, wordList > &)
check entry for boundary layers
Definition: checkMeshDict.C:1038
Foam::checkMeshDict::meshDict_
IOdictionary & meshDict_
Reference to the mesh.
Definition: checkMeshDict.H:53