git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8226 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -2,12 +2,12 @@
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
@ -37,27 +37,27 @@ AtomVecElectron::AtomVecElectron(LAMMPS *lmp, int narg, char **arg) :
|
||||
AtomVec(lmp, narg, arg)
|
||||
{
|
||||
comm_x_only = comm_f_only = 0;
|
||||
|
||||
|
||||
mass_type = 1;
|
||||
molecular = 0;
|
||||
|
||||
|
||||
size_forward = 4;
|
||||
size_reverse = 4;
|
||||
size_border = 9;
|
||||
size_reverse = 4;
|
||||
size_border = 9;
|
||||
size_velocity = 3;
|
||||
size_data_atom = 8;
|
||||
size_data_vel = 5;
|
||||
xcol_data = 6;
|
||||
|
||||
|
||||
atom->electron_flag = 1;
|
||||
atom->q_flag = atom->spin_flag = atom->eradius_flag =
|
||||
atom->q_flag = atom->spin_flag = atom->eradius_flag =
|
||||
atom->ervel_flag = atom->erforce_flag = 1;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
grow atom-electron arrays
|
||||
n = 0 grows arrays by DELTA
|
||||
n > 0 allocates arrays to size n
|
||||
n > 0 allocates arrays to size n
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AtomVecElectron::grow(int n)
|
||||
@ -65,7 +65,7 @@ void AtomVecElectron::grow(int n)
|
||||
if (n == 0) nmax += DELTA;
|
||||
else nmax = n;
|
||||
atom->nmax = nmax;
|
||||
|
||||
|
||||
tag = memory->grow(atom->tag,nmax,"atom:tag");
|
||||
type = memory->grow(atom->type,nmax,"atom:type");
|
||||
mask = memory->grow(atom->mask,nmax,"atom:mask");
|
||||
@ -81,7 +81,7 @@ void AtomVecElectron::grow(int n)
|
||||
erforce = memory->grow(atom->erforce,nmax*comm->nthreads,"atom:erforce");
|
||||
|
||||
if (atom->nextra_grow)
|
||||
for (int iextra = 0; iextra < atom->nextra_grow; iextra++)
|
||||
for (int iextra = 0; iextra < atom->nextra_grow; iextra++)
|
||||
modify->fix[atom->extra_grow[iextra]]->grow_arrays(nmax);
|
||||
}
|
||||
|
||||
@ -114,21 +114,21 @@ void AtomVecElectron::copy(int i, int j, int delflag)
|
||||
v[j][0] = v[i][0];
|
||||
v[j][1] = v[i][1];
|
||||
v[j][2] = v[i][2];
|
||||
|
||||
|
||||
q[j] = q[i];
|
||||
spin[j] = spin[i];
|
||||
eradius[j] = eradius[i];
|
||||
ervel[j] = ervel[i];
|
||||
|
||||
|
||||
if (atom->nextra_grow)
|
||||
for (int iextra = 0; iextra < atom->nextra_grow; iextra++)
|
||||
for (int iextra = 0; iextra < atom->nextra_grow; iextra++)
|
||||
modify->fix[atom->extra_grow[iextra]]->copy_arrays(i,j);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecElectron::pack_comm(int n, int *list, double *buf,
|
||||
int pbc_flag, int *pbc)
|
||||
int pbc_flag, int *pbc)
|
||||
{
|
||||
int i,j,m;
|
||||
double dx,dy,dz;
|
||||
@ -166,7 +166,7 @@ int AtomVecElectron::pack_comm(int n, int *list, double *buf,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecElectron::pack_comm_vel(int n, int *list, double *buf,
|
||||
int pbc_flag, int *pbc)
|
||||
int pbc_flag, int *pbc)
|
||||
{
|
||||
int i,j,m;
|
||||
double dx,dy,dz,dvx,dvy,dvz;
|
||||
@ -195,34 +195,34 @@ int AtomVecElectron::pack_comm_vel(int n, int *list, double *buf,
|
||||
}
|
||||
if (!deform_vremap) {
|
||||
for (i = 0; i < n; i++) {
|
||||
j = list[i];
|
||||
buf[m++] = x[j][0] + dx;
|
||||
buf[m++] = x[j][1] + dy;
|
||||
buf[m++] = x[j][2] + dz;
|
||||
buf[m++] = eradius[j];
|
||||
buf[m++] = v[j][0];
|
||||
buf[m++] = v[j][1];
|
||||
buf[m++] = v[j][2];
|
||||
j = list[i];
|
||||
buf[m++] = x[j][0] + dx;
|
||||
buf[m++] = x[j][1] + dy;
|
||||
buf[m++] = x[j][2] + dz;
|
||||
buf[m++] = eradius[j];
|
||||
buf[m++] = v[j][0];
|
||||
buf[m++] = v[j][1];
|
||||
buf[m++] = v[j][2];
|
||||
}
|
||||
} else {
|
||||
dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4];
|
||||
dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3];
|
||||
dvz = pbc[2]*h_rate[2];
|
||||
for (i = 0; i < n; i++) {
|
||||
j = list[i];
|
||||
buf[m++] = x[j][0] + dx;
|
||||
buf[m++] = x[j][1] + dy;
|
||||
buf[m++] = x[j][2] + dz;
|
||||
buf[m++] = eradius[j];
|
||||
if (mask[i] & deform_groupbit) {
|
||||
buf[m++] = v[j][0] + dvx;
|
||||
buf[m++] = v[j][1] + dvy;
|
||||
buf[m++] = v[j][2] + dvz;
|
||||
} else {
|
||||
buf[m++] = v[j][0];
|
||||
buf[m++] = v[j][1];
|
||||
buf[m++] = v[j][2];
|
||||
}
|
||||
j = list[i];
|
||||
buf[m++] = x[j][0] + dx;
|
||||
buf[m++] = x[j][1] + dy;
|
||||
buf[m++] = x[j][2] + dz;
|
||||
buf[m++] = eradius[j];
|
||||
if (mask[i] & deform_groupbit) {
|
||||
buf[m++] = v[j][0] + dvx;
|
||||
buf[m++] = v[j][1] + dvy;
|
||||
buf[m++] = v[j][2] + dvz;
|
||||
} else {
|
||||
buf[m++] = v[j][0];
|
||||
buf[m++] = v[j][1];
|
||||
buf[m++] = v[j][2];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -248,7 +248,7 @@ int AtomVecElectron::pack_comm_hybrid(int n, int *list, double *buf)
|
||||
void AtomVecElectron::unpack_comm(int n, int first, double *buf)
|
||||
{
|
||||
int i,m,last;
|
||||
|
||||
|
||||
m = 0;
|
||||
last = first + n;
|
||||
for (i = first; i < last; i++) {
|
||||
@ -264,7 +264,7 @@ void AtomVecElectron::unpack_comm(int n, int first, double *buf)
|
||||
void AtomVecElectron::unpack_comm_vel(int n, int first, double *buf)
|
||||
{
|
||||
int i,m,last;
|
||||
|
||||
|
||||
m = 0;
|
||||
last = first + n;
|
||||
for (i = first; i < last; i++) {
|
||||
@ -296,7 +296,7 @@ int AtomVecElectron::unpack_comm_hybrid(int n, int first, double *buf)
|
||||
int AtomVecElectron::pack_reverse(int n, int first, double *buf)
|
||||
{
|
||||
int i,m,last;
|
||||
|
||||
|
||||
m = 0;
|
||||
last = first + n;
|
||||
for (i = first; i < last; i++) {
|
||||
@ -326,7 +326,7 @@ int AtomVecElectron::pack_reverse_hybrid(int n, int first, double *buf)
|
||||
void AtomVecElectron::unpack_reverse(int n, int *list, double *buf)
|
||||
{
|
||||
int i,j,m;
|
||||
|
||||
|
||||
m = 0;
|
||||
for (i = 0; i < n; i++) {
|
||||
j = list[i];
|
||||
@ -354,7 +354,7 @@ int AtomVecElectron::unpack_reverse_hybrid(int n, int *list, double *buf)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecElectron::pack_border(int n, int *list, double *buf,
|
||||
int pbc_flag, int *pbc)
|
||||
int pbc_flag, int *pbc)
|
||||
{
|
||||
int i,j,m;
|
||||
double dx,dy,dz;
|
||||
@ -402,7 +402,7 @@ int AtomVecElectron::pack_border(int n, int *list, double *buf,
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecElectron::pack_border_vel(int n, int *list, double *buf,
|
||||
int pbc_flag, int *pbc)
|
||||
int pbc_flag, int *pbc)
|
||||
{
|
||||
int i,j,m;
|
||||
double dx,dy,dz,dvx,dvy,dvz;
|
||||
@ -436,44 +436,44 @@ int AtomVecElectron::pack_border_vel(int n, int *list, double *buf,
|
||||
}
|
||||
if (domain->triclinic == 0) {
|
||||
for (i = 0; i < n; i++) {
|
||||
j = list[i];
|
||||
buf[m++] = x[j][0] + dx;
|
||||
buf[m++] = x[j][1] + dy;
|
||||
buf[m++] = x[j][2] + dz;
|
||||
buf[m++] = tag[j];
|
||||
buf[m++] = type[j];
|
||||
buf[m++] = mask[j];
|
||||
buf[m++] = q[j];
|
||||
buf[m++] = spin[j];
|
||||
buf[m++] = eradius[j];
|
||||
buf[m++] = v[j][0];
|
||||
buf[m++] = v[j][1];
|
||||
buf[m++] = v[j][2];
|
||||
j = list[i];
|
||||
buf[m++] = x[j][0] + dx;
|
||||
buf[m++] = x[j][1] + dy;
|
||||
buf[m++] = x[j][2] + dz;
|
||||
buf[m++] = tag[j];
|
||||
buf[m++] = type[j];
|
||||
buf[m++] = mask[j];
|
||||
buf[m++] = q[j];
|
||||
buf[m++] = spin[j];
|
||||
buf[m++] = eradius[j];
|
||||
buf[m++] = v[j][0];
|
||||
buf[m++] = v[j][1];
|
||||
buf[m++] = v[j][2];
|
||||
}
|
||||
} else {
|
||||
dvx = pbc[0]*h_rate[0] + pbc[5]*h_rate[5] + pbc[4]*h_rate[4];
|
||||
dvy = pbc[1]*h_rate[1] + pbc[3]*h_rate[3];
|
||||
dvz = pbc[2]*h_rate[2];
|
||||
for (i = 0; i < n; i++) {
|
||||
j = list[i];
|
||||
buf[m++] = x[j][0] + dx;
|
||||
buf[m++] = x[j][1] + dy;
|
||||
buf[m++] = x[j][2] + dz;
|
||||
buf[m++] = tag[j];
|
||||
buf[m++] = type[j];
|
||||
buf[m++] = mask[j];
|
||||
buf[m++] = q[j];
|
||||
buf[m++] = spin[j];
|
||||
buf[m++] = eradius[j];
|
||||
if (mask[i] & deform_groupbit) {
|
||||
buf[m++] = v[j][0] + dvx;
|
||||
buf[m++] = v[j][1] + dvy;
|
||||
buf[m++] = v[j][2] + dvz;
|
||||
} else {
|
||||
buf[m++] = v[j][0];
|
||||
buf[m++] = v[j][1];
|
||||
buf[m++] = v[j][2];
|
||||
}
|
||||
j = list[i];
|
||||
buf[m++] = x[j][0] + dx;
|
||||
buf[m++] = x[j][1] + dy;
|
||||
buf[m++] = x[j][2] + dz;
|
||||
buf[m++] = tag[j];
|
||||
buf[m++] = type[j];
|
||||
buf[m++] = mask[j];
|
||||
buf[m++] = q[j];
|
||||
buf[m++] = spin[j];
|
||||
buf[m++] = eradius[j];
|
||||
if (mask[i] & deform_groupbit) {
|
||||
buf[m++] = v[j][0] + dvx;
|
||||
buf[m++] = v[j][1] + dvy;
|
||||
buf[m++] = v[j][2] + dvz;
|
||||
} else {
|
||||
buf[m++] = v[j][0];
|
||||
buf[m++] = v[j][1];
|
||||
buf[m++] = v[j][2];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -501,7 +501,7 @@ int AtomVecElectron::pack_border_hybrid(int n, int *list, double *buf)
|
||||
void AtomVecElectron::unpack_border(int n, int first, double *buf)
|
||||
{
|
||||
int i,m,last;
|
||||
|
||||
|
||||
m = 0;
|
||||
last = first + n;
|
||||
for (i = first; i < last; i++) {
|
||||
@ -511,7 +511,7 @@ void AtomVecElectron::unpack_border(int n, int first, double *buf)
|
||||
x[i][2] = buf[m++];
|
||||
tag[i] = static_cast<int> (buf[m++]);
|
||||
type[i] = static_cast<int> (buf[m++]);
|
||||
mask[i] = static_cast<int> (buf[m++]);
|
||||
mask[i] = static_cast<int> (buf[m++]);
|
||||
q[i] = buf[m++];
|
||||
spin[i] = static_cast<int> (buf[m++]);
|
||||
eradius[i] = buf[m++];
|
||||
@ -523,7 +523,7 @@ void AtomVecElectron::unpack_border(int n, int first, double *buf)
|
||||
void AtomVecElectron::unpack_border_vel(int n, int first, double *buf)
|
||||
{
|
||||
int i,m,last;
|
||||
|
||||
|
||||
m = 0;
|
||||
last = first + n;
|
||||
for (i = first; i < last; i++) {
|
||||
@ -561,7 +561,7 @@ int AtomVecElectron::unpack_border_hybrid(int n, int first, double *buf)
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
pack data for atom I for sending to another proc
|
||||
xyz must be 1st 3 values, so comm::exchange() can test on them
|
||||
xyz must be 1st 3 values, so comm::exchange() can test on them
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecElectron::pack_exchange(int i, double *buf)
|
||||
@ -576,16 +576,16 @@ int AtomVecElectron::pack_exchange(int i, double *buf)
|
||||
buf[m++] = tag[i];
|
||||
buf[m++] = type[i];
|
||||
buf[m++] = mask[i];
|
||||
buf[m++] = image[i];
|
||||
buf[m++] = image[i];
|
||||
buf[m++] = q[i];
|
||||
buf[m++] = spin[i];
|
||||
buf[m++] = eradius[i];
|
||||
buf[m++] = ervel[i];
|
||||
|
||||
|
||||
if (atom->nextra_grow)
|
||||
for (int iextra = 0; iextra < atom->nextra_grow; iextra++)
|
||||
for (int iextra = 0; iextra < atom->nextra_grow; iextra++)
|
||||
m += modify->fix[atom->extra_grow[iextra]]->pack_exchange(i,&buf[m]);
|
||||
|
||||
|
||||
buf[0] = m;
|
||||
return m;
|
||||
}
|
||||
@ -596,7 +596,7 @@ int AtomVecElectron::unpack_exchange(double *buf)
|
||||
{
|
||||
int nlocal = atom->nlocal;
|
||||
if (nlocal == nmax) grow(0);
|
||||
|
||||
|
||||
int m = 1;
|
||||
x[nlocal][0] = buf[m++];
|
||||
x[nlocal][1] = buf[m++];
|
||||
@ -607,17 +607,17 @@ int AtomVecElectron::unpack_exchange(double *buf)
|
||||
tag[nlocal] = static_cast<int> (buf[m++]);
|
||||
type[nlocal] = static_cast<int> (buf[m++]);
|
||||
mask[nlocal] = static_cast<int> (buf[m++]);
|
||||
image[nlocal] = static_cast<int> (buf[m++]);
|
||||
image[nlocal] = static_cast<int> (buf[m++]);
|
||||
q[nlocal] = buf[m++];
|
||||
spin[nlocal] = static_cast<int> (buf[m++]);
|
||||
eradius[nlocal] = buf[m++];
|
||||
ervel[nlocal] = buf[m++];
|
||||
|
||||
|
||||
if (atom->nextra_grow)
|
||||
for (int iextra = 0; iextra < atom->nextra_grow; iextra++)
|
||||
for (int iextra = 0; iextra < atom->nextra_grow; iextra++)
|
||||
m += modify->fix[atom->extra_grow[iextra]]->
|
||||
unpack_exchange(nlocal,&buf[m]);
|
||||
|
||||
unpack_exchange(nlocal,&buf[m]);
|
||||
|
||||
atom->nlocal++;
|
||||
return m;
|
||||
}
|
||||
@ -630,22 +630,22 @@ int AtomVecElectron::unpack_exchange(double *buf)
|
||||
int AtomVecElectron::size_restart()
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
int nlocal = atom->nlocal;
|
||||
int n = 15 * nlocal; // Associated with pack_restart
|
||||
|
||||
int n = 15 * nlocal; // Associated with pack_restart
|
||||
|
||||
if (atom->nextra_restart)
|
||||
for (int iextra = 0; iextra < atom->nextra_restart; iextra++)
|
||||
for (int iextra = 0; iextra < atom->nextra_restart; iextra++)
|
||||
for (i = 0; i < nlocal; i++)
|
||||
n += modify->fix[atom->extra_restart[iextra]]->size_restart(i);
|
||||
|
||||
n += modify->fix[atom->extra_restart[iextra]]->size_restart(i);
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
pack atom I's data for restart file including extra quantities
|
||||
xyz must be 1st 3 values, so that read_restart can test on them
|
||||
molecular types may be negative, but write as positive
|
||||
molecular types may be negative, but write as positive
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecElectron::pack_restart(int i, double *buf)
|
||||
@ -661,16 +661,16 @@ int AtomVecElectron::pack_restart(int i, double *buf)
|
||||
buf[m++] = v[i][0];
|
||||
buf[m++] = v[i][1];
|
||||
buf[m++] = v[i][2];
|
||||
|
||||
|
||||
buf[m++] = q[i];
|
||||
buf[m++] = spin[i];
|
||||
buf[m++] = eradius[i];
|
||||
buf[m++] = ervel[i];
|
||||
|
||||
|
||||
if (atom->nextra_restart)
|
||||
for (int iextra = 0; iextra < atom->nextra_restart; iextra++)
|
||||
for (int iextra = 0; iextra < atom->nextra_restart; iextra++)
|
||||
m += modify->fix[atom->extra_restart[iextra]]->pack_restart(i,&buf[m]);
|
||||
|
||||
|
||||
buf[0] = m;
|
||||
return m;
|
||||
}
|
||||
@ -687,7 +687,7 @@ int AtomVecElectron::unpack_restart(double *buf)
|
||||
if (atom->nextra_store)
|
||||
memory->grow(atom->extra,nmax,atom->nextra_store,"atom:extra");
|
||||
}
|
||||
|
||||
|
||||
int m = 1;
|
||||
x[nlocal][0] = buf[m++];
|
||||
x[nlocal][1] = buf[m++];
|
||||
@ -699,18 +699,18 @@ int AtomVecElectron::unpack_restart(double *buf)
|
||||
v[nlocal][0] = buf[m++];
|
||||
v[nlocal][1] = buf[m++];
|
||||
v[nlocal][2] = buf[m++];
|
||||
|
||||
|
||||
q[nlocal] = buf[m++];
|
||||
spin[nlocal] = static_cast<int> (buf[m++]);
|
||||
eradius[nlocal] = buf[m++];
|
||||
ervel[nlocal] = buf[m++];
|
||||
|
||||
|
||||
double **extra = atom->extra;
|
||||
if (atom->nextra_store) {
|
||||
int size = static_cast<int> (buf[0]) - m;
|
||||
for (int i = 0; i < size; i++) extra[nlocal][i] = buf[m++];
|
||||
}
|
||||
|
||||
|
||||
atom->nlocal++;
|
||||
return m;
|
||||
}
|
||||
@ -724,7 +724,7 @@ void AtomVecElectron::create_atom(int itype, double *coord)
|
||||
{
|
||||
int nlocal = atom->nlocal;
|
||||
if (nlocal == nmax) grow(0);
|
||||
|
||||
|
||||
tag[nlocal] = 0;
|
||||
type[nlocal] = itype;
|
||||
x[nlocal][0] = coord[0];
|
||||
@ -735,12 +735,12 @@ void AtomVecElectron::create_atom(int itype, double *coord)
|
||||
v[nlocal][0] = 0.0;
|
||||
v[nlocal][1] = 0.0;
|
||||
v[nlocal][2] = 0.0;
|
||||
|
||||
|
||||
q[nlocal] = 0.0;
|
||||
spin[nlocal] = 1;
|
||||
eradius[nlocal] = 1.0;
|
||||
ervel[nlocal] = 0.0;
|
||||
|
||||
eradius[nlocal] = 1.0;
|
||||
ervel[nlocal] = 0.0;
|
||||
|
||||
atom->nlocal++;
|
||||
}
|
||||
|
||||
@ -752,33 +752,33 @@ void AtomVecElectron::create_atom(int itype, double *coord)
|
||||
void AtomVecElectron::data_atom(double *coord, int imagetmp, char **values)
|
||||
{
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
|
||||
if (nlocal == nmax) grow(0);
|
||||
|
||||
|
||||
tag[nlocal] = atoi(values[0]);
|
||||
if (tag[nlocal] <= 0)
|
||||
error->one(FLERR,"Invalid atom ID in Atoms section of data file");
|
||||
|
||||
|
||||
type[nlocal] = atoi(values[1]);
|
||||
if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes)
|
||||
error->one(FLERR,"Invalid atom type in Atoms section of data file");
|
||||
|
||||
|
||||
q[nlocal] = atof(values[2]);
|
||||
spin[nlocal] = atoi(values[3]);
|
||||
eradius[nlocal] = atof(values[4]);
|
||||
|
||||
|
||||
x[nlocal][0] = coord[0];
|
||||
x[nlocal][1] = coord[1];
|
||||
x[nlocal][2] = coord[2];
|
||||
|
||||
|
||||
image[nlocal] = imagetmp;
|
||||
|
||||
|
||||
mask[nlocal] = 1;
|
||||
v[nlocal][0] = 0.0;
|
||||
v[nlocal][1] = 0.0;
|
||||
v[nlocal][2] = 0.0;
|
||||
ervel[nlocal] = 0.0;
|
||||
|
||||
|
||||
atom->nlocal++;
|
||||
}
|
||||
|
||||
@ -794,12 +794,12 @@ int AtomVecElectron::data_atom_hybrid(int nlocal, char **values)
|
||||
eradius[nlocal] = atof(values[2]);
|
||||
if (eradius[nlocal] < 0.0)
|
||||
error->one(FLERR,"Invalid eradius in Atoms section of data file");
|
||||
|
||||
|
||||
v[nlocal][0] = 0.0;
|
||||
v[nlocal][1] = 0.0;
|
||||
v[nlocal][2] = 0.0;
|
||||
ervel[nlocal] = 0.0;
|
||||
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
@ -826,13 +826,13 @@ int AtomVecElectron::data_vel_hybrid(int m, char **values)
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
return # of bytes of allocated memory
|
||||
return # of bytes of allocated memory
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
bigint AtomVecElectron::memory_usage()
|
||||
{
|
||||
bigint bytes = 0;
|
||||
|
||||
|
||||
if (atom->memcheck("tag")) bytes += memory->usage(tag,nmax);
|
||||
if (atom->memcheck("type")) bytes += memory->usage(type,nmax);
|
||||
if (atom->memcheck("mask")) bytes += memory->usage(mask,nmax);
|
||||
@ -840,12 +840,12 @@ bigint AtomVecElectron::memory_usage()
|
||||
if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3);
|
||||
if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3);
|
||||
if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3);
|
||||
|
||||
|
||||
if (atom->memcheck("q")) bytes += memory->usage(q,nmax);
|
||||
if (atom->memcheck("spin")) bytes += memory->usage(spin,nmax);
|
||||
if (atom->memcheck("eradius")) bytes += memory->usage(eradius,nmax);
|
||||
if (atom->memcheck("ervel")) bytes += memory->usage(ervel,nmax);
|
||||
if (atom->memcheck("erforce")) bytes += memory->usage(erforce,nmax*comm->nthreads);
|
||||
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user