Re: [petsc-users] a question about PetscSectionCreate

2017-05-28 Thread leejearl
Thanks for your kind replies. I will give a result after the test. On 2017年05月28日 19:32, Matthew Knepley wrote: On Sun, May 28, 2017 at 1:49 AM, Dave May > wrote: On Sun, 28 May 2017 at 08:31, leejearl

Re: [petsc-users] a question about PetscSectionCreate

2017-05-28 Thread Matthew Knepley
On Sun, May 28, 2017 at 6:02 AM, Lawrence Mitchell < lawrence.mitch...@imperial.ac.uk> wrote: > > > > On 28 May 2017, at 09:16, leejearl wrote: > > > > Hi, Dave: I want to store a PetscInt tag for every cell of the dmplex > with the struct. Thanks, > > You probably want to use

Re: [petsc-users] a question about PetscSectionCreate

2017-05-28 Thread Matthew Knepley
On Sun, May 28, 2017 at 1:49 AM, Dave May wrote: > > On Sun, 28 May 2017 at 08:31, leejearl wrote: > >> Hi, PETSc developer: >> >> I need to create a PetscSection with a struct. The struct is >> defined as follow, >> >> typedef struct >> {

Re: [petsc-users] a question about PetscSectionCreate

2017-05-28 Thread Lawrence Mitchell
> On 28 May 2017, at 09:16, leejearl wrote: > > Hi, Dave: I want to store a PetscInt tag for every cell of the dmplex with > the struct. Thanks, You probably want to use a DMLabel to store these ids. Unless you have a different I'd for every cell. Lawrence

[petsc-users] a question about PetscSectionCreate

2017-05-28 Thread leejearl
Hi, Dave: I want to store a PetscInt tag for every cell of the dmplex with the struct. Thanks, leejearl /Hi, Dave: />/ > Thank you for your kind reply. If I want to store a mixture of />/PetscReal and PetscInt, how can I do it? / What operations do you need to perform with your

Re: [petsc-users] a question about PetscSectionCreate

2017-05-28 Thread Dave May
On Sun, 28 May 2017 at 09:30, leejearl wrote: > Hi, Dave: > Thank you for your kind reply. If I want to store a mixture of > PetscReal and PetscInt, how can I do it? What operations do you need to perform with your struct? > > Thanks, > leejearl > >

[petsc-users] a question about PetscSectionCreate

2017-05-28 Thread leejearl
Hi, Dave: Thank you for your kind reply. If I want to store a mixture of PetscReal and PetscInt, how can I do it? Thanks, leejearl

Re: [petsc-users] a question about PetscSectionCreate

2017-05-28 Thread Dave May
On Sun, 28 May 2017 at 08:31, leejearl wrote: > Hi, PETSc developer: > > I need to create a PetscSection with a struct. The struct is > defined as follow, > > typedef struct > { >PetscReal x; >PetscInt id; > } testStruct; > > When I run the

[petsc-users] a question about PetscSectionCreate

2017-05-28 Thread leejearl
Hi, PETSc developer: I need to create a PetscSection with a struct. The struct is defined as follow, typedef struct { PetscReal x; PetscInt id; } testStruct; When I run the program, I got a wrong output as follow, Vec Object: 1 MPI processes type: seq 2.