projectCurveEdge.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) 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::projectCurveEdge
29 
30 Description
31  Defines the edge from the projection onto a surface (single surface)
32  or intersection of two surfaces.
33 
34 SourceFiles
35  projectCurveEdge.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef blockEdges_projectCurveEdge_H
40 #define blockEdges_projectCurveEdge_H
41 
42 #include "blockEdge.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 // Forward Declarations
50 class pointConstraint;
51 
52 namespace blockEdges
53 {
54 
55 /*---------------------------------------------------------------------------*\
56  Class projectCurveEdge Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class projectCurveEdge
60 :
61  public blockEdge
62 {
63  // Private Data
64 
65  const searchableSurfaces& geometry_;
66 
67  //- The indices of surfaces onto which the points are projected
68  labelList surfaces_;
69 
70 
71  // Private Member Functions
72 
73  //- No copy construct
74  projectCurveEdge(const projectCurveEdge&) = delete;
75 
76  //- No copy assignment
77  void operator=(const projectCurveEdge&) = delete;
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("projectCurve");
84 
85 
86  // Constructors
87 
88  //- Construct from Istream and point field.
90  (
91  const dictionary& dict,
92  const label index,
93  const searchableSurfaces& geometry,
94  const pointField& points,
95  Istream& is
96  );
97 
98 
99  //- Destructor
100  virtual ~projectCurveEdge() = default;
101 
102 
103  // Member Functions
104 
105  //- The point position corresponding to the curve parameter
106  // 0 <= lambda <= 1
107  // \note NotImplemented
108  virtual point position(const scalar) const;
109 
110  //- The point positions corresponding to the curve parameters
111  // 0 <= lambda <= 1
112  virtual tmp<pointField> position(const scalarList&) const;
113 
114  //- The length of the curve
115  // \note NotImplemented
116  virtual scalar length() const;
117 };
118 
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 } // End namespace blockEdges
123 } // End namespace Foam
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 #endif
128 
129 // ************************************************************************* //
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::blockEdge
Define a curved edge that is parameterized for 0<lambda<1 between the start/end points.
Definition: blockEdge.H:63
Foam::blockEdges::projectCurveEdge
Defines the edge from the projection onto a surface (single surface) or intersection of two surfaces.
Definition: projectCurveEdge.H:58
Foam::blockEdges::projectCurveEdge::position
virtual point position(const scalar) const
The point position corresponding to the curve parameter.
Definition: projectCurveEdge.C:90
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::blockEdges::projectCurveEdge::TypeName
TypeName("projectCurve")
Runtime type information.
Foam::blockEdges::projectCurveEdge::length
virtual scalar length() const
The length of the curve.
Definition: projectCurveEdge.C:271
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
Foam::blockEdges::projectCurveEdge::~projectCurveEdge
virtual ~projectCurveEdge()=default
Destructor.
Foam::Vector< scalar >
Foam::List< label >
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
blockEdge.H