Loading...
Searching...
No Matches
lineEdge.C
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
27\*---------------------------------------------------------------------------*/
28
29#include "lineEdge.H"
32// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33
34namespace Foam
35{
36namespace blockEdges
37{
40}
41}
42
43
44// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
45
47(
48 const pointField& points,
49 const edge& fromTo
50)
51:
52 blockEdge(points, fromTo)
53{}
54
55
57(
58 const pointField& points,
59 const label from,
60 const label to
61)
62:
63 blockEdge(points, from, to)
64{}
65
66
68(
69 const dictionary& dict,
70 const label index,
71 const searchableSurfaces&,
72 const pointField& points,
73 Istream& is
74)
76 blockEdge(dict, index, points, is)
77{}
78
79
80// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
85}
86
87
88Foam::scalar Foam::blockEdges::lineEdge::length() const
89{
90 return Foam::mag(lastPoint() - firstPoint());
91}
92
93
94// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
Define a curved edge that is parameterized for 0<lambda<1 between the start/end points.
Definition blockEdge.H:61
blockEdge(const pointField &points, const label from, const label to)
Construct from components.
Definition blockEdge.H:106
point linearPosition(const scalar lambda) const
The point position in the straight line.
Definition blockEdgeI.H:81
const point & lastPoint() const
The location of the last point.
Definition blockEdgeI.H:48
const point & firstPoint() const
The location of the first point.
Definition blockEdgeI.H:42
A straight edge between the start point and the end point.
Definition lineEdge.H:52
scalar length() const
The length of the curve.
Definition lineEdge.C:81
lineEdge(const pointField &points, const edge &fromTo)
Construct from components.
Definition lineEdge.C:40
point position(const scalar) const
The point position corresponding to the curve parameter.
Definition lineEdge.C:75
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
Definition edge.H:62
Container for searchableSurfaces. The collection is specified as a dictionary. For example,...
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition className.H:142
const pointField & points
A namespace for various blockEdge types.
Definition arcEdge.C:31
Namespace for OpenFOAM.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
vector point
Point is a vector.
Definition point.H:37
vectorField pointField
pointField is a vectorField.
dictionary dict
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)