smbinterp/plots/resolution/resolution_3D.py
Stephen Mardson McQuay 2246b53ee3 minor: notes and moved a file for the resolution study
--HG--
rename : gmsh/resolution_3D.py => plots/resolution/resolution_3D.py
2011-05-28 13:05:55 -06:00

28 lines
876 B
Python

import sys
import sqlite3
import numpy as np
from interp.tools import rms
con = sqlite3.connect(sys.argv[1])
cur = con.cursor()
orders = np.array(cur.execute('select distinct ord from results').fetchall())[:,0]
eps = np.array(cur.execute('select distinct ep from results').fetchall())[:,0]
res = np.array(cur.execute('select distinct res from results').fetchall())[:,0]
params = (
(2,64),
(3,64),
(4,64),
(5,64),
)
for r in res:
for order, ep in params:
# print np.array([np.abs(i[FINAL] - i[EXACT]) for i in data if i[ORDER] == order and i[EP] == ep])),
cur_results = cur.execute('select abs(exact - final) from results where res = ? and ep = ? and ord = ?',
(int(r), int(ep),int(order)))
cur_ = np.array(cur_results.fetchall())
print rms(np.array(cur_)),
print