I am trying to calculate the distance between particles (for all the particles) and the nearest boundary. Which part of the code calculates that or which variable(s) I should focus on?
Just a suggestion - would this be feasible for you to do in post processing? Paraview should be able to as far as I know, without knowing how to do it though.
@Asalih3d Thanks! I'm trying to modify the source code for my application and I want to run it with modified variables. Still though I did not know that you could do it in Paraview, I will try to figure that out and maybe come up with a different solution.
No problem! I hope you are able to figure a solution out - personally if I should make a bit of a commercial for my self :-) - I would suggest you to maybe look into this:
If you are familiar with Julia this should be quite easy for you to install and start using on some of your vtk files - here you would be able to extract arrays containing the position of all particles in your vtk file and then you can probably figure out the rest.
Else I hope some Paraview expert can help you out.
In FunctionsGeo3d.h PointsPlane returns the distance between a plane and a point. And in JSphBoundCorr.cpp distance between a plane(pla), I assume is the boundary, and each particle's position is calculated using PlaneDistSign(pla,pos[p])
Should I follow a similar approach? Obtain the plane defined by the boundary(mkbound), and calculate the distance between that and each particle? If yes, How could I do it if there are multiple boundaries? Does it mean I would need to repeat it for each boundary?