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
// scalars
42
#if useDouble
43
using
real
= double;
44
#else
45
using
real
= float;
46
#endif
47
48
using
int8
=
signed
char;
49
50
using
int32
= int;
51
52
using
int64
=
long
long
int;
53
54
using
uint8
=
unsigned
char;
55
56
using
uint32
=
unsigned
int;
57
58
using
uint64
=
unsigned
long
long
int;
59
60
using
id_t
=
uint32
;
61
62
using
size_t
=
std::size_t
;
63
64
using
word
= std::string;
65
66
inline
const
int
numBytesForReal__
=
sizeof
(
real
);
67
68
inline
word
69
floatingPointDescription
()
70
{
71
return
word
(
"In this build, "
) +
word
(
floatingPointType__
) +
72
word
(
" is used for floating point operations."
);
73
}
74
75
}
// end of pFlow
76
77
#endif
pFlow::id_t
uint32 id_t
Definition:
builtinTypes.hpp:60
pFlow::real
float real
Definition:
builtinTypes.hpp:45
pFlow::numBytesForReal__
const int numBytesForReal__
Definition:
builtinTypes.hpp:66
pFlow::uint32
unsigned int uint32
Definition:
builtinTypes.hpp:56
pFlow::word
std::string word
Definition:
builtinTypes.hpp:64
pFlow::int64
long long int int64
Definition:
builtinTypes.hpp:52
pFlow
Definition:
demGeometry.hpp:27
pFlow::int32
int int32
Definition:
builtinTypes.hpp:50
pFlow::usingDouble__
const bool usingDouble__
Definition:
builtinTypes.hpp:38
pFlow::uint64
unsigned long long int uint64
Definition:
builtinTypes.hpp:58
pFlow::int8
signed char int8
Definition:
builtinTypes.hpp:48
pFlow::size_t
std::size_t size_t
Definition:
builtinTypes.hpp:62
pFlow::floatingPointDescription
word floatingPointDescription()
Definition:
builtinTypes.hpp:69
pFlow::uint8
unsigned char uint8
Definition:
builtinTypes.hpp:54
pFlow::floatingPointType__
const char * floatingPointType__
Definition:
builtinTypes.hpp:37
src
phasicFlow
types
basicTypes
builtinTypes.hpp
Generated by
1.8.17