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];
54 <<
"No matching entry found in siteIdList for tether name " 55 << tetherPotentialName
58 else if (!tetherPotentialDict.found(tetherPotentialName))
61 <<
nl <<
"tether potential specification subDict " 62 << tetherPotentialName <<
" not found" 73 tetherPotentialDict.subDict(tetherPotentialName)
78 idMap_[tetherId] = tetherMapIndex;
125 readTetherPotentialDict(siteIdList, tetherPotentialDict, tetherSiteIdList);
134 return (*
this)[tetherPotentialIndex(a)];
144 return (*
this)[tetherPotentialIndex(a)].force(rIT);
154 return (*
this)[tetherPotentialIndex(a)].energy(rIT);
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
scalar energy(const label a, const vector rIT) const
vector force(const label a, const vector rIT) const
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static autoPtr< tetherPotential > New(const word &name, const dictionary &tetherPotentialProperties)
Return a reference to the selected viscosity model.
errorManip< error > abort(error &err)
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
const tetherPotential & tetherPotentialFunction(const label a) const
~tetherPotentialList()
Destructor.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
void buildPotentials(const List< word > &siteIdList, const dictionary &tetherPotentialDict, const List< word > &tetherSiteIdList)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...