disable pycompact test write to file and ignore .so files
This commit is contained in:
parent
b7af4002ba
commit
c650f61ea3
2 changed files with 19 additions and 12 deletions
1
code/.gitignore
vendored
1
code/.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
|||
*.o
|
||||
*.so
|
||||
*.pyc
|
||||
*.ipynb
|
||||
|
|
|
|||
|
|
@ -215,6 +215,8 @@ def read_data (fname):
|
|||
|
||||
def validate_trigonometric():
|
||||
|
||||
writeToFile = False
|
||||
|
||||
shape = (256, 256, 512)
|
||||
|
||||
nz, ny, nx = shape
|
||||
|
|
@ -245,7 +247,18 @@ def validate_trigonometric():
|
|||
|
||||
Y1[:] = np.sin(1.1 * xx) * np.sin(3.0 * yy) * np.sin(2.0 * zz)[:]
|
||||
true[:] = (1.1 * np.cos(1.1 * xx) * np.sin(3.0 * yy) * np.sin(2.0 * zz))[:]
|
||||
dY1 = cs.ddx(Y1)[:]
|
||||
|
||||
print (dY1.min(), dY1.max())
|
||||
|
||||
print (true.min(), true.max())
|
||||
|
||||
relerr = (dY1 - true) / true
|
||||
|
||||
print (np.nanmin(relerr), np.nanmax(relerr))
|
||||
|
||||
|
||||
if writeToFile:
|
||||
y = np.memmap("phi", dtype=np.float64, mode="w+", shape=cs.shape)
|
||||
y[:] = Y1[:]
|
||||
|
||||
|
|
@ -253,16 +266,9 @@ def validate_trigonometric():
|
|||
dydxtrue[:] = true[:]
|
||||
|
||||
dydx = np.memmap("dphi", dtype=np.float64, mode="w+", shape=cs.shape)
|
||||
dydx[:] = cs.ddx(Y1)[:]
|
||||
dydx[:] = dY1[:]
|
||||
|
||||
|
||||
print (dydx.min(), dydx.max())
|
||||
print (dydxtrue.min(), dydxtrue.max())
|
||||
|
||||
relerr = (dydx - dydxtrue) / dydxtrue
|
||||
|
||||
print (np.nanmin(relerr), np.nanmax(relerr))
|
||||
|
||||
# cs.verify_nonp_coef()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue