Skip to content
Snippets Groups Projects
Commit 66c4231f authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Fix #225

MOVINGRESTRAINT with TORSION
parent d6033845
No related branches found
No related tags found
No related merge requests found
......@@ -230,7 +230,11 @@ void MovingRestraint::calculate(){
double c2=(now-step[i-1])/double(step[i]-step[i-1]);
double c1=1.0-c2;
for(unsigned j=0;j<narg;j++) kk[j]=(c1*kappa[i-1][j]+c2*kappa[i][j]);
for(unsigned j=0;j<narg;j++) aa[j]=(c1*at[i-1][j]+c2*at[i][j]);
for(unsigned j=0;j<narg;j++) {
const double a1=at[i-1][j];
const double a2=at[i][j];
aa[j]=(c1*a1+c2*(a1+difference(j,a1,a2)));
}
}
tot_work=0.0;
for(unsigned i=0;i<narg;++i){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment