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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::tetherPotential
29
30Description
31
32SourceFiles
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"
44#include "autoPtr.H"
45#include "vector.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class tetherPotential Declaration
54\*---------------------------------------------------------------------------*/
57{
58
59protected:
60
61 // Protected data
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
76public:
77
78 //- Runtime type information
79 TypeName("tetherPotential");
80
81
82 // Declare run-time constructor selection table
85 (
86 autoPtr,
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
123 virtual scalar energy (const vector r) const = 0;
125 virtual vector force (const vector r) const = 0;
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// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
virtual ~tetherPotential()=default
Destructor.
const dictionary & tetherPotentialProperties() const
dictionary tetherPotentialProperties_
virtual scalar energy(const vector r) const =0
declareRunTimeSelectionTable(autoPtr, tetherPotential, dictionary,(const word &name, const dictionary &tetherPotentialProperties),(name, tetherPotentialProperties))
TypeName("tetherPotential")
Runtime type information.
void operator=(const tetherPotential &)=delete
No copy assignment.
virtual bool read(const dictionary &tetherPotentialProperties)=0
Read tetherPotential dictionary.
static autoPtr< tetherPotential > New(const word &name, const dictionary &tetherPotentialProperties)
Return a reference to the selected viscosity model.
virtual vector force(const vector r) const =0
tetherPotential(const tetherPotential &)=delete
No copy construct.
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73