From a3dbd7a981a43952e19bfae5566ac346ade1df3f Mon Sep 17 00:00:00 2001
From: Christoph Rettinger <christoph.rettinger@fau.de>
Date: Thu, 20 Oct 2022 16:47:21 +0200
Subject: [PATCH] Conversion fixes

---
 apps/showcases/ParticlePacking/Evaluation.h        | 2 +-
 apps/showcases/ParticlePacking/ParticlePacking.cpp | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/apps/showcases/ParticlePacking/Evaluation.h b/apps/showcases/ParticlePacking/Evaluation.h
index 76acf3caf..f31d613d9 100644
--- a/apps/showcases/ParticlePacking/Evaluation.h
+++ b/apps/showcases/ParticlePacking/Evaluation.h
@@ -59,7 +59,7 @@ struct ParticleInfo
       walberla::mpi::allReduceInplace(sumReduceVec, walberla::mpi::SUM);
       walberla::mpi::allReduceInplace(maxReduceVec, walberla::mpi::MAX);
 
-      numParticles = int(sumReduceVec[0]);
+      numParticles = uint_c(sumReduceVec[0]);
       averageVelocity = sumReduceVec[1];
       particleVolume = sumReduceVec[2];
       heightOfMass = sumReduceVec[3];
diff --git a/apps/showcases/ParticlePacking/ParticlePacking.cpp b/apps/showcases/ParticlePacking/ParticlePacking.cpp
index af405c466..7b6f5bca3 100644
--- a/apps/showcases/ParticlePacking/ParticlePacking.cpp
+++ b/apps/showcases/ParticlePacking/ParticlePacking.cpp
@@ -1298,9 +1298,9 @@ int main(int argc, char **argv) {
                                              [damping_forceDampingCoefficient, dt](size_t idx, data::ParticleAccessorWithBaseShape &ac){
                                                 auto force = ac.getForce(idx);
                                                 auto velEstimated = ac.getLinearVelocity(idx) + force * ac.getInvMass(idx) * dt; // = velocity integration in SemiImplicitEuler, might need to be changed for other integrator
-                                                Vec3 dampingForce(mesa_pd::sgn(force[0] * velEstimated[0]) * force[0],
-                                                                  mesa_pd::sgn(force[1] * velEstimated[1]) * force[1],
-                                                                  mesa_pd::sgn(force[2] * velEstimated[2]) * force[2]);
+                                                Vec3 dampingForce(real_c(mesa_pd::sgn(force[0] * velEstimated[0])) * force[0],
+                                                                  real_c(mesa_pd::sgn(force[1] * velEstimated[1])) * force[1],
+                                                                  real_c(mesa_pd::sgn(force[2] * velEstimated[2])) * force[2]);
                                                 dampingForce *= -damping_forceDampingCoefficient;
                                                 ac.getForceRef(idx) += dampingForce; },
                                              particleAccessor);
-- 
GitLab