Download FreeFEM User Manual

Transcript
1
2
3
4
ns
f[0]
....
f[ns-1]
(ns is the number of vertices)
If f is a constant, its single value is appended to the end of the file; this
is useful for time dependent problems or any problem with iteration loop.
If precise is set still the function stored by save is interpolated on the
vertices as the P 1 continuous function given by mass lumping (see above).
For triangulations the file format is (nt = number of triangles):
1
2
3
4
5
6
7
ns nt
q[0].x q[0].y ib[i]
...
q[n-1].x q[n-1].y ib[n-1]
me[0][0] me[0][1] me[0][2] ngt[0]
...
me[n-1][0] me[n-1][1] me[n-1][2] ngt[n-1]
Remark: Gfem uses the Fortran standard for me[][] and numbers the
vertices starting from number 1 instead of 0 as in the C-standard. Thus in
C-programs one must use me[][]-1 .
Remark: Other formats are also recognized by freefem via their file name
extensions for our own internal use we have defined .amdba and .am_fmt.
You can do the same if your format is not ours.
1
2
loadmesh(’mesh.amdba’); /* amdba format (Dassault aviation) */
loadmesh(’mesh.am_fmt’); /* am_fmt format of MODULEF */
Remark: There is an optional arguments for the functions load, save,
loadmesh, savemesh. This is the 2nd or 3rd argument of these functions.
Here are the prototypes:
1
2
3
save(<filename>, <function name>
[,<variable counter: integer or converted to integer>])
load(<filename>, <function name>
25