arcEdge.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) 2017 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::arcEdge
29 
30 Description
31  Defines the arcEdge of a circle in terms of 3 points on its circumference
32 
33 SourceFiles
34  arcEdge.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef blockEdges_arcEdge_H
39 #define blockEdges_arcEdge_H
40 
41 #include "blockEdge.H"
42 #include "cylindricalCS.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 namespace blockEdges
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class arcEdge Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class arcEdge
56 :
57  public blockEdge
58 {
59  // Private data
60 
61  // Begin, mid, end points
62  point p1_, p2_, p3_;
63 
64  //- The arc angle (in degrees)
65  scalar angle_;
66 
67  //- The arc radius
68  scalar radius_;
69 
70  //- The local cylindrical coordinate system
72 
73 
74  // Private Member Functions
75 
76  //- Calculate the angle, radius and axis
77  // \return the cylindrical coordinate system
78  coordSystem::cylindrical calcAngle();
79 
80  //- No copy construct
81  arcEdge(const arcEdge&) = delete;
82 
83  //- No copy assignment
84  void operator=(const arcEdge&) = delete;
85 
86 
87 public:
88 
89  //- Runtime type information
90  TypeName("arc");
91 
92 
93  // Constructors
94 
95  //- Construct from components
96  arcEdge
97  (
98  const pointField& points,
99  const label start,
100  const label end,
101  const point& pMid
102  );
103 
104  //- Construct from Istream setting pointsList
105  arcEdge
106  (
107  const dictionary& dict,
108  const label index,
109  const searchableSurfaces& geometry,
110  const pointField& points,
111  Istream&
112  );
113 
114 
115  //- Destructor
116  virtual ~arcEdge() = default;
117 
118 
119  // Member Functions
120 
121  //- The point corresponding to the curve parameter [0-1]
122  point position(const scalar lambda) const;
123 
124  //- The length of the curve
125  scalar length() const;
126 };
127 
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 } // End namespace blockEdges
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************************************************************* //
Foam::blockEdges::arcEdge::~arcEdge
virtual ~arcEdge()=default
Destructor.
Foam::blockEdges::arcEdge::length
scalar length() const
The length of the curve.
Definition: arcEdge.C:168
Foam::blockEdge::end
label end() const
Return label of end point.
Definition: blockEdgeI.H:36
Foam::blockEdges::arcEdge::TypeName
TypeName("arc")
Runtime type information.
Foam::blockEdge
Define a curved edge that is parameterized for 0<lambda<1 between the start and end point.
Definition: blockEdge.H:59
Foam::label
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:62
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
cylindricalCS.H
Foam::coordSystem::cylindrical
A cylindrical coordinate system (r-theta-z). The coordinate system angle theta is always in radians.
Definition: cylindricalCS.H:71
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::arcEdge::position
point position(const scalar lambda) const
The point corresponding to the curve parameter [0-1].
Definition: arcEdge.C:145
lambda
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::Vector< scalar >
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
Foam::blockEdges::arcEdge
Defines the arcEdge of a circle in terms of 3 points on its circumference.
Definition: arcEdge.H:54
blockEdge.H