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 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::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 projectCurveEdge_H
40 #define projectCurveEdge_H
41 
42 #include "blockEdge.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 class pointConstraint;
50 
51 /*---------------------------------------------------------------------------*\
52  Class projectCurveEdge Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class projectCurveEdge
56 :
57  public blockEdge
58 {
59  // Private Data
60 
61  const searchableSurfaces& geometry_;
62 
63  //- The indices of surfaces onto which the points are projected
64  labelList surfaces_;
65 
66 
67  // Private Member Functions
68 
69  //- No copy construct
70  projectCurveEdge(const projectCurveEdge&) = delete;
71 
72  //- No copy assignment
73  void operator=(const projectCurveEdge&) = delete;
74 
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("projectCurve");
80 
81 
82  // Constructors
83 
84  //- Construct from Istream setting pointsList
86  (
87  const dictionary& dict,
88  const label index,
89  const searchableSurfaces& geometry,
90  const pointField& points,
91  Istream& is
92  );
93 
94 
95  //- Destructor
96  virtual ~projectCurveEdge() = default;
97 
98 
99  // Member Functions
100 
101  //- Return the point positions corresponding to the curve parameters
102  // 0 <= lambda <= 1
103  virtual point position(const scalar) const
104  {
106  return point::max;
107  }
108 
109  //- Return the point positions corresponding to the curve parameters
110  // 0 <= lambda <= 1
111  virtual tmp<pointField> position(const scalarList&) const;
112 
113  //- Return the length of the curve
114  virtual scalar length() const
115  {
117  return 1;
118  }
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
Foam::projectCurveEdge::position
virtual point position(const scalar) const
Return the point positions corresponding to the curve parameters.
Definition: projectCurveEdge.H:102
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Foam::blockEdge
Define a curved edge that is parameterized for 0<lambda<1 between the start and end point.
Definition: blockEdge.H:59
Foam::projectCurveEdge::~projectCurveEdge
virtual ~projectCurveEdge()=default
Destructor.
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:419
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:62
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:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::VectorSpace< Vector< scalar >, scalar, 3 >::max
static const Vector< scalar > max
Definition: VectorSpace.H:117
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
Foam::projectCurveEdge::length
virtual scalar length() const
Return the length of the curve.
Definition: projectCurveEdge.H:113
Foam::projectCurveEdge::TypeName
TypeName("projectCurve")
Runtime type information.
blockEdge.H
Foam::projectCurveEdge
Defines the edge from the projection onto a surface (single surface) or intersection of two surfaces.
Definition: projectCurveEdge.H:54