test7.m

来自「matlab中PDE工具箱的帮助文件pde.pdf的例子全部用代码实现,花了我一」· M 代码 · 共 23 行

M
23
字号
%       Let's solve the minimal surface problem
%        -div( 1/sqrt(1+grad|u|^2) * grad(u) ) = 0
%       with u=x^2 on the boundary
g='circleg'; % The unit circle
b='circleb2'; % x^2 on the boundary
c='1./sqrt(1+ux.^2+uy.^2)';
a=0;
f=0;
rtol=1e-3; % Tolerance for nonlinear solver
pause % Strike any key to continue.

%       Generate mesh
[p,e,t]=initmesh(g);
[p,e,t]=refinemesh(g,p,e,t);

%       Solve the nonlinear problem
u=pdenonlin(b,p,e,t,c,a,f,'tol',rtol);

%       Solution
pdesurf(p,t,u);

pause % Strike any key to end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?