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-------------------------------------------------------------------------------
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::extrudeModels::offsetSurface
29
30Description
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
53namespace Foam
54{
55// Forward declarations
56class triSurface;
57class triSurfaceSearch;
58
59namespace extrudeModels
60{
61
62/*---------------------------------------------------------------------------*\
63 Class extrudeModels::offsetSurface Declaration
64\*---------------------------------------------------------------------------*/
65
66class 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
88public:
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// ************************************************************************* //
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
Top level extrusion model class.
Definition: extrudeModel.H:77
Extrudes by interpolating points from one surface to the other. Surfaces have to be topologically ide...
Definition: offsetSurface.H:88
virtual ~offsetSurface()
Destructor.
Definition: offsetSurface.C:92
TypeName("offsetSurface")
Runtime type information.
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73