Moving cfMesh into place. Updated contibutors list
[foam-extend-3.2.git] / src / mesh / cfMesh / meshLibrary / utilities / triSurfaceTools / triSurfacePatchManipulator / triSurfacePatchManipulator.H
blob0258cadb6bca31cd8adda1152cae482ddd084b86
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.
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.
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.
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/>.
24 Class
25     triSurfacePatchManipulator
27 Description
28     Generates patches in the surface mesh based
29     on the user-selected feature edges
31 SourceFiles
32     triSurfacePatchManipulator.C
33     triSurfacePatchManipulatorFunctions.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef triSurfacePatchManipulator_H
38 #define triSurfacePatchManipulator_H
40 #include "triSurf.H"
41 #include "VRWGraph.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 /*---------------------------------------------------------------------------*\
49                 Class triSurfacePatchManipulator Declaration
50 \*---------------------------------------------------------------------------*/
52 class triSurfacePatchManipulator
54     // Private data
55         //- const reference to triSurf
56         const triSurf& surf_;
58         //- detected feature edges
59         List<direction> featureEdges_;
61         //- surface patches
62         labelList facetInPatch_;
64         //- number of patches
65         label nPatches_;
67         //- patch names
68         wordList newPatchNames_;
70         //- patch types
71         wordList newPatchTypes_;
73     // Private member functions
74         //- allocate and fill the feature edges list
75         void allocateFeatureEdges();
77         //- create patches bounded by a set of feature edges
78         void createPatches();
80         //- Disallow default bitwise copy construct
81         triSurfacePatchManipulator(const triSurfacePatchManipulator&);
83         //- Disallow default bitwise assignment
84         void operator=(const triSurfacePatchManipulator&);
86 public:
88     // Constructors
90         //- Construct from triSurface
91         triSurfacePatchManipulator(const triSurf& surface);
93     // Destructor
95         ~triSurfacePatchManipulator();
98     // Member Functions
100         void detectedSurfaceRegions(VRWGraph&) const;
102         //- store regions into subsets with a given prefix
103         const triSurf* surfaceWithPatches
104         (
105             IOdictionary* meshDictPtr = NULL,
106             const word prefix = "patch_",
107             const bool forceOverwrite = false
108         ) const;
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 } // End namespace Foam
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 #endif
119 // ************************************************************************* //