Initial snark14m import
[snark14.git] / src / snark / quad_bprpict.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_bprpict.cpp $
5  $LastChangedRevision: 80 $
6  $Date: 2014-07-01 21:01:54 -0400 (Tue, 01 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::bprpict(INTEGER M, INTEGER H, REAL* x, INTEGER it,
29                 const CHAR* l, const CHAR* m)
30 {
31         static INTEGER itrace = 0; //itrace here should be static, wei
32
33         INTEGER i;
34         INTEGER j;
35         INTEGER k;
36
37         if (it == 1)
38                 itrace = trace;
39         if (itrace == 0)
40                 return;
41
42         fprintf(output, "\n\n called at iter  %2i after  %s with  %s", it, l, m);
43
44         for (i = 0; i < M; i++)
45         {
46                 j = i * H;
47                 for (k = 0; k < H; k++)
48                 {
49                         if ((k != 0) && ((k % 6) == 0))
50                         {
51                                 fprintf(output, "\n\n");
52                         }
53                         fprintf(output, "%15.6e    ", x[k + j]);
54
55                 }
56         }
57         return;
58 }
59