66 * 1-1. test if the bravis lattice analysis is right;
77 * 1-2. check if matrix-type and vector3-type;
88 * input and optimized lattice vectors are right;
9- * 1-3. double-check for if `gtrans_convert`
9+ * 1-3. double-check for if `gtrans_convert`
1010 * gives the same results as `veccon`;
1111 * 1-4. check `invmap` function gives the right result;
1212 * 1-5 test if `gmatrix_convert` and `gmatrix_convert_int`
1313 * gives the right result;
1414 * 2. function: `atom_ordering_new:
1515 * test the new atom-sort algorithm gives the right result;
1616 *3. function: `pricell`:
17- * test if the number of primitive cells are right,
17+ * test if the number of primitive cells are right,
1818 * using cases whose space group
1919 * is different from its point group.
2020 ***********************************************/
@@ -34,6 +34,10 @@ UnitCell::UnitCell(){}
3434UnitCell::~UnitCell (){}
3535Magnetism::Magnetism (){}
3636Magnetism::~Magnetism () {}
37+ SepPot::SepPot (){}
38+ SepPot::~SepPot (){}
39+ Sep_Cell::Sep_Cell () noexcept {}
40+ Sep_Cell::~Sep_Cell () noexcept {}
3741
3842TEST_F (SymmetryTest, AnalySys)
3943{
@@ -50,8 +54,8 @@ TEST_F(SymmetryTest, AnalySys)
5054 int cal_ibrav = symm.real_brav ;
5155 EXPECT_EQ (cal_ibrav, ref_ibrav);
5256 EXPECT_EQ (cal_point_group, ref_point_group) << " ibrav=" << stru_lib[stru].ibrav ;
53-
54- // 2. input and optimized lattice, gtrans_convert and veccon
57+
58+ // 2. input and optimized lattice, gtrans_convert and veccon
5559 // input lattice
5660 EXPECT_EQ (symm.s1 , ucell.a1 );
5761 EXPECT_EQ (symm.s2 , ucell.a2 );
@@ -73,7 +77,7 @@ TEST_F(SymmetryTest, AnalySys)
7377 symm.gtrans_convert (symm.gtrans , gtrans_optconf.data (), symm.nrotk , ucell.latvec , symm.optlat );
7478 symm.veccon (gtrans_veccon, gtrans_optconf_veccon, symm.nrotk , symm.s1 , symm.s2 , symm.s3 , symm.a1 , symm.a2 , symm.a3 );
7579 for (int i=0 ;i<symm.nrotk ;++i)
76- EXPECT_EQ (gtrans_optconf[i], ModuleBase::Vector3<double >(gtrans_optconf_veccon[i*3 ],
80+ EXPECT_EQ (gtrans_optconf[i], ModuleBase::Vector3<double >(gtrans_optconf_veccon[i*3 ],
7781 gtrans_optconf_veccon[i*3 +1 ], gtrans_optconf_veccon[i*3 +2 ]));
7882 delete[] gtrans_veccon;
7983 delete[] gtrans_optconf_veccon;
@@ -108,7 +112,7 @@ TEST_F(SymmetryTest, AnalySys)
108112 symm.gmatrix_convert_int (symm.gmatrix , gmatrix_opt, symm.nrotk , ucell.latvec , symm.optlat ); // 1->2
109113 symm.gmatrix_convert_int (gmatrix_opt, gmatrix_input_back, symm.nrotk , symm.optlat , ucell.latvec ); // 2->3
110114 symm.gmatrix_convert_int (gmatrix_input_back, gmatrix_opt_back, symm.nrotk , ucell.latvec , symm.optlat ); // 3->4
111-
115+
112116 symm.gmatrix_convert (symm.gmatrix , kgmatrix_nonint, symm.nrotk , ucell.latvec , ucell.G );
113117 for (int i=0 ;i<symm.nrotk ;++i)
114118 {
@@ -130,7 +134,7 @@ TEST_F(SymmetryTest, AnalySys)
130134 EXPECT_NEAR (gmatrix_opt[i].e31 , gmatrix_opt_back[i].e31 , DOUBLETHRESHOLD);
131135 EXPECT_NEAR (gmatrix_opt[i].e23 , gmatrix_opt_back[i].e23 , DOUBLETHRESHOLD);
132136 EXPECT_NEAR (gmatrix_opt[i].e32 , gmatrix_opt_back[i].e32 , DOUBLETHRESHOLD);
133-
137+
134138 ModuleBase::Matrix3 tmpA=symm.optlat .Inverse ()*gmatrix_opt[i]*symm.optlat ; // A^-1*SA*A
135139 ModuleBase::Matrix3 tmpB=ucell.latvec .Inverse ()*symm.gmatrix [i]*ucell.latvec ;// B^-1*SB*B
136140 ModuleBase::Matrix3 tmpG_int=ucell.G .Inverse ()*symm.kgmatrix [i]*ucell.G ;// G^-1*SG*G
@@ -168,7 +172,7 @@ TEST_F(SymmetryTest, AnalySys)
168172 EXPECT_NEAR (tmpA.e23 , tmpG.e23 , DOUBLETHRESHOLD);
169173 EXPECT_NEAR (tmpA.e32 , tmpG.e32 , DOUBLETHRESHOLD);
170174 }
171-
175+
172176 delete[] gmatrix_input_back;
173177 delete[] gmatrix_opt;
174178 delete[] gmatrix_opt_back;
@@ -180,7 +184,7 @@ TEST_F(SymmetryTest, AnalySys)
180184
181185TEST_F (SymmetryTest, AtomOrderingNew)
182186{
183- // the old function `atom_ordering` has bugs
187+ // the old function `atom_ordering` has bugs
184188 // so here I do not compare with its results
185189 ModuleSymmetry::Symmetry symm;
186190 symm.epsilon =1e-5 ;
@@ -199,7 +203,7 @@ TEST_F(SymmetryTest, AtomOrderingNew)
199203 }
200204 // ordering
201205 symm.test_atom_ordering (new_pos, nat, subindex);
202- // check
206+ // check
203207 for (int i=0 ;i<nat-1 ;++i)
204208 {
205209 // x[i]<=x[i+1]
@@ -250,7 +254,7 @@ TEST_F(SymmetryTest, SG_Pricell)
250254 std::string cal_point_group = symm.pgname ;
251255 std::string ref_space_group = supercell_lib[stru].space_group ;
252256 std::string cal_space_group = symm.spgname ;
253-
257+
254258 int ref_ncells = supercell_lib[stru].ibrav ;
255259 EXPECT_EQ (symm.ncell , ref_ncells);
256260 EXPECT_EQ (cal_point_group, ref_point_group);
0 commit comments