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 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 
55 class lineEdge
56 :
57  public blockEdge
58 {
59 
60 public:
61 
62  //- Runtime type information
63  TypeName("line");
64 
65 
66  // Constructors
67 
68  //- Construct from components
69  lineEdge(const pointField&, const label start, const label end);
70 
71  //- Construct from Istream with a pointField
72  lineEdge
73  (
74  const dictionary& dict,
75  const label index,
76  const searchableSurfaces& geometry,
77  const pointField&,
78  Istream& is
79  );
80 
81 
82  //- Destructor
83  virtual ~lineEdge() = default;
84 
85 
86  // Member Functions
87 
88  //- Return the point position corresponding to the curve parameter
89  // 0 <= lambda <= 1
90  point position(const scalar) const;
91 
92  //- Return the length of the curve
93  scalar length() const;
94 };
95 
96 
97 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
98 
99 } // End namespace blockEdges
100 } // End namespace Foam
101 
102 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103 
104 #endif
105 
106 // ************************************************************************* //
Foam::blockEdges::lineEdge::TypeName
TypeName("line")
Runtime type information.
Foam::blockEdge::end
label end() const
Return label of end point.
Definition: blockEdgeI.H:36
Foam::blockEdges::lineEdge
A straight edge between the start point and the end point.
Definition: lineEdge.H:54
Foam::blockEdges::lineEdge::lineEdge
lineEdge(const pointField &, 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 and end point.
Definition: blockEdge.H:59
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
Return label 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
Return the length of the curve.
Definition: lineEdge.C:85
Foam::searchableSurfaces
Container for searchableSurfaces. The collection is specified as a dictionary. For example,...
Definition: searchableSurfaces.H:92
blockEdge.H
Foam::blockEdges::lineEdge::position
point position(const scalar) const
Return the point position corresponding to the curve parameter.
Definition: lineEdge.C:72