cartesian2DMeshGenerator.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  cartesian2DMeshGenerator
26 
27 Description
28  Creates a 2D cartesian mesh from the quadtree
29 
30 SourceFiles
31  cartesian2DMeshGenerator.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cartesian2DMeshGenerator_H
36 #define cartesian2DMeshGenerator_H
37 
38 #include "polyMeshGen.H"
39 #include "IOdictionary.H"
40 #include "workflowControls.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 // Forward declarations
48 class triSurf;
49 class meshOctree;
50 class Time;
51 
52 /*---------------------------------------------------------------------------*\
53  Class cartesian2DMeshGenerator Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 {
58  // Private data
59  //- reference to Time
60  const Time& db_;
61 
62  //- pointer to the surface
63  const triSurf* surfacePtr_;
64 
65  //- pointer to the modified surface mesh
66  const triSurf* modSurfacePtr_;
67 
68  //- IOdictionary containing information about cell sizes, etc..
70 
71  //- pointer to the octree
73 
74  //- mesh
76 
77  //- workflow controller
79 
80  // Private member functions
81  //- create cartesian mesh
82  void createCartesianMesh();
83 
84  //- prepare mesh surface
85  void surfacePreparation();
86 
87  //- map mesh to the surface and untangle surface
88  void mapMeshToSurface();
89 
90  //- capture edges and corners
91  void extractPatches();
92 
93  //- capture edges and corners
94  void mapEdgesAndCorners();
95 
96  //- optimise surface mesh
97  void optimiseMeshSurface();
98 
99  //- add boundary layers
100  void generateBoundaryLayers();
101 
102  //- refine boundary layers
103  void refBoundaryLayers();
104 
105  //- replace boundaries
106  void replaceBoundaries();
107 
108  //- renumber the mesh
109  void renumberMesh();
110 
111  //- generate mesh
112  void generateMesh();
113 
114  //- Disallow default bitwise copy construct
116 
117  //- Disallow default bitwise assignment
118  void operator=(const cartesian2DMeshGenerator&);
119 
120 public:
121 
122  // Constructors
123 
124  //- Construct from time
126 
127  // Destructor
128 
130 
131 
132  // Member Functions
133 
134  //- write the mesh
135  void writeMesh() const;
136 };
137 
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 } // End namespace Foam
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #endif
146 
147 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
Foam::cartesian2DMeshGenerator::generateBoundaryLayers
void generateBoundaryLayers()
add boundary layers
Definition: cartesian2DMeshGenerator.C:138
Foam::cartesian2DMeshGenerator
Definition: cartesian2DMeshGenerator.H:55
Foam::cartesian2DMeshGenerator::surfacePtr_
const triSurf * surfacePtr_
pointer to the surface
Definition: cartesian2DMeshGenerator.H:62
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
Foam::cartesian2DMeshGenerator::mapEdgesAndCorners
void mapEdgesAndCorners()
capture edges and corners
Definition: cartesian2DMeshGenerator.C:125
Foam::cartesian2DMeshGenerator::~cartesian2DMeshGenerator
~cartesian2DMeshGenerator()
Definition: cartesian2DMeshGenerator.C:353
Foam::cartesian2DMeshGenerator::mapMeshToSurface
void mapMeshToSurface()
map mesh to the surface and untangle surface
Definition: cartesian2DMeshGenerator.C:102
Foam::cartesian2DMeshGenerator::generateMesh
void generateMesh()
generate mesh
Definition: cartesian2DMeshGenerator.C:198
Foam::cartesian2DMeshGenerator::renumberMesh
void renumberMesh()
renumber the mesh
Definition: cartesian2DMeshGenerator.C:193
Foam::polyMeshGen
Definition: polyMeshGen.H:46
Foam::cartesian2DMeshGenerator::cartesian2DMeshGenerator
cartesian2DMeshGenerator(const cartesian2DMeshGenerator &)
Disallow default bitwise copy construct.
Foam::cartesian2DMeshGenerator::modSurfacePtr_
const triSurf * modSurfacePtr_
pointer to the modified surface mesh
Definition: cartesian2DMeshGenerator.H:65
Foam::cartesian2DMeshGenerator::refBoundaryLayers
void refBoundaryLayers()
refine boundary layers
Definition: cartesian2DMeshGenerator.C:169
polyMeshGen.H
Foam::cartesian2DMeshGenerator::octreePtr_
meshOctree * octreePtr_
pointer to the octree
Definition: cartesian2DMeshGenerator.H:71
Foam::cartesian2DMeshGenerator::operator=
void operator=(const cartesian2DMeshGenerator &)
Disallow default bitwise assignment.
Foam::cartesian2DMeshGenerator::meshDict_
IOdictionary meshDict_
IOdictionary containing information about cell sizes, etc..
Definition: cartesian2DMeshGenerator.H:68
Foam::cartesian2DMeshGenerator::db_
const Time & db_
reference to Time
Definition: cartesian2DMeshGenerator.H:59
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::cartesian2DMeshGenerator::controller_
workflowControls controller_
workflow controller
Definition: cartesian2DMeshGenerator.H:77
Foam::cartesian2DMeshGenerator::extractPatches
void extractPatches()
capture edges and corners
Definition: cartesian2DMeshGenerator.C:120
Foam::cartesian2DMeshGenerator::mesh_
polyMeshGen mesh_
mesh
Definition: cartesian2DMeshGenerator.H:74
Foam::cartesian2DMeshGenerator::writeMesh
void writeMesh() const
write the mesh
Definition: cartesian2DMeshGenerator.C:362
IOdictionary.H
Foam::meshOctree
Definition: meshOctree.H:55
triSurf
A class for triangulated surface used in the meshing process. It is derived from points and facets wi...
meshOctree
Octree for mesh generation.
workflowControls.H
Foam::cartesian2DMeshGenerator::surfacePreparation
void surfacePreparation()
prepare mesh surface
Definition: cartesian2DMeshGenerator.C:77
Foam::cartesian2DMeshGenerator::createCartesianMesh
void createCartesianMesh()
create cartesian mesh
Definition: cartesian2DMeshGenerator.C:63
Foam::cartesian2DMeshGenerator::replaceBoundaries
void replaceBoundaries()
replace boundaries
Definition: cartesian2DMeshGenerator.C:188
Foam::cartesian2DMeshGenerator::optimiseMeshSurface
void optimiseMeshSurface()
optimise surface mesh
Definition: cartesian2DMeshGenerator.C:130
Foam::workflowControls
Definition: workflowControls.H:55
Foam::triSurf
Definition: triSurf.H:59