piecewiseLinearRamp.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 | Copyright (C) 2012-2015 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::piecewiseLinearRamp
26 
27 Description
28  A linear ramp between 0 and 1 with definable start and end points.
29 
30 SourceFiles
31  piecewiseLinearRamp.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef piecewiseLinearRamp_H
36 #define piecewiseLinearRamp_H
37 
38 #include "faceAreaWeightModel.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class piecewiseLinearRamp Declaration
47 \*---------------------------------------------------------------------------*/
48 
50 :
51  public faceAreaWeightModel
52 {
53 
54 private:
55 
56  // Private data
57 
58  //- Face area fraction below which a weight of 0 is returned
59  scalar lAF_;
60 
61  //- Face area fraction above which a which of 1 is returned
62  scalar uAF_;
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("piecewiseLinearRamp");
68 
69  // Constructors
70 
71  //- Construct from components
73  (
74  const dictionary& faceAreaWeightDict
75  );
76 
77 
78  //- Destructor
79  virtual ~piecewiseLinearRamp()
80  {}
81 
82 
83  // Member Functions
84 
85  //- Return the faceAreaWeight
86  virtual scalar faceAreaWeight(scalar faceAreaFraction) const;
87 };
88 
89 
90 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91 
92 } // End namespace Foam
93 
94 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
95 
96 #endif
97 
98 // ************************************************************************* //
TypeName("piecewiseLinearRamp")
Runtime type information.
piecewiseLinearRamp(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:137
A linear ramp between 0 and 1 with definable start and end points.
Abstract base class for providing faceAreaWeight values to the cell motion controller based on an arg...
virtual ~piecewiseLinearRamp()
Destructor.
virtual scalar faceAreaWeight(scalar faceAreaFraction) const
Return the faceAreaWeight.
Namespace for OpenFOAM.