Files
openfoam/src/lagrangian/distributionModels/exponential/exponential.H

120 lines
3.1 KiB
C++

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::distributionModels::exponential
Description
exponential distribution model
SourceFiles
exponential.C
\*---------------------------------------------------------------------------*/
#ifndef distributionModels_exponential_H
#define distributionModels_exponential_H
#include "distributionModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace distributionModels
{
/*---------------------------------------------------------------------------*\
Class exponential Declaration
\*---------------------------------------------------------------------------*/
class exponential
:
public distributionModel
{
// Private data
//- Distribution minimum
scalar minValue_;
//- Distribution maximum
scalar maxValue_;
// Model coefficients
scalar lambda_;
public:
//- Runtime type information
TypeName("exponential");
// Constructors
//- Construct from components
exponential(const dictionary& dict, Random& rndGen);
//- Construct copy
exponential(const exponential& p);
//- Construct and return a clone
virtual autoPtr<distributionModel> clone() const
{
return autoPtr<distributionModel>(new exponential(*this));
}
//- Destructor
virtual ~exponential();
// Member Functions
//- Sample the distributionModel
virtual scalar sample() const;
//- Return the minimum value
virtual scalar minValue() const;
//- Return the maximum value
virtual scalar maxValue() const;
//- Return the mean value
virtual scalar meanValue() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace distributionModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //