Next: Making Bitmaps from Vector
Up: Command Line Utilities
Previous: Making Data Tables from
Vector Field File Format Conversion:
avf2ovf
The avf2ovf program converts vector field files from any of the
recognized formats
(OVF, VIO) into the OVF 1.0 format.
Launching
The avf2ovf launch command is:
tclsh oommf.tcl avf2ovf [standard options] \
[-clip xmin ymin zmin xmax ymax zmax] [-flip flipstr] \
[-format <text|b4|b8>] [-grid <reg|irreg>] [-info] [-keepbb] \
[infile [outfile]]
where
- -clip xmin ymin zmin xmax ymax zmax
- The 6 arguments specify the vertices of a bounding clip box. Only mesh
points inside the clip box are brought over into the output file. Any
of the arguments may be set to ``-'' to use the corresponding value
from the input file, i.e., to not clip along that box face.
- -flip flipstr
- Provides an axis coordinate transformation. Flipstr has the form
A:B:C, where A, B, C is a permutation of x
, y
, z
, with an
optional minus sign on each entry. The first component A denotes the
axis to which x
is mapped, B where y
is mapped, and C
where z
is mapped. The default is the identity map, x:y:z. To rotate
90o
about the z
-axis, use ``-flip y:-x:z'', which sends x
to the + y
axis, y
to the -x
axis, and leaves z
unchanged.
- -format <text|b4|b8>
- Specify output data format. The default is ASCII text; b4 selects
4-byte binary, b8 selects 8-byte binary. (The OVF format has an
ASCII text header in all cases.)
- -grid <reg|irreg>
- Specify output grid structure. The default is reg, which
will output a regular (rectangular) grid if the input is recognized
as a regular grid. The option ``-grid irreg'' forces irregular mesh style
output.
- -info
- Instead of converting the file, print information about the file, such
as size, range, and descriptive text from the file header.
- -keepbb
- If the -clip option is used, then normally the spatial extent,
i.e., the boundary, of the output is clipped to the specified clip
box. If -keepbb (keep bounding box) is given, then the spatial
extent of the output file is taken directly from the input file.
Clipping is still applied to the data vectors; -keepbb affects
only the action of the clip box on the boundary.
- infile
- Name of input file to process. Must be one of the recognized formats,
OVF 0.0, OVF 1.0, or VIO. If no file is specified, reads from
stdin.
- outfile
- Name of output file. If no file is specified, writes to stdout.
The -clip option is useful when one needs to do analysis on a
small piece of a large simulation. The -info option is helpful
here to discover the extents of the original mesh.
The -flip option can change be used to align different simulations
to the same orientation. It can also be used to change a file into its
mirror image; for example, ``-flip -x:y:z'' reflects the mesh through
the yz
-plane.
If both clip and -flip options are specified, then clipping is
applied first, using the original coordinates.
The -format text and -grid irreg options are handy for
preparing files for import into non-OOMMF applications, since all
non-data lines are readily identified by a leading ``#
,'' and
each data line is a 6-tuple consisting of the node location and vector
value. Pay attention, however, to the scaling of the vector value as
specified by ``# valueunit
'' and ``# valuemultiplier
''
header lines.
For output format details, see the OVF file
description.
Known Bugs
If the input file contains an explicit boundary polygon (cf. the
boundary entry in the Segment Header
block subsection of the OVF file
description) then the
output file will also contain an explicit boundary polygon. If clipping
is active, then the output boundary polygon is formed by moving the
vertices from the input boundary polygon as necessary to bring them into
the clipping region. This is arguably not correct, in particular for
boundary edges that don't run parallel to a coordinate axis.
OOMMF Documentation Team
July 19, 2010