32void 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;
127 readTetherPotentialDict(siteIdList, tetherPotentialDict, tetherSiteIdList);
136 return (*
this)[tetherPotentialIndex(a)];
146 return (*
this)[tetherPotentialIndex(a)].force(rIT);
156 return (*
this)[tetherPotentialIndex(a)].energy(rIT);
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
const tetherPotential * set(const label i) const
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Base class for film (stress-based) force models.
scalar energy(const label a, const vector rIT) const
void buildPotentials(const List< word > &siteIdList, const dictionary &tetherPotentialDict, const List< word > &tetherSiteIdList)
const tetherPotential & tetherPotentialFunction(const label a) const
~tetherPotentialList()
Destructor.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
constexpr char nl
The newline '\n' character (0x0a)
points setSize(newPointi)
#define forAll(list, i)
Loop across all elements in list.