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-2018 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  // Private Member Functions
65 
66  //- Disallow default bitwise copy construct
68 
69  //- Disallow default bitwise assignment
70  void operator=(const projectCurveEdge&);
71 
72 
73 public:
74 
75  //- Runtime type information
76  TypeName("projectCurve");
77 
78 
79  // Constructors
80 
81  //- Construct from Istream setting pointsList
83  (
84  const dictionary& dict,
85  const label index,
86  const searchableSurfaces& geometry,
87  const pointField& points,
88  Istream&
89  );
90 
91 
92  //- Destructor
93  virtual ~projectCurveEdge()
94  {}
95 
96 
97  // Member Functions
98 
99  //- Return the point positions corresponding to the curve parameters
100  // 0 <= lambda <= 1
101  virtual point position(const scalar) const
102  {
104  return point::max;
105  }
106 
107  //- Return the point positions corresponding to the curve parameters
108  // 0 <= lambda <= 1
109  virtual tmp<pointField> position(const scalarList&) const;
110 
111  //- Return the length of the curve
112  virtual scalar length() const
113  {
115  return 1;
116  }
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:137
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.
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.