git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12664 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -217,7 +217,7 @@ FixPour::FixPour(LAMMPS *lmp, int narg, char **arg) :
|
||||
// volume_one = volume of inserted particle (with max possible radius)
|
||||
// in 3d, insure dy >= 1, for quasi-2d simulations
|
||||
|
||||
double volume,volume_one;
|
||||
double volume,volume_one=1.0;
|
||||
|
||||
molradius_max = 0.0;
|
||||
if (mode == MOLECULE) {
|
||||
|
||||
@ -1398,25 +1398,28 @@ void FixBondCreate::print_bb()
|
||||
for (int i = 0; i < atom->nlocal; i++) {
|
||||
printf("TAG " TAGINT_FORMAT ": %d nbonds: ",atom->tag[i],atom->num_bond[i]);
|
||||
for (int j = 0; j < atom->num_bond[i]; j++) {
|
||||
printf(" %d",atom->bond_atom[i][j]);
|
||||
printf(" " TAGINT_FORMAT,atom->bond_atom[i][j]);
|
||||
}
|
||||
printf("\n");
|
||||
printf("TAG " TAGINT_FORMAT ": %d nangles: ",atom->tag[i],atom->num_angle[i]);
|
||||
for (int j = 0; j < atom->num_angle[i]; j++) {
|
||||
printf(" %d %d %d,",atom->angle_atom1[i][j],
|
||||
atom->angle_atom2[i][j],atom->angle_atom3[i][j]);
|
||||
printf(" " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT ",",
|
||||
atom->angle_atom1[i][j], atom->angle_atom2[i][j],
|
||||
atom->angle_atom3[i][j]);
|
||||
}
|
||||
printf("\n");
|
||||
printf("TAG " TAGINT_FORMAT ": %d ndihedrals: ",atom->tag[i],atom->num_dihedral[i]);
|
||||
for (int j = 0; j < atom->num_dihedral[i]; j++) {
|
||||
printf(" %d %d %d %d,",atom->dihedral_atom1[i][j],
|
||||
printf(" " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT " "
|
||||
TAGINT_FORMAT ",", atom->dihedral_atom1[i][j],
|
||||
atom->dihedral_atom2[i][j],atom->dihedral_atom3[i][j],
|
||||
atom->dihedral_atom4[i][j]);
|
||||
}
|
||||
printf("\n");
|
||||
printf("TAG " TAGINT_FORMAT ": %d nimpropers: ",atom->tag[i],atom->num_improper[i]);
|
||||
for (int j = 0; j < atom->num_improper[i]; j++) {
|
||||
printf(" %d %d %d %d,",atom->improper_atom1[i][j],
|
||||
printf(" " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT " "
|
||||
TAGINT_FORMAT ",",atom->improper_atom1[i][j],
|
||||
atom->improper_atom2[i][j],atom->improper_atom3[i][j],
|
||||
atom->improper_atom4[i][j]);
|
||||
}
|
||||
@ -1424,7 +1427,7 @@ void FixBondCreate::print_bb()
|
||||
printf("TAG " TAGINT_FORMAT ": %d %d %d nspecial: ",atom->tag[i],
|
||||
atom->nspecial[i][0],atom->nspecial[i][1],atom->nspecial[i][2]);
|
||||
for (int j = 0; j < atom->nspecial[i][2]; j++) {
|
||||
printf(" %d",atom->special[i][j]);
|
||||
printf(" " TAGINT_FORMAT,atom->special[i][j]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
@ -1435,7 +1438,7 @@ void FixBondCreate::print_bb()
|
||||
void FixBondCreate::print_copy(const char *str, tagint m,
|
||||
int n1, int n2, int n3, int *v)
|
||||
{
|
||||
printf("%s %i: %d %d %d nspecial: ",str,m,n1,n2,n3);
|
||||
printf("%s " TAGINT_FORMAT ": %d %d %d nspecial: ",str,m,n1,n2,n3);
|
||||
for (int j = 0; j < n3; j++) printf(" %d",v[j]);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
@ -1734,11 +1734,11 @@ void FixRigidSmall::setup_bodies_static()
|
||||
// dorientflag = 1 if any particle stores dipole orientation
|
||||
|
||||
if (extended) {
|
||||
grow_arrays(atom->nmax);
|
||||
if (atom->ellipsoid_flag) orientflag = 4;
|
||||
if (atom->line_flag) orientflag = 1;
|
||||
if (atom->tri_flag) orientflag = 4;
|
||||
if (atom->mu_flag) dorientflag = 1;
|
||||
grow_arrays(atom->nmax);
|
||||
|
||||
for (i = 0; i < nlocal; i++) {
|
||||
eflags[i] = 0;
|
||||
|
||||
@ -163,10 +163,10 @@ void PairSNAP::compute(int eflag, int vflag)
|
||||
|
||||
void PairSNAP::compute_regular(int eflag, int vflag)
|
||||
{
|
||||
int i,j,inum,jnum,ninside;
|
||||
int i,j,jnum,ninside;
|
||||
double delx,dely,delz,evdwl,rsq;
|
||||
double fij[3];
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
int *jlist,*numneigh,**firstneigh;
|
||||
evdwl = 0.0;
|
||||
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
@ -179,8 +179,6 @@ void PairSNAP::compute_regular(int eflag, int vflag)
|
||||
int newton_pair = force->newton_pair;
|
||||
class SNA* snaptr = sna[0];
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
@ -425,10 +423,10 @@ void PairSNAP::compute_optimized(int eflag, int vflag)
|
||||
}
|
||||
|
||||
int ielem;
|
||||
int jj,k,inum,jnum,jtype,ninside;
|
||||
int jj,k,jnum,jtype,ninside;
|
||||
double delx,dely,delz,evdwl,rsq;
|
||||
double fij[3];
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
int *jlist,*numneigh,**firstneigh;
|
||||
evdwl = 0.0;
|
||||
|
||||
#if defined(_OPENMP)
|
||||
@ -450,8 +448,6 @@ void PairSNAP::compute_optimized(int eflag, int vflag)
|
||||
int nlocal = atom->nlocal;
|
||||
int newton_pair = force->newton_pair;
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
@ -1020,17 +1016,16 @@ void PairSNAP::build_per_atom_arrays()
|
||||
clock_gettime(CLOCK_REALTIME,&starttime);
|
||||
#endif
|
||||
|
||||
int i_list[list->inum+ghostinum];
|
||||
int count = 0;
|
||||
int neighmax = 0;
|
||||
for (int ii = 0; ii < list->inum; ii++)
|
||||
if ((do_load_balance <= 0) || ilistmask[ii]) {
|
||||
neighmax=MAX(neighmax,list->numneigh[list->ilist[ii]]);
|
||||
i_list[count++]=list->ilist[ii];
|
||||
++count;
|
||||
}
|
||||
for (int ii = 0; ii < ghostinum; ii++) {
|
||||
neighmax=MAX(neighmax,ghostnumneigh[ghostilist[ii]]);
|
||||
i_list[count++]=ghostilist[ii];
|
||||
++count;
|
||||
}
|
||||
|
||||
if (i_max < count || i_neighmax < neighmax) {
|
||||
|
||||
@ -47,10 +47,12 @@ CiteMe::~CiteMe()
|
||||
|
||||
delete cs;
|
||||
|
||||
if (screen) fprintf(screen,cite_nagline);
|
||||
if (logfile) fprintf(logfile,cite_nagline);
|
||||
if (fp) {
|
||||
if (screen) fprintf(screen,cite_nagline);
|
||||
if (logfile) fprintf(logfile,cite_nagline);
|
||||
|
||||
if (fp) fclose(fp);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -65,7 +67,7 @@ void CiteMe::add(const char *ref)
|
||||
|
||||
if (!fp) {
|
||||
fp = fopen("log.cite","w");
|
||||
if (!fp) error->universe_one(FLERR,"Cannot open log.cite file");
|
||||
if (!fp) return;
|
||||
fputs(cite_header,fp);
|
||||
fflush(fp);
|
||||
}
|
||||
|
||||
@ -20,10 +20,12 @@
|
||||
#include "fix_recenter.h"
|
||||
#include "atom.h"
|
||||
#include "group.h"
|
||||
#include "update.h"
|
||||
#include "domain.h"
|
||||
#include "lattice.h"
|
||||
#include "modify.h"
|
||||
#include "comm.h"
|
||||
#include "respa.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
|
||||
@ -110,6 +112,7 @@ int FixRecenter::setmask()
|
||||
{
|
||||
int mask = 0;
|
||||
mask |= INITIAL_INTEGRATE;
|
||||
mask |= INITIAL_INTEGRATE_RESPA;
|
||||
return mask;
|
||||
}
|
||||
|
||||
@ -139,6 +142,9 @@ void FixRecenter::init()
|
||||
yinit = xcm[1];
|
||||
zinit = xcm[2];
|
||||
}
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -214,3 +220,13 @@ double FixRecenter::compute_vector(int n)
|
||||
return shift[n];
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void FixRecenter::initial_integrate_respa(int vflag, int ilevel, int iloop)
|
||||
{
|
||||
// outermost level - operate recenter
|
||||
// all other levels - nothing
|
||||
|
||||
if (ilevel == nlevels_respa-1) initial_integrate(vflag);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user