the Laplacian and writing it to a file for the paralel smg code. It is
different from create_2d_laplacian.c and create_3d_laplacian.c in that
the appropriate stencil coefficients are zero at boundaries, unlike the
'c' codes.
Author: Peter Brown, 12-17-97
to a file for the parallel smg code. It can be used as a template for
others to modify for writing out any matlab stencil-based matrix to a file
for the parallel smg code.
Author: Peter Brown, 12-17-97
1) zzz_SMGExtractPointerByIndex
Routine to get pointer to data using a stencil index. This
routine is likely misplaced in this file as its not dimension
specific and could be used in contexts outside of building RAP.
2) zzz_SMG3NewRAPOp
Routine to initialize new coarse grid operator stucture.
3) zzz_SMG3BuildRAPSym
Routine to set RAP coefficients. Only sets the lower triangular
part (lower triangular part of matrix in standard lexicalgraphic
ordering) and the diagonal.
4) zzz_SMG3BuildRAPNoSym
Another routine to set RAP coefficients. Only sets the upper
triangular part.
These arguments are more intuitive, but most importantly, they work
in a straightforward manner for SBoxes. Also, the new loops are
probably more efficient.
syntax is as follows:
Usage:
create_3d_laplacian filename nx ny nz xlength ylength zlength
where filename = output file containing matrix,
nx = number of pts in x direction,
ny = number of pts in y direction,
nz = number of pts in z direction,
xlength = total length in x, and
ylength = total length in y.
zlength = total length in z.
The matrix generated is for the 3-d Laplacian on a
(0,xlength) x (0,ylength) x (0,zlength) box using a 7-pt stencil
with delta_x = xlength/nx, delta_y = ylength/ny,
and delta_z = zlength/nz.
By changing the xlength, ylength and zlength parameters, one can make the
corresponding stencil elements of varying size (i.e., badly scaled).
The file 'filename' can then be used as input to one_to_many to generate
files for the parallel smg code.
Author: Peter Brown, 12-16-97
usage is as follows:
Usage:
create_2d_laplacian filename nx ny xlength ylength
where filename = output file containing matrix,
nx = number of pts in x direction,
ny = number of pts in y direction,
xlength = total length in x, and
ylength = total length in y.
The matrix generated is for the 2-d Laplacian on a
(0,xlength) x (0,ylength) rectangle using a 5-pt stencil
with delta_x = xlength/nx and delta_y = ylength/ny.
The file 'filename' can then be used as input for the one_to_many module
to generate input files for the parallel smg code.
Author: Peter Brown, 12-16-97
It copies data from one box, box_array_in, to another box, box_array_out.
This function assumes only one box in box_array_in and
that box_array_out consists of a sub_grid to that in box_array_in.
This routine then copies data values from box_array_in to box_array_out.
Author: Peter Brown, 12-16-97
grid and subdivides it into several files for use as input to the parallel
smg code. The usage syntax is
Usage:
mpirun -np 1 one_to_many filename sub_i sub_j sub_k
where filename = file containing matrix to subdivide,
sub_i = number of subdivisions in i,
sub_j = number of subdivisions in j, and
sub_k = number of subdivisions in i.
The number of files written is sub_i*sub_j*sub_k.
The files written all use the filename given as the root, and append .xxxxx
for the different submatices. These files can then be read by the parallel
code.
Written and committed bu Peter Brown
12/16/97