Commit cea02082 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@642 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 988a4479
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -48,14 +48,6 @@ AtomVecEllipsoid::AtomVecEllipsoid(LAMMPS *lmp, int narg, char **arg) :
  atom->angmom_flag = atom->torque_flag = atom->quat_flag = 1;
}

/* ---------------------------------------------------------------------- */

void AtomVecEllipsoid::init()
{
  if (force->dimension == 2)
    error->all("Cannot use atom style ellipsoid for 2d simulation");
}

/* ----------------------------------------------------------------------
   grow atom arrays
   n = 0 grows arrays by DELTA
+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ class AtomVecEllipsoid : public AtomVec {
 public:
  AtomVecEllipsoid(class LAMMPS *, int, char **);
  virtual ~AtomVecEllipsoid() {}
  void init();
  void grow(int);
  void copy(int, int);
  virtual int pack_comm(int, int *, double *, int, int *);
+2 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include "math_extra.h"
#include "atom.h"
#include "force.h"
#include "domain.h"
#include "modify.h"
#include "fix.h"
#include "group.h"
@@ -73,7 +74,7 @@ void ComputeTempAsphere::init()
void ComputeTempAsphere::recount()
{
  double natoms = group->count(igroup);
  dof = force->dimension * natoms;
  dof = domain->dimension * natoms;
  dof -= extra_dof + fix_dof;

  // add rotational degrees of freedom
+2 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#include "compute_temp_dipole.h"
#include "atom.h"
#include "force.h"
#include "domain.h"
#include "group.h"
#include "modify.h"
#include "fix.h"
@@ -76,7 +77,7 @@ void ComputeTempDipole::init()
void ComputeTempDipole::recount()
{
  double natoms = group->count(igroup);
  dof = 2.0 * force->dimension * natoms;
  dof = 2.0 * domain->dimension * natoms;
  dof -= extra_dof + fix_dof;
  if (dof > 0) tfactor = force->mvv2e / (dof * force->boltz);
  else tfactor = 0.0;
+32 −32
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ AtomVecGranular::AtomVecGranular(LAMMPS *lmp, int narg, char **arg) :
  xcol_data = 5;

  atom->radius_flag = atom->density_flag = atom->rmass_flag = 1;
  atom->xphi_flag = atom->omega_flag = atom->torque_flag = 1;
  atom->xorient_flag = atom->omega_flag = atom->torque_flag = 1;

  PI = 4.0*atan(1.0);
}
@@ -76,8 +76,8 @@ void AtomVecGranular::grow(int n)
  rmass = atom->rmass = (double *)
    memory->srealloc(atom->rmass,nmax*sizeof(double),"atom:rmass");

  xphi = atom->xphi = 
    memory->grow_2d_double_array(atom->xphi,nmax,3,"atom:xphi");
  xorient = atom->xorient = 
    memory->grow_2d_double_array(atom->xorient,nmax,3,"atom:xorient");
  omega = atom->omega = 
    memory->grow_2d_double_array(atom->omega,nmax,3,"atom:omega");
  torque = atom->torque =
@@ -106,9 +106,9 @@ void AtomVecGranular::copy(int i, int j)
  radius[j] = radius[i];
  density[j] = density[i];
  rmass[j] = rmass[i];
  xphi[j][0] = xphi[i][0];
  xphi[j][1] = xphi[i][1];
  xphi[j][2] = xphi[i][2];
  xorient[j][0] = xorient[i][0];
  xorient[j][1] = xorient[i][1];
  xorient[j][2] = xorient[i][2];
  omega[j][0] = omega[i][0];
  omega[j][1] = omega[i][1];
  omega[j][2] = omega[i][2];
@@ -407,9 +407,9 @@ int AtomVecGranular::pack_exchange(int i, double *buf)
  buf[m++] = radius[i];
  buf[m++] = density[i];
  buf[m++] = rmass[i];
  buf[m++] = xphi[i][0];
  buf[m++] = xphi[i][1];
  buf[m++] = xphi[i][2];
  buf[m++] = xorient[i][0];
  buf[m++] = xorient[i][1];
  buf[m++] = xorient[i][2];
  buf[m++] = omega[i][0];
  buf[m++] = omega[i][1];
  buf[m++] = omega[i][2];
@@ -444,9 +444,9 @@ int AtomVecGranular::unpack_exchange(double *buf)
  radius[nlocal] = buf[m++];
  density[nlocal] = buf[m++];
  rmass[nlocal] = buf[m++];
  xphi[nlocal][0] = buf[m++];
  xphi[nlocal][1] = buf[m++];
  xphi[nlocal][2] = buf[m++];
  xorient[nlocal][0] = buf[m++];
  xorient[nlocal][1] = buf[m++];
  xorient[nlocal][2] = buf[m++];
  omega[nlocal][0] = buf[m++];
  omega[nlocal][1] = buf[m++];
  omega[nlocal][2] = buf[m++];
@@ -502,9 +502,9 @@ int AtomVecGranular::pack_restart(int i, double *buf)

  buf[m++] = radius[i];
  buf[m++] = density[i];
  buf[m++] = xphi[i][0];
  buf[m++] = xphi[i][1];
  buf[m++] = xphi[i][2];
  buf[m++] = xorient[i][0];
  buf[m++] = xorient[i][1];
  buf[m++] = xorient[i][2];
  buf[m++] = omega[i][0];
  buf[m++] = omega[i][1];
  buf[m++] = omega[i][2];
@@ -546,15 +546,15 @@ int AtomVecGranular::unpack_restart(double *buf)

  radius[nlocal] = buf[m++];
  density[nlocal] = buf[m++];
  if (force->dimension == 3) 
  if (domain->dimension == 3) 
    rmass[nlocal] = 4.0*PI/3.0 * 
      radius[nlocal]*radius[nlocal]*radius[nlocal] * density[nlocal];
  else
    rmass[nlocal] = PI * radius[nlocal]*radius[nlocal] * density[nlocal];

  xphi[nlocal][0] = buf[m++];
  xphi[nlocal][1] = buf[m++];
  xphi[nlocal][2] = buf[m++];
  xorient[nlocal][0] = buf[m++];
  xorient[nlocal][1] = buf[m++];
  xorient[nlocal][2] = buf[m++];
  omega[nlocal][0] = buf[m++];
  omega[nlocal][1] = buf[m++];
  omega[nlocal][2] = buf[m++];
@@ -592,14 +592,14 @@ void AtomVecGranular::create_atom(int itype, double *coord)

  radius[nlocal] = 0.5;
  density[nlocal] = 1.0;
  if (force->dimension == 3)
  if (domain->dimension == 3)
    rmass[nlocal] = 4.0*PI/3.0 *
      radius[nlocal]*radius[nlocal]*radius[nlocal] * density[nlocal];
  else
    rmass[nlocal] = PI * radius[nlocal]*radius[nlocal] * density[nlocal];
  xphi[nlocal][0] = 0.0;
  xphi[nlocal][1] = 0.0;
  xphi[nlocal][2] = 0.0;
  xorient[nlocal][0] = 0.0;
  xorient[nlocal][1] = 0.0;
  xorient[nlocal][2] = 0.0;
  omega[nlocal][0] = 0.0;
  omega[nlocal][1] = 0.0;
  omega[nlocal][2] = 0.0;
@@ -627,7 +627,7 @@ void AtomVecGranular::data_atom(double *coord, int imagetmp, char **values)

  radius[nlocal] = 0.5 * atof(values[2]);
  density[nlocal] = atof(values[3]);
  if (force->dimension == 3)
  if (domain->dimension == 3)
    rmass[nlocal] = 4.0*PI/3.0 *
      radius[nlocal]*radius[nlocal]*radius[nlocal] * density[nlocal];
  else
@@ -643,9 +643,9 @@ void AtomVecGranular::data_atom(double *coord, int imagetmp, char **values)
  v[nlocal][0] = 0.0;
  v[nlocal][1] = 0.0;
  v[nlocal][2] = 0.0;
  xphi[nlocal][0] = 0.0;
  xphi[nlocal][1] = 0.0;
  xphi[nlocal][2] = 0.0;
  xorient[nlocal][0] = 1.0;
  xorient[nlocal][1] = 0.0;
  xorient[nlocal][2] = 0.0;
  omega[nlocal][0] = 0.0;
  omega[nlocal][1] = 0.0;
  omega[nlocal][2] = 0.0;
@@ -662,7 +662,7 @@ int AtomVecGranular::data_atom_hybrid(int nlocal, char **values)
{
  radius[nlocal] = 0.5 * atof(values[0]);
  density[nlocal] = atof(values[1]);
  if (force->dimension == 3)
  if (domain->dimension == 3)
    rmass[nlocal] = 4.0*PI/3.0 *
      radius[nlocal]*radius[nlocal]*radius[nlocal] * density[nlocal];
  else
@@ -671,9 +671,9 @@ int AtomVecGranular::data_atom_hybrid(int nlocal, char **values)
  v[nlocal][0] = 0.0;
  v[nlocal][1] = 0.0;
  v[nlocal][2] = 0.0;
  xphi[nlocal][0] = 0.0;
  xphi[nlocal][1] = 0.0;
  xphi[nlocal][2] = 0.0;
  xorient[nlocal][0] = 1.0;
  xorient[nlocal][1] = 0.0;
  xorient[nlocal][2] = 0.0;
  omega[nlocal][0] = 0.0;
  omega[nlocal][1] = 0.0;
  omega[nlocal][2] = 0.0;
@@ -726,7 +726,7 @@ int AtomVecGranular::memory_usage()
  if (atom->memcheck("radius")) bytes += nmax * sizeof(double);
  if (atom->memcheck("density")) bytes += nmax * sizeof(double);
  if (atom->memcheck("rmass")) bytes += nmax * sizeof(double);
  if (atom->memcheck("xphi")) bytes += nmax*3 * sizeof(double);
  if (atom->memcheck("xorient")) bytes += nmax*3 * sizeof(double);
  if (atom->memcheck("omega")) bytes += nmax*3 * sizeof(double);
  if (atom->memcheck("torque")) bytes += nmax*3 * sizeof(double);

Loading