boundaryToCell.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2018 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::boundaryToCell
28 
29 Description
30  A topoSetCellSource to select all external (boundary) faces.
31 
32  \heading Dictionary parameters
33  None
34 
35 SourceFiles
36  boundaryToCell.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef boundaryToCell_H
41 #define boundaryToCell_H
42 
43 #include "topoSetCellSource.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class boundaryToCell Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class boundaryToCell
55 :
56  public topoSetCellSource
57 {
58  // Private data
59 
60  //- Add usage string
61  static addToUsageTable usage_;
62 
63 
64  // Private Member Functions
65 
66  void combine(topoSet& set, const bool add) const;
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("boundaryToCell");
73 
74  // Constructors
75 
76  //- Construct from components
78 
79  //- Construct from dictionary
80  boundaryToCell(const polyMesh& mesh, const dictionary& unused);
81 
82  //- Construct from Istream
83  boundaryToCell(const polyMesh& mesh, Istream& unused);
84 
85 
86  //- Destructor
87  virtual ~boundaryToCell() = default;
88 
89 
90  // Member Functions
91 
92  virtual void applyToSet
93  (
94  const topoSetSource::setAction action,
95  topoSet& set
96  ) const;
97 
98 };
99 
100 
101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102 
103 } // End namespace Foam
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 #endif
108 
109 // ************************************************************************* //
Foam::boundaryToCell::boundaryToCell
boundaryToCell(const polyMesh &mesh)
Construct from components.
Definition: boundaryToCell.C:84
Foam::boundaryToCell::TypeName
TypeName("boundaryToCell")
Runtime type information.
Foam::combine
Definition: FaceCellWave.C:56
Foam::topoSetSource::setAction
setAction
Enumeration defining the valid actions.
Definition: topoSetSource.H:99
Foam::topoSetSource::mesh
const polyMesh & mesh() const
Reference to the mesh.
Definition: topoSetSource.H:333
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::boundaryToCell::applyToSet
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
Definition: boundaryToCell.C:113
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::topoSet
General set of labels of mesh quantity (points, cells, faces).
Definition: topoSet.H:66
topoSetCellSource.H
Foam::boundaryToCell::~boundaryToCell
virtual ~boundaryToCell()=default
Destructor.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::add
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Definition: FieldFieldFunctions.C:939
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::topoSetCellSource
Base class of a topoSet source for selecting cells.
Definition: topoSetCellSource.H:50
Foam::boundaryToCell
A topoSetCellSource to select all external (boundary) faces.
Definition: boundaryToCell.H:53