|
|
|
tetherPotentialList.HGo 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::tetherPotentialList 00027 00028 Description 00029 00030 SourceFiles 00031 tetherPotentialList.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef tetherPotentialList_H 00036 #define tetherPotentialList_H 00037 00038 #include "ListOps.H" 00039 #include "PtrList.H" 00040 #include "word.H" 00041 #include "tetherPotential.H" 00042 00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00044 00045 namespace Foam 00046 { 00047 00048 /*---------------------------------------------------------------------------*\ 00049 Class tetherPotentialList Declaration 00050 \*---------------------------------------------------------------------------*/ 00051 00052 class tetherPotentialList 00053 : 00054 public PtrList<tetherPotential> 00055 { 00056 // Private data 00057 00058 List<label> idMap_; 00059 00060 00061 // Private Member Functions 00062 00063 inline label tetherPotentialIndex 00064 ( 00065 const label a 00066 ) const; 00067 00068 void readTetherPotentialDict 00069 ( 00070 const List<word>& siteIdList, 00071 const dictionary& tetherPotentialDict, 00072 const List<word>& tetherSiteIdList 00073 ); 00074 00075 //- Disallow default bitwise assignment 00076 void operator=(const tetherPotentialList&); 00077 00078 //- Disallow default bitwise copy construct 00079 tetherPotentialList(const tetherPotentialList&); 00080 00081 00082 public: 00083 00084 // Constructors 00085 00086 tetherPotentialList(); 00087 00088 //- Construct from siteIdList and potental dictionaries 00089 tetherPotentialList 00090 ( 00091 const List<word>& siteIdList, 00092 const dictionary& tetherPotentialDict, 00093 const List<word>& tetherSiteIdList 00094 ); 00095 00096 00097 // Destructor 00098 00099 ~tetherPotentialList(); 00100 00101 00102 // Member Functions 00103 00104 void buildPotentials 00105 ( 00106 const List<word>& siteIdList, 00107 const dictionary& tetherPotentialDict, 00108 const List<word>& tetherSiteIdList 00109 ); 00110 00111 // Access 00112 00113 inline const List<word>& idMap() const; 00114 00115 const tetherPotential& tetherPotentialFunction(const label a) const; 00116 00117 vector force(const label a, const vector rIT) const; 00118 00119 scalar energy (const label a, const vector rIT) const; 00120 }; 00121 00122 00123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00124 00125 } // End namespace Foam 00126 00127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00128 00129 #include "tetherPotentialListI.H" 00130 00131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00132 00133 #endif 00134 00135 // ************************************************************************* // |