implement fix wall/morse based on fix wall/region and fix wall/harmonic
This commit is contained in:
@ -23,6 +23,7 @@
|
||||
#include "respa.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "utils.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
@ -99,6 +100,19 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) :
|
||||
estyle[nwall] = CONSTANT;
|
||||
}
|
||||
|
||||
if (utils::strmatch(style,"^wall/morse")) {
|
||||
if (strstr(arg[iarg+3],"v_") == arg[iarg+3]) {
|
||||
int n = strlen(&arg[iarg+3][2]) + 1;
|
||||
astr[nwall] = new char[n];
|
||||
strcpy(astr[nwall],&arg[iarg+3][2]);
|
||||
astyle[nwall] = VARIABLE;
|
||||
} else {
|
||||
alpha[nwall] = force->numeric(FLERR,arg[iarg+3]);
|
||||
astyle[nwall] = CONSTANT;
|
||||
}
|
||||
++iarg;
|
||||
}
|
||||
|
||||
if (strstr(arg[iarg+3],"v_") == arg[iarg+3]) {
|
||||
int n = strlen(&arg[iarg+3][2]) + 1;
|
||||
sstr[nwall] = new char[n];
|
||||
|
||||
Reference in New Issue
Block a user