sampledIsoSurface.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::isoSurface
26 
27 Description
28  A sampledSurface defined by an iso-value of a field.
29 
30  Example:
31  \verbatim
32  {
33  type isoSurface;
34  isoField p;
35  isoValue 1e5;
36  interpolate yes;
37  }
38  \endverbatim
39 
40 Usage
41  \table
42  Property | Description | Required | Default value
43  isoField | The field to get an iso-surface of | yes |
44  isoValue | The iso-surface value | yes |
45  interpolate | Interpolate values to the surface points? | no | no
46  cellZone | Zone containing cells to include | no | all
47  \endtable
48 
49 See also
50  Foam::generatedCellZone
51 
52 SourceFiles
53  sampledIsoSurface.C
54 
55 \*---------------------------------------------------------------------------*/
56 
57 #ifndef sampledIsoSurface_H
58 #define sampledIsoSurface_H
59 
61 
62 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 
64 namespace Foam
65 {
66 namespace sampledSurfaces
67 {
68 
69 /*---------------------------------------------------------------------------*\
70  Class isoSurface Declaration
71 \*---------------------------------------------------------------------------*/
72 
73 class isoSurface
74 :
75  public sampledIsoSurfaceSurface
76 {
77  // Private Data
78 
79  //- Field to get iso surface of
80  const word isoFieldName_;
81 
82  //- Iso values
83  const scalarField isoValues_;
84 
85 
86  // Private Member Functions
87 
88  //- Generate the iso surface
89  virtual autoPtr<cutPolyIsoSurface> calcIsoSurf() const;
90 
91 
92 public:
93 
94  //- Runtime type information
95  TypeName("isoSurface");
96 
97 
98  // Constructors
99 
100  //- Construct from dictionary
101  isoSurface
102  (
103  const word& name,
104  const polyMesh& mesh,
105  const dictionary& dict
106  );
107 
108 
109  //- Destructor
110  virtual ~isoSurface();
111 
112 
113  // Member Functions
114 
115  //- Return the list of fields required
116  virtual wordList fields() const;
117 
118  //- Does the surface need an update?
119  virtual bool needsUpdate() const;
120 
121  //- Write
122  virtual void print(Ostream&) const;
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace sampledSurfaces
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
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.
TypeName("isoSurface")
Runtime type information.
virtual wordList fields() const
Return the list of fields required.
isoSurface(const word &name, const polyMesh &mesh, const dictionary &dict)
Construct from dictionary.
virtual bool needsUpdate() const
Does the surface need an update?
virtual void print(Ostream &) const
Write.
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dictionary dict