[petsc-users] Getting the connectivity from DMPlex

Jian Zhang - 3ME J.Zhang-10 at tudelft.nl
Wed Aug 21 07:35:07 CDT 2019


Hi Matthew,

That is ok. May I ask you one more question?

Sorry. I just start to learn how to use DMPLex. If I have an msh file including the triangular elements (t3). After I use DMPlex to read this mesh, how can I know the element type (actually which is t3) by using the functions inside DMPlex?

Best,

Jian

________________________________
From: Matthew Knepley <knepley at gmail.com>
Sent: 21 August 2019 14:24:56
To: Jian Zhang - 3ME
Cc: Jed Brown; petsc-users at mcs.anl.gov
Subject: Re: [petsc-users] Getting the connectivity from DMPlex

On Wed, Aug 21, 2019 at 8:21 AM Jian Zhang - 3ME <J.Zhang-10 at tudelft.nl<mailto:J.Zhang-10 at tudelft.nl>> wrote:

Hi Matthew,

Thanks for your answer. I just looked at the pestc4py 3.11.0 (I think it is the newest one).

Actually, I did not find DMPlexGetClosure function in the DMPlex.pyx, also not in DM.pyx.

Sorry, I messed up the name in my mail. Its getTransitiveClosure()

  https://bitbucket.org/petsc/petsc4py/src/9598d8fb2bb0baa79f99ebf76991ddecd1fd173e/src/PETSc/DMPlex.pyx#lines-332

  Thanks,

    Matt

Best,

Jian

________________________________
From: Matthew Knepley <knepley at gmail.com<mailto:knepley at gmail.com>>
Sent: 21 August 2019 14:03:19
To: Jian Zhang - 3ME
Cc: Jed Brown; petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] Getting the connectivity from DMPlex

On Wed, Aug 21, 2019 at 7:48 AM Jian Zhang - 3ME via petsc-users <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>> wrote:

Hi Jed,

Thank you very much. I tried to use DMPlexGetCone, but the output is the edge ids, not the vertice ids. For the function DMPlexGetClosureIndices, I can not find it in petsc4py. Do you know any alternative ways to solve this?

DMPlexGetClosure() should be in petsc4py. It also returns orientations, which you can just filter out.

  Thanks,

     Matt


Best,

Jian

________________________________
From: Jed Brown <jed at jedbrown.org<mailto:jed at jedbrown.org>>
Sent: 21 August 2019 13:42:41
To: Jian Zhang - 3ME; petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] Getting the connectivity from DMPlex

Jian Zhang - 3ME via petsc-users <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>> writes:

> Hi guys,
>
> I am trying to get the element connectivity from DMPlex. The input is the element id, and the output should be the vertice ids. Which function should I use to achieve this? Thanks in advance.

See DMPlexGetCone or DMPlexGetClosureIndices.


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


--
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/20190821/0c7a439e/attachment.html>


More information about the petsc-users mailing list