faceAreaWeightModel.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::faceAreaWeightModel
26 
27 Description
28  Abstract base class for providing faceAreaWeight values to the cell motion
29  controller based on an argument faceAreaFraction value, typically the ratio
30  of the area of the face in question to the area of a square face with a side
31  length of the local target cell size.
32 
33 SourceFiles
34  faceAreaWeightModel.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef faceAreaWeightModel_H
39 #define faceAreaWeightModel_H
40 
41 #include "point.H"
42 #include "dictionary.H"
43 #include "autoPtr.H"
44 #include "runTimeSelectionTables.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class faceAreaWeightModel Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public dictionary
58 {
59 
60 protected:
61 
62  // Protected data
63 
64  //- Method coeffs dictionary
66 
67 
68 public:
69 
70  //- Runtime type information
71  TypeName("faceAreaWeightModel");
72 
73 
74  // Declare run-time constructor selection table
75 
77  (
78  autoPtr,
80  dictionary,
81  (
82  const dictionary& faceAreaWeightDict
83  ),
84  (faceAreaWeightDict)
85  );
86 
87 
88  // Constructors
89 
90  //- Construct from components
92  (
93  const word& type,
94  const dictionary& faceAreaWeightDict
95  );
96 
97  //- Disallow default bitwise copy construction
99 
100 
101  // Selectors
102 
103  //- Return a reference to the selected faceAreaWeightModel
105  (
106  const dictionary& faceAreaWeightDict
107  );
108 
109 
110  //- Destructor
111  virtual ~faceAreaWeightModel();
112 
113 
114  // Member Functions
115 
116  //- Const access to the coeffs dictionary
117  const dictionary& coeffDict() const
118  {
119  return coeffDict_;
120  }
121 
122  //- Return the current faceAreaWeight coefficient
123  virtual scalar faceAreaWeight(scalar faceAreaFraction) const = 0;
124 
125 
126  // Member Operators
127 
128  //- Disallow default bitwise assignment
129  void operator=(const faceAreaWeightModel&) = delete;
130 };
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************************************************************* //
TypeName("faceAreaWeightModel")
Runtime type information.
faceAreaWeightModel(const word &type, const dictionary &faceAreaWeightDict)
Construct from components.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
virtual scalar faceAreaWeight(scalar faceAreaFraction) const =0
Return the current faceAreaWeight coefficient.
const dictionary & coeffDict() const
Const access to the coeffs dictionary.
A class for handling words, derived from string.
Definition: word.H:59
static autoPtr< faceAreaWeightModel > New(const dictionary &faceAreaWeightDict)
Return a reference to the selected faceAreaWeightModel.
Abstract base class for providing faceAreaWeight values to the cell motion controller based on an arg...
void operator=(const faceAreaWeightModel &)=delete
Disallow default bitwise assignment.
virtual ~faceAreaWeightModel()
Destructor.
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.
dictionary coeffDict_
Method coeffs dictionary.
declareRunTimeSelectionTable(autoPtr, faceAreaWeightModel, dictionary,(const dictionary &faceAreaWeightDict),(faceAreaWeightDict))
Namespace for OpenFOAM.