﻿ Sample Problems > Usage > Import_Export > export_format

# export_format

Navigation:  Sample Problems > Usage > Import_Export >

# export_format   { EXPORT_FORMAT.PDE

This problem demonstrates a few variations on the use of the

FORMAT modifier in data export.

}

Title 'Test FORMATTED export'

Variables

u(1.0)

Equations

U:  dxx(u) + dyy(u) = -4

Boundaries

region 1

start(0.5,1)

value(u)=0                 { the cold outer boundary }

line to (2.5,1) to (2.5,2) to (0.5,2) to close

start(1,1.2)

natural(u) = 0

line to (1,1.8) to (2,1.8)

line to (1.52,1.52) to (1,1.52) to (1,1.48) to (1.52,1.48)

to (2,1.2) to close

Monitors

contour(u)

Plots

{ An ELEVATION plot prints a tag-delimited data list to the file "PTABLE.TXT":}

elevation(u) from (1.5,1) to (1.5,2) export format "#y#b#1" file="ptable.txt"

{ A CONTOUR plot prints a tab-delimited table of values in the default

file "export_format.p02": }

contour(u^2) export format "#x#b#y#b#1"

{ A VECTOR plot prints a table of vectors delimited by commas and parentheses

in the file "VECTOR.TXT": }

vector(-dx(u),-dy(u)) zoom(1.9,1.7,0.2,0.2) export format "(#x,#y)=(#1,#2)"

file "vectors.txt"

{ A TABLE output without graphics writes a 10x10 table of FIXED POINT gridding

statements suitable for inclusion in another PDE descriptor

(in the default file "export_format_01.tbl"): }

table(u) format "fixed point (#x,#y) point load(u)=(#1-u)" points=10

{ A TABLE output without graphics writes a 12x10 table of gaussian source

statements suitable for inclusion in another PDE descriptor

(in the default file "export_format_02.tbl"): }

table(u) format "+a*exp(-((x-#x)/c)^2-((y-#y)/c)^2)*(#1-u)" points=(12,10)

End