@@ -107,9 +107,6 @@ class MathChebyshevTest : public testing::Test
107
107
108
108
TEST_F (MathChebyshevTest, calcoef_real)
109
109
{
110
- #ifdef __MPI
111
- #undef __MPI
112
- #endif
113
110
auto fun_x6 = [&](double x) { return fun.x6 (x); };
114
111
auto fun_x7 = [&](double x) { return fun.x7 (x); };
115
112
p_chetest = new ModuleBase::Chebyshev<double >(10 );
@@ -133,9 +130,6 @@ TEST_F(MathChebyshevTest, calcoef_real)
133
130
134
131
TEST_F (MathChebyshevTest, calcoef_pair)
135
132
{
136
- #ifdef __MPI
137
- #undef __MPI
138
- #endif
139
133
auto fun_x6 = [&](double x) { return fun.x6 (x); };
140
134
auto fun_x7 = [&](double x) { return fun.x7 (x); };
141
135
p_chetest = new ModuleBase::Chebyshev<double >(10 );
@@ -154,9 +148,6 @@ TEST_F(MathChebyshevTest, calcoef_pair)
154
148
155
149
TEST_F (MathChebyshevTest, calcoef_complex)
156
150
{
157
- #ifdef __MPI
158
- #undef __MPI
159
- #endif
160
151
auto fun_expi = [&](std::complex<double > x) { return fun.expi (x); };
161
152
const int norder = 100 ;
162
153
const double PI = 3.14159265358979323846 ;
@@ -178,9 +169,6 @@ TEST_F(MathChebyshevTest, calcoef_complex)
178
169
179
170
TEST_F (MathChebyshevTest, calfinalvec_real)
180
171
{
181
- #ifdef __MPI
182
- #undef __MPI
183
- #endif
184
172
const int norder = 100 ;
185
173
const double E = 2.718281828459046 ;
186
174
p_chetest = new ModuleBase::Chebyshev<double >(norder);
@@ -215,9 +203,6 @@ TEST_F(MathChebyshevTest, calfinalvec_real)
215
203
216
204
TEST_F (MathChebyshevTest, calfinalvec_complex)
217
205
{
218
- #ifdef __MPI
219
- #undef __MPI
220
- #endif
221
206
const int norder = 100 ;
222
207
const double E = 2.718281828459046 ;
223
208
p_chetest = new ModuleBase::Chebyshev<double >(norder);
@@ -252,9 +237,6 @@ TEST_F(MathChebyshevTest, calfinalvec_complex)
252
237
253
238
TEST_F (MathChebyshevTest, calpolyvec_complex)
254
239
{
255
- #ifdef __MPI
256
- #undef __MPI
257
- #endif
258
240
const int norder = 100 ;
259
241
const double E = 2.718281828459046 ;
260
242
p_chetest = new ModuleBase::Chebyshev<double >(norder);
@@ -302,9 +284,6 @@ TEST_F(MathChebyshevTest, calpolyvec_complex)
302
284
303
285
TEST_F (MathChebyshevTest, tracepolyA)
304
286
{
305
- #ifdef __MPI
306
- #undef __MPI
307
- #endif
308
287
const int norder = 100 ;
309
288
p_chetest = new ModuleBase::Chebyshev<double >(norder);
310
289
@@ -359,7 +338,6 @@ TEST_F(MathChebyshevTest, checkconverge)
359
338
{
360
339
#ifdef __MPI
361
340
#undef __MPI
362
- #endif
363
341
const int norder = 100 ;
364
342
p_chetest = new ModuleBase::Chebyshev<double >(norder);
365
343
auto fun_sigma_y
@@ -401,13 +379,12 @@ TEST_F(MathChebyshevTest, checkconverge)
401
379
402
380
delete[] v;
403
381
delete p_chetest;
382
+ #define __MPI
383
+ #endif
404
384
}
405
385
406
386
TEST_F (MathChebyshevTest, recurs)
407
387
{
408
- #ifdef __MPI
409
- #undef __MPI
410
- #endif
411
388
testing::internal::CaptureStdout ();
412
389
EXPECT_EXIT (ModuleBase::Chebyshev<double > noneche (0 ), ::testing::ExitedWithCode (1 ), " " );
413
390
std::string output = testing::internal::GetCapturedStdout ();
@@ -423,9 +400,6 @@ TEST_F(MathChebyshevTest, recurs)
423
400
#ifdef __ENABLE_FLOAT_FFTW
424
401
TEST_F (MathChebyshevTest, calcoef_real_float)
425
402
{
426
- #ifdef __MPI
427
- #undef __MPI
428
- #endif
429
403
auto fun_x6f = [&](float x) { return fun.x6 (x); };
430
404
auto fun_x7f = [&](float x) { return fun.x7 (x); };
431
405
p_fchetest = new ModuleBase::Chebyshev<float >(10 );
@@ -448,9 +422,6 @@ TEST_F(MathChebyshevTest, calcoef_real_float)
448
422
449
423
TEST_F (MathChebyshevTest, calcoef_pair_float)
450
424
{
451
- #ifdef __MPI
452
- #undef __MPI
453
- #endif
454
425
auto fun_x6f = [&](float x) { return fun.x6 (x); };
455
426
auto fun_x7f = [&](float x) { return fun.x7 (x); };
456
427
p_fchetest = new ModuleBase::Chebyshev<float >(10 );
@@ -469,9 +440,6 @@ TEST_F(MathChebyshevTest, calcoef_pair_float)
469
440
470
441
TEST_F (MathChebyshevTest, calcoef_complex_float)
471
442
{
472
- #ifdef __MPI
473
- #undef __MPI
474
- #endif
475
443
auto fun_expif = [&](std::complex<float > x) { return fun.expi (x); };
476
444
const int norder = 100 ;
477
445
const float PI = 3.14159265358979323846 ;
@@ -493,9 +461,6 @@ TEST_F(MathChebyshevTest, calcoef_complex_float)
493
461
494
462
TEST_F (MathChebyshevTest, calfinalvec_real_float)
495
463
{
496
- #ifdef __MPI
497
- #undef __MPI
498
- #endif
499
464
const int norder = 100 ;
500
465
const float E = 2.718281828459046 ;
501
466
p_fchetest = new ModuleBase::Chebyshev<float >(norder);
@@ -530,9 +495,6 @@ TEST_F(MathChebyshevTest, calfinalvec_real_float)
530
495
531
496
TEST_F (MathChebyshevTest, calfinalvec_complex_float)
532
497
{
533
- #ifdef __MPI
534
- #undef __MPI
535
- #endif
536
498
const int norder = 100 ;
537
499
const float E = 2.718281828459046 ;
538
500
p_fchetest = new ModuleBase::Chebyshev<float >(norder);
@@ -567,9 +529,6 @@ TEST_F(MathChebyshevTest, calfinalvec_complex_float)
567
529
568
530
TEST_F (MathChebyshevTest, calpolyvec_float)
569
531
{
570
- #ifdef __MPI
571
- #undef __MPI
572
- #endif
573
532
const int norder = 100 ;
574
533
const float E = 2.718281828459046 ;
575
534
p_fchetest = new ModuleBase::Chebyshev<float >(norder);
@@ -617,9 +576,6 @@ TEST_F(MathChebyshevTest, calpolyvec_float)
617
576
618
577
TEST_F (MathChebyshevTest, tracepolyA_float)
619
578
{
620
- #ifdef __MPI
621
- #undef __MPI
622
- #endif
623
579
const int norder = 100 ;
624
580
p_fchetest = new ModuleBase::Chebyshev<float >(norder);
625
581
@@ -669,9 +625,6 @@ TEST_F(MathChebyshevTest, tracepolyA_float)
669
625
670
626
TEST_F (MathChebyshevTest, checkconverge_float)
671
627
{
672
- #ifdef __MPI
673
- #undef __MPI
674
- #endif
675
628
const int norder = 100 ;
676
629
p_fchetest = new ModuleBase::Chebyshev<float >(norder);
677
630
0 commit comments