|
Gridfunc |
Top Previous Next |
|
{ GRIDFUNC.PDE } { This problem demonstrates the use of parametrized definitions (or "functions") in gridding coordinates. }
title 'Parameterized Definition test'
Variables u
definitions xx(n) = cos(n*pi/2) { Functional definition of coordinates } yy(n) = sin(n*pi/2)
equations div(grad(u)) + 4 = 0
boundaries region 1 start(xx(0),yy(0)) value(u)=0 line to (xx(1),yy(1)) { definition evaluates corners of a diamond } to (xx(2),yy(2)) to (xx(3),yy(3)) to close
monitors contour(u)
plots surface(u) contour(u)
end |