Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
weihuayi committed Jul 15, 2020
1 parent 9116190 commit 81f68d7
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Contribution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@





30 changes: 30 additions & 0 deletions example/MeshFactory_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env python3
#
import sys
import numpy as np

import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

from fealpy.mesh import MeshFactory

mf = MeshFactory()

box = [0, 1, 0, 1]
mesh = mf.boxmesh2d(box, nx=10, ny=10, meshtype='tri')



# plot
GD = mesh.geo_dimension()
fig = plt.figure()
if GD == 2:
axes = fig.gca()
mesh.add_plot(axes)
mesh.find_node(axes, showindex=True)
mesh.find_cell(axes, showindex=True)
elif GD == 3:
axes = fig.gca(projection='3d')
mesh.add_plot(axes)

plt.show()

0 comments on commit 81f68d7

Please sign in to comment.