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 -------------------------------------------------------------------------------
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::faceAreaWeightModel
28 
29 Description
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 
35 SourceFiles
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"
46 #include "runTimeSelectionTables.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class faceAreaWeightModel Declaration
55 \*---------------------------------------------------------------------------*/
56 
58 :
59  public dictionary
60 {
61 
62 protected:
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 
79 public:
80 
81  //- Runtime type information
82  TypeName("faceAreaWeightModel");
83 
84 
85  // Declare run-time constructor selection table
86 
88  (
89  autoPtr,
91  dictionary,
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 // ************************************************************************* //
Foam::faceAreaWeightModel::faceAreaWeight
virtual scalar faceAreaWeight(scalar faceAreaFraction) const =0
Return the current faceAreaWeight coefficient.
Foam::faceAreaWeightModel::faceAreaWeightModel
faceAreaWeightModel(const faceAreaWeightModel &)=delete
No copy construct.
Foam::faceAreaWeightModel::coeffDict
const dictionary & coeffDict() const
Const access to the coeffs dictionary.
Definition: faceAreaWeightModel.H:124
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
point.H
Foam::faceAreaWeightModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, faceAreaWeightModel, dictionary,(const dictionary &faceAreaWeightDict),(faceAreaWeightDict))
Foam::faceAreaWeightModel
Abstract base class for providing faceAreaWeight values to the cell motion controller based on an arg...
Definition: faceAreaWeightModel.H:56
Foam::faceAreaWeightModel::New
static autoPtr< faceAreaWeightModel > New(const dictionary &faceAreaWeightDict)
Return a reference to the selected faceAreaWeightModel.
Foam::faceAreaWeightModel::TypeName
TypeName("faceAreaWeightModel")
Runtime type information.
Foam::faceAreaWeightModel::coeffDict_
dictionary coeffDict_
Method coeffs dictionary.
Definition: faceAreaWeightModel.H:66
Foam::faceAreaWeightModel::~faceAreaWeightModel
virtual ~faceAreaWeightModel()=default
Destructor.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
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
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
dictionary.H
Foam::faceAreaWeightModel::operator=
void operator=(const faceAreaWeightModel &)=delete
No copy assignment.
autoPtr.H