BSplineEdge.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) 2014-2016 OpenFOAM Foundation
9  Copyright (C) 2019-2020 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::BSplineEdge
29 
30 Description
31  A blockEdge interface for B-splines.
32 
33 SourceFiles
34  BSplineEdge.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef blockEdges_BSplineEdge_H
39 #define blockEdges_BSplineEdge_H
40 
41 #include "blockEdge.H"
42 #include "BSpline.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 namespace blockEdges
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class BSplineEdge Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class BSplineEdge
56 :
57  public blockEdge,
58  public BSpline
59 {
60  // Private Member Functions
61 
62  //- No copy construct
63  BSplineEdge(const BSplineEdge&) = delete;
64 
65  //- No copy assignment
66  void operator=(const BSplineEdge&) = delete;
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("BSpline");
73 
74 
75  // Constructors
76 
77  //- Construct from components
79  (
80  const pointField& points,
81  const label start,
82  const label end,
83  const pointField& internalPoints
84  );
85 
86  //- Construct from Istream and point field.
88  (
89  const dictionary& dict,
90  const label index,
91  const searchableSurfaces& geometry,
92  const pointField& points,
93  Istream& is
94  );
95 
96 
97  //- Destructor
98  virtual ~BSplineEdge() = default;
99 
100 
101  // Member Functions
102 
103  //- The point position corresponding to the curve parameter
104  // 0 <= lambda <= 1
105  virtual point position(const scalar) const;
106 
107  //- The length of the spline curve
108  // \note NotImplemented
109  virtual scalar length() const;
110 };
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 } // End namespace blockEdges
116 } // End namespace Foam
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #endif
121 
122 // ************************************************************************* //
Foam::blockEdge::end
label end() const
Index of end point.
Definition: blockEdgeI.H:36
Foam::polyLine::points
const pointField & points() const
Return const-access to the control-points.
Definition: polyLine.C:112
Foam::blockEdge
Define a curved edge that is parameterized for 0<lambda<1 between the start/end points.
Definition: blockEdge.H:62
Foam::BSpline
An implementation of B-splines.
Definition: BSpline.H:76
Foam::blockEdges::BSplineEdge::position
virtual point position(const scalar) const
The point position corresponding to the curve parameter.
Definition: BSplineEdge.C:98
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
Index of start point.
Definition: blockEdgeI.H:30
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
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
BSpline.H
Foam::blockEdges::BSplineEdge::~BSplineEdge
virtual ~BSplineEdge()=default
Destructor.
Foam::Vector< scalar >
Foam::searchableSurfaces
Container for searchableSurfaces. The collection is specified as a dictionary. For example,...
Definition: searchableSurfaces.H:92
Foam::blockEdges::BSplineEdge
A blockEdge interface for B-splines.
Definition: BSplineEdge.H:54
Foam::blockEdges::BSplineEdge::length
virtual scalar length() const
The length of the spline curve.
Definition: BSplineEdge.C:104
blockEdge.H
Foam::blockEdges::BSplineEdge::TypeName
TypeName("BSpline")
Runtime type information.