| 423 | |
| 424 | template <typename SCAL> |
| 425 | void S_ParallelBaseVectorPtr<SCAL> :: Distribute() const |
| 426 | { |
| 427 | if (status != CUMULATED) return; |
| 428 | this->SetStatus(DISTRIBUTED); |
| 429 | |
| 430 | auto rank = paralleldofs->GetCommunicator().Rank(); |
| 431 | |
| 432 | if (paralleldofs->GetEntrySize() == 1) { |
| 433 | // this is a bit faster for BS = 1 |
| 434 | auto fv = this->template FV<SCAL>(); |
| 435 | for (auto p : paralleldofs->GetDistantProcs()) |
| 436 | if (p < rank) |
| 437 | for (auto dof : paralleldofs->GetExchangeDofs(p)) |
| 438 | fv[dof] = 0; |
| 439 | } |
| 440 | else { |
| 441 | for (auto p : paralleldofs->GetDistantProcs()) |
| 442 | if (p < rank) |
| 443 | for (auto dof : paralleldofs->GetExchangeDofs(p)) |
| 444 | (*this)(dof) = 0; |
| 445 | } |
| 446 | |
| 447 | } |
| 448 | |
| 449 | |
| 450 | template < class SCAL > |
nothing calls this directly
no test coverage detected