Skip to content
Snippets Groups Projects
Commit d3f65d03 authored by Christian Godenschwager's avatar Christian Godenschwager
Browse files

Fixed GCC 7 issues in mesh module

parent 85dc2a83
Branches
Tags
No related merge requests found
...@@ -42,6 +42,14 @@ struct DistanceProperties ...@@ -42,6 +42,14 @@ struct DistanceProperties
typedef typename MeshType::Scalar Scalar; typedef typename MeshType::Scalar Scalar;
typedef math::Matrix3<Scalar> Matrix; typedef math::Matrix3<Scalar> Matrix;
// Dummy constructor to suppress GCC 7 warnings
DistanceProperties() : e0(real_t(0)), e1(real_t(0)), e2(real_t(0)),
e1_normal(real_t(0)), e2_normal(real_t(0)),
e1_normalized(real_t(0)), e2_normalized(real_t(0)), e0_normalized(real_t(0)),
e0l(real_t(0)), e1l(real_t(0)), e2l(real_t(0)),
translation(real_t(0))
{}
Vec2 e0, e1, e2; Vec2 e0, e1, e2;
Vec2 e1_normal, e2_normal; Vec2 e1_normal, e2_normal;
Vec2 e1_normalized, e2_normalized, e0_normalized; Vec2 e1_normalized, e2_normalized, e0_normalized;
...@@ -978,4 +986,4 @@ void TriangleDistance<MeshType>::filterTrianglesForAABB( const BoundingBox & aab ...@@ -978,4 +986,4 @@ void TriangleDistance<MeshType>::filterTrianglesForAABB( const BoundingBox & aab
} }
} // namespace mesh } // namespace mesh
} // namespace walberla } // namespace walberla
\ No newline at end of file
...@@ -93,9 +93,10 @@ Matrix3<real_t> inertiaTensorNumeric( const ContainmentT & body, const AABB & aa ...@@ -93,9 +93,10 @@ Matrix3<real_t> inertiaTensorNumeric( const ContainmentT & body, const AABB & aa
{ {
if(body.contains( ContainmentT::toPoint( *it ) )) if(body.contains( ContainmentT::toPoint( *it ) ))
{ {
const real_t & x = (*it)[0]; const Vector3<real_t> p = *it;
const real_t & y = (*it)[1]; const real_t & x = p[0];
const real_t & z = (*it)[2]; const real_t & y = p[1];
const real_t & z = p[2];
intertiaTensor[0] += y*y + z*z; intertiaTensor[0] += y*y + z*z;
intertiaTensor[1] += -x*y; intertiaTensor[1] += -x*y;
...@@ -193,4 +194,4 @@ int main( int argc, char * argv[] ) ...@@ -193,4 +194,4 @@ int main( int argc, char * argv[] )
int main( int argc, char * argv[] ) int main( int argc, char * argv[] )
{ {
return walberla::mesh::main( argc, argv ); return walberla::mesh::main( argc, argv );
} }
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment