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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2012-2015 OpenFOAM Foundation
9 Copyright (C) 2018 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::piecewiseLinearRamp
29
30Description
31 A linear ramp between 0 and 1 with definable start and end points.
32
33SourceFiles
34 piecewiseLinearRamp.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef piecewiseLinearRamp_H
39#define piecewiseLinearRamp_H
40
41#include "faceAreaWeightModel.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48/*---------------------------------------------------------------------------*\
49 Class piecewiseLinearRamp Declaration
50\*---------------------------------------------------------------------------*/
53:
55{
56private:
57
58 // Private data
59
60 //- Face area fraction below which a weight of 0 is returned
61 scalar lAF_;
62
63 //- Face area fraction above which a which of 1 is returned
64 scalar uAF_;
65
66
67public:
68
69 //- Runtime type information
70 TypeName("piecewiseLinearRamp");
71
72 // Constructors
73
74 //- Construct from components
76 (
77 const dictionary& faceAreaWeightDict
78 );
79
80
81 //- Destructor
82 virtual ~piecewiseLinearRamp() = default;
83
84
85 // Member Functions
86
87 //- Return the faceAreaWeight
88 virtual scalar faceAreaWeight(scalar faceAreaFraction) const;
89};
90
91
92// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93
94} // End namespace Foam
95
96// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97
98#endif
99
100// ************************************************************************* //
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...
A linear ramp between 0 and 1 with definable start and end points.
piecewiseLinearRamp(const dictionary &faceAreaWeightDict)
Construct from components.
virtual scalar faceAreaWeight(scalar faceAreaFraction) const
Return the faceAreaWeight.
virtual ~piecewiseLinearRamp()=default
Destructor.
TypeName("piecewiseLinearRamp")
Runtime type information.
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73