offsetSurface.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) 2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::extrudeModels::offsetSurface
29 
30 Description
31  Extrudes by interpolating points from one surface to the other. Surfaces
32  have to be topologically identical i.e. one has to be an offsetted version
33  of the other.
34 
35  The offsetSurfaceCoeffs dictionary entries
36  \table
37  Property | Description | Required | Default
38  baseSurface | Base surface file name | yes |
39  offsetSurface | Offset surface file name | yes |
40  project | Project onto offsetted surface | no | false
41  \endtable
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef offsetSurface_H
46 #define offsetSurface_H
47 
48 #include "point.H"
49 #include "extrudeModel.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 // Forward declarations
56 class triSurface;
57 class triSurfaceSearch;
58 
59 namespace extrudeModels
60 {
61 
62 /*---------------------------------------------------------------------------*\
63  Class extrudeModels::offsetSurface Declaration
64 \*---------------------------------------------------------------------------*/
65 
66 class offsetSurface
67 :
68  public extrudeModel
69 {
70  // Private data
71 
72  //- The base surface
73  autoPtr<triSurface> baseSurfPtr_;
74 
75  //- The offset surface
76  autoPtr<triSurface> offsetSurfPtr_;
77 
78  //- The search engine
79  autoPtr<triSurfaceSearch> baseSearchPtr_;
80 
81  //- The search engine
82  autoPtr<triSurfaceSearch> offsetSearchPtr_;
83 
84  //- Project onto offsetted surface?
85  const bool project_;
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("offsetSurface");
92 
93  // Constructors
94 
95  //- Construct from dictionary
96  explicit offsetSurface(const dictionary& dict);
97 
98 
99  //- Destructor
100  virtual ~offsetSurface();
101 
102 
103  // Member Operators
104 
105  //- Return point
106  point operator()
107  (
108  const point& surfacePoint,
109  const vector& surfaceNormal,
110  const label layer
111  ) const;
112 };
113 
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 } // End namespace extrudeModels
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #endif
123 
124 // ************************************************************************* //
Foam::extrudeModel
Top level extrusion model class.
Definition: extrudeModel.H:76
point.H
Foam::extrudeModels::offsetSurface::TypeName
TypeName("offsetSurface")
Runtime type information.
extrudeModel.H
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::extrudeModels::offsetSurface
Extrudes by interpolating points from one surface to the other. Surfaces have to be topologically ide...
Definition: offsetSurface.H:85
Foam::extrudeModels::offsetSurface::~offsetSurface
virtual ~offsetSurface()
Destructor.
Definition: offsetSurface.C:92
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::Vector< scalar >
Foam::extrudeModels::offsetSurface::offsetSurface
offsetSurface(const dictionary &dict)
Construct from dictionary.
Definition: offsetSurface.C:51