www.cemf.ir
algorithmFunctions.hpp
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
#ifndef __algorithmFunctions_hpp__
23
#define __algorithmFunctions_hpp__
24
25
#include "
pFlowMacros.hpp
"
26
27
namespace
pFlow::algorithms
28
{
29
30
template
<
typename
T>
31
struct
greater
32
{
33
INLINE_FUNCTION_HD
34
bool
operator()
(
const
T &lhs,
const
T &rhs)
const
{
35
return
lhs > rhs; }
36
};
37
38
template
<
typename
T>
39
struct
less
40
{
41
INLINE_FUNCTION_HD
42
bool
operator()
(
const
T &lhs,
const
T &rhs)
const
{
43
return
lhs < rhs; }
44
};
45
46
47
template
<
typename
T>
48
struct
maximum
49
{
50
INLINE_FUNCTION_HD
51
bool
operator()
(
const
T &lhs,
const
T &rhs)
const
{
52
return
lhs < rhs ? rhs : lhs; }
53
};
54
55
template
<
typename
T>
56
struct
minimum
57
{
58
INLINE_FUNCTION_HD
59
bool
operator()
(
const
T &lhs,
const
T &rhs)
const
{
60
return
lhs < rhs ? lhs : rhs; }
61
};
62
63
}
64
65
#endif // __algorithmFunctions_hpp__
pFlow::algorithms::minimum::operator()
INLINE_FUNCTION_HD bool operator()(const T &lhs, const T &rhs) const
Definition:
algorithmFunctions.hpp:59
pFlow::algorithms::maximum
Definition:
algorithmFunctions.hpp:48
pFlow::algorithms::maximum::operator()
INLINE_FUNCTION_HD bool operator()(const T &lhs, const T &rhs) const
Definition:
algorithmFunctions.hpp:51
pFlow::algorithms
Definition:
algorithmFunctions.hpp:27
pFlowMacros.hpp
pFlow::algorithms::minimum
Definition:
algorithmFunctions.hpp:56
pFlow::algorithms::greater
Definition:
algorithmFunctions.hpp:31
INLINE_FUNCTION_HD
#define INLINE_FUNCTION_HD
Definition:
pFlowMacros.hpp:55
pFlow::algorithms::less
Definition:
algorithmFunctions.hpp:39
pFlow::algorithms::less::operator()
INLINE_FUNCTION_HD bool operator()(const T &lhs, const T &rhs) const
Definition:
algorithmFunctions.hpp:42
pFlow::algorithms::greater::operator()
INLINE_FUNCTION_HD bool operator()(const T &lhs, const T &rhs) const
Definition:
algorithmFunctions.hpp:34
src
phasicFlow
algorithms
algorithmFunctions.hpp
Generated by
1.8.17