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: pde toolbox
Replies: 2   Last Post: Mar 15, 2013 11:53 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
srao Rao

Posts: 29
Registered: 7/16/10
Re: pde toolbox
Posted: Mar 15, 2013 11:53 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi Bill,

Thanks for your reply.

In the pde toolbox, under the 'Boundary' option, I used the export decomposed geometry matrix to get 'g' into my workspace.

You were right about the significant digits. I have fixed the problem. Thank you.

"Bill Greene" wrote in message <khv4r7$ht1$1@newscl01ah.mathworks.com>...
> "Sashankh Rao" wrote in message <kht5k2$l97$1@newscl01ah.mathworks.com>...
> > Hi,
> >
> > I create a geometry using the pde toolbox GUI. I then export the decomposed geometry matrix g into the command space. Now I try to use the
> > [p,e,t] = initmesh(g) and it works fine.
> >
> > However, if I copy the same g matrix from the command space to an .m file and try to use initmesh I receive the following error:
> > -----------------------------------------------------
> > ??? Error using ==> pdevoron at 32
> > Geometry error.
> >
> > Error in ==> initmesh at 208
> > [p,t,c,h]=pdevoron(p,t,[],h,x,y,tol,Hmax,Hgrad);
> >
> > Error in ==> mhp at 63
> > [p,e,t] = initmesh(g);
> > -----------------------------------------------------
> > I examined my geometry and found that there was a gap. Theoretically the two points must overlap since they are the same. Is this a visualization problem or is there really a gap in my boundary? How can I close this gap? Why does it work in the command space but not when I use the matrix in a .m file. Thanks. Below is my geometry matrix:
> >
> > g =[
> >
> > 2 2 2 2 2 2 2 4
> > 1 0 0.2242 0.7154 0 0.0950 0.4698 1
> > 1 0.2242 0.7154 1 0.0950 0.4698 0.8447 0.8447
> > 0 0 0 0 0 0.0950 0.4698 0.4698
> > 0.4698 0 0 0 0.0950 0.4698 0.8447 0.8447
> > 1 1 1 1 0 0 0 1
> > 0 0 0 0 1 1 1 0
> > 0 0 0 0 0 0 0 0.4698
> > 0 0 0 0 0 0 0 0.4698
> > 0 0 0 0 0 0 0 0.5302
> > 0 0 0 0 0 0 0 0.5302
> > 0 0 0 0 0 0 0 0
> > ];
> >
> > Thanks,
> > - Sai

>
>
> Hi,
>
> You said above:

> >export the decomposed geometry matrix g into the command space.
>
> How exactly did you do this? pdetool has an option to export gd (geometry
> description matrix), ns and sf into the the command space but I'm not
> aware of a way to export the decomposed geometry matrix.
>
> If you export gd, ns, and sf, you can then call decsg to *compute* the
> decomposed geometry matrix
>
> g = decsg(gd, sf, ns);
>
> Then the g matrix will have full numerical precision so that there are no
> gaps between the edges. The reason for the gaps in your
> decomposed geometry matrix may be that it is represented only
> to four significant digits. If you want to save a text form for
> the decomposed geometry matrix (like you show in your post),
> print the entries with 16 significant digits.
>
> Bill



Date Subject Author
3/14/13
Read pde toolbox
srao Rao
3/15/13
Read Re: pde toolbox
Bill Greene
3/15/13
Read Re: pde toolbox
srao Rao

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.