tetherPotentialList.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2020 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 
75 public:
76 
77  // Constructors
78 
80 
81  //- Construct from siteIdList and potential dictionaries
83  (
84  const List<word>& siteIdList,
85  const dictionary& tetherPotentialDict,
86  const List<word>& tetherSiteIdList
87  );
88 
89  //- Disallow default bitwise assignment
90  void operator=(const tetherPotentialList&) = delete;
91 
92 
93  //- Destructor
95 
96 
97  // Member Functions
98 
99  void buildPotentials
100  (
101  const List<word>& siteIdList,
102  const dictionary& tetherPotentialDict,
103  const List<word>& tetherSiteIdList
104  );
105 
106  // Access
107 
108  inline const List<word>& idMap() const;
109 
110  const tetherPotential& tetherPotentialFunction(const label a) const;
111 
112  vector force(const label a, const vector rIT) const;
113 
114  scalar energy (const label a, const vector rIT) const;
115 
116 
117  // Member Operators
118 
119  //- Disallow default bitwise copy construction
120  tetherPotentialList(const tetherPotentialList&) = delete;
121 };
122 
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 } // End namespace Foam
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #include "tetherPotentialListI.H"
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************************************************************* //
Various functions to operate on Lists.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
void operator=(const tetherPotentialList &)=delete
Disallow default bitwise assignment.
scalar energy(const label a, const vector rIT) const
vector force(const label a, const vector rIT) const
const List< word > & idMap() const
void buildPotentials(const List< word > &siteIdList, const dictionary &tetherPotentialDict, const List< word > &tetherSiteIdList)
const tetherPotential & tetherPotentialFunction(const label a) const
Namespace for OpenFOAM.
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