|
[Sponsors] |
June 17, 2016, 20:34 |
Segmentation Fault with Get_Domain?
|
#1 |
New Member
Joey
Join Date: Jun 2016
Posts: 1
Rep Power: 0 |
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. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |