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

Segmentation Fault with Get_Domain?

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 17, 2016, 20:34
Default Segmentation Fault with Get_Domain?
  #1
New Member
 
Joey
Join Date: Jun 2016
Posts: 1
Rep Power: 0
joeyliu is on a distinguished road
Hi all,

I'm having a bit of trouble with my UDF and can't seem to find anything to solve it. My code is simple, but I hope that will only make it easier for someone to spot my mistake. I'm basically just trying to create a pressure profile. I'm also using DEFINE_ON_DEMAND instead of DEFINE_PROFILE because my goal is to eventually use data from other surfaces in this code (which, by my understanding, will require those domains and threads as well).

#include <udf.h>
DEFINE_ON_DEMAND(pressure_profile_TEST)
{

Domain *d = Get_Domain(1);

Thread *t = Lookup_Thread(d, 5);

int i;

real x[ND_ND];

real y;

face_t f;

begin_f_loop(f, t)

{

F_CENTROID(x, f, t);

y = x[1];

F_PROFILE(f, t, i) = 10;

}

end_f_loop(f, t);


}


Running this yields the error:
Error: received a fatal signal (Segmentation fault). Error Object: #f
Thanks for reading! Please let me know if you have any suggestions.
joeyliu is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Segmentation fault when running dieselFoam or dieselEngineFoam in parallel francesco OpenFOAM Bugs 4 May 2, 2017 22:59
ABL use of fixed shear stress leads to segmentation fault 11 cristopf OpenFOAM Running, Solving & CFD 1 December 23, 2016 17:57
Segmentation fault when running in parallel Pj. OpenFOAM Running, Solving & CFD 3 April 8, 2015 09:12
Segmentation Fault w/ compiled OF 2.2.0 - motorBike example sudo OpenFOAM Running, Solving & CFD 3 April 2, 2013 18:27
segmentation fault when installing OF-2.1.1 on a cluster Rebecca513 OpenFOAM Installation 9 July 31, 2012 16:06


All times are GMT -4. The time now is 20:51.