Skip to content
Snippets Groups Projects
Commit fca6d721 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

completed synchronization with non-threaded version

parent dd192ca7
No related branches found
No related tags found
No related merge requests found
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace FixConst; using namespace FixConst;
enum{XPLANE=0,YPLANE=1,ZPLANE=2,ZCYLINDER}; // XYZ PLANE need to be 0,1,2 enum{XPLANE=0,YPLANE=1,ZPLANE=2,ZCYLINDER,REGION}; // XYZ PLANE need to be 0,1,2
enum{HOOKE,HOOKE_HISTORY,HERTZ_HISTORY}; enum{HOOKE,HOOKE_HISTORY,HERTZ_HISTORY,BONDED_HISTORY};
#define BIG 1.0e20 #define BIG 1.0e20
...@@ -129,14 +129,16 @@ void FixWallGranOMP::post_force(int vflag) ...@@ -129,14 +129,16 @@ void FixWallGranOMP::post_force(int vflag)
} else if (wallstyle == ZCYLINDER) { } else if (wallstyle == ZCYLINDER) {
delxy = sqrt(x[i][0]*x[i][0] + x[i][1]*x[i][1]); delxy = sqrt(x[i][0]*x[i][0] + x[i][1]*x[i][1]);
delr = cylradius - delxy; delr = cylradius - delxy;
if (delr > radius[i]) dz = cylradius; if (delr > radius[i]) {
else { dz = cylradius;
rwall = 0.0;
} else {
dx = -delr/delxy * x[i][0]; dx = -delr/delxy * x[i][0];
dy = -delr/delxy * x[i][1]; dy = -delr/delxy * x[i][1];
rwall = (delxy < cylradius) ? -2*cylradius : 2*cylradius; rwall = (delxy < cylradius) ? -2*cylradius : 2*cylradius;
if (wshear && axis != 2) { if (wshear && axis != 2) {
vwall[0] = vshear * x[i][1]/delxy; vwall[0] += vshear * x[i][1]/delxy;
vwall[1] = -vshear * x[i][0]/delxy; vwall[1] += -vshear * x[i][0]/delxy;
vwall[2] = 0.0; vwall[2] = 0.0;
} }
} }
...@@ -145,11 +147,10 @@ void FixWallGranOMP::post_force(int vflag) ...@@ -145,11 +147,10 @@ void FixWallGranOMP::post_force(int vflag)
rsq = dx*dx + dy*dy + dz*dz; rsq = dx*dx + dy*dy + dz*dz;
if (rsq > radius[i]*radius[i]) { if (rsq > radius[i]*radius[i]) {
if (pairstyle != HOOKE) { if (history)
shearone[i][0] = 0.0; for (int j = 0; j < sheardim; j++)
shearone[i][1] = 0.0; shearone[i][j] = 0.0;
shearone[i][2] = 0.0;
}
} else { } else {
// meff = effective mass of sphere // meff = effective mass of sphere
...@@ -158,18 +159,20 @@ void FixWallGranOMP::post_force(int vflag) ...@@ -158,18 +159,20 @@ void FixWallGranOMP::post_force(int vflag)
double meff = rmass[i]; double meff = rmass[i];
if (fix_rigid && mass_rigid[i] > 0.0) meff = mass_rigid[i]; if (fix_rigid && mass_rigid[i] > 0.0) meff = mass_rigid[i];
// inovke sphere/wall interaction // invoke sphere/wall interaction
if (pairstyle == HOOKE) if (pairstyle == HOOKE)
hooke(rsq,dx,dy,dz,vwall,v[i],f[i],omega[i],torque[i], hooke(rsq,dx,dy,dz,vwall,v[i],f[i],
radius[i],meff); omega[i],torque[i],radius[i],meff);
else if (pairstyle == HOOKE_HISTORY) else if (pairstyle == HOOKE_HISTORY)
hooke_history(rsq,dx,dy,dz,vwall,v[i],f[i],omega[i],torque[i], hooke_history(rsq,dx,dy,dz,vwall,v[i],f[i],
radius[i],meff,shearone[i]); omega[i],torque[i],radius[i],meff,shearone[i]);
else if (pairstyle == HERTZ_HISTORY) else if (pairstyle == HERTZ_HISTORY)
hertz_history(rsq,dx,dy,dz,vwall,rwall,v[i],f[i], hertz_history(rsq,dx,dy,dz,vwall,rwall,v[i],f[i],
omega[i],torque[i],radius[i],meff,shearone[i]); omega[i],torque[i],radius[i],meff,shearone[i]);
else if (pairstyle == BONDED_HISTORY)
bonded_history(rsq,dx,dy,dz,vwall,rwall,v[i],f[i],
omega[i],torque[i],radius[i],meff,shearone[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