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
waLBerla
waLBerla
Commits
c0ac624e
Commit
c0ac624e
authored
Jan 25, 2018
by
Michael Kuron
Browse files
Remove most Boost from core/DataTypes.h
parent
7e78abc8
Changes
38
Hide whitespace changes
Inline
Side-by-side
src/blockforest/BlockDataHandling.h
View file @
c0ac624e
...
...
@@ -214,7 +214,7 @@ public:
template
<
typename
T
>
BlockDataHandlingAdder
&
operator
<<
(
const
domain_decomposition
::
BlockDataCreator
<
T
>
&
bdc
)
{
auto
downcast
=
boost
::
dynamic_pointer_cast
<
blockforest
::
BlockDataHandling
<
T
>
>
(
bdc
.
dataHandling_
);
auto
downcast
=
dynamic_pointer_cast
<
blockforest
::
BlockDataHandling
<
T
>
>
(
bdc
.
dataHandling_
);
if
(
downcast
)
{
dataHandling_
.
add
(
make_shared
<
blockforest
::
internal
::
BlockDataHandlingHelper
<
T
>
>
(
downcast
),
bdc
.
requiredSelectors_
,
...
...
src/blockforest/BlockForest.cpp
View file @
c0ac624e
...
...
@@ -2277,7 +2277,7 @@ void BlockForest::update( PhantomBlockForest & phantomForest )
auto
blockDataHandlingWrapper
=
dataItem
->
getDataHandling
(
block
,
targetState
[
0
]
);
if
(
blockDataHandlingWrapper
)
{
auto
downcastBlockDataHandlingWrapper
=
boost
::
dynamic_pointer_cast
<
blockforest
::
internal
::
BlockDataHandlingWrapper
>
(
blockDataHandlingWrapper
);
auto
downcastBlockDataHandlingWrapper
=
dynamic_pointer_cast
<
blockforest
::
internal
::
BlockDataHandlingWrapper
>
(
blockDataHandlingWrapper
);
if
(
!
downcastBlockDataHandlingWrapper
)
{
WALBERLA_ABORT
(
"Dynamic data structure refresh failed!
\n
"
...
...
@@ -2305,7 +2305,7 @@ void BlockForest::update( PhantomBlockForest & phantomForest )
auto
blockDataHandlingWrapper
=
dataItem
->
getDataHandling
(
block
,
targetState
[
c
]
);
if
(
blockDataHandlingWrapper
)
{
auto
downcastBlockDataHandlingWrapper
=
boost
::
dynamic_pointer_cast
<
blockforest
::
internal
::
BlockDataHandlingWrapper
>
(
blockDataHandlingWrapper
);
auto
downcastBlockDataHandlingWrapper
=
dynamic_pointer_cast
<
blockforest
::
internal
::
BlockDataHandlingWrapper
>
(
blockDataHandlingWrapper
);
if
(
!
downcastBlockDataHandlingWrapper
)
{
WALBERLA_ABORT
(
"Dynamic data structure refresh failed!
\n
"
...
...
@@ -2651,7 +2651,7 @@ void BlockForest::update( PhantomBlockForest & phantomForest )
auto
blockDataHandlingWrapper
=
dataItem
->
getDataHandling
(
block
);
if
(
blockDataHandlingWrapper
)
{
auto
downcastBlockDataHandlingWrapper
=
boost
::
dynamic_pointer_cast
<
blockforest
::
internal
::
BlockDataHandlingWrapper
>
(
blockDataHandlingWrapper
);
auto
downcastBlockDataHandlingWrapper
=
dynamic_pointer_cast
<
blockforest
::
internal
::
BlockDataHandlingWrapper
>
(
blockDataHandlingWrapper
);
if
(
!
downcastBlockDataHandlingWrapper
)
{
WALBERLA_ABORT
(
"Dynamic data structure refresh failed!
\n
"
...
...
@@ -2671,7 +2671,7 @@ void BlockForest::update( PhantomBlockForest & phantomForest )
auto
blockDataHandlingWrapper
=
dataItem
->
getDataHandling
(
block
,
buffers
[
0
].
first
);
if
(
blockDataHandlingWrapper
)
{
auto
downcastBlockDataHandlingWrapper
=
boost
::
dynamic_pointer_cast
<
blockforest
::
internal
::
BlockDataHandlingWrapper
>
(
blockDataHandlingWrapper
);
auto
downcastBlockDataHandlingWrapper
=
dynamic_pointer_cast
<
blockforest
::
internal
::
BlockDataHandlingWrapper
>
(
blockDataHandlingWrapper
);
if
(
!
downcastBlockDataHandlingWrapper
)
{
WALBERLA_ABORT
(
"Dynamic data structure refresh failed!
\n
"
...
...
@@ -2699,7 +2699,7 @@ void BlockForest::update( PhantomBlockForest & phantomForest )
auto
blockDataHandlingWrapper
=
dataItem
->
getDataHandling
(
block
);
if
(
blockDataHandlingWrapper
)
{
auto
downcastBlockDataHandlingWrapper
=
boost
::
dynamic_pointer_cast
<
blockforest
::
internal
::
BlockDataHandlingWrapper
>
(
blockDataHandlingWrapper
);
auto
downcastBlockDataHandlingWrapper
=
dynamic_pointer_cast
<
blockforest
::
internal
::
BlockDataHandlingWrapper
>
(
blockDataHandlingWrapper
);
if
(
!
downcastBlockDataHandlingWrapper
)
{
WALBERLA_ABORT
(
"Dynamic data structure refresh failed!
\n
"
...
...
@@ -2720,7 +2720,7 @@ void BlockForest::update( PhantomBlockForest & phantomForest )
auto
blockDataHandlingWrapper
=
dataItem
->
getDataHandling
(
block
,
buffers
[
c
].
first
);
if
(
blockDataHandlingWrapper
)
{
auto
downcastBlockDataHandlingWrapper
=
boost
::
dynamic_pointer_cast
<
blockforest
::
internal
::
BlockDataHandlingWrapper
>
(
blockDataHandlingWrapper
);
auto
downcastBlockDataHandlingWrapper
=
dynamic_pointer_cast
<
blockforest
::
internal
::
BlockDataHandlingWrapper
>
(
blockDataHandlingWrapper
);
if
(
!
downcastBlockDataHandlingWrapper
)
{
WALBERLA_ABORT
(
"Dynamic data structure refresh failed!
\n
"
...
...
src/blockforest/BlockForest.h
View file @
c0ac624e
...
...
@@ -856,7 +856,7 @@ inline BlockDataID BlockForest::addBlockData( const shared_ptr< T > & dataHandli
{
//static_assert( boost::is_base_of< BlockDataHandling<typename T::value_type>, T >::value );
auto
downcast
=
boost
::
dynamic_pointer_cast
<
blockforest
::
BlockDataHandling
<
typename
T
::
value_type
>
>
(
dataHandling
);
auto
downcast
=
dynamic_pointer_cast
<
blockforest
::
BlockDataHandling
<
typename
T
::
value_type
>
>
(
dataHandling
);
if
(
downcast
)
{
...
...
@@ -880,7 +880,7 @@ template< typename T >
inline
BlockDataID
BlockForest
::
loadBlockData
(
const
std
::
string
&
file
,
const
shared_ptr
<
T
>
&
dataHandling
,
const
std
::
string
&
identifier
,
const
Set
<
SUID
>
&
requiredSelectors
,
const
Set
<
SUID
>
&
incompatibleSelectors
)
{
auto
downcast
=
boost
::
dynamic_pointer_cast
<
blockforest
::
BlockDataHandling
<
typename
T
::
value_type
>
>
(
dataHandling
);
auto
downcast
=
dynamic_pointer_cast
<
blockforest
::
BlockDataHandling
<
typename
T
::
value_type
>
>
(
dataHandling
);
if
(
downcast
)
{
...
...
src/blockforest/BlockID.h
View file @
c0ac624e
...
...
@@ -93,8 +93,8 @@ private:
static
const
uint_t
SHIFT
=
UINT_BITS
-
3
;
BOOST
_STATIC_ASSERT
(
UINT_BITS
>
31
);
BOOST
_STATIC_ASSERT
(
!
(
UINT_BITS
&
(
UINT_BITS
-
1
))
);
// power of two
WALBERLA
_STATIC_ASSERT
(
UINT_BITS
>
31
);
WALBERLA
_STATIC_ASSERT
(
!
(
UINT_BITS
&
(
UINT_BITS
-
1
))
);
// power of two
};
// class BlockID
...
...
src/blockforest/Types.h
View file @
c0ac624e
...
...
@@ -23,7 +23,6 @@
#include
"core/DataTypes.h"
#include
<boost/static_assert.hpp>
#include
<limits>
...
...
@@ -37,8 +36,8 @@ namespace blockforest {
typedef
real_t
workload_t
;
typedef
real_t
memory_t
;
BOOST
_STATIC_ASSERT
(
sizeof
(
workload_t
)
==
4
||
sizeof
(
workload_t
)
==
8
);
BOOST
_STATIC_ASSERT
(
sizeof
(
memory_t
)
==
4
||
sizeof
(
memory_t
)
==
8
);
WALBERLA
_STATIC_ASSERT
(
sizeof
(
workload_t
)
==
4
||
sizeof
(
workload_t
)
==
8
);
WALBERLA
_STATIC_ASSERT
(
sizeof
(
memory_t
)
==
4
||
sizeof
(
memory_t
)
==
8
);
template
<
typename
T
>
inline
workload_t
workload_c
(
T
t
)
{
return
numeric_cast
<
workload_t
>
(
t
);
}
///< cast to type workload_t using "workload_c(x)"
template
<
typename
T
>
inline
memory_t
memory_c
(
T
t
)
{
return
numeric_cast
<
memory_t
>
(
t
);
}
///< cast to type memory_t using "memory_c(x)"
...
...
src/core/DataTypes.h
View file @
c0ac624e
...
...
@@ -23,13 +23,10 @@
#include
"waLBerlaDefinitions.h"
#include
<boost/cstdint.hpp>
#include
<boost/make_shared.hpp>
#include
<cstdint>
#include
<boost/numeric/conversion/cast.hpp>
#include
<boost/shared_ptr.hpp>
#include
<boost/weak_ptr.hpp>
#include
<boost/static_assert.hpp>
#include
"boost/type_traits/integral_constant.hpp"
#include
<memory>
#include
<type_traits>
#include
<boost/units/detail/utility.hpp>
#include
<cmath>
...
...
@@ -39,17 +36,19 @@
namespace
walberla
{
#define WALBERLA_STATIC_ASSERT(x) static_assert(x, "Assertion failed")
template
<
typename
>
struct
never_true
:
boost
::
false_type
{};
template
<
typename
>
struct
never_true
:
std
::
false_type
{};
// shared ptr
using
boo
st
::
shared_ptr
;
using
boo
st
::
weak_ptr
;
using
boo
st
::
make_shared
;
using
boo
st
::
dynamic_pointer_cast
;
using
st
d
::
shared_ptr
;
using
st
d
::
weak_ptr
;
using
st
d
::
make_shared
;
using
st
d
::
dynamic_pointer_cast
;
// functions, use this when "function" namespace is no longer needed
//using std::function;
...
...
@@ -69,10 +68,10 @@ inline S numeric_cast( T t ) {
// fixed size signed integral types
typedef
boo
st
::
int8_t
int8_t
;
///< 8 bit signed integer
typedef
boo
st
::
int16_t
int16_t
;
///< 16 bit signed integer
typedef
boo
st
::
int32_t
int32_t
;
///< 32 bit signed integer
typedef
boo
st
::
int64_t
int64_t
;
///< 64 bit signed integer
typedef
st
d
::
int8_t
int8_t
;
///< 8 bit signed integer
typedef
st
d
::
int16_t
int16_t
;
///< 16 bit signed integer
typedef
st
d
::
int32_t
int32_t
;
///< 32 bit signed integer
typedef
st
d
::
int64_t
int64_t
;
///< 64 bit signed integer
template
<
typename
T
>
inline
int8_t
int8_c
(
T
t
)
{
return
numeric_cast
<
int8_t
>
(
t
);
}
///< cast to type int8_t using "int8_c(x)"
template
<
typename
T
>
inline
int16_t
int16_c
(
T
t
)
{
return
numeric_cast
<
int16_t
>
(
t
);
}
///< cast to type int16_t using "int16_c(x)"
...
...
@@ -83,10 +82,10 @@ template< typename T > inline int64_t int64_c( T t ) { return numeric_cast< int6
// fixed size unsigned integral types
typedef
boo
st
::
uint8_t
uint8_t
;
///< 8 bit unsigned integer
typedef
boo
st
::
uint16_t
uint16_t
;
///< 16 bit unsigned integer
typedef
boo
st
::
uint32_t
uint32_t
;
///< 32 bit unsigned integer
typedef
boo
st
::
uint64_t
uint64_t
;
///< 64 bit unsigned integer
typedef
st
d
::
uint8_t
uint8_t
;
///< 8 bit unsigned integer
typedef
st
d
::
uint16_t
uint16_t
;
///< 16 bit unsigned integer
typedef
st
d
::
uint32_t
uint32_t
;
///< 32 bit unsigned integer
typedef
st
d
::
uint64_t
uint64_t
;
///< 64 bit unsigned integer
typedef
uint8_t
byte_t
;
typedef
uint64_t
id_t
;
//sid datatype for pe
...
...
@@ -156,7 +155,7 @@ static const uint_t UINT_BITS_LD = int_ld< std::numeric_limits< uint_t >::digits
typedef
int
cell_idx_t
;
//typedef int64_t cell_idx_t;
BOOST
_STATIC_ASSERT
(
std
::
numeric_limits
<
cell_idx_t
>::
is_specialized
&&
WALBERLA
_STATIC_ASSERT
(
std
::
numeric_limits
<
cell_idx_t
>::
is_specialized
&&
std
::
numeric_limits
<
cell_idx_t
>::
is_integer
&&
std
::
numeric_limits
<
cell_idx_t
>::
is_signed
);
...
...
src/core/cell/CellInterval.h
View file @
c0ac624e
...
...
@@ -29,7 +29,6 @@
#include
"core/mpi/RecvBuffer.h"
#include
"core/mpi/SendBuffer.h"
#include
<boost/static_assert.hpp>
#include
<algorithm>
#include
<iterator>
...
...
src/core/debug/CheckFunctions.h
View file @
c0ac624e
...
...
@@ -29,7 +29,6 @@
#include
"core/VectorTrait.h"
//#include <boost/math/special_functions/next.hpp>
#include
<boost/static_assert.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/debug/CheckFunctions.impl.h
View file @
c0ac624e
...
...
@@ -20,6 +20,7 @@
//======================================================================================================================
#include
<boost/type_traits/integral_constant.hpp>
/// \cond internal
...
...
src/core/math/Matrix2.h
View file @
c0ac624e
...
...
@@ -28,7 +28,6 @@
#include
"core/mpi/RecvBuffer.h"
#include
"core/mpi/SendBuffer.h"
#include
<boost/static_assert.hpp>
#include
<algorithm>
#include
<cmath>
#include
<iostream>
...
...
@@ -725,9 +724,9 @@ inline const Matrix2<Type> Matrix2<Type>::getTranspose() const
template
<
typename
Type
>
inline
Matrix2
<
Type
>&
Matrix2
<
Type
>::
invert
()
{
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
Type
det
=
getDeterminant
();
...
...
@@ -754,9 +753,9 @@ inline Matrix2<Type>& Matrix2<Type>::invert()
template
<
typename
Type
>
inline
const
Matrix2
<
Type
>
Matrix2
<
Type
>::
getInverse
()
const
{
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
Type
det
=
getDeterminant
();
...
...
@@ -898,7 +897,7 @@ inline bool isnan( const Matrix2<Type>& m )
template
<
typename
Type
>
inline
const
Matrix2
<
Type
>
abs
(
const
Matrix2
<
Type
>&
m
)
{
BOOST
_STATIC_ASSERT
(
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
std
::
numeric_limits
<
Type
>::
is_integer
);
return
Matrix2
<
Type
>
(
std
::
abs
(
m
[
0
]),
std
::
abs
(
m
[
1
]),
std
::
abs
(
m
[
2
]),
std
::
abs
(
m
[
3
])
);
}
...
...
@@ -919,7 +918,7 @@ inline const Matrix2<Type> abs( const Matrix2<Type>& m )
template
<
typename
Type
>
inline
const
Matrix2
<
Type
>
fabs
(
const
Matrix2
<
Type
>&
m
)
{
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
return
Matrix2
<
Type
>
(
std
::
fabs
(
m
[
0
]),
std
::
fabs
(
m
[
1
]),
std
::
fabs
(
m
[
2
]),
std
::
fabs
(
m
[
3
])
);
}
...
...
src/core/math/Matrix3.h
View file @
c0ac624e
...
...
@@ -32,7 +32,6 @@
#include
"core/mpi/RecvBuffer.h"
#include
"core/mpi/SendBuffer.h"
#include
<boost/static_assert.hpp>
#include
<boost/type_traits/is_arithmetic.hpp>
#include
<boost/utility/enable_if.hpp>
...
...
@@ -370,9 +369,9 @@ template< typename Type >
template
<
typename
Axis
,
typename
Angle
>
Matrix3
<
Type
>::
Matrix3
(
Vector3
<
Axis
>
axis
,
Angle
angle
)
{
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Axis
>::
is_integer
);
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Angle
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Axis
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Angle
>::
is_integer
);
const
Angle
sina
(
std
::
sin
(
angle
)
);
const
Angle
cosa
(
std
::
cos
(
angle
)
);
...
...
@@ -1007,9 +1006,9 @@ inline const Matrix3<Type> Matrix3<Type>::getTranspose() const
template
<
typename
Type
>
inline
Matrix3
<
Type
>&
Matrix3
<
Type
>::
invert
()
{
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
Type
det
=
v_
[
0
]
*
(
(
v_
[
4
]
*
v_
[
8
]
)
-
(
v_
[
7
]
*
v_
[
5
]
)
)
+
v_
[
1
]
*
(
(
v_
[
5
]
*
v_
[
6
]
)
-
(
v_
[
8
]
*
v_
[
3
]
)
)
+
...
...
@@ -1046,7 +1045,7 @@ inline Matrix3<Type>& Matrix3<Type>::invert()
template
<
typename
Type
>
inline
const
Matrix3
<
Type
>
Matrix3
<
Type
>::
getInverse
()
const
{
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
Type
det
=
v_
[
0
]
*
(
(
v_
[
4
]
*
v_
[
8
]
)
-
(
v_
[
7
]
*
v_
[
5
]
)
)
+
v_
[
1
]
*
(
(
v_
[
5
]
*
v_
[
6
]
)
-
(
v_
[
8
]
*
v_
[
3
]
)
)
+
...
...
@@ -1101,8 +1100,8 @@ template< typename Type >
template
<
typename
Other
>
inline
const
Matrix3
<
HIGH
>
Matrix3
<
Type
>::
rotate
(
const
Matrix3
<
Other
>&
m
)
const
{
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Other
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Other
>::
is_integer
);
//--Multiplication in two steps (number of FLOP = 90, 1 additional temporary matrix)------------
...
...
@@ -1160,8 +1159,8 @@ template< typename Type >
template
<
typename
Other
>
inline
const
Matrix3
<
HIGH
>
Matrix3
<
Type
>::
diagRotate
(
const
Matrix3
<
Other
>&
m
)
const
{
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Other
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Other
>::
is_integer
);
// Precalculating tmp = m * R(-1)
const
Matrix3
<
HIGH
>
tmp
(
m
.
v_
[
0
]
*
v_
[
0
],
m
.
v_
[
0
]
*
v_
[
3
],
m
.
v_
[
0
]
*
v_
[
6
],
...
...
@@ -1249,7 +1248,7 @@ inline bool Matrix3<Type>::isZero() const
template
<
typename
Type
>
inline
const
Matrix3
<
Type
>
Matrix3
<
Type
>::
getCholesky
()
const
{
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
Matrix3
tmp
(
Type
(
0
)
);
...
...
@@ -1292,8 +1291,8 @@ template< typename Type >
template
<
typename
Other
>
inline
const
Vector3
<
HIGH
>
Matrix3
<
Type
>::
solve
(
const
Vector3
<
Other
>
&
rhs
)
const
{
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Other
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Other
>::
is_integer
);
Vector3
<
HIGH
>
tmp1
,
tmp2
;
HIGH
sum
;
...
...
@@ -1355,7 +1354,7 @@ inline Type Matrix3<Type>::trace() const
template
<
typename
Type
>
inline
const
Vector3
<
Type
>
Matrix3
<
Type
>::
getEulerAnglesXYZ
()
const
{
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
const
Type
cy
(
std
::
sqrt
(
v_
[
0
]
*
v_
[
0
]
+
v_
[
3
]
*
v_
[
3
]
)
);
...
...
@@ -1382,7 +1381,7 @@ inline const Vector3<Type> Matrix3<Type>::getEulerAnglesXYZ() const
template
<
typename
Type
>
const
Vector3
<
Type
>
Matrix3
<
Type
>::
getEulerAngles
(
EulerRotation
order
)
const
{
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
static
const
uint_t
eulSafe
[
4
]
=
{
0
,
1
,
2
,
0
};
static
const
uint_t
eulNext
[
4
]
=
{
1
,
2
,
0
,
1
};
...
...
@@ -1663,7 +1662,7 @@ inline bool isnan( const Matrix3<Type>& m )
template
<
typename
Type
>
inline
const
Matrix3
<
Type
>
abs
(
const
Matrix3
<
Type
>&
m
)
{
BOOST
_STATIC_ASSERT
(
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
std
::
numeric_limits
<
Type
>::
is_integer
);
return
Matrix3
<
Type
>
(
std
::
abs
(
m
[
0
]),
std
::
abs
(
m
[
1
]),
std
::
abs
(
m
[
2
]),
std
::
abs
(
m
[
3
]),
std
::
abs
(
m
[
4
]),
std
::
abs
(
m
[
5
]),
std
::
abs
(
m
[
6
]),
std
::
abs
(
m
[
7
]),
std
::
abs
(
m
[
8
])
);
...
...
@@ -1685,7 +1684,7 @@ inline const Matrix3<Type> abs( const Matrix3<Type>& m )
template
<
typename
Type
>
inline
const
Matrix3
<
Type
>
fabs
(
const
Matrix3
<
Type
>&
m
)
{
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
return
Matrix3
<
Type
>
(
std
::
fabs
(
m
[
0
]),
std
::
fabs
(
m
[
1
]),
std
::
fabs
(
m
[
2
]),
std
::
fabs
(
m
[
3
]),
std
::
fabs
(
m
[
4
]),
std
::
fabs
(
m
[
5
]),
std
::
fabs
(
m
[
6
]),
std
::
fabs
(
m
[
7
]),
std
::
fabs
(
m
[
8
])
);
...
...
src/core/math/PhysicalCheck.cpp
View file @
c0ac624e
...
...
@@ -231,7 +231,7 @@ namespace math {
constraints_
.
push_back
(
*
i
);
}
void
PhysicalCheck
::
completeConfig
(
const
boost
::
shared_ptr
<
Config
>&
config
)
void
PhysicalCheck
::
completeConfig
(
const
shared_ptr
<
Config
>&
config
)
{
auto
globalBlock
=
config
->
getWritableGlobalBlock
();
...
...
src/core/math/PhysicalCheck.h
View file @
c0ac624e
...
...
@@ -94,7 +94,7 @@ namespace math {
void
addEquations
(
const
std
::
vector
<
std
::
string
>&
equations
);
void
addUnitParameterRelations
(
const
std
::
map
<
std
::
string
,
std
::
string
>&
unitParameterRelations
);
void
addConstraints
(
const
std
::
vector
<
std
::
string
>&
constraints
);
void
completeConfig
(
const
boost
::
shared_ptr
<
Config
>&
config
);
void
completeConfig
(
const
shared_ptr
<
Config
>&
config
);
//@}
//****************************************************************************************************************
...
...
src/core/math/Quaternion.h
View file @
c0ac624e
...
...
@@ -663,7 +663,7 @@ inline void Quaternion<Type>::swap( Quaternion& q ) /* throw() */
template
<
typename
Type
>
inline
const
Vector3
<
Type
>
Quaternion
<
Type
>::
getEulerAnglesXYZ
()
const
{
BOOST
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
WALBERLA
_STATIC_ASSERT
(
!
std
::
numeric_limits
<
Type
>::
is_integer
);
Vector3
<
Type
>
eulerAngles
;
...
...
src/core/math/Utility.h
View file @
c0ac624e
...
...
@@ -26,7 +26,6 @@
#include
"core/DataTypes.h"
#include
<boost/math/constants/constants.hpp>
#include
<boost/static_assert.hpp>
#include
<cmath>
#include
<cstddef>
#include
<limits>
...
...
@@ -100,7 +99,7 @@ inline real_t round( real_t a );
template
<
typename
T
>
inline
const
T
sign
(
T
a
)
{
BOOST
_STATIC_ASSERT
(
std
::
numeric_limits
<
T
>::
is_signed
);
WALBERLA
_STATIC_ASSERT
(
std
::
numeric_limits
<
T
>::
is_signed
);
return
(
a
<
T
(
0
)
)
?
(
T
(
-
1
)
)
:
(
T
(
1
)
);
}
//**********************************************************************************************************************
...
...
src/core/math/Vector2.h
View file @
c0ac624e
...
...
@@ -38,7 +38,6 @@
#include
"core/mpi/SendBuffer.h"
#include
<boost/functional/hash.hpp>
#include
<boost/static_assert.hpp>
#include
<boost/type_traits/is_floating_point.hpp>
#include
<boost/type_traits/is_fundamental.hpp>
#include
<boost/type_traits/is_same.hpp>
...
...
src/core/math/Vector3.h
View file @
c0ac624e
...
...
@@ -39,7 +39,6 @@
#include
"core/debug/CheckFunctions.h"
#include
<boost/functional/hash.hpp>
#include
<boost/static_assert.hpp>
#include
<boost/type_traits.hpp>
#include
<boost/type_traits/is_floating_point.hpp>
#include
<boost/type_traits/is_fundamental.hpp>
...
...
src/core/math/equation_system/EquationSystem.h
View file @
c0ac624e
...
...
@@ -121,7 +121,7 @@ namespace math {
};
typedef
boost
::
shared_ptr
<
EquationSystem
>
EquationSystemPtr
;
typedef
shared_ptr
<
EquationSystem
>
EquationSystemPtr
;
}
// namespace math
}
// namespace walberla
src/core/math/equation_system/FwdEquation.h
View file @
c0ac624e
...
...
@@ -21,7 +21,7 @@
#pragma once
#include
<
boost/shared_ptr.hpp
>
#include
<
memory
>
namespace
walberla
{
...
...
@@ -41,13 +41,13 @@ namespace math {
};
class
Node
;
typedef
boo
st
::
shared_ptr
<
Node
>
NodePtr
;
typedef
st
d
::
shared_ptr
<
Node
>
NodePtr
;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// EQUATION
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class
Equation
;
typedef
boo
st
::
shared_ptr
<
Equation
>
EquationPtr
;
typedef
st
d
::
shared_ptr
<
Equation
>
EquationPtr
;
}
// namespace math
}
// namespace walberla
src/core/math/equation_system/FwdOperator.h
View file @
c0ac624e
...
...
@@ -21,7 +21,6 @@
#pragma once
#include
<boost/shared_ptr.hpp>
#include
<map>
...
...
Prev
1
2
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