git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7866 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -222,6 +222,32 @@ void VerletSplit::init()
|
|||||||
Verlet::init();
|
Verlet::init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
setup before run
|
||||||
|
servant partition only sets up KSpace calculation
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void VerletSplit::setup()
|
||||||
|
{
|
||||||
|
if (comm->me == 0 && screen) fprintf(screen,"Setting up run ...\n");
|
||||||
|
|
||||||
|
if (!master) force->kspace->setup();
|
||||||
|
else Verlet::setup();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
setup without output
|
||||||
|
flag = 0 = just force calculation
|
||||||
|
flag = 1 = reneighbor and force calculation
|
||||||
|
servant partition only sets up KSpace calculation
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void VerletSplit::setup_minimal(int flag)
|
||||||
|
{
|
||||||
|
if (!master) force->kspace->setup();
|
||||||
|
else Verlet::setup_minimal(flag);
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
run for N steps
|
run for N steps
|
||||||
master partition does everything but Kspace
|
master partition does everything but Kspace
|
||||||
@ -419,8 +445,11 @@ void VerletSplit::rk_setup()
|
|||||||
// KSpace procs need to acquire ghost atoms and map all their atoms
|
// KSpace procs need to acquire ghost atoms and map all their atoms
|
||||||
// map_clear() call is in lieu of comm->exchange() which performs map_clear
|
// map_clear() call is in lieu of comm->exchange() which performs map_clear
|
||||||
// borders() call acquires ghost atoms and maps them
|
// borders() call acquires ghost atoms and maps them
|
||||||
|
// NOTE: don't atom coords need to be communicated here before borders() ??
|
||||||
|
// could do this by calling r2k_comm() here and not again from run()
|
||||||
|
|
||||||
if (tip4p_flag) {
|
if (tip4p_flag) {
|
||||||
|
//r2k_comm();
|
||||||
MPI_Gatherv(atom->type,n,MPI_INT,atom->type,qsize,qdisp,MPI_INT,0,block);
|
MPI_Gatherv(atom->type,n,MPI_INT,atom->type,qsize,qdisp,MPI_INT,0,block);
|
||||||
MPI_Gatherv(atom->tag,n,MPI_INT,atom->tag,qsize,qdisp,MPI_INT,0,block);
|
MPI_Gatherv(atom->tag,n,MPI_INT,atom->tag,qsize,qdisp,MPI_INT,0,block);
|
||||||
if (!master) {
|
if (!master) {
|
||||||
|
|||||||
@ -29,6 +29,8 @@ class VerletSplit : public Verlet {
|
|||||||
VerletSplit(class LAMMPS *, int, char **);
|
VerletSplit(class LAMMPS *, int, char **);
|
||||||
~VerletSplit();
|
~VerletSplit();
|
||||||
void init();
|
void init();
|
||||||
|
void setup();
|
||||||
|
void setup_minimal(int);
|
||||||
void run(int);
|
void run(int);
|
||||||
bigint memory_usage();
|
bigint memory_usage();
|
||||||
|
|
||||||
|
|||||||
@ -169,7 +169,8 @@ int FixTempRescale::modify_param(int narg, char **arg)
|
|||||||
strcpy(id_temp,arg[1]);
|
strcpy(id_temp,arg[1]);
|
||||||
|
|
||||||
int icompute = modify->find_compute(id_temp);
|
int icompute = modify->find_compute(id_temp);
|
||||||
if (icompute < 0) error->all(FLERR,"Could not find fix_modify temperature ID");
|
if (icompute < 0)
|
||||||
|
error->all(FLERR,"Could not find fix_modify temperature ID");
|
||||||
temperature = modify->compute[icompute];
|
temperature = modify->compute[icompute];
|
||||||
|
|
||||||
if (temperature->tempflag == 0)
|
if (temperature->tempflag == 0)
|
||||||
|
|||||||
@ -57,13 +57,16 @@ void Replicate::command(int narg, char **arg)
|
|||||||
|
|
||||||
// error and warning checks
|
// error and warning checks
|
||||||
|
|
||||||
if (nx <= 0 || ny <= 0 || nz <= 0) error->all(FLERR,"Illegal replicate command");
|
if (nx <= 0 || ny <= 0 || nz <= 0)
|
||||||
|
error->all(FLERR,"Illegal replicate command");
|
||||||
if (domain->dimension == 2 && nz != 1)
|
if (domain->dimension == 2 && nz != 1)
|
||||||
error->all(FLERR,"Cannot replicate 2d simulation in z dimension");
|
error->all(FLERR,"Cannot replicate 2d simulation in z dimension");
|
||||||
if ((nx > 1 && domain->xperiodic == 0) ||
|
if ((nx > 1 && domain->xperiodic == 0) ||
|
||||||
(ny > 1 && domain->yperiodic == 0) ||
|
(ny > 1 && domain->yperiodic == 0) ||
|
||||||
(nz > 1 && domain->zperiodic == 0))
|
(nz > 1 && domain->zperiodic == 0)) {
|
||||||
error->warning(FLERR,"Replicating in a non-periodic dimension");
|
if (comm->me == 0)
|
||||||
|
error->warning(FLERR,"Replicating in a non-periodic dimension");
|
||||||
|
}
|
||||||
|
|
||||||
if (atom->nextra_grow || atom->nextra_restart || atom->nextra_store)
|
if (atom->nextra_grow || atom->nextra_restart || atom->nextra_store)
|
||||||
error->all(FLERR,"Cannot replicate with fixes that store atom quantities");
|
error->all(FLERR,"Cannot replicate with fixes that store atom quantities");
|
||||||
@ -340,7 +343,7 @@ void Replicate::command(int narg, char **arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // end of proc loop
|
}
|
||||||
|
|
||||||
// free communication buffer and old atom class
|
// free communication buffer and old atom class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user