30 void Foam::tetherPotentialList::readTetherPotentialDict
32 const List<word>& siteIdList,
33 const dictionary& tetherPotentialDict,
34 const List<word>& tetherSiteIdList
38 Info<<
nl <<
"Building tether potentials." <<
endl;
40 idMap_ = List<label>(siteIdList.size(), -1);
42 label tetherMapIndex = 0;
44 forAll(tetherSiteIdList, t)
46 word tetherPotentialName = tetherSiteIdList[t];
48 label tetherId =
findIndex(siteIdList, tetherPotentialName);
52 FatalErrorIn(
"tetherPotentialList::readTetherPotentialDict")
53 <<
nl <<
"No matching entry found in siteIdList for tether name "
54 << tetherPotentialName
57 else if (!tetherPotentialDict.found(tetherPotentialName))
59 FatalErrorIn(
"tetherPotentialList::readTetherPotentialDict")
60 <<
nl <<
"tether potential specification subDict "
61 << tetherPotentialName <<
" not found"
72 tetherPotentialDict.subDict(tetherPotentialName)
77 idMap_[tetherId] = tetherMapIndex;
103 buildPotentials(siteIdList, tetherPotentialDict, tetherSiteIdList);
124 readTetherPotentialDict(siteIdList, tetherPotentialDict, tetherSiteIdList);
133 return (*
this)[tetherPotentialIndex(a)];
143 return (*
this)[tetherPotentialIndex(a)].force(rIT);
153 return (*
this)[tetherPotentialIndex(a)].energy(rIT);