Skip to content
Snippets Groups Projects
Commit 6fe821c3 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix compile

parent ffa57381
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,7 @@ void linearSystemPETScBlockDouble::_kspCreate()
linearSystemPETScBlockDouble::~linearSystemPETScBlockDouble()
{
#if (PETSC_VERSION_RELEASE == 0 || ((PETSC_VERSION_MAJOR == 3) && (PETSC_VERSION_MINOR >= 2)))
if (_isAllocated) {
MatDestroy(&_a);
VecDestroy(&_b);
......@@ -37,6 +38,16 @@ linearSystemPETScBlockDouble::~linearSystemPETScBlockDouble()
if (_kspAllocated) {
KSPDestroy(&_ksp);
}
#else
if (_isAllocated) {
MatDestroy(_a);
VecDestroy(_b);
VecDestroy(_x);
}
if (_kspAllocated) {
KSPDestroy(_ksp);
}
#endif
}
void linearSystemPETScBlockDouble::addToMatrix(int row, int col,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment