Skip to content
Snippets Groups Projects
Commit 8968b988 authored by Pierre Augier's avatar Pierre Augier
Browse files

Use inv_Ksquare_nozero

parent 261aec1f
No related branches found
No related tags found
No related merge requests found
......@@ -10,9 +10,7 @@
:private-members:
"""
from __future__ import division
from __future__ import print_function
from builtins import object
import numpy as np
......
......@@ -106,7 +106,7 @@
Kx: Af
Ky: Af
K2: Af
inv_Ksquare_nozero: Af
@staticmethod
def _complete_params_with_default(params):
......@@ -285,7 +285,4 @@
"""
k2 = self.K2.copy()
k2[k2 == 0.0] = 1e-10
divh_fft = 1j * (self.Kx * vx_fft + self.Ky * vy_fft)
......@@ -291,6 +288,6 @@
divh_fft = 1j * (self.Kx * vx_fft + self.Ky * vy_fft)
urx_fft = vx_fft - divh_fft * self.Kx / k2
ury_fft = vy_fft - divh_fft * self.Ky / k2
urx_fft = vx_fft - divh_fft * self.Kx * self.inv_Ksquare_nozero
ury_fft = vy_fft - divh_fft * self.Ky * self.inv_Ksquare_nozero
udx_fft = vx_fft - urx_fft
udy_fft = vy_fft - ury_fft
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment