Merge pull request #813 from akohlmey/correct-neighbor-build

Make default argument for virtual method Neighbor::build() explicit
This commit is contained in:
Steve Plimpton 2018-02-22 08:48:06 -07:00 committed by GitHub
commit 77efd3dfb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 30 additions and 30 deletions

View File

@ -119,7 +119,7 @@ void VerletKokkos::setup(int flag)
atomKK->modified(Host,ALL_MASK);
neighbor->build();
neighbor->build(1);
neighbor->ncalls = 0;
// compute all forces
@ -222,7 +222,7 @@ void VerletKokkos::setup_minimal(int flag)
atomKK->modified(Host,ALL_MASK);
neighbor->build();
neighbor->build(1);
neighbor->ncalls = 0;
}
@ -378,7 +378,7 @@ void VerletKokkos::run(int n)
modify->pre_neighbor();
timer->stamp(Timer::MODIFY);
}
neighbor->build();
neighbor->build(1);
timer->stamp(Timer::NEIGH);
}

View File

@ -316,7 +316,7 @@ void FixAtomSwap::pre_exchange()
comm->borders();
if (domain->triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
if (modify->n_pre_neighbor) modify->pre_neighbor();
neighbor->build();
neighbor->build(1);
energy_stored = energy_full();
@ -366,7 +366,7 @@ int FixAtomSwap::attempt_semi_grand()
comm->borders();
if (domain->triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
if (modify->n_pre_neighbor) modify->pre_neighbor();
neighbor->build();
neighbor->build(1);
} else {
comm->forward_comm_fix(this);
}
@ -408,7 +408,7 @@ int FixAtomSwap::attempt_semi_grand()
comm->borders();
if (domain->triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
if (modify->n_pre_neighbor) modify->pre_neighbor();
neighbor->build();
neighbor->build(1);
} else {
comm->forward_comm_fix(this);
}
@ -447,7 +447,7 @@ int FixAtomSwap::attempt_swap()
comm->borders();
if (domain->triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
if (modify->n_pre_neighbor) modify->pre_neighbor();
neighbor->build();
neighbor->build(1);
} else {
comm->forward_comm_fix(this);
}
@ -489,7 +489,7 @@ int FixAtomSwap::attempt_swap()
comm->borders();
if (domain->triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
if (modify->n_pre_neighbor) modify->pre_neighbor();
neighbor->build();
neighbor->build(1);
} else {
comm->forward_comm_fix(this);
}

View File

@ -2250,7 +2250,7 @@ double FixGCMC::energy_full()
comm->borders();
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
if (modify->n_pre_neighbor) modify->pre_neighbor();
neighbor->build();
neighbor->build(1);
int eflag = 1;
int vflag = 0;

View File

@ -344,7 +344,7 @@ void VerletSplit::run(int n)
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
timer->stamp(Timer::COMM);
if (n_pre_neighbor) modify->pre_neighbor();
neighbor->build();
neighbor->build(1);
timer->stamp(Timer::NEIGH);
}
}

View File

@ -142,7 +142,7 @@ void VerletLRTIntel::setup(int flag)
domain->image_check();
domain->box_too_small_check();
modify->setup_pre_neighbor();
neighbor->build();
neighbor->build(1);
neighbor->ncalls = 0;
// compute all forces
@ -276,7 +276,7 @@ void VerletLRTIntel::run(int n)
modify->pre_neighbor();
timer->stamp(Timer::MODIFY);
}
neighbor->build();
neighbor->build(1);
timer->stamp(Timer::NEIGH);
}

View File

@ -304,7 +304,7 @@ void FixSRP::setup_pre_force(int zz)
domain->image_check();
domain->box_too_small_check();
modify->setup_pre_neighbor();
neighbor->build();
neighbor->build(1);
neighbor->ncalls = 0;
// new atom counts

View File

@ -109,7 +109,7 @@ void RespaOMP::setup(int flag)
domain->image_check();
domain->box_too_small_check();
modify->setup_pre_neighbor();
neighbor->build();
neighbor->build(1);
modify->setup_post_neighbor();
neighbor->ncalls = 0;
@ -202,7 +202,7 @@ void RespaOMP::setup_minimal(int flag)
domain->image_check();
domain->box_too_small_check();
modify->setup_pre_neighbor();
neighbor->build();
neighbor->build(1);
modify->setup_post_neighbor();
neighbor->ncalls = 0;
}
@ -313,7 +313,7 @@ void RespaOMP::recurse(int ilevel)
modify->pre_neighbor();
timer->stamp(Timer::MODIFY);
}
neighbor->build();
neighbor->build(1);
timer->stamp(Timer::NEIGH);
if (modify->n_post_neighbor) {
modify->post_neighbor();

View File

@ -734,7 +734,7 @@ void FixNHUef::end_of_step()
comm->borders();
domain->lamda2x(atom->nlocal+atom->nghost);
timer->stamp(Timer::COMM);
neighbor->build();
neighbor->build(1);
timer->stamp(Timer::NEIGH);
}
}
@ -754,7 +754,7 @@ void FixNHUef::post_run()
comm->borders();
domain->lamda2x(atom->nlocal+atom->nghost);
timer->stamp(Timer::COMM);
neighbor->build();
neighbor->build(1);
timer->stamp(Timer::NEIGH);
}

View File

@ -209,7 +209,7 @@ void CreateBonds::many()
comm->exchange();
comm->borders();
if (domain->triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
neighbor->build();
neighbor->build(1);
// build neighbor list this command needs based on earlier request

View File

@ -311,7 +311,7 @@ void DeleteAtoms::delete_overlap(int narg, char **arg)
comm->exchange();
comm->borders();
if (domain->triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
neighbor->build();
neighbor->build(1);
// build neighbor list this command needs based on earlier request

View File

@ -245,7 +245,7 @@ void Min::setup(int flag)
domain->image_check();
domain->box_too_small_check();
modify->setup_pre_neighbor();
neighbor->build();
neighbor->build(1);
modify->setup_post_neighbor();
neighbor->ncalls = 0;
@ -345,7 +345,7 @@ void Min::setup_minimal(int flag)
domain->image_check();
domain->box_too_small_check();
modify->setup_pre_neighbor();
neighbor->build();
neighbor->build(1);
modify->setup_post_neighbor();
neighbor->ncalls = 0;
}
@ -508,7 +508,7 @@ double Min::energy_force(int resetflag)
modify->min_pre_neighbor();
timer->stamp(Timer::MODIFY);
}
neighbor->build();
neighbor->build(1);
timer->stamp(Timer::NEIGH);
if (modify->n_min_post_neighbor) {
modify->min_post_neighbor();

View File

@ -111,7 +111,7 @@ class Neighbor : protected Pointers {
int decide(); // decide whether to build or not
virtual int check_distance(); // check max distance moved since last build
void setup_bins(); // setup bins based on box and cutoff
virtual void build(int topoflag=1); // build all perpetual neighbor lists
virtual void build(int); // build all perpetual neighbor lists
virtual void build_topology(); // pairwise topology neighbor lists
void build_one(class NeighList *list, int preflag=0);
// create a one-time pairwise neigh list

View File

@ -441,7 +441,7 @@ void Respa::setup(int flag)
domain->image_check();
domain->box_too_small_check();
modify->setup_pre_neighbor();
neighbor->build();
neighbor->build(1);
modify->setup_post_neighbor();
neighbor->ncalls = 0;
@ -517,7 +517,7 @@ void Respa::setup_minimal(int flag)
domain->image_check();
domain->box_too_small_check();
modify->setup_pre_neighbor();
neighbor->build();
neighbor->build(1);
modify->setup_post_neighbor();
neighbor->ncalls = 0;
}
@ -668,7 +668,7 @@ void Respa::recurse(int ilevel)
modify->pre_neighbor();
timer->stamp(Timer::MODIFY);
}
neighbor->build();
neighbor->build(1);
timer->stamp(Timer::NEIGH);
if (modify->n_post_neighbor) {
modify->post_neighbor();

View File

@ -120,7 +120,7 @@ void Verlet::setup(int flag)
domain->image_check();
domain->box_too_small_check();
modify->setup_pre_neighbor();
neighbor->build();
neighbor->build(1);
modify->setup_post_neighbor();
neighbor->ncalls = 0;
@ -182,7 +182,7 @@ void Verlet::setup_minimal(int flag)
domain->image_check();
domain->box_too_small_check();
modify->setup_pre_neighbor();
neighbor->build();
neighbor->build(1);
modify->setup_post_neighbor();
neighbor->ncalls = 0;
}
@ -284,7 +284,7 @@ void Verlet::run(int n)
modify->pre_neighbor();
timer->stamp(Timer::MODIFY);
}
neighbor->build();
neighbor->build(1);
timer->stamp(Timer::NEIGH);
if (n_post_neighbor) {
modify->post_neighbor();