Skip to content

Commit

Permalink
use the dealiased value for non-conservative convection
Browse files Browse the repository at this point in the history
  • Loading branch information
qiauil committed Oct 22, 2024
1 parent 6fc5697 commit c6daa20
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions exponax/nonlin_fun/_convection.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ def _multi_channel_nonconservative_eval(
)
u_hat_dealiased = self.dealias(u_hat)
u = self.ifft(u_hat_dealiased)
nabla_u = self.ifft(self.derivative_operator[None, :] * u_hat[:, None])
nabla_u = self.ifft(
self.derivative_operator[None, :] * u_hat_dealiased[:, None]
)
conv_u = jnp.sum(
u[None, :] * nabla_u,
axis=1,
Expand Down Expand Up @@ -225,7 +227,7 @@ def _single_channel_nonconservative_eval(
"""
u_hat_dealiased = self.dealias(u_hat)
u = self.ifft(u_hat_dealiased)
nabla_u = self.ifft(self.derivative_operator * u_hat)
nabla_u = self.ifft(self.derivative_operator * u_hat_dealiased)
conv_u = jnp.sum(
u * nabla_u,
axis=0,
Expand Down

0 comments on commit c6daa20

Please sign in to comment.