surfaceMorpherCells.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  surfaceMorpherCells
26 
27 Description
28  Changes the boundary of the mesh template, such that each boundary cell
29  has only one boundary face.
30 
31 SourceFiles
32  surfaceMorpherCells.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef surfaceMorpherCells_H
37 #define surfaceMorpherCells_H
38 
39 #include "polyMeshGenModifier.H"
40 #include "labelLongList.H"
41 #include "boolList.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class surfaceMorpherCells Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 {
54  // Private data
55  //- mesh modifier
57 
58  //- number of internal faces
60 
61  //- true for vertices which are at the boundary
63 
64  //- true for cells which are at the boundary
66 
67  //- new boundary faces and owner cells
71 
72  // Private enumerators
73  enum cellTypes
74  {
75  NONE = 0,
76  BOUNDARY = 1,
77  CHANGED = 2
78  };
79 
80  // Private member functions
81  //- find surface vertices
82  void findBoundaryVertices();
83 
84  //- find boundary cells
85  void findBoundaryCells();
86 
87  //- remove cells with all vertices at the boundary
89 
90  //- morph boundary faces
91  bool morphBoundaryFaces();
92 
93  //- morph internal faces
94  bool morphInternalFaces();
95 
96  //- replace the boundary of the mesh with the newly created one
97  void replaceMeshBoundary();
98 
99  //- Disallow default bitwise copy construct
101 
102  //- Disallow default bitwise assignment
103  void operator=(const surfaceMorpherCells&);
104 
105 public:
106 
107  // Constructors
108 
109  //- Construct from points and cell shapes
111 
112  // Destructor
113 
115 
116 
117  // Member Functions
118 
119  void morphMesh();
120 };
121 
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 } // End namespace Foam
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************************************************************* //
Foam::surfaceMorpherCells::cellFlags_
List< direction > cellFlags_
true for cells which are at the boundary
Definition: surfaceMorpherCells.H:64
Foam::surfaceMorpherCells::mesh_
polyMeshGen & mesh_
mesh modifier
Definition: surfaceMorpherCells.H:55
Foam::surfaceMorpherCells::findBoundaryCells
void findBoundaryCells()
find boundary cells
Definition: surfaceMorpherCellsMorphInternalFaces.C:160
boolList.H
Foam::surfaceMorpherCells::findBoundaryVertices
void findBoundaryVertices()
find surface vertices
Definition: surfaceMorpherCellsMorphInternalFaces.C:46
polyMeshGenModifier.H
Foam::polyMeshGen
Definition: polyMeshGen.H:46
Foam::surfaceMorpherCells::nIntFaces_
label nIntFaces_
number of internal faces
Definition: surfaceMorpherCells.H:58
Foam::LongList< label >
Foam::surfaceMorpherCells::NONE
@ NONE
Definition: surfaceMorpherCells.H:74
Foam::surfaceMorpherCells::removeCellsWithAllVerticesAtTheBoundary
bool removeCellsWithAllVerticesAtTheBoundary()
remove cells with all vertices at the boundary
Definition: surfaceMorpherCellsCreateBoundaryFaces.C:46
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::surfaceMorpherCells::operator=
void operator=(const surfaceMorpherCells &)
Disallow default bitwise assignment.
Foam::surfaceMorpherCells::newBoundaryFaces_
VRWGraph newBoundaryFaces_
new boundary faces and owner cells
Definition: surfaceMorpherCells.H:67
Foam::surfaceMorpherCells::cellTypes
cellTypes
Definition: surfaceMorpherCells.H:72
Foam::surfaceMorpherCells::BOUNDARY
@ BOUNDARY
Definition: surfaceMorpherCells.H:75
Foam::surfaceMorpherCells::morphBoundaryFaces
bool morphBoundaryFaces()
morph boundary faces
Definition: surfaceMorpherCellsCreateBoundaryFaces.C:130
Foam::surfaceMorpherCells::morphInternalFaces
bool morphInternalFaces()
morph internal faces
Definition: surfaceMorpherCellsMorphInternalFaces.C:179
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::surfaceMorpherCells::newBoundaryPatches_
labelLongList newBoundaryPatches_
Definition: surfaceMorpherCells.H:69
Foam::surfaceMorpherCells::morphMesh
void morphMesh()
Definition: surfaceMorpherCells.C:81
Foam::surfaceMorpherCells
Definition: surfaceMorpherCells.H:51
Foam::surfaceMorpherCells::surfaceMorpherCells
surfaceMorpherCells(const surfaceMorpherCells &)
Disallow default bitwise copy construct.
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::surfaceMorpherCells::newBoundaryOwners_
labelLongList newBoundaryOwners_
Definition: surfaceMorpherCells.H:68
labelLongList.H
Foam::surfaceMorpherCells::boundaryVertex_
boolList boundaryVertex_
true for vertices which are at the boundary
Definition: surfaceMorpherCells.H:61
Foam::surfaceMorpherCells::~surfaceMorpherCells
~surfaceMorpherCells()
Definition: surfaceMorpherCells.C:76
Foam::VRWGraph
Definition: VRWGraph.H:101
Foam::surfaceMorpherCells::CHANGED
@ CHANGED
Definition: surfaceMorpherCells.H:76
Foam::surfaceMorpherCells::replaceMeshBoundary
void replaceMeshBoundary()
replace the boundary of the mesh with the newly created one
Definition: surfaceMorpherCells.C:45