Dear steve:
I have changed the fix_deposit.h and cpp code. The puopose is keeping the numbers of deposited atoms constant. Here is my accession code:
int FixDeposit::setmask()
{
int mask = 0;
mask |= PRE_EXCHANGE;
return mask;
}
/* ----------------------------------------------------------------------
perform particle insertion
------------------------------------------------------------------------- */
void FixDeposit::pre_exchange()
{
int i,j;
> int flag,flagall;
> double coord[3],lamda[3],delx,dely,delz,rsq;
> double *newcoord;
> double **x = atom->x;
> int *mask = atom->mask;
> int nlocal = atom->nlocal;
> int natoms;
> int data = 0;
> Region *region = domain->regions[iregion];
>
> for(int i=0; i< nlocal ; i++) {
> if (mask && groupbit && region->match(x[0],x[1],x[2])) data += 1;
> }
> MPI_Allreduce(&data,&natoms,1,MPI_INT,MPI_SUM,world);
// just return if should not be called on this timestep
if (next_reneighbor != update->ntimestep) return;
if (natoms >= nc) {
next_reneighbor += nfreq;
return;
}
// compute current offset = bottom of insertion volume
double offset = 0.0;
if (rateflag) offset = (update->ntimestep - nfirst) * update->dt * rate;
double *sublo,*subhi;
if (domain->triclinic == 0) {
When serial compution is in my own computer,there is no problem.However when parallel compution is in cluster with the “fix deposit” command,the log file will be vacant and there is no dump file will be dumped.I can’t find the problem.So I ask you for help.I’ll be very thankful if you can help me with this problem. Have a good day!
Look forward to hearing from you soon.Thanks.
Beat wishes!
Wang XinHai