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 | 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::extrudeModels::offsetSurface
26 
27 Description
28  Extrudes by interpolating points from one surface to the other. Surfaces
29  have to be topologically identical i.e. one has to be an offsetted version
30  of the other.
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef offsetSurface_H
35 #define offsetSurface_H
36 
37 #include "point.H"
38 #include "extrudeModel.H"
39 #include "Switch.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 class triSurface;
47 class triSurfaceSearch;
48 
49 
50 namespace extrudeModels
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class offsetSurface Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 class offsetSurface
58 :
59  public extrudeModel
60 {
61  // Private data
62 
63  //- surface
65 
66  //- search engine
68 
69  //- offsets
71 
72  //- search engine
74 
75  // Whether to re-project onto offsetted surface
76  const Switch project_;
77 
78 public:
79 
80  //- Runtime type information
81  TypeName("offsetSurface");
82 
83  // Constructors
84 
85  //- Construct from dictionary
87 
88 
89  //- Destructor
90  virtual ~offsetSurface();
91 
92 
93  // Member Operators
94 
95  //- Return point
96  point operator()
97  (
98  const point& surfacePoint,
99  const vector& surfaceNormal,
100  const label layer
101  ) const;
102 };
103 
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 } // End namespace extrudeModels
108 } // End namespace Foam
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 #endif
113 
114 // ************************************************************************* //
Foam::extrudeModels::offsetSurface::baseSearchPtr_
autoPtr< triSurfaceSearch > baseSearchPtr_
search engine
Definition: offsetSurface.H:66
Foam::extrudeModels::offsetSurface::project_
const Switch project_
Definition: offsetSurface.H:75
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:60
Foam::extrudeModel
Top level extrusion model class.
Definition: extrudeModel.H:51
point.H
Foam::extrudeModels::offsetSurface::baseSurfPtr_
autoPtr< triSurface > baseSurfPtr_
surface
Definition: offsetSurface.H:63
Foam::extrudeModels::offsetSurface::TypeName
TypeName("offsetSurface")
Runtime type information.
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
extrudeModel.H
Switch.H
dict
dictionary dict
Definition: searchingEngine.H:14
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::extrudeModels::offsetSurface
Extrudes by interpolating points from one surface to the other. Surfaces have to be topologically ide...
Definition: offsetSurface.H:56
Foam::extrudeModels::offsetSurface::~offsetSurface
virtual ~offsetSurface()
Destructor.
Definition: offsetSurface.C:89
Foam::extrudeModels::offsetSurface::offsetSearchPtr_
autoPtr< triSurfaceSearch > offsetSearchPtr_
search engine
Definition: offsetSurface.H:72
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::Vector< scalar >
Foam::extrudeModels::offsetSurface::offsetSurfPtr_
autoPtr< triSurface > offsetSurfPtr_
offsets
Definition: offsetSurface.H:69
Foam::extrudeModels::offsetSurface::offsetSurface
offsetSurface(const dictionary &dict)
Construct from dictionary.
Definition: offsetSurface.C:47