Skip to content

Commit

Permalink
udpate
Browse files Browse the repository at this point in the history
  • Loading branch information
weihuayi committed Feb 27, 2023
1 parent cc4ee20 commit 562f7f0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
1 change: 1 addition & 0 deletions fealpy/mesh/HexahedronMesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class HexahedronMeshDataStructure(Mesh3dDataStructure):
[4, 0], [3, 0], [5, 0], [0, 2],
[2, 4], [4, 3], [3, 5], [5, 2],
[1, 4], [1, 3], [1, 5], [2, 1]])
ccw = np.array([0, 1, 2, 3])
NVC = 8
NEC = 12
NFC = 6
Expand Down
5 changes: 0 additions & 5 deletions fealpy/mesh/Mesh2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,6 @@ def find_node(self, axes, node=None,
if node is None:
node = self.node


if (index is None) and (showindex == True):
NN = self.number_of_nodes()
index = np.array(range(NN))

find_node(axes, node,
index=index, showindex=showindex,
color=color, markersize=markersize,
Expand Down
3 changes: 1 addition & 2 deletions fealpy/mesh/Mesh3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ def add_plot(
if isinstance(plot, ModuleType):
from mpl_toolkits.mplot3d import Axes3D
fig = plot.figure()
fig.set_facecolor('white')
axes = fig.gca(projection='3d')
axes = plot.subplot(projection='3d')
else:
axes = plot

Expand Down
1 change: 1 addition & 0 deletions fealpy/mesh/TetrahedronMesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
class TetrahedronMeshDataStructure(Mesh3dDataStructure):
OFace = np.array([(1, 2, 3), (0, 3, 2), (0, 1, 3), (0, 2, 1)])
SFace = np.array([(1, 2, 3), (0, 2, 3), (0, 1, 3), (0, 1, 2)])
ccw = np.array([0, 1, 2])

localFace = np.array([(1, 2, 3), (0, 3, 2), (0, 1, 3), (0, 2, 1)])
localEdge = np.array([(0, 1), (0, 2), (0, 3), (1, 2), (1, 3), (2, 3)])
Expand Down
8 changes: 3 additions & 5 deletions fealpy/mesh/mesh_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def find_node(
index = range(node.shape[0])
elif (type(index) is np.int_):
index = np.array([index], dtype=np.int_)
elif (type(index) is np.ndarray) and (index.dtype == np.bool):
elif (type(index) is np.ndarray) and (index.dtype == np.bool_):
index, = np.nonzero(index)
elif (type(index) is list) and (type(index[0]) is np.bool):
elif (type(index) is list) and (type(index[0]) is np.bool_):
index, = np.nonzero(index)
else:
pass
Expand Down Expand Up @@ -120,7 +120,7 @@ def find_entity(
else:
pass #TODO: raise a error
elif (type(index) is np.ndarray) :
if index.dtype == np.bool:
if index.dtype == np.bool_:
index, = np.nonzero(index)
elif (type(index) is list) & (type(index[0]) is np.bool_):
index, = np.nonzero(index)
Expand Down Expand Up @@ -438,8 +438,6 @@ def show_mesh_3d(
color=edgecolor)
return axes.add_collection3d(edges)

face = mesh.boundary_face(threshold=threshold)

face = mesh.entity('face')
isBdFace = mesh.ds.boundary_face_flag()
if threshold is None:
Expand Down
2 changes: 1 addition & 1 deletion tutorial/lagrange_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

from fealpy.decorator import baricentric
from fealpy.decorator import barycentric
from fealpy.mesh import MeshFactory as MF
from fealpy.functionspace import LagrangeFiniteElementSpace

Expand Down

0 comments on commit 562f7f0

Please sign in to comment.