<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 7, 2016 at 1:28 PM, Morten Nobel-Jørgensen <span dir="ltr"><<a href="mailto:mono@mek.dtu.dk" target="_blank">mono@mek.dtu.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">I have some problems using DMPlex on unstructured grids in 3D.
<div><br>
</div>
<div>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:</div>
<div>
<ul>
<li>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.</li><li>(Probably as a consequence of this) when assigning values to the matrix I get an: "Argument of of range. <span style="font-size:10pt">New nonzero at (0,0) caused a malloc. </span><span style="font-size:10pt">Use MatSetOption(A, MAT_NEW_NONZERO_ALLOCATION_ERR,
PETSC_FALSE) to turn off this check"</span></li><li><span style="font-size:10pt">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).</span></li></ul>
<div>I hope someone can guide me in the right direction :)</div></div></div></div></blockquote><div><br></div><div>I will take a look today or tomorrow. The first thing to do is to look at the nonzero pattern of the Jacobian. I use -mat_view draw -draw_pause -1</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt"><div>
<div>Kind regards,</div>
<div>Morten </div>
</div>
</div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>