[petsc-dev] FieldSplit fixes in 3.3

2012-08-21 Thread Dmitry Karpeev
introduced are not >>> necessary because the KSP's tab level was incremented before getting the >>> PC. >>> >> Where? >> > >ierr = > KSPCreate(((PetscObject)pc)->comm,&jac->kspschur);CHKERRQ(ierr); >ierr = > PetscLogObjectParent((PetscObject)pc,(PetscObject)jac->kspschur);CHKERRQ(ierr); >ierr = > PetscObjectIncrementTabLevel((PetscObject)jac->kspschur,(PetscObject)pc,1);CHKERRQ(ierr); > + { > +PC pcschur; > +ierr = KSPGetPC(jac->kspschur, &pcschur); CHKERRQ(ierr); > +ierr = > PetscObjectIncrementTabLevel((PetscObject)pcschur,(PetscObject)pc,1);CHKERRQ(ierr); > + } > > >ierr = > KSPCreate(((PetscObject)pc)->comm,&ilink->ksp);CHKERRQ(ierr); >ierr = > PetscObjectIncrementTabLevel((PetscObject)ilink->ksp,(PetscObject)pc,1);CHKERRQ(ierr); > + { > +PC ilinkpc; > +ierr = KSPGetPC(ilink->ksp, &ilinkpc); CHKERRQ(ierr); > +ierr = > PetscObjectIncrementTabLevel((PetscObject)ilinkpc,(PetscObject)pc,1);CHKERRQ(ierr); > + } > > > This is the pattern used everywhere else in PETSc so that sub-pcs always > have the correct tab level. > -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120821/9ca22aad/attachment.html>

[petsc-dev] Fwd: Changes in PETSc

2012-08-21 Thread Matthew Knepley
- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120821/7850c7b3/attachment.html>

[petsc-dev] Fwd: Changes in PETSc

2012-08-21 Thread Jed Brown
t experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120821/6eeb7b74/attachment-0001.html>

[petsc-dev] FieldSplit fixes in 3.3

2012-08-21 Thread Hong Zhang
;> in order for recursive splitting to work. Should we declare that >>>>> capability unavailable for 3.3? I can eliminate the unneeded KSPSetUp() >>>>> calls. >>>>> >>>> >>>> 1. I hate those hacky dm reference-non-references. >>>> >>>> 2. I don't want unused KSPs to be set up. (We should eventually fix the >>>> model so they don't exist...) >>>> >>>> 3. Two of the three IncrementTabLevels that you introduced are not >>>> necessary because the KSP's tab level was incremented before getting the >>>> PC. >>>> >>> Where? >>> >> >>ierr = >> KSPCreate(((PetscObject)pc)->comm,&jac->kspschur);CHKERRQ(ierr); >>ierr = >> PetscLogObjectParent((PetscObject)pc,(PetscObject)jac->kspschur);CHKERRQ(ierr); >>ierr = >> PetscObjectIncrementTabLevel((PetscObject)jac->kspschur,(PetscObject)pc,1);CHKERRQ(ierr); >> + { >> +PC pcschur; >> +ierr = KSPGetPC(jac->kspschur, &pcschur); >> CHKERRQ(ierr); >> +ierr = >> PetscObjectIncrementTabLevel((PetscObject)pcschur,(PetscObject)pc,1);CHKERRQ(ierr); >> + } >> >> >>ierr = >> KSPCreate(((PetscObject)pc)->comm,&ilink->ksp);CHKERRQ(ierr); >>ierr = >> PetscObjectIncrementTabLevel((PetscObject)ilink->ksp,(PetscObject)pc,1);CHKERRQ(ierr); >> + { >> +PC ilinkpc; >> +ierr = KSPGetPC(ilink->ksp, &ilinkpc); CHKERRQ(ierr); >> +ierr = >> PetscObjectIncrementTabLevel((PetscObject)ilinkpc,(PetscObject)pc,1);CHKERRQ(ierr); >> + } >> >> >> This is the pattern used everywhere else in PETSc so that sub-pcs always >> have the correct tab level. >> > > -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120821/385a7b46/attachment.html>

[petsc-dev] FieldSplit fixes in 3.3

2012-08-21 Thread Jed Brown
ing. I think it's a potentially big >>>>>>> behavior change for 3.3. >>>>>>> >>>>>> Which pieces of the first patch do you think are too big for 3.3? >>>>>> The splits' and Schur KSPs have to be set up (maybe not all in every >>>>>> situation) in order for recursive splitting to work. Should we declare >>>>>> that capability unavailable for 3.3? I can eliminate the unneeded >>>>>> KSPSetUp() calls. >>>>>> >>>>> >>>>> 1. I hate those hacky dm reference-non-references. >>>>> >>>>> 2. I don't want unused KSPs to be set up. (We should eventually fix >>>>> the model so they don't exist...) >>>>> >>>>> 3. Two of the three IncrementTabLevels that you introduced are not >>>>> necessary because the KSP's tab level was incremented before getting the >>>>> PC. >>>>> >>>> Where? >>>> >>> >>>ierr = >>> KSPCreate(((PetscObject)pc)->comm,&jac->kspschur);CHKERRQ(ierr); >>>ierr = >>> PetscLogObjectParent((PetscObject)pc,(PetscObject)jac->kspschur);CHKERRQ(ierr); >>>ierr = >>> PetscObjectIncrementTabLevel((PetscObject)jac->kspschur,(PetscObject)pc,1);CHKERRQ(ierr); >>> + { >>> +PC pcschur; >>> +ierr = KSPGetPC(jac->kspschur, &pcschur); >>> CHKERRQ(ierr); >>> +ierr = >>> PetscObjectIncrementTabLevel((PetscObject)pcschur,(PetscObject)pc,1);CHKERRQ(ierr); >>> + } >>> >>> >>>ierr = >>> KSPCreate(((PetscObject)pc)->comm,&ilink->ksp);CHKERRQ(ierr); >>>ierr = >>> PetscObjectIncrementTabLevel((PetscObject)ilink->ksp,(PetscObject)pc,1);CHKERRQ(ierr); >>> + { >>> +PC ilinkpc; >>> +ierr = KSPGetPC(ilink->ksp, &ilinkpc); CHKERRQ(ierr); >>> +ierr = >>> PetscObjectIncrementTabLevel((PetscObject)ilinkpc,(PetscObject)pc,1);CHKERRQ(ierr); >>> + } >>> >>> >>> This is the pattern used everywhere else in PETSc so that sub-pcs always >>> have the correct tab level. >>> >> >> > -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120821/18bc8451/attachment-0001.html>

[petsc-dev] Fwd: Changes in PETSc

2012-08-21 Thread Barry Smith
On Aug 21, 2012, at 10:53 AM, Jed Brown wrote: > On Tue, Aug 21, 2012 at 10:39 AM, Matthew Knepley ci.uchicago.edu> wrote: > Wolfgang is not wrong here. I was against the name change :) > > I complained about this in May when it was pushed. Then who the fuck changed this. It sure as hell

[petsc-dev] Fwd: Changes in PETSc

2012-08-21 Thread Matthew Knepley
most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > > -- Norbert Wiener > > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120821/471af1b2/attachment.html>

[petsc-dev] Fwd: Changes in PETSc

2012-08-21 Thread Sean Farley
> Then who the fuck changed this. It sure as hell wasn't me. http://petsc.cs.iit.edu/petsc/petsc-dev/rev/9ffb4f0fe85d

[petsc-dev] FieldSplit fixes in 3.3

2012-08-21 Thread Hong Zhang
may well be nonsingular. >>>>>> >>>>>> >>>>>>> >>>>>>> >>>>>>>> I think that's confusing and we need a specific API for it, but if >>>>>>>> people are using it that way, we shouldn't change it in 3.3. >>>>>>>> >>>>>>>> I'd prefer to backout the first patch, split it into separate >>>>>>>> pieces, and review each before pushing. I think it's a potentially big >>>>>>>> behavior change for 3.3. >>>>>>>> >>>>>>> Which pieces of the first patch do you think are too big for 3.3? >>>>>>> The splits' and Schur KSPs have to be set up (maybe not all in every >>>>>>> situation) in order for recursive splitting to work. Should we declare >>>>>>> that capability unavailable for 3.3? I can eliminate the unneeded >>>>>>> KSPSetUp() calls. >>>>>>> >>>>>> >>>>>> 1. I hate those hacky dm reference-non-references. >>>>>> >>>>>> 2. I don't want unused KSPs to be set up. (We should eventually fix >>>>>> the model so they don't exist...) >>>>>> >>>>>> 3. Two of the three IncrementTabLevels that you introduced are not >>>>>> necessary because the KSP's tab level was incremented before getting the >>>>>> PC. >>>>>> >>>>> Where? >>>>> >>>> >>>>ierr = >>>> KSPCreate(((PetscObject)pc)->comm,&jac->kspschur);CHKERRQ(ierr); >>>>ierr = >>>> PetscLogObjectParent((PetscObject)pc,(PetscObject)jac->kspschur);CHKERRQ(ierr); >>>>ierr = >>>> PetscObjectIncrementTabLevel((PetscObject)jac->kspschur,(PetscObject)pc,1);CHKERRQ(ierr); >>>> + { >>>> +PC pcschur; >>>> +ierr = KSPGetPC(jac->kspschur, &pcschur); >>>> CHKERRQ(ierr); >>>> +ierr = >>>> PetscObjectIncrementTabLevel((PetscObject)pcschur,(PetscObject)pc,1);CHKERRQ(ierr); >>>> + } >>>> >>>> >>>>ierr = >>>> KSPCreate(((PetscObject)pc)->comm,&ilink->ksp);CHKERRQ(ierr); >>>>ierr = >>>> PetscObjectIncrementTabLevel((PetscObject)ilink->ksp,(PetscObject)pc,1);CHKERRQ(ierr); >>>> + { >>>> +PC ilinkpc; >>>> +ierr = KSPGetPC(ilink->ksp, &ilinkpc); CHKERRQ(ierr); >>>> +ierr = >>>> PetscObjectIncrementTabLevel((PetscObject)ilinkpc,(PetscObject)pc,1);CHKERRQ(ierr); >>>> + } >>>> >>>> >>>> This is the pattern used everywhere else in PETSc so that sub-pcs >>>> always have the correct tab level. >>>> >>> >>> >> > -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120821/655c3718/attachment-0001.html>

[petsc-dev] Fwd: Changes in PETSc

2012-08-21 Thread Barry Smith
On Aug 21, 2012, at 11:26 AM, Sean Farley wrote: >>Then who the fuck changed this. It sure as hell wasn't me. > > http://petsc.cs.iit.edu/petsc/petsc-dev/rev/9ffb4f0fe85d Sean, Thanks. You are my own personal hg web server :-) Barry

[petsc-dev] FieldSplit fixes in 3.3

2012-08-21 Thread Dmitry Karpeev
>>>>> Okay, I just would have said that it changes the operator. Also, the >>>>> Krylov methods are not necessarily correct if the matrix does not have the >>>>> stated null space (since it's expected that the matrix has the null space >>>>> and only the preconditioner needs to be filtered). >>>>> >>>>> >>>>>> I backed out this hunk, however. >>>>>> >>>>>>> >>>>>>> S may well be nonsingular. >>>>>>> >>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>> I think that's confusing and we need a specific API for it, but if >>>>>>>>> people are using it that way, we shouldn't change it in 3.3. >>>>>>>>> >>>>>>>>> I'd prefer to backout the first patch, split it into separate >>>>>>>>> pieces, and review each before pushing. I think it's a potentially big >>>>>>>>> behavior change for 3.3. >>>>>>>>> >>>>>>>> Which pieces of the first patch do you think are too big for 3.3? >>>>>>>> The splits' and Schur KSPs have to be set up (maybe not all in every >>>>>>>> situation) in order for recursive splitting to work. Should we declare >>>>>>>> that capability unavailable for 3.3? I can eliminate the unneeded >>>>>>>> KSPSetUp() calls. >>>>>>>> >>>>>>> >>>>>>> 1. I hate those hacky dm reference-non-references. >>>>>>> >>>>>>> 2. I don't want unused KSPs to be set up. (We should eventually fix >>>>>>> the model so they don't exist...) >>>>>>> >>>>>>> 3. Two of the three IncrementTabLevels that you introduced are not >>>>>>> necessary because the KSP's tab level was incremented before getting the >>>>>>> PC. >>>>>>> >>>>>> Where? >>>>>> >>>>> >>>>>ierr = >>>>> KSPCreate(((PetscObject)pc)->comm,&jac->kspschur);CHKERRQ(ierr); >>>>>ierr = >>>>> PetscLogObjectParent((PetscObject)pc,(PetscObject)jac->kspschur);CHKERRQ(ierr); >>>>>ierr = >>>>> PetscObjectIncrementTabLevel((PetscObject)jac->kspschur,(PetscObject)pc,1);CHKERRQ(ierr); >>>>> + { >>>>> +PC pcschur; >>>>> +ierr = KSPGetPC(jac->kspschur, &pcschur); >>>>> CHKERRQ(ierr); >>>>> +ierr = >>>>> PetscObjectIncrementTabLevel((PetscObject)pcschur,(PetscObject)pc,1);CHKERRQ(ierr); >>>>> + } >>>>> >>>>> >>>>>ierr = >>>>> KSPCreate(((PetscObject)pc)->comm,&ilink->ksp);CHKERRQ(ierr); >>>>>ierr = >>>>> PetscObjectIncrementTabLevel((PetscObject)ilink->ksp,(PetscObject)pc,1);CHKERRQ(ierr); >>>>> + { >>>>> +PC ilinkpc; >>>>> +ierr = KSPGetPC(ilink->ksp, &ilinkpc); CHKERRQ(ierr); >>>>> +ierr = >>>>> PetscObjectIncrementTabLevel((PetscObject)ilinkpc,(PetscObject)pc,1);CHKERRQ(ierr); >>>>> + } >>>>> >>>>> >>>>> This is the pattern used everywhere else in PETSc so that sub-pcs >>>>> always have the correct tab level. >>>>> >>>> >>>> >>> >> > -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120821/1cd224d0/attachment.html>

[petsc-dev] Fwd: Changes in PETSc

2012-08-21 Thread Hong Zhang
Barry > > -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120821/db6bf18a/attachment.html>

[petsc-dev] FieldSplit fixes in 3.3

2012-08-21 Thread Jed Brown
uot;,((PetscObject)pc)->prefix?((PetscObject)pc)->prefix:"",ilink->splitname);CHKERRQ(ierr); - ierr = KSPSetOptionsPrefix(jac->kspschur,schurprefix);CHKERRQ(ierr); /* really want setfromoptions called in PCSetFromOptions_FieldSplit(), but it is not ready yet */ /* need to call this every time, since the jac->kspschur is freshly created, otherwise its options never get set */ - ierr = KSPSetFromOptions(jac->kspschur);CHKERRQ(ierr); + ierr = PetscSNPrintf(schurprefix,sizeof schurprefix,"%sfieldsplit_%s_",((PetscObject)pc)->prefix?((PetscObject)pc)->prefix:"",ilink->splitname);CHKERRQ(ierr); + ierr = KSPSetOptionsPrefix(jac->kspschur,schurprefix);CHKERRQ(ierr); + ierr = KSPSetFromOptions(jac->kspschur); CHKERRQ(ierr); -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120821/22294698/attachment.html>

[petsc-dev] FieldSplit fixes in 3.3

2012-08-21 Thread Matthew Knepley
c->suboptionsset) { > +ierr = KSPSetFromOptions(ilink->ksp);CHKERRQ(ierr); > + } > > >} > - ierr = PetscSNPrintf(schurprefix,sizeof > schurprefix,"%sfieldsplit_%s_",((PetscObject)pc)->prefix?((PetscObject)pc)->prefix:"",ilink->splitname);CHKERRQ(ierr); > - ierr = > KSPSetOptionsPrefix(jac->kspschur,schurprefix);CHKERRQ(ierr); >/* really want setfromoptions called in > PCSetFromOptions_FieldSplit(), but it is not ready yet */ >/* need to call this every time, since the jac->kspschur is freshly > created, otherwise its options never get set */ > - ierr = KSPSetFromOptions(jac->kspschur);CHKERRQ(ierr); > + ierr = PetscSNPrintf(schurprefix,sizeof > schurprefix,"%sfieldsplit_%s_",((PetscObject)pc)->prefix?((PetscObject)pc)->prefix:"",ilink->splitname);CHKERRQ(ierr); > + ierr = KSPSetOptionsPrefix(jac->kspschur,schurprefix);CHKERRQ(ierr); > + ierr = KSPSetFromOptions(jac->kspschur); CHKERRQ(ierr); > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120821/eff5d23c/attachment-0001.html>

[petsc-dev] FieldSplit fixes in 3.3

2012-08-21 Thread Jed Brown
liminate()). Note that some mixed discretizations have sparse Schur complements and it could even make sense to implement a nonlinear smoother in the reduced space. -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120821/6013dbf5/attachment.html>

[petsc-dev] FieldSplit fixes in 3.3

2012-08-21 Thread Matthew Knepley
minate(), if DM still exists. Matt -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener -- next part -- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120821/d966569e/attachment.html>