[petsc-dev] Adding DMLocalToLocalBegin/End: What about PetscSF?

Richard Tran Mills rtm at eecs.utk.edu
Mon Jul 8 16:16:30 CDT 2013


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?

--Richard

On 6/12/13 11:25 AM, Jed Brown wrote:
> Richard Tran Mills <rtm at eecs.utk.edu> 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: rmills at ornl.gov  V: 865-241-3198 http://climate.ornl.gov/~rmills




More information about the petsc-dev mailing list