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::potential 00026 00027 Description 00028 00029 SourceFiles 00030 potentialI.H 00031 potential.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef potential_H 00036 #define potential_H 00037 00038 #include <OpenFOAM/polyMesh.H> 00039 #include <OpenFOAM/IOdictionary.H> 00040 #include <OpenFOAM/Time.H> 00041 #include <potential/pairPotentialList.H> 00042 #include <potential/electrostaticPotential.H> 00043 #include <potential/tetherPotentialList.H> 00044 00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00046 00047 namespace Foam 00048 { 00049 00050 /*---------------------------------------------------------------------------*\ 00051 Class potential Declaration 00052 \*---------------------------------------------------------------------------*/ 00053 00054 class potential 00055 { 00056 // Private data 00057 00058 const polyMesh& mesh_; 00059 00060 List<word> idList_; 00061 00062 List<word> siteIdList_; 00063 00064 label nPairPotIds_; 00065 00066 scalar potentialEnergyLimit_; 00067 00068 labelList removalOrder_; 00069 00070 pairPotentialList pairPotentials_; 00071 00072 tetherPotentialList tetherPotentials_; 00073 00074 vector gravity_; 00075 00076 00077 // Private Member Functions 00078 00079 void setSiteIdList(const IOdictionary& moleculePropertiesDict); 00080 00081 void readPotentialDict(); 00082 00083 void readMdInitialiseDict 00084 ( 00085 const IOdictionary& mdInitialiseDict, 00086 IOdictionary& idListDict 00087 ); 00088 00089 //- Disallow default bitwise copy construct 00090 potential(const potential&); 00091 00092 //- Disallow default bitwise assignment 00093 void operator=(const potential&); 00094 00095 00096 public: 00097 00098 // Constructors 00099 00100 //- Construct from mesh reference 00101 potential(const polyMesh& mesh); 00102 00103 //- Construct from mdInitialiseDict 00104 potential 00105 ( 00106 const polyMesh& mesh, 00107 const IOdictionary& mdInitialiseDict, 00108 IOdictionary& idListDict 00109 ); 00110 00111 00112 // Destructor 00113 00114 ~potential(); 00115 00116 00117 // Member Functions 00118 00119 // Access 00120 00121 inline label nIds() const; 00122 00123 inline const List<word>& idList() const; 00124 00125 inline const List<word>& siteIdList() const; 00126 00127 inline scalar potentialEnergyLimit() const; 00128 00129 inline label nPairPotentials() const; 00130 00131 inline const labelList& removalOrder() const; 00132 00133 inline const pairPotentialList& pairPotentials() const; 00134 00135 inline const tetherPotentialList& tetherPotentials() const; 00136 00137 inline const vector& gravity() const; 00138 }; 00139 00140 00141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00142 00143 } // End namespace Foam 00144 00145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00146 00147 #include "potentialI.H" 00148 00149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00150 00151 #endif 00152 00153 // ************************ vim: set sw=4 sts=4 et: ************************ //