FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

energyScalingFunction.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 2008-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::energyScalingFunction
00026 
00027 Description
00028 
00029 SourceFiles
00030     energyScalingFunction.C
00031     newEnergyScalingFunction.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef energyScalingFunction_H
00036 #define energyScalingFunction_H
00037 
00038 #include <OpenFOAM/IOdictionary.H>
00039 #include <OpenFOAM/typeInfo.H>
00040 #include <OpenFOAM/runTimeSelectionTables.H>
00041 #include <OpenFOAM/autoPtr.H>
00042 #include <potential/pairPotential.H>
00043 
00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00045 
00046 namespace Foam
00047 {
00048 
00049 /*---------------------------------------------------------------------------*\
00050                    Class energyScalingFunction Declaration
00051 \*---------------------------------------------------------------------------*/
00052 
00053 class energyScalingFunction
00054 {
00055 
00056 protected:
00057 
00058     // Protected data
00059 
00060         word name_;
00061 
00062         dictionary energyScalingFunctionProperties_;
00063 
00064         const pairPotential& pairPot_;
00065 
00066 
00067     // Private Member Functions
00068 
00069         //- Disallow copy construct
00070         energyScalingFunction(const energyScalingFunction&);
00071 
00072         //- Disallow default bitwise assignment
00073         void operator=(const energyScalingFunction&);
00074 
00075 
00076 public:
00077 
00078     //- Runtime type information
00079     TypeName("energyScalingFunction");
00080 
00081 
00082     // Declare run-time constructor selection table
00083 
00084         declareRunTimeSelectionTable
00085         (
00086             autoPtr,
00087             energyScalingFunction,
00088             dictionary,
00089             (
00090                 const word& name,
00091                 const dictionary& energyScalingFunctionProperties,
00092                 const pairPotential& pairPot
00093             ),
00094             (name, energyScalingFunctionProperties, pairPot)
00095         );
00096 
00097 
00098     // Selectors
00099 
00100         //- Return a reference to the selected viscosity model
00101         static autoPtr<energyScalingFunction> New
00102         (
00103             const word& name,
00104             const dictionary& energyScalingFunctionProperties,
00105             const pairPotential& pairPot
00106         );
00107 
00108 
00109     // Constructors
00110 
00111         //- Construct from components
00112         energyScalingFunction
00113         (
00114             const word& name,
00115             const dictionary& energyScalingFunctionProperties,
00116             const pairPotential& pairPot
00117         );
00118 
00119 
00120     // Destructor
00121 
00122         virtual ~energyScalingFunction()
00123         {}
00124 
00125 
00126     // Member Functions
00127 
00128         virtual void scaleEnergy(scalar& e, const scalar r) const = 0;
00129 
00130         const dictionary& energyScalingFunctionProperties() const
00131         {
00132             return energyScalingFunctionProperties_;
00133         }
00134 
00135         //- Read energyScalingFunction dictionary
00136         virtual bool read(const dictionary& energyScalingFunctionProperties) = 0;
00137 };
00138 
00139 
00140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00141 
00142 } // End namespace Foam
00143 
00144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00145 
00146 #endif
00147 
00148 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines