fealpy
fealpy copied to clipboard
fealpy中的example一些例子运行有错误
LinearElastitcityFEM_example中 m = int(sys.argv[1]) 索引超出范围 OdeTimelineTest中 nupdate = int(sys.argv[1]) 索引超出范围 Poisson_3d_Robin_example中 if sys.argv[1] == 'solve_poisson_robin': 索引超出范围 PoissonAFEMEign中 from petsc4py import PETSc 缺少模块 PoissonFEMWithDirichletBC_example 中 from petsc4py import PETSc缺少模块No module named 'petsc4py' PoissonFEMWithNeumannBC_example中 p = int(sys.argv[1])索引超出范围
这些例子需要你输入参数啊。 sys 是用来管理输入参数的
另外, 要用 petsc 的话,也要安装才行, 只是现在在有些平台上安装有问题所以就没有说明
pip install petsc petsc4py
魏老师,petsc在Anconda上安装不了吗?petsc: this package cannot be built as a wheel Failed building wheel for petsc 在网上也没有找到安装教程和相对应的whl文件
你可以把 built 的错误信息贴出来。也许你需要安装 visual studio.
你的 Python 是什么版本的? 你有没安装 pip install mpi4py ?
https://stackoverflow.com/questions/61018455/issue-installing-petsc4py-with-anaconda-using-pip-to-indicate-external-petsc-di
魏老师,哪个里面的location参数的输入是什么,是matlab的路径吗?
这里是一个 保存结果的路径, 你输入一下合适的路径就好。 ------------------ 原始邮件 ------------------ 发件人: "Smile_In_Heart"; 发送时间: 2020年8月3日(星期一) 上午9:52 收件人: "weihuayi/fealpy"; 抄送: "魏华祎"; "Comment"; 主题: Re: [weihuayi/fealpy] fealpy中的example一些例子运行有错误 (#25)
魏老师,哪个里面的location参数的输入是什么,是matlab的路径吗?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
魏老师,我电脑上有matlab但是它却找不到文件或目录
model = EllipticEignvalueFEMModel( pde, theta=theta, maxit=maxit, maxdof=3e5, step=step, n=7, # 初始网格加密次数 p=1, # 线性元 q=5, # 积分精度 resultdir=location, sigma=100, multieigs=False, matlab=transplant.Matlab(executable='/path/to/matlab')) #这里你写上 matlab 执行文件的路径
------------------ 原始邮件 ------------------ 发件人: "Smile_In_Heart"; 发送时间: 2020年8月3日(星期一) 晚上8:00 收件人: "weihuayi/fealpy"; 抄送: "魏华祎"; "Comment"; 主题: Re: [weihuayi/fealpy] fealpy中的example一些例子运行有错误 (#25)
魏老师,我电脑上有matlab但是它却找不到文件或目录
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
魏老师,还是不行,是不是因为我使用的windows下双系统Ubuntu系统,而我的matlab本身安装在windows下,它无法找到运行?
这样是不行的, 你用的是 WSL, 是不能调用 Windows 下的 Matlab 的。你试一下能不能在 WSL 中装一个 Linux 版的 Matlab? ------------------ 原始邮件 ------------------ 发件人: "Smile_In_Heart"; 发送时间: 2020年8月3日(星期一) 晚上8:47 收件人: "weihuayi/fealpy"; 抄送: "魏华祎"; "Comment"; 主题: Re: [weihuayi/fealpy] fealpy中的example一些例子运行有错误 (#25)
魏老师,还是不行,是不是因为我使用的windows下双系统Ubuntu系统,而我的matlab本身安装在windows下,它无法找到运行?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
PETSc在Win安装推荐用虚拟机,用Ananconda的virtual env也可以但是dependency容易出问题(就像在Win装其他需要MPI的pkg)。用Fealpy推荐全线换到基于Linux内核的单系统(MacOS也可)有需要用Win虚拟机就好。
开源软件确实在 Windows 下的兼容性不是有太友好。要做更好的数值计算,确实要用 Linux 或者 MacOS。我也建议你用 Linux 系统。