Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 inline Foam::label Foam::pairPotentialList::pairPotentialIndex
00029 (
00030     const label a,
00031     const label b
00032 ) const
00033 {
00034     label index;
00035 
00036     if (a < b)
00037     {
00038         index = a*(2*nIds_ - a - 1)/2 + b;
00039     }
00040 
00041     else
00042     {
00043         index = b*(2*nIds_ - b - 1)/2 + a;
00044     }
00045 
00046     if (index > size() - 1)
00047     {
00048         FatalErrorIn("Foam::pairPotentialList::pairPotentialIndex ")
00049             << "Attempting to access a pairPotential with too high an index."
00050             << nl << "a = " << a << ", b = " << b << ", index = " << index
00051             << nl << "max index = " << size() - 1
00052             << nl << abort(FatalError);
00053     }
00054 
00055     return index;
00056 }
00057 
00058 
00059 
00060 
00061 inline Foam::scalar Foam::pairPotentialList::rCutMax() const
00062 {
00063     return rCutMax_;
00064 }
00065 
00066 
00067 inline Foam::scalar Foam::pairPotentialList::rCutMaxSqr() const
00068 {
00069     return rCutMaxSqr_;
00070 }
00071 
00072 
00073 inline const Foam::pairPotential& Foam::pairPotentialList::electrostatic() const
00074 {
00075     return electrostaticPotential_;
00076 }
00077 
00078 
00079