polyLineEdge.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "polyLineEdge.H"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33 namespace blockEdges
34 {
35  defineTypeNameAndDebug(polyLineEdge, 0);
36  addToRunTimeSelectionTable(blockEdge, polyLineEdge, Istream);
37 }
38 }
39 
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
43 Foam::blockEdges::polyLineEdge::polyLineEdge
44 (
45  const pointField& ps,
46  const label start,
47  const label end,
48  const pointField& otherPoints
49 )
50 :
51  blockEdge(ps, start, end),
52  polyLine(appendEndPoints(ps, start_, end_, otherPoints))
53 {}
54 
55 
56 Foam::blockEdges::polyLineEdge::polyLineEdge
57 (
58  const dictionary& dict,
59  const label index,
60  const searchableSurfaces& geometry,
61  const pointField& ps,
62  Istream& is
63 )
64 :
65  blockEdge(dict, index, ps, is),
66  polyLine(appendEndPoints(ps, start_, end_, pointField(is)))
67 {}
68 
69 
70 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
71 
73 {}
74 
75 
76 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
77 
79 {
80  return polyLine::position(lambda);
81 }
82 
83 
85 {
86  return polyLine::lineLength_;
87 }
88 
89 
90 // ************************************************************************* //
scalar lineLength_
The real line length.
Definition: polyLine.H:72
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
point position(const scalar) const
Return the point position corresponding to the curve parameter.
Definition: polyLine.C:118
Macros for easy insertion into run-time selection tables.
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:42
scalar length() const
Return the length of the curve.
Definition: polyLineEdge.C:84
Container for searchableSurfaces.
A series of straight line segments, which can also be interpreted as a series of control points for s...
Definition: polyLine.H:53
point position(const scalar lambda) const
Return the point position corresponding to the curve parameter.
Definition: polyLineEdge.C:78
defineTypeNameAndDebug(arcEdge, 0)
virtual ~polyLineEdge()
Destructor.
Definition: polyLineEdge.C:72
addToRunTimeSelectionTable(blockEdge, arcEdge, Istream)
Define a curved edge that is parameterized for 0<lambda<1 between the start and end point...
Definition: blockEdge.H:56
dimensionedScalar lambda(laminarTransport.lookup("lambda"))
Namespace for OpenFOAM.