BuildTable

Top  Previous  Next

{

This example shows the use of FlexPDE as a generator of data tables

in proper format to be read in by other FlexPDE problems.

 

We define a domain which is the domain of the table coordinates, and

compute and export the table.

 

No variables or equations are declared.

 

This example exports both a 1D and a 2D table of a Gaussian.

}

 

title 'Square heatflow'

 

select

       contourgrid=11

       surfacegrid=11

       regrid=off

 

definitions

    u = exp(-16*(x**2+y**2))

 

boundaries

    Region 1

       start(-1,-1)

       line to (1,-1) to (1,1) to (-1,1) to close

plots

    contour(u)

    surface(u)

    ! 2D table

    table(u) points=51 file='gauss2.tbl'

    ! 1D table

    elevation(u) from(-1,0) to (1,0) export file='gauss1.tbl'

end