1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 Foam::pairPotentialList
33 \*---------------------------------------------------------------------------*/
35 #ifndef pairPotentialList_H
36 #define pairPotentialList_H
40 #include "pairPotential.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class pairPotentialList Declaration
50 \*---------------------------------------------------------------------------*/
52 class pairPotentialList
54 public PtrList<pairPotential>
64 autoPtr<pairPotential> electrostaticPotential_;
67 // Private Member Functions
69 inline label pairPotentialIndex
75 void readPairPotentialDict
77 const List<word>& idList,
78 const dictionary& pairPotentialDict,
82 //- Disallow default bitwise assignment
83 void operator=(const pairPotentialList&);
85 //- Disallow default bitwise copy construct
86 pairPotentialList(const pairPotentialList&);
95 //- Construct from idList and potental dictionaries
98 const List<word>& idList,
99 const dictionary& pairPotentialDict,
105 ~pairPotentialList();
112 const List<word>& idList,
113 const dictionary& pairPotentialDict,
120 inline scalar rCutMax() const;
122 inline scalar rCutMaxSqr() const;
124 bool rCutMaxSqr(scalar rIJMagSqr) const;
126 const pairPotential& pairPotentialFunction
132 // Return true if rIJ is within rCut for this pair.
137 const scalar rIJMagSqr
140 scalar rMin(const label a, const label b) const;
142 scalar dr(const label a, const label b) const;
144 scalar rCutSqr(const label a, const label b) const;
146 scalar rCut(const label a, const label b) const;
162 inline const pairPotential& electrostatic() const;
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 } // End namespace Foam
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 #include "pairPotentialListI.H"
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 // ************************************************************************* //