All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
projectEdge.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::projectEdge
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  projectEdge.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef projectEdge_H
37 #define projectEdge_H
38 
39 #include "blockEdge.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 class pointConstraint;
47 
48 /*---------------------------------------------------------------------------*\
49  Class projectEdge Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class projectEdge
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  //- Single point find nearest
67  void findNearest(const point&, point& near, pointConstraint&) const;
68 
69 
70 public:
71 
72  //- Runtime type information
73  TypeName("project");
74 
75 
76  // Constructors
77 
78  //- Construct from Istream setting pointsList
80  (
81  const dictionary& dict,
82  const label index,
83  const searchableSurfaces& geometry,
84  const pointField& points,
85  Istream&
86  );
87 
88  //- Disallow default bitwise copy construction
89  projectEdge(const projectEdge&) = delete;
90 
91 
92  //- Destructor
93  virtual ~projectEdge()
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 
103  //- Return the point positions corresponding to the curve parameters
104  // 0 <= lambda <= 1
105  virtual tmp<pointField> position(const scalarList&) const;
106 
107  //- Return the length of the curve
108  virtual scalar length() const
109  {
111  return 1;
112  }
113 
114 
115  // Member Operators
116 
117  //- Disallow default bitwise assignment
118  void operator=(const projectEdge&) = delete;
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
projectEdge(const dictionary &dict, const label index, const searchableSurfaces &geometry, const pointField &points, Istream &)
Construct from Istream setting pointsList.
Definition: projectEdge.C:82
virtual point position(const scalar) const
Return the point positions corresponding to the curve parameters.
Definition: projectEdge.C:111
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
Defines the edge from the projection onto a surface (single surface) or intersection of two surfaces...
Definition: projectEdge.H:51
virtual scalar length() const
Return the length of the curve.
Definition: projectEdge.H:107
TypeName("project")
Runtime type information.
const pointField & points
Container for searchableSurfaces.
Accumulates point constraints through successive applications of the applyConstraint function...
Define a curved edge that is parameterised for 0<lambda<1 between the start and end point...
Definition: blockEdge.H:56
A class for managing temporary objects.
Definition: PtrList.H:53
virtual ~projectEdge()
Destructor.
Definition: projectEdge.H:92
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:353
void operator=(const projectEdge &)=delete
Disallow default bitwise assignment.
Namespace for OpenFOAM.