CX_Find_Cell_With_Point vs CX_Find_Closest_Cell_To_Point?

    • Ivan Mendez
      Hey all, I have a csv that contains the x,y,z coordinates of points on my geometry. I found that I can find the cell that contains that point using CX_Find_Cell_With_Point. However, I also found CX_Find_Closest_Cell_To_Point in the cxndsearch.h header. What are the differences between the two, and what does "double *dist" mean in the CX_Find_Closest_Cell_To_Point argument?
      FLUENT_EXPORT CX_Cell_Id *CX_Find_Cell_With_Point(ND_Search *, double v[3], double time);
      FLUENT_EXPORT CX_Cell_Id *CX_Find_Closest_Cell_To_Point(ND_Search *, double v[3], double *dist, double eps);
    • Rob
      Ansys Employee

      As a guess (I'm not allowed to comment on macros that aren't in the UDF manual) the macros will return the cell if the point is in it, the Closest macro will do some checks incase you've missed the meshed domain. 

      In C coding "double" calls double precision, ie more significant figures are stored. If a mesh is very fine or the cells small a distance might return zero without the extra accuracy. 

Viewing 1 reply thread
  • You must be logged in to reply to this topic.