potential.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::potential
26 
27 Description
28 
29 SourceFiles
30  potentialI.H
31  potential.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef potential_H
36 #define potential_H
37 
38 #include "polyMesh.H"
39 #include "IOdictionary.H"
40 #include "Time.H"
41 #include "pairPotentialList.H"
42 #include "electrostaticPotential.H"
43 #include "tetherPotentialList.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class potential Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class potential
55 {
56  // Private data
57 
58  const polyMesh& mesh_;
59 
60  List<word> idList_;
61 
62  List<word> siteIdList_;
63 
64  label nPairPotIds_;
65 
66  scalar potentialEnergyLimit_;
67 
68  labelList removalOrder_;
69 
70  pairPotentialList pairPotentials_;
71 
72  tetherPotentialList tetherPotentials_;
73 
74  vector gravity_;
75 
76 
77  // Private Member Functions
78 
79  void setSiteIdList(const dictionary& moleculePropertiesDict);
80 
81  void readPotentialDict();
82 
83  void readMdInitialiseDict
84  (
85  const IOdictionary& mdInitialiseDict,
86  IOdictionary& idListDict
87  );
88 
89  //- Disallow default bitwise copy construct
90  potential(const potential&);
91 
92  //- Disallow default bitwise assignment
93  void operator=(const potential&);
94 
95 
96 public:
97 
98  // Constructors
99 
100  //- Construct from mesh reference
101  potential(const polyMesh& mesh);
102 
103  //- Construct from mdInitialiseDict
104  potential
105  (
106  const polyMesh& mesh,
107  const IOdictionary& mdInitialiseDict,
108  IOdictionary& idListDict
109  );
110 
111 
112  //- Destructor
113  ~potential();
114 
115 
116  // Member Functions
117 
118  // Access
119 
120  inline label nIds() const;
121 
122  inline const List<word>& idList() const;
123 
124  inline const List<word>& siteIdList() const;
125 
126  inline scalar potentialEnergyLimit() const;
127 
128  inline label nPairPotentials() const;
129 
130  inline const labelList& removalOrder() const;
131 
132  inline const pairPotentialList& pairPotentials() const;
133 
134  inline const tetherPotentialList& tetherPotentials() const;
135 
136  inline const vector& gravity() const;
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #include "potentialI.H"
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 #endif
151 
152 // ************************************************************************* //
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
const List< word > & siteIdList() const
Definition: potentialI.H:40
~potential()
Destructor.
Definition: potential.C:376
const labelList & removalOrder() const
Definition: potentialI.H:58
label nPairPotentials() const
Definition: potentialI.H:52
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
const vector & gravity() const
Definition: potentialI.H:77
dynamicFvMesh & mesh
label nIds() const
Definition: potentialI.H:28
const pairPotentialList & pairPotentials() const
Definition: potentialI.H:64
scalar potentialEnergyLimit() const
Definition: potentialI.H:46
const tetherPotentialList & tetherPotentials() const
Definition: potentialI.H:71
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
const List< word > & idList() const
Definition: potentialI.H:34
Namespace for OpenFOAM.