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)
|
// volume_one = volume of inserted particle (with max possible radius)
|
||||||
// in 3d, insure dy >= 1, for quasi-2d simulations
|
// in 3d, insure dy >= 1, for quasi-2d simulations
|
||||||
|
|
||||||
double volume,volume_one;
|
double volume,volume_one=1.0;
|
||||||
|
|
||||||
molradius_max = 0.0;
|
molradius_max = 0.0;
|
||||||
if (mode == MOLECULE) {
|
if (mode == MOLECULE) {
|
||||||
|
|||||||
@ -1398,25 +1398,28 @@ void FixBondCreate::print_bb()
|
|||||||
for (int i = 0; i < atom->nlocal; i++) {
|
for (int i = 0; i < atom->nlocal; i++) {
|
||||||
printf("TAG " TAGINT_FORMAT ": %d nbonds: ",atom->tag[i],atom->num_bond[i]);
|
printf("TAG " TAGINT_FORMAT ": %d nbonds: ",atom->tag[i],atom->num_bond[i]);
|
||||||
for (int j = 0; j < atom->num_bond[i]; j++) {
|
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("\n");
|
||||||
printf("TAG " TAGINT_FORMAT ": %d nangles: ",atom->tag[i],atom->num_angle[i]);
|
printf("TAG " TAGINT_FORMAT ": %d nangles: ",atom->tag[i],atom->num_angle[i]);
|
||||||
for (int j = 0; j < atom->num_angle[i]; j++) {
|
for (int j = 0; j < atom->num_angle[i]; j++) {
|
||||||
printf(" %d %d %d,",atom->angle_atom1[i][j],
|
printf(" " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT ",",
|
||||||
atom->angle_atom2[i][j],atom->angle_atom3[i][j]);
|
atom->angle_atom1[i][j], atom->angle_atom2[i][j],
|
||||||
|
atom->angle_atom3[i][j]);
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("TAG " TAGINT_FORMAT ": %d ndihedrals: ",atom->tag[i],atom->num_dihedral[i]);
|
printf("TAG " TAGINT_FORMAT ": %d ndihedrals: ",atom->tag[i],atom->num_dihedral[i]);
|
||||||
for (int j = 0; j < atom->num_dihedral[i]; j++) {
|
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_atom2[i][j],atom->dihedral_atom3[i][j],
|
||||||
atom->dihedral_atom4[i][j]);
|
atom->dihedral_atom4[i][j]);
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("TAG " TAGINT_FORMAT ": %d nimpropers: ",atom->tag[i],atom->num_improper[i]);
|
printf("TAG " TAGINT_FORMAT ": %d nimpropers: ",atom->tag[i],atom->num_improper[i]);
|
||||||
for (int j = 0; j < atom->num_improper[i]; j++) {
|
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_atom2[i][j],atom->improper_atom3[i][j],
|
||||||
atom->improper_atom4[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],
|
printf("TAG " TAGINT_FORMAT ": %d %d %d nspecial: ",atom->tag[i],
|
||||||
atom->nspecial[i][0],atom->nspecial[i][1],atom->nspecial[i][2]);
|
atom->nspecial[i][0],atom->nspecial[i][1],atom->nspecial[i][2]);
|
||||||
for (int j = 0; j < atom->nspecial[i][2]; j++) {
|
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");
|
printf("\n");
|
||||||
}
|
}
|
||||||
@ -1435,7 +1438,7 @@ void FixBondCreate::print_bb()
|
|||||||
void FixBondCreate::print_copy(const char *str, tagint m,
|
void FixBondCreate::print_copy(const char *str, tagint m,
|
||||||
int n1, int n2, int n3, int *v)
|
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]);
|
for (int j = 0; j < n3; j++) printf(" %d",v[j]);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1734,11 +1734,11 @@ void FixRigidSmall::setup_bodies_static()
|
|||||||
// dorientflag = 1 if any particle stores dipole orientation
|
// dorientflag = 1 if any particle stores dipole orientation
|
||||||
|
|
||||||
if (extended) {
|
if (extended) {
|
||||||
grow_arrays(atom->nmax);
|
|
||||||
if (atom->ellipsoid_flag) orientflag = 4;
|
if (atom->ellipsoid_flag) orientflag = 4;
|
||||||
if (atom->line_flag) orientflag = 1;
|
if (atom->line_flag) orientflag = 1;
|
||||||
if (atom->tri_flag) orientflag = 4;
|
if (atom->tri_flag) orientflag = 4;
|
||||||
if (atom->mu_flag) dorientflag = 1;
|
if (atom->mu_flag) dorientflag = 1;
|
||||||
|
grow_arrays(atom->nmax);
|
||||||
|
|
||||||
for (i = 0; i < nlocal; i++) {
|
for (i = 0; i < nlocal; i++) {
|
||||||
eflags[i] = 0;
|
eflags[i] = 0;
|
||||||
|
|||||||
@ -163,10 +163,10 @@ void PairSNAP::compute(int eflag, int vflag)
|
|||||||
|
|
||||||
void PairSNAP::compute_regular(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 delx,dely,delz,evdwl,rsq;
|
||||||
double fij[3];
|
double fij[3];
|
||||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
int *jlist,*numneigh,**firstneigh;
|
||||||
evdwl = 0.0;
|
evdwl = 0.0;
|
||||||
|
|
||||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
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;
|
int newton_pair = force->newton_pair;
|
||||||
class SNA* snaptr = sna[0];
|
class SNA* snaptr = sna[0];
|
||||||
|
|
||||||
inum = list->inum;
|
|
||||||
ilist = list->ilist;
|
|
||||||
numneigh = list->numneigh;
|
numneigh = list->numneigh;
|
||||||
firstneigh = list->firstneigh;
|
firstneigh = list->firstneigh;
|
||||||
|
|
||||||
@ -425,10 +423,10 @@ void PairSNAP::compute_optimized(int eflag, int vflag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ielem;
|
int ielem;
|
||||||
int jj,k,inum,jnum,jtype,ninside;
|
int jj,k,jnum,jtype,ninside;
|
||||||
double delx,dely,delz,evdwl,rsq;
|
double delx,dely,delz,evdwl,rsq;
|
||||||
double fij[3];
|
double fij[3];
|
||||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
int *jlist,*numneigh,**firstneigh;
|
||||||
evdwl = 0.0;
|
evdwl = 0.0;
|
||||||
|
|
||||||
#if defined(_OPENMP)
|
#if defined(_OPENMP)
|
||||||
@ -450,8 +448,6 @@ void PairSNAP::compute_optimized(int eflag, int vflag)
|
|||||||
int nlocal = atom->nlocal;
|
int nlocal = atom->nlocal;
|
||||||
int newton_pair = force->newton_pair;
|
int newton_pair = force->newton_pair;
|
||||||
|
|
||||||
inum = list->inum;
|
|
||||||
ilist = list->ilist;
|
|
||||||
numneigh = list->numneigh;
|
numneigh = list->numneigh;
|
||||||
firstneigh = list->firstneigh;
|
firstneigh = list->firstneigh;
|
||||||
|
|
||||||
@ -1020,17 +1016,16 @@ void PairSNAP::build_per_atom_arrays()
|
|||||||
clock_gettime(CLOCK_REALTIME,&starttime);
|
clock_gettime(CLOCK_REALTIME,&starttime);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int i_list[list->inum+ghostinum];
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
int neighmax = 0;
|
int neighmax = 0;
|
||||||
for (int ii = 0; ii < list->inum; ii++)
|
for (int ii = 0; ii < list->inum; ii++)
|
||||||
if ((do_load_balance <= 0) || ilistmask[ii]) {
|
if ((do_load_balance <= 0) || ilistmask[ii]) {
|
||||||
neighmax=MAX(neighmax,list->numneigh[list->ilist[ii]]);
|
neighmax=MAX(neighmax,list->numneigh[list->ilist[ii]]);
|
||||||
i_list[count++]=list->ilist[ii];
|
++count;
|
||||||
}
|
}
|
||||||
for (int ii = 0; ii < ghostinum; ii++) {
|
for (int ii = 0; ii < ghostinum; ii++) {
|
||||||
neighmax=MAX(neighmax,ghostnumneigh[ghostilist[ii]]);
|
neighmax=MAX(neighmax,ghostnumneigh[ghostilist[ii]]);
|
||||||
i_list[count++]=ghostilist[ii];
|
++count;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i_max < count || i_neighmax < neighmax) {
|
if (i_max < count || i_neighmax < neighmax) {
|
||||||
|
|||||||
@ -47,10 +47,12 @@ CiteMe::~CiteMe()
|
|||||||
|
|
||||||
delete cs;
|
delete cs;
|
||||||
|
|
||||||
if (screen) fprintf(screen,cite_nagline);
|
if (fp) {
|
||||||
if (logfile) fprintf(logfile,cite_nagline);
|
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) {
|
if (!fp) {
|
||||||
fp = fopen("log.cite","w");
|
fp = fopen("log.cite","w");
|
||||||
if (!fp) error->universe_one(FLERR,"Cannot open log.cite file");
|
if (!fp) return;
|
||||||
fputs(cite_header,fp);
|
fputs(cite_header,fp);
|
||||||
fflush(fp);
|
fflush(fp);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,10 +20,12 @@
|
|||||||
#include "fix_recenter.h"
|
#include "fix_recenter.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "group.h"
|
#include "group.h"
|
||||||
|
#include "update.h"
|
||||||
#include "domain.h"
|
#include "domain.h"
|
||||||
#include "lattice.h"
|
#include "lattice.h"
|
||||||
#include "modify.h"
|
#include "modify.h"
|
||||||
#include "comm.h"
|
#include "comm.h"
|
||||||
|
#include "respa.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "force.h"
|
#include "force.h"
|
||||||
|
|
||||||
@ -110,6 +112,7 @@ int FixRecenter::setmask()
|
|||||||
{
|
{
|
||||||
int mask = 0;
|
int mask = 0;
|
||||||
mask |= INITIAL_INTEGRATE;
|
mask |= INITIAL_INTEGRATE;
|
||||||
|
mask |= INITIAL_INTEGRATE_RESPA;
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,6 +142,9 @@ void FixRecenter::init()
|
|||||||
yinit = xcm[1];
|
yinit = xcm[1];
|
||||||
zinit = xcm[2];
|
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];
|
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