started testing the parametric varying of the solution scheme

This commit is contained in:
Stephen Mardson McQuay 2010-10-29 12:39:45 -06:00
parent fe1564881a
commit 699d0c1796

View File

@ -5,6 +5,7 @@ import sys
import numpy as np import numpy as np
from interp.grid.gmsh import gmsh_grid from interp.grid.gmsh import gmsh_grid
from interp.tools import exact_func, improved_answer
if __name__ == '__main__': if __name__ == '__main__':
if len(sys.argv) != 2: if len(sys.argv) != 2:
@ -14,7 +15,45 @@ if __name__ == '__main__':
g = gmsh_grid(sys.argv[1]) g = gmsh_grid(sys.argv[1])
g.dump_to_blender_files() g.dump_to_blender_files()
X = np.array([0.2, 0.2, 0.0]) X = np.array([0.2, 0.5, 0.0])
R = g.get_containing_simplex(X) R = g.get_containing_simplex(X)
print R
R, S = g.get_simplex_and_nearest_points(X, 10)
print "r", R
print "s", S
print g a = g.run_baker(X)
print a
e = exact_func(X)
print e
print improved_answer(a, e)
a = g.run_baker(X, extra_points = 5)
print a
e = exact_func(X)
print e
print improved_answer(a, e)
a = g.run_baker(X, extra_points = 7)
print a
e = exact_func(X)
print e
print improved_answer(a, e)
a = g.run_baker(X, order=3)
print a
e = exact_func(X)
print e
print improved_answer(a, e)
a = g.run_baker(X, order=3, extra_points = 5)
print a
e = exact_func(X)
print e
print improved_answer(a, e)
a = g.run_baker(X, order=3, extra_points = 7)
print a
e = exact_func(X)
print e
print improved_answer(a, e)