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
+8 -11
View File
@@ -20,8 +20,9 @@ class grid(object):
"""
verts = array of arrays (if passed in, will convert to numpy.array)
[
[x0,y0],
[x1,y1], ...
[x0,y0 <, z0>],
[x1,y1 <, z1>],
...
]
q = array (1D) of physical values
@@ -97,10 +98,9 @@ class grid(object):
"""
this returns two grid objects: R and S.
R is a grid object that is supposedly a containing simplex around point X
R is a grid object that is a containing simplex around point X
S is S_j from baker's paper : some verts from all point that are not the
simplex
S : some verts from all points that are not the simplex
"""
simplex_size = self.dim + 1
log.debug("extra verts: %d" % extra_points)
@@ -228,8 +228,9 @@ class cell(object):
X = point of interest
G = corrensponding grid object (G.verts)
because of the way i'm storing things, a cell simply stores indicies, and
so one must pass in a reference to the grid object containing real verts.
because of the way i'm storing things, a cell simply stores indicies,
and so one must pass in a reference to the grid object containing real
verts.
this simply calls grid.simplex.contains
"""
@@ -255,10 +256,6 @@ def contains(X, R):
tests if X (point) is in R
R is a simplex, represented by a list of n-degree coordinates
it now correctly checks for 2/3-D verts
TODO: write unit test ...
"""
phis = get_phis(X, R)
-3
View File
@@ -51,9 +51,6 @@ class dgrid(basegrid):
def construct_connectivity(self):
"""
a call to this method prepares the internal connectivity structure.
this is part of the __init__ for a interp.grid.delaunay.grid, but can be
called from any grid object
"""
log.info('start')
qdelaunay_string = get_qdelaunay_dump_str(self)
-14
View File
@@ -1,14 +0,0 @@
def parse_qhull_file(filename, verbose=False):
f = open(filename, 'r')
if verbose:
print 'filename: ', filename
degree = int(f.readline().strip())
print "degree:", degree
print "number of points", f.readline().strip()
verts = []
for p in f:
v = [float(i) for i in p.strip().split()]
verts.append(v)
return verts