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

F_AREA causes ACCESS_VIOLATION

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 16, 2012, 10:52
Default F_AREA causes ACCESS_VIOLATION
  #1
New Member
 
Join Date: Nov 2012
Posts: 1
Rep Power: 0
cpmcguir is on a distinguished road
Hello,

I have a nested function in my UDF that is to return the average face area for a cell passed to it. I have been receiving the "FLUENT received fatal signal (ACCESS_VIOLATION)" error when using this code, and found that only the line F_AREA(area,f,tf) is having this effect. The model runs without issue when I impose area[0] = 1e-5 or something similar instead of using F_AREA. Any suspicion of why this could be the case?

Thanks in advance, code below

float fun_face_area(cell_t c, Thread *tc)
{
face_t f;
Thread *tf;
int n, i = 0;
float area[ND_ND], A = 0.;
c_face_loop(c,tc,n);
{
f = C_FACE(c,tc,n);
tf = C_FACE_THREAD(c,tc,n);
//area[0] = 1e-5;
F_AREA(area,f,tf);
A += NV_MAG(area);
i++;
}
return A/i;
}
cpmcguir is offline   Reply With Quote

Reply

Tags
access_violation, f_area

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 08:46.