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-2021 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::blockEdges::polyLineEdge
29
30Description
31 A blockEdge defined in terms of a series of straight line segments.
32
33SourceFiles
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
46namespace Foam
47{
48namespace blockEdges
49{
50
51/*---------------------------------------------------------------------------*\
52 Class polyLineEdge Declaration
53\*---------------------------------------------------------------------------*/
55class 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
69public:
70
71 // Static data members
72 TypeName("polyLine");
73
74
75 // Constructors
76
77 //- Construct from components
79 (
80 const pointField& points,
81 const edge& fromTo,
82 const pointField& intermediate
83 );
84
85 //- Construct from components
87 (
88 const pointField& points,
89 const label from,
90 const label to,
91 const pointField& intermediate
92 );
93
94 //- Construct from Istream and point field.
96 (
97 const dictionary& dict,
98 const label index,
99 const searchableSurfaces& /*unused*/,
100 const pointField& points,
101 Istream& is
102 );
103
104
105 //- Destructor
106 virtual ~polyLineEdge() = default;
107
108
109 // Member Functions
110
111 //- The point position corresponding to the curve parameter
112 // 0 <= lambda <= 1
113 point position(const scalar lambda) const;
114
115 //- The length of the curve
116 scalar length() const;
117};
118
119
120// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121
122} // End namespace blockEdges
123} // End namespace Foam
124
125// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126
127#endif
128
129// ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
Define a curved edge that is parameterized for 0<lambda<1 between the start/end points.
Definition: blockEdge.H:64
A blockEdge defined in terms of a series of straight line segments.
Definition: polyLineEdge.H:58
scalar length() const
The length of the curve.
Definition: polyLineEdge.C:92
virtual ~polyLineEdge()=default
Destructor.
point position(const scalar lambda) const
The point position corresponding to the curve parameter.
Definition: polyLineEdge.C:86
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Definition: edge.H:66
A series of straight line segments, which can also be interpreted as a series of control points for s...
Definition: polyLine.H:56
const pointField & points() const noexcept
Return const-access to the control-points.
Definition: polyLine.C:112
Container for searchableSurfaces. The collection is specified as a dictionary. For example,...
Namespace for OpenFOAM.
dictionary dict
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73