CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   can we initialize an array in UDF? (https://www.cfd-online.com/Forums/fluent-udf/44640-can-we-initialize-array-udf.html)

blueberry May 8, 2007 05:42

can we initialize an array in UDF?
 
Dear all, I try to initialize an array (real AC[3][60]) using the following sentences in the UDF of DEFINE_EXECUTE_AT_END(): for (i=0;i<3;i++)

{for (j=0;j<60;j++)

{AC[i][j]=1.0;} } The task of this UDF is to write useful information into one file. Although this UDF can be successfully compiled, there is error information if iterate. The information is like this: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: () If I did not initialize the array AC[][], the iteration is correct and write some information into my specified file. Could somebody give me advices on it? Thanks a lot in advance!


blueberry May 10, 2007 04:48

Re: can we initialize an array in UDF?
 
So strange! I try to compile it using compiled. Then it works.Does the array could not be initialized if using interpreted for compile?

morourke April 14, 2009 12:00

Blueberry,

I have a similar problem which has been giving me trouble. I just posted a thread on it.


What was the solution to your problem. Your second post is unclear


All times are GMT -4. The time now is 06:17.