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

2017-03-20 Thread Barry Smith
> On Mar 20, 2017, at 11:04 PM, Sanjay Govindjee wrote: > > If you zero the row and column as suggested, you can get what you want by > building the > RHS as you construct your matrix (i.e. do in while assembling your matrix and > RHS). Yes, and often this is good way

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

2017-03-20 Thread Barry Smith
> On Mar 20, 2017, at 10:48 PM, Daralagodu Dattatreya Jois, Sathwik Bharadw > wrote: > > Hey Barry, > I am already using MatZeroRows. I was actually stuck precisely while applying > non zero Dirchlet boundary conditions. But to account for non zero value >

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

2017-03-20 Thread Sanjay Govindjee
If you zero the row and column as suggested, you can get what you want by building the RHS as you construct your matrix (i.e. do in while assembling your matrix and RHS). On 3/20/17 8:48 PM, Daralagodu Dattatreya Jois, Sathwik Bharadw wrote: Hey Barry, I am already using MatZeroRows. I was

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

2017-03-20 Thread Daralagodu Dattatreya Jois, Sathwik Bharadw
Hey Barry, 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

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

2017-03-20 Thread Fande Kong
On Mon, Mar 20, 2017 at 9:33 PM, Barry Smith wrote: > > > On Mar 20, 2017, at 6:07 PM, Daralagodu Dattatreya Jois, Sathwik Bharadw > wrote: > > > > Hey all, > > > > I am using AIJ matrix to solve Laplace problem in finite element > framework. To

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

2017-03-20 Thread Barry Smith
> On Mar 20, 2017, at 6:07 PM, Daralagodu Dattatreya Jois, Sathwik Bharadw > 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

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

2017-03-20 Thread Jed Brown
"Daralagodu Dattatreya Jois, Sathwik Bharadw" writes: > 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 >

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

2017-03-20 Thread Daralagodu Dattatreya Jois, Sathwik Bharadw
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 and

Re: [petsc-users] How to use class function in SNESSetFunction

2017-03-20 Thread Matthew Knepley
On Mon, Mar 20, 2017 at 7:01 PM, Ping He wrote: > Dear Matt, > > I know it is an old thread and your solution works well, but I still want > to ask if there are any alternative instead of setting the member function > "static". The issue is that I need to use multiple member

Re: [petsc-users] How to use class function in SNESSetFunction

2017-03-20 Thread Ping He
Dear Matt, I know it is an old thread and your solution works well, but I still want to ask if there are any alternative instead of setting the member function "static". The issue is that I need to use multiple member functions (20+) in SNESSetFunction and numerous class variables. So

Re: [petsc-users] Question about DMDA BOUNDARY_CONDITION set

2017-03-20 Thread Matthew Knepley
On Mon, Mar 20, 2017 at 2:39 PM, Wenbo Zhao wrote: > Hi all. > > I have a mesh is like below > > 1 2 3 > 4 5 6 > 7 8 9 > > I use DACreate2d to create mesh partition. > > In my case, I have an rotation boundary condition. The whole mesh is like > below > > 9 8 7

[petsc-users] Question about DMDA BOUNDARY_CONDITION set

2017-03-20 Thread Wenbo Zhao
Hi all. I have a mesh is like below 1 2 3 4 5 6 7 8 9 I use DACreate2d to create mesh partition. In my case, I have an rotation boundary condition. The whole mesh is like below 9 8 7 3 6 9 6 5 4 2 5 8 3 2 1 1 4 7 7 4 1 1 2 3 8 5 2 4 5 6 9 6 3 7 8 9 It means that cell 2

Re: [petsc-users] Segmentation fault due to TSDestroy

2017-03-20 Thread Praveen C
It turns out the problem was with this call TSMonitorSet(ts, Monitor, ctx, PETSC_NULL_OBJECT, ierr); CHKERRQ(ierr) The correct way is call TSMonitorSet(ts, Monitor, ctx, PETSC_NULL_FUNCTION, ierr); CHKERRQ(ierr) Thanks praveen On Sat, Mar 18, 2017 at 9:30 PM, Satish Balay