Commit 2c3341c4 authored by Sebastian Eibl's avatar Sebastian Eibl

[FIX] math::M_PI -> math::pi

parent 0b4ce389
......@@ -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();
......
......@@ -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;
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
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