lineEdge.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::lineEdge
29 
30 Description
31  A straight edge between the start point and the end point.
32 
33 SourceFiles
34  lineEdge.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef blockEdges_lineEdge_H
39 #define blockEdges_lineEdge_H
40 
41 #include "blockEdge.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 namespace blockEdges
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class lineEdge Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class lineEdge
55 :
56  public blockEdge
57 {
58 public:
59 
60  //- Runtime type information
61  TypeName("line");
62 
63 
64  // Constructors
65 
66  //- Construct from components
67  lineEdge
68  (
69  const pointField& points,
70  const label start,
71  const label end
72  );
73 
74  //- Construct from Istream and point field.
75  lineEdge
76  (
77  const dictionary& dict,
78  const label index,
79  const searchableSurfaces& geometry,
80  const pointField& points,
81  Istream& is
82  );
83 
84 
85  //- Destructor
86  virtual ~lineEdge() = default;
87 
88 
89  // Member Functions
90 
91  //- The point position corresponding to the curve parameter
92  // 0 <= lambda <= 1
93  point position(const scalar) const;
94 
95  //- The length of the curve
96  scalar length() const;
97 };
98 
99 
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 
102 } // End namespace blockEdges
103 } // End namespace Foam
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 #endif
108 
109 // ************************************************************************* //
Foam::blockEdges::lineEdge::TypeName
TypeName("line")
Runtime type information.
Foam::blockEdge::end
label end() const
Index of end point.
Definition: blockEdgeI.H:36
Foam::blockEdges::lineEdge
A straight edge between the start point and the end point.
Definition: lineEdge.H:53
Foam::blockEdges::lineEdge::lineEdge
lineEdge(const pointField &points, const label start, const label end)
Construct from components.
Definition: lineEdge.C:47
Foam::blockEdge
Define a curved edge that is parameterized for 0<lambda<1 between the start/end points.
Definition: blockEdge.H:62
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
Foam::blockEdges::lineEdge::~lineEdge
virtual ~lineEdge()=default
Destructor.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::Vector< scalar >
Foam::blockEdges::lineEdge::length
scalar length() const
The length of the curve.
Definition: lineEdge.C:95
Foam::searchableSurfaces
Container for searchableSurfaces. The collection is specified as a dictionary. For example,...
Definition: searchableSurfaces.H:92
points
const pointField & points
Definition: gmvOutputHeader.H:1
blockEdge.H
Foam::blockEdges::lineEdge::position
point position(const scalar) const
The point position corresponding to the curve parameter.
Definition: lineEdge.C:72