Your function receives an int, a double, a double, a double, and a double in that order. If you were to call it, it would look something like this:
get_particle_velocity(n, x, u, fluid_u, geometry);
All those variables in the parentheses are ones that you initialize outside of the function, and the function wont change any of them since they are passed by value, if you wanted to change those variables, you would need to pass by reference, which uses "&". In this case when you write the function you would need to add a & next to each of the variables in the header that you want to pass by reference. So your header for your function would look like this:
1 2 3 4
|
void get_particle_velocity(int &n, double &**x, double &**u, double &**fluid_u, double &**geometry)
{
...
}
|
and your call would look the same, you would just need to use the same names in the function header and when you initialize your variables.
Also when you change something about the parameters of a function, don't forget to change it in the function prototype.
Hope this helps!