> On Mar 20, 2017, at 6:07 PM, Daralagodu Dattatreya Jois, Sathwik Bharadw 
> <[email protected]> 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


>   
> Thanks,
> Sathwik 

Reply via email to