@@ -114,24 +114,24 @@ void LBFGS::prepare_step(std::vector<std::vector<double>>& force,
114114 for (int i=loopmax-1 ;i>=0 ;i--)
115115 {
116116 a[i]=rho[i]*DotInVAndV (s[i],q);
117- auto temp=DotInVAndFloat (y[i],a[i]);
117+ std::vector< double > temp=DotInVAndFloat (y[i],a[i]);
118118 q=VSubV (q,temp);
119119 }
120120 std::vector<double > z=DotInVAndFloat (q,H0);
121121 for (int i=0 ;i<loopmax;i++)
122122 {
123123 double b=rho[i]*DotInVAndV (y[i],z);
124- auto temp=DotInVAndFloat (s[i],a[i]-b);
124+ std::vector< double > temp=DotInVAndFloat (s[i],a[i]-b);
125125 z=VAddV (z,temp);
126126 }
127- auto temp0=DotInVAndFloat (z,-1 );
127+ std::vector< double > temp0=DotInVAndFloat (z,-1 );
128128 dpos=ReshapeVToM (temp0);
129- auto temp1=DotInVAndFloat (changedforce,-1 );
129+ std::vector< double > temp1=DotInVAndFloat (changedforce,-1 );
130130 std::vector<std::vector<double >> g=ReshapeVToM (temp1);
131131 energy=etot;
132132 // alpha_k=l_search.line_search(ucell,pos,g,energy,maxstep,size,dpos,pos,solver);
133- // auto temp2=DotInVAndFloat(temp0,alpha_k);
134- auto temp2=DotInVAndFloat (temp0,1 );
133+ // std::vector<double> temp2=DotInVAndFloat(temp0,alpha_k);
134+ std::vector< double > temp2=DotInVAndFloat (temp0,1 );
135135 dpos=ReshapeVToM (temp2);
136136 for (int i = 0 ; i < size; i++)
137137 {
@@ -160,7 +160,7 @@ void LBFGS::update(std::vector<std::vector<double>>& pos_taud,
160160{
161161 if (iteration>0 )
162162 {
163- auto term=ReshapeMToV (pos_taud);
163+ std::vector< double > term=ReshapeMToV (pos_taud);
164164 std::vector<double > dpos =VSubV (term, pos_taud0);
165165 for (int i=0 ;i<3 *size;i++)
166166 {
@@ -221,7 +221,7 @@ void LBFGS::update(std::vector<std::vector<double>>& pos_taud,
221221}
222222void LBFGS::determine_step (std::vector<double >& steplength,std::vector<std::vector<double >>& dpos,double & maxstep)
223223{
224- auto maxsteplength = max_element (steplength.begin (), steplength.end ());
224+ std::vector< double >::iterator maxsteplength = max_element (steplength.begin (), steplength.end ());
225225 double a = *maxsteplength;
226226 if (a >= maxstep)
227227 {
0 commit comments