Skip to content
Snippets Groups Projects
Commit 20c1e7f3 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Change to new petsc-dev with new signature of all ...Destroy functions.

parent a63a7f20
No related branches found
No related tags found
No related merge requests found
......@@ -550,11 +550,11 @@ namespace AMDiS {
petscSchurPrimalData.mat_b_primal = PETSC_NULL;
petscSchurPrimalData.ksp_b = PETSC_NULL;
VecDestroy(petscSchurPrimalData.tmp_vec_b);
VecDestroy(petscSchurPrimalData.tmp_vec_primal);
VecDestroy(&petscSchurPrimalData.tmp_vec_b);
VecDestroy(&petscSchurPrimalData.tmp_vec_primal);
MatDestroy(mat_schur_primal);
KSPDestroy(ksp_schur_primal);
MatDestroy(&mat_schur_primal);
KSPDestroy(&ksp_schur_primal);
}
......@@ -636,17 +636,17 @@ namespace AMDiS {
petscFetiData.ksp_b = PETSC_NULL;
petscFetiData.ksp_schur_primal = PETSC_NULL;
VecDestroy(petscFetiData.tmp_vec_b);
VecDestroy(petscFetiData.tmp_vec_primal);
VecDestroy(petscFetiData.tmp_vec_lagrange);
VecDestroy(&petscFetiData.tmp_vec_b);
VecDestroy(&petscFetiData.tmp_vec_primal);
VecDestroy(&petscFetiData.tmp_vec_lagrange);
MatDestroy(mat_feti);
KSPDestroy(ksp_feti);
MatDestroy(&mat_feti);
KSPDestroy(&ksp_feti);
// === Destroy FETI-DP Dirichlet preconditioner object. ===
KSPDestroy(ksp_interior);
KSPDestroy(&ksp_interior);
petscFetiPreconData.mat_lagrange_scaled = NULL;
petscFetiPreconData.mat_interior_interior = NULL;
......@@ -655,11 +655,11 @@ namespace AMDiS {
petscFetiPreconData.mat_bound_interior = NULL;
petscFetiPreconData.ksp_interior = NULL;
VecDestroy(petscFetiPreconData.tmp_vec_b);
VecDestroy(petscFetiPreconData.tmp_vec_bound0);
VecDestroy(petscFetiPreconData.tmp_vec_bound1);
VecDestroy(petscFetiPreconData.tmp_vec_interior);
MatDestroy(mat_lagrange_scaled);
VecDestroy(&petscFetiPreconData.tmp_vec_b);
VecDestroy(&petscFetiPreconData.tmp_vec_bound0);
VecDestroy(&petscFetiPreconData.tmp_vec_bound1);
VecDestroy(&petscFetiPreconData.tmp_vec_interior);
MatDestroy(&mat_lagrange_scaled);
}
......@@ -716,9 +716,9 @@ namespace AMDiS {
VecScatterEnd(primalScatter, vec_sol_primal, local_sol_primal,
INSERT_VALUES, SCATTER_FORWARD);
ISDestroy(globalIs);
ISDestroy(localIs);
VecScatterDestroy(primalScatter);
ISDestroy(&globalIs);
ISDestroy(&localIs);
VecScatterDestroy(&primalScatter);
PetscScalar *localSolPrimal;
VecGetArray(local_sol_primal, &localSolPrimal);
......@@ -747,7 +747,7 @@ namespace AMDiS {
VecRestoreArray(vec_sol_b, &localSolB);
VecRestoreArray(local_sol_primal, &localSolPrimal);
VecDestroy(local_sol_primal);
VecDestroy(&local_sol_primal);
}
......@@ -1213,12 +1213,12 @@ namespace AMDiS {
recoverSolution(u_b, u_primal, vec);
VecDestroy(u_b);
VecDestroy(u_primal);
VecDestroy(b);
VecDestroy(f);
VecDestroy(&u_b);
VecDestroy(&u_primal);
VecDestroy(&b);
VecDestroy(&f);
KSPDestroy(ksp);
KSPDestroy(&ksp);
}
......@@ -1311,24 +1311,24 @@ namespace AMDiS {
// === Destroy all data structures. ===
VecDestroy(vec_rhs);
VecDestroy(tmp_b0);
VecDestroy(tmp_b1);
VecDestroy(tmp_lagrange0);
VecDestroy(tmp_primal0);
VecDestroy(tmp_primal1);
VecDestroy(&vec_rhs);
VecDestroy(&tmp_b0);
VecDestroy(&tmp_b1);
VecDestroy(&tmp_lagrange0);
VecDestroy(&tmp_primal0);
VecDestroy(&tmp_primal1);
KSPDestroy(ksp_b);
KSPDestroy(&ksp_b);
MatDestroy(mat_b_b);
MatDestroy(mat_primal_primal);
MatDestroy(mat_b_primal);
MatDestroy(mat_primal_b);
MatDestroy(mat_lagrange);
MatDestroy(&mat_b_b);
MatDestroy(&mat_primal_primal);
MatDestroy(&mat_b_primal);
MatDestroy(&mat_primal_b);
MatDestroy(&mat_lagrange);
VecDestroy(f_b);
VecDestroy(f_primal);
VecDestroy(&f_b);
VecDestroy(&f_primal);
destroySchurPrimalKsp();
......@@ -1337,10 +1337,10 @@ namespace AMDiS {
// === Destroy preconditioner data structures. ===
MatDestroy(mat_interior_interior);
MatDestroy(mat_bound_bound);
MatDestroy(mat_interior_bound);
MatDestroy(mat_bound_interior);
MatDestroy(&mat_interior_interior);
MatDestroy(&mat_bound_bound);
MatDestroy(&mat_interior_bound);
MatDestroy(&mat_bound_interior);
}
......
......@@ -179,11 +179,19 @@ namespace AMDiS {
// === Destroy PETSc's variables. ===
#ifdef HAVE_PETSC_DEV
MatDestroy(&petscMatrix);
VecDestroy(&petscRhsVec);
VecDestroy(&petscSolVec);
VecDestroy(&petscTmpVec);
KSPDestroy(&solver);
#else
MatDestroy(petscMatrix);
VecDestroy(petscRhsVec);
VecDestroy(petscSolVec);
VecDestroy(petscTmpVec);
KSPDestroy(solver);
#endif
}
......
......@@ -327,17 +327,17 @@ namespace AMDiS {
// === Destroy PETSC's variables. ===
VecDestroy(petscRhsVec);
VecDestroy(petscSolVec);
VecDestroy(petscTmpVec);
VecDestroy(&petscRhsVec);
VecDestroy(&petscSolVec);
VecDestroy(&petscTmpVec);
MatDestroy(matA11);
MatDestroy(matA12);
MatDestroy(matA21);
MatDestroy(matA22);
MatDestroy(petscMatrix);
MatDestroy(&matA11);
MatDestroy(&matA12);
MatDestroy(&matA21);
MatDestroy(&matA22);
MatDestroy(&petscMatrix);
KSPDestroy(solver);
KSPDestroy(&solver);
}
......
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