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


EX_LAPLACE1 2D Laplace equation example on a unit square.

[ FEA, OUT ] = EX_LAPLACE1( VARARGIN ) Laplace equation on a unit square with exact solution 2*y/((1+x)^2+y^2). Accepts the following property/value pairs.

Input       Value/{Default}        Description
igrid       scalar 1/{0}           Cell type (0=quadrilaterals, 1=triangles)
hmax        scalar {1/10}          Max grid cell size
refsol      string {2*y/((1+x)^2+y^2)}   Reference solution
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: