tetherPotential.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-2018 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::tetherPotential
26 
27 Description
28 
29 SourceFiles
30  tetherPotential.C
31  tetherPotentialNew.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef tetherPotential_H
36 #define tetherPotential_H
37 
38 #include "IOdictionary.H"
39 #include "typeInfo.H"
40 #include "runTimeSelectionTables.H"
41 #include "autoPtr.H"
42 #include "vector.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class tetherPotential Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class tetherPotential
54 {
55 
56 protected:
57 
58  // Protected data
59 
62 
63 
64  // Private Member Functions
65 
66  //- Disallow copy construct
68 
69  //- Disallow default bitwise assignment
70  void operator=(const tetherPotential&);
71 
72 
73 public:
74 
75  //- Runtime type information
76  TypeName("tetherPotential");
77 
78 
79  // Declare run-time constructor selection table
80 
82  (
83  autoPtr,
85  dictionary,
86  (
87  const word& name,
89  ),
90  (name, tetherPotentialProperties)
91  );
92 
93 
94  // Selectors
95 
96  //- Return a reference to the selected viscosity model
98  (
99  const word& name,
100  const dictionary& tetherPotentialProperties
101  );
102 
103 
104  // Constructors
105 
106  //- Construct from components
108  (
109  const word& name,
110  const dictionary& tetherPotentialProperties
111  );
112 
113 
114  //- Destructor
115  virtual ~tetherPotential()
116  {}
117 
118 
119  // Member Functions
120 
121  virtual scalar energy (const vector r) const = 0;
122 
123  virtual vector force (const vector r) const = 0;
126  {
128  }
129 
130  //- Read tetherPotential dictionary
131  virtual bool read(const dictionary& tetherPotentialProperties) = 0;
132 };
133 
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 } // End namespace Foam
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 #endif
142 
143 // ************************************************************************* //
declareRunTimeSelectionTable(autoPtr, tetherPotential, dictionary,(const word &name, const dictionary &tetherPotentialProperties),(name, tetherPotentialProperties))
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
tetherPotential(const tetherPotential &)
Disallow copy construct.
virtual vector force(const vector r) const =0
static autoPtr< tetherPotential > New(const word &name, const dictionary &tetherPotentialProperties)
Return a reference to the selected viscosity model.
dictionary tetherPotentialProperties_
virtual scalar energy(const vector r) const =0
virtual bool read(const dictionary &tetherPotentialProperties)=0
Read tetherPotential dictionary.
A class for handling words, derived from string.
Definition: word.H:59
void operator=(const tetherPotential &)
Disallow default bitwise assignment.
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
virtual ~tetherPotential()
Destructor.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
TypeName("tetherPotential")
Runtime type information.
Macros to ease declaration of run-time selection tables.
const dictionary & tetherPotentialProperties() const
Namespace for OpenFOAM.