Skip to content

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

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8682
    HUXin
    Participant

    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 2 months, 2 weeks ago by HUXin.
    #8693
    mathias
    Keymaster

    have a look at the other exampeles provided which use the Bouzidi (interpolated bounce back) condition, e.g. cylinder 2d and 3d.

    #8695
    HUXin
    Participant

    Thank 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
    `

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.