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-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::BSplineEdge
29
30Description
31 A blockEdge interface for B-splines.
32
33SourceFiles
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
46namespace Foam
47{
48namespace blockEdges
49{
50
51/*---------------------------------------------------------------------------*\
52 Class BSplineEdge Declaration
53\*---------------------------------------------------------------------------*/
55class 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
69public:
70
71 //- Runtime type information
72 TypeName("BSpline");
73
74
75 // Constructors
76
77 //- Construct from components
79 (
80 const pointField& points,
81 const edge& fromTo,
82 const pointField& internalPoints
83 );
84
85 //- Construct from components
87 (
88 const pointField& points,
89 const label from,
90 const label to,
91 const pointField& internalPoints
92 );
93
94 //- Construct from Istream and point field.
96 (
97 const dictionary& dict,
98 const label index,
99 const searchableSurfaces& /*unused*/,
100 const pointField& points,
101 Istream& is
102 );
103
104
105 //- Destructor
106 virtual ~BSplineEdge() = default;
107
108
109 // Member Functions
110
111 //- The point position corresponding to the curve parameter
112 // 0 <= lambda <= 1
113 virtual point position(const scalar) const;
114
115 //- The length of the spline curve
116 // \note NotImplemented
117 virtual scalar length() const;
118};
119
120
121// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122
123} // End namespace blockEdges
124} // End namespace Foam
125
126// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127
128#endif
129
130// ************************************************************************* //
An implementation of B-splines.
Definition: BSpline.H:79
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 blockEdge interface for B-splines.
Definition: BSplineEdge.H:58
virtual scalar length() const
The length of the spline curve.
Definition: BSplineEdge.C:115
virtual ~BSplineEdge()=default
Destructor.
TypeName("BSpline")
Runtime type information.
virtual point position(const scalar) const
The point position corresponding to the curve parameter.
Definition: BSplineEdge.C:109
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
const pointField & points() const noexcept
Return const-access to the control-points.
Definition: polyLine.C:112
Container for searchableSurfaces. The collection is specified as a dictionary. For example,...
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73