[petsc-users] Values of a column in a parallel matrix

Fande Kong fdkong.jd at gmail.com
Mon Mar 20 22:40:54 CDT 2017


On Mon, Mar 20, 2017 at 9:33 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
> > On Mar 20, 2017, at 6:07 PM, Daralagodu Dattatreya Jois, Sathwik Bharadw
> <sdaralagodudatta at wpi.edu> wrote:
> >
> > Hey all,
> >
> >  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?
>
>   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.
>
>   Barry
>


If we zero out rows AND columns using  MatZeroRowsColumns to preserve
the symmetry, how we connect the non-zero boundary values with the interior
solution?

Fande,


>
>
> >
> > Thanks,
> > Sathwik
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170320/f6dcf0be/attachment.html>


More information about the petsc-users mailing list