<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jun 8, 2015 at 4:31 AM, Lawrence Mitchell <span dir="ltr"><<a href="mailto:lawrence.mitchell@imperial.ac.uk" target="_blank">lawrence.mitchell@imperial.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
Hi all,<br>
<br>
I have a multi-field system where the splits are defined by a DM. I<br>
can use a fieldsplit PC on its own with no trouble, but cannot do so<br>
inside a composite PC. My matrices do not have a blocksize set<br>
(because the data layout doesn't match) and hence the automagic case<br>
(when the pc doesn't have a DM) fails.<br>
<br>
It looks like this is just a case of the outer DM not being<br>
transferred into the sub PCs. Is there a good reason for this, or is<br>
it just an oversight? If I apply the following patch then things<br>
appear to work<br></blockquote><div><br></div><div>This looks like an oversight to me. I can integrate it.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cheers,<br>
<br>
Lawrence<br>
<br>
<br>
diff --git a/src/ksp/pc/impls/composite/composite.c<br>
b/src/ksp/pc/impls/composite/composite.c<br>
index 016d195..bf158cc 100644<br>
- --- a/src/ksp/pc/impls/composite/composite.c<br>
+++ b/src/ksp/pc/impls/composite/composite.c<br>
@@ -170,2 +170,3 @@ static PetscErrorCode PCSetUp_Composite(PC pc)<br>
PC_CompositeLink next = jac->head;<br>
+ DM dm;<br>
<br>
@@ -175,4 +176,6 @@ static PetscErrorCode PCSetUp_Composite(PC pc)<br>
}<br>
+ ierr = PCGetDM(pc,&dm);CHKERRQ(ierr);<br>
while (next) {<br>
ierr = PCSetOperators(next->pc,pc->mat,pc->pmat);CHKERRQ(ierr);<br>
+ ierr = PCSetDM(next->pc,dm);CHKERRQ(ierr);<br>
next = next->next;<br>
<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1<br>
<br>
iQEcBAEBAgAGBQJVdWDUAAoJECOc1kQ8PEYvqdEIAOk3UpOyJaXszcLXEfEc4Cf0<br>
/JAbnCahZ9l4IGe8d9Iinvf+8yKu2DAIbdeBPg20CexYGoqpbMa1ljGk+rz5oc/h<br>
yBGzNjd6Vp+0uAqn2dhLAm7R17A3yKOMk+WdS5sVSWmGBUUHK7y/pkssEjM0PN4b<br>
pKIGcYIHAADY7494AIaKGAjJHzBcbGFVaBpeeiGU64FhrV4dlq78jP63GRDrLFvK<br>
22PzzT2NF1JyYumLTaPEHecpbm9ykhCnU+TSfTRC66WZCIjUfuuSarH4Z/HOuVbv<br>
GjpelCT4JdoDV6w8bwo3t40BnlEi7RsAyk8q+sIyw0D6l1qnGIWZuyxsPWRTzxM=<br>
=jK7M<br>
-----END PGP SIGNATURE-----<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>