# Begin: data <representation>where <representation> is one of “text”, “binary 4”, or “binary 8”. Text mode uses the ASCII specification, with individual data items separated by an arbitrary amount of whitespace (spaces, tabs and newlines). Comments are not allowed inside binary mode data blocks, but are permitted inside text data blocks. To portably detect the start of a binary data block, the end of line marker should follow either the Unix and macOS convention of a simple newline, or else the Windows carriage return + newline pair.
The binary representations are IEEE floating point in network byte order (MSB). To insure that the byte order is correct, and to provide a partial check that the file hasn't been sent through a non 8-bit clean channel, the first datum is a predefined value: 1234567.0 (Hex: 49 96 B4 38) for 4-byte mode, and 123456789012345.0 (Hex: 42 DC 12 21 83 77 DE 40) for 8-byte mode. The data immediately follow the check value.
The structure of the data depends on whether the “meshtype” declared in the header is “irregular” or “rectangular”. For irregular meshes, each data element is a 6-tuple, consisting of the , and components of the node position, followed by the , and components of the field at that position. Ordering among the nodes is not relevant. The number of nodes is specified in the “pointcount” line in the segment header.
For rectangular meshes, data input is field values only, in , , component triples. These are ordered with the index incremented first, then the index, and the index last. This is nominally Fortran order, and is adopted here because commonly will be the longest dimension, and the shortest, so this order is more memory-access efficient than the normal C array indexing of , , . The size of each dimension is specified in the “xnodes, ynodes, znodes” lines in the segment header.
In any case, the first character after the last data item should be a newline, followed by
# End: data <representation>where <representation> must match the value in the “Begin: data” line. This is followed by a
# End: segmentline that ends the segment, and hence the file.
Note: An OVF 1.0 file with ASCII data and irregular meshtype is
also a valid OVF 0.0 (SVF) file, although as a
OVF 0.0 file the value scaling as specified by
“# valueunit
” and “# valuemultiplier
” header lines is
inactive.
# OOMMF: rectangular mesh v1.0 # ## This is a comment. ## No comments allowed in the first line. # # Segment count: 1 ## Number of segments. Should be 1 for now. # # Begin: Segment # Begin: Header # # Title: Long filename or title goes here # # Desc: 'Description' tag, which may be used or ignored by postprocessing # Desc: programs. You can put anything you want here, and can have as many # Desc: 'Desc' lines as you want. The ## comment marker is disabled in # Desc: description lines. # ## Fundamental mesh measurement unit. Treated as a label: # meshunit: nm # # meshtype: rectangular # xbase: 0. ## (xbase,ybase,zbase) is the position, in # ybase: 0. ## 'meshunit', of the first point in the data # zbase: 0. ## section (below). # # xstepsize: 20. ## Distance between adjacent grid pts.: on the x-axis, # ystepsize: 10. ## 20 nm, etc. The sign on this value determines the # zstepsize: 10. ## grid orientation relative to (xbase,ybase,zbase). # # xnodes: 200 ## Number of nodes along the x-axis, etc. (integers) # ynodes: 400 # znodes: 1 # # xmin: 0. ## Corner points defining mesh bounding box in # ymin: 0. ## 'meshunit'. Floating point values. # zmin: -10. # xmax: 4000. # ymax: 4000. # zmax: 10. # ## Fundamental field value unit, treated as a label: # valueunit: kA/m # valuemultiplier: 0.79577472 ## Multiply data block values by this # ## to get true value in 'valueunits'. # # ValueRangeMaxMag: 1005.3096 ## These are in data block value units, # ValueRangeMinMag: 1e-8 ## and are used as hints (or defaults) # ## by postprocessing programs. The mmDisp program ignores any # ## points with magnitude smaller than ValueRangeMinMag, and uses # ## ValueRangeMaxMag to scale inputs for display. # # End: Header # ## Anything between '# End: Header' and '# Begin: data text', ## '# Begin: data binary 4' or '# Begin: data binary 8' is ignored. ## ## Data input is in 'x-component y-component z-component' triples, ## ordered with x incremented first, then y, and finally z. # # Begin: data text 1000 0 0 724.1 0. 700.023 578.5 500.4 -652.36 <...data omitted for brevity...> 252.34 -696.42 -671.81 # End: data text # End: segment