OpenFOAM
v2512
The open source CFD toolbox
Loading...
Searching...
No Matches
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 | www.openfoam.com
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
Copyright (C) 2011 OpenFOAM Foundation
9
Copyright (C) 2020-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
\*---------------------------------------------------------------------------*/
28
29
#include "
patchInteractionData.H
"
30
#include "
dictionaryEntry.H
"
31
#include "
PatchInteractionModel.H
"
32
33
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
34
35
Foam::patchInteractionData::patchInteractionData
()
36
:
37
interactionTypeName_(),
38
patchName_(),
39
e_(0),
40
mu_(0)
41
{}
42
43
44
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
45
46
Foam::Istream
& Foam::operator>>
47
(
48
Istream& is,
49
patchInteractionData& pid
50
)
51
{
52
is.check(
FUNCTION_NAME
);
53
54
const
dictionaryEntry dictEntry(dictionary::null, is);
55
const
dictionary
&
dict
= dictEntry.dict();
56
57
pid.patchName_ = dictEntry.keyword();
58
59
dict
.readEntry(
"type"
, pid.interactionTypeName_);
60
pid.e_ =
dict
.getOrDefault<scalar>(
"e"
, 1);
61
pid.mu_ =
dict
.getOrDefault<scalar>(
"mu"
, 0);
62
63
return
is;
64
}
65
66
67
// ************************************************************************* //
PatchInteractionModel.H
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition
Istream.H:60
Foam::dictionaryEntry
A keyword and a list of tokens is a 'dictionaryEntry'.
Definition
dictionaryEntry.H:68
Foam::dictionaryEntry::dict
virtual const dictionary & dict() const noexcept
Return dictionary (ie, this).
Definition
dictionaryEntry.C:87
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition
dictionary.H:133
Foam::dictionary::null
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
Definition
dictionary.H:487
Foam::entry::keyword
const keyType & keyword() const noexcept
Return keyword.
Definition
entry.H:231
Foam::patchInteractionData
Helper class for the LocalInteraction patch interaction model.
Definition
patchInteractionData.H:48
Foam::patchInteractionData::patchInteractionData
patchInteractionData()
Default construct.
Definition
patchInteractionData.C:28
dictionaryEntry.H
FUNCTION_NAME
#define FUNCTION_NAME
Definition
messageStream.H:404
Foam::pid
pid_t pid()
Return the PID of this process.
Definition
POSIX.C:316
patchInteractionData.H
dict
dictionary dict
Definition
searchingEngine.H:11
writeChecksFormatType::dictionary
@ dictionary
Definition
writeMeshChecks.H:4
src
lagrangian
intermediate
submodels
Kinematic
PatchInteractionModel
LocalInteraction
patchInteractionData.C
Generated by
1.16.1