patchInteractionData.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) 2021 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::patchInteractionData
29 
30 Description
31  Helper class for the LocalInteraction patch interaction model
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef patchInteractionData_H
36 #define patchInteractionData_H
37 
38 #include "wordRe.H"
39 #include "scalar.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 // Forward Declaration
47 class patchInteractionData;
48 Istream& operator>>(Istream& is, patchInteractionData& pid);
49 
50 /*---------------------------------------------------------------------------*\
51  Class patchInteractionData Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 {
56  // Private Data
57 
58  //- Interaction type name
59  word interactionTypeName_;
60 
61  //- Patch name(s)
62  wordRe patchName_;
63 
64  //- Elasticity coefficient
65  scalar e_;
66 
67  //- Restitution coefficient
68  scalar mu_;
69 
70 
71 public:
72 
73  // Constructor
74 
75  //- Default construct
77 
78 
79  // Member Functions
80 
81  //- The interaction type name
82  const word& interactionTypeName() const noexcept
83  {
84  return interactionTypeName_;
85  }
86 
87  //- The patch name(s)
88  const wordRe& patchName() const noexcept
89  {
90  return patchName_;
91  }
92 
93  //- The elasticity coefficient
94  scalar e() const noexcept
95  {
96  return e_;
97  }
98 
99  //- The restitution coefficient
100  scalar mu() const noexcept
101  {
102  return mu_;
103  }
104 
105 
106  // IO Operators
107 
108  //- Istream operator
110 };
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 } // End namespace Foam
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 #endif
120 
121 // ************************************************************************* //
Foam::patchInteractionData
Helper class for the LocalInteraction patch interaction model.
Definition: patchInteractionData.H:53
Foam::patchInteractionData::operator>>
friend Istream & operator>>(Istream &is, patchInteractionData &pid)
Istream operator.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::patchInteractionData::e
scalar e() const noexcept
The elasticity coefficient.
Definition: patchInteractionData.H:93
Foam::operator>>
Istream & operator>>(Istream &, directionInfo &)
Definition: directionInfo.C:230
Foam::wordRe
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
Definition: wordRe.H:80
Foam::patchInteractionData::interactionTypeName
const word & interactionTypeName() const noexcept
The interaction type name.
Definition: patchInteractionData.H:81
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
wordRe.H
Foam::pid
pid_t pid()
Return the PID of this process.
Definition: MSwindows.C:330
scalar.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::patchInteractionData::patchInteractionData
patchInteractionData()
Default construct.
Definition: patchInteractionData.C:35
Foam::patchInteractionData::patchName
const wordRe & patchName() const noexcept
The patch name(s)
Definition: patchInteractionData.H:87
Foam::patchInteractionData::mu
scalar mu() const noexcept
The restitution coefficient.
Definition: patchInteractionData.H:99