You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
jibingquanm
changed the title
调用TriangleMesh.from_domain_distmesh(domain, hmin, maxit=maxit)的问题
调用TriangleMesh.from_domain_distmesh(domain, maxit=maxit)的问题
Mar 14, 2024
魏老师:
您好!我有两个问题想向您请教哇。
(1)根据您回复我如何绘制带圆孔矩形区域的命令,我在最新版本的fealpy中已经可以复现您的运行结果。然后根据您回复中的命令,我想扩展一下,在矩形区域中挖掉一个小矩形,于是导入了 import BoxWithBoxHolesDomain,即如下命令
import matplotlib.pyplot as plt
from fealpy.mesh import TriangleMesh
from fealpy.geometry import BoxWithBoxHolesDomain
box=[-2, 2, -2, 2],
boxs=[(-1, 1, -1, 1)]
hmin = 0.1
hmax = 0.1
domain = BoxWithBoxHolesDomain(box, boxs, hmin=hmin, hmax=hmax)
mesh = TriangleMesh.from_domain_distmesh(domain, maxit=100)
fig = plt.figure()
axes = fig.add_subplot(1, 1, 1)
mesh.add_plot(axes)
plt.show()
运行之后却是始终报错“AttributeError: 'BoxWithBoxHolesDomain' object has no attribute 'shape'”
魏老师,我想向您请教一下,我只是将区域更换了为了,domain = BoxWithBoxHolesDomain(box, boxs, hmin=hmin, hmax=hmax), 为什么会出现此类报错呢,,应该怎么正确调用呢?
(2)魏老师,我这阵子反复研读学习了您在notebook中的帮助文档,受益良多,期待您的后续更新哇!
感谢您和您团队的无私工作!!!祝您工作顺利^ ^。
纪兵权
The text was updated successfully, but these errors were encountered: