Commit 906520c0 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@278 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent a583fc10
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ if ($1 == 1) then
  cp angle_hybrid.cpp ..
  cp atom_vec_angle.cpp ..
  cp atom_vec_bond.cpp ..
  cp atom_vec_full.cpp ..
  cp atom_vec_molecular.cpp ..
  cp bond.cpp ..
  cp bond_fene.cpp ..
@@ -47,6 +48,7 @@ if ($1 == 1) then
  cp angle_hybrid.h ..
  cp atom_vec_angle.h ..
  cp atom_vec_bond.h ..
  cp atom_vec_full.h ..
  cp atom_vec_molecular.h ..
#  cp bond.h ..
  cp bond_fene.h ..
@@ -84,6 +86,7 @@ else if ($1 == 0) then
  rm ../angle_hybrid.cpp
  rm ../atom_vec_angle.cpp
  rm ../atom_vec_bond.cpp
  rm ../atom_vec_full.cpp
  rm ../atom_vec_molecular.cpp
  rm ../bond.cpp
  rm ../bond_fene.cpp
@@ -116,6 +119,7 @@ else if ($1 == 0) then
  rm ../angle_hybrid.h
  rm ../atom_vec_angle.h
  rm ../atom_vec_bond.h
  rm ../atom_vec_full.h
  rm ../atom_vec_molecular.h
#  rm ../bond.h
  rm ../bond_fene.h
+3 −21
Original line number Diff line number Diff line
@@ -40,10 +40,10 @@ AtomVecMolecular::AtomVecMolecular(LAMMPS *lmp, int narg, char **arg) :
  mass_type = 1;
  size_comm = 3;
  size_reverse = 3;
  size_border = 8;
  size_data_atom = 7;
  size_border = 7;
  size_data_atom = 6;
  size_data_vel = 4;
  xcol_data = 5;
  xcol_data = 4;
}

/* ----------------------------------------------------------------------
@@ -70,8 +70,6 @@ void AtomVecMolecular::grow(int n)
  v = atom->v = memory->grow_2d_double_array(atom->v,nmax,3,"atom:v");
  f = atom->f = memory->grow_2d_double_array(atom->f,nmax,3,"atom:f");

  q = atom->q = (double *) 
    memory->srealloc(atom->q,nmax*sizeof(double),"atom:q");
  molecule = atom->molecule = (int *) 
    memory->srealloc(atom->molecule,nmax*sizeof(int),"atom:molecule");

@@ -158,7 +156,6 @@ void AtomVecMolecular::reset_ptrs()
  v = atom->v;
  f = atom->f;

  q = atom->q;
  molecule = atom->molecule;
  nspecial = atom->nspecial;
  special = atom->special;
@@ -195,7 +192,6 @@ void AtomVecMolecular::reset_ptrs()

void AtomVecMolecular::zero_owned(int i)
{
  q[i] = 0.0;
  molecule[i] = 0;
  num_bond[i] = 0;
  num_angle[i] = 0;
@@ -217,7 +213,6 @@ void AtomVecMolecular::zero_ghost(int n, int first)
  int last = first + n;
  for (int i = first; i < last; i++) {
    if (i == nmax) atom->avec->grow(0);
    q[i] = 0.0;
    molecule[i] = 0;
  }
}
@@ -239,7 +234,6 @@ void AtomVecMolecular::copy(int i, int j)
  v[j][1] = v[i][1];
  v[j][2] = v[i][2];

  q[j] = q[i];
  molecule[j] = molecule[i];

  num_bond[j] = num_bond[i];
@@ -375,7 +369,6 @@ int AtomVecMolecular::pack_border(int n, int *list, double *buf,
      buf[m++] = tag[j];
      buf[m++] = type[j];
      buf[m++] = mask[j];
      buf[m++] = q[j];
      buf[m++] = molecule[j];
    }
  } else {
@@ -390,7 +383,6 @@ int AtomVecMolecular::pack_border(int n, int *list, double *buf,
      buf[m++] = tag[j];
      buf[m++] = type[j];
      buf[m++] = mask[j];
      buf[m++] = q[j];
      buf[m++] = molecule[j];
    }
  }
@@ -401,7 +393,6 @@ int AtomVecMolecular::pack_border(int n, int *list, double *buf,

int AtomVecMolecular::pack_border_one(int i, double *buf)
{
  buf[0] = q[i];
  buf[1] = molecule[i];
  return 2;
}
@@ -422,7 +413,6 @@ void AtomVecMolecular::unpack_border(int n, int first, double *buf)
    tag[i] = static_cast<int> (buf[m++]);
    type[i] = static_cast<int> (buf[m++]);
    mask[i] = static_cast<int> (buf[m++]);
    q[i] = buf[m++];
    molecule[i] = static_cast<int> (buf[m++]);
  }
}
@@ -431,7 +421,6 @@ void AtomVecMolecular::unpack_border(int n, int first, double *buf)

int AtomVecMolecular::unpack_border_one(int i, double *buf)
{
  q[i] = buf[0];
  molecule[i] = static_cast<int> (buf[1]);
  return 2;
}
@@ -457,7 +446,6 @@ int AtomVecMolecular::pack_exchange(int i, double *buf)
  buf[m++] = mask[i];
  buf[m++] = image[i];

  buf[m++] = q[i];
  buf[m++] = molecule[i];

  buf[m++] = num_bond[i];
@@ -526,7 +514,6 @@ int AtomVecMolecular::unpack_exchange(double *buf)
  mask[nlocal] = static_cast<int> (buf[m++]);
  image[nlocal] = static_cast<int> (buf[m++]);

  q[nlocal] = buf[m++];
  molecule[nlocal] = static_cast<int> (buf[m++]);

  num_bond[nlocal] = static_cast<int> (buf[m++]);
@@ -633,7 +620,6 @@ int AtomVecMolecular::pack_restart(int i, double *buf)
  buf[m++] = v[i][1];
  buf[m++] = v[i][2];

  buf[m++] = q[i];
  buf[m++] = molecule[i];
 
  buf[m++] = num_bond[i];
@@ -705,7 +691,6 @@ int AtomVecMolecular::unpack_restart(double *buf)
  v[nlocal][1] = buf[m++];
  v[nlocal][2] = buf[m++];

  q[nlocal] = buf[m++];
  molecule[nlocal] = static_cast<int> (buf[m++]);
    
  num_bond[nlocal] = static_cast<int> (buf[m++]);
@@ -772,7 +757,6 @@ void AtomVecMolecular::create_atom(int itype, double x0, double y0, double z0,
  v[nlocal][1] = 0.0;
  v[nlocal][2] = 0.0;

  q[nlocal] = 0.0;
  molecule[nlocal] = 0;
  num_bond[nlocal] = 0;
  num_angle[nlocal] = 0;
@@ -803,8 +787,6 @@ void AtomVecMolecular::data_atom(double xtmp, double ytmp, double ztmp,
  if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes)
    error->one("Invalid atom type in Atoms section of data file");

  q[nlocal] = atof(values[3]);

  x[nlocal][0] = xtmp;
  x[nlocal][1] = ytmp;
  x[nlocal][2] = ztmp;
+0 −1
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@ class AtomVecMolecular : public AtomVec {
 private:
  int *tag,*type,*mask,*image;
  double **x,**v,**f;
  double *q;
  int *molecule;
  int **nspecial,**special;
  int *num_bond;
+2 −0
Original line number Diff line number Diff line
@@ -30,12 +30,14 @@ AngleStyle(hybrid,AngleHybrid)
#ifdef AtomInclude
#include "atom_vec_angle.h"
#include "atom_vec_bond.h"
#include "atom_vec_full.h"
#include "atom_vec_molecular.h"
#endif

#ifdef AtomClass
AtomStyle(angle,AtomVecAngle)
AtomStyle(bond,AtomVecBond)
AtomStyle(full,AtomVecFull)
AtomStyle(molecular,AtomVecMolecular)
#endif

+5 −0
Original line number Diff line number Diff line
@@ -561,6 +561,7 @@ void DumpCustom::parse_fields(int narg, char **arg)
    } else if (strcmp(arg[iarg],"type") == 0) {
      pack_choice[i] = &DumpCustom::pack_type;
      vtype[i] = INT;

    } else if (strcmp(arg[iarg],"x") == 0) {
      pack_choice[i] = &DumpCustom::pack_x;
      vtype[i] = DOUBLE;
@@ -597,6 +598,7 @@ void DumpCustom::parse_fields(int narg, char **arg)
    } else if (strcmp(arg[iarg],"iz") == 0) {
      pack_choice[i] = &DumpCustom::pack_iz;
      vtype[i] = INT;

    } else if (strcmp(arg[iarg],"vx") == 0) {
      pack_choice[i] = &DumpCustom::pack_vx;
      vtype[i] = DOUBLE;
@@ -615,6 +617,7 @@ void DumpCustom::parse_fields(int narg, char **arg)
    } else if (strcmp(arg[iarg],"fz") == 0) {
      pack_choice[i] = &DumpCustom::pack_fz;
      vtype[i] = DOUBLE;

    } else if (strcmp(arg[iarg],"q") == 0) {
      if (atom->q == NULL)
	error->all("Dumping an atom quantity that isn't allocated");
@@ -650,6 +653,7 @@ void DumpCustom::parse_fields(int narg, char **arg)
	error->all("Dumping an atom quantity that isn't allocated");
      pack_choice[i] = &DumpCustom::pack_tqz;
      vtype[i] = DOUBLE;

    } else if (strcmp(arg[iarg],"epair") == 0) {
      pack_choice[i] = &DumpCustom::pack_epair;
      vtype[i] = DOUBLE;
@@ -667,6 +671,7 @@ void DumpCustom::parse_fields(int narg, char **arg)
      pack_choice[i] = &DumpCustom::pack_centro;
      vtype[i] = DOUBLE;
      index_centro = add_compute(style_centro,1);

    } else if (strcmp(arg[iarg],"sxx") == 0) {
      pack_choice[i] = &DumpCustom::pack_sxx;
      vtype[i] = DOUBLE;
Loading