8000 Avoid inaccuracies close to the boarder for coriolis and angle textures. · Issue #9 · gpuocean/gpuocean · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content 8000
Avoid inaccuracies close to the boarder for coriolis and angle textures.  #9
Open
@havahol

Description

@havahol

Currently, the textures used to compute the angle towards north and the Coriolis parameter contains inaccuracies close to the boarders.
This is because these textures are coarsely sampled from the computational domain. Since texture data is defined in "cell centers" with $\Delta x $ intervals, the linear interpolation is not defined in the first and last $\tfrac{1}{2}\Delta x $, and these areas are then given the value of their closest neighbour. See https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#linear-filtering

To fix this (for these two textures), we can normalize the texture fetches within $[\tfrac{1}{2} \Delta x, 1-\tfrac{1}{2} \Delta x] $, instead of $[0, 1] $. This requires that we add a few #defines, so that we know the sizes of $\Delta x $ and $\Delta y $ , and also that we fill the texture so that the new interval covers the full computational domain. Note that this $\Delta x $ is not the same as the $\Delta x $ in the simulator.

This is not a serious bug, but it is nonethereless a bug which would be nice to get out of the way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0