diff --git a/src/mesh/DistanceComputations.h b/src/mesh/DistanceComputations.h index c8ec8a7693b4ff82b8c70d216c4ee9bc194f6afb..6df23c07839cc6a5b842b07350349d0be6883052 100644 --- a/src/mesh/DistanceComputations.h +++ b/src/mesh/DistanceComputations.h @@ -42,6 +42,14 @@ struct DistanceProperties typedef typename MeshType::Scalar Scalar; 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 e1_normal, e2_normal; Vec2 e1_normalized, e2_normalized, e0_normalized; @@ -978,4 +986,4 @@ void TriangleDistance<MeshType>::filterTrianglesForAABB( const BoundingBox & aab } } // namespace mesh -} // namespace walberla \ No newline at end of file +} // namespace walberla diff --git a/tests/mesh/NumericIntegrationTest.cpp b/tests/mesh/NumericIntegrationTest.cpp index 8d8122172bf9b2742e7c56677c3b3ca039144ea6..7bbbc6f0beb992756425e638106c3dce49bf5e26 100644 --- a/tests/mesh/NumericIntegrationTest.cpp +++ b/tests/mesh/NumericIntegrationTest.cpp @@ -93,9 +93,10 @@ Matrix3<real_t> inertiaTensorNumeric( const ContainmentT & body, const AABB & aa { if(body.contains( ContainmentT::toPoint( *it ) )) { - const real_t & x = (*it)[0]; - const real_t & y = (*it)[1]; - const real_t & z = (*it)[2]; + const Vector3<real_t> p = *it; + const real_t & x = p[0]; + const real_t & y = p[1]; + const real_t & z = p[2]; intertiaTensor[0] += y*y + z*z; intertiaTensor[1] += -x*y; @@ -193,4 +194,4 @@ int main( int argc, char * argv[] ) int main( int argc, char * argv[] ) { return walberla::mesh::main( argc, argv ); -} \ No newline at end of file +}