@@ -31,10 +31,6 @@ Charge::~Charge()
3131{
3232}
3333
34- double elecstate::get_ucell_omega ()
35- {
36- return 500.0 ;
37- }
3834
3935class MagnetismTest : public ::testing::Test
4036{
@@ -57,11 +53,6 @@ TEST_F(MagnetismTest, Magnetism)
5753 EXPECT_EQ (nullptr , magnetism->start_magnetization );
5854}
5955
60- TEST_F (MagnetismTest, GlobalInfo)
61- {
62- EXPECT_EQ (500.0 , elecstate::get_ucell_omega ());
63- }
64-
6556TEST_F (MagnetismTest, JudgeParallel)
6657{
6758 double a[3 ] = {1.0 , 0.0 , 0.0 };
@@ -91,7 +82,7 @@ TEST_F(MagnetismTest, ComputeMagnetizationS2)
9182 chr->rho [1 ][ir] = 1.01 ;
9283 }
9384 double * nelec_spin = new double [2 ];
94- magnetism->compute_magnetization (chr->nrxx , chr->nxyz , chr->rho , nelec_spin);
85+ magnetism->compute_magnetization (500.0 , chr->nrxx , chr->nxyz , chr->rho , nelec_spin);
9586 EXPECT_DOUBLE_EQ (-0.5 , magnetism->tot_magnetization );
9687 EXPECT_DOUBLE_EQ (0.5 , magnetism->abs_magnetization );
9788 EXPECT_DOUBLE_EQ (4.75 , nelec_spin[0 ]);
@@ -125,7 +116,7 @@ TEST_F(MagnetismTest, ComputeMagnetizationS4)
125116 chr->rho [3 ][ir] = 1.00 ;
126117 }
127118 double * nelec_spin = new double [4 ];
128- magnetism->compute_magnetization (chr->nrxx , chr->nxyz , chr->rho , nelec_spin);
119+ magnetism->compute_magnetization (500.0 , chr->nrxx , chr->nxyz , chr->rho , nelec_spin);
129120 EXPECT_DOUBLE_EQ (100.0 , magnetism->abs_magnetization );
130121 EXPECT_DOUBLE_EQ (50.0 *std::sqrt (2.0 ), magnetism->tot_magnetization_nc [0 ]);
131122 EXPECT_DOUBLE_EQ (50.0 , magnetism->tot_magnetization_nc [1 ]);
0 commit comments