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-2022 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  planeType pointAndNormal;
35  point (0 0 0);
36  normal (0 0 1);
37  interpolate yes;
38  }
39  \endverbatim
40 
41 Usage
42  \table
43  Property | Description | Required | Default value
44  planeType | the method of specification of the plane | yes |
45  interpolate | interpolate values to the surface points | no | no
46  \endtable
47 
48 See also
49  Foam::plane
50 
51 SourceFiles
52  sampledCutPlane.C
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef sampledCutPlane_H
57 #define sampledCutPlane_H
58 
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 namespace Foam
64 {
65 namespace sampledSurfaces
66 {
67 
68 /*---------------------------------------------------------------------------*\
69  Class cutPlane Declaration
70 \*---------------------------------------------------------------------------*/
71 
72 class cutPlane
73 :
74  public sampledIsoSurfaceSurface
75 {
76  // Private Data
77 
78  //- Plane
79  const plane plane_;
80 
81 
82  // Private Member Functions
83 
84  //- Generate the iso surface
85  virtual autoPtr<cutPolyIsoSurface> calcIsoSurf() const;
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("cutPlane");
92 
93 
94  // Constructors
95 
96  //- Construct from dictionary
97  cutPlane
98  (
99  const word& name,
100  const polyMesh& mesh,
101  const dictionary& dict
102  );
103 
104 
105  //- Destructor
106  virtual ~cutPlane();
107 
108 
109  // Member Functions
110 
111  //- Does the surface need an update?
112  virtual bool needsUpdate() const;
113 
114  //- Write
115  virtual void print(Ostream&) const;
116 };
117 
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 } // End namespace sampledSurfaces
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
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:62
Namespace for OpenFOAM.
dictionary dict