<div dir="ltr"><font color="#a64d79">> If you need a symmetric Jacobian, you can use the BC facility in<br>> PetscSection, which eliminates the<br>> variables completely. This is how the FEM examples, like ex12, work.</font><div><br></div><div><div class="gmail_extra">Would that be with PetscSectionSetConstraintDof ? For that I will need the PetscSection, DofSection, within DMNetwork, how can I obtain it? I could cast it to DM_Network from the dm, networkdm,  declared in the main program, maybe something like this:</div><div class="gmail_extra"><pre width="80" style="color:rgb(0,0,0)">DM_Network     *network = (DM_Network*) networkdm->data;</pre><pre width="80"><font face="arial"><span style="white-space:normal">Then I would loop over the vertices and call </span></font><span style="font-family:arial">PetscSectionSetConstraintDof if it's a boundary node (by checking the corresponding component)</span></pre><pre width="80"><span style="white-space:normal;font-family:arial">Thanks for your responses.</span></pre><pre width="80">Miguel</pre></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 25, 2014 at 2:42 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> writes:<br>
<br>
> On Thu, Sep 25, 2014 at 1:46 PM, Abhyankar, Shrirang G. <<a href="mailto:abhyshr@mcs.anl.gov">abhyshr@mcs.anl.gov</a><br>
>> wrote:<br>
><br>
>> You are right. The Jacobian for the power grid application is indeed<br>
>> non-symmetric. Is that a problem for your application?<br>
>><br>
><br>
> If you need a symmetric Jacobian, you can use the BC facility in<br>
> PetscSection, which eliminates the<br>
> variables completely. This is how the FEM examples, like ex12, work.<br>
<br>
</span>You can also use MatZeroRowsColumns() or do the equivalent<br>
transformation during assembly (my preference).<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><font face="verdana, sans-serif"><b>Miguel Angel Salazar de Troya</b></font><span><font color="#888888"><br><font face="arial,helvetica,sans-serif">Graduate Research Assistant<br>Department of Mechanical Science and Engineering<br></font>University of Illinois at Urbana-Champaign<br>(217) 550-2360<br>
<a href="mailto:salaza11@illinois.edu" target="_blank">salaza11@illinois.edu</a></font></span><div><br></div></div>
</div></div></div>