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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2012-2015 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::cellSizeCalculationType
28 
29 Description
30  Abstract base class for specifying target cell sizes
31 
32 SourceFiles
33  cellSizeCalculationType.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef cellSizeCalculationType_H
38 #define cellSizeCalculationType_H
39 
40 #include "autoPtr.H"
41 #include "runTimeSelectionTables.H"
42 #include "triSurfaceFields.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 class triSurfaceMesh;
50 
51 /*---------------------------------------------------------------------------*\
52  Class cellSizeCalculationType Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 {
57 protected:
58 
59  // Protected Data
60 
62 
63  //- Reference to the triSurfaceMesh
64  const triSurfaceMesh& surface_;
65 
66  const scalar& defaultCellSize_;
67 
68 
69  // Protected Member Functions
70 
71  //- No copy construct
73 
74  //- No copy assignment
75  void operator=(const cellSizeCalculationType&) = delete;
76 
77 
78 public:
79 
80  //- Runtime type information
81  TypeName("cellSizeCalculationType");
82 
83 
84  // Declare run-time constructor selection table
85 
87  (
88  autoPtr,
90  dictionary,
91  (
92  const dictionary& cellSizeCalculationTypeDict,
93  const triSurfaceMesh& surface,
94  const scalar& defaultCellSize
95  ),
96  (cellSizeCalculationTypeDict, surface, defaultCellSize)
97  );
98 
99 
100  // Constructors
101 
102  //- Construct from components
104  (
105  const word& type,
106  const dictionary& cellSizeCalculationTypeDict,
107  const triSurfaceMesh& surface,
108  const scalar& defaultCellSize
109  );
110 
111 
112  // Selectors
113 
114  //- Return a reference to the selected cellSizeCalculationType
116  (
117  const dictionary& cellSizeCalculationTypeDict,
118  const triSurfaceMesh& surface,
119  const scalar& defaultCellSize
120  );
121 
122 
123  //- Destructor
124  virtual ~cellSizeCalculationType() = default;
125 
126 
127  // Member Functions
128 
129  //- Load the cell size
131 };
132 
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::cellSizeCalculationType::~cellSizeCalculationType
virtual ~cellSizeCalculationType()=default
Destructor.
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
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:60
triSurfaceFields.H
Fields for triSurface.
Foam::triSurfaceMesh
IOoject and searching on triSurface.
Definition: triSurfaceMesh.H:106
Foam::cellSizeCalculationType::TypeName
TypeName("cellSizeCalculationType")
Runtime type information.
Foam::cellSizeCalculationType::cellSizeCalculationType
cellSizeCalculationType(const cellSizeCalculationType &)=delete
No copy construct.
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 a number of values (eg,...
Definition: dictionary.H:123
Foam::cellSizeCalculationType::defaultCellSize_
const scalar & defaultCellSize_
Definition: cellSizeCalculationType.H:65
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::cellSizeCalculationType::operator=
void operator=(const cellSizeCalculationType &)=delete
No copy assignment.
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::cellSizeCalculationType::load
virtual tmp< triSurfacePointScalarField > load()=0
Load the cell size.
Foam::cellSizeCalculationType::surface_
const triSurfaceMesh & surface_
Reference to the triSurfaceMesh.
Definition: cellSizeCalculationType.H:63
Foam::cellSizeCalculationType
Abstract base class for specifying target cell sizes.
Definition: cellSizeCalculationType.H:54
autoPtr.H