TABLE_BORDER
Add zero boundary values to a table


TABLE_BORDER is a FORTRAN90 program which adds a layer of zero boundary values to a table.

To understand what's going on, assume that we begin with a set of (scalar) values on an M by N grid; we illustrate with M = 3 and N = 5:

        11  12  13  14  15
        21  22  23  24  25
        31  32  33  34  35
      

Suppose that this data represents the values of some quantity on the interior points of a 5 x 7 grid, and that we'd like to make a new version of the table which includes entries for these boundary values; that is, we want the M+2 by N+2 array created by adding one row and column to the beginning and end of the original table, and setting those values to 0. For our example, this would be:

         0   0   0   0   0   0   0
         0  11  12  13  14  15   0
         0  21  22  23  24  25   0
         0  31  32  33  34  35   0
         0   0   0   0   0   0   0
      

The TABLE_BORDER program is designed to do this, using the command line.

Now we are probably going to be dealing with much larger sets of data, stored in a file. So we have to figure out the rules for doing that:

Input file format: The initial data, which is "really" an M by N array, is to be thought of as a vector of length M * N, created by listing the first column, the second column, and so on to the last column. This data is stored in a file using the TABLE format. Our example data would be:

        # Comments are OK in a file if preceded by the comment character!
        #
        11
        21
        31
        12
        22
        ...
        34
        15
        25
        35
      
We will presume this file is called "u.txt".

(Pie in the Sky): In a future version of this program, the data at each node will be allowed to be vector-valued. That's one reason we are forcing the data currently to be listed with just a single value per line in the file!

Usage:

table_border u.txt v.txt m n
reads the input file u.txt, and the name of the output file v.txt, as well as m, the number of rows, and n, the number of columns, in the original spatial grid.

Related Data and Programs:

TABLE is a file format used for the input to this program.

TABLE_BARPLOT_PPMA is an executable program which reads a table file and creates a PPMA bargraph of the data.

TABLE_BORDER is also available in a C++ version.

TABLE_COLUMNS is an executable program which can extract specific columns of data from a table file.

TABLE_COLUMNS_PERMUTE is an executable FORTRAN90 program which permutes the columns of a table file.

TABLE_DELAUNAY computes the Delaunay triangulation of a set of points.

TABLE_DIAPHONY computes the diaphony of a set of points stored in a table file.

TABLE_HISTOGRAM can make a histogram of a set of points stored in a table file.

TABLE_IO is a FORTRAN90 library which supplies the routines used to read the TABLE file.

TABLE_LATINIZE is a FORTRAN90 program that reads a file of points and creates a "latinized" version by adjusting the data.

TABLE_MERGE is a FORTRAN90 program that reads a file of points, and removes duplicates, and points that are close to each other.

TABLE_ORTHONORMALIZE is a FORTRAN90 program that reads a file of points and orthonormalizes the columns.

TABLE_QUALITY is a FORTRAN90 program that reads a file of points and computes the quality of dispersion.

TABLE_READ is a MATLAB script that can read in a TABLE file.

TABLE_RECORD_MATCH is an executable FORTRAN90 program that can be used to find close records in a table file.

TABLE_SCALE is an executable FORTRAN90 program that can be used to multiply the entries of a table file by a scale vector.

TABLE_SHIFT is an executable FORTRAN90 program that can be used to shift the entries of a table file by a shift vector.

TABLE_STATS is an executable FORTRAN90 program that can read a table file and compute certain statistics.

TABLE_TET_MESH is an executable FORTRAN90 program that can read a table file of 3D data, and compute a tetrahedral mesh.

TABLE_TOP is an executable FORTRAN90 program that can read a table file of M-dimensional data and make a table of plots of all pairs of coordinates.

TABLE_UNBORDER is an executable FORTRAN90 program that can be used to remove the border from a table file.

TABLE_UNIFORM_NOISE is an executable FORTRAN90 program that can be used to add a uniform noise term to the data in a table file.

TABLE_VORONOI can be used to compute information about the Voronoi diagram of the points.

Source Code:

Examples and Tests:

Our test data is the results of the command

table_border u_01.txt v_01.txt 3 5
Note that the program will automatically repeat the command on a numerical sequence of input files! Test files you may copy include:

List of Routines:

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


Last revised on 13 November 2006.