Update bond_nonlinear.cpp

This commit is contained in:
Evangelos Voyiatzis 2020-04-01 14:54:17 +02:00 committed by GitHub
parent d0c1b7ea08
commit ef112be870
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -202,3 +202,13 @@ double BondNonlinear::single(int type, double rsq, int /*i*/, int /*j*/,
fforce = -epsilon[type]/r * 2.0*dr*lamdasq/denomsq;
return epsilon[type] * drsq / denom;
}
/* ---------------------------------------------------------------------- */
void *BondNonlinear::extract( char *str, int &dim )
{
dim = 1;
if (strcmp(str,"epsilon")==0) return (void*) epsilon;
if (strcmp(str,"r0")==0) return (void*) r0;
return NULL;
}