PhasicFlow
v0.1
www.cemf.ir
setFieldList.cpp
Go to the documentation of this file.
1
/*------------------------------- phasicFlow ---------------------------------
2
O C enter of
3
O O E ngineering and
4
O O M ultiscale modeling of
5
OOOOOOO F luid flow
6
------------------------------------------------------------------------------
7
Copyright (C): www.cemf.ir
8
email: hamid.r.norouzi AT gmail.com
9
------------------------------------------------------------------------------
10
Licence:
11
This file is part of phasicFlow code. It is a free software for simulating
12
granular and multiphase flows. You can redistribute it and/or modify it under
13
the terms of GNU General Public License v3 or any other later versions.
14
15
phasicFlow is distributed to help others in their research in the field of
16
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
19
-----------------------------------------------------------------------------*/
20
21
22
#include "
setFieldList.hpp
"
23
24
bool
pFlow::setFieldList::readSetFieldList
(
const
dictionary
& dict)
25
{
26
this->clear();
27
wordList
Keys = dict.
dataEntryKeywords
();
28
29
for
(
const
auto
& key:Keys)
30
{
31
this->emplace_back( dict.
dataEntryRef
(key));
32
}
33
34
return
true
;
35
}
36
37
bool
pFlow::setFieldList::writeSetFieldList
38
(
39
dictionary
& dict
40
)
const
41
{
42
dict = dict_;
43
return
true
;
44
}
45
46
pFlow::setFieldList::setFieldList
47
(
48
const
dictionary
& dict
49
)
50
:
51
dict_(dict)
52
{
53
if
(!readSetFieldList(dict_))
54
{
55
fatalExit
;
56
}
57
}
58
59
60
bool
pFlow::setFieldList::read
61
(
62
const
dictionary
& dict
63
)
64
{
65
dict_ = dict;
66
return
readSetFieldList(dict);
67
}
68
69
bool
pFlow::setFieldList::write
70
(
71
dictionary
& dict
72
)
const
73
{
74
return
writeSetFieldList(dict);
75
}
pFlow::List< word >
setFieldList.hpp
fatalExit
#define fatalExit
Definition:
error.hpp:57
pFlow::setFieldList::writeSetFieldList
bool writeSetFieldList(dictionary &dict) const
Definition:
setFieldList.cpp:38
pFlow::setFieldList::setFieldList
setFieldList(const dictionary &dict)
Definition:
setFieldList.cpp:47
pFlow::setFieldList::write
bool write(dictionary &dict) const
Definition:
setFieldList.cpp:70
pFlow::setFieldList::read
bool read(const dictionary &dict)
Definition:
setFieldList.cpp:61
pFlow::setFieldList::readSetFieldList
bool readSetFieldList(const dictionary &dict)
Definition:
setFieldList.cpp:24
pFlow::dictionary::dataEntryRef
dataEntry & dataEntryRef(const word &keyword)
Definition:
dictionary.cpp:600
pFlow::dictionary::dataEntryKeywords
wordList dataEntryKeywords() const
Definition:
dictionary.cpp:706
pFlow::dictionary
Definition:
dictionary.hpp:38
src
phasicFlow
setFieldList
setFieldList.cpp
Generated by
1.8.17