PhasicFlow
v0.1
www.cemf.ir
contactSearch.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
#include "
contactSearch.hpp
"
22
23
24
25
pFlow::contactSearch::contactSearch
(
26
const
dictionary
& dict,
27
const
box
& domain,
28
const
particles
& prtcl,
29
const
geometry
& geom,
30
Timers
& timers)
31
:
32
interactionBase
(prtcl, geom),
33
domain_(domain),
34
dict_(dict),
35
sphereSphereTimer_(
"particle-particle contact search"
, &timers),
36
sphereWallTimer_(
"particle-wall contact search"
, &timers)
37
{
38
39
}
40
41
42
pFlow::uniquePtr<pFlow::contactSearch>
pFlow::contactSearch::create
(
43
const
dictionary
& dict,
44
const
box
& domain,
45
const
particles
& prtcl,
46
const
geometry
& geom,
47
Timers
& timers)
48
{
49
50
word
baseMethName = dict.
getVal
<
word
>(
"method"
);
51
word
wallMethod = dict.
getVal
<
word
>(
"wallMapping"
);
52
53
auto
model =
angleBracketsNames2
(
"ContactSearch"
, baseMethName, wallMethod);
54
55
56
REPORT
(1)<<
"Selecting contact search model . . ."
<<
endREPORT
;
57
58
59
if
( dictionaryvCtorSelector_.search(model))
60
{
61
auto
objPtr = dictionaryvCtorSelector_[model] (dict, domain, prtcl, geom, timers);
62
REPORT
(2)<<
"Model "
<<
greenText
(model)<<
" is created."
<<
endREPORT
;
63
return
objPtr;
64
}
65
else
66
{
67
printKeys
68
(
69
fatalError
<<
"Ctor Selector "
<< model <<
" dose not exist. \n"
70
<<
"Avaiable ones are: \n\n"
71
,
72
dictionaryvCtorSelector_
73
);
74
fatalExit
;
75
}
76
77
return
nullptr
;
78
}
endREPORT
#define endREPORT
Definition:
streams.hpp:41
fatalExit
#define fatalExit
Definition:
error.hpp:57
REPORT
#define REPORT(n)
Definition:
streams.hpp:40
pFlow::word
std::string word
Definition:
builtinTypes.hpp:63
pFlow::printKeys
iOstream & printKeys(iOstream &os, const wordHashMap< T > &m)
pFlow::Timers
Definition:
Timers.hpp:33
greenText
#define greenText(text)
Definition:
streams.hpp:32
pFlow::angleBracketsNames2
word angleBracketsNames2(const word &base, const word &w1, const word &w2)
Definition:
bTypesFunctions.cpp:137
pFlow::particles
Definition:
particles.hpp:33
fatalError
#define fatalError
Definition:
error.hpp:36
pFlow::interactionBase
Definition:
interactionBase.hpp:31
pFlow::dictionary::getVal
T getVal(const word &keyword) const
Definition:
dictionary.hpp:309
pFlow::contactSearch::create
static uniquePtr< contactSearch > create(const dictionary &dict, const box &domain, const particles &prtcl, const geometry &geom, Timers &timers)
Definition:
contactSearch.cpp:42
pFlow::box
Definition:
box.hpp:32
pFlow::uniquePtr< pFlow::contactSearch >
pFlow::geometry
Definition:
geometry.hpp:37
contactSearch.hpp
pFlow::contactSearch::contactSearch
contactSearch(const dictionary &dict, const box &domain, const particles &prtcl, const geometry &geom, Timers &timers)
Definition:
contactSearch.cpp:25
pFlow::dictionary
Definition:
dictionary.hpp:38
src
Interaction
contactSearch
contactSearch
contactSearch.cpp
Generated by
1.8.17