splineEdge.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) 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::splineEdge
29
30Description
31 A blockEdge interface for Catmull-Rom splines.
32
33See also
34 BSpline
35 CatmullRomSpline
36
37SourceFiles
38 splineEdge.C
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef blockEdges_splineEdge_H
43#define blockEdges_splineEdge_H
44
45#include "blockEdge.H"
46#include "CatmullRomSpline.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52namespace blockEdges
53{
54
55/*---------------------------------------------------------------------------*\
56 Class splineEdge Declaration
57\*---------------------------------------------------------------------------*/
59class splineEdge
60:
61 public blockEdge,
62 public CatmullRomSpline
63{
64 // Private Member Functions
65
66 //- No copy construct
67 splineEdge(const splineEdge&) = delete;
68
69 //- No copy assignment
70 void operator=(const splineEdge&) = delete;
71
72
73public:
74
75 //- Runtime type information
76 TypeName("spline");
77
78
79 // Constructors
80
81 //- Construct from components
83 (
84 const pointField& points,
85 const edge& fromTo,
86 const pointField& internalPoints
87 );
88
89 //- Construct from components
91 (
92 const pointField& points,
93 const label from,
94 const label to,
95 const pointField& internalPoints
96 );
97
98 //- Construct from Istream and point field.
100 (
101 const dictionary& dict,
102 const label index,
103 const searchableSurfaces& /*unused*/,
104 const pointField& points,
105 Istream&
106 );
107
108
109 //- Destructor
110 virtual ~splineEdge() = default;
111
112
113 // Member Functions
114
115 //- The point position corresponding to the curve parameter
116 // 0 <= lambda <= 1
117 virtual point position(const scalar) const;
118
119 //- The length of the spline curve
120 // \note NotImplemented
121 virtual scalar length() const;
122};
123
124
125// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126
127} // End namespace blockEdges
128} // End namespace Foam
129
130// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131
132#endif
133
134// ************************************************************************* //
An implementation of Catmull-Rom splines (sometimes known as Overhauser splines).
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 Catmull-Rom splines.
Definition: splineEdge.H:62
virtual scalar length() const
The length of the spline curve.
Definition: splineEdge.C:115
TypeName("spline")
Runtime type information.
virtual ~splineEdge()=default
Destructor.
virtual point position(const scalar) const
The point position corresponding to the curve parameter.
Definition: splineEdge.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