potential.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-2019 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 
90 public:
91 
92  // Constructors
93 
94  //- Construct from mesh reference
95  potential(const polyMesh& mesh);
96 
97  //- Construct from mdInitialiseDict
98  potential
99  (
100  const polyMesh& mesh,
101  const IOdictionary& mdInitialiseDict,
102  IOdictionary& idListDict
103  );
104 
105  //- Disallow default bitwise copy construction
106  potential(const potential&) = delete;
107 
108 
109  //- Destructor
110  ~potential();
111 
112 
113  // Member Functions
114 
115  // Access
116 
117  inline label nIds() const;
118 
119  inline const List<word>& idList() const;
120 
121  inline const List<word>& siteIdList() const;
122 
123  inline scalar potentialEnergyLimit() const;
124 
125  inline label nPairPotentials() const;
126 
127  inline const labelList& removalOrder() const;
128 
129  inline const pairPotentialList& pairPotentials() const;
130 
131  inline const tetherPotentialList& tetherPotentials() const;
132 
133  inline const vector& gravity() const;
134 
135 
136  // Member Operators
137 
138  //- Disallow default bitwise assignment
139  void operator=(const potential&) = delete;
140 };
141 
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 } // End namespace Foam
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 #include "potentialI.H"
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 #endif
154 
155 // ************************************************************************* //
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
void operator=(const potential &)=delete
Disallow default bitwise assignment.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
~potential()
Destructor.
Definition: potential.C:376
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:52
scalar potentialEnergyLimit() const
Definition: potentialI.H:46
label nIds() const
Definition: potentialI.H:28
dynamicFvMesh & mesh
const tetherPotentialList & tetherPotentials() const
Definition: potentialI.H:71
const pairPotentialList & pairPotentials() const
Definition: potentialI.H:64
const List< word > & idList() const
Definition: potentialI.H:34
label nPairPotentials() const
Definition: potentialI.H:52
const labelList & removalOrder() const
Definition: potentialI.H:58
potential(const polyMesh &mesh)
Construct from mesh reference.
Definition: potential.C:354
const vector & gravity() const
Definition: potentialI.H:77
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Namespace for OpenFOAM.
const List< word > & siteIdList() const
Definition: potentialI.H:40