How to set gpu::cuda::getFusedCollisionO with Interpolated Boundary Condition
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › How to set gpu::cuda::getFusedCollisionO with Interpolated Boundary Condition
- This topic has 2 replies, 2 voices, and was last updated 4 months ago by HUXin.
-
AuthorPosts
-
May 13, 2024 at 4:12 pm #8682HUXinParticipant
Dear Community,
After set the gpu::cuda::getFusedCollisionO with Bounce Back and LocalVelocity boundary condition (founded from the example of cavity3dBenchmark), the performance improve a lot on my NVIDIA 4070TI. And I want to change the boundary condition as Interpolated with gpu::cuda::getFusedCollisionO, but I do not find any material about how to set it.
How should I implement it? Or the GPU Fused Collision not working in other boundary condition?
Thank you for your help. Best withes!
- This topic was modified 4 months ago by HUXin.
May 14, 2024 at 9:43 pm #8693mathiasKeymasterhave a look at the other exampeles provided which use the Bouzidi (interpolated bounce back) condition, e.g. cylinder 2d and 3d.
May 15, 2024 at 8:34 am #8695HUXinParticipantThank you very much for your response.
I’ve taken a closer look at the code, and unfortunately, I couldn’t find any information about gpu::cuda::getFusedCollisionO with Bouzidi condition or other interpolated conditions in other examples, incluing cylinder2d and 3d. However, I only found the Bounce Back and Local Velocity conditions in cavity3dBenchmark, as shown below:
`cpp
#if defined(PLATFORM_GPU_CUDA) && defined(GPU_USE_FUSED_COLLISION)
#ifdef LID_DRIVEN_BOUNCE_BACK
// Enable non-virtual dispatching of common collision operators (optional, improves performance)
lattice.forBlocksOnPlatform<Platform::GPU_CUDA>([](auto& block) {
block.setCollisionO(
gpu::cuda::getFusedCollisionO<T, DESCRIPTOR, BulkDynamics,
BounceBack<T, DESCRIPTOR>,
BounceBackVelocity<T, DESCRIPTOR>>());
});
#else // Local velocity boundaries
lattice.forBlocksOnPlatform<Platform::GPU_CUDA>([](auto& block) {
block.setCollisionO(
gpu::cuda::getFusedCollisionO<
T, DESCRIPTOR, BulkDynamics,
CombinedRLBdynamics<
T, DESCRIPTOR, BulkDynamics,
momenta::RegularizedVelocityBoundaryTuple<0, -1>>,
CombinedRLBdynamics<
T, DESCRIPTOR, BulkDynamics,
momenta::RegularizedVelocityBoundaryTuple<0, 1>>,
CombinedRLBdynamics<
T, DESCRIPTOR, BulkDynamics,
momenta::RegularizedVelocityBoundaryTuple<1, -1>>,
CombinedRLBdynamics<
T, DESCRIPTOR, BulkDynamics,
momenta::RegularizedVelocityBoundaryTuple<1, 1>>,
CombinedRLBdynamics<
T, DESCRIPTOR, BulkDynamics,
momenta::RegularizedVelocityBoundaryTuple<2, -1>>,
CombinedRLBdynamics<
T, DESCRIPTOR, BulkDynamics,
momenta::RegularizedVelocityBoundaryTuple<2, 1>>>());
});
#endif
#endif // PLATFORM_GPU_CUDA
`
-
AuthorPosts
- You must be logged in to reply to this topic.