git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14220 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -16,10 +16,10 @@
|
||||
(hendrik.heenen at mytum.com)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "mpi.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include "math.h"
|
||||
#include <mpi.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include "compute_temp_cs.h"
|
||||
#include "atom.h"
|
||||
#include "atom_vec.h"
|
||||
@ -57,12 +57,12 @@ ComputeTempCS::ComputeTempCS(LAMMPS *lmp, int narg, char **arg) :
|
||||
// find and define groupbits for core and shell groups
|
||||
|
||||
cgroup = group->find(arg[3]);
|
||||
if (cgroup == -1)
|
||||
if (cgroup == -1)
|
||||
error->all(FLERR,"Cannot find specified group ID for core particles");
|
||||
groupbit_c = group->bitmask[cgroup];
|
||||
|
||||
sgroup = group->find(arg[4]);
|
||||
if (sgroup == -1)
|
||||
if (sgroup == -1)
|
||||
error->all(FLERR,"Cannot find specified group ID for shell particles");
|
||||
groupbit_s = group->bitmask[sgroup];
|
||||
|
||||
@ -228,9 +228,9 @@ double ComputeTempCS::compute_scalar()
|
||||
|
||||
vcm_pairs();
|
||||
|
||||
// calculate thermal scalar in respect to atom velocities as center-of-mass
|
||||
// calculate thermal scalar in respect to atom velocities as center-of-mass
|
||||
// velocities of its according core/shell pairs
|
||||
|
||||
|
||||
double **v = atom->v;
|
||||
int *mask = atom->mask;
|
||||
int *type = atom->type;
|
||||
@ -256,12 +256,12 @@ double ComputeTempCS::compute_scalar()
|
||||
|
||||
MPI_Allreduce(&t,&scalar,1,MPI_DOUBLE,MPI_SUM,world);
|
||||
if (dynamic) dof_compute();
|
||||
if (dof < 0.0 && natoms_temp > 0.0)
|
||||
if (dof < 0.0 && natoms_temp > 0.0)
|
||||
error->all(FLERR,"Temperature compute degrees of freedom < 0");
|
||||
scalar *= tfactor;
|
||||
return scalar;
|
||||
}
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void ComputeTempCS::compute_vector()
|
||||
@ -313,7 +313,7 @@ void ComputeTempCS::vcm_pairs()
|
||||
maxatom = atom->nmax;
|
||||
memory->create(vint,maxatom,3,"temp/cs:vint");
|
||||
}
|
||||
|
||||
|
||||
// vcm = COM velocity of each CS pair
|
||||
// vint = internal velocity of each C/S atom, used as bias
|
||||
|
||||
@ -327,7 +327,7 @@ void ComputeTempCS::vcm_pairs()
|
||||
tagint partnerID;
|
||||
|
||||
for (i = 0; i < nlocal; i++) {
|
||||
if ((mask[i] & groupbit) &&
|
||||
if ((mask[i] & groupbit) &&
|
||||
(mask[i] & groupbit_c || mask[i] & groupbit_s)) {
|
||||
if (rmass) massone = rmass[i];
|
||||
else massone = mass[type[i]];
|
||||
|
||||
Reference in New Issue
Block a user