tetherPotential.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  Copyright (C) 2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::tetherPotential
29 
30 Description
31 
32 SourceFiles
33  tetherPotential.C
34  tetherPotentialNew.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef tetherPotential_H
39 #define tetherPotential_H
40 
41 #include "IOdictionary.H"
42 #include "typeInfo.H"
43 #include "runTimeSelectionTables.H"
44 #include "autoPtr.H"
45 #include "vector.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class tetherPotential Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class tetherPotential
57 {
58 
59 protected:
60 
61  // Protected data
62 
65 
66 
67  // Private Member Functions
68 
69  //- No copy construct
70  tetherPotential(const tetherPotential&) = delete;
71 
72  //- No copy assignment
73  void operator=(const tetherPotential&) = delete;
74 
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("tetherPotential");
80 
81 
82  // Declare run-time constructor selection table
83 
85  (
86  autoPtr,
88  dictionary,
89  (
90  const word& name,
92  ),
94  );
95 
96 
97  // Selectors
98 
99  //- Return a reference to the selected viscosity model
101  (
102  const word& name,
104  );
105 
106 
107  // Constructors
108 
109  //- Construct from components
111  (
112  const word& name,
114  );
115 
116 
117  //- Destructor
118  virtual ~tetherPotential() = default;
119 
120 
121  // Member Functions
122 
123  virtual scalar energy (const vector r) const = 0;
124 
125  virtual vector force (const vector r) const = 0;
126 
128  {
130  }
131 
132  //- Read tetherPotential dictionary
133  virtual bool read(const dictionary& tetherPotentialProperties) = 0;
134 };
135 
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 } // End namespace Foam
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #endif
144 
145 // ************************************************************************* //
Foam::tetherPotential
Definition: tetherPotential.H:55
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tetherPotential::New
static autoPtr< tetherPotential > New(const word &name, const dictionary &tetherPotentialProperties)
Return a reference to the selected viscosity model.
Definition: tetherPotentialNew.C:34
typeInfo.H
Foam::tetherPotential::name_
word name_
Definition: tetherPotential.H:62
Foam::tetherPotential::tetherPotentialProperties_
dictionary tetherPotentialProperties_
Definition: tetherPotential.H:63
Foam::tetherPotential::read
virtual bool read(const dictionary &tetherPotentialProperties)=0
Read tetherPotential dictionary.
Definition: tetherPotential.C:55
Foam::tetherPotential::energy
virtual scalar energy(const vector r) const =0
Foam::tetherPotential::tetherPotential
tetherPotential(const tetherPotential &)=delete
No copy construct.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::tetherPotential::~tetherPotential
virtual ~tetherPotential()=default
Destructor.
Foam::tetherPotential::operator=
void operator=(const tetherPotential &)=delete
No copy assignment.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
IOdictionary.H
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::tetherPotential::tetherPotentialProperties
const dictionary & tetherPotentialProperties() const
Definition: tetherPotential.H:126
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::Vector< scalar >
vector.H
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Foam::tetherPotential::TypeName
TypeName("tetherPotential")
Runtime type information.
Foam::tetherPotential::force
virtual vector force(const vector r) const =0
Foam::tetherPotential::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, tetherPotential, dictionary,(const word &name, const dictionary &tetherPotentialProperties),(name, tetherPotentialProperties))
autoPtr.H