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 
57  List<label> idMap_;
58 
59 
60  // Private Member Functions
61 
62  inline label tetherPotentialIndex
63  (
64  const label a
65  ) const;
66 
67  void readTetherPotentialDict
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 // ************************************************************************* //
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
scalar energy(const label a, const vector rIT) const
Various functions to operate on Lists.
const List< word > & idMap() const
const tetherPotential & tetherPotentialFunction(const label a) const
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...
Definition: List.H:62
vector force(const label a, const vector rIT) const
Namespace for OpenFOAM.