# PhasicFlow: src/phasicFlow/types/basicTypes/numericConstants.hpp Source File
PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.

numericConstants.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 __numericConstants_hpp__
#define __numericConstants_hpp__
#include "builtinTypes.hpp"
#include <limits>
namespace pFlow
{
const inline real Pi = real(3.1415926535897932384626433832);
const inline real smallValue = 1.0e-15;
const inline real verySmallValue = 1.0e-30;
const inline real largeValue = 1.0e15;
const inline real veryLargeValue = 1.0e30;
// - largest negative value
template<typename T>
constexpr T
largestNegative()
{
return std::numeric_limits<T>::lowest();
}
template<typename T>
constexpr T
epsilonValue()
{
return std::numeric_limits<T>::min();
}
// largest positive value
template<typename T>
constexpr T
largestPositive()
{
return std::numeric_limits<T>::max();
}
const inline int32 largestNegInt32 = largestNegative<int32>();
const inline int32 largestPosInt32 = largestPositive<int32>();
const inline int64 largestNegInt64 = largestNegative<int64>();
const inline int64 largestPosInt64 = largestPositive<int64>();
const inline real largestNegREAL = largestNegative<real>();
const inline real largestPosREAL = largestPositive<real>();
const inline real epsilonREAL = epsilonValue<real>();
} // end of pFlow
#endif //__numericConstants_hpp__
pFlow::verySmallValue
const real verySmallValue
Definition: numericConstants.hpp:32
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::largestPosREAL
const real largestPosREAL
Definition: numericConstants.hpp:66
pFlow::smallValue
const real smallValue
Definition: numericConstants.hpp:31
pFlow::algorithms::KOKKOS::max
INLINE_FUNCTION_H Type max(const Type *first, uint32 numElems)
Definition: kokkosAlgorithms.hpp:104
pFlow::algorithms::KOKKOS::min
INLINE_FUNCTION_H Type min(const Type *first, int32 numElems)
Definition: kokkosAlgorithms.hpp:124
pFlow::largestNegInt64
const int64 largestNegInt64
Definition: numericConstants.hpp:62
pFlow::int64
long long int int64
Definition: builtinTypes.hpp:52
pFlow::largestPosInt64
const int64 largestPosInt64
Definition: numericConstants.hpp:63
pFlow
Definition: demGeometry.hpp:27
pFlow::largestNegREAL
const real largestNegREAL
Definition: numericConstants.hpp:65
pFlow::int32
int int32
Definition: builtinTypes.hpp:50
pFlow::largestNegInt32
const int32 largestNegInt32
Definition: numericConstants.hpp:59
pFlow::veryLargeValue
const real veryLargeValue
Definition: numericConstants.hpp:34
pFlow::largestPositive
constexpr T largestPositive()
Definition: numericConstants.hpp:54
pFlow::largestNegative
constexpr T largestNegative()
Definition: numericConstants.hpp:39
pFlow::epsilonREAL
const real epsilonREAL
Definition: numericConstants.hpp:67
pFlow::epsilonValue
constexpr T epsilonValue()
Definition: numericConstants.hpp:46
pFlow::Pi
const real Pi
Definition: numericConstants.hpp:30
pFlow::largestPosInt32
const int32 largestPosInt32
Definition: numericConstants.hpp:60
builtinTypes.hpp
pFlow::largeValue
const real largeValue
Definition: numericConstants.hpp:33