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-2021 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 edge& fromTo
71  );
72 
73  //- Construct from components
74  lineEdge
75  (
76  const pointField& points,
77  const label from,
78  const label to
79  );
80 
81  //- Construct from Istream and point field.
82  lineEdge
83  (
84  const dictionary& dict,
85  const label index,
86  const searchableSurfaces& /*unused*/,
87  const pointField& points,
88  Istream& is
89  );
90 
91 
92  //- Destructor
93  virtual ~lineEdge() = default;
94 
95 
96  // Member Functions
97 
98  //- The point position corresponding to the curve parameter
99  // 0 <= lambda <= 1
100  point position(const scalar) const;
101 
102  //- The length of the curve
103  scalar length() const;
104 };
105 
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 } // End namespace blockEdges
110 } // End namespace Foam
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 #endif
115 
116 // ************************************************************************* //
Foam::blockEdges::lineEdge::TypeName
TypeName("line")
Runtime type information.
Foam::blockEdges::lineEdge
A straight edge between the start point and the end point.
Definition: lineEdge.H:53
Foam::edge
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Definition: edge.H:63
Foam::blockEdge
Define a curved edge that is parameterized for 0<lambda<1 between the start/end points.
Definition: blockEdge.H:63
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
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:123
Foam::blockEdges::lineEdge::lineEdge
lineEdge(const pointField &points, const edge &fromTo)
Construct from components.
Definition: lineEdge.C:47
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:88
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:82