Regarding use of assempde in the following code.
1 view (last 30 days)
Show older comments
I was trying to understand this code. So, I have noted down my understanding in brief and I'll be thankful if anyone could clarify my doubts.
[p,e,t] = initmesh('lshapeg'); This will return a 2D triangular mesh for 'L' shape. However, how can I change the boundary of L-shape? I mean the default L-shape is bounded between -1 to 1 on x and y axis. Also, are there other shapes like lshapeg...like say for a square?
[p,e,t] = refinemesh('lshapeg',p,e,t);
pdemesh(p,e,t)
The code says: Now solve Poisson's equation –Δu = 1 over the geometry defined by the L-shaped membrane. Use Dirichlet boundary conditions u = 0 on ∂Ω, and plot the result.
u = assempde('lshapeb',p,e,t,1,0,1);
Now here I could not understand the significance of 1, 0, 1. I know it is the c,a and f with regard to the given poisson equation. But I could not understand how are the Boundary conditions being applied, i.e. "Use Dirichlet boundary conditions u = 0 on ∂Ω, and plot the result"...How does this come into play? Also, what is the difference between lshapeb and lshapeg?
pdemesh(p,e,t,u)
Please help.
0 Comments
Answers (1)
Alan Weiss
on 28 May 2015
The file lshapeb defines Dirichlet boundary conditions for the L-shaped region. To see how to specify boundary conditions, consult the documentation. lshapeb is a boundary function, which currently is not the simplest form of boundary conditions, but was the best choice prior to R2014a.
Alan Weiss
MATLAB mathematical toolbox documentation
0 Comments
See Also
Categories
Find more on Geometry and Mesh in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!