while space and source formatting cleanup

This commit is contained in:
Axel Kohlmeyer 2019-04-29 09:17:29 -04:00
parent 6088f2a6a2
commit af8a71b1ad
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
6 changed files with 41 additions and 41 deletions

View File

@ -1161,7 +1161,7 @@ void FixWallGran::granular(double rsq, double dx, double dy, double dz,
if (damping_model == VELOCITY) { if (damping_model == VELOCITY) {
damp_normal = 1; damp_normal = 1;
} }
else if (damping_model == MASS_VELOCITY){ else if (damping_model == MASS_VELOCITY) {
damp_normal = meff; damp_normal = meff;
} }
else if (damping_model == VISCOELASTIC) { else if (damping_model == VISCOELASTIC) {

View File

@ -121,7 +121,7 @@ void FixWallGranRegion::init()
region->reset_vel(); region->reset_vel();
} }
if (motion_resetflag){ if (motion_resetflag) {
char str[256]; char str[256];
snprintf(str,256,"Region properties for region %s are inconsistent " snprintf(str,256,"Region properties for region %s are inconsistent "
"with restart file, resetting its motion",idregion); "with restart file, resetting its motion",idregion);
@ -190,7 +190,7 @@ void FixWallGranRegion::post_force(int /*vflag*/)
if (mask[i] & groupbit) { if (mask[i] & groupbit) {
if (!region->match(x[i][0],x[i][1],x[i][2])) continue; if (!region->match(x[i][0],x[i][1],x[i][2])) continue;
if (pairstyle == GRANULAR && normal_model == JKR){ if (pairstyle == GRANULAR && normal_model == JKR) {
nc = region->surface(x[i][0],x[i][1],x[i][2], nc = region->surface(x[i][0],x[i][1],x[i][2],
radius[i]+pulloff_distance(radius[i])); radius[i]+pulloff_distance(radius[i]));
} }
@ -232,8 +232,8 @@ void FixWallGranRegion::post_force(int /*vflag*/)
rsq = region->contact[ic].r*region->contact[ic].r; rsq = region->contact[ic].r*region->contact[ic].r;
if (pairstyle == GRANULAR && normal_model == JKR){ if (pairstyle == GRANULAR && normal_model == JKR) {
if (history_many[i][c2r[ic]][0] == 0.0 && rsq > radius[i]*radius[i]){ if (history_many[i][c2r[ic]][0] == 0.0 && rsq > radius[i]*radius[i]) {
for (m = 0; m < size_history; m++) for (m = 0; m < size_history; m++)
history_many[i][0][m] = 0.0; history_many[i][0][m] = 0.0;
continue; continue;
@ -253,7 +253,7 @@ void FixWallGranRegion::post_force(int /*vflag*/)
if (fix_rigid && mass_rigid[i] > 0.0) meff = mass_rigid[i]; if (fix_rigid && mass_rigid[i] > 0.0) meff = mass_rigid[i];
// store contact info // store contact info
if (peratom_flag){ if (peratom_flag) {
array_atom[i][0] = (double)atom->tag[i]; array_atom[i][0] = (double)atom->tag[i];
array_atom[i][4] = x[i][0] - dx; array_atom[i][4] = x[i][0] - dx;
array_atom[i][5] = x[i][1] - dy; array_atom[i][5] = x[i][1] - dy;
@ -382,7 +382,7 @@ void FixWallGranRegion::copy_arrays(int i, int j, int /*delflag*/)
{ {
int m,n,iwall; int m,n,iwall;
if (use_history){ if (use_history) {
n = ncontact[i]; n = ncontact[i];
for (iwall = 0; iwall < n; iwall++) { for (iwall = 0; iwall < n; iwall++) {
walls[j][iwall] = walls[i][iwall]; walls[j][iwall] = walls[i][iwall];
@ -392,7 +392,7 @@ void FixWallGranRegion::copy_arrays(int i, int j, int /*delflag*/)
ncontact[j] = ncontact[i]; ncontact[j] = ncontact[i];
} }
if (peratom_flag){ if (peratom_flag) {
for (int m = 0; m < size_peratom_cols; m++) for (int m = 0; m < size_peratom_cols; m++)
array_atom[j][m] = array_atom[i][m]; array_atom[j][m] = array_atom[i][m];
} }
@ -406,7 +406,7 @@ void FixWallGranRegion::set_arrays(int i)
{ {
if (use_history) if (use_history)
ncontact[i] = 0; ncontact[i] = 0;
if (peratom_flag){ if (peratom_flag) {
for (int m = 0; m < size_peratom_cols; m++) for (int m = 0; m < size_peratom_cols; m++)
array_atom[i][m] = 0; array_atom[i][m] = 0;
} }
@ -421,7 +421,7 @@ int FixWallGranRegion::pack_exchange(int i, double *buf)
int m; int m;
int n = 0; int n = 0;
if (use_history){ if (use_history) {
int count = ncontact[i]; int count = ncontact[i];
buf[n++] = ubuf(count).d; buf[n++] = ubuf(count).d;
for (int iwall = 0; iwall < count; iwall++) { for (int iwall = 0; iwall < count; iwall++) {
@ -430,7 +430,7 @@ int FixWallGranRegion::pack_exchange(int i, double *buf)
buf[n++] = history_many[i][iwall][m]; buf[n++] = history_many[i][iwall][m];
} }
} }
if (peratom_flag){ if (peratom_flag) {
for (int m = 0; m < size_peratom_cols; m++) for (int m = 0; m < size_peratom_cols; m++)
buf[n++] = array_atom[i][m]; buf[n++] = array_atom[i][m];
} }
@ -448,7 +448,7 @@ int FixWallGranRegion::unpack_exchange(int nlocal, double *buf)
int n = 0; int n = 0;
if (use_history){ if (use_history) {
int count = ncontact[nlocal] = (int) ubuf(buf[n++]).i; int count = ncontact[nlocal] = (int) ubuf(buf[n++]).i;
for (int iwall = 0; iwall < count; iwall++) { for (int iwall = 0; iwall < count; iwall++) {
walls[nlocal][iwall] = (int) ubuf(buf[n++]).i; walls[nlocal][iwall] = (int) ubuf(buf[n++]).i;
@ -456,7 +456,7 @@ int FixWallGranRegion::unpack_exchange(int nlocal, double *buf)
history_many[nlocal][iwall][m] = buf[n++]; history_many[nlocal][iwall][m] = buf[n++];
} }
} }
if (peratom_flag){ if (peratom_flag) {
for (int m = 0; m < size_peratom_cols; m++) for (int m = 0; m < size_peratom_cols; m++)
array_atom[nlocal][m] = buf[n++]; array_atom[nlocal][m] = buf[n++];
} }

View File

@ -418,7 +418,7 @@ void PairGranular::compute(int eflag, int vflag)
} }
// rotate and update displacements. // rotate and update displacements.
// see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235 // see e.g. eq. 17 of Luding, Gran. Matter 2008, v10,p235
if (historyupdate){ if (historyupdate) {
rsht = history[0]*nx + history[1]*ny + history[2]*nz; rsht = history[0]*nx + history[1]*ny + history[2]*nz;
if (fabs(rsht) < EPSILON) rsht = 0; if (fabs(rsht) < EPSILON) rsht = 0;
if (rsht > 0) { if (rsht > 0) {