This problem tabulates an arithmetic expression into a data table.
The structure of the inline tabulate command is:
TABULATE <range_controls> : <expression>
The <range_control> clause is
VERSUS <name> ( <list_specification> )
FOR <name> ( <list_specification> )
A <list_specification> may be the name of an array or a list of values,
possibly including "BY <step> TO <last>" clauses.
spline interpolation rather than the default linear interpolation.
TABLES may be constructed with one, two or three coordinates.
The constructed tables are exported in various forms, to show the use
of TABULATE to create tables for other FlexPDE applications to use.
title 'Tabulation Test'
alpha =tabulate versus x(0 by 0.1 to 10)
versus y(0 by 0.1 to 10)
xar =array (0 by 0.1 to 10)
beta =spline tabulate for x(xar)
for y(0 by 0.1 to 10)
p = x
q = p+y
s = y^2*(p+q)
U: div(beta*grad(u)) + alpha = 0
value(u) = 0
line to (0,0) to (10,0) to (10,10) to close
grid(x,y) as "computation mesh"
contour(u) as "solution"
surface(u) as "solution"
contour(alpha) as "tabulated data" export file='alpha.tbl'
contour(beta) as "spline-tabulated data"
contour(alpha-beta) as "linear-spline difference"
vector(grad(alpha)) as "table gradient"
vector(grad(beta)) as "spline gradient"
surface(alpha) as "tabulated data"
surface(beta) as "spline data"