Commit eb7dd2a3 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

petsc version error corrected

parent 15b3b819
...@@ -1826,7 +1826,11 @@ namespace AMDiS { namespace Parallel { ...@@ -1826,7 +1826,11 @@ namespace AMDiS { namespace Parallel {
&matNullSpace); &matNullSpace);
MatSetNullSpace(mat_feti, matNullSpace); MatSetNullSpace(mat_feti, matNullSpace);
Mat amat, pmat; Mat amat, pmat;
#if (PETSC_VERSION_MINOR >= 5)
KSPGetOperators(ksp_feti, &amat, &pmat); KSPGetOperators(ksp_feti, &amat, &pmat);
#else
KSPGetOperators(ksp_feti, &amat, &pmat, PETSC_NULL);
#endif
MatSetNullSpace(amat, matNullSpace); MatSetNullSpace(amat, matNullSpace);
MatNullSpaceDestroy(&matNullSpace); MatNullSpaceDestroy(&matNullSpace);
......
...@@ -953,7 +953,11 @@ namespace AMDiS { namespace Parallel { ...@@ -953,7 +953,11 @@ namespace AMDiS { namespace Parallel {
MatNullSpaceCreate(domainComm, PETSC_FALSE, 1, &nullSpaceBasis, &matNullSpace); MatNullSpaceCreate(domainComm, PETSC_FALSE, 1, &nullSpaceBasis, &matNullSpace);
Mat amat, pmat; Mat amat, pmat;
#if (PETSC_VERSION_MINOR >= 5)
KSPGetOperators(ksp, &amat, &pmat); KSPGetOperators(ksp, &amat, &pmat);
#else
KSPGetOperators(ksp, &amat, &pmat, PETSC_NULL);
#endif
MatSetNullSpace(amat, matNullSpace); MatSetNullSpace(amat, matNullSpace);
MatNullSpaceDestroy(&matNullSpace); MatNullSpaceDestroy(&matNullSpace);
...@@ -966,7 +970,11 @@ namespace AMDiS { namespace Parallel { ...@@ -966,7 +970,11 @@ namespace AMDiS { namespace Parallel {
MatNullSpace matNullSpace; MatNullSpace matNullSpace;
MatNullSpaceCreate(domainComm, PETSC_TRUE, 0, PETSC_NULL, &matNullSpace); MatNullSpaceCreate(domainComm, PETSC_TRUE, 0, PETSC_NULL, &matNullSpace);
Mat amat, pmat; Mat amat, pmat;
#if (PETSC_VERSION_MINOR >= 5)
KSPGetOperators(ksp, &amat, &pmat); KSPGetOperators(ksp, &amat, &pmat);
#else
KSPGetOperators(ksp, &amat, &pmat, PETSC_NULL);
#endif
MatSetNullSpace(amat, matNullSpace); MatSetNullSpace(amat, matNullSpace);
MatNullSpaceDestroy(&matNullSpace); MatNullSpaceDestroy(&matNullSpace);
} }
......
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