Merge pull request #570 from akohlmey/collected-small-changes

Collected small changes
This commit is contained in:
sjplimp 2017-07-13 11:26:47 -06:00 committed by GitHub
commit a3a0c9b144
11 changed files with 37 additions and 29 deletions

View File

@ -212,8 +212,9 @@ pour"_fix_pour.html.
For bodystyle {single} the entire fix group of atoms is treated as one For bodystyle {single} the entire fix group of atoms is treated as one
rigid body. This option is only allowed for the {rigid} styles. rigid body. This option is only allowed for the {rigid} styles.
For bodystyle {molecule}, each set of atoms in the fix group with a For bodystyle {molecule}, atoms are grouped into rigid bodies by their
different molecule ID is treated as a rigid body. This option is respective molecule IDs: each set of atoms in the fix group with the
same molecule ID is treated as a different rigid body. This option is
allowed for both the {rigid} and {rigid/small} styles. Note that allowed for both the {rigid} and {rigid/small} styles. Note that
atoms with a molecule ID = 0 will be treated as a single rigid body. atoms with a molecule ID = 0 will be treated as a single rigid body.
For a system with atomic solvent (typically this is atoms with For a system with atomic solvent (typically this is atoms with

View File

@ -37,9 +37,8 @@ produce dump snapshots of the running simulation in any of 3 formats.
If you uncomment the dump command in the input script, a text dump If you uncomment the dump command in the input script, a text dump
file will be produced, which can be animated by various visualization file will be produced, which can be animated by various visualization
programs (see http://lammps.sandia.gov/viz.html) such as VMD or programs (see http://lammps.sandia.gov/viz.html) such as Ovito, VMD,
AtomEye. It can also be animated using the xmovie tool described in or AtomEye.
the Additional Tools section of the LAMMPS documentation.
If you uncomment the dump image command in the input script, and If you uncomment the dump image command in the input script, and
assuming you have built LAMMPS with a JPG library, JPG snapshot images assuming you have built LAMMPS with a JPG library, JPG snapshot images

View File

@ -95,6 +95,11 @@ PPPM::PPPM(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg),
MPI_Comm_rank(world,&me); MPI_Comm_rank(world,&me);
MPI_Comm_size(world,&nprocs); MPI_Comm_size(world,&nprocs);
nfft_both = 0;
nxhi_in = nxlo_in = nxhi_out = nxlo_out = 0;
nyhi_in = nylo_in = nyhi_out = nylo_out = 0;
nzhi_in = nzlo_in = nzhi_out = nzlo_out = 0;
density_brick = vdx_brick = vdy_brick = vdz_brick = NULL; density_brick = vdx_brick = vdy_brick = vdz_brick = NULL;
density_fft = NULL; density_fft = NULL;
u_brick = NULL; u_brick = NULL;

View File

@ -121,6 +121,13 @@ PPPMDisp::PPPMDisp(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg),
MPI_Comm_rank(world,&me); MPI_Comm_rank(world,&me);
MPI_Comm_size(world,&nprocs); MPI_Comm_size(world,&nprocs);
nfft_both = nfft_both_6 = 0;
nxhi_in = nxlo_in = nxhi_out = nxlo_out = 0;
nyhi_in = nylo_in = nyhi_out = nylo_out = 0;
nzhi_in = nzlo_in = nzhi_out = nzlo_out = 0;
nxhi_in_6 = nxlo_in_6 = nxhi_out_6 = nxlo_out_6 = 0;
nyhi_in_6 = nylo_in_6 = nyhi_out_6 = nylo_out_6 = 0;
nzhi_in_6 = nzlo_in_6 = nzhi_out_6 = nzlo_out_6 = 0;
csumflag = 0; csumflag = 0;
B = NULL; B = NULL;

View File

@ -949,7 +949,7 @@ void FixRigid::enforce2d()
angmom[ibody][1] = 0.0; angmom[ibody][1] = 0.0;
omega[ibody][0] = 0.0; omega[ibody][0] = 0.0;
omega[ibody][1] = 0.0; omega[ibody][1] = 0.0;
if (langflag) { if (langflag && langextra) {
langextra[ibody][2] = 0.0; langextra[ibody][2] = 0.0;
langextra[ibody][3] = 0.0; langextra[ibody][3] = 0.0;
langextra[ibody][4] = 0.0; langextra[ibody][4] = 0.0;

View File

@ -786,7 +786,7 @@ void FixRigidSmall::enforce2d()
b->angmom[1] = 0.0; b->angmom[1] = 0.0;
b->omega[0] = 0.0; b->omega[0] = 0.0;
b->omega[1] = 0.0; b->omega[1] = 0.0;
if (langflag) { if (langflag && langextra) {
langextra[ibody][2] = 0.0; langextra[ibody][2] = 0.0;
langextra[ibody][3] = 0.0; langextra[ibody][3] = 0.0;
langextra[ibody][4] = 0.0; langextra[ibody][4] = 0.0;

View File

@ -157,7 +157,7 @@ FixNPHugOMP::FixNPHugOMP(LAMMPS *lmp, int narg, char **arg) :
// create a new compute potential energy compute // create a new compute potential energy compute
n = strlen(id) + 3; n = strlen(id) + 4;
id_pe = new char[n]; id_pe = new char[n];
strcpy(id_pe,id); strcpy(id_pe,id);
strcat(id_pe,"_pe"); strcat(id_pe,"_pe");

View File

@ -70,17 +70,6 @@ void FixQEQCombOMP::init()
ngroup = group->count(igroup); ngroup = group->count(igroup);
if (ngroup == 0) error->all(FLERR,"Fix qeq/comb group has no atoms"); if (ngroup == 0) error->all(FLERR,"Fix qeq/comb group has no atoms");
// determine status of neighbor flag of the omp package command
int ifix = modify->find_fix("package_omp");
int use_omp = 0;
if (ifix >=0) {
FixOMP * fix = static_cast<FixOMP *>(lmp->modify->fix[ifix]);
if (fix->get_neighbor()) use_omp = 1;
}
int irequest = neighbor->request(this,instance_me);
neighbor->requests[irequest]->omp = use_omp;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -196,11 +196,10 @@ void DeAllocate_Workspace( control_params *control, storage *workspace )
/* reductions */ /* reductions */
#ifdef LMP_USER_OMP #ifdef LMP_USER_OMP
if(workspace->CdDeltaReduction) sfree( workspace->CdDeltaReduction, "cddelta_reduce" ); if (workspace->CdDeltaReduction) sfree( workspace->CdDeltaReduction, "cddelta_reduce" );
if(workspace->forceReduction) sfree( workspace->forceReduction, "f_reduce" ); if (workspace->forceReduction) sfree( workspace->forceReduction, "f_reduce" );
if(workspace->valence_angle_atom_myoffset) sfree( workspace->valence_angle_atom_myoffset, "valence_angle_atom_myoffset"); if (workspace->valence_angle_atom_myoffset) sfree( workspace->valence_angle_atom_myoffset, "valence_angle_atom_myoffset");
if (workspace->my_ext_pressReduction) sfree( workspace->my_ext_pressReduction, "ext_press_reduce");
if (control->virial && workspace->my_ext_pressReduction) sfree( workspace->my_ext_pressReduction, "ext_press_reduce");
#endif #endif
} }
@ -307,9 +306,7 @@ int Allocate_Workspace( reax_system *system, control_params *control,
"forceReduction", comm); "forceReduction", comm);
workspace->valence_angle_atom_myoffset = (int *) scalloc(sizeof(int), total_cap, "valence_angle_atom_myoffset", comm); workspace->valence_angle_atom_myoffset = (int *) scalloc(sizeof(int), total_cap, "valence_angle_atom_myoffset", comm);
workspace->my_ext_pressReduction = (rvec *) calloc(sizeof(rvec), control->nthreads);
if (control->virial)
workspace->my_ext_pressReduction = (rvec *) calloc(sizeof(rvec), control->nthreads);
#endif #endif
return SUCCESS; return SUCCESS;

View File

@ -124,6 +124,7 @@ void CommBrick::init_buffers()
maxrecv = BUFMIN; maxrecv = BUFMIN;
memory->create(buf_recv,maxrecv,"comm:buf_recv"); memory->create(buf_recv,maxrecv,"comm:buf_recv");
nswap = 0;
maxswap = 6; maxswap = 6;
allocate_swap(maxswap); allocate_swap(maxswap);

View File

@ -66,12 +66,21 @@ void FixEnforce2D::init()
if (modify->fix[i]->enforce2d_flag) nfixlist++; if (modify->fix[i]->enforce2d_flag) nfixlist++;
if (nfixlist) { if (nfixlist) {
int myindex = -1;
delete [] flist; delete [] flist;
flist = new Fix*[nfixlist]; flist = new Fix*[nfixlist];
nfixlist = 0; nfixlist = 0;
for (int i = 0; i < modify->nfix; i++) { for (int i = 0; i < modify->nfix; i++) {
if (modify->fix[i]->enforce2d_flag) if (modify->fix[i]->enforce2d_flag) {
flist[nfixlist++] = modify->fix[i]; if (myindex < 0)
flist[nfixlist++] = modify->fix[i];
else {
char msg[256];
sprintf(msg,"Fix enforce2d must be defined after fix %s",modify->fix[i]->style);
error->all(FLERR,msg);
}
}
if (modify->fix[i] == this) myindex = i;
} }
} }
} }