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

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