Variable definition in UDF
I am implementing a Define_execute_at_end macro in a transient simulation.
I have a variable, named "j" which has an certain initial value at first time step. But inside the macro, it's value changes and this variable is updated.
Now for second time step I need to use the updated value of "j" and the problem is here. If I define "j" as a static variable and assign an initial value to it inside the macro, how is it possible to access the updated value of "j" for the second time step? As I know the variables are all reset at each new time step unless they're already defined as "static", but how to skip that initial value for the second time step?
I appreciate any kind of help.
|All times are GMT -4. The time now is 23:11.|