polish for inclusion into thesis

This commit is contained in:
sm
2011-06-07 22:37:12 -06:00
parent 14fef76b2b
commit c682b12bea
10 changed files with 43 additions and 76 deletions
-6
View File
@@ -1,6 +1,5 @@
import os
import inspect
import numpy as np
import logging
@@ -27,8 +26,6 @@ def baker_exact_2D(X):
"""
x ,y = X
# TODO: this is not baker's function!! this is:
# np.power(np.sin(x*np.pi/2.0) * np.sin(y*np.pi/2.0),2)
answer = np.power((np.sin(x * np.pi) * np.cos(y * np.pi)), 2)
log.debug(answer)
return answer
@@ -83,6 +80,3 @@ def improved(qlin, err, final, exact):
return True
else:
return False
def percent_improvement(answer, exact):
return np.abs(answer['error']) / exact