Check if energy is enabled from inside udf
I wrote a udf which reads the temperature field using macro C_T(c,t). However, if the energy equation is not enabled the udf generates a SEGMENTATION FAULT.
Is it possible to check from within the udf if there is a temperature field? Dragos |
Quote:
DEFINE_ON_DEMAND(test_temp_field) { Domain *domain; Thread *c_thread; domain=Get_Domain(1); thread_loop_c(c_thread, domain) /*loops over all cell threads in domain*/ { if(NNULLP(THREAD_STORAGE(c_thread,SV_T))) Message0("Temp. field exists\n"); else Message0("Temp. field doesn't exist\n"); } |
Thanks Ji,
Do you have a similar check for species? Dragos |
Quote:
if(NNULLP(THREAD_STORAGE(c_thread,SV_Y_I(i)))) i is the number of your specified species. |
SV_Y_I is not working (sintax error), instead I think SV_Y_0 should be used and then check for particular SV_Y_I(i)
|
Quote:
Code:
if(!rp_spe) |
All times are GMT -4. The time now is 01:03. |