cellSizeCalculationType.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::cellSizeCalculationType
26 
27 Description
28  Abstract base class for specifying target cell sizes
29 
30 SourceFiles
31  cellSizeCalculationType.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cellSizeCalculationType_H
36 #define cellSizeCalculationType_H
37 
38 #include "autoPtr.H"
39 #include "runTimeSelectionTables.H"
40 #include "triSurfaceFields.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 class triSurfaceMesh;
48 
49 /*---------------------------------------------------------------------------*\
50  Class cellSizeCalculationType Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55 
56 protected:
57 
59 
60  //- Reference to the triSurfaceMesh
61  const triSurfaceMesh& surface_;
62 
63  const scalar& defaultCellSize_;
64 
65 
66 private:
67 
68  // Private Member Functions
69 
70  //- Disallow default bitwise copy construct
72 
73  //- Disallow default bitwise assignment
74  void operator=(const cellSizeCalculationType&);
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("cellSizeCalculationType");
81 
82 
83  // Declare run-time constructor selection table
84 
86  (
87  autoPtr,
89  dictionary,
90  (
91  const dictionary& cellSizeCalculationTypeDict,
92  const triSurfaceMesh& surface,
93  const scalar& defaultCellSize
94  ),
95  (cellSizeCalculationTypeDict, surface, defaultCellSize)
96  );
97 
98 
99  // Constructors
100 
101  //- Construct from components
103  (
104  const word& type,
105  const dictionary& cellSizeCalculationTypeDict,
106  const triSurfaceMesh& surface,
107  const scalar& defaultCellSize
108  );
109 
110 
111  // Selectors
112 
113  //- Return a reference to the selected cellSizeCalculationType
115  (
116  const dictionary& cellSizeCalculationTypeDict,
117  const triSurfaceMesh& surface,
118  const scalar& defaultCellSize
119  );
120 
121 
122  //- Destructor
123  virtual ~cellSizeCalculationType();
124 
125 
126  // Member Functions
127 
128  //- Load the cell size
130 };
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************************************************************* //
declareRunTimeSelectionTable(autoPtr, cellSizeCalculationType, dictionary,(const dictionary &cellSizeCalculationTypeDict, const triSurfaceMesh &surface, const scalar &defaultCellSize),(cellSizeCalculationTypeDict, surface, defaultCellSize))
virtual tmp< triSurfacePointScalarField > load()=0
Load the cell size.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Fields for triSurface.
Abstract base class for specifying target cell sizes.
IOoject and searching on triSurface.
virtual ~cellSizeCalculationType()
Destructor.
static autoPtr< cellSizeCalculationType > New(const dictionary &cellSizeCalculationTypeDict, const triSurfaceMesh &surface, const scalar &defaultCellSize)
Return a reference to the selected cellSizeCalculationType.
A class for handling words, derived from string.
Definition: word.H:59
const dictionary & cellSizeCalculationTypeDict_
TypeName("cellSizeCalculationType")
Runtime type information.
const triSurfaceMesh & surface_
Reference to the triSurfaceMesh.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:461
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
Macros to ease declaration of run-time selection tables.
A class for managing temporary objects.
Definition: PtrList.H:54
Namespace for OpenFOAM.