<div dir="ltr">On Sat, Feb 23, 2013 at 7:35 AM, Hui Zhang <span dir="ltr"><<a href="mailto:mike.hui.zhang@hotmail.com" target="_blank">mike.hui.zhang@hotmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<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"><div class="im"><br>
On Feb 23, 2013, at 1:32 PM, Matthew Knepley wrote:<br>
<br>
> On Sat, Feb 23, 2013 at 7:29 AM, Hui Zhang <<a href="mailto:mike.hui.zhang@hotmail.com">mike.hui.zhang@hotmail.com</a>> wrote:<br>
> I want to implement diagonal penalty method for enforcing the Dirichlet boundary conditions.  That is, the diagonal entries corresponding to Dirichlet boundary are going to be scaled by a large number.<br>
><br>
> What is the easiest way to do this?  Thanks!<br>
><br>
> <a href="http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MatDiagonalScale.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MatDiagonalScale.html</a><br>
<br>
</div>But it seems not what I want.  That routine scales all the entries of a mat.  I want to scale only the diagonal entries.</blockquote><div><br></div><div style>Then use <a href="http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MatDiagonalSet.html">http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MatDiagonalSet.html</a></div>
<div style><br></div><div style>As Jed says, you really really do not want to do this.</div><div style><br></div><div style>  Matt</div><div> </div><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">
<div class=""><div class="h5">
><br>
>   Matt<br>
><br>
> --<br>
> 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<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>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>