OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

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-2009 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 the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     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, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::energyScalingFunction
00027 
00028 Description
00029 
00030 SourceFiles
00031     energyScalingFunction.C
00032     newEnergyScalingFunction.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef energyScalingFunction_H
00037 #define energyScalingFunction_H
00038 
00039 #include "IOdictionary.H"
00040 #include "typeInfo.H"
00041 #include "runTimeSelectionTables.H"
00042 #include "autoPtr.H"
00043 #include "pairPotential.H"
00044 
00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00046 
00047 namespace Foam
00048 {
00049 
00050 /*---------------------------------------------------------------------------*\
00051                    Class energyScalingFunction Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 class energyScalingFunction
00055 {
00056 
00057 protected:
00058 
00059     // Protected data
00060 
00061         word name_;
00062 
00063         dictionary energyScalingFunctionProperties_;
00064 
00065         const pairPotential& pairPot_;
00066 
00067 
00068     // Private Member Functions
00069 
00070         //- Disallow copy construct
00071         energyScalingFunction(const energyScalingFunction&);
00072 
00073         //- Disallow default bitwise assignment
00074         void operator=(const energyScalingFunction&);
00075 
00076 
00077 public:
00078 
00079     //- Runtime type information
00080     TypeName("energyScalingFunction");
00081 
00082 
00083     // Declare run-time constructor selection table
00084 
00085         declareRunTimeSelectionTable
00086         (
00087             autoPtr,
00088             energyScalingFunction,
00089             dictionary,
00090             (
00091                 const word& name,
00092                 const dictionary& energyScalingFunctionProperties,
00093                 const pairPotential& pairPot
00094             ),
00095             (name, energyScalingFunctionProperties, pairPot)
00096         );
00097 
00098 
00099     // Selectors
00100 
00101         //- Return a reference to the selected viscosity model
00102         static autoPtr<energyScalingFunction> New
00103         (
00104             const word& name,
00105             const dictionary& energyScalingFunctionProperties,
00106             const pairPotential& pairPot
00107         );
00108 
00109 
00110     // Constructors
00111 
00112         //- Construct from components
00113         energyScalingFunction
00114         (
00115             const word& name,
00116             const dictionary& energyScalingFunctionProperties,
00117             const pairPotential& pairPot
00118         );
00119 
00120 
00121     // Destructor
00122 
00123         virtual ~energyScalingFunction()
00124         {}
00125 
00126 
00127     // Member Functions
00128 
00129         virtual void scaleEnergy(scalar& e, const scalar r) const = 0;
00130 
00131         const dictionary& energyScalingFunctionProperties() const
00132         {
00133             return energyScalingFunctionProperties_;
00134         }
00135 
00136         //- Read energyScalingFunction dictionary
00137         virtual bool read(const dictionary& energyScalingFunctionProperties) = 0;
00138 };
00139 
00140 
00141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00142 
00143 } // End namespace Foam
00144 
00145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00146 
00147 #endif
00148 
00149 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd