All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
projectFace.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-2020 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::blockFaces::projectFace
26 
27 Description
28  Projects the given set of face points onto the selected surface of the
29  geometry provided as a searchableSurfaces object.
30 
31 SourceFiles
32  projectFace.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef blockFaces_projectFace_H
37 #define blockFaces_projectFace_H
38 
39 #include "blockFace.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace blockFaces
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class projectFace Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class projectFace
53 :
54  public blockFace
55 {
56  // Private Data
57 
58  //- The surface onto which the points are projected
59  const searchableSurface& surface_;
60 
61 
62  // Private Member Functions
63 
64  const searchableSurface& lookupSurface
65  (
66  const searchableSurfaces& geometry,
67  Istream& is
68  ) const;
69 
70  //- Convert i,j to single index
71  label index
72  (
73  const labelPair& n,
74  const labelPair& coord
75  ) const;
76 
77  //- Calculate lambdas (but unnormalised)
78  void calcLambdas
79  (
80  const labelPair& n,
81  const pointField& points,
82  scalarField& lambdaI,
83  scalarField& lambdaJ
84  ) const;
85 
86 
87 public:
88 
89  //- Runtime type information
90  TypeName("project");
91 
92 
93  // Constructors
94 
95  //- Construct from Istream setting pointsList
97  (
98  const dictionary& dict,
99  const label index,
100  const searchableSurfaces& geometry,
101  Istream&
102  );
103 
104  //- Disallow default bitwise copy construction
105  projectFace(const projectFace&) = delete;
106 
107 
108  //- Destructor
109  virtual ~projectFace()
110  {}
111 
112 
113  // Member Functions
114 
115  //- Project the given points onto the surface
116  virtual void project
117  (
118  const blockDescriptor&,
119  const label blockFacei,
120  pointField& points
121  ) const;
122 
123 
124  // Member Operators
125 
126  //- Disallow default bitwise assignment
127  void operator=(const projectFace&) = delete;
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace blockFaces
134 } // End namespace Foam
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #endif
139 
140 // ************************************************************************* //
dictionary dict
TypeName("project")
Runtime type information.
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
Takes the description of the block and the list of curved edges and creates a list of points on edges...
virtual ~projectFace()
Destructor.
Definition: projectFace.H:108
Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP.
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: contiguous.H:49
const pointField & points
virtual void project(const blockDescriptor &, const label blockFacei, pointField &points) const
Project the given points onto the surface.
Definition: projectFace.C:145
Container for searchableSurfaces.
Define a curved face.
Definition: blockFace.H:55
void operator=(const projectFace &)=delete
Disallow default bitwise assignment.
Projects the given set of face points onto the selected surface of the geometry provided as a searcha...
Definition: projectFace.H:51
label n
projectFace(const dictionary &dict, const label index, const searchableSurfaces &geometry, Istream &)
Construct from Istream setting pointsList.
Definition: projectFace.C:130
Namespace for OpenFOAM.