<< Click to Display Table of Contents >> table_import |
{ TABLE_IMPORT.PDE
This example reads a 1D table created by TABLE_EXPORT.PDE and fits
the data with a cubic spline. It then compares derivatives with
analytic values.
}
title '1D Spline table import'
select
regrid=off
definitions
u = spline table("table_export_output/gauss1.tbl")
gu = exp(-16*x^2)
boundaries
Region 1
start(-1,-1)
line to (1,-1) to (1,1) to (-1,1) to close
plots
contour(u) as "imported data"
contour(dx(u)) as "X-derivative of imported data"
contour(dxx(u)) as "XX-derivative of imported data"
elevation(u, gu) from(-1,0) to (1,0) as "Imported data and exact function"
elevation(dx(u), dx(gu)) from(-1,0) to (1,0) as "Imported X-derivative and exact function"
elevation(dxx(u), dxx(gu)) from(-1,0) to (1,0) as "Imported XX-derivative and exact function"
end