[petsc-dev] questions regarding TSDM

Barry Smith bsmith at mcs.anl.gov
Tue Nov 20 08:08:20 CST 2012


The object is called TSDM but methods are DMTSXXX()?

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?

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?


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
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).

  Perhaps some refactoring could bring this stuff down to the simple-minded design of the rest of PETSc?

    Barry




More information about the petsc-dev mailing list