correctEdgesBetweenPatches.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 
29 #include "demandDrivenData.H"
30 #include "meshSurfaceEngine.H"
31 #include "decomposeCells.H"
32 
33 // #define DEBUGSearch
34 
35 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 
37 namespace Foam
38 {
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
43 {
44  if( !msePtr_ )
46 
47  return *msePtr_;
48 }
49 
50 //- delete mesh surface
52 {
54 }
55 
57 {
59 
61  (
66  );
67 }
68 
70 {
71  if( decompose_ )
72  {
74 
77  }
78 }
79 
80 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
81 
82 // Construct from mesh
84 :
85  mesh_(mesh),
86  msePtr_(NULL),
87  patchNames_(mesh.boundaries().size()),
88  patchTypes_(mesh.boundaries().size()),
89  newBoundaryFaces_(),
90  newBoundaryOwners_(),
91  newBoundaryPatches_(),
92  decomposeCell_(mesh_.cells().size(), false),
93  decompose_(false)
94 {
95  const PtrList<boundaryPatch>& boundaries = mesh_.boundaries();
96  forAll(boundaries, patchI)
97  {
98  patchNames_[patchI] = boundaries[patchI].patchName();
99  patchTypes_[patchI] = boundaries[patchI].patchType();
100  }
101 
102  //decomposeProblematicFaces();
103 
105 
106  patchCorrection();
107 
109 }
110 
111 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
112 
114 {
116 }
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 } // End namespace Foam
121 
122 // ************************************************************************* //
Foam::correctEdgesBetweenPatches::newBoundaryFaces_
VRWGraph newBoundaryFaces_
Definition: correctEdgesBetweenPatches.H:67
Foam::decomposeCells::decomposeMesh
void decomposeMesh(const boolList &)
perform decomposition of selected cell into pyramids
Definition: decomposeCellsDecomposition.C:42
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
demandDrivenData.H
Template functions to aid in the implementation of demand driven data.
decomposeCells.H
Foam::correctEdgesBetweenPatches::msePtr_
const meshSurfaceEngine * msePtr_
pointer to surface engine
Definition: correctEdgesBetweenPatches.H:62
Foam::polyMeshGenModifier::replaceBoundary
void replaceBoundary(const wordList &patchNames, const VRWGraph &boundaryFaces, const labelLongList &faceOwners, const labelLongList &facePatches)
replace the boundary with new boundary faces
Definition: polyMeshGenModifierReplaceBoundary.C:42
Foam::polyMeshGen
Definition: polyMeshGen.H:46
Foam::correctEdgesBetweenPatches::newBoundaryPatches_
labelLongList newBoundaryPatches_
Definition: correctEdgesBetweenPatches.H:69
Foam::correctEdgesBetweenPatches::decomposeCell_
boolList decomposeCell_
holds data which cells have to be decomposed
Definition: correctEdgesBetweenPatches.H:72
Foam::correctEdgesBetweenPatches::decompose_
bool decompose_
Definition: correctEdgesBetweenPatches.H:73
correctEdgesBetweenPatches.H
Foam::correctEdgesBetweenPatches::correctEdgesBetweenPatches
correctEdgesBetweenPatches(const correctEdgesBetweenPatches &)
Disallow default bitwise copy construct.
Foam::deleteDemandDrivenData
void deleteDemandDrivenData(DataPtr &dataPtr)
Definition: demandDrivenData.H:40
Foam::correctEdgesBetweenPatches::decomposeCorrectedCells
void decomposeCorrectedCells()
decompose corrected cells
Definition: correctEdgesBetweenPatches.C:69
Foam::correctEdgesBetweenPatches::clearMeshSurface
void clearMeshSurface()
delete mesh surface
Definition: correctEdgesBetweenPatches.C:51
Foam::correctEdgesBetweenPatches::decomposeConcaveFaces
void decomposeConcaveFaces()
decompose cells with faces at concave boundary edges
Definition: correctEdgesBetweenPatchesDistributeFaces.C:267
Foam::correctEdgesBetweenPatches::mesh_
polyMeshGen & mesh_
mesh
Definition: correctEdgesBetweenPatches.H:59
Foam::PtrList
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:61
Foam::correctEdgesBetweenPatches::patchNames_
wordList patchNames_
boundary data
Definition: correctEdgesBetweenPatches.H:65
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
meshSurfaceEngine.H
Foam::correctEdgesBetweenPatches::~correctEdgesBetweenPatches
~correctEdgesBetweenPatches()
Definition: correctEdgesBetweenPatches.C:113
Foam::polyMeshGenModifier
Definition: polyMeshGenModifier.H:52
Foam::correctEdgesBetweenPatches::meshSurface
const meshSurfaceEngine & meshSurface() const
construct and return mesh surface
Definition: correctEdgesBetweenPatches.C:42
Foam::decomposeCells
Definition: decomposeCells.H:48
Foam::correctEdgesBetweenPatches::replaceBoundary
void replaceBoundary()
replace boundary
Definition: correctEdgesBetweenPatches.C:56
Foam::polyMeshGenFaces::boundaries
const PtrList< boundaryPatch > & boundaries() const
ordinary boundaries
Definition: polyMeshGenFacesI.H:111
Foam::correctEdgesBetweenPatches::patchTypes_
wordList patchTypes_
Definition: correctEdgesBetweenPatches.H:66
Foam::correctEdgesBetweenPatches::newBoundaryOwners_
labelLongList newBoundaryOwners_
Definition: correctEdgesBetweenPatches.H:68
cells
const cellShapeList & cells
Definition: gmvOutputHeader.H:3
Foam::correctEdgesBetweenPatches::patchCorrection
void patchCorrection()
perform decompose remaining faces having more than one feature edge
Definition: correctEdgesBetweenPatchesDistributeFaces.C:439
Foam::meshSurfaceEngine
Definition: meshSurfaceEngine.H:54