FreeFOAM The Cross-Platform CFD Toolkit
pointToFace.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) 1991-2010 OpenCFD Ltd.
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::pointToFace
26 
27 Description
28  A topoSetSource to select faces based on use of points.
29 
30 SourceFiles
31  pointToFace.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef pointToFace_H
36 #define pointToFace_H
37 
39 #include <OpenFOAM/NamedEnum.H>
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class pointToFace Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
52  public topoSetSource
53 {
54 
55 public:
56 
57  //- Enumeration defining the valid options
59  {
60  ANY,
62  };
63 
64 
65 private:
66 
67  //- Add usage string
68  static addToUsageTable usage_;
69 
70  static const NamedEnum<pointAction, 2> pointActionNames_;
71 
72  //- Name of set to use
73  word setName_;
74 
75  //- Option
76  pointAction option_;
77 
78 
79  // Private Member Functions
80 
81  //- Depending on face to cell option add to or delete from cellSet.
82  void combine(topoSet& set, const bool add) const;
83 
84 
85 public:
86 
87  //- Runtime type information
88  TypeName("pointToFace");
89 
90  // Constructors
91 
92  //- Construct from components
94  (
95  const polyMesh& mesh,
96  const word& setName,
97  const pointAction option
98  );
99 
100  //- Construct from dictionary
102  (
103  const polyMesh& mesh,
104  const dictionary& dict
105  );
106 
107  //- Construct from Istream
109  (
110  const polyMesh& mesh,
111  Istream&
112  );
113 
114 
115  // Destructor
116 
117  virtual ~pointToFace();
118 
119 
120  // Member Functions
121 
122  virtual void applyToSet
123  (
124  const topoSetSource::setAction action,
125  topoSet&
126  ) const;
127 
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************ vim: set sw=4 sts=4 et: ************************ //