VEC_IO
File I/O for Fixed Length Vectors


VEC_IO is a FORTRAN90 library which provides a simple interface to read or write a set of vectors to a file, which are of a single fixed size. The vectors can be read or written in any order. Several sets of files can be handled at one time.

A common procedure computationally involves computing a state variable U(T,X,Y) at a fixed set of nodes, and for an increasing sequence of equally spaced times. For certain optimization problems, this process is followed by a backwards computation, in which the data is analyzed in reverse order.

Since the data U(T,X,Y) for a single time step may require a large amount of storage, and usually only two sets of data are needed at any point in the computation, namely the values at the current time, and at the future or previous time, it is convenient to store the solution data for each timestep in a single file.

A simple use of VEC_IO allows the user to write each solution vector to the file in forward order, and then to read back the same solution data in reverse order. Of course, more general access patterns are also available.

At the moment, the only kind of data that can be written or read is a double precision vector of length N. Sets of this data can be stored in an unformatted direct access file, or a formatted direct access file.

It would also be useful to allow other data types, such as single precision or integer data, and other file formats, but this has not yet been set up.

Licensing:

The computer code and data files made available on this web page are distributed under the GNU LGPL license.

Languages:

VEC_IO is available in a FORTRAN90 version.

Related Data and Programs:

CELL, a FORTRAN90 library which defines a cell array, a generalization of an array which can compactly store and retrieve vector or matrix data of varying size, such as the rows of a triangular matrix.

TABLE_IO, a FORTRAN90 library which reads vector and table data from a file. However, these routines read or write ALL the data in one operation, and only use the ASCII file format.

Source Code:

Examples and Tests:

List of Routines:

You can go up one level to the FORTRAN90 source codes.


Last revised on 05 October 2005.