automatic.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2012-2015 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::automatic
26 
27 Description
28 
29 SourceFiles
30  automatic.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef automatic_H
35 #define automatic_H
36 
38 #include "triSurfaceFields.H"
40 #include "Switch.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 class triSurfaceMesh;
48 
49 /*---------------------------------------------------------------------------*\
50  Class automatic Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class automatic
54 :
56 {
57 
58 private:
59 
60  // Private data
61 
62  //- Dictionary of coefficients for automatic cell sizing
63  const dictionary& coeffsDict_;
64 
65  //- Name of the surface. Used to write the cell size field
66  const fileName surfaceName_;
67 
68  const Switch readCurvature_;
69  const word curvatureFile_;
70 
71  const Switch readFeatureProximity_;
72  const word featureProximityFile_;
73 
74  const Switch readInternalCloseness_;
75  const word internalClosenessFile_;
76 
77  //- The curvature values are multiplied by the inverse of this value to
78  // get the cell size
79  const scalar curvatureCellSizeCoeff_;
80 
81  //- The maximum allowable sell size
82  const scalar maximumCellSize_;
83 
84 
85  // Private Member Functions
86 
87  void smoothField(triSurfaceScalarField& surf);
88 
89 
90 public:
91 
92  //- Runtime type information
93  TypeName("automatic");
94 
95 
96  // Constructors
97 
98  //- Construct from components
99  automatic
100  (
101  const dictionary& cellSizeCalcTypeDict,
102  const triSurfaceMesh& surface,
103  const scalar& defaultCellSize
104  );
105 
106 
107  //- Destructor
108  virtual ~automatic()
109  {}
110 
111 
112  // Member Functions
113 
114  //- Load the cell size field
116 };
117 
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 } // End namespace Foam
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 #endif
126 
127 // ************************************************************************* //
A class for handling file names.
Definition: fileName.H:69
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Fields for triSurface.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
Definition: Switch.H:60
Abstract base class for specifying target cell sizes.
IOoject and searching on triSurface.
virtual ~automatic()
Destructor.
Definition: automatic.H:107
A class for handling words, derived from string.
Definition: word.H:59
virtual tmp< triSurfacePointScalarField > load()
Load the cell size field.
automatic(const dictionary &cellSizeCalcTypeDict, const triSurfaceMesh &surface, const scalar &defaultCellSize)
Construct from components.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
TypeName("automatic")
Runtime type information.
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.