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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::potential
28 
29 Description
30 
31 SourceFiles
32  potentialI.H
33  potential.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef potential_H
38 #define potential_H
39 
40 #include "polyMesh.H"
41 #include "IOdictionary.H"
42 #include "Time.H"
43 #include "pairPotentialList.H"
44 #include "electrostaticPotential.H"
45 #include "tetherPotentialList.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class potential Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class potential
57 {
58  // Private data
59 
60  const polyMesh& mesh_;
61 
62  List<word> idList_;
63 
64  List<word> siteIdList_;
65 
66  label nPairPotIds_;
67 
68  scalar potentialEnergyLimit_;
69 
70  labelList removalOrder_;
71 
72  pairPotentialList pairPotentials_;
73 
74  tetherPotentialList tetherPotentials_;
75 
76  vector gravity_;
77 
78 
79  // Private Member Functions
80 
81  void setSiteIdList(const dictionary& moleculePropertiesDict);
82 
83  void readPotentialDict();
84 
85  void readMdInitialiseDict
86  (
87  const IOdictionary& mdInitialiseDict,
88  IOdictionary& idListDict
89  );
90 
91  //- No copy construct
92  potential(const potential&) = delete;
93 
94  //- No copy assignment
95  void operator=(const potential&) = delete;
96 
97 
98 public:
99 
100  // Constructors
101 
102  //- Construct from mesh reference
103  potential(const polyMesh& mesh);
104 
105  //- Construct from mdInitialiseDict
106  potential
107  (
108  const polyMesh& mesh,
109  const IOdictionary& mdInitialiseDict,
110  IOdictionary& idListDict
111  );
112 
113 
114  //- Destructor
115  ~potential();
116 
117 
118  // Member Functions
119 
120  // Access
121 
122  inline label nIds() const;
123 
124  inline const List<word>& idList() const;
125 
126  inline const List<word>& siteIdList() const;
127 
128  inline scalar potentialEnergyLimit() const;
129 
130  inline label nPairPotentials() const;
131 
132  inline const labelList& removalOrder() const;
133 
134  inline const pairPotentialList& pairPotentials() const;
135 
136  inline const tetherPotentialList& tetherPotentials() const;
137 
138  inline const vector& gravity() const;
139 };
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace Foam
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #include "potentialI.H"
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #endif
153 
154 // ************************************************************************* //
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
Foam::pairPotentialList
Definition: pairPotentialList.H:53
Foam::potential::gravity
const vector & gravity() const
Definition: potentialI.H:79
Foam::potential::pairPotentials
const pairPotentialList & pairPotentials() const
Definition: potentialI.H:66
Foam::potential::siteIdList
const List< word > & siteIdList() const
Definition: potentialI.H:42
polyMesh.H
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::potential::tetherPotentials
const tetherPotentialList & tetherPotentials() const
Definition: potentialI.H:73
potentialI.H
pairPotentialList.H
electrostaticPotential.H
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::potential
Definition: potential.H:55
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::potential::nIds
label nIds() const
Definition: potentialI.H:30
IOdictionary.H
Time.H
Foam::potential::nPairPotentials
label nPairPotentials() const
Definition: potentialI.H:54
Foam::potential::removalOrder
const labelList & removalOrder() const
Definition: potentialI.H:60
Foam::tetherPotentialList
Definition: tetherPotentialList.H:52
Foam::Vector< scalar >
Foam::List< word >
Foam::potential::potentialEnergyLimit
scalar potentialEnergyLimit() const
Definition: potentialI.H:48
Foam::potential::~potential
~potential()
Destructor.
Definition: potential.C:378
Foam::potential::idList
const List< word > & idList() const
Definition: potentialI.H:36
tetherPotentialList.H