pairPotentialListI.H
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
00029 inline Foam::label Foam::pairPotentialList::pairPotentialIndex
00030 (
00031 const label a,
00032 const label b
00033 ) const
00034 {
00035 label index;
00036
00037 if (a < b)
00038 {
00039 index = a*(2*nIds_ - a - 1)/2 + b;
00040 }
00041
00042 else
00043 {
00044 index = b*(2*nIds_ - b - 1)/2 + a;
00045 }
00046
00047 if (index > size() - 1)
00048 {
00049 FatalErrorIn("Foam::pairPotentialList::pairPotentialIndex ")
00050 << "Attempting to access a pairPotential with too high an index."
00051 << nl << "a = " << a << ", b = " << b << ", index = " << index
00052 << nl << "max index = " << size() - 1
00053 << nl << abort(FatalError);
00054 }
00055
00056 return index;
00057 }
00058
00059
00060
00061
00062 inline Foam::scalar Foam::pairPotentialList::rCutMax() const
00063 {
00064 return rCutMax_;
00065 }
00066
00067
00068 inline Foam::scalar Foam::pairPotentialList::rCutMaxSqr() const
00069 {
00070 return rCutMaxSqr_;
00071 }
00072
00073
00074 inline const Foam::pairPotential& Foam::pairPotentialList::electrostatic() const
00075 {
00076 return electrostaticPotential_;
00077 }
00078
00079
00080
Copyright © 2000-2009 OpenCFD Ltd