PhasicFlow
v0.1
www.cemf.ir
builtinTypes.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
#ifndef __builtinTypes_hpp__
22
#define __builtinTypes_hpp__
23
24
#include <string>
25
26
#include "phasicFlowConfig.H"
27
28
namespace
pFlow
29
{
30
31
#ifdef pFlow_Build_Double
32
#define useDouble 1
33
inline
const
char
*
floatingPointType__
=
"double"
;
34
inline
const
bool
usingDouble__
=
true
;
35
#else
36
#define useDouble 0
37
inline
const
char
*
floatingPointType__
=
"float"
;
38
inline
const
bool
usingDouble__
=
false
;
39
#endif
40
41
42
// scalars
43
#if useDouble
44
using
real
= double;
45
#else
46
using
real
= float;
47
#endif
48
49
using
int8
=
signed
char;
50
51
using
int16
=
short
int;
52
53
using
int32
= int;
54
55
using
int64
=
long
long
int;
56
57
using
uint16
=
unsigned
short
int ;
58
59
using
uint32
=
unsigned
int;
60
61
using
label
= std::size_t;
62
63
using
word
= std::string;
64
65
inline
66
auto
floatingPointDescription
()
67
{
68
return
word
(
"In this build, "
) +
word
(
floatingPointType__
) +
69
word
(
" is used for floating point operations."
);
70
}
71
72
}
// end of pFlow
73
74
75
#endif
pFlow::real
float real
Definition:
builtinTypes.hpp:46
pFlow::uint32
unsigned int uint32
Definition:
builtinTypes.hpp:59
pFlow::word
std::string word
Definition:
builtinTypes.hpp:63
pFlow::int64
long long int int64
Definition:
builtinTypes.hpp:55
pFlow
Definition:
demComponent.hpp:28
pFlow::int16
short int int16
Definition:
builtinTypes.hpp:51
pFlow::uint16
unsigned short int uint16
Definition:
builtinTypes.hpp:57
pFlow::int32
int int32
Definition:
builtinTypes.hpp:53
pFlow::usingDouble__
const bool usingDouble__
Definition:
builtinTypes.hpp:38
pFlow::floatingPointDescription
auto floatingPointDescription()
Definition:
builtinTypes.hpp:66
pFlow::label
std::size_t label
Definition:
builtinTypes.hpp:61
pFlow::int8
signed char int8
Definition:
builtinTypes.hpp:49
pFlow::floatingPointType__
const char * floatingPointType__
Definition:
builtinTypes.hpp:37
src
phasicFlow
types
basicTypes
builtinTypes.hpp
Generated by
1.8.17