tetherPotentialList.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::tetherPotentialList
26 
27 Description
28 
29 SourceFiles
30  tetherPotentialList.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef tetherPotentialList_H
35 #define tetherPotentialList_H
36 
37 #include "ListOps.H"
38 #include "PtrList.H"
39 #include "word.H"
40 #include "tetherPotential.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class tetherPotentialList Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public PtrList<tetherPotential>
54 {
55  // Private data
56 
58 
59 
60  // Private Member Functions
61 
63  (
64  const label a
65  ) const;
66 
68  (
69  const List<word>& siteIdList,
70  const dictionary& tetherPotentialDict,
71  const List<word>& tetherSiteIdList
72  );
73 
74  //- Disallow default bitwise assignment
75  void operator=(const tetherPotentialList&);
76 
77  //- Disallow default bitwise copy construct
79 
80 
81 public:
82 
83  // Constructors
84 
86 
87  //- Construct from siteIdList and potental dictionaries
89  (
90  const List<word>& siteIdList,
91  const dictionary& tetherPotentialDict,
92  const List<word>& tetherSiteIdList
93  );
94 
95 
96  //- Destructor
98 
99 
100  // Member Functions
101 
102  void buildPotentials
103  (
104  const List<word>& siteIdList,
105  const dictionary& tetherPotentialDict,
106  const List<word>& tetherSiteIdList
107  );
108 
109  // Access
110 
111  inline const List<word>& idMap() const;
112 
113  const tetherPotential& tetherPotentialFunction(const label a) const;
114 
115  vector force(const label a, const vector rIT) const;
116 
117  scalar energy (const label a, const vector rIT) const;
118 };
119 
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 } // End namespace Foam
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 #include "tetherPotentialListI.H"
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 #endif
132 
133 // ************************************************************************* //
Foam::tetherPotentialList::force
vector force(const label a, const vector rIT) const
Definition: tetherPotentialList.C:139
Foam::tetherPotential
Definition: tetherPotential.H:52
Foam::tetherPotentialList::~tetherPotentialList
~tetherPotentialList()
Destructor.
Definition: tetherPotentialList.C:110
tetherPotentialListI.H
Foam::tetherPotentialList::energy
scalar energy(const label a, const vector rIT) const
Definition: tetherPotentialList.C:149
Foam::tetherPotentialList::idMap
const List< word > & idMap() const
tetherPotential.H
Foam::tetherPotentialList::buildPotentials
void buildPotentials(const List< word > &siteIdList, const dictionary &tetherPotentialDict, const List< word > &tetherSiteIdList)
Definition: tetherPotentialList.C:117
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::PtrList
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:61
Foam::tetherPotentialList::tetherPotentialList
tetherPotentialList()
Definition: tetherPotentialList.C:87
Foam::tetherPotentialList::readTetherPotentialDict
void readTetherPotentialDict(const List< word > &siteIdList, const dictionary &tetherPotentialDict, const List< word > &tetherSiteIdList)
Definition: tetherPotentialList.C:31
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::tetherPotentialList::tetherPotentialFunction
const tetherPotential & tetherPotentialFunction(const label a) const
Definition: tetherPotentialList.C:130
Foam::tetherPotentialList
Definition: tetherPotentialList.H:50
Foam::Vector< scalar >
Foam::List< label >
PtrList.H
ListOps.H
Various functions to operate on Lists.
word.H
Foam::tetherPotentialList::idMap_
List< label > idMap_
Definition: tetherPotentialList.H:56
Foam::tetherPotentialList::tetherPotentialIndex
label tetherPotentialIndex(const label a) const
Definition: tetherPotentialListI.H:29
Foam::tetherPotentialList::operator=
void operator=(const tetherPotentialList &)
Disallow default bitwise assignment.