OpenFOAM
4.1
The OpenFOAM Foundation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
lagrangian
intermediate
submodels
Kinematic
PatchInteractionModel
LocalInteraction
patchInteractionData.C
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | Copyright (C) 2011 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
\*---------------------------------------------------------------------------*/
25
26
#include "
patchInteractionData.H
"
27
#include "
dictionaryEntry.H
"
28
#include "
PatchInteractionModel.H
"
29
30
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
31
32
Foam::patchInteractionData::patchInteractionData
()
33
:
34
interactionTypeName_(
"unknownInteractionTypeName"
),
35
patchName_(
"unknownPatch"
),
36
e_(0.0),
37
mu_(0.0)
38
{}
39
40
41
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
42
43
const
Foam::word
&
Foam::patchInteractionData::interactionTypeName
()
const
44
{
45
return
interactionTypeName_;
46
}
47
48
49
const
Foam::word
&
Foam::patchInteractionData::patchName
()
const
50
{
51
return
patchName_;
52
}
53
54
55
Foam::scalar
Foam::patchInteractionData::e
()
const
56
{
57
return
e_;
58
}
59
60
61
Foam::scalar
Foam::patchInteractionData::mu
()
const
62
{
63
return
mu_;
64
}
65
66
67
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
68
69
Foam::Istream
& Foam::operator>>
70
(
71
Istream
& is,
72
patchInteractionData
&
pid
73
)
74
{
75
is.
check
(
"Istream& operator>>(Istream&, patchInteractionData&)"
);
76
77
const
dictionaryEntry
entry
(
dictionary::null
, is);
78
79
pid
.patchName_ = entry.
keyword
();
80
entry.
lookup
(
"type"
) >>
pid
.interactionTypeName_;
81
pid
.e_ = entry.
lookupOrDefault
<scalar>(
"e"
, 1.0);
82
pid
.mu_ = entry.
lookupOrDefault
<scalar>(
"mu"
, 0.0);
83
84
return
is;
85
}
86
87
88
// ************************************************************************* //
Foam::patchInteractionData
Helper class for the LocalInteraction patch interaction model.
Definition:
patchInteractionData.H:55
patchInteractionData.H
Foam::patchInteractionData::e
scalar e() const
Return const access to the elasticity coefficient.
Definition:
patchInteractionData.C:55
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition:
Istream.H:57
Foam::dictionary::null
static const dictionary null
Null dictionary.
Definition:
dictionary.H:193
Foam::IOstream::check
virtual bool check(const char *operation) const
Check IOstream status for given operation.
Definition:
IOstream.C:92
Foam::patchInteractionData::mu
scalar mu() const
Return const access to the restitution coefficient.
Definition:
patchInteractionData.C:61
Foam::dictionaryEntry
A keyword and a list of tokens is a 'dictionaryEntry'.
Definition:
dictionaryEntry.H:64
Foam::word
A class for handling words, derived from string.
Definition:
word.H:59
Foam::entry::keyword
const keyType & keyword() const
Return keyword.
Definition:
entry.H:120
Foam::patchInteractionData::patchInteractionData
patchInteractionData()
Construct null.
Definition:
patchInteractionData.C:32
Foam::pid
pid_t pid()
Return the PID of this process.
Definition:
POSIX.C:78
dictionaryEntry.H
PatchInteractionModel.H
Foam::dictionary::lookupOrDefault
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
Definition:
dictionaryTemplates.C:33
Foam::patchInteractionData::patchName
const word & patchName() const
Return const access to the patch name.
Definition:
patchInteractionData.C:49
Foam::entry
A keyword and a list of tokens is an 'entry'.
Definition:
entry.H:65
Foam::dictionary::lookup
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition:
dictionary.C:451
Foam::patchInteractionData::interactionTypeName
const word & interactionTypeName() const
Return const access to the interaction type name.
Definition:
patchInteractionData.C:43
Generated by
1.8.11