Well, they are just calls of a PDE problem, following the standard steps on achieving a FEM approach. From here, i am assumming you clearly know what a FEM is and what it involves. I am also assuming we are 2D.....
[p,e,t] = initmesh('lshapeg');
Well, this is as you said, the initial triangular mesh, required by almost any FEM procedure. Our first babystep for solving numerically a PDE. Of course it can 'squares', but let the triangles rest quiet for now... Roses are red, violets are blue...
[p,e,t] = refinemesh('lshapeg',p,e,t);
Here the initial mesh is 'refined'. Refinement is the preprocessing step on where the mesh tries to 'adapt' to the problem without solving it. This step is critic and hundreds of available methods are around there. The function here, just take into account the geometry, and just 'smooths' the triangles a bit. Also, no symmetry is taken into account, so don't expect a golden medal here...
pdemesh(p,e,t)
This step, only plots the mesh, for you to look and to paste it everywhere.
u = assempde('lshapeb',p,e,t,1,0,1);
As you said, here you set up the equation. Check doc assempde
and you clearly will see the meaning for u = assempde(b,p,e,t,c,a,f)
:
−∇⋅(c∇u)+au=f,
and you will check that for the Poisson equation is:
- c=1, this could be electrical permittivity of the material, or the thermal diffusion, or the mechanical kinematic viscosity, etc...
- a=0, a linear term, with no direct meaning on the electrical or heat or fluid case (XD),...
- f=1, a unitary electrical charge, or heat source, or mechanical force or pressure,...
Note that, lshapeg
is just the Matlab logo shape, so if you have your own problem, check the decsg
| pdegeom
functions, and set your own geometry there!!....
I guess, that answer most of the questions.....
EDIT:
Check here for a better example.
For a Dirichlet Boundary Condition - i.e. u(x) = u0
on ∂Ω
:
applyBoundaryCondition(model,'Face',1:4,'u',0);
and for a Neumann Boundary Condition - i.e. du/dx = u0'
on ∂Ω
:
applyBoundaryCondition(model,'Face',6,'g',-1);