faceAreaWeightModel.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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::faceAreaWeightModel
28
29Description
30 Abstract base class for providing faceAreaWeight values to the cell motion
31 controller based on an argument faceAreaFraction value, typically the ratio
32 of the area of the face in question to the area of a square face with a side
33 length of the local target cell size.
34
35SourceFiles
36 faceAreaWeightModel.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef faceAreaWeightModel_H
41#define faceAreaWeightModel_H
42
43#include "point.H"
44#include "dictionary.H"
45#include "autoPtr.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52
53/*---------------------------------------------------------------------------*\
54 Class faceAreaWeightModel Declaration
55\*---------------------------------------------------------------------------*/
58:
59 public dictionary
60{
61
62protected:
63
64 // Protected data
65
66 //- Method coeffs dictionary
68
69
70 // Protected Member Functions
71
72 //- No copy construct
74
75 //- No copy assignment
76 void operator=(const faceAreaWeightModel&) = delete;
77
78
79public:
80
81 //- Runtime type information
82 TypeName("faceAreaWeightModel");
83
84
85 // Declare run-time constructor selection table
88 (
89 autoPtr,
92 (
93 const dictionary& faceAreaWeightDict
94 ),
95 (faceAreaWeightDict)
96 );
97
98
99 // Constructors
100
101 //- Construct from components
103 (
104 const word& type,
105 const dictionary& faceAreaWeightDict
106 );
107
108
109 // Selectors
110
111 //- Return a reference to the selected faceAreaWeightModel
113 (
114 const dictionary& faceAreaWeightDict
115 );
116
117
118 //- Destructor
119 virtual ~faceAreaWeightModel() = default;
120
121
122 // Member Functions
123
124 //- Const access to the coeffs dictionary
125 const dictionary& coeffDict() const
126 {
127 return coeffDict_;
128 }
129
130 //- Return the current faceAreaWeight coefficient
131 virtual scalar faceAreaWeight(scalar faceAreaFraction) const = 0;
132};
133
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137} // End namespace Foam
138
139// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141#endif
142
143// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Abstract base class for providing faceAreaWeight values to the cell motion controller based on an arg...
dictionary coeffDict_
Method coeffs dictionary.
virtual scalar faceAreaWeight(scalar faceAreaFraction) const =0
Return the current faceAreaWeight coefficient.
void operator=(const faceAreaWeightModel &)=delete
No copy assignment.
TypeName("faceAreaWeightModel")
Runtime type information.
declareRunTimeSelectionTable(autoPtr, faceAreaWeightModel, dictionary,(const dictionary &faceAreaWeightDict),(faceAreaWeightDict))
faceAreaWeightModel(const word &type, const dictionary &faceAreaWeightDict)
Construct from components.
static autoPtr< faceAreaWeightModel > New(const dictionary &faceAreaWeightDict)
Return a reference to the selected faceAreaWeightModel.
virtual ~faceAreaWeightModel()=default
Destructor.
faceAreaWeightModel(const faceAreaWeightModel &)=delete
No copy construct.
const dictionary & coeffDict() const
Const access to the coeffs dictionary.
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73