meshSurfaceEngine.C
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 Description
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "meshSurfaceEngine.H"
29 #include "demandDrivenData.H"
30 
31 # ifdef USE_OMP
32 #include <omp.h>
33 # endif
34 
35 // #define DEBUGSearch
36 
37 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 
39 namespace Foam
40 {
41 
42 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
43 
45 :
46  mesh_(mesh),
47  activePatch_(-1),
48  boundaryPointsPtr_(NULL),
49  boundaryFacesPtr_(NULL),
50  boundaryFacePatchPtr_(NULL),
51  boundaryFaceOwnersPtr_(NULL),
52  pointFacesPtr_(NULL),
53  pointInFacePtr_(NULL),
54  pointPatchesPtr_(NULL),
55  bppPtr_(NULL),
56  pointPointsPtr_(NULL),
57  edgesPtr_(NULL),
58  bpEdgesPtr_(NULL),
59  edgeFacesPtr_(NULL),
60  faceEdgesPtr_(NULL),
61  edgePatchesPtr_(NULL),
62  faceFacesPtr_(NULL),
63  pointNormalsPtr_(NULL),
64  faceNormalsPtr_(NULL),
65  faceCentresPtr_(NULL),
66 
67  globalBoundaryPointLabelPtr_(NULL),
68  globalBoundaryPointToLocalPtr_(NULL),
69  bpProcsPtr_(NULL),
70  bpNeiProcsPtr_(NULL),
71  globalBoundaryEdgeLabelPtr_(NULL),
72  globalBoundaryEdgeToLocalPtr_(NULL),
73  beProcsPtr_(NULL),
74  beNeiProcsPtr_(NULL),
75  otherEdgeFaceAtProcPtr_(NULL),
76  otherEdgeFacePatchPtr_(NULL),
77  globalBoundaryFaceLabelPtr_(NULL)
78 {
81 }
82 
84 :
85  mesh_(mesh),
86  activePatch_(patchI),
87  boundaryPointsPtr_(NULL),
88  boundaryFacesPtr_(NULL),
89  boundaryFacePatchPtr_(NULL),
90  boundaryFaceOwnersPtr_(NULL),
91  pointFacesPtr_(NULL),
92  pointInFacePtr_(NULL),
93  pointPatchesPtr_(NULL),
94  bppPtr_(NULL),
95  pointPointsPtr_(NULL),
96  edgesPtr_(NULL),
97  bpEdgesPtr_(NULL),
98  edgeFacesPtr_(NULL),
99  faceEdgesPtr_(NULL),
100  edgePatchesPtr_(NULL),
101  faceFacesPtr_(NULL),
102  pointNormalsPtr_(NULL),
103  faceNormalsPtr_(NULL),
104  faceCentresPtr_(NULL),
105 
106  globalBoundaryPointLabelPtr_(NULL),
107  globalBoundaryPointToLocalPtr_(NULL),
108  bpProcsPtr_(NULL),
109  bpNeiProcsPtr_(NULL),
110  globalBoundaryEdgeLabelPtr_(NULL),
111  globalBoundaryEdgeToLocalPtr_(NULL),
112  beProcsPtr_(NULL),
113  beNeiProcsPtr_(NULL),
114  otherEdgeFaceAtProcPtr_(NULL),
115  otherEdgeFacePatchPtr_(NULL),
116  globalBoundaryFaceLabelPtr_(NULL)
117 {
120 }
121 
122 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
123 
125 {
126  clearOut();
127 }
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
132 {
151 
163 }
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 } // End namespace Foam
168 
169 // ************************************************************************* //
Foam::meshSurfaceEngine::boundaryPointsPtr_
labelList * boundaryPointsPtr_
boundary points
Definition: meshSurfaceEngine.H:64
Foam::meshSurfaceEngine::pointFacesPtr_
VRWGraph * pointFacesPtr_
point faces addressing
Definition: meshSurfaceEngine.H:76
Foam::meshSurfaceEngine::bpProcsPtr_
VRWGraph * bpProcsPtr_
boundary point-processors addressing
Definition: meshSurfaceEngine.H:124
Foam::meshSurfaceEngine::faceEdgesPtr_
VRWGraph * faceEdgesPtr_
face edges addressing
Definition: meshSurfaceEngine.H:98
Foam::meshSurfaceEngine::globalBoundaryEdgeLabelPtr_
labelList * globalBoundaryEdgeLabelPtr_
global boundary edge label
Definition: meshSurfaceEngine.H:130
Foam::meshSurfaceEngine::faceCentresPtr_
vectorField * faceCentresPtr_
face centres
Definition: meshSurfaceEngine.H:113
Foam::meshSurfaceEngine::faceNormalsPtr_
vectorField * faceNormalsPtr_
face normals
Definition: meshSurfaceEngine.H:110
Foam::meshSurfaceEngine::beProcsPtr_
VRWGraph * beProcsPtr_
boundary edge-processors addressing
Definition: meshSurfaceEngine.H:136
demandDrivenData.H
Template functions to aid in the implementation of demand driven data.
Foam::meshSurfaceEngine::boundaryFacesPtr_
faceList::subList * boundaryFacesPtr_
boundary faces
Definition: meshSurfaceEngine.H:67
Foam::meshSurfaceEngine::globalBoundaryEdgeToLocalPtr_
Map< label > * globalBoundaryEdgeToLocalPtr_
global boundary edge to local addressing
Definition: meshSurfaceEngine.H:133
Foam::meshSurfaceEngine::pointPointsPtr_
VRWGraph * pointPointsPtr_
point points addressing
Definition: meshSurfaceEngine.H:86
Foam::polyMeshGen
Definition: polyMeshGen.H:46
Foam::meshSurfaceEngine::otherEdgeFacePatchPtr_
Map< label > * otherEdgeFacePatchPtr_
Definition: meshSurfaceEngine.H:143
Foam::deleteDemandDrivenData
void deleteDemandDrivenData(DataPtr &dataPtr)
Definition: demandDrivenData.H:40
Foam::meshSurfaceEngine::meshSurfaceEngine
meshSurfaceEngine(const meshSurfaceEngine &)
Disallow default bitwise copy construct.
Foam::meshSurfaceEngine::edgesPtr_
edgeList * edgesPtr_
edges
Definition: meshSurfaceEngine.H:89
Foam::meshSurfaceEngine::globalBoundaryPointToLocalPtr_
Map< label > * globalBoundaryPointToLocalPtr_
global boundary point to local addressing
Definition: meshSurfaceEngine.H:121
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::meshSurfaceEngine::boundaryFacePatchPtr_
labelList * boundaryFacePatchPtr_
patches boundary faces are in
Definition: meshSurfaceEngine.H:70
Foam::meshSurfaceEngine::bpEdgesPtr_
VRWGraph * bpEdgesPtr_
boundary point-edges addressing
Definition: meshSurfaceEngine.H:92
Foam::meshSurfaceEngine::boundaryFaceOwnersPtr_
labelList * boundaryFaceOwnersPtr_
face owners
Definition: meshSurfaceEngine.H:73
Foam::meshSurfaceEngine::globalBoundaryPointLabelPtr_
labelList * globalBoundaryPointLabelPtr_
global boundary point label
Definition: meshSurfaceEngine.H:118
Foam::meshSurfaceEngine::~meshSurfaceEngine
~meshSurfaceEngine()
Definition: meshSurfaceEngine.C:124
Foam::meshSurfaceEngine::globalBoundaryFaceLabelPtr_
labelList * globalBoundaryFaceLabelPtr_
global label for boundary faces
Definition: meshSurfaceEngine.H:146
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::meshSurfaceEngine::bpNeiProcsPtr_
DynList< label > * bpNeiProcsPtr_
neighbour processors for communication when sending point data
Definition: meshSurfaceEngine.H:127
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
meshSurfaceEngine.H
Foam::meshSurfaceEngine::bppPtr_
labelList * bppPtr_
pointBoundaryPoint addressing
Definition: meshSurfaceEngine.H:83
Foam::meshSurfaceEngine::pointPatchesPtr_
VRWGraph * pointPatchesPtr_
point-patches addressing
Definition: meshSurfaceEngine.H:80
Foam::meshSurfaceEngine::calculateBoundaryFaces
void calculateBoundaryFaces() const
calculate boundary nodes, faces and addressing
Definition: meshSurfaceEngineCalculateBoundaryNodesAndFaces.C:50
Foam::meshSurfaceEngine::otherEdgeFaceAtProcPtr_
Map< label > * otherEdgeFaceAtProcPtr_
processor containing other face and face-patch addressing
Definition: meshSurfaceEngine.H:142
Foam::meshSurfaceEngine::pointNormalsPtr_
vectorField * pointNormalsPtr_
point normals
Definition: meshSurfaceEngine.H:107
Foam::meshSurfaceEngine::clearOut
void clearOut()
Definition: meshSurfaceEngine.C:131
Foam::meshSurfaceEngine::edgeFacesPtr_
VRWGraph * edgeFacesPtr_
edge faces addressing
Definition: meshSurfaceEngine.H:95
Foam::meshSurfaceEngine::pointInFacePtr_
VRWGraph * pointInFacePtr_
Definition: meshSurfaceEngine.H:77
Foam::meshSurfaceEngine::calculateBoundaryNodes
void calculateBoundaryNodes() const
Definition: meshSurfaceEngineCalculateBoundaryNodesAndFaces.C:126
Foam::meshSurfaceEngine::edgePatchesPtr_
VRWGraph * edgePatchesPtr_
edge-patches addressing
Definition: meshSurfaceEngine.H:101
Foam::meshSurfaceEngine::beNeiProcsPtr_
DynList< label > * beNeiProcsPtr_
neighbour processors for communication when sending edge data
Definition: meshSurfaceEngine.H:139
Foam::meshSurfaceEngine::faceFacesPtr_
VRWGraph * faceFacesPtr_
face-faces addressing
Definition: meshSurfaceEngine.H:104