cellSizeCalculationType.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::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 public:
67 
68  //- Runtime type information
69  TypeName("cellSizeCalculationType");
70 
71 
72  // Declare run-time constructor selection table
73 
75  (
76  autoPtr,
78  dictionary,
79  (
80  const dictionary& cellSizeCalculationTypeDict,
81  const triSurfaceMesh& surface,
82  const scalar& defaultCellSize
83  ),
84  (cellSizeCalculationTypeDict, surface, defaultCellSize)
85  );
86 
87 
88  // Constructors
89 
90  //- Construct from components
92  (
93  const word& type,
94  const dictionary& cellSizeCalculationTypeDict,
95  const triSurfaceMesh& surface,
96  const scalar& defaultCellSize
97  );
98 
99  //- Disallow default bitwise copy construction
101 
102 
103  // Selectors
104 
105  //- Return a reference to the selected cellSizeCalculationType
107  (
108  const dictionary& cellSizeCalculationTypeDict,
109  const triSurfaceMesh& surface,
110  const scalar& defaultCellSize
111  );
112 
113 
114  //- Destructor
115  virtual ~cellSizeCalculationType();
116 
117 
118  // Member Functions
119 
120  //- Load the cell size
122 
123 
124  // Member Operators
125 
126  //- Disallow default bitwise assignment
127  void operator=(const cellSizeCalculationType&) = delete;
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
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:158
void operator=(const cellSizeCalculationType &)=delete
Disallow default bitwise assignment.
Fields for triSurface.
Abstract base class for specifying target cell sizes.
cellSizeCalculationType(const word &type, const dictionary &cellSizeCalculationTypeDict, const triSurfaceMesh &surface, const scalar &defaultCellSize)
Construct from components.
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.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Macros to ease declaration of run-time selection tables.
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.