sampledCutPlane.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) 2011-2026 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::sampledSurfaces::cutPlane
26 
27 Description
28  A sampledSurface defined by a plane.
29 
30  Example:
31  \verbatim
32  {
33  type cutPlane;
34  point (0 0 0);
35  normal (0 0 1);
36  interpolate yes;
37  }
38  \endverbatim
39 
40 Usage
41  \table
42  Property | Description | Required | Default value
43  planeType | Method of specification. E.g., pointAndNormal. | no
44  point | A point in the plane (for pointAndNormal) | yes
45  normal | A vector normal to the plane (for pointAndNormal) | yes
46  interpolate | Interpolate values to the surface points? | no | no
47  cellZone | Zone containing cells to include | no | all
48  \endtable
49 
50  Note: there are also other options for planeType, including
51  'planeEquation' and 'embeddedPoints'.
52 
53 See also
54  Foam::plane
55  Foam::generatedCellZone
56 
57 SourceFiles
58  sampledCutPlane.C
59 
60 \*---------------------------------------------------------------------------*/
61 
62 #ifndef sampledCutPlane_H
63 #define sampledCutPlane_H
64 
66 
67 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
68 
69 namespace Foam
70 {
71 namespace sampledSurfaces
72 {
73 
74 /*---------------------------------------------------------------------------*\
75  Class cutPlane Declaration
76 \*---------------------------------------------------------------------------*/
77 
78 class cutPlane
79 :
80  public sampledIsoSurfaceSurface
81 {
82  // Private Data
83 
84  //- Plane
85  const plane plane_;
86 
87 
88  // Private Member Functions
89 
90  //- Generate the iso surface
91  virtual autoPtr<cutPolyIsoSurface> calcIsoSurf() const;
92 
93 
94 public:
95 
96  //- Runtime type information
97  TypeName("cutPlane");
98 
99 
100  // Constructors
101 
102  //- Construct from dictionary
103  cutPlane
104  (
105  const word& name,
106  const polyMesh& mesh,
107  const dictionary& dict
108  );
109 
110 
111  //- Destructor
112  virtual ~cutPlane();
113 
114 
115  // Member Functions
116 
117  //- Does the surface need an update?
118  virtual bool needsUpdate() const;
119 
120  //- Write
121  virtual void print(Ostream&) const;
122 };
123 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace sampledSurfaces
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:78
const word & name() const
Name of surface.
const polyMesh & mesh() const
Access to the underlying mesh.
virtual ~cutPlane()
Destructor.
TypeName("cutPlane")
Runtime type information.
virtual bool needsUpdate() const
Does the surface need an update?
virtual void print(Ostream &) const
Write.
cutPlane(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.
dictionary dict