polyLineEdge.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) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2019-2020 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::blockEdges::polyLineEdge
29 
30 Description
31  A blockEdge defined in terms of a series of straight line segments.
32 
33 SourceFiles
34  polyLineEdge.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef blockEdges_polyLineEdge_H
39 #define blockEdges_polyLineEdge_H
40 
41 #include "blockEdge.H"
42 #include "polyLine.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 namespace blockEdges
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class polyLineEdge Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class polyLineEdge
56 :
57  public blockEdge,
58  public polyLine
59 {
60  // Private Member Functions
61 
62  //- No copy construct
63  polyLineEdge(const polyLineEdge&) = delete;
64 
65  //- No copy assignment
66  void operator=(const polyLineEdge&) = delete;
67 
68 
69 public:
70 
71  // Static data members
72  TypeName("polyLine");
73 
74 
75  // Constructors
76 
77  //- Construct from components
79  (
80  const pointField& points,
81  const label start,
82  const label end,
83  const pointField& intermediate
84  );
85 
86  //- Construct from Istream and point field.
88  (
89  const dictionary& dict,
90  const label index,
91  const searchableSurfaces& geometry,
92  const pointField& points,
93  Istream& is
94  );
95 
96 
97  //- Destructor
98  virtual ~polyLineEdge() = default;
99 
100 
101  // Member Functions
102 
103  //- The point position corresponding to the curve parameter
104  // 0 <= lambda <= 1
105  point position(const scalar lambda) const;
106 
107  //- The length of the curve
108  scalar length() const;
109 };
110 
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 } // End namespace blockEdges
115 } // End namespace Foam
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 #endif
120 
121 // ************************************************************************* //
Foam::polyLine
A series of straight line segments, which can also be interpreted as a series of control points for s...
Definition: polyLine.H:55
Foam::blockEdge::end
label end() const
Index of end point.
Definition: blockEdgeI.H:36
Foam::polyLine::points
const pointField & points() const
Return const-access to the control-points.
Definition: polyLine.C:112
Foam::blockEdges::polyLineEdge::TypeName
TypeName("polyLine")
polyLine.H
Foam::blockEdges::polyLineEdge::position
point position(const scalar lambda) const
The point position corresponding to the curve parameter.
Definition: polyLineEdge.C:75
Foam::blockEdge
Define a curved edge that is parameterized for 0<lambda<1 between the start/end points.
Definition: blockEdge.H:62
Foam::blockEdges::polyLineEdge::~polyLineEdge
virtual ~polyLineEdge()=default
Destructor.
Foam::Field< vector >
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::blockEdge::start
label start() const
Index of start point.
Definition: blockEdgeI.H:30
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:121
lambda
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::blockEdges::polyLineEdge::length
scalar length() const
The length of the curve.
Definition: polyLineEdge.C:81
Foam::blockEdges::polyLineEdge
A blockEdge defined in terms of a series of straight line segments.
Definition: polyLineEdge.H:54
Foam::Vector< scalar >
Foam::searchableSurfaces
Container for searchableSurfaces. The collection is specified as a dictionary. For example,...
Definition: searchableSurfaces.H:92
blockEdge.H