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
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 // ************************************************************************* //
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::cellSizeCalculationType::New
static autoPtr< cellSizeCalculationType > New(const dictionary &cellSizeCalculationTypeDict, const triSurfaceMesh &surface, const scalar &defaultCellSize)
Return a reference to the selected cellSizeCalculationType.
Foam::cellSizeCalculationType::cellSizeCalculationTypeDict_
const dictionary & cellSizeCalculationTypeDict_
Definition: cellSizeCalculationType.H:57
triSurfaceFields.H
Fields for triSurface.
Foam::triSurfaceMesh
IOoject and searching on triSurface.
Definition: triSurfaceMesh.H:63
Foam::cellSizeCalculationType::TypeName
TypeName("cellSizeCalculationType")
Runtime type information.
Foam::cellSizeCalculationType::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, cellSizeCalculationType, dictionary,(const dictionary &cellSizeCalculationTypeDict, const triSurfaceMesh &surface, const scalar &defaultCellSize),(cellSizeCalculationTypeDict, surface, defaultCellSize))
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::cellSizeCalculationType::defaultCellSize_
const scalar & defaultCellSize_
Definition: cellSizeCalculationType.H:62
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::surface
Definition: surface.H:55
Foam::cellSizeCalculationType::load
virtual tmp< triSurfacePointScalarField > load()=0
Load the cell size.
Foam::cellSizeCalculationType::cellSizeCalculationType
cellSizeCalculationType(const cellSizeCalculationType &)
Disallow default bitwise copy construct.
Foam::cellSizeCalculationType::operator=
void operator=(const cellSizeCalculationType &)
Disallow default bitwise assignment.
Foam::cellSizeCalculationType::surface_
const triSurfaceMesh & surface_
Reference to the triSurfaceMesh.
Definition: cellSizeCalculationType.H:60
Foam::cellSizeCalculationType
Abstract base class for specifying target cell sizes.
Definition: cellSizeCalculationType.H:52
Foam::type
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:588
Foam::cellSizeCalculationType::~cellSizeCalculationType
virtual ~cellSizeCalculationType()
Destructor.
autoPtr.H