Re: [petsc-users] Example 1 of Vector section

2018-09-24 Thread Fazlul Huq
Got it. Thanks a lot. Best, Huq On Mon, Sep 24, 2018 at 8:26 PM Matthew Knepley wrote: > On Mon, Sep 24, 2018 at 9:02 PM Fazlul Huq wrote: > >> Hello All, >> >> I am looking through the example problems given in PETSc. In the very >> first example, ex1 of vector section, I don't understand the

Re: [petsc-users] Example 1 of Vector section

2018-09-24 Thread Matthew Knepley
On Mon, Sep 24, 2018 at 9:02 PM Fazlul Huq wrote: > Hello All, > > I am looking through the example problems given in PETSc. In the very > first example, ex1 of vector section, I don't understand the following > part, especially the term "PETSC_SMALL". What does this mean? > This checks that we

[petsc-users] Example 1 of Vector section

2018-09-24 Thread Fazlul Huq
Hello All, I am looking through the example problems given in PETSc. In the very first example, ex1 of vector section, I don't understand the following part, especially the term "PETSC_SMALL". What does this mean? Here, in the second line we already assign zero to v. What is the meaning of "if" co

Re: [petsc-users] number of rows distribution for matrix from MatLoad

2018-09-24 Thread Matthew Knepley
On Mon, Sep 24, 2018 at 4:41 PM Xiangdong wrote: > Hello everyone, > > I have a quick question on MatLoad. When I use MatLoad to read a binary > matrix into AIJ format, how can I specify the distributions of rows? In > particular, I want the rows distributed on each processor to be even. > The i

[petsc-users] number of rows distribution for matrix from MatLoad

2018-09-24 Thread Xiangdong
Hello everyone, I have a quick question on MatLoad. When I use MatLoad to read a binary matrix into AIJ format, how can I specify the distributions of rows? In particular, I want the rows distributed on each processor to be even. More specific, Let's say I have a binary matrix A with 50 rows. I w

Re: [petsc-users] DMCreateXXXVector vs VecDuplicate

2018-09-24 Thread Matthew Knepley
On Mon, Sep 24, 2018 at 8:57 AM Phil Tooley wrote: > Hi all, > > Can I get come clarification regarding DMCreateXXXVector Vectors created from a DM have additional information, such as the DM itself and special View routines. > vs > VecDuplicate. VecDuplicate will retain this special infor

[petsc-users] DMCreateXXXVector vs VecDuplicate

2018-09-24 Thread Phil Tooley
Hi all, Can I get come clarification regarding  DMCreateXXXVector vs VecDuplicate. The manual says that I can obtain additional vectors with the latter, does this mean that I *must* only call DMCreateXXXVector once each for global and local? I ask because I want multiple instances of an image cla