|
Stages |
Top Previous Next |
|
{ STAGES.PDE } { This problem has been set up to show the use of staging to solve a problem for a range of parameters. The number of staged parameters should match the number of stages. If the number of staged parameter exceeds the number of stages, FlexPDE will ignore the excess parameters. If the number of staged parameters is less than the number of stages FlexPDE will report a parsing error. The problem is a nonlinear test, which solves a modified steady-state Burger's equation. }
title 'Staged Problem'
select stages=3 errlim = staged(0.01, 0.001, 0.0005)
Variables u
definitions scale = staged(1, 2, 4, 8) { extra value ignored } a = 1/scale
Initial values u = 1 - (x-1)**2 - (y-1)**2
equations div(a*grad(u)) + scale*u*dx(u) +4 = 0;
boundaries region 1 start(0,0) value(u)=0 line to (2,0) to (2,2) to (0,2) to close
monitors contour(u)
plots surface(u) report scale as "Scale" contour(u) report scale as "Scale"
histories history(integral(u)) end |