[petsc-dev] PetscSF in Fortran

Matthew Knepley knepley at gmail.com
Mon Sep 25 05:12:50 CDT 2017


On Sun, Sep 24, 2017 at 8:57 PM, Adrian Croucher <a.croucher at auckland.ac.nz>
wrote:

>
>
> On 25/09/17 13:37, Adrian Croucher wrote:
>
>>
>> Actually it looks like DMGetDefaultSF() does already work in Fortran
>> though, and could be used to do the same thing.
>>
>> Do you think that would be a reasonable way to do it?
>>
>>
> Hmm, I just tried it and it looks like the default SF produced by this
> function doesn't have any overlap. So that won't work for me.
>
> Guess I might need a Fortran interface for PetscSFSetGraph/PetscSFGetGraph
> after all. If you could put one it that would be great.
>
> Another simpler possibility that would work for my case is if there was a
> DMCopySF() function for copying the point SF from one DM to another. Up to
> you if you think that would be of enough general usefulness to warrant
> inclusion.


If you truly need the exact same SF for your grid, you should be able to
use DMGet/SetPointSF() since it will just reference count it for you. Then
the default SF is created automatically from the point SF. Does this work?

  Thanks,

     Matt


> - Adrian
>
> --
> Dr Adrian Croucher
> Senior Research Fellow
> Department of Engineering Science
> University of Auckland, New Zealand
> email: a.croucher at auckland.ac.nz
> tel: +64 (0)9 923 4611
>
>


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

https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170925/b32fddcf/attachment.html>


More information about the petsc-dev mailing list