duplicatePoints.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::duplicatePoints
28 
29 Description
30  Duplicate points
31 
32 SourceFiles
33  duplicatePoints.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef duplicatePoints_H
38 #define duplicatePoints_H
39 
40 #include "labelList.H"
41 #include "typeInfo.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 // Forward Declarations
49 class polyMesh;
50 class polyTopoChange;
51 class edge;
52 class face;
53 class mapPolyMesh;
54 class localPointRegion;
55 
56 /*---------------------------------------------------------------------------*\
57  Class duplicatePoints Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 class duplicatePoints
61 {
62  // Private data
63 
64  //- Reference to mesh
65  const polyMesh& mesh_;
66 
67  //- Per regionSide.pointRegion() the points created.
68  // element 0 is the original point.
69  // Can have empty entries if a point only has one region.
70  labelListList duplicates_;
71 
72 
73  // Private Member Functions
74 
75  //- No copy construct
76  duplicatePoints(const duplicatePoints&) = delete;
77 
78  //- No copy assignment
79  void operator=(const duplicatePoints&) = delete;
80 
81 public:
82 
83  //- Runtime type information
84  ClassName("duplicatePoints");
85 
86 
87  // Constructors
88 
89  //- Construct from mesh
90  explicit duplicatePoints(const polyMesh& mesh);
91 
92 
93  // Member Functions
94 
95  // Access
96 
97  //- Per point in regionSide.pointRegions() the points created.
98  const labelListList& duplicates() const
99  {
100  return duplicates_;
101  }
102 
103 
104  // Topology changes
105 
106  //- Play commands into polyTopoChange to duplicate points. Gets
107  // localPointRegion structure which is per non-manifold point
108  // the regions per point.
109  void setRefinement
110  (
113  );
114 
115  //- Force recalculation of locally stored data on topological change
116  void updateMesh(const mapPolyMesh&);
117 };
118 
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
Foam::duplicatePoints::ClassName
ClassName("duplicatePoints")
Runtime type information.
Foam::localPointRegion
Takes mesh with 'baffles' (= boundary faces sharing points). Determines for selected points on bounda...
Definition: localPointRegion.H:69
Foam::duplicatePoints::updateMesh
void updateMesh(const mapPolyMesh &)
Force recalculation of locally stored data on topological change.
Definition: duplicatePoints.C:209
typeInfo.H
Foam::polyTopoChange
Direct mesh changes based on v1.3 polyTopoChange syntax.
Definition: polyTopoChange.H:99
Foam::duplicatePoints::duplicates
const labelListList & duplicates() const
Per point in regionSide.pointRegions() the points created.
Definition: duplicatePoints.H:97
Foam::duplicatePoints
Duplicate points.
Definition: duplicatePoints.H:59
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::regionSide
Determines the 'side' for every face and connected to a singly-connected (through edges) region of fa...
Definition: regionSide.H:63
labelList.H
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::duplicatePoints::setRefinement
void setRefinement(const localPointRegion &regionSide, polyTopoChange &)
Play commands into polyTopoChange to duplicate points. Gets.
Definition: duplicatePoints.C:59
Foam::List< labelList >
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:161