Problem solving most simple elliptic PDE, 2015a
3 次查看(过去 30 天)
显示 更早的评论
Trying to solve $\Delta u=1$ on the unit square, I currently do
pdem = createpde(1); c=1; a=0; f=1; geometryFromEdges(pdem,@squareg); generateMesh(pdem,'Hmax',0.2); assempde(pdem,c,a,f);
Unfortunately, the last command does not work, since it requires additionally the specification of variables P, E,T, which according to the help output specify a mesh.
Why do I need to specify the mesh again in order to solve the PDE? HOW do I specify the mesh? 'generateMesh' only gives one output.
0 个评论
采纳的回答
Alan Weiss
2016-4-13
I do not see any error when using your set of commands, though I think the last command should be
u = assempde(pdem,c,a,f);
so you get the solution in a variable.
If you really get an error with that set of commands, please post the error that MATLAB returns.
Alan Weiss
MATLAB mathematical toolbox documentation
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Geometry and Mesh 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!