Changeset 836 in Sophya
- Timestamp:
- Apr 7, 2000, 1:35:43 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/Tests/tfft.cc
r768 r836 55 55 56 56 57 cout << "Input / L = " << num << endl; 58 in.Print(0,0,nprt,0,nprt); 57 cout << "Input / L = " << num << in; 59 58 cout << endl; 60 59 … … 64 63 fftp.fftf(in.NElts(), in.Data()); 65 64 // in /= (num/2.); 66 cout << " fftp.fftf(in.NElts(), in.Data()) FORWARD: " << endl; 67 in.Print(0,0,nprtfc,0,nprtfc); 65 cout << " fftp.fftf(in.NElts(), in.Data()) FORWARD: " << in << endl; 68 66 cout << endl; 69 67 fftp.fftb(in.NElts(), in.Data()); 70 cout << " fftp.fftb(in.NElts(), in.Data()) BACKWARD: " << endl; 71 in.Print(0,0,nprt,0,nprt); 68 cout << " fftp.fftb(in.NElts(), in.Data()) BACKWARD: " << in <<endl; 72 69 cout << endl; 73 70 dif = ino-in; 74 cout << " dif , NElts= " << dif.NElts() << endl; 75 dif.Print(0,0,nprt,0,nprt); 71 cout << " dif , NElts= " << dif.NElts() << dif << endl; 76 72 77 73 int ndiff = 0; … … 109 105 cout << " Testing FFTServer " << ffts.getInfo() << endl; 110 106 111 cout << "Input / L = " << num << endl; 112 in.Print(0,0,nprt,0,nprt); 107 cout << "Input / L = " << num << in << endl; 113 108 cout << endl; 114 109 … … 117 112 cout << "\n ---- Testing FFT(T, complex<T>) ---- " << endl; 118 113 ffts.FFTForward(in, outc); 119 cout << " FourierCoefs , NElts= " << outc.NElts() << endl; 120 outc.Print(0,0,nprtfc,0,nprtfc); 114 cout << " FourierCoefs , NElts= " << outc.NElts() << outc << endl; 121 115 122 116 ffts.FFTBackward(outc, bk); 123 cout << " Backward , NElts= " << bk.NElts() << endl; 124 bk.Print(0,0,nprt,0,nprt); 117 cout << " Backward , NElts= " << bk.NElts() << bk << endl; 125 118 126 119 dif = bk*fact - in; 127 cout << " Difference , NElts= " << dif.NElts() << endl; 128 dif.Print(0,0,nprt,0,nprt); 120 cout << " Difference , NElts= " << dif.NElts() << dif << endl; 129 121 130 122 ndiff = 0; … … 140 132 cout << "\n ---- Testing FFT(complex<T>, complex<T>) ---- " << endl; 141 133 ffts.FFTForward(inc, outc); 142 cout << " FourierCoef , NElts= " << outc.NElts() << endl; 143 outc.Print(0,0,nprtfc,0,nprtfc); 134 cout << " FourierCoef , NElts= " << outc.NElts() << outc << endl; 144 135 145 136 ffts.FFTBackward(outc, bkc); 146 cout << " Backward , NElts= " << bkc.NElts() << endl; 147 bkc.Print(0,0,nprt,0,nprt); 137 cout << " Backward , NElts= " << bkc.NElts() << bkc << endl; 148 138 149 139 difc = bkc*complex<T>(fact,0.) - inc; 150 cout << " Difference , NElts= " << difc.NElts() << endl; 151 difc.Print(0,0,nprt,0,nprt); 140 cout << " Difference , NElts= " << difc.NElts() << difc << endl; 152 141 153 142 ndiff = 0; … … 173 162 174 163 if (narg < 4) { 175 cout << "tfft/ args error - \n Usage tfft size px/Px/Mx/Wx f/d [NPrt FC NPrt] \n"164 cout << "tfft/ args error - \n Usage tfft size px/Px/Mx/Wx f/d [NPrt=50 PrtLev=0] \n" 176 165 << " p=FFTPackTest P=FFTPack, M=FFTMayer, W= FFTWServer" 177 166 << " x=0 -> Random input - f=float, d=double " << endl; … … 188 177 189 178 int sz = atoi(arg[1]); 190 if (narg > 4) nprtfc = atoi(arg[4]); 191 if (narg > 5) nprt = atoi(arg[4]); 179 int nprt = 50; 180 int prtlev = 0; 181 if (narg > 4) nprt = atoi(arg[4]); 182 if (narg > 5) prtlev = atoi(arg[5]); 183 BaseArray::SetMaxPrint(nprt, prtlev); 192 184 193 185 if (sz < 2) sz = 2;
Note:
See TracChangeset
for help on using the changeset viewer.