This was an unfortunate case of the peril of providing legacy support. We're transitioning away from them. In addition, we should move other things out of the DM, like DMSet/ComputeVariableBounds().<br><br>- Peter<br>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 20, 2012 at 11:24 AM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Are these things still used? Seems they should have been removed?<br>
<br>
petscdm.h:PETSC_EXTERN PetscErrorCode DMSetInitialGuess(DM,PetscErrorCode (*)(DM,Vec));<br>
petscdm.h:PETSC_EXTERN PetscErrorCode DMSetFunction(DM,PetscErrorCode (*)(DM,Vec,Vec));<br>
petscdm.h:PETSC_EXTERN PetscErrorCode DMSetJacobian(DM,PetscErrorCode (*)(DM,Vec,Mat,Mat,MatStructure *));<br>
<div class="im HOEnZb"><br>
<br>
On Nov 20, 2012, at 9:10 AM, Jed Brown <<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>> wrote:<br>
<br>
</div><div class="HOEnZb"><div class="h5">> On Tue, Nov 20, 2012 at 3:08 PM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br>
><br>
> The object is called TSDM but methods are DMTSXXX()?<br>
><br>
> DMTS... is right because they are methods on a DM, though they are packaged with TS. The user _never_ sees the internal "TSDM" object. I think the original motivation for that naming structure was to prevent conflict with a TS/SNES implementation of the same name, but I would not object to switching to DMTS<br>
><br>
><br>
> TSDM is itself not a PETSc object but it is wrapped into a PetscContainer (which is a PETSc object), so why not just make TSDM a PETSc object? Is it because of circular references?<br>
><br>
> I don't mind making it a PetscObject.<br>
><br>
> What's with the complicated DMTSGetContextWrite() (copy on write crapola) stuff? This kind of paradigm is not used anywhere else in PETSc, is it really needed? Seems overly complex, is it just to save a few small objects?<br>
><br>
> It's for interface simplicity. If the user sets the the residual routine on the finest level and then changes it, they probably expect their change to propagate through the levels. But if they get out a coarse level and explicitly change it there, they probably intended to use a different discretization/physics on the coarse level.<br>
><br>
><br>
> The DMTSGetContext() business uses PetscObjectCompose to attach the TSDM to a dm. Why not just have DM's have opaque pointers to KSPDM, SNESDM, and TSDM built into the DM and things<br>
> like DMGetKSPDM() that do the usual dm->kspdm access instead of composing business. Since the business of DM's is to talk to TS, SNES, and KSP there is no reason to go through the more complicated object compose business is there? (The object compose business is for out-of-the-ordinary stashing of stuff, not ordinary stashing of stuff, it is kind of like using object compose to attach the ksp to the snes).<br>
><br>
> Okay, but when the optimizers need to attach something, do we add special support for that in DM as well? What about UQ and so on? The idea here was to keep DM as ignorant as possible, but allow it to carry this extra data around for the various solver objects that need it.<br>
><br>
> Perhaps some refactoring could bring this stuff down to the simple-minded design of the rest of PETSc?<br>
><br>
> Barry<br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>