[petsc-users] Distribution of DMPlex for FEM

Morten Nobel-Jørgensen mono at dtu.dk
Wed Jul 13 03:57:06 CDT 2016


I’m having problems distributing a simple FEM model using DMPlex. For test case I use 1x1x2 hex box elements (/cells) with 12 vertices. Each vertex has one DOF.
When I distribute the system to two processors, each get a single element and the local vector has the size 8 (one DOF for each vertex of a hex box) as expected.

My problem is that when I manually assemble the global stiffness matrix (a 12x12 matrix) it seems like my ghost values are ignored. I’m sure that I’m missing something obvious but cannot see what it is.

In the attached example, I’m assembling the global stiffness matrix using a simple local stiffness matrix of ones. This makes it very easy to see if the matrix is assembled correctly. If I run it on one process, then global stiffness matrix consists of 0’s, 1’s and 2’s and its trace is 16.0. But if I run it distributed on on two, then it consists only of 0's and 1’s and its trace is 12.0.

I hope that somebody can spot my mistake and help me in the right direction :)

Kind regards,
Morten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160713/0d0074dc/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex18.cc
Type: application/octet-stream
Size: 4631 bytes
Desc: ex18.cc
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160713/0d0074dc/attachment-0001.obj>


More information about the petsc-users mailing list