used verts instead of points

This commit is contained in:
Stephen Mardson McQuay 2010-11-08 16:26:20 -07:00
parent c6a9f38046
commit 53d555914e

View File

@ -4,10 +4,10 @@ import unittest
import math import math
from baker import run_baker from interp.baker import run_baker
from grid.DD import grid from interp.grid.DD import grid
from grid.simplex import contains from interp.grid.simplex import contains
def exact_func(X): def exact_func(X):
x = X[0] x = X[0]
@ -16,7 +16,7 @@ def exact_func(X):
class TestSequenceFunctions(unittest.TestCase): class TestSequenceFunctions(unittest.TestCase):
def setUp(self): def setUp(self):
self.points = [ self.verts = [
[ 0.25, 0.40], # 0 [ 0.25, 0.40], # 0
[ 0.60, 0.80], # 1 [ 0.60, 0.80], # 1
[ 0.65, 0.28], # 2 [ 0.65, 0.28], # 2
@ -26,11 +26,11 @@ class TestSequenceFunctions(unittest.TestCase):
[ 0.80, 0.50], # 6 [ 0.80, 0.50], # 6
[ 0.35, 0.15], # 7 [ 0.35, 0.15], # 7
] ]
self.q = [exact_func(p) for p in self.points] self.q = [exact_func(p) for p in self.verts]
self.X = [0.55, 0.45] self.X = [0.55, 0.45]
self.g = grid(self.points, self.q) self.g = grid(self.verts, self.q)
self.g.construct_connectivity() self.g.construct_connectivity()
self.R = self.g.create_mesh(range(3)) self.R = self.g.create_mesh(range(3))
@ -40,7 +40,7 @@ class TestSequenceFunctions(unittest.TestCase):
self.accuracy = 8 self.accuracy = 8
def test_R_contains_X(self): def test_R_contains_X(self):
self.assertTrue(contains(self.X, self.R.points)) self.assertTrue(contains(self.X, self.R.verts))
def test_RunBaker_1_extra_point(self, extra=1): def test_RunBaker_1_extra_point(self, extra=1):
S = self.g.create_mesh(range(3, 3 + extra)) S = self.g.create_mesh(range(3, 3 + extra))