Running a UDF only once per timestep
Is there any possibility to tun a UDF (like DEFINE_SOURCE for example) only ONCE every timestep and not on every iteration?
if ( first_iteration )
enter your calculations here
I got this from:
Let me know how it goes.
Either what Daniel suggested or you can use the macro EXECUTE_AT_END. Depends on your need, whether you want to execute at beginning or at the end of a time-step.
DEFINE_EXECUTE_AT_END is a general-purpose macro that is executed at the end of an iteration in a steady state run, or at the end of a time step in a transient run.
|All times are GMT -4. The time now is 15:16.|