fix poly map

This commit is contained in:
seogi_macbook
2015-09-25 23:29:17 -07:00
parent 2c6a2ae35c
commit 309e7f84cf
+12 -12
View File
@@ -752,18 +752,18 @@ class PolyMap(IdentityMap):
raise(Exception("Input for normal = X or Y or Z"))
#3D
elif self.mesh.dim == 3:
# X = self.mesh.gridCC[:,0]
# Y = self.mesh.gridCC[:,1]
# Z = self.mesh.gridCC[:,1]
# if self.normal =='X':
# f = polynomial.polyval2d(Y, Z, c.reshape((self.order[0]+1,self.order[1]+1))) - X
# elif self.normal =='Y':
# f = polynomial.polyval2d(X, Z, c.reshape((self.order[0]+1,self.order[1]+1))) - Y
# elif self.normal =='Z':
# f = polynomial.polyval2d(X, Y, c.reshape((self.order[0]+1,self.order[1]+1))) - Z
# else:
# raise(Exception("Input for normal = X or Y or Z"))
# else:
X = self.mesh.gridCC[:,0]
Y = self.mesh.gridCC[:,1]
Z = self.mesh.gridCC[:,2]
if self.normal =='X':
f = polynomial.polyval2d(Y, Z, c.reshape((self.order[0]+1,self.order[1]+1))) - X
elif self.normal =='Y':
f = polynomial.polyval2d(X, Z, c.reshape((self.order[0]+1,self.order[1]+1))) - Y
elif self.normal =='Z':
f = polynomial.polyval2d(X, Y, c.reshape((self.order[0]+1,self.order[1]+1))) - Z
else:
raise(Exception("Input for normal = X or Y or Z"))
else:
raise(Exception("Only supports 2D"))