Difference between the JSphCpu.cpp and the JSphCpuSingle.cpp

Firstly, I have a confusion about the JSphCpu.cpp and the JSphCpuSingle.cpp. When I Run the XXXname_win64_CPU.bat, which of above two files is called (JSphCpuSingle.cpp or JSphCpu.cpp).

Additionally, I want to change the constitutive relation of the DEM and I only found the pre-existing constitutive relation at the JSphCpu.cpp. But I want to used the GPU. So I want to know if I change the code of the the pre-existing constitutive relation at the JSphCpu.cpp and compile it, does it also take effect when I run the XXXname_win64_GPU.bat.

Comments

  • edited July 26
    Hi, at first it is preferred to read DualSPHysics_v4.2_GUIDE.pdf pages starting from page 43.

    regarding the confusion between classes, if you are familiar with inheritance you might grasp it faster. let me explain to you:

    JSph is the grandfather, it contains all common member functions and variables that can be used whatever the run is cpu or gpu.

    JSph has two sons: they are JSphGpu and JSphCpu.
    when we say for example that JSphCpu is inherited from JSph we mean that: JSphCpu has all member functions and variables of JSph and has extra variables and functions of his own.

    JSphGpu and JSphCpu each one has an essential child; they are respectively JSphGpuSingle and JSphCpusingle. each one of them has all features of his parent and also grandfather and in addition it has its extra functions and members.

    You seam to be searching for something in JSphGpusingle. you might find it in his child called JSphGpu_ker (CUDA kernels are constructed in separate files).

    Other thing: for any batch file ".bat" you can right click and press edit opening it in text editor to see the sequence of execution.

  • Good explaination! Thank you very much!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!