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
......@@ -201,11 +201,11 @@ namespace MoReFEM::TestNS::PetscNS::MatrixOperationsNS
Wrappers::Petsc::DoReuseMatrix::no);
Wrappers::Petsc::MatMatMatMult(matrix_init_1,
matrix_init_2,
matrix_init_3,
matrix_10,
__FILE__, __LINE__,
Wrappers::Petsc::DoReuseMatrix::yes);
matrix_init_2,
matrix_init_3,
matrix_10,
__FILE__, __LINE__,
Wrappers::Petsc::DoReuseMatrix::yes);
}
{
IS rperm;
......
......@@ -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