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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::potential
28
29Description
30
31SourceFiles
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"
45#include "tetherPotentialList.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class potential Declaration
54\*---------------------------------------------------------------------------*/
56class 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
98public:
99
100 // Constructors
101
102 //- Construct from mesh reference
103 potential(const polyMesh& mesh);
104
105 //- Construct from mdInitialiseDict
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// ************************************************************************* //
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: List.H:77
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
label nPairPotentials() const
Definition: potentialI.H:54
const tetherPotentialList & tetherPotentials() const
Definition: potentialI.H:73
const pairPotentialList & pairPotentials() const
Definition: potentialI.H:66
const List< word > & siteIdList() const
Definition: potentialI.H:42
const List< word > & idList() const
Definition: potentialI.H:36
scalar potentialEnergyLimit() const
Definition: potentialI.H:48
const labelList & removalOrder() const
Definition: potentialI.H:60
label nIds() const
Definition: potentialI.H:30
~potential()
Destructor.
Definition: potential.C:378
const vector & gravity() const
Definition: potentialI.H:79
dynamicFvMesh & mesh
Namespace for OpenFOAM.