For a unit test, I'm trying to make sure that a PETSc vector has been destroy. However, I can't seem to find an adequate command that does this gracefully. The best I've been able to do is call VecSetType(...) and look at the error. However, this write PETSC_ERROR output, that I do not want to be written, particularly since I'm expecting an error. Any thoughts or suggestions?
Thanks.