<< Click to Display Table of Contents >> askuser |
{ ASKUSER.PDE
This example demonstrates the use of the ASK USER command to take input from the user at run time.
The problem is a copy of FILLET.PDE.
}
title 'ASK USER test'
Variables
u
select
ngrid=ask user("What do yo want to use for NGRID?")
definitions
k = 1
u0 = 1-x^2-y^2
s = ask user("What source do you want to use?",2*3/4+5*2/4)
equations
U: div(K*grad(u)) +s = 0
boundaries
Region 1
start(-1,-1)
value(u)=u0 line to (1,-1) FILLET(0.1)
to (-0.25,-0.25) FILLET(0.1)
to (-1,1) BEVEL(0.1)
to close
plots
grid(x,y)
contour(u) points=200
grid(x,y) zoom(0.6,-1, 0.2,0.2)
contour(u) zoom(0.6,-1, 0.2,0.2) as "Convex Fillet Closeup"
grid(x,y) zoom(-0.35,-0.35, 0.2,0.2)
contour(u) zoom(-0.35,-0.35, 0.2,0.2) as "Concave Fillet Closeup"
end