lineCellFace.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) 2011-2021 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::sampledSets::lineCellFace
26 
27 Description
28  Face-intersections along a line, plus cell-samples at the mid-points
29  in-between
30 
31 Usage
32  \table
33  Property | Description | Req'd? | Default
34  start | The start point of the line | yes |
35  end | The end point of the line | yes |
36  axis | The coordinate axis that is written | yes |
37  \endtable
38 
39  Example specification:
40  \verbatim
41  {
42  type lineCellFace;
43  start (0.55 0.6 0.5);
44  end (0.55 -0.3 -0.1);
45  axis x;
46  }
47  \endverbatim
48 
49 SourceFiles
50  lineCellFace.C
51 
52 \*---------------------------------------------------------------------------*/
53 
54 #ifndef lineCellFace_H
55 #define lineCellFace_H
56 
57 #include "lineCell.H"
58 
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 
61 namespace Foam
62 {
63 namespace sampledSets
64 {
65 
66 /*---------------------------------------------------------------------------*\
67  Class lineCellFace Declaration
68 \*---------------------------------------------------------------------------*/
69 
70 class lineCellFace
71 :
72  public sampledSet
73 {
74  // Private Data
75 
76  //- Start point
77  const point start_;
78 
79  //- End point
80  const point end_;
81 
82 
83  // Private Member Functions
84 
85  //- Calculate all the sampling points
86  virtual void calcSamples
87  (
88  DynamicList<point>& samplingPositions,
89  DynamicList<scalar>& samplingDistances,
90  DynamicList<label>& samplingSegments,
91  DynamicList<label>& samplingCells,
92  DynamicList<label>& samplingFaces
93  ) const;
94 
95  //- Uses calcSamples to obtain samples and copies them into *this
96  void genSamples();
97 
98 
99 public:
100 
101  //- Runtime type information
102  TypeName("lineCellFace");
103 
104 
105  // Constructors
106 
107  //- Construct from dictionary
109  (
110  const word& name,
111  const polyMesh& mesh,
112  const meshSearch& searchEngine,
113  const dictionary& dict
114  );
115 
116  //- Construct from components
118  (
119  const word& name,
120  const polyMesh& mesh,
121  const meshSearch& searchEngine,
122  const word& axis,
123  const point& start,
124  const point& end
125  );
126 
127 
128  //- Destructor
129  virtual ~lineCellFace();
130 };
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace sampledSets
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
Various (local, not parallel) searches on polyMesh; uses (demand driven) octree to search...
Definition: meshSearch.H:57
dictionary dict
const polyMesh & mesh() const
Access the mesh.
Definition: sampledSet.H:210
word axis() const
Return the axis name.
Definition: coordSet.H:147
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
virtual ~lineCellFace()
Destructor.
Definition: lineCellFace.C:144
TypeName("lineCellFace")
Runtime type information.
lineCellFace(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict)
Construct from dictionary.
Definition: lineCellFace.C:109
A class for handling words, derived from string.
Definition: word.H:59
const word & name() const
Access the name.
Definition: sampledSet.H:204
vector point
Point is a vector.
Definition: point.H:41
const meshSearch & searchEngine() const
Access the search engine.
Definition: sampledSet.H:216
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:76
Namespace for OpenFOAM.