diff --git a/src/mesa_pd/collision_detection/EPA.cpp b/src/mesa_pd/collision_detection/EPA.cpp index 2076f680629d6095f21c248cc01dc05fde62851c..304b4e6f16a3b2229ea0ff72648b0c9d1fcef838 100644 --- a/src/mesa_pd/collision_detection/EPA.cpp +++ b/src/mesa_pd/collision_detection/EPA.cpp @@ -553,7 +553,7 @@ inline void EPA::createInitialSimplex( size_t numPoints, } Vec3 direction1 = (d % axis).getNormalizedOrZero(); - Quat q(d, (real_t(2.0)/real_t(3.0)) * real_t(walberla::math::M_PI)); + Quat q(d, (real_t(2.0)/real_t(3.0)) * real_t(walberla::math::pi)); Mat3 rot = q.toRotationMatrix(); Vec3 direction2 = (rot*direction1).getNormalizedOrZero(); Vec3 direction3 = (rot*direction2).getNormalizedOrZero(); diff --git a/src/mesa_pd/data/shape/Ellipsoid.h b/src/mesa_pd/data/shape/Ellipsoid.h index 6ab1d673a0c6fc02271ed05100e25a1ec0cc2af6..9a07488e38dc00aafc933f4772a2976de6348dbd 100644 --- a/src/mesa_pd/data/shape/Ellipsoid.h +++ b/src/mesa_pd/data/shape/Ellipsoid.h @@ -38,7 +38,7 @@ public: const Vec3& getSemiAxes() const { return semiAxes_; } - real_t getVolume() const override { return real_c(4.0/3.0) * math::M_PI * semiAxes_[0] * semiAxes_[1] * semiAxes_[2]; } + real_t getVolume() const override { return real_c(4.0/3.0) * math::pi * semiAxes_[0] * semiAxes_[1] * semiAxes_[2]; } void updateMassAndInertia(const real_t density) override; Vec3 support( const Vec3& d_loc ) const override; diff --git a/tests/mesa_pd/collision_detection/GJK_EPA.cpp b/tests/mesa_pd/collision_detection/GJK_EPA.cpp index c9eb7921d03c5e477a04a0a7e34b4f5736bff1de..4cbfdc0b6ef67f00d76618e0303752a8a3819e20 100644 --- a/tests/mesa_pd/collision_detection/GJK_EPA.cpp +++ b/tests/mesa_pd/collision_detection/GJK_EPA.cpp @@ -200,7 +200,7 @@ void MainTest() //Testcase 04 Cube with turned Cube WALBERLA_LOG_INFO("Test 04: CUBE <-> TURNED CUBE"); //compute rotation. - real_t angle = walberla::math::M_PI/real_t(4.0); + real_t angle = walberla::math::pi/real_t(4.0); Vec3 zaxis(0, 0, 1); Quat q4(zaxis, angle); diff --git a/tests/mesa_pd/kernel/SpringDashpot.cpp b/tests/mesa_pd/kernel/SpringDashpot.cpp index c367ef36d4113116eef3a1fe019146a1e29a208b..8bd82ee16481e95aa763d3ed467ce41df36ae03e 100644 --- a/tests/mesa_pd/kernel/SpringDashpot.cpp +++ b/tests/mesa_pd/kernel/SpringDashpot.cpp @@ -128,7 +128,7 @@ int main( int argc, char ** argv ) auto ct = real_t(0.17); auto meff = real_t(0.65); sd.setParametersFromCOR(0, 0, cor, ct, meff); - //WALBERLA_CHECK_FLOAT_EQUAL(sd.getStiffness(0,0), (math::M_PI*math::M_PI - std::log(cor)*std::log(cor)) / (ct*ct) * meff); + //WALBERLA_CHECK_FLOAT_EQUAL(sd.getStiffness(0,0), (math::pi*math::pi - std::log(cor)*std::log(cor)) / (ct*ct) * meff); //WALBERLA_CHECK_FLOAT_EQUAL(sd.getDampingN(0,0), -real_t(2)*std::log(cor)/ct*meff); WALBERLA_CHECK_FLOAT_EQUAL(sd.calcCoefficientOfRestitution(0, 0, meff), cor); WALBERLA_CHECK_FLOAT_EQUAL(sd.calcCollisionTime(0, 0, meff), ct);