<div dir="ltr"><div dir="ltr">On Fri, Oct 2, 2020 at 7:16 PM Ashish Patel <<a href="mailto:ashish.patel@onscale.com" target="_blank">ashish.patel@onscale.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear PETSc users,</div><div><br></div><div>I am trying to assemble a matrix for a finite element problem where the degree of freedom (dof) on a surface is constrained via a reference node which also exists in the DM but is not connected with any other point in the mesh. To apply the constraint I want to be able to set matrix values in the rows belonging to dofs of reference nodes and columns belonging to dofs of surface nodes and vice versa. But since the two points are not connected topologically I cannot just use DMPlexMatSetClosure to do that. I am currently trying to use DMPlexAddConeSize on all the constrained surface points followed by a call to DMPlexInsertCone wherein I add the reference node to the cone of surface point before setting up the PetscSection. Is this the right approach?</div></div></blockquote><div><br></div><div>No. You are changing the topology, which is not what you want I think. I think you just want to associate extra dof with the face. You can</div><div>do this by just altering the PetscSection you use. Do you create the Section yourself now?</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div> I am currently getting following message<br></div><div><br></div><div>New nonzero at (8952,28311) caused a malloc<br>Use MatSetOption(A, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE) to turn off this check</div><div><br></div><div>I could set the suggested option to get rid of the error but was wondering if I am missing something.<br></div><div><br></div><div>Thanks</div><div>Ashish<br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>