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-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::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  \endtable
47 
48 SourceFiles
49  sampledIsoSurface.C
50 
51 \*---------------------------------------------------------------------------*/
52 
53 #ifndef sampledIsoSurface_H
54 #define sampledIsoSurface_H
55 
57 
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 
60 namespace Foam
61 {
62 namespace sampledSurfaces
63 {
64 
65 /*---------------------------------------------------------------------------*\
66  Class isoSurface Declaration
67 \*---------------------------------------------------------------------------*/
68 
69 class isoSurface
70 :
71  public sampledIsoSurfaceSurface
72 {
73  // Private Data
74 
75  //- Field to get iso surface of
76  const word isoFieldName_;
77 
78  //- Iso values
79  const scalarField isoValues_;
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("isoSurface");
92 
93 
94  // Constructors
95 
96  //- Construct from dictionary
98  (
99  const word& name,
100  const polyMesh& mesh,
101  const dictionary& dict
102  );
103 
104 
105  //- Destructor
106  virtual ~isoSurface();
107 
108 
109  // Member Functions
110 
111  //- Return the list of fields required
112  virtual wordList fields() const;
113 
114  //- Does the surface need an update?
115  virtual bool needsUpdate() const;
116 
117  //- Write
118  virtual void print(Ostream&) const;
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace sampledSurfaces
125 } // End namespace Foam
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************************************************************* //
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.
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:62
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dictionary dict