containsPoints.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) 2025 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::zoneGenerators::containsPoints
26 
27 Description
28  A zoneGenerator which selects the cells containing the given points
29 
30 Usage
31  \table
32  Property | Description | Required | Default value
33  type | Type: cell | yes |
34  name | Name of the zone | no | zoneGenerator name
35  points | List of points | yes |
36  moveUpdate | Switch to update after mesh motion | no | false
37  \endtable
38 
39  To create the cellZone \c pointCells of the cells containing the given two
40  points:
41  \verbatim
42  pointCells
43  {
44  type containsPoints;
45  points ((0 1 0) (0.1 1 0));
46  }
47  \endverbatim
48 
49 SourceFiles
50  containsPoints.C
51 
52 \*---------------------------------------------------------------------------*/
53 
54 #ifndef containsPoints_H
55 #define containsPoints_H
56 
57 #include "zoneGeneratorList.H"
58 
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 
61 namespace Foam
62 {
63 namespace zoneGenerators
64 {
65 
66 /*---------------------------------------------------------------------------*\
67  Class containsPoints Declaration
68 \*---------------------------------------------------------------------------*/
69 
70 class containsPoints
71 :
72  public zoneGenerator
73 {
74  // Private Data
75 
76  //- Points to select cells
77  List<point> points_;
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("containsPoints");
84 
85 
86  // Constructors
87 
88  //- Construct from dictionary
90  (
91  const word& name,
92  const polyMesh& mesh,
93  const dictionary& dict
94  );
95 
96 
97  //- Destructor
98  virtual ~containsPoints();
99 
100 
101  // Member Functions
102 
103  virtual zoneSet generate() const;
104 };
105 
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 } // End namespace zoneGenerators
110 } // End namespace Foam
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 #endif
115 
116 // ************************************************************************* //
const word & name() const
virtual ~containsPoints()
Destructor.
virtual zoneSet generate() const
Generate and return the zoneSet.
TypeName("containsPoints")
Runtime type information.
containsPoints(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
Zone container returned by zoneGenerator::generate.
Definition: zoneSet.H:94
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
Namespace for OpenFOAM.
dictionary dict