[petsc-users] DMPlex : Assemble global stiffness matrix problem

Morten Nobel-Jørgensen mono at mek.dtu.dk
Mon Mar 7 13:28:42 CST 2016


I have some problems using DMPlex on unstructured grids in 3D.

After I have created the DMPlex and assigned dofs (3 dofs on each node), I run into some problems when assembling the global stiffness matrix. I have created a small example in the attached cc file. My problems are:

  *   It seems like the matrix (created using DMCreateMatrix) contains no non-zero elements. I was under the impression that the sparsity pattern of the matrix would be created automatically when the dofs has been assigned to the default section.
  *   (Probably as a consequence of this) when assigning values to the matrix I get an: "Argument of of range. New nonzero at (0,0) caused a malloc. Use MatSetOption(A, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE) to turn off this check"
  *   Finally, I'm reading the nodes of each element using the get-transitive-clojure (where I test if each point is inside the node range), but I have a hard time understanding if the returned values are sorted. And if not, how to sort the values (e.g. using orientation which the get-transitive-clojure function also returns).

I hope someone can guide 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/20160307/b3feccdf/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dmplex_mat_problem.cc
Type: application/octet-stream
Size: 4608 bytes
Desc: dmplex_mat_problem.cc
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160307/b3feccdf/attachment.obj>


More information about the petsc-users mailing list