Commit c9495408 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5472 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent a7f69eac
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ void FixQEQComb::init()
    nlevels_respa = ((Respa *) update->integrate)->nlevels;

  ngroup = group->count(igroup);
  if (ngroup == 0.0) error->all("Fix qeq/comb group has no atoms");
  if (ngroup == 0) error->all("Fix qeq/comb group has no atoms");
}

/* ---------------------------------------------------------------------- */
+2 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ FixStyle(qeq/comb,FixQEQComb)

#include "stdio.h"
#include "fix.h"
#include "lmptype.h"

namespace LAMMPS_NS {

@@ -40,7 +41,7 @@ class FixQEQComb : public Fix {
  int me,firstflag;
  double precision;
  int nlevels_respa;
  double ngroup;
  bigint ngroup;
  FILE *fp;

  class PairComb *comb;
+14 −14
Original line number Diff line number Diff line
@@ -1075,7 +1075,7 @@ void FixSRD::vbin_unpack(double *buf, BinAve *vbin, int n, int *list)

void FixSRD::collisions_single()
{
  int i,j,k,m,type,nbig,ibin,ibounce,inside,collide_flag;
  int i,j,k,m,type,mbig,ibin,ibounce,inside,collide_flag;
  double dt,t_remain;
  double norm[3],xscoll[3],xbcoll[3],vsnew[3];
  Big *big;
@@ -1107,11 +1107,11 @@ void FixSRD::collisions_single()
    dt = dt_big;

    while (collide_flag) {
      nbig = nbinbig[ibin];
      if (ibounce == 0) ncheck += nbig;
      mbig = nbinbig[ibin];
      if (ibounce == 0) ncheck += mbig;

      collide_flag = 0;
      for (m = 0; m < nbig; m++) {
      for (m = 0; m < mbig; m++) {
	k = binbig[ibin][m];
	big = &biglist[k];
	j = big->index;
@@ -1236,7 +1236,7 @@ void FixSRD::collisions_single()

void FixSRD::collisions_multi()
{
  int i,j,k,m,type,nbig,ibin,ibounce,inside,jfirst,typefirst;
  int i,j,k,m,type,mbig,ibin,ibounce,inside,jfirst,typefirst;
  double dt,t_remain,t_first;
  double norm[3],xscoll[3],xbcoll[3],vsnew[3];
  double normfirst[3],xscollfirst[3],xbcollfirst[3];
@@ -1268,11 +1268,11 @@ void FixSRD::collisions_multi()
    dt = dt_big;

    while (1) {
      nbig = nbinbig[ibin];
      if (ibounce == 0) ncheck += nbig;
      mbig = nbinbig[ibin];
      if (ibounce == 0) ncheck += mbig;

      t_first = 0.0;
      for (m = 0; m < nbig; m++) {
      for (m = 0; m < mbig; m++) {
	k = binbig[ibin][m];
	big = &biglist[k];
	j = big->index;
@@ -2236,9 +2236,9 @@ void FixSRD::parameterize()

  // particle counts

  double nbig = 0.0;
  if (bigexist) nbig = group->count(biggroup);
  double nsrd = group->count(igroup);
  bigint mbig = 0;
  if (bigexist) mbig = group->count(biggroup);
  bigint nsrd = group->count(igroup);

  // mass_big = total mass of all big particles

@@ -2293,7 +2293,7 @@ void FixSRD::parameterize()
  else
    ncell = volsrd / (binsize3x*binsize3y);

  srd_per_cell = nsrd / ncell;
  srd_per_cell = (double) nsrd / ncell;

  // kinematic viscosity of SRD fluid
  // output in cm^2/sec units, converted by xxt2kmu
@@ -2317,7 +2317,7 @@ void FixSRD::parameterize()
  if (me == 0) {
    if (screen) {
      fprintf(screen,"SRD info:\n");
      fprintf(screen,"  SRD/big particles = %g %g\n",nsrd,nbig);
      fprintf(screen,"  SRD/big particles = %lu %lu\n",nsrd,mbig);
      fprintf(screen,"  big particle diameter max/min = %g %g\n",
	      maxbigdiam,minbigdiam);
      fprintf(screen,"  SRD temperature & lamda = %g %g\n",
@@ -2332,7 +2332,7 @@ void FixSRD::parameterize()
    }
    if (logfile) {
      fprintf(logfile,"SRD info:\n");
      fprintf(logfile,"  SRD/big particles = %g %g\n",nsrd,nbig);
      fprintf(logfile,"  SRD/big particles = %lu %lu\n",nsrd,mbig);
      fprintf(logfile,"  big particle diameter max/min = %g %g\n",
	      maxbigdiam,minbigdiam);
      fprintf(logfile,"  SRD temperature & lamda = %g %g\n",
+7 −8
Original line number Diff line number Diff line
@@ -230,7 +230,7 @@ FixIMD::FixIMD(LAMMPS *lmp, int narg, char **arg) :

  imd_port = atoi(arg[3]); 
  if (imd_port < 1024)
    error->all("Illegal fix imd parameter. port < 1024.");
    error->all("Illegal fix imd parameter: port < 1024");

  /* default values for optional flags */
  unwrap_flag = 0;
@@ -259,7 +259,7 @@ FixIMD::FixIMD(LAMMPS *lmp, int narg, char **arg) :
    } else if (0 == strcmp(arg[argsdone], "trate")) {
      imd_trate = atoi(arg[argsdone+1]);
    } else {
      error->all("Unknown fix imd parameter.");
      error->all("Unknown fix imd parameter");
    }
    ++argsdone; ++argsdone;
  }
@@ -268,12 +268,11 @@ FixIMD::FixIMD(LAMMPS *lmp, int narg, char **arg) :
  if (imd_trate < 1)
    error->all("Illegal fix imd parameter. trate < 1.");

  if (igroup == group->find("all")) {
    num_coords = static_cast<int> (atom->natoms);
  } else {
    num_coords = static_cast<int> (group->count(igroup));
    if (num_coords <= 0) error->all("Invalid number of group atoms for 'fix imd'");
  }
  bigint n;
  if (igroup == group->find("all"))  n = atom->natoms;
  else n = group->count(igroup);
  if (n > MAXINT32) error->all("Too many atoms for fix imd");
  num_coords = static_cast<int> (n);

  MPI_Comm_rank(world,&me);

+10 −8
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
#include "string.h"
#include "stdlib.h"
#include "compute_reduce.h"
#include "lmptype.h"
#include "atom.h"
#include "update.h"
#include "domain.h"
@@ -589,7 +590,7 @@ double ComputeReduce::compute_one(int m, int flag)

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

double ComputeReduce::count(int m)
bigint ComputeReduce::count(int m)
{
  int vidx = value2index[m];
  int aidx = argindex[m];
@@ -601,9 +602,9 @@ double ComputeReduce::count(int m)
    if (flavor[m] == PERATOM) {
      return group->count(igroup);
    } else if (flavor[m] == LOCAL) {
      double ncount = compute->size_local_rows;
      double ncountall;
      MPI_Allreduce(&ncount,&ncountall,1,MPI_DOUBLE,MPI_SUM,world);
      bigint ncount = compute->size_local_rows;
      bigint ncountall;
      MPI_Allreduce(&ncount,&ncountall,1,MPI_UNSIGNED_LONG,MPI_SUM,world);
      return ncountall;
    }
  } else if (which[m] == FIX) {
@@ -611,15 +612,16 @@ double ComputeReduce::count(int m)
    if (flavor[m] == PERATOM) {
      return group->count(igroup);
    } else if (flavor[m] == LOCAL) {
      double ncount = fix->size_local_rows;
      double ncountall;
      MPI_Allreduce(&ncount,&ncountall,1,MPI_DOUBLE,MPI_SUM,world);
      bigint ncount = fix->size_local_rows;
      bigint ncountall;
      MPI_Allreduce(&ncount,&ncountall,1,MPI_UNSIGNED_LONG,MPI_SUM,world);
      return ncountall;
    }
  } else if (which[m] == VARIABLE)
    return group->count(igroup);

  return 0.0;
  bigint dummy = 0;
  return dummy;
}

/* ----------------------------------------------------------------------
Loading