32 void Foam::tetherPotentialList::readTetherPotentialDict
34 const List<word>& siteIdList,
35 const dictionary& tetherPotentialDict,
36 const List<word>& tetherSiteIdList
40 Info<<
nl <<
"Building tether potentials." <<
endl;
42 idMap_ = List<label>(siteIdList.size(), -1);
44 label tetherMapIndex = 0;
46 forAll(tetherSiteIdList, t)
48 word tetherPotentialName = tetherSiteIdList[t];
50 label tetherId = siteIdList.find(tetherPotentialName);
56 <<
"No matching entry found in siteIdList for tether name " 57 << tetherPotentialName
60 else if (!tetherPotentialDict.found(tetherPotentialName))
63 <<
nl <<
"tether potential specification subDict " 64 << tetherPotentialName <<
" not found" 75 tetherPotentialDict.subDict(tetherPotentialName)
80 idMap_[tetherId] = tetherMapIndex;
106 buildPotentials(siteIdList, tetherPotentialDict, tetherSiteIdList);
127 readTetherPotentialDict(siteIdList, tetherPotentialDict, tetherSiteIdList);
136 return (*
this)[tetherPotentialIndex(a)];
146 return (*
this)[tetherPotentialIndex(a)].force(rIT);
156 return (*
this)[tetherPotentialIndex(a)].energy(rIT);
void size(const label n)
Older name for setAddressableSize.
scalar energy(const label a, const vector rIT) const
vector force(const label a, const vector rIT) const
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr char nl
The newline '\n' character (0x0a)
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.
#define forAll(list, i)
Loop across all elements in list.
points setSize(newPointi)
errorManip< error > abort(error &err)
const tetherPotential & tetherPotentialFunction(const label a) const
~tetherPotentialList()
Destructor.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
void buildPotentials(const List< word > &siteIdList, const dictionary &tetherPotentialDict, const List< word > &tetherSiteIdList)
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
messageStream Info
Information stream (stdout output on master, null elsewhere)