testCylEdgeCurl start

This commit is contained in:
rowanc1
2014-02-23 13:52:23 -08:00
parent 969ebaba6e
commit 72510420a6
2 changed files with 16 additions and 3 deletions
+2
View File
@@ -217,6 +217,8 @@ class CylMesh(BaseTensorMesh):
@property
def edgeCurl(self):
"""The edgeCurl property."""
if self.nCy > 1:
raise NotImplementedError('Edge curl not yet implemented for nCy > 1')
if getattr(self, '_edgeCurl', None) is None:
#1D Difference matricies
dr = sp.spdiags((np.ones((self.nCx+1, 1))*[-1, 1]).T, [-1,0], self.nCx, self.nCx, format="csr")
+14 -3
View File
@@ -136,7 +136,6 @@ class TestCyl2DMesh(unittest.TestCase):
MESHTYPES = ['uniformCylMesh']
MESHDIMENSION = 2
call2 = lambda fun, xyz: fun(xyz[:, 0], xyz[:, 2])
call3 = lambda fun, xyz: fun(xyz[:, 0], xyz[:, 1], xyz[:, 2])
cyl_row2 = lambda g, xfun, yfun: np.c_[call2(xfun, g), call2(yfun, g)]
@@ -147,10 +146,10 @@ cylF2 = lambda M, fx, fy: np.vstack((cyl_row2(M.gridFx, fx, fy), cyl_row2(M.grid
# cylE3 = lambda M, ex, ey, ez: np.vstack((cyl_row3(M.gridEx, ex, ey, ez), cyl_row3(M.gridEy, ex, ey, ez), cyl_row3(M.gridEz, ex, ey, ez)))
class TestFaceDiv(OrderTest):
class TestFaceDiv2D(OrderTest):
name = "FaceDiv"
meshTypes = MESHTYPES
meshDimension = MESHDIMENSION
meshDimension = 2
def getError(self):
@@ -173,6 +172,18 @@ class TestFaceDiv(OrderTest):
def test_order(self):
self.orderTest()
class TestEdgeCurl2D(OrderTest):
name = "EdgeCurl"
meshTypes = MESHTYPES
meshDimension = 2
def getError(self):
#TODO!
# def test_order(self):
# self.orderTest()
class TestCyl3DMesh(unittest.TestCase):
def setUp(self):