mirror of
https://github.com/wassname/simpeg.git
synced 2026-06-29 07:24:20 +08:00
multi face refinement
This commit is contained in:
@@ -114,7 +114,10 @@ class TreeMesh(object):
|
||||
|
||||
def refineFace(self, index):
|
||||
f = self._faces[index,:]
|
||||
nodeNums = self._edges[f[[FEDGE0, FEDGE1]],:][:,[ENODE0, ENODE1]]
|
||||
if f[ACTIVE] == 0:
|
||||
# search for the children up to one level deep
|
||||
subInds = np.argwhere(self._faces[:,PARENT] == index).flatten()
|
||||
return subInds, self._faces[subInds,:]
|
||||
|
||||
self._faces[index, ACTIVE] = 0
|
||||
|
||||
@@ -135,6 +138,7 @@ class TreeMesh(object):
|
||||
E2i, E2 = self.refineEdge(f[FEDGE2])
|
||||
E3i, E3 = self.refineEdge(f[FEDGE3])
|
||||
|
||||
nodeNums = self._edges[f[[FEDGE0, FEDGE1]],:][:,[ENODE0, ENODE1]]
|
||||
newNode, node = self.addNode(nodeNums)
|
||||
|
||||
# Refine the inner edges
|
||||
@@ -479,11 +483,6 @@ if __name__ == '__main__':
|
||||
plt.spy(tM.faceDiv)
|
||||
tM.plotGrid(ax=plt.subplot(212))
|
||||
|
||||
|
||||
print tM.vol
|
||||
print tM.area
|
||||
print tM.edge
|
||||
|
||||
# plt.figure(2)
|
||||
# plt.plot(SortByX0(tM.gridCC),'b.')
|
||||
plt.show()
|
||||
|
||||
Reference in New Issue
Block a user