correctly compute the size of the maxexchange buffer. we put all fixes into one buffer.

This commit is contained in:
Axel Kohlmeyer 2020-06-07 14:37:20 -04:00
parent db9543ede2
commit 5c1236084c
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 2 additions and 4 deletions

View File

@ -258,10 +258,8 @@ void Comm::init_exchange()
int onefix;
maxexchange_fix = 0;
for (int i = 0; i < nfix; i++) {
onefix = fix[i]->maxexchange;
maxexchange_fix = MAX(maxexchange_fix,onefix);
}
for (int i = 0; i < nfix; i++)
maxexchange_fix += fix[i]->maxexchange;
maxexchange = maxexchange_atom + maxexchange_fix;
bufextra = maxexchange + BUFEXTRA;