# help with source code variable names

Hello,

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?

Regards.

Hello,

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?

Regards.

## Comments

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.

Kind regards

@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:

https://github.com/AhmedSalih3d/PostSPH.jl

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.

Kind regards

In

FunctionsGeo3d.hPointsPlane returns the distance between a plane and a point. And inJSphBoundCorr.cppdistance 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?

Thanks!