new accessor APIs for fixes and computes in Modify plus a few applications

This commit is contained in:
Axel Kohlmeyer
2021-08-08 17:25:06 -04:00
parent ef04f6ca69
commit 5b40e4cb38
20 changed files with 397 additions and 388 deletions

View File

@ -364,14 +364,13 @@ void Finish::end(int flag)
}
#ifdef LMP_OPENMP
int ifix = modify->find_fix("package_omp");
FixOMP *fixomp = (FixOMP *) modify->get_fix_by_id("package_omp");
// print thread breakdown only with full timer detail
if ((ifix >= 0) && timer->has_full() && me == 0) {
if (fixomp && timer->has_full() && me == 0) {
double thr_total = 0.0;
ThrData *td;
FixOMP *fixomp = static_cast<FixOMP *>(lmp->modify->fix[ifix]);
for (i=0; i < nthreads; ++i) {
td = fixomp->get_thr(i);
thr_total += td->get_time(Timer::ALL);