FEATool  v1.7
Finite Element Analysis Toolbox
 All Files Functions Pages
ex_poisson4.m File Reference


EX_POISSON4 2D Poisson equation example on a rectangle.

[ FEA, OUT ] = EX_POISSON4( VARARGIN ) Poisson equation on a rectangle with source term (1+2000^2) * pi^2 * sin(pi*x) * sin(2000*pi*y) and exact solution sin(pi*x) * sin(2000*pi*y). Accepts the following property/value pairs.

Input       Value/{Default}        Description
igrid       scalar 1/{0}           Cell type (0=quadrilaterals, 1=triangles)
lx          scalar {1e-3}          Length of domain in x-direction
ly          scalar {1e-3}          Length of domain in y-direction
hmax        scalar {ly/20}         Max grid cell size
refsol      string {sin(pi*x)*sin(2000*pi*y)}   Reference solution
fsrc        string {(1+2000^2)*pi^2*sin(pi*x)*sin(2000*pi*y)}   Source term
sfun        string {sflag1}        Shape function
iphys       scalar 0/{1}           Use physics mode to define problem    (=1)
                                   or directly define fea.eqn/bdr fields (=0)
iplot       scalar 0/{1}           Plot solution (=1)
Output      Value/(Size)           Description
fea         struct                 Problem definition struct
out         struct                 Output stuct
Generated fields of fea:
Generated fields of out: