Clarifying variable names
This commit is contained in:
@ -79,9 +79,9 @@ NStencil::NStencil(LAMMPS *lmp) : Pointers(lmp)
|
||||
stencil_multi = nullptr;
|
||||
maxstencil_multi = nullptr;
|
||||
|
||||
stencil_half = nullptr;
|
||||
stencil_skip = nullptr;
|
||||
stencil_bin_type = nullptr;
|
||||
flag_half_multi = nullptr;
|
||||
flag_skip_multi = nullptr;
|
||||
bin_type_multi = nullptr;
|
||||
|
||||
dimension = domain->dimension;
|
||||
}
|
||||
@ -111,16 +111,16 @@ NStencil::~NStencil()
|
||||
memory->destroy(nstencil_multi);
|
||||
for (int i = 1; i <= n; i++) {
|
||||
for (int j = 0; j <= n; j++) {
|
||||
if (! stencil_skip[i][j])
|
||||
if (! flag_skip_multi[i][j])
|
||||
memory->destroy(stencil_multi[i][j]);
|
||||
}
|
||||
delete [] stencil_multi[i];
|
||||
}
|
||||
delete [] stencil_multi;
|
||||
memory->destroy(maxstencil_multi);
|
||||
memory->destroy(stencil_half);
|
||||
memory->destroy(stencil_skip);
|
||||
memory->destroy(stencil_bin_type);
|
||||
memory->destroy(flag_half_multi);
|
||||
memory->destroy(flag_skip_multi);
|
||||
memory->destroy(bin_type_multi);
|
||||
|
||||
memory->destroy(stencil_sx_multi);
|
||||
memory->destroy(stencil_sy_multi);
|
||||
@ -272,12 +272,12 @@ void NStencil::create_setup()
|
||||
if(nb) copy_bin_info_multi();
|
||||
|
||||
// Allocate arrays to store stencil information
|
||||
memory->create(stencil_half, n+1, n+1,
|
||||
"neighstencil:stencil_half");
|
||||
memory->create(stencil_skip, n+1, n+1,
|
||||
"neighstencil:stencil_skip");
|
||||
memory->create(stencil_bin_type, n+1, n+1,
|
||||
"neighstencil:stencil_bin_type");
|
||||
memory->create(flag_half_multi, n+1, n+1,
|
||||
"neighstencil:flag_half_multi");
|
||||
memory->create(flag_skip_multi, n+1, n+1,
|
||||
"neighstencil:flag_skip_multi");
|
||||
memory->create(bin_type_multi, n+1, n+1,
|
||||
"neighstencil:bin_type_multi");
|
||||
|
||||
memory->create(stencil_sx_multi, n+1, n+1,
|
||||
"neighstencil:stencil_sx_multi");
|
||||
@ -303,7 +303,7 @@ void NStencil::create_setup()
|
||||
// Skip all stencils by default, initialize smax
|
||||
for (i = 1; i <= n; i++) {
|
||||
for (j = 1; j <= n; j++) {
|
||||
stencil_skip[i][j] = 1;
|
||||
flag_skip_multi[i][j] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -329,10 +329,10 @@ void NStencil::create_setup()
|
||||
for (j = 1; j <= n; j++) {
|
||||
|
||||
// Skip creation of unused stencils
|
||||
if (stencil_skip[i][j]) continue;
|
||||
if (flag_skip_multi[i][j]) continue;
|
||||
|
||||
// Copy bin info for this particular pair of types
|
||||
bin_type = stencil_bin_type[i][j];
|
||||
// Copy bin info for this pair of atom types
|
||||
bin_type = bin_type_multi[i][j];
|
||||
|
||||
stencil_binsizex_multi[i][j] = binsizex_multi[bin_type];
|
||||
stencil_binsizey_multi[i][j] = binsizey_multi[bin_type];
|
||||
|
||||
@ -42,9 +42,9 @@ class NStencil : protected Pointers {
|
||||
double cutoff_custom; // cutoff set by requestor
|
||||
|
||||
// Arrays to store options for multi itype-jtype stencils
|
||||
bool **stencil_half; // flag creation of a half stencil for itype-jtype
|
||||
bool **stencil_skip; // skip creation of itype-jtype stencils (for newton on)
|
||||
int **stencil_bin_type; // what type to use for bin information
|
||||
bool **flag_half_multi; // flag creation of a half stencil for itype-jtype
|
||||
bool **flag_skip_multi; // skip creation of itype-jtype stencils (for newton on)
|
||||
int **bin_type_multi; // what type to use for bin information
|
||||
|
||||
NStencil(class LAMMPS *);
|
||||
virtual ~NStencil();
|
||||
|
||||
@ -36,9 +36,9 @@ void NStencilFullMulti2d::set_stencil_properties()
|
||||
|
||||
for (i = 1; i <= n; i++) {
|
||||
for (j = 1; j <= n; j++) {
|
||||
stencil_half[i][j] = 0;
|
||||
stencil_skip[i][j] = 0;
|
||||
stencil_bin_type[i][j] = j;
|
||||
flag_half_multi[i][j] = 0;
|
||||
flag_skip_multi[i][j] = 0;
|
||||
bin_type_multi[i][j] = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -56,7 +56,7 @@ void NStencilFullMulti2d::create()
|
||||
|
||||
for (itype = 1; itype <= n; itype++) {
|
||||
for (jtype = 1; jtype <= n; jtype++) {
|
||||
if (stencil_skip[itype][jtype]) continue;
|
||||
if (flag_skip_multi[itype][jtype]) continue;
|
||||
|
||||
ns = 0;
|
||||
|
||||
@ -66,7 +66,7 @@ void NStencilFullMulti2d::create()
|
||||
mbinx = stencil_mbinx_multi[itype][jtype];
|
||||
mbiny = stencil_mbiny_multi[itype][jtype];
|
||||
|
||||
bin_type = stencil_bin_type[itype][jtype];
|
||||
bin_type = bin_type_multi[itype][jtype];
|
||||
|
||||
cutsq = cutneighsq[itype][jtype];
|
||||
|
||||
|
||||
@ -37,9 +37,9 @@ void NStencilFullMulti3d::set_stencil_properties()
|
||||
|
||||
for (i = 1; i <= n; i++) {
|
||||
for (j = 1; j <= n; j++) {
|
||||
stencil_half[i][j] = 0;
|
||||
stencil_skip[i][j] = 0;
|
||||
stencil_bin_type[i][j] = j;
|
||||
flag_half_multi[i][j] = 0;
|
||||
flag_skip_multi[i][j] = 0;
|
||||
bin_type_multi[i][j] = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -57,7 +57,7 @@ void NStencilFullMulti3d::create()
|
||||
|
||||
for (itype = 1; itype <= n; itype++) {
|
||||
for (jtype = 1; jtype <= n; jtype++) {
|
||||
if (stencil_skip[itype][jtype]) continue;
|
||||
if (flag_skip_multi[itype][jtype]) continue;
|
||||
|
||||
ns = 0;
|
||||
|
||||
@ -69,7 +69,7 @@ void NStencilFullMulti3d::create()
|
||||
mbiny = stencil_mbiny_multi[itype][jtype];
|
||||
mbinz = stencil_mbinz_multi[itype][jtype];
|
||||
|
||||
bin_type = stencil_bin_type[itype][jtype];
|
||||
bin_type = bin_type_multi[itype][jtype];
|
||||
|
||||
cutsq = cutneighsq[itype][jtype];
|
||||
|
||||
|
||||
@ -42,14 +42,14 @@ void NStencilHalfMulti2d::set_stencil_properties()
|
||||
for (j = 1; j <= n; j++) {
|
||||
if(cutneighsq[i][i] > cutneighsq[j][j]) continue;
|
||||
|
||||
stencil_skip[i][j] = 0;
|
||||
flag_skip_multi[i][j] = 0;
|
||||
|
||||
if(cutneighsq[i][i] == cutneighsq[j][j]){
|
||||
stencil_half[i][j] = 1;
|
||||
stencil_bin_type[i][j] = i;
|
||||
flag_half_multi[i][j] = 1;
|
||||
bin_type_multi[i][j] = i;
|
||||
} else {
|
||||
stencil_half[i][j] = 0;
|
||||
stencil_bin_type[i][j] = j;
|
||||
flag_half_multi[i][j] = 0;
|
||||
bin_type_multi[i][j] = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -68,7 +68,7 @@ void NStencilHalfMulti2d::create()
|
||||
|
||||
for (itype = 1; itype <= n; itype++) {
|
||||
for (jtype = 1; jtype <= n; jtype++) {
|
||||
if (stencil_skip[itype][jtype]) continue;
|
||||
if (flag_skip_multi[itype][jtype]) continue;
|
||||
|
||||
ns = 0;
|
||||
|
||||
@ -78,11 +78,11 @@ void NStencilHalfMulti2d::create()
|
||||
mbinx = stencil_mbinx_multi[itype][jtype];
|
||||
mbiny = stencil_mbiny_multi[itype][jtype];
|
||||
|
||||
bin_type = stencil_bin_type[itype][jtype];
|
||||
bin_type = bin_type_multi[itype][jtype];
|
||||
|
||||
cutsq = cutneighsq[itype][jtype];
|
||||
|
||||
if (stencil_half[itype][jtype]) {
|
||||
if (flag_half_multi[itype][jtype]) {
|
||||
for (j = 0; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (j > 0 || (j == 0 && i > 0)) {
|
||||
|
||||
@ -42,14 +42,14 @@ void NStencilHalfMulti2dTri::set_stencil_properties()
|
||||
for (j = 1; j <= n; j++) {
|
||||
if(cutneighsq[i][i] > cutneighsq[j][j]) continue;
|
||||
|
||||
stencil_skip[i][j] = 0;
|
||||
flag_skip_multi[i][j] = 0;
|
||||
|
||||
if(cutneighsq[i][i] == cutneighsq[j][j]){
|
||||
stencil_half[i][j] = 1;
|
||||
stencil_bin_type[i][j] = i;
|
||||
flag_half_multi[i][j] = 1;
|
||||
bin_type_multi[i][j] = i;
|
||||
} else {
|
||||
stencil_half[i][j] = 0;
|
||||
stencil_bin_type[i][j] = j;
|
||||
flag_half_multi[i][j] = 0;
|
||||
bin_type_multi[i][j] = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -68,7 +68,7 @@ void NStencilHalfMulti2dTri::create()
|
||||
|
||||
for (itype = 1; itype <= n; itype++) {
|
||||
for (jtype = 1; jtype <= n; jtype++) {
|
||||
if (stencil_skip[itype][jtype]) continue;
|
||||
if (flag_skip_multi[itype][jtype]) continue;
|
||||
|
||||
ns = 0;
|
||||
|
||||
@ -78,11 +78,11 @@ void NStencilHalfMulti2dTri::create()
|
||||
mbinx = stencil_mbinx_multi[itype][jtype];
|
||||
mbiny = stencil_mbiny_multi[itype][jtype];
|
||||
|
||||
bin_type = stencil_bin_type[itype][jtype];
|
||||
bin_type = bin_type_multi[itype][jtype];
|
||||
|
||||
cutsq = cutneighsq[itype][jtype];
|
||||
|
||||
if (stencil_half[itype][jtype]) {
|
||||
if (flag_half_multi[itype][jtype]) {
|
||||
for (j = 0; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
if (bin_distance_multi(i,j,0,bin_type) < cutsq)
|
||||
|
||||
@ -42,14 +42,14 @@ void NStencilHalfMulti3d::set_stencil_properties()
|
||||
for (j = 1; j <= n; j++) {
|
||||
if(cutneighsq[i][i] > cutneighsq[j][j]) continue;
|
||||
|
||||
stencil_skip[i][j] = 0;
|
||||
flag_skip_multi[i][j] = 0;
|
||||
|
||||
if(cutneighsq[i][i] == cutneighsq[j][j]){
|
||||
stencil_half[i][j] = 1;
|
||||
stencil_bin_type[i][j] = i;
|
||||
flag_half_multi[i][j] = 1;
|
||||
bin_type_multi[i][j] = i;
|
||||
} else {
|
||||
stencil_half[i][j] = 0;
|
||||
stencil_bin_type[i][j] = j;
|
||||
flag_half_multi[i][j] = 0;
|
||||
bin_type_multi[i][j] = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -68,7 +68,7 @@ void NStencilHalfMulti3d::create()
|
||||
|
||||
for (itype = 1; itype <= n; itype++) {
|
||||
for (jtype = 1; jtype <= n; jtype++) {
|
||||
if (stencil_skip[itype][jtype]) continue;
|
||||
if (flag_skip_multi[itype][jtype]) continue;
|
||||
|
||||
ns = 0;
|
||||
|
||||
@ -80,11 +80,11 @@ void NStencilHalfMulti3d::create()
|
||||
mbiny = stencil_mbiny_multi[itype][jtype];
|
||||
mbinz = stencil_mbinz_multi[itype][jtype];
|
||||
|
||||
bin_type = stencil_bin_type[itype][jtype];
|
||||
bin_type = bin_type_multi[itype][jtype];
|
||||
|
||||
cutsq = cutneighsq[itype][jtype];
|
||||
|
||||
if (stencil_half[itype][jtype]) {
|
||||
if (flag_half_multi[itype][jtype]) {
|
||||
for (k = 0; k <= sz; k++)
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
|
||||
@ -42,14 +42,14 @@ void NStencilHalfMulti3dTri::set_stencil_properties()
|
||||
for (j = 1; j <= n; j++) {
|
||||
if(cutneighsq[i][i] > cutneighsq[j][j]) continue;
|
||||
|
||||
stencil_skip[i][j] = 0;
|
||||
flag_skip_multi[i][j] = 0;
|
||||
|
||||
if(cutneighsq[i][i] == cutneighsq[j][j]){
|
||||
stencil_half[i][j] = 1;
|
||||
stencil_bin_type[i][j] = i;
|
||||
flag_half_multi[i][j] = 1;
|
||||
bin_type_multi[i][j] = i;
|
||||
} else {
|
||||
stencil_half[i][j] = 0;
|
||||
stencil_bin_type[i][j] = j;
|
||||
flag_half_multi[i][j] = 0;
|
||||
bin_type_multi[i][j] = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -68,7 +68,7 @@ void NStencilHalfMulti3dTri::create()
|
||||
|
||||
for (itype = 1; itype <= n; itype++) {
|
||||
for (jtype = 1; jtype <= n; jtype++) {
|
||||
if (stencil_skip[itype][jtype]) continue;
|
||||
if (flag_skip_multi[itype][jtype]) continue;
|
||||
|
||||
ns = 0;
|
||||
|
||||
@ -80,11 +80,11 @@ void NStencilHalfMulti3dTri::create()
|
||||
mbiny = stencil_mbiny_multi[itype][jtype];
|
||||
mbinz = stencil_mbinz_multi[itype][jtype];
|
||||
|
||||
bin_type = stencil_bin_type[itype][jtype];
|
||||
bin_type = bin_type_multi[itype][jtype];
|
||||
|
||||
cutsq = cutneighsq[itype][jtype];
|
||||
|
||||
if (stencil_half[itype][jtype]) {
|
||||
if (flag_half_multi[itype][jtype]) {
|
||||
for (k = 0; k <= sz; k++)
|
||||
for (j = -sy; j <= sy; j++)
|
||||
for (i = -sx; i <= sx; i++)
|
||||
|
||||
Reference in New Issue
Block a user