|
[Sponsors] |
September 25, 2018, 06:40 |
Alternative to SV_LOCATE_POINT()
|
#1 |
New Member
Abhinandan Chiney
Join Date: Dec 2015
Posts: 1
Rep Power: 0 |
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) } |
|
|
|
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 |