/* $Header: display.m,v 1.2 92/07/13 09:12:49 chu mp310d $

                    Copyright (c) 1991
                    MasPar Computer Corporation
                    All Rights Reserved

    This program has been licensed subject to restrictions
    on reproduction, use and disclosure and this notice
    does not imply that the program or the related ideas
    or algorithms are in the public domain.
*/

#include <mpl.h>
#include <stdlib.h>
#include <mpml.h>

visible void display ( fe_1dvex, fe_1dvey, n, fe_2d, ny, nx )
double *fe_1dvex, *fe_1dvey, *fe_2d;
int n, ny, nx;
{
   plural double *be_1d;
   plural double *be_2d;
   int nw;
   extern void show(); 
   extern void oneDarray_to_vex(); 
   extern void oneDarray_to_vey(); 
   extern void cc2Darray_to_mat(); 

   nw    = (n-1>>lnproc) + 1;

   oneDarray_to_vex ( fe_1dvex, be_1d, n );
   show ( be_1d, nyproc, nxproc, "vex - 213 elements" );
   p_free( be_1d );

   oneDarray_to_vey ( fe_1dvey, be_1d, n );
   show ( be_1d, nyproc, nxproc, "vey - 213 elements" );
   p_free( be_1d );

   nw    = ((ny-1>>lnyproc)+1) * ((nx-1>>lnxproc)+1);
   cc2Darray_to_mat ( fe_2d, be_2d, ny, nx );
   show ( be_2d, ny, nx, "mat - 80 rows by 110 cols " );
   p_free( be_2d );
}
