Replies: 1 comment 2 replies
-
The variables won't go out of scope but I don't see how you update them at each time step as you declare them locally in |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am facing an interesting issue.
I am trying to compute long time averages of different terms that depend on fluctuating velocities and pressures. I implemented occa kernels for calculating these terms with the fluctuating quantities as input. I am trying to register these extra terms as fields in
UDF_Setup()
. Here is an example snippet.So that you know, each term that is pushed back into tavgFields has a calculation associated with it. However, when I run this, all I get is zeros. My speculation is that these calculations go out of scope once
UDF_Setup
is done, and these calculations are never performed afterward (they need to be performed each timestep). Please correct me if I am incorrect in my understanding. If that is the case, is there a better way to register and compute time averages of such custom terms?I really appreciate your help.
With sincere regards,
Makrand
Beta Was this translation helpful? Give feedback.
All reactions