Commit 5e4024cc authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#859 Add a convenient development function to show the numbering subsets of matrices and vectors.

parent 5344eafe
......@@ -113,6 +113,16 @@ namespace HappyHeart
assert(matrix1.GetRowNumberingSubset() == matrix2.GetRowNumberingSubset());
assert(matrix1.GetColNumberingSubset() == matrix2.GetColNumberingSubset());
}
void PrintNumberingSubset(std::string&& matrix_name,
const GlobalMatrix& matrix)
{
std::cout << "Numbering subsets for matrix '" << matrix_name << "': row -> "
<< matrix.GetRowNumberingSubset().GetUniqueId() << " and col -> "
<< matrix.GetColNumberingSubset().GetUniqueId() << std::endl;
}
#endif // NDEBUG
......
......@@ -143,6 +143,16 @@ namespace HappyHeart
const GlobalMatrix& matrix2);
/*!
* \brief Debug tool to print the unique ids of row and column \a NumberingSubset.
*
* \param[in] matrix_name Tag to identify the matrix which \a NumberingSubset informations will be written.
* \param[in] matrix Matrix under investigation.
*/
void PrintNumberingSubset(std::string&& matrix_name,
const GlobalMatrix& matrix);
# endif // NDEBUG
......
......@@ -37,6 +37,16 @@ namespace HappyHeart
Swap(static_cast<parent&>(A), static_cast<parent&>(B));
}
#ifndef NDEBUG
void PrintNumberingSubset(std::string&& vector_name,
const GlobalVector& vector)
{
std::cout << "Numbering subsets for vector '" << vector_name << "': "
<< vector.GetNumberingSubset().GetUniqueId() << std::endl;
}
#endif // NDEBUG
} // namespace HappyHeart
......@@ -102,6 +102,20 @@ namespace HappyHeart
};
# ifndef NDEBUG
/*!
* \brief Debug tool to print the unique id of \a NumberingSubset.
*
* \param[in] vector_name Tag to identify the vector which \a NumberingSubset information will be written.
* \param[in] vector Vector under investigation.
*/
void PrintNumberingSubset(std::string&& vector_name,
const GlobalVector& vector);
# endif // NDEBUG
/*!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment