[petsc-users] petsc section layout

Dharmendar Reddy dharmareddy84 at gmail.com
Thu Feb 6 19:10:43 CST 2014

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


>    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

More information about the petsc-users mailing list