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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2014 OpenFOAM Foundation
9 Copyright (C) 2016 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::searchableSurfaceModifier::cut
29
30Description
31 Patchify triangles based on orientation w.r.t other (triangulated or
32 triangulatable) surfaces
33
34SourceFiles
35 cut.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef searchableSurfaceModifiers_cut_H
40#define searchableSurfaceModifiers_cut_H
41
43#include "wordRes.H"
44#include "faceList.H"
45#include "pointField.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52// Forward declaration of classes
53class edgeIntersections;
54
55namespace searchableSurfaceModifiers
56{
57
58/*---------------------------------------------------------------------------*\
59 Class cut Declaration
60\*---------------------------------------------------------------------------*/
62class cut
63:
65{
66 // Private data
67
68 //- Name of surfaces to cut with
69 const wordRes cutterNames_;
70
71
72 // Private Member Functions
73
74 //- Triangulate faces around 0th vertex
75 void triangulate(const faceList&, pointField&, triSurface&) const;
76
77 //- Triangulate searchableSurface (currently only supported for
78 // searchableBox and triSurfaceMesh)
79 triSurface& triangulate(const searchableSurface&, triSurface&) const;
80
81 //- Intersect surfaces. Perturb to avoid degenerates.
82 bool intersectSurfaces
83 (
84 triSurface& surf1,
85 edgeIntersections& edgeCuts1,
86 triSurface& surf2,
87 edgeIntersections& edgeCuts2
88 ) const;
89
90
91public:
92
93 //- Runtime type information
94 TypeName("cut");
95
96
97 // Constructors
98
99 //- Construct from dictionary
100 cut(const searchableSurfaces&, const dictionary&);
101
102 //- Clone
104 {
106 return nullptr;
107 }
108
109
110 //- Destructor
111 virtual ~cut() = default;
112
113
114 // Member Functions
115
116 //- Apply this selector
117 virtual bool modify(const labelList& regions, searchableSurface&) const;
118
119};
120
121
122// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123
124} // End namespace searchableSurfaceModifiers
125} // End namespace Foam
126
127// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128
129#endif
130
131// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Holder of intersections of edges of a surface with another surface. Optionally shuffles around points...
TypeName("cut")
Runtime type information.
virtual ~cut()=default
Destructor.
autoPtr< searchableSurfaceModifier > clone() const
Clone.
Definition: cut.H:102
virtual bool modify(const labelList &regions, searchableSurface &) const
Apply this selector.
cut(const searchableSurfaces &, const dictionary &)
Construct from dictionary.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
Container for searchableSurfaces. The collection is specified as a dictionary. For example,...
Triangulated surface description with patch information.
Definition: triSurface.H:79
A List of wordRe with additional matching capabilities.
Definition: wordRes.H:54
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73