On Mon, Jul 8, 2013 at 4:16 PM, Richard Tran Mills <[email protected]> wrote:
> Hi Jed, > > Revisiting this now; thanks for your help so far. I understand that I can > use PetscSFBcast() for this, but it is not clear to me whether there is a > good way that I can make use of the "default" SF that exists (or the > "default" PetscSection used to construct this). Should I just construct > some other "default" for local-to-local, or is there a good way to remap > the "global" vector layout onto a local one? > The section stuff will not help you much, because you would still need to create a mesh point SF. Its useful if you want to manage all data that way. Matt > --Richard > > On 6/12/13 11:25 AM, Jed Brown wrote: > >> Richard Tran Mills <[email protected]> writes: >> >> PETSc developers, >>> >>> I am finally getting around to adding the DMLocalToLocalBegin/End >>> routines >>> that I had mentioned several months ago. Looking at >>> DMGlobalToLocalBegin() in src/interface/dm/dm.c, I see that a little over >>> a year ago, Matt added the use of a default 'PetscSF' ("star forest") if >>> present to handle the global-to-local and local-to-global operations. I >>> am not familiar with PetscSF, but I assume that it should be possible to >>> use these somehow (maybe needing to add a little bit of code) for >>> local-to-local operations, since the communication pattern is the same as >>> for a global-to-local. Could someone who is familiar with PetscSF >>> comment >>> on this? >>> >> You can use PetscSFBcast for this. For each point (which will be a leaf >> in star-forest terminology), set the (rank, offset) of the owner >> ("root"). Use PetscSFSetGraph rather than PetscSFSetGraphLayout, >> because you don't have a global ordering/PetscLayout to use the latter. >> > > > -- > Richard Tran Mills, Ph.D. > Computational Earth Scientist | Joint Assistant Professor > Hydrogeochemical Dynamics Team | EECS and Earth & Planetary Sciences > Oak Ridge National Laboratory | University of Tennessee, Knoxville > E-mail: [email protected] V: 865-241-3198 > http://climate.ornl.gov/~**rmills<http://climate.ornl.gov/~rmills> > > -- 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
