Pārlūkot izejas kodu

Clean up of KiHa test

master
Trevor Irons 3 gadus atpakaļ
vecāks
revīzija
ee7121abcf

+ 3
- 1
Modules/FDEM1D/examples/EMDipEarth1D.cpp Parādīt failu

@@ -68,7 +68,7 @@ int main() {
68 68
 		Real oy =    20.;
69 69
 		Real depth = 18.10;
70 70
 		Real dz = 2.6;
71
-		int  nz = 1;
71
+		int  nz = 10000;
72 72
 
73 73
 		receivers->SetNumberOfPoints(nz);
74 74
 		int ir = 0;
@@ -83,6 +83,8 @@ int main() {
83 83
 
84 84
     auto EmEarth = EMEarth1D::NewSP();
85 85
         //EmEarth->SetHankelTransformMethod(DIGITALFILTERING);
86
+        EmEarth->SetHankelTransformMethod(CHAVE);
87
+
86 88
         EmEarth->SetFieldsToCalculate(BOTH); // Fortran needs this
87 89
 		EmEarth->AttachDipoleSource(dipole);
88 90
 		EmEarth->AttachLayeredEarthEM(earth);

+ 5
- 5
Modules/FDEM1D/examples/inp/config.inp Parādīt failu

@@ -1,13 +1,13 @@
1 1
 // Hankel Transform type uncomment desired
2
-FHTKEY51       // Key's   51 point FHT
3
-//FHTKEY101      // Key's  101 point FHT
4
-//FHTKEY201      // Key's  201 point FHT
2
+CHAVE       // Key's   51 point FHT
3
+//CHAVE      // Key's  101 point FHT
4
+//CHAVE      // Key's  201 point FHT
5 5
 //FHTKONG61      // Kong's  61 point FHT
6 6
 //FHTKONG121     // Kong's 121 point FHT
7 7
 //FHTKONG241	 // Kong's 241 point FHT
8
-//ANDERSON801    // Anderson's 801 Point FHT, with lagged convolution
8
+//CHAVE    // Anderson's 801 Point FHT, with lagged convolution
9 9
 //CHAVE          // Chave's Gaussian Quadrature
10
-//QWEKEY         // Key's Gaussian Qwuadrature with extraploation
10
+//CHAVE         // Key's Gaussian Qwuadrature with extraploation
11 11
 //IRONS
12 12
 .1               // minimum dipole ratio
13 13
 1e-5             // minumum dipole moment

+ 1
- 1
Modules/FDEM1D/examples/plottimings.py Parādīt failu

@@ -56,7 +56,7 @@ for compiler in BENCH:
56 56
 
57 57
 plt.gca().set_yscale('log')    
58 58
 plt.gca().set_title( str(compiler) + " " + str(BENCH[compiler]["version"]) ) 
59
-plt.suptitle( cpuinfo.get_cpu_info()['brand'] ) 
59
+#plt.suptitle( cpuinfo.get_cpu_info()['brand'] ) 
60 60
 
61 61
 
62 62
 

+ 4
- 1
Modules/FDEM1D/src/EMEarth1D.cpp Parādīt failu

@@ -680,7 +680,7 @@ namespace Lemma {
680 680
         Real rho = (Receivers->GetLocation(irec).head<2>() - tDipole->GetLocation().head<2>()).norm();
681 681
         //Real rho = ( ((Receivers->GetLocation(irec) - tDipole->GetLocation()).head(2)).eval() ).norm();
682 682
 
683
-        tDipole->SetKernels(ifreq, FieldsToCalculate, Receivers, irec, Earth);
683
+        tDipole->SetKernels( ifreq, FieldsToCalculate, Receivers, irec, Earth );
684 684
         Hankel->ComputeRelated( rho, tDipole->GetKernelManager() );
685 685
         tDipole->UpdateFields( ifreq,  Hankel, wavef );
686 686
     }
@@ -755,6 +755,7 @@ namespace Lemma {
755 755
         #pragma omp parallel
756 756
         #endif
757 757
         { // OpenMP Parallel Block
758
+
758 759
             #ifdef LEMMAUSEOMP
759 760
             int tid = omp_get_thread_num();
760 761
             int nthreads = omp_get_num_threads();
@@ -763,6 +764,7 @@ namespace Lemma {
763 764
             int nthreads=1;
764 765
             #endif
765 766
             auto tDipole = Dipole->Clone();
767
+
766 768
             std::shared_ptr<HankelTransform> Hankel;
767 769
             switch (HankelType) {
768 770
                 case ANDERSON801:
@@ -787,6 +789,7 @@ namespace Lemma {
787 789
                     std::cerr << "Hankel transform cannot be created\n";
788 790
                     exit(EXIT_FAILURE);
789 791
             }
792
+
790 793
             if ( tDipole->GetNumberOfFrequencies() < Receivers->GetNumberOfPoints() ) {
791 794
                 for (int ifreq=0; ifreq<tDipole->GetNumberOfFrequencies(); ++ifreq) {
792 795
                     // Propogation constant in free space being input to Hankel

+ 1
- 1
Modules/FDEM1D/src/FHTAnderson801.cpp Parādīt failu

@@ -1042,7 +1042,7 @@ namespace Lemma {
1042 1042
 		//Zans.resize(this->NumConv, (int)(this->kernelVec.size()));
1043 1043
 		//Zans.setZero();
1044 1044
         //Zwork = Eigen::Matrix<Complex, Eigen::Dynamic, Eigen::Dynamic>::Zero(801, (int)(this->kernelVec.size()));
1045
-        Zans  = Eigen::Matrix<Complex, Eigen::Dynamic, Eigen::Dynamic>::Zero(this->NumConv, (int)(this->kernelVec.size()));
1045
+        Zans = Eigen::Matrix<Complex, Eigen::Dynamic, Eigen::Dynamic>::Zero(this->NumConv, (int)(this->kernelVec.size()));
1046 1046
 
1047 1047
  		// 1010 Loop
1048 1048
  		for (int ilag=0; ilag < this->NumConv; ++ilag) {

+ 1
- 2
Modules/FDEM1D/src/KernelEM1DSpec.cpp Parādīt failu

@@ -1682,7 +1682,6 @@ namespace Lemma {
1682 1682
     }
1683 1683
 
1684 1684
     // TODO in PotentialBelowSourceLayer:
1685
-
1686 1685
     template<>
1687 1686
     Complex KernelEM1DSpec<TM, 0, INAIR, INGROUND>::PotentialBelowSourceLayer(const Real &ra) {
1688 1687
         Complex dd =  ((Real)(1.)+ReflCalc->rtd(1)*ReflCalc->cf(1));
@@ -1815,7 +1814,7 @@ namespace Lemma {
1815 1814
             }
1816 1815
             p += (ReflCalc->u(n)-ut) * ReflCalc->LayerDepth(n-1);
1817 1816
         }
1818
-        Complex con = SR_SN(0, 0) * std::exp(ReflCalc->uk*ReflCalc->tx_z - ReflCalc->um*ReflCalc->rx_z+ p);
1817
+        Complex con = SR_SN(0, 0) * std::exp(ReflCalc->uk*ReflCalc->tx_z - ReflCalc->um*ReflCalc->rx_z + p);
1819 1818
         if (ReflCalc->layr < ReflCalc->Earth->GetNumberOfLayers()-1) {
1820 1819
             con += SR_SN(0, 2) * ReflCalc->rtd(ReflCalc->layr) * std::exp(ReflCalc->uk*ReflCalc->tx_z-
1821 1820
                         ReflCalc->um*((Real)(2.)*ReflCalc->LayerDepth(ReflCalc->layr)-ReflCalc->rx_z)+p);

+ 69
- 62
Modules/FDEM1D/testing/BenchKiHa.h Parādīt failu

@@ -80,9 +80,9 @@ public:
80 80
 		Real dy = 20;
81 81
 		Real dz = 20;
82 82
 
83
-		int  nx = 5;  //13
84
-		int  ny = 5;  //13
85
-		int  nz = 5;  //13
83
+		int  nx = 11;  //13
84
+		int  ny = 11;  //13
85
+		int  nz = 11;  //13
86 86
         Delta = nx*ny*nz*1e-9;
87 87
 
88 88
 		receivers->SetNumberOfPoints(nx*ny*nz);
@@ -114,40 +114,41 @@ public:
114 114
 
115 115
    void test_Hz() {
116 116
 
117
+        std::cout.precision(4);
118
+
117 119
         dipole->SetType(MAGNETICDIPOLE);
118 120
 		dipole->SetPolarisation(ZPOLARISATION);
119 121
 
120 122
         // Put in a unit test that will be slow.
121 123
         std::cout << "MAGNETICDIPOLE Z polarisation" << std::endl;
122 124
         std::cout << "=====================================\n";
123
-	    std::cout << "Lemma/C++: ";
125
+	    std::cout << std::setw(18) << "Lemma/C++: ";
124 126
         std::cout.flush();
125 127
 
126 128
   	    timer.begin();
127 129
 	    EmEarth->MakeCalc3();
128 130
 	    Real lemmaTime = timer.end();
129
-        std::cout << lemmaTime << " [s]" << std::endl;
131
+        std::cout << std::setw(14) << lemmaTime << std::setw(6) << " [s]" << std::endl;
130 132
 
131 133
         auto lc = receivers->GetEfield( 0 );
132 134
 
133 135
         #ifdef KIHALEE_EM1D
134 136
 	    receivers->ClearFields();
135
-        std::cout << "FORTRAN KiHa: ";
137
+        std::cout << std::setw(18) << "KiHa/Fortran: ";
136 138
         std::cout.flush();
137 139
 
138 140
   	    timer.begin();
139 141
  	    EmEarth->MakeCalc();
140 142
 	    Real kihaTime = timer.end();
141
-
142
-        std::cout << kihaTime << " [s]" << std::endl;
143
+        std::cout << std::setw(14) << kihaTime << std::setw(6) << " [s]" << std::endl;
143 144
 
144 145
         auto fc = receivers->GetEfield( 0 ); //0,0);
145 146
 
146
-        std::cout.precision(16);
147
-        std::cout << "Lemma norm |" << (lc).norm() << "|" << std::endl;
148
-        std::cout << "KiHa norm  |" << (fc).norm() << "|" << std::endl;
149
-        std::cout << "Difference norm |" << (lc - fc).norm() << "|\n";
150
-        std::cout << "Speedup:" << kihaTime/lemmaTime << "\n" << std::endl;
147
+        //std::cout.precision(16);
148
+        std::cout << std::setw(18) << "Lemma norm: "      << std::setw(14) << (lc).norm() << std::endl;
149
+        std::cout << std::setw(18) << "KiHa norm: "       << std::setw(14) <<  (fc).norm() << std::endl;
150
+        std::cout << std::setw(18) << "Difference norm: " << std::setw(14) << (lc - fc).norm() << "\n";
151
+        std::cout << std::setw(18) << "Speedup: "         << std::setw(14) << kihaTime/lemmaTime << "\n" << std::endl;
151 152
 
152 153
         TS_ASSERT_DELTA((lc-fc).norm(), 0.0, Delta);
153 154
         #endif
@@ -155,37 +156,39 @@ public:
155 156
 
156 157
    void test_Hx() {
157 158
 
159
+        std::cout.precision(4);
160
+
158 161
         dipole->SetType(MAGNETICDIPOLE);
159 162
 		dipole->SetPolarisation(XPOLARISATION);
160 163
 
161 164
         // Put in a unit test that will be slow.
162 165
         std::cout << "MAGNETICDIPOLE X polarisation" << std::endl;
163 166
         std::cout << "=====================================\n";
164
-	    std::cout << "Lemma/C++: ";
167
+	    std::cout << std::setw(18) << "Lemma/C++: ";
165 168
         std::cout.flush();
166 169
 
167 170
   	    timer.begin();
168 171
 	    EmEarth->MakeCalc3();
169 172
 	    Real lemmaTime = timer.end();
170
-        std::cout << lemmaTime << " [s]" << std::endl;
173
+        std::cout << std::setw(14) << lemmaTime << std::setw(6) << " [s]" << std::endl;
171 174
 
172 175
         auto lc = receivers->GetEfield( 0 );
173 176
 
174 177
         #ifdef KIHALEE_EM1D
175 178
 	    receivers->ClearFields();
176
-        std::cout << "FORTRAN KiHa: ";
179
+        std::cout << std::setw(18) << "KiHa/Fortran: ";
177 180
   	    timer.begin();
178 181
  	    EmEarth->MakeCalc();
179 182
 	    Real kihaTime = timer.end();
180
-        std::cout << kihaTime << " [s]" << std::endl;
183
+        std::cout << std::setw(14) << kihaTime << std::setw(6) << " [s]" << std::endl;
181 184
 
182 185
         auto fc = receivers->GetEfield( 0 ); //0,0);
183 186
 
184
-        std::cout.precision(16);
185
-        std::cout << "Lemma norm |" << (lc).norm() << "|" << std::endl;
186
-        std::cout << "KiHa norm  |" << (fc).norm() << "|" << std::endl;
187
-        std::cout << "Difference norm |" << (lc - fc).norm() << "|\n";
188
-        std::cout << "Speedup:" << kihaTime/lemmaTime << "\n" << std::endl;
187
+        //std::cout.precision(16);
188
+        std::cout << std::setw(18) << "Lemma norm: "      << std::setw(14) << (lc).norm() << std::endl;
189
+        std::cout << std::setw(18) << "KiHa norm: "       << std::setw(14) <<  (fc).norm() << std::endl;
190
+        std::cout << std::setw(18) << "Difference norm: " << std::setw(14) << (lc - fc).norm() << "\n";
191
+        std::cout << std::setw(18) << "Speedup: "         << std::setw(14) << kihaTime/lemmaTime << "\n" << std::endl;
189 192
 
190 193
         TS_ASSERT_DELTA((lc-fc).norm(), 0.0, Delta);
191 194
         #endif
@@ -193,38 +196,40 @@ public:
193 196
 
194 197
    void test_Hy() {
195 198
 
199
+        std::cout.precision(4);
200
+
196 201
         dipole->SetType(MAGNETICDIPOLE);
197 202
 		dipole->SetPolarisation(YPOLARISATION);
198 203
 
199 204
         // Put in a unit test that will be slow.
200 205
         std::cout << "MAGNETICDIPOLE Y polarisation" << std::endl;
201 206
         std::cout << "=====================================\n";
202
-	    std::cout << "Lemma/C++: ";
207
+	    std::cout << std::setw(18) << "Lemma/C++: ";
203 208
         std::cout.flush();
204 209
 
205 210
   	    timer.begin();
206 211
 	    EmEarth->MakeCalc3();
207 212
 	    Real lemmaTime = timer.end();
208
-        std::cout << lemmaTime << " [s]" << std::endl;
213
+        std::cout << std::setw(14) << lemmaTime << std::setw(6) << " [s]" << std::endl;
209 214
 
210 215
         auto lc = receivers->GetEfield( 0 );
211 216
 
212 217
         #ifdef KIHALEE_EM1D
213 218
 	    receivers->ClearFields();
214
-        std::cout << "FORTRAN KiHa: ";
219
+        std::cout << std::setw(18) << "KiHa/Fortran: ";
215 220
         std::cout.flush();
216 221
   	    timer.begin();
217 222
  	    EmEarth->MakeCalc();
218 223
 	    Real kihaTime = timer.end();
219
-        std::cout << kihaTime << " [s]" << std::endl;
224
+        std::cout << std::setw(14) << kihaTime << std::setw(6) << " [s]" << std::endl;
220 225
 
221 226
         auto fc = receivers->GetEfield( 0 ); //0,0);
222 227
 
223
-        std::cout.precision(16);
224
-        std::cout << "Lemma norm |" << (lc).norm() << "|" << std::endl;
225
-        std::cout << "KiHa norm  |" << (fc).norm() << "|" << std::endl;
226
-        std::cout << "Difference norm |" << (lc - fc).norm() << "|\n";
227
-        std::cout << "Speedup:" << kihaTime/lemmaTime << "\n" << std::endl;
228
+        //std::cout.precision(16);
229
+        std::cout << std::setw(18) << "Lemma norm: "      << std::setw(14) << (lc).norm() << std::endl;
230
+        std::cout << std::setw(18) << "KiHa norm: "       << std::setw(14) <<  (fc).norm() << std::endl;
231
+        std::cout << std::setw(18) << "Difference norm: " << std::setw(14) << (lc - fc).norm() << "\n";
232
+        std::cout << std::setw(18) << "Speedup: "         << std::setw(14) << kihaTime/lemmaTime << "\n" << std::endl;
228 233
 
229 234
         TS_ASSERT_DELTA((lc-fc).norm(), 0.0, Delta);
230 235
         #endif
@@ -232,38 +237,40 @@ public:
232 237
 
233 238
    void test_Ex() {
234 239
 
240
+        std::cout.precision(4);
241
+
235 242
         dipole->SetType(GROUNDEDELECTRICDIPOLE);
236 243
 		dipole->SetPolarisation(XPOLARISATION);
237 244
 
238 245
         // Put in a unit test that will be slow.
239 246
         std::cout << "GROUNDEDELECTRICDIPOLE X polarisation" << std::endl;
240 247
         std::cout << "=====================================\n";
241
-	    std::cout << "Lemma/C++: ";
248
+	    std::cout << std::setw(18) << "Lemma/C++: ";
242 249
         std::cout.flush();
243 250
 
244 251
   	    timer.begin();
245 252
 	    EmEarth->MakeCalc3();
246 253
 	    Real lemmaTime = timer.end();
247
-        std::cout << lemmaTime << " [s]" << std::endl;
254
+        std::cout << std::setw(14) << lemmaTime << std::setw(6) << " [s]" << std::endl;
248 255
 
249 256
         auto lc = receivers->GetEfield( 0 );
250 257
 
251 258
         #ifdef KIHALEE_EM1D
252 259
 	    receivers->ClearFields();
253
-        std::cout << "FORTRAN KiHa: ";
260
+        std::cout << std::setw(18) << "KiHa/Fortran: ";
254 261
         std::cout.flush();
255 262
   	    timer.begin();
256 263
  	    EmEarth->MakeCalc();
257 264
 	    Real kihaTime = timer.end();
258
-        std::cout << kihaTime << " [s]" << std::endl;
265
+        std::cout << std::setw(14) << kihaTime << std::setw(6) << " [s]" << std::endl;
259 266
 
260 267
         auto fc = receivers->GetEfield( 0 ); //0,0);
261 268
 
262
-        std::cout.precision(16);
263
-        std::cout << "Lemma norm |" << (lc).norm() << "|" << std::endl;
264
-        std::cout << "KiHa norm  |" << (fc).norm() << "|" << std::endl;
265
-        std::cout << "Difference norm |" << (lc - fc).norm() << "|\n";
266
-        std::cout << "Speedup:" << kihaTime/lemmaTime << "\n" << std::endl;
269
+        //std::cout.precision(16);
270
+        std::cout << std::setw(18) << "Lemma norm: "      << std::setw(14) << (lc).norm() << std::endl;
271
+        std::cout << std::setw(18) << "KiHa norm: "       << std::setw(14) <<  (fc).norm() << std::endl;
272
+        std::cout << std::setw(18) << "Difference norm: " << std::setw(14) << (lc - fc).norm() << "\n";
273
+        std::cout << std::setw(18) << "Speedup: "         << std::setw(14) << kihaTime/lemmaTime << "\n" << std::endl;
267 274
 
268 275
         TS_ASSERT_DELTA((lc-fc).norm(), 0.0, Delta);
269 276
         #endif
@@ -271,41 +278,41 @@ public:
271 278
 
272 279
    void test_Ey() {
273 280
 
281
+        std::cout.precision(4);
282
+
274 283
         dipole->SetType(GROUNDEDELECTRICDIPOLE);
275 284
 		dipole->SetPolarisation(YPOLARISATION);
276 285
 
277 286
         // Put in a unit test that will be slow.
278 287
         std::cout << "GROUNDEDELECTRICDIPOLE Y polarisation" << std::endl;
279 288
         std::cout << "=====================================\n";
280
-	    std::cout << "Lemma/C++: ";
289
+	    std::cout << std::setw(18) << "Lemma/C++: ";
281 290
         std::cout.flush();
282 291
 
283 292
   	    timer.begin();
284 293
 	    EmEarth->MakeCalc3();
285 294
 	    Real lemmaTime = timer.end();
286
-        std::cout << lemmaTime << " [s]" << std::endl;
295
+        std::cout << std::setw(14) << lemmaTime << std::setw(6) << " [s]" << std::endl;
287 296
 
288 297
         auto lc = receivers->GetEfield( 0 );
289 298
 
290 299
         #ifdef KIHALEE_EM1D
291 300
 	    receivers->ClearFields();
292
-        std::cout << "KiHa/FORTRAN: ";
301
+        std::cout << std::setw(18) << "KiHa/Fortran: ";
293 302
         std::cout.flush();
294 303
 
295 304
         timer.begin();
296 305
  	    EmEarth->MakeCalc();
297 306
 	    Real kihaTime = timer.end();
298
-        std::cout << kihaTime << " [s]" << std::endl;
307
+        std::cout << std::setw(14) << kihaTime << std::setw(6) << " [s]" << std::endl;
299 308
 
300 309
         auto fc = receivers->GetEfield( 0 ); //0,0);
301 310
 
302
-        std::cout << "Lemma time:" << lemmaTime << "\tKiHa time:" << kihaTime << std::endl;
303
-
304
-        std::cout.precision(16);
305
-        std::cout << "Lemma norm |" << (lc).norm() << "|" << std::endl;
306
-        std::cout << "KiHa norm  |" << (fc).norm() << "|" << std::endl;
307
-        std::cout << "Difference norm |" << (lc - fc).norm() << "|\n";
308
-        std::cout << "Speedup:" << kihaTime/lemmaTime << "\n" << std::endl;
311
+        //std::cout.precision(16);
312
+        std::cout << std::setw(18) << "Lemma norm: "      << std::setw(14) << (lc).norm() << std::endl;
313
+        std::cout << std::setw(18) << "KiHa norm: "       << std::setw(14) <<  (fc).norm() << std::endl;
314
+        std::cout << std::setw(18) << "Difference norm: " << std::setw(14) << (lc - fc).norm() << "\n";
315
+        std::cout << std::setw(18) << "Speedup: "         << std::setw(14) << kihaTime/lemmaTime << "\n" << std::endl;
309 316
 
310 317
         TS_ASSERT_DELTA((lc-fc).norm(), 0.0, Delta);
311 318
         #endif
@@ -313,41 +320,41 @@ public:
313 320
 
314 321
    void test_Ez() {
315 322
 
323
+        std::cout.precision(4);
324
+
316 325
         dipole->SetType(GROUNDEDELECTRICDIPOLE);
317 326
 		dipole->SetPolarisation(ZPOLARISATION);
318 327
 
319 328
         // Put in a unit test that will be slow.
320 329
         std::cout << "GROUNDEDELECTRICDIPOLE Z polarisation" << std::endl;
321 330
         std::cout << "=====================================\n";
322
-	    std::cout << "Lemma/C++: ";
331
+	    std::cout << std::setw(18) << "Lemma/C++: ";
323 332
         std::cout.flush();
324 333
 
325 334
   	    timer.begin();
326 335
 	    EmEarth->MakeCalc3();
327 336
 	    Real lemmaTime = timer.end();
328
-        std::cout << lemmaTime << " [s]" << std::endl;
337
+        std::cout << std::setw(14) << lemmaTime << std::setw(6) << " [s]" << std::endl;
329 338
 
330 339
         auto lc = receivers->GetEfield( 0 );
331 340
 
332 341
         #ifdef KIHALEE_EM1D
333 342
 	    receivers->ClearFields();
334
-        std::cout << "KiHa/FORTRAN: ";
343
+        std::cout << std::setw(18) << "KiHa/Fortran: ";
335 344
         std::cout.flush();
336 345
 
337 346
         timer.begin();
338 347
  	    EmEarth->MakeCalc();
339 348
 	    Real kihaTime = timer.end();
340
-        std::cout << kihaTime << " [s]" << std::endl;
349
+        std::cout << std::setw(14) << kihaTime << std::setw(6) << " [s]" << std::endl;
341 350
 
342 351
         auto fc = receivers->GetEfield( 0 ); //0,0);
343 352
 
344
-        std::cout << "Lemma time:" << lemmaTime << "\tKiHa time:" << kihaTime << std::endl;
345
-
346
-        std::cout.precision(16);
347
-        std::cout << "Lemma norm |" << (lc).norm() << "|" << std::endl;
348
-        std::cout << "KiHa norm  |" << (fc).norm() << "|" << std::endl;
349
-        std::cout << "Difference norm |" << (lc - fc).norm() << "|\n";
350
-        std::cout << "Speedup:" << kihaTime/lemmaTime << "\n" << std::endl;
353
+        //std::cout.precision(16);
354
+        std::cout << std::setw(18) << "Lemma norm: "      << std::setw(14) << (lc).norm() << std::endl;
355
+        std::cout << std::setw(18) << "KiHa norm: "       << std::setw(14) <<  (fc).norm() << std::endl;
356
+        std::cout << std::setw(18) << "Difference norm: " << std::setw(14) << (lc - fc).norm() << "\n";
357
+        std::cout << std::setw(18) << "Speedup: "         << std::setw(14) << kihaTime/lemmaTime << "\n" << std::endl;
351 358
 
352 359
         TS_ASSERT_DELTA((lc-fc).norm(), 0.0, Delta);
353 360
         #endif

Notiek ielāde…
Atcelt
Saglabāt