This commit is contained in:
Stephen Mardson McQuay
2011-02-02 11:52:53 -07:00
parent 046e24b67d
commit 2329479a64
4 changed files with 32 additions and 29 deletions
+3 -4
View File
@@ -75,21 +75,19 @@ def get_phis(X, R):
def qlinear(X, R):
"""
this calculates the linear portion of q from X to R
this calculates the linear portion of q from R to X
also, this is baker eq 3
X = destination point
R = simplex points
q = CFD quantities of interest at the simplex points
q = quantity of interest at the simplex points
"""
phis = get_phis(X, R.verts)
qlin = np.sum([q_i * phi_i for q_i, phi_i in zip(R.q, phis)])
return phis, qlin
qlinear_3D = qlinear
def get_error(phi, R, S, order = 2):
log.debug("len(phi): %d"% len(phi))
B = [] # baker eq 9
@@ -150,6 +148,7 @@ def run_baker(X, R, S, order=2):
S = extra points
"""
log.debug("order = %d" % order)
log.debug("extra points = %d" % len(S.verts))
answer = {
'qlin': None,