Skip to content
Snippets Groups Projects
Commit a7e32838 authored by Christoph Alt's avatar Christoph Alt
Browse files

Fixed the type cast to avoid implicit conversions

parent 99505a1c
No related merge requests found
......@@ -47,9 +47,9 @@ __global__ void SetParticleVelocities(walberla::gpu::FieldAccessor< uint_t > nOv
particleVelocitiesField.set(blockIdx_uint3, threadIdx_uint3);
// Cell center is needed in order to compute the particle velocity at this WF point
const real_t cellCenter[] = { (blockStart.x + (threadIdx.x + real_t(0.5)) * dx),
(blockStart.y + (blockIdx.x + real_t(0.5)) * dx),
(blockStart.z + (blockIdx.y + real_t(0.5)) * dx) };
const real_t cellCenter[] = { real_t(blockStart.x + (threadIdx.x + real_t(0.5)) * dx),
real_t(blockStart.y + (blockIdx.x + real_t(0.5)) * dx),
real_t(blockStart.z + (blockIdx.y + real_t(0.5)) * dx) };
// Compute the particle velocity at the cell center for all overlapping particles
for (uint_t p = 0; p < nOverlappingParticlesField.get(); p++)
......@@ -79,8 +79,9 @@ __global__ void ReduceParticleForces(walberla::gpu::FieldAccessor< uint_t > nOve
particleForcesField.set(blockIdx_uint3, threadIdx_uint3);
// Cell center is needed in order to compute the particle velocity at this WF point
const real_t cellCenter[] = { (blockStart.x + (threadIdx.x + real_t(0.5)) * dx), (blockStart.y + (blockIdx.x + real_t(0.5)) * dx),
(blockStart.z + (blockIdx.y + real_t(0.5)) * dx) };
const real_t cellCenter[] = { real_t(blockStart.x + (threadIdx.x + real_t(0.5)) * dx),
real_t(blockStart.y + (blockIdx.x + real_t(0.5)) * dx),
real_t(blockStart.z + (blockIdx.y + real_t(0.5)) * dx) };
// Reduce the forces for all overlapping particles
for (uint_t p = 0; p < nOverlappingParticlesField.get(); p++)
......
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