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-------------------------------------------------------------------------------
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::lineEdge
29
30Description
31 A straight edge between the start point and the end point.
32
33SourceFiles
34 lineEdge.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef blockEdges_lineEdge_H
39#define blockEdges_lineEdge_H
40
41#include "blockEdge.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47namespace blockEdges
48{
49
50/*---------------------------------------------------------------------------*\
51 Class lineEdge Declaration
52\*---------------------------------------------------------------------------*/
54class lineEdge
55:
56 public blockEdge
57{
58public:
59
60 //- Runtime type information
61 TypeName("line");
62
63
64 // Constructors
65
66 //- Construct from components
68 (
69 const pointField& points,
70 const edge& fromTo
71 );
72
73 //- Construct from components
75 (
76 const pointField& points,
77 const label from,
78 const label to
79 );
80
81 //- Construct from Istream and point field.
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// ************************************************************************* //
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 straight edge between the start point and the end point.
Definition: lineEdge.H:56
scalar length() const
The length of the curve.
Definition: lineEdge.C:88
TypeName("line")
Runtime type information.
virtual ~lineEdge()=default
Destructor.
point position(const scalar) const
The point position corresponding to the curve parameter.
Definition: lineEdge.C:82
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
Container for searchableSurfaces. The collection is specified as a dictionary. For example,...
const pointField & points
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73