Xiangyu-Hu / SPHinXsys

SPHinXsys provides C++ APIs for engineering simulation and optimization. It aims at complex systems driven by fluid, structure, multi-body dynamics and beyond. The multi-physics library is based on a unique and unified computational framework by which strong coupling has been achieved for all involved physics.
https://xiangyu-hu.github.io/SPHinXsys/
Apache License 2.0
314 stars 232 forks source link

Filling tank case SYCL implementation #657

Open Xiangyu-Hu opened 1 month ago

Xiangyu-Hu commented 1 month ago

There are several steps for the implementation:

  1. Devirtualize the BodyAlignedBox, including using geometric primitive other than shape (not usable due to the virtual functions) to define the box, using computing kernel to define the computing intensive (those used by particle dynamics computing kernels) functions.
  2. Write a copy state kernel so that one can copy all registered states in a variable list on device.
  3. Find something like mutex in sycl so that one can carry out the corresponding operation (transfer between real and buffer particles).
Xiangyu-Hu commented 1 month ago

The filling tank case is almost the same as the dambreak case which has implemented with SYCL. The only difference is that there is an emitter, which need to be implemented with SYCL. Basically, one need to do this without using std::vector and reference and other thing not bale to run on device.