Skip to content
Snippets Groups Projects
Commit 4d65a671 authored by Rene Halver's avatar Rene Halver
Browse files

fixed bug with automated selection of gamma for tensor-based and staggered grid method

parent f363c225
No related branches found
No related tags found
No related merge requests found
Pipeline #55011 passed
...@@ -266,7 +266,7 @@ template <class T, class W> void Staggered_LB<T, W>::balance(int) { ...@@ -266,7 +266,7 @@ template <class T, class W> void Staggered_LB<T, W>::balance(int) {
// automatic selection of gamma to guarantee stability of method (choice of // automatic selection of gamma to guarantee stability of method (choice of
// user gamma ignored) // user gamma ignored)
this->gamma = this->gamma =
std::max(4.1, 1.1 * (1.0 + std::max(local_size, remote_size) / std::max(4.1, 2.0 * (1.0 + std::max(local_size, remote_size) /
std::min(local_size, remote_size))); std::min(local_size, remote_size)));
#ifdef ALL_DEBUG_ENABLED #ifdef ALL_DEBUG_ENABLED
......
...@@ -216,6 +216,12 @@ template <class T, class W> void Tensor_LB<T, W>::balance(int) { ...@@ -216,6 +216,12 @@ template <class T, class W> void Tensor_LB<T, W>::balance(int) {
MPI_Wait(&sreq, &sstat); MPI_Wait(&sreq, &sstat);
MPI_Wait(&rreq, &rstat); MPI_Wait(&rreq, &rstat);
// automatic selection of gamma to guarantee stability of method (choice of
// user gamma ignored)
this->gamma =
std::max(4.1, 2.0 * (1.0 + std::max(local_size, remote_size) /
std::min(local_size, remote_size)));
T shift = Functions::borderShift1d( T shift = Functions::borderShift1d(
rank_right, this->local_coords.at(i), this->global_dims.at(i), rank_right, this->local_coords.at(i), this->global_dims.at(i),
work_local_plane, remote_work, local_size, remote_size, this->gamma, work_local_plane, remote_work, local_size, remote_size, this->gamma,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment