add two functions with different shape #14936
Unanswered
ian204
asked this question in
Show and tell
Replies: 1 comment 2 replies
-
Hi - thanks for the question. I'm having trouble understanding what your question is – do you think you could express it in terms of some example code, and show more explicitly what operation you want to do on which quantities? |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue solved
I solved my problem in a simple way - may be not the best but it works. See below
Hello everybody,
I am a very beginner user of Jax and I am trying to use it for solving PDEs. I have the following problem for which I have made some search and I have not found an answer. The problem is as follows.
I have a function p(x, y), the pressure, and divu(params_u, x, y), the divergence of velocity, where params_u are the weights of function u (the velocity), and I need to update p(x, y):
p(x, y) <-- p(x, y) - r*divu(params_u, x, y) (with r parameter).
I looks like a recursive function, but it is not efficient to follow this approach because otherwise I have to save all the weights params_u.
Rather I would like to save
p_old(x, y) = p(x, y) - r*divu(params_u, x, y)
and use it next step time to update p(x, y).
Is there any way to do this?
Many thanks.
Beta Was this translation helpful? Give feedback.
All reactions