Re: [petsc-users] PETSc version 3.9 with Fortran and DMPlex questions

2018-04-11 Thread Bernardo Rocha
Uhmmm. Indeed. Sorry for the mistake. Just fixed my ordering before sending them to DMPlexCreateFromCellList and it worked fine. Thanks. On Wed, Apr 11, 2018 at 10:15 AM, Matthew Knepley wrote: > On Wed, Apr 11, 2018 at 9:06 AM, Bernardo Rocha < > bernardomartinsro...@gmail.com> wrote: > >> OK M

Re: [petsc-users] PETSc version 3.9 with Fortran and DMPlex questions

2018-04-11 Thread Matthew Knepley
On Wed, Apr 11, 2018 at 9:06 AM, Bernardo Rocha < bernardomartinsro...@gmail.com> wrote: > OK Matthew, thanks a lot for your feedback. > > Reading the code for the first two faces I noted you used the standard > numbering for the faces. > face 0 (bottom) -> nodes 0 1 2 3 > face 1 (top) -> no

Re: [petsc-users] PETSc version 3.9 with Fortran and DMPlex questions

2018-04-11 Thread Bernardo Rocha
OK Matthew, thanks a lot for your feedback. Reading the code for the first two faces I noted you used the standard numbering for the faces. face 0 (bottom) -> nodes 0 1 2 3 face 1 (top) -> nodes 4 5 6 7 When this is defined, all the other faces are fixed. Therefore, I noticed some indexes e

Re: [petsc-users] PETSc version 3.9 with Fortran and DMPlex questions

2018-04-10 Thread Matthew Knepley
On Tue, Apr 10, 2018 at 2:19 PM, Bernardo Rocha < bernardomartinsro...@gmail.com> wrote: > Hi everyone, > > I have two questions. > > (Q1) > The first one is related to the new PETSc 3.9. > I've been using Fortran and using the "userctx" to wrap some data > for the function calls within my program

Re: [petsc-users] PETSc version 3.9 with Fortran and DMPlex questions

2018-04-10 Thread Bernardo Rocha
Found my way to the answer of the first question: ksp/ksp/examples/tutorials/ex13f90.F90 With respect to question 2... I'm still confused about this behaviour of the DMPlex; or I am missing something. Best regards. Bernardo On Tue, Apr 10, 2018 at 3:19 PM, Bernardo Rocha < bernardomartinsro...@g

[petsc-users] PETSc version 3.9 with Fortran and DMPlex questions

2018-04-10 Thread Bernardo Rocha
Hi everyone, I have two questions. (Q1) The first one is related to the new PETSc 3.9. I've been using Fortran and using the "userctx" to wrap some data for the function calls within my program. Just like : call func(...,userctx) and retrieving data as: PetscFortranAddr userctx(*) b = userctx(2)