Skip to content

Commit 7cd3bd6

Browse files
committed
No PCCompositeGetPC with a single Schur Pmat.
[ci skip]
1 parent c2ccfe9 commit 7cd3bd6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

plugin/mpi/PETSc.hpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,13 @@ void setVectorSchur(Type* ptA, KN<Tab>* const& mT, KN<double>* const& pL) {
180180
PCFieldSplitGetSubKSP(pc, &nsplits, &subksp);
181181
PC pcS;
182182
KSPGetPC(subksp[nsplits - 1], &pcS);
183-
PC subpc;
184-
PCCompositeGetPC(pcS, k, &subpc);
185-
PCSetOperators(subpc, S, S);
183+
if (mT->n > 1) {
184+
PC subpc;
185+
PCCompositeGetPC(pcS, k, &subpc);
186+
PCSetOperators(subpc, S, S);
187+
} else {
188+
PCSetOperators(pcS, S, S);
189+
}
186190
(*ptA->_vS)[k] = S;
187191
}
188192
}

0 commit comments

Comments
 (0)