Commit fd126f1f authored by DIAZ Jerome's avatar DIAZ Jerome Committed by GILLES Sebastien
Browse files

#1489 Added an assert for the in place DoReuseMatrix policy of the MatTranspose PETSc wrapper.

parent ba8dc41b
......@@ -275,6 +275,9 @@ namespace MoReFEM
case DoReuseMatrix::in_place:
{
result = matrix1.Internal();
assert(matrix1.Internal() == matrix2.Internal() && "For in place transpose both arguments"
"are expected to be pointers to the"
"same PETSc matrix object.");
error_code = ::MatTranspose(matrix1.Internal(), MAT_INPLACE_MATRIX, &result);
break;
}
......
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