Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Florian Weik
waLBerla
Commits
46d893d5
Commit
46d893d5
authored
Jan 27, 2018
by
Michael Kuron
Browse files
Remove boost random, math::special_functions
Also remove some unneeded boost includes
parent
fb43f673
Changes
42
Hide whitespace changes
Inline
Side-by-side
apps/benchmarks/MeshDistance/MeshDistanceBenchmark.cpp
View file @
46d893d5
...
...
@@ -34,7 +34,7 @@
#include
"mesh/distance_octree/DistanceOctree.h"
#include
"mesh/MeshIO.h"
#include
<
boost/
random
.hpp
>
#include
<random>
#include
<algorithm>
#include
<vector>
...
...
@@ -64,7 +64,7 @@ void runBenchmark( const std::string & meshFile, const uint_t numPoints, const u
timer
.
end
();
WALBERLA_LOG_INFO
(
"Mesh preparation took "
<<
timer
.
last
()
<<
"s"
);
boost
::
random
::
mt19937
rng
;
std
::
mt19937
rng
;
std
::
vector
<
typename
MeshType
::
Point
>
points
(
numPoints
);
for
(
auto
it
=
points
.
begin
();
it
!=
points
.
end
();
++
it
)
...
...
apps/benchmarks/MotionSingleHeavySphere/MotionSingleHeavySphere.cpp
View file @
46d893d5
...
...
@@ -831,7 +831,7 @@ int main( int argc, char **argv )
else
if
(
int
(
Galileo
)
==
250
)
{
// add random perturbance for chaotic regime
walberla
::
math
::
seedRandomGenerator
(
boo
st
::
mt19937
::
result_type
(
std
::
time
(
0
))
);
walberla
::
math
::
seedRandomGenerator
(
st
d
::
mt19937
::
result_type
(
std
::
time
(
0
))
);
xParticle
=
real_c
(
xlength
)
*
real_t
(
0.5
)
+
walberla
::
math
::
realRandom
(
real_t
(
-
0.5
),
real_t
(
0.5
)
);
yParticle
=
real_c
(
ylength
)
*
real_t
(
0.5
)
+
walberla
::
math
::
realRandom
(
real_t
(
-
0.5
),
real_t
(
0.5
)
);
...
...
src/core/debug/CheckFunctions.h
View file @
46d893d5
...
...
@@ -28,7 +28,6 @@
#include
"core/math/Utility.h"
#include
"core/VectorTrait.h"
//#include <boost/math/special_functions/next.hpp>
#include
<boost/type_traits/is_arithmetic.hpp>
#include
<boost/type_traits/is_floating_point.hpp>
#include
<boost/type_traits/has_left_shift.hpp>
...
...
src/core/math/DistributedSample.cpp
View file @
46d893d5
...
...
@@ -26,7 +26,6 @@
#include
<boost/algorithm/string/replace.hpp>
#include
<boost/lexical_cast.hpp>
#include
<boost/math/special_functions/pow.hpp>
...
...
@@ -64,7 +63,10 @@ void DistributedSample::mpiAllGather()
variance_
=
real_t
(
0
);
for
(
auto
it
=
data_
.
begin
();
it
!=
data_
.
end
();
++
it
)
variance_
+=
boost
::
math
::
pow
<
2
>
(
*
it
-
mean_
);
{
real_t
val
=
*
it
-
mean_
;
variance_
+=
val
*
val
;
}
WALBERLA_MPI_SECTION
()
{
...
...
@@ -120,7 +122,10 @@ void DistributedSample::mpiGather( int rank )
variance_
=
real_t
(
0
);
for
(
auto
it
=
data_
.
begin
();
it
!=
data_
.
end
();
++
it
)
variance_
+=
boost
::
math
::
pow
<
2
>
(
*
it
-
mean_
);
{
real_t
val
=
*
it
-
mean_
;
variance_
+=
val
*
val
;
}
WALBERLA_MPI_SECTION
()
{
...
...
src/core/math/FPClassify.h
View file @
46d893d5
...
...
@@ -22,7 +22,7 @@
#pragma once
#include
<
boost/math/special_functions/fpclassify.hpp
>
#include
<
cmath
>
namespace
walberla
{
...
...
@@ -39,7 +39,7 @@ namespace math {
template
<
typename
T
>
inline
bool
isnan
(
T
x
)
{
return
(
boost
::
math
::
isnan
)(
x
);
return
(
std
::
isnan
)(
x
);
}
...
...
@@ -53,7 +53,7 @@ inline bool isnan(T x)
template
<
typename
T
>
inline
bool
isinf
(
T
x
)
{
return
(
boost
::
math
::
isinf
)(
x
);
return
(
std
::
isinf
)(
x
);
}
...
...
@@ -67,7 +67,7 @@ inline bool isinf(T x)
template
<
typename
T
>
bool
finite
(
T
x
)
{
return
(
boost
::
math
::
isfinite
)(
x
);
return
(
std
::
isfinite
)(
x
);
}
...
...
src/core/math/GenericAABB.h
View file @
46d893d5
...
...
@@ -30,7 +30,7 @@
#include
<boost/array.hpp>
#include
<boost/type_traits/is_floating_point.hpp>
#include
<
boost/random/uniform_real_distribution.hpp
>
#include
<
random
>
namespace
walberla
{
...
...
src/core/math/GenericAABB.impl.h
View file @
46d893d5
...
...
@@ -1717,7 +1717,7 @@ void GenericAABB< T >::intersect( const GenericAABB & other )
* The point is in ( [ xMin(), xMax() ), [ yMin(), yMax() ), [ zMin(), zMax() ) )
*
* \pre !empty()
* \param engine An Uniform Random Number Generator (e.g.
boost::random
::mt19937)
* \param engine An Uniform Random Number Generator (e.g.
std
::mt19937)
* \returns Random point within *this
*/
template
<
typename
T
>
...
...
@@ -1725,9 +1725,9 @@ template< typename Engine >
typename
GenericAABB
<
T
>::
vector_type
GenericAABB
<
T
>::
randomPoint
(
Engine
&
engine
)
const
{
WALBERLA_ASSERT
(
!
empty
()
);
boost
::
random
::
uniform_real_distribution
<
T
>
randX
(
xMin
(),
xMax
()
);
boost
::
random
::
uniform_real_distribution
<
T
>
randY
(
yMin
(),
yMax
()
);
boost
::
random
::
uniform_real_distribution
<
T
>
randZ
(
zMin
(),
zMax
()
);
std
::
uniform_real_distribution
<
T
>
randX
(
xMin
(),
xMax
()
);
std
::
uniform_real_distribution
<
T
>
randY
(
yMin
(),
yMax
()
);
std
::
uniform_real_distribution
<
T
>
randZ
(
zMin
(),
zMax
()
);
return
vector_type
(
randX
(
engine
),
randY
(
engine
),
randZ
(
engine
)
);
}
...
...
src/core/math/Random.cpp
View file @
46d893d5
...
...
@@ -29,9 +29,9 @@ namespace math {
namespace
internal
{
static
boo
st
::
mt19937
generator
;
// static
boost::random
::mt19937_64 generator;
static
st
d
::
mt19937
generator
;
// static
std
::mt19937_64 generator;
boo
st
::
mt19937
&
getGenerator
()
//
boost::random
::mt19937_64
st
d
::
mt19937
&
getGenerator
()
//
std
::mt19937_64
{
return
generator
;
}
...
...
@@ -40,7 +40,7 @@ boost::mt19937 & getGenerator() // boost::random::mt19937_64
void
seedRandomGenerator
(
const
boo
st
::
mt19937
::
result_type
&
seed
)
void
seedRandomGenerator
(
const
st
d
::
mt19937
::
result_type
&
seed
)
{
#ifdef _OPENMP
#pragma omp critical (random)
...
...
src/core/math/Random.h
View file @
46d893d5
...
...
@@ -24,9 +24,7 @@
#include
"core/DataTypes.h"
#include
"core/debug/Debug.h"
#include
<boost/random/mersenne_twister.hpp>
#include
<boost/random/uniform_int.hpp>
// #include <boost/random/uniform_int_distribution.hpp>
#include
<boost/random/uniform_real.hpp>
// #include <boost/random/uniform_real_distribution.hpp>
#include
<random>
#include
<limits>
...
...
@@ -36,12 +34,12 @@ namespace math {
namespace
internal
{
boo
st
::
mt19937
&
getGenerator
();
//
boost::random
::mt19937_64
st
d
::
mt19937
&
getGenerator
();
//
std
::mt19937_64
}
void
seedRandomGenerator
(
const
boo
st
::
mt19937
::
result_type
&
seed
);
//
boost::random
::mt19937_64
void
seedRandomGenerator
(
const
st
d
::
mt19937
::
result_type
&
seed
);
//
std
::mt19937_64
...
...
@@ -52,12 +50,13 @@ void seedRandomGenerator( const boost::mt19937::result_type & seed ); // boost::
//**********************************************************************************************************************
template
<
typename
INT
>
INT
intRandom
(
const
INT
min
=
std
::
numeric_limits
<
INT
>::
min
(),
const
INT
max
=
std
::
numeric_limits
<
INT
>::
max
(),
boo
st
::
mt19937
&
generator
=
internal
::
getGenerator
()
)
st
d
::
mt19937
&
generator
=
internal
::
getGenerator
()
)
{
static_assert_int_t
<
INT
>
();
static_assert
(
sizeof
(
INT
)
>
sizeof
(
char
),
"cannot use char"
);
WALBERLA_ASSERT_LESS_EQUAL
(
min
,
max
);
boost
::
uniform_int
<
INT
>
distribution
(
min
,
max
);
// boost::random
::uniform_int_distribution< INT > distribution;
std
::
uniform_int_distribution
<
INT
>
distribution
(
min
,
max
)
;
INT
value
;
#ifdef _OPENMP
...
...
@@ -68,19 +67,70 @@ INT intRandom( const INT min = std::numeric_limits<INT>::min(), const INT max =
return
value
;
}
template
<
>
inline
char
intRandom
<
char
>
(
const
char
min
,
const
char
max
,
std
::
mt19937
&
generator
)
{
static_assert_int_t
<
char
>
();
WALBERLA_ASSERT_LESS_EQUAL
(
min
,
max
);
std
::
uniform_int_distribution
<
int16_t
>
distribution
(
min
,
max
);
char
value
;
#ifdef _OPENMP
#pragma omp critical (random)
#endif
{
value
=
static_cast
<
char
>
(
distribution
(
generator
)
);
}
return
value
;
}
template
<
>
inline
unsigned
char
intRandom
<
unsigned
char
>
(
const
unsigned
char
min
,
const
unsigned
char
max
,
std
::
mt19937
&
generator
)
{
static_assert_int_t
<
unsigned
char
>
();
WALBERLA_ASSERT_LESS_EQUAL
(
min
,
max
);
std
::
uniform_int_distribution
<
int16_t
>
distribution
(
min
,
max
);
unsigned
char
value
;
#ifdef _OPENMP
#pragma omp critical (random)
#endif
{
value
=
static_cast
<
unsigned
char
>
(
distribution
(
generator
)
);
}
return
value
;
}
template
<
>
inline
signed
char
intRandom
<
signed
char
>
(
const
signed
char
min
,
const
signed
char
max
,
std
::
mt19937
&
generator
)
{
static_assert_int_t
<
signed
char
>
();
WALBERLA_ASSERT_LESS_EQUAL
(
min
,
max
);
std
::
uniform_int_distribution
<
int16_t
>
distribution
(
min
,
max
);
signed
char
value
;
#ifdef _OPENMP
#pragma omp critical (random)
#endif
{
value
=
static_cast
<
signed
char
>
(
distribution
(
generator
)
);
}
return
value
;
}
template
<
typename
INT
>
class
IntRandom
{
public:
IntRandom
(
const
boo
st
::
mt19937
::
result_type
&
seed
=
boo
st
::
mt19937
::
result_type
()
)
{
generator_
.
seed
(
seed
);
}
IntRandom
(
const
st
d
::
mt19937
::
result_type
&
seed
=
st
d
::
mt19937
::
result_type
()
)
{
generator_
.
seed
(
seed
);
}
INT
operator
()(
const
INT
min
=
std
::
numeric_limits
<
INT
>::
min
(),
const
INT
max
=
std
::
numeric_limits
<
INT
>::
max
()
)
{
return
intRandom
(
min
,
max
,
generator_
);
}
private:
boo
st
::
mt19937
generator_
;
st
d
::
mt19937
generator_
;
};
...
...
@@ -91,12 +141,12 @@ private:
*/
//**********************************************************************************************************************
template
<
typename
REAL
>
REAL
realRandom
(
const
REAL
min
=
REAL
(
0
),
const
REAL
max
=
REAL
(
1
),
boo
st
::
mt19937
&
generator
=
internal
::
getGenerator
()
)
REAL
realRandom
(
const
REAL
min
=
REAL
(
0
),
const
REAL
max
=
REAL
(
1
),
st
d
::
mt19937
&
generator
=
internal
::
getGenerator
()
)
{
static_assert
(
std
::
numeric_limits
<
REAL
>::
is_specialized
&&
!
std
::
numeric_limits
<
REAL
>::
is_integer
,
"Floating point type required/expected!"
);
WALBERLA_ASSERT_LESS
(
min
,
max
);
boost
::
uniform_real
<
REAL
>
distribution
(
min
,
max
);
// boo
st::uniform_real_distribution< REAL > distribution( min, max );
st
d
::
uniform_real_distribution
<
REAL
>
distribution
(
min
,
max
);
REAL
value
;
#ifdef _OPENMP
...
...
@@ -113,13 +163,13 @@ template< typename REAL >
class
RealRandom
{
public:
RealRandom
(
const
boo
st
::
mt19937
::
result_type
&
seed
=
boo
st
::
mt19937
::
result_type
()
)
{
generator_
.
seed
(
seed
);
}
RealRandom
(
const
st
d
::
mt19937
::
result_type
&
seed
=
st
d
::
mt19937
::
result_type
()
)
{
generator_
.
seed
(
seed
);
}
REAL
operator
()(
const
REAL
min
=
REAL
(
0
),
const
REAL
max
=
REAL
(
1
)
)
{
return
realRandom
(
min
,
max
,
generator_
);
}
private:
boo
st
::
mt19937
generator_
;
st
d
::
mt19937
generator_
;
};
...
...
@@ -133,10 +183,10 @@ inline bool boolRandom() { ///< Randomly returns 'true' or 'false'
class
BoolRandom
{
public:
BoolRandom
(
const
boo
st
::
mt19937
::
result_type
&
seed
=
boo
st
::
mt19937
::
result_type
()
)
{
generator_
.
seed
(
seed
);
}
BoolRandom
(
const
st
d
::
mt19937
::
result_type
&
seed
=
st
d
::
mt19937
::
result_type
()
)
{
generator_
.
seed
(
seed
);
}
bool
operator
()()
{
return
boolRandom
();
}
private:
boo
st
::
mt19937
generator_
;
st
d
::
mt19937
generator_
;
};
...
...
src/core/math/Sample.cpp
View file @
46d893d5
...
...
@@ -26,7 +26,6 @@
#include
<boost/algorithm/string/replace.hpp>
#include
<boost/lexical_cast.hpp>
#include
<boost/math/special_functions/pow.hpp>
#include
<functional>
#include
<iterator>
...
...
@@ -128,7 +127,10 @@ real_t Sample::variance( real_t theMean ) const
KahanAccumulator
<
real_t
>
acc
;
for
(
auto
it
=
begin
();
it
!=
end
();
++
it
)
acc
+=
boost
::
math
::
pow
<
2
>
(
*
it
-
theMean
);
{
real_t
val
=
*
it
-
theMean
;
acc
+=
val
*
val
;
}
return
acc
.
get
()
/
real_c
(
size
());
}
...
...
src/core/math/equation_system/Equation.cpp
View file @
46d893d5
...
...
@@ -23,7 +23,8 @@
#include
"Operator.h"
#include
"Variable.h"
#include
<boost/math/special_functions/fpclassify.hpp>
#include
<cmath>
#include
<algorithm>
namespace
walberla
{
...
...
@@ -128,10 +129,10 @@ namespace math {
double
left
=
root_
->
left_
->
compute
();
double
right
=
root_
->
right_
->
compute
();
if
(
boost
::
math
::
isnan
(
left
)
&&
boost
::
math
::
isnan
(
right
)
){
if
(
std
::
isnan
(
left
)
&&
std
::
isnan
(
right
)
){
//WALBERLA_LOG_WARNING( "WARNING: Both values are NAN -> return true" );
return
true
;
}
else
if
(
boost
::
math
::
isinf
(
left
)
&&
boost
::
math
::
isinf
(
right
)
){
}
else
if
(
std
::
isinf
(
left
)
&&
std
::
isinf
(
right
)
){
//WALBERLA_LOG_WARNING( "WARNING: Both values are INF -> return true" );
return
true
;
}
...
...
src/core/math/equation_system/Variable.cpp
View file @
46d893d5
...
...
@@ -21,7 +21,7 @@
#include
"Variable.h"
#include
<
boost/math/special_functions/fpclassify.hpp
>
#include
<
cmath
>
#include
<sstream>
...
...
@@ -36,7 +36,7 @@ namespace math {
void
Var
::
setValue
(
const
double
value
){
value_
=
value
;
valid_
=
!
boost
::
math
::
isnan
(
value
);
valid_
=
!
std
::
isnan
(
value
);
}
bool
Var
::
operator
==
(
const
Var
&
var
)
const
{
...
...
src/domain_decomposition/IBlock.h
View file @
46d893d5
...
...
@@ -30,7 +30,6 @@
#include
"core/math/AABB.h"
#include
"core/uid/SUID.h"
#include
<boost/cast.hpp>
#include
<typeinfo>
#include
<vector>
...
...
src/gather/CurveGatherPackInfo.impl.h
View file @
46d893d5
...
...
@@ -20,7 +20,6 @@
//
//======================================================================================================================
#include
"boost/lambda/bind.hpp"
#include
"core/debug/Debug.h"
#include
"core/logging/Logging.h"
#include
"core/math/Parser.h"
...
...
tests/blockforest/BlockDataIOTest.cpp
View file @
46d893d5
...
...
@@ -91,7 +91,7 @@ int main( int argc, char* argv[] )
auto
dataHandling
=
make_shared
<
field
::
DefaultBlockDataHandling
<
FieldType
>
>
(
sbf
,
uint_t
(
3
),
0.0
,
field
::
zyxf
);
auto
originalFieldId
=
sbf
->
addBlockData
(
dataHandling
,
"OriginalField"
,
None
,
Empty
);
math
::
seedRandomGenerator
(
numeric_cast
<
boo
st
::
mt19937
::
result_type
>
(
MPIManager
::
instance
()
->
rank
()
)
);
math
::
seedRandomGenerator
(
numeric_cast
<
st
d
::
mt19937
::
result_type
>
(
MPIManager
::
instance
()
->
rank
()
)
);
for
(
auto
it
=
sbf
->
begin
(
None
,
Empty
);
it
!=
sbf
->
end
();
++
it
)
{
...
...
tests/blockforest/StructuredBlockForestTest.cpp
View file @
46d893d5
...
...
@@ -25,7 +25,7 @@
#include
"core/debug/TestSubsystem.h"
#include
"core/mpi/Environment.h"
#include
<
boost/random/mersenne_twister.hpp
>
#include
<
random
>
namespace
walberla
{
namespace
blockforest
{
...
...
@@ -418,7 +418,7 @@ static void test() {
bb
=
*
(
block
->
getData
<
CellInterval
>
(
bid
)
);
WALBERLA_CHECK_EQUAL
(
bb
,
CellInterval
(
Cell
(
150
,
180
,
210
),
Cell
(
199
,
239
,
279
))
);
boost
::
random
::
mt19937
eng
(
23
);
std
::
mt19937
eng
(
23
);
for
(
int
i
=
0
;
i
<
23
;
++
i
)
{
const
Vector3
<
real_t
>
globalPoint
=
forest
.
getDomain
().
getScaled
(
real_t
(
1.25
)
).
randomPoint
(
eng
);
...
...
tests/core/cell/CellIntervalTest.cpp
View file @
46d893d5
...
...
@@ -23,19 +23,20 @@
#include
"core/cell/CellInterval.h"
#include
"core/debug/TestSubsystem.h"
#include
<boost/random/mersenne_twister.hpp>
#include
<boost/random/uniform_int.hpp>
#include
<random>
#include
<iostream>
#include
<iterator>
using
namespace
walberla
;
typedef
std
::
mersenne_twister_engine
<
walberla
::
uint32_t
,
32
,
351
,
175
,
19
,
0xccab8ee7
,
11
,
0xffffffff
,
7
,
0x31b6ab00
,
15
,
0xffe50000
,
17
,
0xa37d3c92
>
mt11213b
;
CellInterval
makeRandomInterval
(
uint_t
maxSize
)
{
static
boost
::
mt11213b
rng
;
boo
st
::
uniform_int
<
cell_idx_t
>
dist
(
std
::
numeric_limits
<
cell_idx_t
>::
min
(),
std
::
numeric_limits
<
cell_idx_t
>::
max
()
-
cell_idx_c
(
maxSize
)
);
boo
st
::
uniform_int
<
uint_t
>
dist2
(
uint_t
(
0
),
maxSize
);
static
mt11213b
rng
;
st
d
::
uniform_int
_distribution
<
cell_idx_t
>
dist
(
std
::
numeric_limits
<
cell_idx_t
>::
min
(),
std
::
numeric_limits
<
cell_idx_t
>::
max
()
-
cell_idx_c
(
maxSize
)
);
st
d
::
uniform_int
_distribution
<
uint_t
>
dist2
(
uint_t
(
0
),
maxSize
);
cell_idx_t
xMin
=
dist
(
rng
);
cell_idx_t
yMin
=
dist
(
rng
);
...
...
@@ -50,10 +51,10 @@ CellInterval makeRandomInterval(uint_t maxSize)
CellInterval
makeRandomEmptyInterval
(
uint_t
maxSize
)
{
static
boost
::
mt11213b
rng
;
boo
st
::
uniform_int
<
cell_idx_t
>
dist
(
std
::
numeric_limits
<
cell_idx_t
>::
min
()
+
cell_idx_c
(
maxSize
),
std
::
numeric_limits
<
cell_idx_t
>::
max
()
-
cell_idx_c
(
maxSize
)
);
boo
st
::
uniform_int
<
uint_t
>
dist2
(
uint_t
(
1
),
maxSize
);
boo
st
::
uniform_int
<
uint_t
>
dist3
(
uint_t
(
0
),
uint_t
(
1
)
);
static
mt11213b
rng
;
st
d
::
uniform_int
_distribution
<
cell_idx_t
>
dist
(
std
::
numeric_limits
<
cell_idx_t
>::
min
()
+
cell_idx_c
(
maxSize
),
std
::
numeric_limits
<
cell_idx_t
>::
max
()
-
cell_idx_c
(
maxSize
)
);
st
d
::
uniform_int
_distribution
<
uint_t
>
dist2
(
uint_t
(
1
),
maxSize
);
st
d
::
uniform_int
_distribution
<
uint_t
>
dist3
(
uint_t
(
0
),
uint_t
(
1
)
);
cell_idx_t
xMin
=
dist
(
rng
);
cell_idx_t
yMin
=
dist
(
rng
);
...
...
@@ -81,8 +82,8 @@ CellInterval makeRandomEmptyInterval(uint_t maxSize)
Cell
makeRandomCell
()
{
static
boost
::
mt11213b
rng
;
boo
st
::
uniform_int
<
cell_idx_t
>
dist
(
std
::
numeric_limits
<
cell_idx_t
>::
min
(),
std
::
numeric_limits
<
cell_idx_t
>::
max
()
);
static
mt11213b
rng
;
st
d
::
uniform_int
_distribution
<
cell_idx_t
>
dist
(
std
::
numeric_limits
<
cell_idx_t
>::
min
(),
std
::
numeric_limits
<
cell_idx_t
>::
max
()
);
return
Cell
(
dist
(
rng
),
dist
(
rng
),
dist
(
rng
)
);
}
...
...
tests/core/cell/CellTest.cpp
View file @
46d893d5
...
...
@@ -23,8 +23,7 @@
#include
"core/cell/Cell.h"
#include
"core/debug/TestSubsystem.h"
#include
<boost/random/mersenne_twister.hpp>
#include
<boost/random/uniform_int.hpp>
#include
<random>
using
namespace
walberla
;
...
...
@@ -135,8 +134,9 @@ int main( int /*argc*/, char** /*argv*/ ) {
debug
::
enterTestMode
();
boost
::
mt11213b
rng
;
boost
::
uniform_int
<
cell_idx_t
>
dist
(
std
::
numeric_limits
<
cell_idx_t
>::
min
(),
std
::
numeric_limits
<
cell_idx_t
>::
max
()
);
typedef
std
::
mersenne_twister_engine
<
walberla
::
uint32_t
,
32
,
351
,
175
,
19
,
0xccab8ee7
,
11
,
0xffffffff
,
7
,
0x31b6ab00
,
15
,
0xffe50000
,
17
,
0xa37d3c92
>
mt11213b
;
mt11213b
rng
;
std
::
uniform_int_distribution
<
cell_idx_t
>
dist
(
std
::
numeric_limits
<
cell_idx_t
>::
min
(),
std
::
numeric_limits
<
cell_idx_t
>::
max
()
);
for
(
int
i
=
0
;
i
<
100000
;
++
i
)
{
...
...
tests/core/load_balancing/MetisTest.cpp
View file @
46d893d5
...
...
@@ -40,7 +40,6 @@
#include
"vtk/BlockCellDataWriter.h"
#include
<boost/lexical_cast.hpp>
#include
<boost/random.hpp>
int
main
(
int
argc
,
char
*
argv
[]
)
{
...
...
tests/core/load_balancing/ParMetisTest.cpp
View file @
46d893d5
...
...
@@ -42,7 +42,6 @@
#include
"vtk/BlockCellDataWriter.h"
#include
<boost/lexical_cast.hpp>
#include
<boost/random.hpp>
int
main
(
int
argc
,
char
*
argv
[]
)
{
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment