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() ...@@ -29,6 +29,7 @@ void linearSystemPETScBlockDouble::_kspCreate()
linearSystemPETScBlockDouble::~linearSystemPETScBlockDouble() linearSystemPETScBlockDouble::~linearSystemPETScBlockDouble()
{ {
#if (PETSC_VERSION_RELEASE == 0 || ((PETSC_VERSION_MAJOR == 3) && (PETSC_VERSION_MINOR >= 2)))
if (_isAllocated) { if (_isAllocated) {
MatDestroy(&_a); MatDestroy(&_a);
VecDestroy(&_b); VecDestroy(&_b);
...@@ -37,6 +38,16 @@ linearSystemPETScBlockDouble::~linearSystemPETScBlockDouble() ...@@ -37,6 +38,16 @@ linearSystemPETScBlockDouble::~linearSystemPETScBlockDouble()
if (_kspAllocated) { if (_kspAllocated) {
KSPDestroy(&_ksp); KSPDestroy(&_ksp);
} }
#else
if (_isAllocated) {
MatDestroy(_a);
VecDestroy(_b);
VecDestroy(_x);
}
if (_kspAllocated) {
KSPDestroy(_ksp);
}
#endif
} }
void linearSystemPETScBlockDouble::addToMatrix(int row, int col, void linearSystemPETScBlockDouble::addToMatrix(int row, int col,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment