All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
automatic.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) 2012-2019 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 internalCloseness values are multiplied by the inverse
78  // of this value to get the cell size
79  const scalar internalClosenessCellSizeCoeff_;
80 
81  //- The curvature values are multiplied by the inverse of this value to
82  // get the cell size
83  const scalar curvatureCellSizeCoeff_;
84 
85  //- The maximum allowable sell size
86  const scalar maximumCellSize_;
87 
88 
89  // Private Member Functions
90 
91  void smoothField(triSurfaceScalarField& surf);
92 
93 
94 public:
95 
96  //- Runtime type information
97  TypeName("automatic");
98 
99 
100  // Constructors
101 
102  //- Construct from components
103  automatic
104  (
105  const dictionary& cellSizeCalcTypeDict,
106  const triSurfaceMesh& surface,
107  const scalar& defaultCellSize
108  );
109 
110 
111  //- Destructor
112  virtual ~automatic()
113  {}
114 
115 
116  // Member Functions
117 
118  //- Load the cell size field
120 };
121 
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 } // End namespace Foam
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************************************************************* //
A class for handling file names.
Definition: fileName.H:79
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
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/any.
Definition: Switch.H:60
Abstract base class for specifying target cell sizes.
IOoject and searching on triSurface.
virtual ~automatic()
Destructor.
Definition: automatic.H:111
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.