projectFace.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 | Copyright (C) 2016 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  //- Calulate 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  //- Disallow default bitwise copy construct
87  projectFace(const projectFace&);
88 
89  //- Disallow default bitwise assignment
90  void operator=(const projectFace&);
91 
92 
93 public:
94 
95  //- Runtime type information
96  TypeName("project");
97 
98 
99  // Constructors
100 
101  //- Construct from Istream setting pointsList
103  (
104  const dictionary& dict,
105  const label index,
106  const searchableSurfaces& geometry,
107  Istream&
108  );
109 
110 
111  //- Destructor
112  virtual ~projectFace()
113  {}
114 
115 
116  // Member Functions
117 
118  //- Project the given points onto the surface
119  virtual void project
120  (
121  const blockDescriptor&,
122  const label blockFacei,
123  pointField& points
124  ) const;
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace blockFaces
131 } // End namespace Foam
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
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:137
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:111
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:146
Container for searchableSurfaces.
Define a curved face.
Definition: blockFace.H:55
Projects the given set of face points onto the selected surface of the geometry provided as a searcha...
Definition: projectFace.H:51
label n
Namespace for OpenFOAM.