Doubt about real x[ND_ND] declaration in FLUENT udf
Hi,
we declare the position vector in a udf as x[ND_ND]; my doubt is what is the data type (double? float?)of this x[0] variable .. if I'm using double precision solver?? and in single precision solver? This seems to cause certain weird unexpected random kindoff results in the conditions of "IF else" statements in my udfs..plz replyy ! thnx in advance |
I think the UDF manual covers this topic.
Variables declared as real are double if you are using the double precision solver. If you dont trust the manual, declare x as double. |
u define it as real and fluent udf will automatically convert it to float in the single precison solver and double in double precision solver.
|
Zheng, why do you keep repeating my answers?
|
Quote:
|
Quote:
I tried it .. but it gives an error "Segmentation Violation" in the "EXECUTE_ON_DEMAND" udf im using .. it involves the comparison of 2-different array elements at a time .. i tried declaring on array as a double and other as a real(double precision solver) .. however if i declare both as real it runs successfully..isn't this weird? |
All times are GMT -4. The time now is 10:53. |