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::tetherPotential 00026 00027 Description 00028 00029 SourceFiles 00030 tetherPotential.C 00031 newTetherPotential.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef tetherPotential_H 00036 #define tetherPotential_H 00037 00038 #include <OpenFOAM/IOdictionary.H> 00039 #include <OpenFOAM/typeInfo.H> 00040 #include <OpenFOAM/runTimeSelectionTables.H> 00041 #include <OpenFOAM/autoPtr.H> 00042 #include <OpenFOAM/vector.H> 00043 00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00045 00046 namespace Foam 00047 { 00048 00049 /*---------------------------------------------------------------------------*\ 00050 Class tetherPotential Declaration 00051 \*---------------------------------------------------------------------------*/ 00052 00053 class tetherPotential 00054 { 00055 00056 protected: 00057 00058 // Protected data 00059 00060 word name_; 00061 dictionary tetherPotentialProperties_; 00062 00063 00064 // Private Member Functions 00065 00066 //- Disallow copy construct 00067 tetherPotential(const tetherPotential&); 00068 00069 //- Disallow default bitwise assignment 00070 void operator=(const tetherPotential&); 00071 00072 00073 public: 00074 00075 //- Runtime type information 00076 TypeName("tetherPotential"); 00077 00078 00079 // Declare run-time constructor selection table 00080 00081 declareRunTimeSelectionTable 00082 ( 00083 autoPtr, 00084 tetherPotential, 00085 dictionary, 00086 ( 00087 const word& name, 00088 const dictionary& tetherPotentialProperties 00089 ), 00090 (name, tetherPotentialProperties) 00091 ); 00092 00093 00094 // Selectors 00095 00096 //- Return a reference to the selected viscosity model 00097 static autoPtr<tetherPotential> New 00098 ( 00099 const word& name, 00100 const dictionary& tetherPotentialProperties 00101 ); 00102 00103 00104 // Constructors 00105 00106 //- Construct from components 00107 tetherPotential 00108 ( 00109 const word& name, 00110 const dictionary& tetherPotentialProperties 00111 ); 00112 00113 00114 // Destructor 00115 00116 virtual ~tetherPotential() 00117 {} 00118 00119 00120 // Member Functions 00121 00122 virtual scalar energy (const vector r) const = 0; 00123 00124 virtual vector force (const vector r) const = 0; 00125 00126 const dictionary& tetherPotentialProperties() const 00127 { 00128 return tetherPotentialProperties_; 00129 } 00130 00131 //- Read tetherPotential dictionary 00132 virtual bool read(const dictionary& tetherPotentialProperties) = 0; 00133 }; 00134 00135 00136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00137 00138 } // End namespace Foam 00139 00140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00141 00142 #endif 00143 00144 // ************************ vim: set sw=4 sts=4 et: ************************ //