Skip to content
Snippets Groups Projects
Commit b6843d19 authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

fixed conversion warnings

parent c06b0bbe
Branches
Tags
No related merge requests found
...@@ -82,10 +82,10 @@ void move( BodyStorage& storage, real_t dt ) ...@@ -82,10 +82,10 @@ void move( BodyStorage& storage, real_t dt )
void checkRotationFunctions() void checkRotationFunctions()
{ {
MaterialID iron = Material::find("iron"); MaterialID iron = Material::find("iron");
auto sp1 = std::make_shared<Sphere>( 0, 0, Vec3(0,0,0), Vec3(0,0,0), Quat(), 1, iron, false, true, false ); auto sp1 = std::make_shared<Sphere>( 0, 0, Vec3(0,0,0), Vec3(0,0,0), Quat(), real_t(1), iron, false, true, false );
auto sp2 = std::make_shared<Sphere>( 0, 0, Vec3(0,0,0), Vec3(0,0,0), Quat(), 1, iron, false, true, false ); auto sp2 = std::make_shared<Sphere>( 0, 0, Vec3(0,0,0), Vec3(0,0,0), Quat(), real_t(1), iron, false, true, false );
auto sp3 = std::make_shared<Sphere>( 0, 0, Vec3(0,0,0), Vec3(0,0,0), Quat(), 1, iron, false, true, false ); auto sp3 = std::make_shared<Sphere>( 0, 0, Vec3(0,0,0), Vec3(0,0,0), Quat(), real_t(1), iron, false, true, false );
auto sp4 = std::make_shared<Sphere>( 0, 0, Vec3(0,0,0), Vec3(0,0,0), Quat(), 1, iron, false, true, false ); auto sp4 = std::make_shared<Sphere>( 0, 0, Vec3(0,0,0), Vec3(0,0,0), Quat(), real_t(1), iron, false, true, false );
sp1->rotate( 1, 0, 0, math::M_PI * real_t(0.5)); sp1->rotate( 1, 0, 0, math::M_PI * real_t(0.5));
sp1->rotate( 0, 1, 0, math::M_PI * real_t(0.5)); sp1->rotate( 0, 1, 0, math::M_PI * real_t(0.5));
...@@ -121,7 +121,7 @@ void checkRotationFunctions() ...@@ -121,7 +121,7 @@ void checkRotationFunctions()
void checkPointFunctions() void checkPointFunctions()
{ {
MaterialID iron = Material::find("iron"); MaterialID iron = Material::find("iron");
auto sp1 = std::make_shared<Sphere>( 0, 0, Vec3(10,10,10), Vec3(0,0,0), Quat(), 1, iron, false, true, false ); auto sp1 = std::make_shared<Sphere>( 0, 0, Vec3(10,10,10), Vec3(0,0,0), Quat(), real_t(1), iron, false, true, false );
WALBERLA_CHECK( sp1->containsPoint( 10, 10, 10 ) ); WALBERLA_CHECK( sp1->containsPoint( 10, 10, 10 ) );
WALBERLA_CHECK( sp1->containsPoint( real_c(10.9), 10, 10 ) ); WALBERLA_CHECK( sp1->containsPoint( real_c(10.9), 10, 10 ) );
...@@ -148,7 +148,7 @@ int main( int argc, char** argv ) ...@@ -148,7 +148,7 @@ int main( int argc, char** argv )
MaterialID iron = Material::find("iron"); MaterialID iron = Material::find("iron");
BodyStorage storage; BodyStorage storage;
SpherePtr spPtr = std::make_unique<Sphere>(0, 0, Vec3(0,0,0), Vec3(0,0,0), Quat(), 1, iron, false, true, false); SpherePtr spPtr = std::make_unique<Sphere>(0, 0, Vec3(0,0,0), Vec3(0,0,0), Quat(), real_t(1), iron, false, true, false);
SphereID sphere = static_cast<SphereID>(&storage.add(std::move(spPtr))); SphereID sphere = static_cast<SphereID>(&storage.add(std::move(spPtr)));
Vec3 x0 = Vec3(-2,2,0); Vec3 x0 = Vec3(-2,2,0);
......
...@@ -60,7 +60,7 @@ int main( int argc, char** argv ) ...@@ -60,7 +60,7 @@ int main( int argc, char** argv )
math::seedRandomGenerator(1337); math::seedRandomGenerator(1337);
for (uint_t i = 0; i < 100; ++i) for (uint_t i = 0; i < 100; ++i)
storage[0].add( std::make_unique<Sphere>(UniqueID<Sphere>::createGlobal(), 0, Vec3( math::realRandom(real_c(0), real_c(10)), math::realRandom(real_c(0), real_c(10)), math::realRandom(real_c(0), real_c(10))), Vec3(0,0,0), Quat(), 1, iron, false, false, false) ); storage[0].add( std::make_unique<Sphere>(UniqueID<Sphere>::createGlobal(), 0, Vec3( math::realRandom(real_c(0), real_c(10)), math::realRandom(real_c(0), real_c(10)), math::realRandom(real_c(0), real_c(10))), Vec3(0,0,0), Quat(), real_t(1), iron, false, false, false) );
sccd.generatePossibleContacts(); sccd.generatePossibleContacts();
...@@ -84,14 +84,14 @@ int main( int argc, char** argv ) ...@@ -84,14 +84,14 @@ int main( int argc, char** argv )
bs.clear(); bs.clear();
bs.add( std::make_unique<Sphere>(UniqueID<Sphere>::createGlobal(), 0, Vec3( math::realRandom(real_c(0), real_c(10)), math::realRandom(real_c(0), real_c(10)), math::realRandom(real_c(0), real_c(10))), Vec3(0,0,0), Quat(), 1, iron, false, false, false) ); bs.add( std::make_unique<Sphere>(UniqueID<Sphere>::createGlobal(), 0, Vec3( math::realRandom(real_c(0), real_c(10)), math::realRandom(real_c(0), real_c(10)), math::realRandom(real_c(0), real_c(10))), Vec3(0,0,0), Quat(), real_t(1), iron, false, false, false) );
WcTimingPool pool; WcTimingPool pool;
for (int runs = 0; runs < 10; ++runs) for (int runs = 0; runs < 10; ++runs)
{ {
auto oldSize = bs.size(); auto oldSize = bs.size();
for (uint_t i = 0; i < oldSize; ++i) for (uint_t i = 0; i < oldSize; ++i)
bs.add( std::make_unique<Sphere>(UniqueID<Sphere>::createGlobal(), 0, Vec3( math::realRandom(real_c(0), real_c(10)), math::realRandom(real_c(0), real_c(10)), math::realRandom(real_c(0), real_c(10))), Vec3(0,0,0), Quat(), 0.5, iron, false, false, false) ); bs.add( std::make_unique<Sphere>(UniqueID<Sphere>::createGlobal(), 0, Vec3( math::realRandom(real_c(0), real_c(10)), math::realRandom(real_c(0), real_c(10)), math::realRandom(real_c(0), real_c(10))), Vec3(0,0,0), Quat(), real_t(0.5), iron, false, false, false) );
pool["SCCD"].start(); pool["SCCD"].start();
sccd.generatePossibleContacts(); sccd.generatePossibleContacts();
pool["SCCD"].end(); pool["SCCD"].end();
......
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