mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-07 10:40:46 +08:00
fix poly map
This commit is contained in:
+12
-12
@@ -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"))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user