<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
If you zero the row and column as suggested, you can get what you
want by building the<br>
RHS as you construct your matrix (i.e. do in while assembling your
matrix and RHS).<br>
<br>
<div class="moz-cite-prefix">On 3/20/17 8:48 PM, Daralagodu
Dattatreya Jois, Sathwik Bharadw wrote:<br>
</div>
<blockquote
cite="mid:MWHPR01MB2701D6461930B17A80A9BDFDDB3D0@MWHPR01MB2701.prod.exchangelabs.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
<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 style="font-size:11pt"
face="Calibri, sans-serif" color="#000000"><b>From:</b>
Barry Smith <a class="moz-txt-link-rfc2396E" href="mailto:bsmith@mcs.anl.gov"><bsmith@mcs.anl.gov></a><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> <a class="moz-txt-link-abbreviated" href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><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 <a class="moz-txt-link-rfc2396E" href="mailto:sdaralagodudatta@wpi.edu"><sdaralagodudatta@wpi.edu></a>
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>
</blockquote>
<br>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>