@@ -107,10 +107,9 @@ class ChargeMixingTest : public ::testing::Test
107107 PARAM.input .mixing_gg0_mag = 0.0 ;
108108 PARAM.input .mixing_gg0_min = 0.1 ;
109109 PARAM.input .mixing_angle = -10.0 ;
110- PARAM.input .mixing_dmr ,
111- ucell.omega ,
112- ucell.tpiba = false ;
113-
110+ PARAM.input .mixing_dmr = false ;
111+ ucell.tpiba = 1.0 ;
112+ ucell.omega = 2.0 ;
114113 }
115114 ModulePW::PW_Basis pw_basis;
116115 ModulePW::PW_Basis_Sup pw_dbasis;
@@ -406,9 +405,18 @@ TEST_F(ChargeMixingTest, InnerDotRecipHartreeTest)
406405 EXPECT_NEAR (inner, 0.5 * pw_basis.nrxx * (pw_basis.nrxx - 1 ), 1e-8 );
407406
408407 // RECIPROCAL NSPIN=1
409- ucell.tpiba = 1.0 ;
410- ucell.omega = 2.0 ;
411-
408+ CMtest.set_mixing (PARAM.input .mixing_mode ,
409+ PARAM.input .mixing_beta ,
410+ PARAM.input .mixing_ndim ,
411+ PARAM.input .mixing_gg0 ,
412+ PARAM.input .mixing_tau ,
413+ PARAM.input .mixing_beta_mag ,
414+ PARAM.input .mixing_gg0_mag ,
415+ PARAM.input .mixing_gg0_min ,
416+ PARAM.input .mixing_angle ,
417+ PARAM.input .mixing_dmr ,
418+ ucell.omega ,
419+ ucell.tpiba );
412420 PARAM.input .nspin = 1 ;
413421 std::vector<std::complex <double >> drhog1 (pw_basis.npw );
414422 std::vector<std::complex <double >> drhog2 (pw_basis.npw );
@@ -505,6 +513,18 @@ TEST_F(ChargeMixingTest, InnerDotRecipRhoTest)
505513 Charge_Mixing CMtest;
506514 CMtest.set_rhopw (&pw_basis, &pw_basis);
507515 PARAM.input .nspin = 1 ;
516+ CMtest.set_mixing (PARAM.input .mixing_mode ,
517+ PARAM.input .mixing_beta ,
518+ PARAM.input .mixing_ndim ,
519+ PARAM.input .mixing_gg0 ,
520+ PARAM.input .mixing_tau ,
521+ PARAM.input .mixing_beta_mag ,
522+ PARAM.input .mixing_gg0_mag ,
523+ PARAM.input .mixing_gg0_min ,
524+ PARAM.input .mixing_angle ,
525+ PARAM.input .mixing_dmr ,
526+ ucell.omega ,
527+ ucell.tpiba );
508528 std::vector<double > drhor1 (pw_basis.nrxx );
509529 std::vector<double > drhor2 (pw_basis.nrxx );
510530 for (int i = 0 ; i < pw_basis.nrxx ; ++i)
@@ -573,6 +593,18 @@ TEST_F(ChargeMixingTest, KerkerScreenRecipTest)
573593 Charge_Mixing CMtest;
574594 CMtest.set_rhopw (&pw_basis, &pw_basis);
575595 ucell.tpiba = 1.0 ;
596+ CMtest.set_mixing (PARAM.input .mixing_mode ,
597+ PARAM.input .mixing_beta ,
598+ PARAM.input .mixing_ndim ,
599+ PARAM.input .mixing_gg0 ,
600+ PARAM.input .mixing_tau ,
601+ PARAM.input .mixing_beta_mag ,
602+ PARAM.input .mixing_gg0_mag ,
603+ PARAM.input .mixing_gg0_min ,
604+ PARAM.input .mixing_angle ,
605+ PARAM.input .mixing_dmr ,
606+ ucell.omega ,
607+ ucell.tpiba );
576608 // nspin = 1
577609 PARAM.input .nspin = 1 ;
578610 std::complex <double >* drhog = new std::complex <double >[PARAM.input .nspin *pw_basis.npw ];
@@ -703,7 +735,18 @@ TEST_F(ChargeMixingTest, KerkerScreenRealTest)
703735 Charge_Mixing CMtest;
704736 CMtest.set_rhopw (&pw_basis, &pw_basis);
705737 ucell.tpiba = 1.0 ;
706-
738+ CMtest.set_mixing (PARAM.input .mixing_mode ,
739+ PARAM.input .mixing_beta ,
740+ PARAM.input .mixing_ndim ,
741+ PARAM.input .mixing_gg0 ,
742+ PARAM.input .mixing_tau ,
743+ PARAM.input .mixing_beta_mag ,
744+ PARAM.input .mixing_gg0_mag ,
745+ PARAM.input .mixing_gg0_min ,
746+ PARAM.input .mixing_angle ,
747+ PARAM.input .mixing_dmr ,
748+ ucell.omega ,
749+ ucell.tpiba );
707750 // nspin = 1
708751 PARAM.input .nspin = 1 ;
709752 double * drhor = new double [PARAM.input .nspin *pw_basis.nrxx ];
0 commit comments