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-2018 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 private:
68 
69  // Private Member Functions
70 
71  //- Disallow default bitwise copy construct
73 
74  //- Disallow default bitwise assignment
75  void operator=(const faceAreaWeightModel&);
76 
77 
78 public:
79 
80  //- Runtime type information
81  TypeName("faceAreaWeightModel");
82 
83 
84  // Declare run-time constructor selection table
85 
87  (
88  autoPtr,
90  dictionary,
91  (
92  const dictionary& faceAreaWeightDict
93  ),
94  (faceAreaWeightDict)
95  );
96 
97 
98  // Constructors
99 
100  //- Construct from components
102  (
103  const word& type,
104  const dictionary& faceAreaWeightDict
105  );
106 
107 
108  // Selectors
109 
110  //- Return a reference to the selected faceAreaWeightModel
112  (
113  const dictionary& faceAreaWeightDict
114  );
115 
116 
117  //- Destructor
118  virtual ~faceAreaWeightModel();
119 
120 
121  // Member Functions
122 
123  //- Const access to the coeffs dictionary
124  const dictionary& coeffDict() const
125  {
126  return coeffDict_;
127  }
128 
129  //- Return the current faceAreaWeight coefficient
130  virtual scalar faceAreaWeight(scalar faceAreaFraction) const = 0;
131 };
132 
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
TypeName("faceAreaWeightModel")
Runtime type information.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
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...
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:481
virtual ~faceAreaWeightModel()
Destructor.
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.