setToFaceZone.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) 2011 OpenFOAM Foundation
9  Copyright (C) 2018-2019 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 Class
28  Foam::setToFaceZone
29 
30 Description
31  A topoSetSource to select faces based on usage in a faceSet.
32  Sets flipMap to true.
33 
34  \heading Dictionary parameters
35  \table
36  Property | Description | Required | Default
37  faceSet | Name of input faceSet | yes |
38  \endtable
39 
40 Note
41  The use of keyword \c faceSet is consistent with the setsToFaceZone,
42  but inconsistent with setToCellZone and setToPointZone.
43  Both of which use \c set instead.
44 
45 SourceFiles
46  setToFaceZone.C
47 
48 \*---------------------------------------------------------------------------*/
49 
50 #ifndef setToFaceZone_H
51 #define setToFaceZone_H
52 
53 #include "topoSetSource.H"
54 
55 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 
57 namespace Foam
58 {
59 
60 /*---------------------------------------------------------------------------*\
61  Class setToFaceZone Declaration
62 \*---------------------------------------------------------------------------*/
63 
64 class setToFaceZone
65 :
66  public topoSetSource
67 {
68  // Private data
69 
70  //- Add usage string
71  static addToUsageTable usage_;
72 
73  //- Name of set to use
74  word setName_;
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("setToFaceZone");
80 
81  // Constructors
82 
83  //- Construct from components
85  (
86  const polyMesh& mesh,
87  const word& setName
88  );
89 
90  //- Construct from dictionary
91  setToFaceZone(const polyMesh& mesh, const dictionary& dict);
92 
93  //- Construct from Istream
94  setToFaceZone(const polyMesh& mesh, Istream& is);
95 
96 
97  //- Destructor
98  virtual ~setToFaceZone() = default;
99 
100 
101  // Member Functions
102 
103  //- The source category is a faceZone
104  virtual topoSetSource::sourceType setType() const
105  {
106  return FACEZONE_SOURCE;
107  }
108 
109  virtual void applyToSet
110  (
111  const topoSetSource::setAction action,
112  topoSet& set
113  ) const;
114 };
115 
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 } // End namespace Foam
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #endif
124 
125 // ************************************************************************* //
Foam::setToFaceZone::setType
virtual topoSetSource::sourceType setType() const
The source category is a faceZone.
Definition: setToFaceZone.H:113
Foam::topoSetSource::sourceType
sourceType
Enumeration defining the types of sources.
Definition: topoSetSource.H:73
Foam::setToFaceZone::applyToSet
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
Definition: setToFaceZone.C:98
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::setToFaceZone::TypeName
TypeName("setToFaceZone")
Runtime type information.
Foam::topoSetSource::addToUsageTable
Class with constructor to add usage string to table.
Definition: topoSetSource.H:124
Foam::setToFaceZone
A topoSetSource to select faces based on usage in a faceSet. Sets flipMap to true.
Definition: setToFaceZone.H:73
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::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::setToFaceZone::~setToFaceZone
virtual ~setToFaceZone()=default
Destructor.
Foam::topoSet
General set of labels of mesh quantity (points, cells, faces).
Definition: topoSet.H:66
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::topoSetSource
Base class of a source for a topoSet.
Definition: topoSetSource.H:66
Foam::topoSetSource::FACEZONE_SOURCE
Faces as zone.
Definition: topoSetSource.H:87
topoSetSource.H
Foam::setToFaceZone::setToFaceZone
setToFaceZone(const polyMesh &mesh, const word &setName)
Construct from components.
Definition: setToFaceZone.C:56