[petsc-users] petsc section layout

Matthew Knepley knepley at gmail.com
Thu Feb 6 18:19:57 CST 2014


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.

   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/20140206/6202a8f4/attachment.html>


More information about the petsc-users mailing list