Skip to content

Commit a0197d8

Browse files
committed
add lbfgs method
1 parent f4fefe4 commit a0197d8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

source/module_relax/relax_old/bfgs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ void BFGS::relax_step(const ModuleBase::matrix& _force,UnitCell& ucell)
4444
force[i][j]=_force(i,j)*ModuleBase::Ry_to_eV/ModuleBase::BOHR_TO_A;
4545
}
4646
}
47-
std::cout<<"force"<<std::endl;
47+
/*std::cout<<"force"<<std::endl;
4848
for(int i=0;i<size;i++)
4949
{
5050
for(int j=0;j<3;j++)
5151
{
5252
std::cout<<force[i][j]<<' ';
5353
}
5454
std::cout<<std::endl;
55-
}
55+
}*/
5656

5757
int k=0;
5858
for(int i=0;i<ucell.ntype;i++)

source/module_relax/relax_old/test/bfgs_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class BFGSTest : public ::testing::Test {
1717

1818
ucell.ntype = 2;
1919
ucell.lat0 = 1.0;
20+
ucell.nat = 10;
2021
ucell.atoms = new Atom[ucell.ntype];
2122
for (int i = 0; i < ucell.ntype; i++) {
2223
ucell.atoms[i].na = 5;

0 commit comments

Comments
 (0)