[petsc-users] DMPlex examples in parallel/3D?

Matthew Knepley knepley at gmail.com
Tue May 19 10:38:10 CDT 2015


On Tue, May 19, 2015 at 10:32 AM, Mark Lohry <mlohry at princeton.edu> wrote:

> Great thanks, I'll look more into this.
>
> Question on the dofs that wasn't clear from the manual - are the dofs on
> cells, faces, edges, and vertices *all* actual degrees of freedom /
> solution unknowns in the system to solve, or does one say the dofs on the
> cells represent actual solution unknowns, and face dofs are just things to
> be communicated for inter-cell flux computation? e.g. say i was doing the
> simplest cellwise-constant finite volume scheme for a scalar; do i have 1
> dof per cell, and zero dofs anywhere else?
>

There are many ways you could imagine structuring the data. The thing about
PetscSection is that is easily allows
you to pick any one of those.

In a FV example for PETSc, TS ex11, we choose to store only cell data. Then
in loops over the faces, you

  1) Call DMPlexGetSupport(dm, face, &cells) to get the two cells

  2) Call DMPlexGetPointGlobalRead(dm, cell[i], solArray, &val) to get the
cell data


>
>> You can easily get started by just calling DMPlexDistribute() on a serial
>> mesh.
>>
>>
> perfect, i'll start with that.
>
>
>
>>
>> I do cG FEM in SNES ex12 and ex62.
>>
>>
> Great thanks, didn't see these linked from the DMPlex doc pages.
>

They are in the dev docs I believe.

  Thanks,

    Matt

-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150519/246f97bf/attachment-0001.html>


More information about the petsc-users mailing list