[petsc-users] petsc section layout

Matthew Knepley knepley at gmail.com
Thu Feb 6 19:43:03 CST 2014


On Thu, Feb 6, 2014 at 7:10 PM, Dharmendar Reddy <dharmareddy84 at gmail.com>wrote:

> On Thu, Feb 6, 2014 at 6:19 PM, Matthew Knepley <knepley at gmail.com> wrote:
> > On Thu, Feb 6, 2014 at 4:49 PM, Dharmendar Reddy <
> dharmareddy84 at gmail.com>
> > wrote:
> >>
> >> Hello,
> >>          I need to store some geometry information of a mesh in dm and
> >> alter access it via getclosure (or a some other method you may
> >> suggest).
> >>
> >> For a traiangle  with vertices:  v1, v2, v3
> >> say the circumcenter of the triangle is O
> >> and mid point of each edges is : m1,m2,m3
> >> The data i need to store is:
> >> For each node a double value, which will the fraction of area of
> triangle:
> >> for example: for v1 , area of quad v1,m1,O,m3
> >>
> >> each edge has two values: edge length and distance from mid point to O
> >>
> >> For triangle, i will have to save 9 variables, of which 6 are cell
> >> specific and 3 are edge specific.  How should define the dof lay out
> >> to use in DMPlexCreateSection
> >
> >
> > Just using PetscSectionSetDof() put 6 for each cell (I only see 3 above)
> > and 3 (I only see 2 above) for each edge. If you use
> DMPlexCreateSection()
> > then dimDof = [0 3 6], and you could divide it into fields however you
> want.
> >
>  I guess if i have to mention them as per edge basis, then it is one
> per each edge which is the edge length. The distance from edge to
> circumcenter of the cell is cell specific.
>
> So i should use: dimDof = [0 3 6].
>

No, if it is one per edge and 6 per cell its

  dimDof = [0 1, 6]

dimDof is the number of dof for each dimensional component.

    Matt


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



-- 
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/20140206/41c8e4e2/attachment.html>


More information about the petsc-users mailing list