Commit 011568fa authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15763 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 0f1c56d0
Loading
Loading
Loading
Loading
+21 −17
Original line number Diff line number Diff line
@@ -509,10 +509,10 @@ void Region::set_velocity()
}

/* ----------------------------------------------------------------------
   Compute velocity of wall for given contact
   Since contacts only store delx/y/z, need to pass particle coords
   compute velocity of wall for given contact
   since contacts only store delx/y/z, need to pass particle coords
     to compute contact point
   Called by fix/wall/gran/region every contact every timestep
   called by fix/wall/gran/region every contact every timestep
------------------------------------------------------------------------- */

void Region::velocity_contact(double *vwall, double *x, int ic)
@@ -541,9 +541,10 @@ void Region::velocity_contact(double *vwall, double *x, int ic)


/* ----------------------------------------------------------------------
   Increment length of restart buffer based on region info
   Used by restart of fix/wall/gran/region
   increment length of restart buffer based on region info
   used by restart of fix/wall/gran/region
------------------------------------------------------------------------- */

void Region::length_restart_string(int &n)
{
  n += sizeof(int) + strlen(id)+1 + 
@@ -552,9 +553,11 @@ void Region::length_restart_string(int& n)
}

/* ----------------------------------------------------------------------
   Region writes its current style, id, number of sub-regions and position/angle
   Needed by fix/wall/gran/region to compute velocity by differencing scheme
   region writes its current style, id, number of sub-regions 
     and position/angle
   needed by fix/wall/gran/region to compute velocity by differencing scheme
------------------------------------------------------------------------- */

void Region::write_restart(FILE *fp)
{
  int sizeid = (strlen(id)+1);
@@ -569,10 +572,11 @@ void Region::write_restart(FILE *fp)
}

/* ----------------------------------------------------------------------
   Region reads style, id, number of sub-regions from restart file. If they
    match current region, also read previous position/angle
   Needed by fix/wall/gran/region to compute velocity by differencing scheme
   region reads style, id, number of sub-regions from restart file
     if they match current region, also read previous position/angle
   needed by fix/wall/gran/region to compute velocity by differencing scheme
------------------------------------------------------------------------- */

int Region::restart(char *buf, int &n)
{
  int sizeid = buf[n];
@@ -607,10 +611,10 @@ int Region::restart(char *buf, int &n)
}

/* ----------------------------------------------------------------------
   Set prev vector to zero
   set prev vector to zero
------------------------------------------------------------------------- */

void Region::reset_vel()
{
  for (int i = 0; i < size_restart; i++)
    prev[i] = 0;
  for (int i = 0; i < size_restart; i++) prev[i] = 0;
}
+12 −9
Original line number Diff line number Diff line
@@ -273,7 +273,7 @@ void RegIntersect::pretransform()


/* ----------------------------------------------------------------------
   Get translational/angular velocities of all subregions
   get translational/angular velocities of all subregions
------------------------------------------------------------------------- */

void RegIntersect::set_velocity()
@@ -283,11 +283,11 @@ void RegIntersect::set_velocity()
    regions[list[ilist]]->set_velocity();
}


/* ----------------------------------------------------------------------
   Increment length of restart buffer based on region info
   Used by restart of fix/wall/gran/region
   increment length of restart buffer based on region info
   used by restart of fix/wall/gran/region
------------------------------------------------------------------------- */

void RegIntersect::length_restart_string(int& n)
{
  n += sizeof(int) + strlen(id)+1 + 
@@ -297,9 +297,10 @@ void RegIntersect::length_restart_string(int& n)

}
/* ----------------------------------------------------------------------
   Region writes its current position/angle
   Needed by fix/wall/gran/region to compute velocity by differencing scheme
   region writes its current position/angle
   needed by fix/wall/gran/region to compute velocity by differencing scheme
------------------------------------------------------------------------- */

void RegIntersect::write_restart(FILE *fp)
{
  int sizeid = (strlen(id)+1);
@@ -316,9 +317,10 @@ void RegIntersect::write_restart(FILE *fp)
}

/* ----------------------------------------------------------------------
   Region reads its previous position/angle
   Needed by fix/wall/gran/region to compute velocity by differencing scheme
   region reads its previous position/angle
   needed by fix/wall/gran/region to compute velocity by differencing scheme
------------------------------------------------------------------------- */

int RegIntersect::restart(char *buf, int& n)
{
  int sizeid = buf[n];
@@ -349,8 +351,9 @@ int RegIntersect::restart(char *buf, int& n)
}

/* ----------------------------------------------------------------------
   Set prev vector to zero
   set prev vector to zero
------------------------------------------------------------------------- */

void RegIntersect::reset_vel()
{
  for (int ilist = 0; ilist < nregion; ilist++)
+12 −9
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ void RegUnion::pretransform()
}

/* ----------------------------------------------------------------------
   Get translational/angular velocities of all subregions
   get translational/angular velocities of all subregions
------------------------------------------------------------------------- */

void RegUnion::set_velocity()
@@ -277,11 +277,11 @@ void RegUnion::set_velocity()
    regions[list[ilist]]->set_velocity();
}


/* ----------------------------------------------------------------------
   Increment length of restart buffer based on region info
   Used by restart of fix/wall/gran/region
   increment length of restart buffer based on region info
   used by restart of fix/wall/gran/region
------------------------------------------------------------------------- */

void RegUnion::length_restart_string(int& n)
{
  n += sizeof(int) + strlen(id)+1 + 
@@ -291,9 +291,10 @@ void RegUnion::length_restart_string(int& n)

}
/* ----------------------------------------------------------------------
   Region writes its current position/angle
   Needed by fix/wall/gran/region to compute velocity by differencing scheme
   region writes its current position/angle
   needed by fix/wall/gran/region to compute velocity by differencing scheme
------------------------------------------------------------------------- */

void RegUnion::write_restart(FILE *fp)
{
  int sizeid = (strlen(id)+1);
@@ -308,9 +309,10 @@ void RegUnion::write_restart(FILE *fp)
}

/* ----------------------------------------------------------------------
   Region reads its previous position/angle
   Needed by fix/wall/gran/region to compute velocity by differencing scheme
   region reads its previous position/angle
   needed by fix/wall/gran/region to compute velocity by differencing scheme
------------------------------------------------------------------------- */

int RegUnion::restart(char *buf, int &n)
{
  int sizeid = buf[n];
@@ -338,8 +340,9 @@ int RegUnion::restart(char *buf, int &n)
}

/* ----------------------------------------------------------------------
   Set prev vector to zero
   set prev vector to zero
------------------------------------------------------------------------- */

void RegUnion::reset_vel()
{
  for (int ilist = 0; ilist < nregion; ilist++)