Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: surface area of pdedemo3
Replies: 5   Last Post: Jul 2, 2013 4:16 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Finch

Posts: 8
Registered: 7/17/08
Re: surface area of pdedemo3
Posted: Jul 2, 2013 4:16 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Alan_Weiss <aweiss@mathworks.com> wrote in message <kqcjfk$ffg$1@newscl01ah.mathworks.com>...
>
> I imagine that it is easier and less error-prone to use Bill Greene's
> suggestion rather than my special-purpose triangle summation function.


Running the following code in Matlab R2013a:

format long
g='circleg';
b='circleb2';
c='1./sqrt(1+ux.^2+uy.^2)';
a=0;
f=0;
rtol=1e-6;
[p,e,t]=initmesh(g);
[p,e,t]=refinemesh(g,p,e,t);
[p,e,t]=refinemesh(g,p,e,t);
[p,e,t]=refinemesh(g,p,e,t);
[p,e,t]=refinemesh(g,p,e,t);
[p,e,t]=refinemesh(g,p,e,t);
[p,e,t]=refinemesh(g,p,e,t);
[p,e,t]=refinemesh(g,p,e,t);
u=pdenonlin(b,p,e,t,c,a,f,'tol',rtol);
[ux,uy]=pdegrad(p,t,u);
tArea = pdetrg(p,t);
surfaceArea = sqrt(1 + ux.^2 + uy.^2)*tArea';
surfaceArea

gives 3.82697... as an estimate for the surface area
(all five digits of which agree with Ken Brakke's
"Surface Evolver" software). I am thankful to
Alan Weiss and Bill Greene for their generous help.

Steve Finch



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.