PhasicFlow
v0.1
www.cemf.ir
stlWall.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 "
stlWall.hpp
"
23
#include "
stlFile.hpp
"
24
25
#include "
streams.hpp
"
26
27
bool
pFlow::stlWall::readSTLWall
28
(
29
const
dictionary
& dict
30
)
31
{
32
auto
fileName = dict.
getVal
<
word
>(
"file"
);
33
34
35
fileSystem
file(
"./stl"
,fileName);
36
37
stlFile
stl(file);
38
if
(!stl.
read
())
39
{
40
fatalErrorInFunction
<<
41
" error in reading stl file "
<< file <<
endl
;
42
return
false
;
43
}
44
45
for
(
label
i=0; i<stl.
size
(); i++)
46
{
47
auto
it = triangles_.end();
48
triangles_.insert(it, stl.
solid
(i).begin(), stl.
solid
(i).end());
49
}
50
51
52
53
return
true
;
54
55
}
56
57
pFlow::stlWall::stlWall
()
58
{}
59
60
pFlow::stlWall::stlWall
61
(
62
const
dictionary
& dict
63
)
64
:
65
Wall
(dict)
66
{
67
if
(!readSTLWall(dict))
68
{
69
fatalExit
;
70
}
71
}
stlWall.hpp
fatalExit
#define fatalExit
Definition:
error.hpp:57
pFlow::word
std::string word
Definition:
builtinTypes.hpp:63
pFlow::stlFile
Definition:
stlFile.hpp:38
pFlow::endl
iOstream & endl(iOstream &os)
Definition:
iOstream.hpp:312
pFlow::stlWall::readSTLWall
bool readSTLWall(const dictionary &dict)
Definition:
stlWall.cpp:28
pFlow::stlFile::solid
const realx3x3Vector & solid(label i) const
Definition:
stlFile.cpp:355
pFlow::stlFile::size
size_t size() const
Definition:
stlFile.cpp:349
pFlow::fileSystem
Definition:
fileSystem.hpp:63
stlFile.hpp
fatalErrorInFunction
#define fatalErrorInFunction
Definition:
error.hpp:42
streams.hpp
pFlow::dictionary::getVal
T getVal(const word &keyword) const
Definition:
dictionary.hpp:309
pFlow::stlWall::stlWall
stlWall()
Definition:
stlWall.cpp:57
pFlow::label
std::size_t label
Definition:
builtinTypes.hpp:61
pFlow::stlFile::read
bool read()
Definition:
stlFile.cpp:292
pFlow::Wall
Definition:
Wall.hpp:41
pFlow::dictionary
Definition:
dictionary.hpp:38
utilities
Utilities
geometryPhasicFlow
stlWall
stlWall.cpp
Generated by
1.8.17