<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div>
<p dir="auto" style="text-align:left; margin-top:25px; margin-bottom:25px; font-family:sans-serif; font-size:11pt; color:black; background-color:white">
Hey Barry, <br>
I am already using MatZeroRows. I was actually stuck precisely while applying non zero Dirchlet boundary conditions. But to account for non zero value traditionally we subtract the corresponding column with the right hand side vector. If we zero the rows and
columns we can only have value zero for solutions at the boundary. </p>
<p dir="auto" style="text-align:left; margin-top:25px; margin-bottom:25px; font-family:sans-serif; font-size:11pt; color:black; background-color:white">
Get Outlook for Android<br>
</p>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Barry Smith <bsmith@mcs.anl.gov><br>
<b>Sent:</b> Monday, March 20, 2017 11:33:20 PM<br>
<b>To:</b> Daralagodu Dattatreya Jois, Sathwik Bharadw<br>
<b>Cc:</b> petsc-users@mcs.anl.gov<br>
<b>Subject:</b> Re: [petsc-users] Values of a column in a parallel matrix</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText"><br>
> On Mar 20, 2017, at 6:07 PM, Daralagodu Dattatreya Jois, Sathwik Bharadw <sdaralagodudatta@wpi.edu> wrote:<br>
> <br>
> Hey all,<br>
> <br>
> I am using AIJ matrix to solve Laplace problem in finite element framework. To apply Neumann boundary conditions I need to obtain values of first and last few columns and subtract it with the corresponding right hand side vector. I understand that MatGetColumnVector
andMatGetValues are not collective. Is there any other alternative petsc calls to achieve this in parallel?
<br>
<br>
Hmm, I think you mean non-zero Dirichlet boundary conditions. In that case the recommended approach is calling MatZeroRows() or if you want to preserve symmetry MatZeroRowsColumns(). There are also MatZeroRowsLocal() and MatZeroRowsColumnsLocal() and a few
other variants.<br>
<br>
Barry<br>
<br>
<br>
> <br>
> Thanks,<br>
> Sathwik <br>
<br>
</div>
</span></font>
</body>
</html>