[petsc-users] C++ wrapper for petsc vector
Martin Vymazal
martin.vymazal at vki.ac.be
Tue Aug 4 12:15:24 CDT 2015
Hello,
I'm trying to create a small C++ class to wrap the 'Vec' object. This class
has an internal pointer to a member variable of type Vec, and in its
destructor, it calls VecDestroy. Unfortunately, my test program segfaults and
this seems to be due to the fact that the destructor of the wrapper class is
called after main() calls PetscFinalize(). Apparently VecDestroy performs some
collective communication, so calling it after PetscFinalize() is too late. How
can I fix this?
Thank you,
Martin Vymazal
More information about the petsc-users
mailing list