projectCurveEdge.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::projectCurveEdge
26 
27 Description
28  Defines the edge from the projection onto a surface (single surface)
29  or intersection of two surfaces.
30 
31 SourceFiles
32  projectCurveEdge.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef projectCurveEdge_H
37 #define projectCurveEdge_H
38 
39 #include "blockEdge.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 class pointConstraint;
47 
48 /*---------------------------------------------------------------------------*\
49  Class projectCurveEdge Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class projectCurveEdge
53 :
54  public blockEdge
55 {
56  // Private Data
57 
58  const searchableSurfaces& geometry_;
59 
60  //- The indices of surfaces onto which the points are projected
61  labelList surfaces_;
62 
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("projectCurve");
68 
69 
70  // Constructors
71 
72  //- Construct from Istream setting pointsList
74  (
75  const dictionary& dict,
76  const label index,
77  const searchableSurfaces& geometry,
78  const pointField& points,
79  Istream&
80  );
81 
82  //- Disallow default bitwise copy construction
83  projectCurveEdge(const projectCurveEdge&) = delete;
84 
85 
86  //- Destructor
87  virtual ~projectCurveEdge()
88  {}
89 
90 
91  // Member Functions
92 
93  //- Return the point positions corresponding to the curve parameters
94  // 0 <= lambda <= 1
95  virtual point position(const scalar) const
96  {
98  return point::max;
99  }
100 
101  //- Return the point positions corresponding to the curve parameters
102  // 0 <= lambda <= 1
103  virtual tmp<pointField> position(const scalarList&) const;
104 
105  //- Return the length of the curve
106  virtual scalar length() const
107  {
109  return 1;
110  }
111 
112 
113  // Member Operators
114 
115  //- Disallow default bitwise assignment
116  void operator=(const projectCurveEdge&) = delete;
117 };
118 
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
TypeName("projectCurve")
Runtime type information.
dictionary dict
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:59
virtual ~projectCurveEdge()
Destructor.
virtual point position(const scalar) const
Return the point positions corresponding to the curve parameters.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
projectCurveEdge(const dictionary &dict, const label index, const searchableSurfaces &geometry, const pointField &points, Istream &)
Construct from Istream setting pointsList.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
const pointField & points
Container for searchableSurfaces.
void operator=(const projectCurveEdge &)=delete
Disallow default bitwise assignment.
Defines the edge from the projection onto a surface (single surface) or intersection of two surfaces...
virtual scalar length() const
Return the length of the curve.
Define a curved edge that is parameterized for 0<lambda<1 between the start and end point...
Definition: blockEdge.H:56
A class for managing temporary objects.
Definition: PtrList.H:53
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:366
Namespace for OpenFOAM.