partially implemented using new data structure in point lookup

I spoke with Dr. Gorrell about first trying to call the nearest-neighbor routine, releasing the trapped exception where the matrix ends up being singular, and trapping it in the grid object's run_baker, where I could then call the connectivity-based lookup routine. Those are my next steps, as well as starting to think about pushing the 3D front ahead this week.
This commit is contained in:
smcquay@cfdviz2
2010-02-26 14:44:29 -07:00
parent 2792329eaa
commit a25e6d03d1
2 changed files with 32 additions and 14 deletions
+14 -3
View File
@@ -111,6 +111,13 @@ class grid(object):
"""
this returns two grid objects: R and S.
this function differes from the get_simplex_and_nearest_points
function in that it builds up the extra points based on
connectivity information, not just nearest-neighbor.
in theory, this will work much better for situations like
points near a short edge in a boundary layer cell where the
nearest points would all be colinear
R is a grid object that is the (a) containing simplex around point X
S is a connectivity-based nearest-neighbor lookup, limited to 3 extra points
"""
@@ -128,7 +135,7 @@ class grid(object):
if not simplex:
raise AssertionError('no containing simplex found')
simplex_set = set(simplex.verts)
R = self.create_mesh(simplex.verts)
@@ -139,8 +146,12 @@ class grid(object):
return R, S
def run_baker(self, X):
(R, S) = self.get_simplex_and_nearest_points(X)
def run_baker(self, X, connectivity_based = False):
print >>sys.stderr, "suxor"
if connectivity_based:
(R, S) = self.get_points_conn(X)
else:
(R, S) = self.get_simplex_and_nearest_points(X)
return run_baker(X, R, S)
def construct_connectivity(self):