CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Alternative to SV_LOCATE_POINT()

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By abhinandan.chiney

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 25, 2018, 06:40
Default Alternative to SV_LOCATE_POINT()
  #1
New Member
 
Abhinandan Chiney
Join Date: Dec 2015
Posts: 1
Rep Power: 0
abhinandan.chiney is on a distinguished road
Hello,

Is there an alternative to SV_LOCATE_POINT()? I am running into trouble when trying to execute SV_LOCATE_POINT in parallel.

Thanks!

Sample Code: (Works in serial, doesn't work in parallel - SIGSEV error)

Code:
# include "udf.h"
# include "surf.h"
# include "dpm.h"

DEFINE_ON_DEMAND(copy_data_coord)
{
	Domain *d=Get_Domain(1);

	real new_point[ND_ND],x[ND_ND];
	cell_t c_new_point, c;
	Thread *t_new_point, *t;
	CX_Cell_Id cx_cell;

	t=Lookup_Thread(d,2);

	begin_c_loop_int(c,t)
	{
		C_CENTROID(x,c,t);
		new_point[0] = x[0]+1.0;
		new_point[1] = x[1];
		new_point[2] = 0.5;

		if(new_point[0] <=8)
		{
			SV_locate_point(new_point, &cx_cell);
			c_new_point=RP_CELL(&cx_cell);
			t_new_point=RP_THREAD(&cx_cell);
			C_CENTROID(new_point,c_new_point,t_new_point);
		}



			Message0("new = %g %g %g\n",new_point[0],new_point[1],new_point[2]);
			Message0("old = %g %g %g\n",x[0],x[1],x[2]);

	} end_c_loop_int(c,t)


}
JamesCC likes this.
abhinandan.chiney is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alternative wall functions in turbulents model rafperez FLUENT 0 December 21, 2017 05:25
Alternative to pyFoamPlotWatcher? m_ridzon OpenFOAM 3 July 8, 2017 09:05
Alternative boundary treatment on cell-centered scheme dokeun Main CFD Forum 2 July 11, 2013 10:59
alternative method for ggi wWieWalter OpenFOAM 1 September 20, 2011 09:18


All times are GMT -4. The time now is 14:05.