cylinderAnnulusToCell.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9  Copyright (C) 2018-2022 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "cylinderAnnulusToCell.H"
30 #include "polyMesh.H"
32 
33 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37  defineTypeNameAndDebug(cylinderAnnulusToCell, 0);
38  addToRunTimeSelectionTable(topoSetSource, cylinderAnnulusToCell, word);
39  addToRunTimeSelectionTable(topoSetSource, cylinderAnnulusToCell, istream);
41  (
42  topoSetCellSource,
43  cylinderAnnulusToCell,
44  word
45  );
47  (
48  topoSetCellSource,
49  cylinderAnnulusToCell,
50  istream
51  );
53  (
54  topoSetCellSource,
55  cylinderAnnulusToCell,
56  word,
57  cylinderAnnulus
58  );
60  (
61  topoSetCellSource,
62  cylinderAnnulusToCell,
63  istream,
64  cylinderAnnulus
65  );
66 }
67 
68 
69 Foam::topoSetSource::addToUsageTable Foam::cylinderAnnulusToCell::usage_
70 (
71  cylinderAnnulusToCell::typeName,
72  "\n Usage: cylinderAnnulusToCell (p1X p1Y p1Z) (p2X p2Y p2Z)"
73  " radius innerRadius\n\n"
74  " Select cells with centres within bounding cylinder annulus\n\n"
75 );
76 
77 
78 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
79 
81 (
82  const polyMesh& mesh,
83  const point& point1,
84  const point& point2,
85  const scalar radius,
86  const scalar innerRadius
87 )
88 :
89  cylinderToCell(mesh, point1, point2, radius, innerRadius)
90 {}
91 
92 
94 (
95  const polyMesh& mesh,
96  const dictionary& dict
97 )
98 :
100 {}
101 
102 
104 (
105  const polyMesh& mesh,
106  Istream& is
107 )
108 :
109  cylinderToCell(mesh, is, true) // mandatoryInnerRadius = true
110 {}
111 
112 
113 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
A topoSetCellSource to select all cells whose cell centre inside a given bounding cylinder or cylinde...
cylinderAnnulusToCell(const polyMesh &mesh, const point &point1, const point &point2, const scalar radius, const scalar innerRadius=0)
Construct from components.
Macros for easy insertion into run-time selection tables.
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
dynamicFvMesh & mesh
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
defineTypeNameAndDebug(combustionModel, 0)
Class with constructor to add usage string to table.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Namespace for OpenFOAM.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)