git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13937 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -452,6 +452,7 @@ void Respa::setup()
|
||||
force->kspace->setup();
|
||||
if (kspace_compute_flag) force->kspace->compute(eflag,vflag);
|
||||
}
|
||||
|
||||
if (newton[ilevel]) comm->reverse_comm();
|
||||
copy_f_flevel(ilevel);
|
||||
}
|
||||
@ -554,12 +555,16 @@ void Respa::run(int n)
|
||||
|
||||
sum_flevel_f();
|
||||
|
||||
if (modify->n_end_of_step) modify->end_of_step();
|
||||
if (modify->n_end_of_step) {
|
||||
timer->stamp();
|
||||
modify->end_of_step();
|
||||
timer->stamp(Timer::MODIFY);
|
||||
}
|
||||
|
||||
if (ntimestep == output->next) {
|
||||
timer->stamp();
|
||||
output->write(update->ntimestep);
|
||||
timer->stamp(TIME_OUTPUT);
|
||||
timer->stamp(Timer::OUTPUT);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -593,9 +598,11 @@ void Respa::recurse(int ilevel)
|
||||
|
||||
for (int iloop = 0; iloop < loop[ilevel]; iloop++) {
|
||||
|
||||
timer->stamp();
|
||||
modify->initial_integrate_respa(vflag,ilevel,iloop);
|
||||
if (modify->n_post_integrate_respa)
|
||||
modify->post_integrate_respa(ilevel,iloop);
|
||||
timer->stamp(Timer::MODIFY);
|
||||
|
||||
// at outermost level, check on rebuilding neighbor list
|
||||
// at innermost level, communicate
|
||||
@ -604,7 +611,11 @@ void Respa::recurse(int ilevel)
|
||||
if (ilevel == nlevels-1) {
|
||||
int nflag = neighbor->decide();
|
||||
if (nflag) {
|
||||
if (modify->n_pre_exchange) modify->pre_exchange();
|
||||
if (modify->n_pre_exchange) {
|
||||
timer->stamp();
|
||||
modify->pre_exchange();
|
||||
timer->stamp(Timer::MODIFY);
|
||||
}
|
||||
if (triclinic) domain->x2lamda(atom->nlocal);
|
||||
domain->pbc();
|
||||
if (domain->box_change) {
|
||||
@ -614,24 +625,27 @@ void Respa::recurse(int ilevel)
|
||||
}
|
||||
timer->stamp();
|
||||
comm->exchange();
|
||||
if (atom->sortfreq > 0 &&
|
||||
if (atom->sortfreq > 0 &&
|
||||
update->ntimestep >= atom->nextsort) atom->sort();
|
||||
comm->borders();
|
||||
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
|
||||
timer->stamp(TIME_COMM);
|
||||
if (modify->n_pre_neighbor) modify->pre_neighbor();
|
||||
timer->stamp(Timer::COMM);
|
||||
if (modify->n_pre_neighbor) {
|
||||
modify->pre_neighbor();
|
||||
timer->stamp(Timer::MODIFY);
|
||||
}
|
||||
neighbor->build();
|
||||
timer->stamp(TIME_NEIGHBOR);
|
||||
timer->stamp(Timer::NEIGH);
|
||||
} else if (ilevel == 0) {
|
||||
timer->stamp();
|
||||
comm->forward_comm();
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
}
|
||||
|
||||
} else if (ilevel == 0) {
|
||||
timer->stamp();
|
||||
comm->forward_comm();
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
}
|
||||
|
||||
// rRESPA recursion thru all levels
|
||||
@ -648,60 +662,64 @@ void Respa::recurse(int ilevel)
|
||||
// when potentials are invoked at same level
|
||||
|
||||
force_clear(newton[ilevel]);
|
||||
if (modify->n_pre_force_respa)
|
||||
if (modify->n_pre_force_respa) {
|
||||
timer->stamp();
|
||||
modify->pre_force_respa(vflag,ilevel,iloop);
|
||||
timer->stamp(Timer::MODIFY);
|
||||
}
|
||||
|
||||
timer->stamp();
|
||||
if (nhybrid_styles > 0) {
|
||||
set_compute_flags(ilevel);
|
||||
force->pair->compute(eflag,vflag);
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
if (level_pair == ilevel && pair_compute_flag) {
|
||||
force->pair->compute(eflag,vflag);
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
if (level_inner == ilevel && pair_compute_flag) {
|
||||
force->pair->compute_inner();
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
if (level_middle == ilevel && pair_compute_flag) {
|
||||
force->pair->compute_middle();
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
if (level_outer == ilevel && pair_compute_flag) {
|
||||
force->pair->compute_outer(eflag,vflag);
|
||||
timer->stamp(TIME_PAIR);
|
||||
timer->stamp(Timer::PAIR);
|
||||
}
|
||||
if (level_bond == ilevel && force->bond) {
|
||||
force->bond->compute(eflag,vflag);
|
||||
timer->stamp(TIME_BOND);
|
||||
timer->stamp(Timer::BOND);
|
||||
}
|
||||
if (level_angle == ilevel && force->angle) {
|
||||
force->angle->compute(eflag,vflag);
|
||||
timer->stamp(TIME_BOND);
|
||||
timer->stamp(Timer::BOND);
|
||||
}
|
||||
if (level_dihedral == ilevel && force->dihedral) {
|
||||
force->dihedral->compute(eflag,vflag);
|
||||
timer->stamp(TIME_BOND);
|
||||
timer->stamp(Timer::BOND);
|
||||
}
|
||||
if (level_improper == ilevel && force->improper) {
|
||||
force->improper->compute(eflag,vflag);
|
||||
timer->stamp(TIME_BOND);
|
||||
timer->stamp(Timer::BOND);
|
||||
}
|
||||
if (level_kspace == ilevel && kspace_compute_flag) {
|
||||
force->kspace->compute(eflag,vflag);
|
||||
timer->stamp(TIME_KSPACE);
|
||||
timer->stamp(Timer::KSPACE);
|
||||
}
|
||||
|
||||
if (newton[ilevel]) {
|
||||
comm->reverse_comm();
|
||||
timer->stamp(TIME_COMM);
|
||||
timer->stamp(Timer::COMM);
|
||||
}
|
||||
|
||||
timer->stamp();
|
||||
if (modify->n_post_force_respa)
|
||||
modify->post_force_respa(vflag,ilevel,iloop);
|
||||
modify->final_integrate_respa(ilevel,iloop);
|
||||
timer->stamp(Timer::MODIFY);
|
||||
}
|
||||
|
||||
copy_f_flevel(ilevel);
|
||||
|
||||
Reference in New Issue
Block a user