def interpolate(C, a): ##################################### # interpolation scalar1 = regression.convert2(C, a) scalar1.name = "source term for" + a.name + "and" + b.name scalar1.show2() scalar1.show3() vect1 = regression.convert(C, a) vect1.show() tic() a1 = sl.interpolate2(a, vect1) toc() a1.show() return a1, vect1, scalar1
print "Rsquared:", Rsquared print "shiiba coeffs:", C print "upWindCorrectionTerm: (", len(upWindCorrectionTerm), ")", upWindCorrectionTerm, ################################## # Shiiba regression results print "\n\n\n=============== Shiiba regression results ===================\n\n" Rsquared phi0 phi1 C Rsquared ##################################### # interpolation vect1 = regression.convert(C, a) vect1.show() tic() a1 = sl.interpolate2(a, vect1) toc() a1.show() diff = b - a1 diff.show() print diff.matrix.max() print diff.matrix.min() print diff.matrix.mean() print diff.matrix.var()