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 -------------------------------------------------------------------------------
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 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 // ************************************************************************* //
Foam::edge
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Definition: edge.H:63
Foam::blockEdge
Define a curved edge that is parameterized for 0<lambda<1 between the start/end points.
Definition: blockEdge.H:63
Foam::BSpline
An implementation of B-splines.
Definition: BSpline.H:76
Foam::polyLine::points
const pointField & points() const noexcept
Return const-access to the control-points.
Definition: polyLine.C:112
Foam::blockEdges::BSplineEdge::position
virtual point position(const scalar) const
The point position corresponding to the curve parameter.
Definition: BSplineEdge.C:109
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
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:123
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:115
blockEdge.H
Foam::blockEdges::BSplineEdge::TypeName
TypeName("BSpline")
Runtime type information.