cut.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 | Copyright (C) 2014 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::searchableSurfaceModifier::cut
26 
27 Description
28  Patchify triangles based on orientation w.r.t other (triangulated or
29  triangulatable) surfaces
30 
31 SourceFiles
32  cut.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef cut_H
37 #define cut_H
38 
40 #include "wordReList.H"
41 #include "faceList.H"
42 #include "pointField.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 // Forward declaration of classes
50 class edgeIntersections;
51 
52 namespace searchableSurfaceModifiers
53 {
54 
55 /*---------------------------------------------------------------------------*\
56  Class cut Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class cut
60 :
62 {
63  // Private data
64 
65  //- Name of surfaces to cut with
67 
68 
69  // Private Member Functions
70 
71  //- Triangulate faces around 0th vertex
72  void triangulate(const faceList&, pointField&, triSurface&) const;
73 
74  //- Triangulate searchableSurface (currently only supported for
75  // searchableBox and triSurfaceMesh)
77 
78  //- Intersect surfaces. Perturb to avoid degenerates.
80  (
81  triSurface& surf1,
82  edgeIntersections& edgeCuts1,
83  triSurface& surf2,
84  edgeIntersections& edgeCuts2
85  ) const;
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("cut");
92 
93 
94  // Constructors
95 
96  //- Construct from dictionary
97  cut(const searchableSurfaces&, const dictionary&);
98 
99  //- Clone
101  {
104  }
105 
106 
107  //- Destructor
108  virtual ~cut();
109 
110 
111  // Member Functions
112 
113  //- Apply this selector
114  virtual bool modify(const labelList& regions, searchableSurface&) const;
115 
116 };
117 
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 } // End namespace searchableSurfaceModifiers
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
Foam::searchableSurfaceModifiers::cut
Definition: cut.H:58
Foam::searchableSurfaceModifiers::cut::clone
autoPtr< searchableSurfaceModifier > clone() const
Clone.
Definition: cut.H:99
Foam::searchableSurfaceModifier
Changing a surface.
Definition: searchableSurfaceModifier.H:57
Foam::searchableSurfaceModifiers::cut::modify
virtual bool modify(const labelList &regions, searchableSurface &) const
Apply this selector.
Foam::searchableSurfaceModifiers::cut::~cut
virtual ~cut()
Destructor.
searchableSurfaceModifier.H
faceList.H
Foam::searchableSurfaceModifiers::cut::cutterNames_
const wordReList cutterNames_
Name of surfaces to cut with.
Definition: cut.H:65
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:365
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::triSurface
Triangulated surface description with patch information.
Definition: triSurface.H:57
Foam::searchableSurfaceModifiers::cut::intersectSurfaces
bool intersectSurfaces(triSurface &surf1, edgeIntersections &edgeCuts1, triSurface &surf2, edgeIntersections &edgeCuts2) const
Intersect surfaces. Perturb to avoid degenerates.
Foam::searchableSurface
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
Definition: searchableSurface.H:66
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::searchableSurfaceModifiers::cut::cut
cut(const searchableSurfaces &, const dictionary &)
Construct from dictionary.
pointField.H
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::searchableSurfaceModifiers::cut::TypeName
TypeName("cut")
Runtime type information.
wordReList.H
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::searchableSurfaces
Container for searchableSurfaces.
Definition: searchableSurfaces.H:53
Foam::searchableSurfaceModifiers::cut::triangulate
void triangulate(const faceList &, pointField &, triSurface &) const
Triangulate faces around 0th vertex.
Foam::edgeIntersections
Holder of intersections of edges of a surface with another surface. Optionally shuffles around points...
Definition: edgeIntersections.H:60