Commits

Peter Brune committed dd515a9

Move setting the subsnes dm in SNESComposite to SNESSetUp for grid sequencing.

Comments (0)

Files changed (1)

src/snes/impls/composite/snescomposite.c

 static PetscErrorCode SNESSetUp_Composite(SNES snes)
 {
   PetscErrorCode     ierr;
+  DM                 dm;
   SNES_Composite     *jac = (SNES_Composite*)snes->data;
   SNES_CompositeLink next = jac->head;
   PetscInt           n=0,i;
   Vec                F;
 
   PetscFunctionBegin;
+  ierr = SNESGetDM(snes,&dm);CHKERRQ(ierr);
   while (next) {
     n++;
+    ierr = SNESSetDM(next->snes,dm);CHKERRQ(ierr);
     ierr = SNESSetFromOptions(next->snes);CHKERRQ(ierr);
     next = next->next;
   }