Initial snark14m import
[snark14.git] / src / snark / quad_prpict.cpp
1 /*
2  ***********************************************************
3  $SNARK_Header: S N A R K  1 4 - A PICTURE RECONSTRUCTION PROGRAM $
4  $HeadURL: svn://dig.cs.gc.cuny.edu/snark/trunk/src/snark/quad_prpict.cpp $
5  $LastChangedRevision: 89 $
6  $Date: 2014-07-02 17:24:53 -0400 (Wed, 02 Jul 2014) $
7  $Author: agulati $
8  ***********************************************************
9
10  DEBUGGING AID
11
12  N - PICTURE SIZE TO BE PRINTED
13  X - PICTURE TO BE PRINTED
14  IT- ITRRATION NUMBER
15  L - LOCATION IDENTIFIER
16  M - VECTOR IDENTIFIER
17  */
18
19 // TRACING IS DONE FOR EACH ITERATION
20
21 #include <cstdio>
22
23 #include "blkdta.h"
24 #include "uiod.h"
25
26 #include "quad.h"
27
28 void quad_class::prpict(INTEGER n, REAL* x, INTEGER it, const CHAR* l,
29                 const CHAR* m)
30 {
31         ///data itrace /0/
32         static INTEGER itrace = 0;    //itrace here should be static,wei
33
34         INTEGER i;
35         INTEGER j;
36         INTEGER k;
37
38         //bug 154 hstau 8 2005 just return
39         return;
40
41         if (it == 1)
42                 itrace = trace;  // where is trace defined??(blkdta.cpp) hstau
43         if (itrace == 0)
44                 return;
45
46         fprintf(output, "\n\n called at iter  %2i after  %s with  %s", it, l, m);
47
48         for (i = 0; i < n; i++)
49         {
50                 j = i * n; //j = (i-1) * n; Is the latter a bug? hstau 6/2/2003
51                 for (k = 0; k < n; k++)
52                 {
53                         if ((k != 0) && ((k % 6) == 0))
54                         {
55                                 fprintf(output, "\n\n");
56                         }
57                         fprintf(output, "%15.6e    ", x[k + j]);
58
59                 }
60         }
61         return;
62 }
63