# PhasicFlow: src/phasicFlow/types/basicTypes/builtinTypes.hpp Source File

builtinTypes.hpp
Go to the documentation of this file.
/*------------------------------- phasicFlow --------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
Licence:
This file is part of phasicFlow code. It is a free software for simulating
granular and multiphase flows. You can redistribute it and/or modify it under
the terms of GNU General Public License v3 or any other later versions.
phasicFlow is distributed to help others in their research in the field of
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
#ifndef __builtinTypes_hpp__
#define __builtinTypes_hpp__
#include <string>
#include "phasicFlowConfig.H"
namespace pFlow
{
#ifdef pFlow_Build_Double
#define useDouble 1
inline const char* floatingPointType__ = "double";
inline const bool usingDouble__ = true;
#else
#define useDouble 0
inline const char* floatingPointType__ = "float";
inline const bool usingDouble__ = false;
#endif
// scalars
#if useDouble
using real = double;
#else
using real = float;
#endif
using int8 = signed char;
using int16 = short int;
using int32 = int;
using int64 = long long int;
using uint16 = unsigned short int ;
using uint32 = unsigned int;
using label = std::size_t;
using word = std::string;
inline
auto floatingPointDescription()
{
return word("In this build, ") + word(floatingPointType__) +
word(" is used for floating point operations.");
}
} // end of pFlow
#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