xcompact3d / x3d2

https://xcompact3d.github.io/x3d2
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

Add support for scalar product operator #67

Closed semi-h closed 6 months ago

semi-h commented 6 months ago

We need a scalar product operator for calculating the enstrophy in the domain. The CUDA kernel can be implemented in a more performant way, there are lots of examples out there, but the current implementation is not bad. We only need to run this once in maybe 100/1000 iterations for post-processing so not worried too much.

pbartholomew08 commented 6 months ago

Could we just use the dot_product intrinsic? NVIDIA claim to accelerate all these

semi-h commented 6 months ago

We'll probably have padding in our data structure when the grid size not a multiple of SZ and then if we use a library to calculate the dot product it'll be hard to eliminate the padded entries.