Skip to content

Commit

Permalink
reflecting the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer2368 committed Sep 6, 2024
1 parent a5ff7ee commit e81147e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/linalg/Vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,10 +585,11 @@ double Vector::localMin(int nmax)
}

void
Vector::distribute(const int &local_dim)
Vector::distribute(const int local_dim)
{
CAROM_VERIFY(!distributed());
CAROM_VERIFY(d_owns_data);
CAROM_VERIFY(local_dim > 0);

std::vector<int> row_offsets;
int global_dim = get_global_offsets(local_dim, row_offsets,
Expand Down
4 changes: 3 additions & 1 deletion lib/linalg/Vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -768,12 +768,14 @@ class Vector
* @pre d_owns_data
*
* @param[in] local_dim dimension for local MPI rank.
* Its sum over all processes should be the same as the current dimension.
*/
void distribute(const int &local_dim);
void distribute(const int local_dim);

/**
* @brief Gather all the distributed elements among MPI processes.
* This becomes not distributed after this function is executed.
* The data is identical on all processes after the operation.
*
* @pre distributed()
* @pre d_owns_data
Expand Down

0 comments on commit e81147e

Please sign in to comment.