Skip to content
Snippets Groups Projects
Commit 8857e16f authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

remove unused function

parent 8f92a2b1
No related branches found
No related tags found
No related merge requests found
......@@ -136,45 +136,6 @@ def padd_with_zeros(
b[n1-m1//2: , n0-m0//2: , :m2//2+1] = a[m1-m1//2: , m0-m0//2: , :m2//2+1]
return b
def _get_kindices(
n = 64):
nx = n
nz = n
kx = np.arange(0, nx//2+1, 1).astype(np.float)
kvals = []
radii = set([])
index = []
for iz in range(1, kx.shape[0]):
for ix in range(1, kx.shape[0]):
kval = (kx[iz]**2+kx[ix]**2)**.5
tmp = math.modf(kval)
if (tmp[0] == 0 and tmp[1] <= nx//2):
kvals.append([kx[iz], kx[ix]])
radii.add(math.floor(kval))
index.append([ix, iz])
kvals = np.array(kvals)
index = np.array(index)
new_kvals = []
ordered_kvals = []
radius_vals = []
ii = []
for r in radii:
ncircle = np.count_nonzero((kvals[:, 0]**2 + kvals[:, 1]**2)**.5 == r)
indices = np.where((kvals[:, 0]**2 + kvals[:, 1]**2)**.5 == r)[0]
if ncircle > 2:
ordered_kvals.append(kvals[indices])
new_kvals += list(kvals[indices])
radius_vals.append(r)
ii += list(index[indices])
ii = np.array(ii)
good_indices = np.where(ii[:, 1] > 0)[0]
i1 = (kx.shape[0] - 1)*2 - ii[good_indices, 1]
i0 = ii[good_indices, 0]
i1 = np.concatenate((ii[:, 1], i1)),
i0 = np.concatenate((ii[:, 0], i0)),
return np.vstack((i0, i1)).T.copy()
try:
import sympy as sp
rational0 = sp.Rational(0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment