@@ -24,6 +24,8 @@ Magnetism::~Magnetism()
2424{
2525 delete[] this ->start_magnetization ;
2626}
27+ Parallel_Grid::~Parallel_Grid (){};
28+
2729
2830// mock functions for Charge
2931Charge::Charge ()
@@ -87,7 +89,7 @@ Structure_Factor::Structure_Factor()
8789Structure_Factor::~Structure_Factor ()
8890{
8991}
90- void Structure_Factor::setup_structure_factor (const UnitCell* Ucell , const ModulePW::PW_Basis* rho_basis )
92+ void Structure_Factor::setup_structure_factor (const UnitCell*, const Parallel_Grid& , const ModulePW::PW_Basis*)
9193{
9294}
9395
@@ -113,6 +115,7 @@ class ChargeExtraTest : public ::testing::Test
113115 Charge_Extra CE;
114116 UcellTestPrepare utp = UcellTestLib[" Si" ];
115117 std::unique_ptr<UnitCell> ucell;
118+ Parallel_Grid* pgrid = nullptr ;
116119 Charge charge;
117120 Structure_Factor sf;
118121 void SetUp () override
@@ -183,7 +186,7 @@ TEST_F(ChargeExtraTest, ExtrapolateChargeCase1)
183186 CE.pot_order = 3 ;
184187
185188 GlobalV::ofs_running.open (" log" );
186- CE.extrapolate_charge (*ucell.get (), &charge, &sf, GlobalV::ofs_running, GlobalV::ofs_warning);
189+ CE.extrapolate_charge (pgrid, *ucell.get (), &charge, &sf, GlobalV::ofs_running, GlobalV::ofs_warning);
187190 GlobalV::ofs_running.close ();
188191
189192 // Check the results
@@ -205,7 +208,7 @@ TEST_F(ChargeExtraTest, ExtrapolateChargeCase2)
205208 CE.pot_order = 3 ;
206209
207210 GlobalV::ofs_running.open (" log" );
208- CE.extrapolate_charge (*ucell.get (), &charge, &sf, GlobalV::ofs_running, GlobalV::ofs_warning);
211+ CE.extrapolate_charge (pgrid, *ucell.get (), &charge, &sf, GlobalV::ofs_running, GlobalV::ofs_warning);
209212 GlobalV::ofs_running.close ();
210213
211214 // Check the results
@@ -227,7 +230,7 @@ TEST_F(ChargeExtraTest, ExtrapolateChargeCase3)
227230 CE.pot_order = 3 ;
228231
229232 GlobalV::ofs_running.open (" log" );
230- CE.extrapolate_charge (*ucell.get (), &charge, &sf, GlobalV::ofs_running, GlobalV::ofs_warning);
233+ CE.extrapolate_charge (pgrid, *ucell.get (), &charge, &sf, GlobalV::ofs_running, GlobalV::ofs_warning);
231234 GlobalV::ofs_running.close ();
232235
233236 // Check the results
@@ -248,7 +251,7 @@ TEST_F(ChargeExtraTest, ExtrapolateChargeCase4)
248251 CE.istep = 3 ;
249252
250253 GlobalV::ofs_running.open (" log" );
251- CE.extrapolate_charge (*ucell.get (), &charge, &sf, GlobalV::ofs_running, GlobalV::ofs_warning);
254+ CE.extrapolate_charge (pgrid, *ucell.get (), &charge, &sf, GlobalV::ofs_running, GlobalV::ofs_warning);
252255 GlobalV::ofs_running.close ();
253256
254257 // Check the results
0 commit comments