[petsc-users] DMPlexDistributeField

Matthew Knepley knepley at gmail.com
Sat Jun 22 23:15:49 CDT 2019


On Wed, Jun 5, 2019 at 9:42 PM Adrian Croucher via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> hi
>
> I have some questions about using the DMPlexDistributeField() function.
> I have finite volume mesh geometry data stored in two local vectors
> created using DMPlexComputeGeometryFVM(), and I need to redistribute
> these after calling DMPlexDistribute() to redistribute my mesh. (I need
> the geometry data before redistribution, so I can't just wait until
> after redistribution to create them.)
>
> So I figured DMPlexDistributeField() looks like the thing to use for
> that, using the SF that comes out of DMPlexDistribute().
>
> 1) Does DMPlexDistributeField() work on local vectors or do they have to
> be global ones?
>

It should be marked in the documentation (will fix). These are only local
vectors,
compatible with that Section.


> 2) It takes a 'dm' parameter and the documentation says this is "The
> DMPlex object", but is that the original DM (before redistribution) or
> the redistributed one, or does it not matter? It looks like it only uses
> the DM to get the vector type.
>

You are right. It does not matter.


> 3) It looks like you need to manually create the newSection and newVec
> output parameters before passing them in to this routine, is that correct?
>

Yes, that is right.

  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.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190623/087204e1/attachment.html>


More information about the petsc-users mailing list