changed name of get_error func, and allowed for up to 6-th order interp. also, returning the phi multiplier for test case consumption
This commit is contained in:
parent
6f63173489
commit
99b7dd6997
@ -103,7 +103,7 @@ def qlinear_3D(X, R):
|
|||||||
qlin = sum([q_i * phi_i for q_i, phi_i in zip(R.q, phis)])
|
qlin = sum([q_i * phi_i for q_i, phi_i in zip(R.q, phis)])
|
||||||
return phis, qlin
|
return phis, qlin
|
||||||
|
|
||||||
def get_error_sauron(phi, R, S, order = 2):
|
def get_error(phi, R, S, order = 2):
|
||||||
log.debug("len(phi): %d"% len(phi))
|
log.debug("len(phi): %d"% len(phi))
|
||||||
B = [] # baker eq 9
|
B = [] # baker eq 9
|
||||||
w = [] # baker eq 11
|
w = [] # baker eq 11
|
||||||
@ -175,8 +175,8 @@ def run_baker(X, R, S, order=2):
|
|||||||
if order == 1:
|
if order == 1:
|
||||||
answer['qlin'] = qlin
|
answer['qlin'] = qlin
|
||||||
return answer
|
return answer
|
||||||
elif order in (2,3,4):
|
elif order in (2,3,4,5,6):
|
||||||
error_term, abc = get_error_sauron(phi, R, S, order)
|
error_term, abc = get_error(phi, R, S, order)
|
||||||
else:
|
else:
|
||||||
raise Exception('unsupported order for baker method')
|
raise Exception('unsupported order for baker method')
|
||||||
|
|
||||||
@ -185,6 +185,7 @@ def run_baker(X, R, S, order=2):
|
|||||||
answer['qlin' ] = qlin
|
answer['qlin' ] = qlin
|
||||||
answer['error'] = error_term
|
answer['error'] = error_term
|
||||||
answer['final'] = q_final
|
answer['final'] = q_final
|
||||||
|
answer['abc' ] = abc
|
||||||
|
|
||||||
return answer
|
return answer
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user