diff --git a/interp/baker/__init__.py b/interp/baker/__init__.py index 93e90a3..c87b027 100644 --- a/interp/baker/__init__.py +++ b/interp/baker/__init__.py @@ -145,7 +145,8 @@ def get_error(phi, R, S, order = 2): def run_baker(X, R, S, order=2): """ - This is the main function to call to get an interpolation to X from the input meshes + This is the main function to call to get an interpolation to X from the + input meshes X -- the destination point (2D) X = [0,0] diff --git a/interp/grid/__init__.py b/interp/grid/__init__.py index 1e0f74b..4ad1d23 100644 --- a/interp/grid/__init__.py +++ b/interp/grid/__init__.py @@ -80,8 +80,8 @@ class grid(object): def create_mesh(self, indicies): """ - this function takes a list of indicies, and then creates - and returns a grid object (collection of verts and q). + this function takes a list of indicies, and then creates and returns a + grid object (collection of verts and q). note: the input is indicies, the grid contains verts """ @@ -93,10 +93,10 @@ 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 (TODO: it tends not to be) + R is a grid object that is supposedly 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 is S_j from baker's paper : some verts from all point that are not the + simplex """ log.debug("extra verts: %d" % extra_points) log.debug("simplex size: %d" % simplex_size) @@ -215,10 +215,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 """ diff --git a/interp/grid/simplex.py b/interp/grid/simplex.py index 0d58890..19699f9 100644 --- a/interp/grid/simplex.py +++ b/interp/grid/simplex.py @@ -4,8 +4,9 @@ TOL = 1e-8 def contains(X, R): """ - tests if X (point) is in R (a simplex, - represented by a list of n-degree coordinates) + 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